/* ==========================================================================
   AYALA — ayala.food
   Stylesheet. Palette sampled directly from the AYALA packaging artwork.
   Fonts are self-hosted (no CDN, no external requests).
   ========================================================================== */

/* --- Fonts -------------------------------------------------------------- */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Abril Fatface';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/abril-fatface-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Abril Fatface';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/abril-fatface-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens ------------------------------------------------------------- */

:root {
  /* Palette — AYALA packaging */
  --cream: #f4ead9;         /* page ground */
  --sand: #e4d2be;          /* wordmark field, alternating bands */
  --husk: #fbf6ec;          /* label discs, form fields */
  --terracotta: #a4512c;    /* brand accent */
  --terracotta-deep: #86401f;
  --cacao: #4e382c;         /* ornament brown, dark bands */
  --ink: #3a2a20;           /* body text */
  --kraft: #c9ae8e;         /* hairlines on light ground */
  --kraft-soft: #d9c4a8;

  --measure: 62ch;
  --shell: 1240px;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --rail: max(var(--gutter), (100vw - var(--shell)) / 2);

  --step-hero: clamp(2.85rem, 6.4vw, 5rem);
  --step-page: clamp(2.35rem, 5vw, 3.75rem);
  --step-section: clamp(1.75rem, 3.2vw, 2.5rem);
  --step-block: clamp(1.35rem, 2.2vw, 1.7rem);

  --pad-block: clamp(3.5rem, 8vw, 7rem);
}

/* --- Reset -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.62;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p, ul, ol, dl { margin: 0; }

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--cacao); color: var(--cream);
  padding: .75rem 1.25rem; text-decoration: none;
}
.skip:focus { left: .5rem; top: .5rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --- Type --------------------------------------------------------------- */

.display {
  font-family: 'Abril Fatface', 'Georgia', serif;
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.012em;
  color: var(--cacao);
  text-wrap: balance;
}

.t-hero { font-size: var(--step-hero); }
.t-page { font-size: var(--step-page); }
.t-section { font-size: var(--step-section); line-height: 1.04; }
.t-block { font-size: var(--step-block); line-height: 1.12; }

.lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.6;
  max-width: var(--measure);
}
.body-max { max-width: var(--measure); }

.muted { color: #6b5344; }

/* --- Layout ------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: var(--pad-block); }
.band--sand { background: var(--sand); }
.band--cacao { background: var(--cacao); color: var(--cream); }
.band--cacao .display { color: var(--cream); }
.band--terracotta { background: var(--terracotta); color: var(--cream); }
.band--terracotta .display { color: var(--cream); }

.stack > * + * { margin-top: 1.15rem; }
.stack-lg > * + * { margin-top: 2rem; }

/* --- Ornament ----------------------------------------------------------- */
/* The woven corn motif, vectorised from the AYALA packaging artwork.
   Rendered as a CSS mask so it inherits text colour. */

.orn {
  display: block;
  width: 3.25rem;
  aspect-ratio: 827 / 419;
  background: currentColor;
  -webkit-mask: url('../img/ornament-h.svg') center / contain no-repeat;
  mask: url('../img/ornament-h.svg') center / contain no-repeat;
  flex: none;
}
.orn--sm { width: 2.25rem; }

/* Hairline — ornament — hairline, as on the pack label */
.rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--cacao);
  margin-block: 1.75rem;
}
.rule::before, .rule::after {
  content: '';
  flex: 1 1 0;
  height: 1px;
  background: var(--kraft);
}
.rule--short { max-width: 15rem; }
.rule--start::before { display: none; }
.band--cacao .rule, .band--terracotta .rule { color: var(--cream); }
.band--cacao .rule::before, .band--cacao .rule::after,
.band--terracotta .rule::before, .band--terracotta .rule::after {
  background: rgba(244, 234, 217, .38);
}

/* Ornament alone, no rules */
.mark { color: var(--terracotta); margin-bottom: 1.4rem; }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .95rem 1.6rem;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .015em;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--primary { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.btn--primary:hover { background: var(--terracotta-deep); border-color: var(--terracotta-deep); }
.btn--ghost { background: transparent; color: var(--cacao); border-color: var(--cacao); }
.btn--ghost:hover { background: var(--cacao); color: var(--cream); }
.band--cacao .btn--primary,
.band--terracotta .btn--primary { background: var(--cream); color: var(--cacao); border-color: var(--cream); }
.band--cacao .btn--primary:hover,
.band--terracotta .btn--primary:hover { background: var(--sand); border-color: var(--sand); }
.band--cacao .btn--ghost { color: var(--cream); border-color: rgba(244,234,217,.55); }
.band--cacao .btn--ghost:hover { background: var(--cream); color: var(--cacao); border-color: var(--cream); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Text link with the brand underline */
.link {
  display: inline-block;
  color: var(--terracotta);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
}
.link:hover { color: var(--terracotta-deep); }
.band--cacao .link { color: var(--sand); }

/* --- Header ------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--sand);
  border-bottom: 1px solid var(--kraft);
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 4.75rem;
}
.brand { display: block; flex: none; margin-right: auto; }
.brand img { width: clamp(7.5rem, 14vw, 10.5rem); height: auto; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav a {
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--cacao);
  padding-block: .35rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--kraft); }
.nav a[aria-current='page'] { border-bottom-color: var(--terracotta); color: var(--terracotta); }

.langs { display: flex; align-items: center; gap: .1rem; }
.langs a {
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  color: #7a6152;
  padding: .3rem .45rem;
  border-radius: 2px;
}
.langs a:hover { color: var(--cacao); background: rgba(78,56,44,.07); }
.langs a[aria-current='true'] { color: var(--cream); background: var(--cacao); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  background: none;
  border: 1.5px solid var(--cacao);
  border-radius: 2px;
  color: var(--cacao);
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  padding: .45rem .8rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--sand);
    border-bottom: 1px solid var(--kraft);
    padding: .5rem var(--gutter) 1.25rem;
  }
  .nav[data-open='true'] { display: flex; }
  .nav a {
    padding: .85rem 0;
    border-bottom: 1px solid var(--kraft-soft);
    font-size: 1.0625rem;
  }
  .nav a[aria-current='page'] { border-bottom-color: var(--terracotta); }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  background: var(--sand);
  border-bottom: 1px solid var(--kraft);
}
.hero__text {
  padding: clamp(3rem, 6.5vw, 6rem) clamp(2rem, 5vw, 4.5rem) clamp(3rem, 6.5vw, 6rem) var(--rail);
  align-self: center;
  max-width: 46rem;
}
.hero__text p { max-width: 34rem; }
.hero__media { position: relative; min-height: clamp(22rem, 46vw, 36rem); }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__text { padding: clamp(2.5rem, 9vw, 4rem) var(--gutter); max-width: none; }
  .hero__media { min-height: 58vw; }
}

/* --- Page header (interior pages) --------------------------------------- */

.page-head { background: var(--sand); border-bottom: 1px solid var(--kraft); padding-block: clamp(2.75rem, 6vw, 5rem); }
.page-head__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: end; }
@media (max-width: 800px) { .page-head__grid { grid-template-columns: 1fr; align-items: start; } }

/* --- Motto band --------------------------------------------------------- */

.motto {
  text-align: center;
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}
.motto .display { font-size: clamp(1.6rem, 3.6vw, 2.75rem); }
.motto .rule { max-width: 22rem; margin-inline: auto; margin-bottom: 1.5rem; }
.motto p { margin-top: 1.1rem; font-size: .9375rem; opacity: .9; }

/* --- Split (image + text) ----------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--narrow { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.split__media img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.split--flip .split__media { order: 2; }
@media (max-width: 820px) {
  .split, .split--narrow { grid-template-columns: 1fr; gap: 2rem; }
  .split--flip .split__media { order: 0; }
}

/* --- Product family index (home) ---------------------------------------- */

.families {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: 2.75rem;
}
.family { text-decoration: none; color: inherit; display: block; }
.family img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.family h3 { margin-top: 1rem; font-size: 1.0625rem; font-weight: 600; line-height: 1.3; }
.family p { margin-top: .3rem; font-size: .875rem; color: #6b5344; }
.family:hover h3 { color: var(--terracotta); }
.family:hover img { opacity: .9; }
@media (max-width: 900px) { .families { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* --- Format specification list ------------------------------------------ */
/* Dotted leaders echo the dotted ring on the AYALA pack label. */

.specs { margin-top: 1.75rem; }
.spec {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  padding-block: .7rem;
  border-bottom: 1px solid var(--kraft-soft);
}
.spec:first-child { border-top: 1px solid var(--kraft-soft); }
.spec__name { font-weight: 600; font-size: 1rem; flex: none; }
.spec__dots {
  flex: 1 1 auto;
  height: 0;
  border-bottom: 2px dotted var(--kraft);
  transform: translateY(-.3em);
  min-width: 1.5rem;
}
.spec__value { flex: none; font-size: .9375rem; color: #5d4636; white-space: nowrap; }

/* --- Product page sections ---------------------------------------------- */

.product { padding-block: clamp(2.75rem, 6vw, 4.5rem); border-bottom: 1px solid var(--kraft); }
.product:last-of-type { border-bottom: 0; }
.product__note { margin-top: 1.5rem; font-size: .9375rem; color: #6b5344; max-width: 34rem; }

/* --- Attribute row (gluten free / made of corn style badges) ------------- */

.attrs { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 2rem; }
.attr { display: flex; align-items: center; gap: .65rem; font-size: .875rem; font-weight: 600; color: var(--cacao); }
.attr .orn { width: 1.6rem; color: var(--terracotta); }

/* --- Numbered points (only where content is a real sequence) ------------- */

.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); margin-top: 2.5rem; }
.point { border-top: 2px solid var(--terracotta); padding-top: 1.1rem; }
.point h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: .5rem; }
.point p { font-size: .9375rem; color: #5d4636; }
@media (max-width: 780px) { .points { grid-template-columns: 1fr; } }

/* --- Packaging figure --------------------------------------------------- */

.figure figcaption { margin-top: .85rem; font-size: .875rem; color: #6b5344; }

/* --- Form --------------------------------------------------------------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: .875rem; font-weight: 600; color: var(--cacao); }
.field .req { color: var(--terracotta); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--husk);
  border: 1.5px solid var(--kraft);
  border-radius: 2px;
  padding: .75rem .9rem;
  width: 100%;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--cacao); }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 49%, var(--cacao) 50%), linear-gradient(-45deg, transparent 49%, var(--cacao) 50%); background-position: calc(100% - 1.15rem) 55%, calc(100% - .75rem) 55%; background-size: .4rem .4rem; background-repeat: no-repeat; padding-right: 2.5rem; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: .5rem; }
.form-note { font-size: .8125rem; color: #6b5344; max-width: 34rem; }
.hp { position: absolute; left: -9999px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.aside-card { background: var(--sand); padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: 2px; }
.aside-card h2 { font-size: 1.25rem; }
.aside-card ul { list-style: none; padding: 0; margin-top: 1.25rem; }
.aside-card li { padding-block: .8rem; border-bottom: 1px solid var(--kraft); font-size: .9375rem; }
.aside-card li:last-child { border-bottom: 0; }
.aside-card a { color: var(--terracotta); font-weight: 600; }

/* --- Footer ------------------------------------------------------------- */

.site-foot { background: var(--cacao); color: var(--sand); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.site-foot a { color: var(--sand); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: clamp(1.75rem, 4vw, 3rem); }
.foot-logo { width: clamp(9rem, 16vw, 12rem); color: var(--cream); }
.foot-logo svg, .foot-logo img { width: 100%; height: auto; }
.site-foot h2 { font-size: .9375rem; font-weight: 600; color: #c6a98c; margin-bottom: .9rem; }
.site-foot ul { list-style: none; padding: 0; }
.site-foot li + li { margin-top: .5rem; }
.site-foot li { font-size: .9375rem; }
.foot-tag { margin-top: 1.25rem; font-size: .9375rem; color: #c6a98c; max-width: 22rem; }
.foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(228, 210, 190, .25);
  font-size: .8125rem;
  color: #c6a98c;
}
.foot-langs { display: flex; gap: 1rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* --- Print -------------------------------------------------------------- */

@media print {
  .masthead, .site-foot, .btn-row, .nav-toggle { display: none; }
  body { background: #fff; }
}

/* --- Form status message ------------------------------------------------ */

.form-col { min-width: 0; }
.form-status {
  margin: 0 0 1.75rem;
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--terracotta);
  background: var(--husk);
  font-size: .9375rem;
}
.form-status--ok { border-left-color: #5b7a4a; }
.form-status--error { border-left-color: var(--terracotta); }
