/* ============================================================
   Gusto Italiano — production stylesheet
   Brand system taken from the printed packaging artwork, white-page
   variant: white stock, cream cards, maroon ink, Gusto red as the
   signal colour, maroon story/footer bands. The kraft ground and the
   tricolore device are both retired here — see the palette note below.

   Colour is defined in two layers. `--gi-*` is the canonical
   brand palette and the ONLY place a literal colour may appear.
   Everything below it is role-named (the project's existing
   convention) and resolves back to that palette.
   ============================================================ */

:root {
  /* ---------- Brand palette — the only literals in this file ---------- */
  /* Primary */
  --gi-red:          #E4231B;  /* signal colour: CTAs, highlights */
  --gi-green:        #319C2F;  /* fresh cues, badges */
  /* Ink */
  --gi-maroon:       #4E0F12;  /* headings, dark surfaces */
  --gi-red-deep:     #B81C24;  /* hover / pressed */
  --gi-charcoal:     #2A1512;  /* body text */
  /* Surface */
  --gi-white:        #FFFFFF;  /* page stock */
  --gi-cream:        #FBF3E7;  /* cards on white */
  /* Kraft and the tricolour trio stay defined — they are part of the brand
     palette taken from the packaging — but this variant uses neither: the
     page is white and the flag device has been removed everywhere. Kept so
     re-enabling either is a one-line change, not a re-derivation. */
  --gi-kraft:        #F6E0C2;
  --gi-flag-green:   #2EA141;
  --gi-flag-white:   #FFFFFF;
  --gi-flag-red:     #C1191D;

  /* Channel triplets. Plain CSS can't derive an alpha from a hex, and
     translucent rules/shadows are load-bearing here, so each colour that
     needs one is mirrored as space-separated channels for rgb(… / a). */
  --gi-maroon-rgb:   78 15 18;
  --gi-cream-rgb:    251 243 231;
  --gi-white-rgb:    255 255 255;
  --gi-red-rgb:      228 35 27;

  /* ---------- Semantic layer ---------- */
  /* Surfaces */
  --bg: var(--gi-white);            /* page stock */
  --surface: var(--gi-cream);       /* cards on white */
  --surface-raised: var(--gi-white);/* input wells, photo mats */
  --media-backing: var(--gi-white);
  --dark: var(--gi-maroon);         /* story + footer bands */

  /* Text */
  --ink: var(--gi-charcoal);                  /* 17.3:1 on white */
  --heading: var(--gi-maroon);                /* 15.0:1 on white */
  --muted: rgb(var(--gi-maroon-rgb) / .78);   /* 7.9:1 white / 7.4:1 cream */
  --on-accent: var(--gi-white);               /* 4.6:1 on gi-red */
  --on-green: var(--gi-charcoal);             /* 4.9:1 — white would be 3.5 */
  --on-dark: rgb(var(--gi-cream-rgb) / .88);
  --on-dark-bright: var(--gi-cream);
  --on-dark-muted: rgb(var(--gi-cream-rgb) / .64);

  /* Signal */
  --accent: var(--gi-red);
  --accent-hover: var(--gi-red-deep);
  /* Red set below 24px. --gi-red clears 4.5:1 on white by a hair (4.61) but
     drops to 4.19 on the cream cards, where most small red text actually
     sits, so it steps down to the deep tone (6.5 / 5.9). Reserve --accent
     itself for fills, icons and 24px+ display. */
  --accent-text: var(--gi-red-deep);
  --error: var(--gi-red-deep);
  --focus: var(--gi-green);

  /* Rules & shadow — warm only, never neutral grey */
  --line: rgb(var(--gi-maroon-rgb) / .16);
  --line-strong: rgb(var(--gi-maroon-rgb) / .32);
  /* Input boundaries carry the whole affordance (white well on a cream card is
     only 1.09:1), so they need the 3:1 of WCAG 1.4.11 on their own. .32 gives
     1.98:1 on cream; .5 gives 3.17:1 on cream and 3.49:1 on the white fill. */
  --line-input: rgb(var(--gi-maroon-rgb) / .5);
  --line-dark: rgb(var(--gi-cream-rgb) / .22);
  --shadow-sm: 0 10px 30px rgb(var(--gi-maroon-rgb) / .1);
  --shadow-md: 0 14px 30px rgb(var(--gi-maroon-rgb) / .13);
  --shadow-lg: 0 20px 44px rgb(var(--gi-maroon-rgb) / .1);

  /* ---------- Type ----------
     Four free Google faces, no licensing tail. Two of them need an
     explicit style/weight or you get the wrong face entirely — see the
     .product-name and .accent utilities below, and note that every
     `font:` shorthand in this file carries style and weight for the
     same reason (the shorthand resets whatever it omits). */
  --font-script:  'Lobster Two', cursive;                 /* product names — italic 700 only */
  --font-display: 'Bebas Neue', sans-serif;               /* headings, buttons — UPPERCASE ONLY */
  --font-body:    'Source Sans 3', system-ui, sans-serif;
  --font-accent:  'Amatic SC', cursive;                   /* hand-drawn — 700 only */

  /* Motion */
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-out-expo: cubic-bezier(.19, 1, .22, 1);

  /* Z-scale */
  --z-header: 50;
  --z-skip-link: 100;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Type utilities — the two faces that render as the WRONG face
   if you set font-family alone. Never set --font-script or
   --font-accent without going through these.
   ============================================================ */

/* Lobster Two: upright regular is not the brand face. Italic 700 only.
   Denser than a typical script, so line-height stays generous. */
.product-name {
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 700;
  line-height: 1.25;
}

/* Amatic SC: regular is far too light, and the face is tall and
   condensed — size it ~25% up on whatever it sits beside. */
.accent {
  font-family: var(--font-accent);
  font-weight: 700;
  font-style: normal;
  line-height: 1.15;
}

/* Bebas Neue has NO lowercase glyphs — any lowercase set in
   --font-display silently falls back to the system sans. Every
   display rule below carries this; the utility is the shared source. */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  text-transform: uppercase;
}

/* Eyebrow — body face, not display, because Bebas must never go below
   14px and eyebrows live at 11–13px. */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
}

::selection { background: var(--accent); color: var(--on-accent); }

section { scroll-margin-top: 96px; }

img { display: block; }

/* Green ring at 2px offset, per the brand spec, over a 1px maroon ring.
   Green alone would now pass on white (3.54) but only just on the cream
   cards (3.22) against a 3:1 floor — too thin a margin to rest a WCAG
   1.4.11 pass on. Maroon carries it on white and cream (15.0 / 13.6),
   green carries it on the maroon bands (4.23). Both rings are load-bearing. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--gi-maroon);
  border-radius: 2px;
}
.on-dark :focus-visible { box-shadow: none; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: 12px;
  transform: translateY(-64px);
  left: 12px;
  z-index: var(--z-skip-link);
  background: var(--dark);
  color: var(--on-dark-bright);
  font: 700 12px var(--font-body);
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 18px;
  border-radius: 2px;
  transition: transform .2s var(--ease-out);
}
.skip-link:focus {
  transform: translateY(0);
}
main:focus {
  outline: none;
}

/* ---------- Shared bits ---------- */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

/* Long/short label pairs (nav + header CTA); short shows only on small screens */
.lbl-short { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--accent);
  color: var(--on-accent);
  font: 400 17px/1 var(--font-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 15px 28px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out),
              background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}
.btn:disabled:hover { background: var(--accent); }
.btn:active { transform: translateY(1px); }

/* Secondary — green fill. Label is charcoal, not white: white on
   --gi-green is 3.54:1, and Bebas ships one weight so a 17px label is
   normal text by WCAG and needs 4.5:1. Charcoal gives 4.88:1.
   The palette has no darker green, so hover dims rather than swaps. */
.btn-secondary {
  background: var(--gi-green);
  color: var(--on-green);
}
.btn-secondary:hover { background: var(--gi-green); filter: brightness(.92); }
.btn-secondary:disabled:hover { background: var(--gi-green); filter: none; }

/* 44px min-height, not just the text box. At 17px caps the line box is ~22px,
   which failed WCAG 2.2 AA 2.5.8 (24px) outright and sat beside a 47px pill.
   The rule stays anchored to the text via the inner span. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 400 17px/1 var(--font-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--heading);
  text-decoration: none;
}
/* The rule rides the label, not the anchor: the anchor is 44px tall for the
   tap target, so a border on it draws ~15px below the baseline. */
.link-arrow-label {
  display: inline-block;
  border-bottom: 1.5px solid var(--line-strong);
  padding-bottom: 4px;
  transition: border-color .25s ease;
}
.link-arrow .arrow { display: inline-block; transition: transform .3s var(--ease-out-expo); }
.link-arrow:hover .link-arrow-label { border-color: var(--accent); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgb(var(--gi-white-rgb) / .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .35s ease;
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}
.header-row {
  min-height: 84px;
  padding-top: 10px;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.header-logo { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.header-logo img { height: 54px; width: auto; transition: transform .35s var(--ease-out); }
.site-header.is-scrolled .header-logo img { transform: scale(.93); }

.site-nav { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.site-nav a:not(.btn) {
  position: relative;
  text-decoration: none;
  font: 700 12px var(--font-body);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 3px;
  transition: color .25s ease;
}
.site-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.site-nav a:not(.btn):hover { color: var(--ink); }
.site-nav a:not(.btn):hover::after,
.site-nav a:not(.btn)[aria-current="true"]::after { transform: scaleX(1); }
.site-nav a:not(.btn)[aria-current="true"] { color: var(--ink); }
.site-nav .btn { padding: 11px 18px; font-size: 17px; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(64px, 9vw, 108px) 0 clamp(48px, 6vw, 80px);
  text-align: center;
}
.hero-inner { max-width: 900px; margin: 0 auto; padding: 0 32px; }

/* The one script moment on the page. Lobster Two italic 700 — the
   sentence keeps its case and its <em>, which Bebas could not carry. */
.hero h1 {
  font: italic 700 clamp(2.75rem, 6.4vw, 4.5rem)/1.25 var(--font-script);
  letter-spacing: 0;
  margin: 0;
  color: var(--heading);
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); }

/* Masked line reveal (activated only under html.js-anim).
   Lobster's descenders overshoot the line box, so the mask is padded and
   the padding pulled back out — without this the tails of g/y get clipped. */
.hline { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.hline > span { display: block; }

.hero-sub {
  text-wrap: pretty;
  font: 400 clamp(1.0625rem, 1.4vw, 1.15rem)/1.65 var(--font-body);
  color: var(--muted);
  margin: 26px auto 0;
  max-width: 50ch;
}
/* Product name inline in body copy — script, per the assignment table.
   Kept to four words; Lobster is never set in a long line.
   nowrap because the name is a single unit and must never break across
   lines. It measures ~164px against a 276px paragraph at the narrowest
   breakpoint, so holding it together can't push the line into overflow. */
.serif-em {
  font: italic 700 1.08em var(--font-script);
  color: var(--heading);
  white-space: nowrap;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 26px;
  margin-top: 36px;
}
.hero-ctas .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgb(var(--gi-red-rgb) / .28);
}

/* Framed hero image, matted like a menu-card plate */
.hero-figure {
  max-width: 1000px;
  margin: clamp(44px, 6vw, 72px) auto 0;
  padding: 0 32px;
}
.hero-media {
  height: clamp(280px, 42vw, 460px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: var(--surface-raised);
}
.hero-media img,
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media img { will-change: transform; }
/* Oversized so parallax travel never reveals the mat beneath. 1.16 is the
   smallest scale that covers the largest offset main.js can produce at either
   breakpoint. main.js only writes --parallax-y; the scale lives here. */
.parallax-img { transform: scale(1.16) translateY(var(--parallax-y, 0px)); }

/* ---------- Products ---------- */
.products { padding: clamp(64px, 9vw, 112px) 0; }
.products-intro { max-width: 64ch; }
.products h2 {
  font: 400 clamp(2.125rem, 4.6vw, 3.5rem)/1.06 var(--font-display);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
  color: var(--heading);
  text-wrap: balance;
}
.products-intro p {
  text-wrap: pretty;
  font: 400 clamp(1.0625rem, 1.3vw, 1.15rem)/1.65 var(--font-body);
  color: var(--muted);
  margin: 16px 0 0;
  max-width: 56ch;
}

.product-grid {
  align-items: start;
  display: grid;
  /* min(100%, …) lets tracks shrink below the ideal width on very small phones
     instead of overflowing the viewport */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(20px, 3vw, 32px);
  margin-top: clamp(36px, 5vw, 56px);
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .35s var(--ease-out), box-shadow .35s ease, border-color .35s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.card-media {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: var(--media-backing);
  border-bottom: 1px solid var(--line);
}
.card-media img {
  transition: transform .6s var(--ease-out);
}
/* Pack shots are cut from the packaging render on white, so they are fitted
   rather than cropped: the box has to stay whole and legible. */
.card-media .pack-shot {
  object-fit: contain;
  padding: 14px 0;
}
.product-card:hover .card-media img { transform: scale(1.05); }
/* The loaf shots are 16:9 inside a much wider frame, so cover throws away the
   top and bottom. Centred, both lost the part that sells them: the brown loaf
   lost its lower slices, the seeded one lost the near edge of the plate.
   Anchoring low keeps the food and drops the garden behind it instead. */
.loaf-brown { object-position: center 72%; }
.loaf-seeded { object-position: center 86%; transform: scale(1.07); }
.product-card:hover .card-media .loaf-seeded { transform: scale(1.12); }

.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  font: 400 14px/1 var(--font-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 999px;
}
/* Green fill takes charcoal, not white: white on --gi-green is 3.54:1 and
   badges are far below the 24px that would let that pass. Charcoal is 4.9:1. */
.badge-green {
  color: var(--on-green);
  background: var(--gi-green);
}
.badge-red { color: var(--on-accent); background: var(--accent); }
/* Provenance variant — cream ground, maroon text, thin rule */
.badge-provenance {
  color: var(--heading);
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
}

.card-body { padding: clamp(24px, 3vw, 32px); }
/* The product eyebrow — script, at card scale rather than the
   44–72px hero range. Sits above the display H3. */
.card-kicker {
  font: italic 700 1.75rem/1.25 var(--font-script);
  color: var(--accent-text);
}
.card-body h3 {
  font: 400 1.9rem/1.05 var(--font-display);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 6px 0 0;
  color: var(--heading);
}
.card-body > p {
  font: 400 1.0625rem/1.6 var(--font-body);
  color: var(--muted);
  margin: 12px 0 0;
  max-width: 44ch;
}

/* The six flavours run as one comma-separated line rather than a dotted
   list, so it reads as a description and not a legend. Wider than the
   .card-body > p measure because it is a run of names, not prose. */
.flavour-line {
  font: 600 14px/1.65 var(--font-body);
  color: var(--ink);
  max-width: 52ch;
}

.spec-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.spec-tags span {
  font: 600 13px var(--font-body);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Second range heading, ruled off from the grid above like a new menu page */
.range-intro {
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.range-intro h2 { max-width: 64ch; }
.range-intro h2 {
  font: 400 clamp(2.125rem, 4.6vw, 3.5rem)/1.06 var(--font-display);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
  color: var(--heading);
  text-wrap: balance;
}
.range-intro p {
  text-wrap: pretty;
  font: 400 clamp(1.0625rem, 1.3vw, 1.15rem)/1.65 var(--font-body);
  color: var(--muted);
  margin: 16px 0 0;
  max-width: 56ch;
}


/* ---------- Film ----------
   Shares the framed-photo treatment of the hero so the two read as one
   system: same mat, same radius, same border. */
.film { padding: 0 0 clamp(64px, 9vw, 112px); }
.film-inner {
  max-width: 1064px;
  text-align: center;
}
.film h2 {
  font: 400 clamp(2.125rem, 4.6vw, 3.5rem)/1.06 var(--font-display);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
  color: var(--heading);
  text-wrap: balance;
}
.film-frame {
  margin-top: clamp(28px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: var(--surface-raised);
}
.film-frame video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 810;
  border-radius: 10px;
  background: var(--dark);
}

/* ---------- Form lede ---------- */
.form-lede {
  margin: 0 0 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.form-lede h3 {
  font: 400 clamp(1.5rem, 2.6vw, 1.875rem)/1.05 var(--font-display);
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--heading);
  margin: 0;
}
.form-lede p {
  font: 400 .9375rem/1.55 var(--font-body);
  color: var(--muted);
  margin: 8px 0 0;
  text-wrap: pretty;
}
.form-lede strong { color: var(--ink); font-weight: 700; }

/* ---------- Contact ---------- */
.contact { padding: clamp(64px, 9vw, 116px) 0; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
}
.contact h2 {
  font: 400 clamp(2.125rem, 4.6vw, 3.5rem)/1.06 var(--font-display);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
  color: var(--heading);
  text-wrap: balance;
}
.contact-copy > p {
  text-wrap: pretty;
  font: 400 clamp(1.0625rem, 1.3vw, 1.15rem)/1.65 var(--font-body);
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 46ch;
}

/* Trade terms, ruled like a menu card */
.terms {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  max-width: 52ch;
}
.terms li {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font: 400 1.0625rem/1.55 var(--font-body);
  color: var(--muted);
}
.terms li:last-child { border-bottom: 1px solid var(--line); }
.terms strong { color: var(--ink); font-weight: 700; }

.contact-meta {
  margin-top: 28px;
  display: grid;
  gap: 10px;
  font: 400 1.0625rem var(--font-body);
  color: var(--muted);
}
.contact-meta span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.meta-ico {
  flex: none;
  color: var(--accent);
}
.contact-meta a {
  color: var(--accent-text);
  font-weight: 700;
  text-decoration: none;
  /* 44px tap target on touch. */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.contact-meta a:hover { text-decoration: underline; }

.contact-social {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.contact-social a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font: 700 1.0625rem var(--font-body);
  color: var(--accent-text);
  text-decoration: none;
}
.contact-social a:hover { text-decoration: underline; }

/* Form card */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(22px, 2.6vw, 30px);
  box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 12px; }
.field-last { margin-bottom: 8px; }
.field label {
  display: block;
  font: 600 14px var(--font-body);
  color: var(--ink);
  margin-bottom: 6px;
}
.field .req { color: var(--accent-text); }
.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--surface-raised);
  border: 1.5px solid var(--line-input);
  border-radius: 10px;
  padding: 11px 14px;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.field input::placeholder,
/* .66 not .6 — placeholders are text and should clear 4.5:1; .6 lands at 4.38 */
.field textarea::placeholder { color: rgb(var(--gi-maroon-rgb) / .66); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(var(--gi-red-rgb) / .14);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--error); }
.field textarea { min-height: 96px; resize: vertical; }
.field-error {
  display: block;
  min-height: 1em;
  margin-top: 4px;
  font: 600 13px var(--font-body);
  color: var(--error);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .3s ease, transform .3s var(--ease-out);
}
.field-error.is-visible { opacity: 1; transform: none; }

/* Honeypot: reachable to a bot parsing the DOM, invisible and unfocusable
   to everyone else. display:none is avoided on purpose — the better bots
   skip those, which defeats the trap. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-card .btn { width: 100%; margin-top: 6px; }

/* Send failure. The old build had no failure state at all: a dropped request
   rendered the success panel, so "delivered" and "lost" looked identical. */
.form-send-error {
  font: 600 14px/1.5 var(--font-body);
  color: var(--error);
  text-align: center;
  margin: 14px 0 0;
}
.form-send-error a {
  color: var(--error);
  font-weight: 700;
  text-underline-offset: 2px;
}
.form-help {
  font: 600 13px var(--font-body);
  color: var(--muted);
  text-align: center;
  margin: 10px 0 0;
}

/* Success panel */
.form-success { text-align: center; padding: 24px 8px; }
.success-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--gi-green);
  color: var(--on-green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-success h3 {
  font: italic 700 2.4rem/1.25 var(--font-script);
  margin: 0;
  color: var(--heading);
}
.form-success h3:focus {
  /* Programmatic focus target for screen readers only; not keyboard-reachable.
     box-shadow as well as outline — the global :focus-visible rule sets both,
     and clearing only the outline left a stray 1px maroon rectangle drawn
     around "Thank you!" for anyone who submitted with the keyboard. */
  outline: none;
  box-shadow: none;
}
.form-success p {
  font: 400 1.0625rem/1.6 var(--font-body);
  color: var(--muted);
  margin: 10px auto 0;
  max-width: 32ch;
}
.btn-outline {
  margin-top: 22px;
  font: 400 17px/1 var(--font-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--heading);
  background: transparent;
  border: 2px solid var(--gi-maroon);
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
/* Tertiary inverts on hover */
.btn-outline:hover {
  background: var(--gi-maroon);
  color: var(--gi-cream);
}

html.js-anim .form-success.is-entering { animation: successIn .55s var(--ease-out) both; }
@keyframes successIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}
html.js-anim .form-success.is-entering .check-draw {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  animation: checkDraw .5s .3s var(--ease-out) forwards;
}
@keyframes checkDraw { to { stroke-dashoffset: 0; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: var(--on-dark);
  padding: clamp(48px, 6vw, 72px) 0;
}
.footer-main {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand { max-width: 38ch; }
.footer-brand img { height: 46px; width: auto; margin-bottom: 16px; }
.footer-brand p {
  font: 400 1.0625rem/1.6 var(--font-body);
  color: var(--on-dark);
  margin: 0;
}
.footer-social {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  gap: 12px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  color: var(--on-dark);
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.footer-social a:hover {
  color: var(--on-dark-bright);
  border-color: var(--on-dark-bright);
}
.footer-nav {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-nav a {
  text-decoration: none;
  font: 700 12px var(--font-body);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--on-dark);
  transition: color .25s ease;
}
.footer-nav a:hover { color: var(--on-dark-bright); }
.footer-nav .to-top {
  color: var(--on-dark-bright);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 9px 16px;
  transition: border-color .25s ease;
}
.footer-nav .to-top:hover { border-color: var(--on-dark-bright); }
.footer-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 600 13px var(--font-body);
  color: var(--on-dark-muted);
  margin: 0;
}

/* ============================================================
   Motion — every rule below activates only when JS adds
   html.js-anim (never added under prefers-reduced-motion),
   so content is always visible by default.
   ============================================================ */

html.js-anim [data-reveal] {
  transform: translateY(22px);
  transition: transform .75s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
html.js-anim [data-reveal].is-in {
  transform: none;
}

/* Staggered children (values strip) */
html.js-anim [data-reveal-stagger] > * {
  transform: translateY(14px);
  transition: transform .6s var(--ease-out);
}
html.js-anim [data-reveal-stagger].is-in > * {
  transform: none;
}
html.js-anim [data-reveal-stagger].is-in > *:nth-child(1) { transition-delay: 0ms; }
html.js-anim [data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: 60ms; }
html.js-anim [data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: 120ms; }
html.js-anim [data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: 180ms; }
html.js-anim [data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: 240ms; }
html.js-anim [data-reveal-stagger].is-in > *:nth-child(6) { transition-delay: 300ms; }
html.js-anim [data-reveal-stagger].is-in > *:nth-child(7) { transition-delay: 360ms; }
html.js-anim [data-reveal-stagger].is-in > *:nth-child(8) { transition-delay: 420ms; }
html.js-anim [data-reveal-stagger].is-in > *:nth-child(9) { transition-delay: 480ms; }

/* Hero load choreography */
html.js-anim .hero [data-hero-seq] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s var(--ease-out-expo);
}
/* The hero figure holds the LCP image, so it never fades in: fading it would
   push Largest Contentful Paint out by the length of the choreography. It
   still travels with the rest of the sequence. */
html.js-anim .hero [data-hero-seq="3"] { opacity: 1; transition: transform .6s var(--ease-out-expo); }
html.js-anim .hero.is-loaded [data-hero-seq] {
  opacity: 1;
  transform: none;
}
html.js-anim .hero .hline > span {
  transform: translateY(112%);
  transition: transform 1s var(--ease-out-expo);
}
html.js-anim .hero.is-loaded .hline > span { transform: none; }
html.js-anim .hero.is-loaded .hline:nth-child(2) > span { transition-delay: .12s; }
html.js-anim .hero.is-loaded [data-hero-seq="1"] { transition-delay: .16s; }
html.js-anim .hero.is-loaded [data-hero-seq="2"] { transition-delay: .26s; }
html.js-anim .hero.is-loaded [data-hero-seq="3"] { transition-delay: .36s; }
html.js-anim .hero.is-loaded .hero-figure {
  transition-duration: 1.1s;
  transition-delay: .55s;
}

/* ---------- Tablet: tighten the header so it stays one row down to 641px ---------- */
@media (max-width: 780px) {
  .header-row { gap: 16px; }
  .header-logo img { height: 46px; }
  .site-nav { gap: 18px; }
}

/* ---------- Mobile (placed last so it overrides base rules at equal specificity) ---------- */
@media (max-width: 640px) {
  /* Respect notches / rounded corners in landscape without losing the 22px gutter */
  .wrap {
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }
  section { scroll-margin-top: 76px; }

  /* Compact single-row sticky header: the old stacked logo/nav/CTA rows
     measured 159px and shadowed a quarter of the viewport on every scroll. */
  .header-row {
    min-height: 60px;
    padding-top: 8px;
    padding-bottom: 8px;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .header-logo img { height: 34px; }
  .site-header.is-scrolled .header-logo img { transform: none; }
  .site-nav { gap: 2px; flex-wrap: nowrap; }
  .lbl-long { display: none; }
  .lbl-short { display: inline; }
  /* Tap targets ≥44px via padding; the underline stays anchored under the text */
  .site-nav a:not(.btn) {
    font-size: 11px;
    letter-spacing: .12em;
    padding: 16px 6px;
    display: inline-flex;
    align-items: center;
  }
  .site-nav a:not(.btn)::after { bottom: 12px; left: 6px; width: calc(100% - 12px); }
  /* Bebas floors at 14px — below that it reads as a broken fallback. It's a
     condensed face, so 15px here still fits the one-row header. */
  .site-nav .btn {
    margin-left: 5px;
    padding: 0 14px;
    min-height: 44px;
    font-size: 15px;
    letter-spacing: .04em;
  }

  /* Hero: pull the headline up now that the header is short; keep the CTAs near the fold */
  .hero { padding-top: 44px; }
  .hero h1 { font-size: clamp(2.4rem, 10vw, 4.5rem); }
  .hero-sub { margin-top: 22px; }
  .hero-ctas { margin-top: 30px; }
  .hero-inner,
  .hero-figure {
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
  }

  /* Values: a quiet 2×2 grid — the inline dots orphan at line-ends when the row wraps */

  /* Softer, quicker reveals: fast flick-scrolls shouldn't outrun the motion */
  html.js-anim [data-reveal] {
    transform: translateY(14px);
    transition-duration: .55s;
  }
  html.js-anim [data-reveal-stagger] > * {
    transform: translateY(10px);
    transition-duration: .45s;
  }

  .footer-nav { gap: 4px 16px; }
  .footer-nav a:not(.to-top) { padding: 15px 4px; }
  .footer-nav .to-top { padding: 15px 18px; }
  .site-footer { padding-bottom: max(48px, env(safe-area-inset-bottom)); }

  /* Conversion order. The terms list is reassurance *while* filling the form
     in, not a prerequisite for it — and with it first, tapping the header CTA
     landed on a screen with no field on it, 102px above the form card. */
  .form-card { order: -1; }
}

/* ---------- Very small phones (320–370px): keep the header on one row ---------- */
@media (max-width: 370px) {
  .header-row {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .header-logo img { height: 28px; }
  .site-nav a:not(.btn) { padding: 16px 4px; letter-spacing: .06em; }
  .site-nav a:not(.btn)::after { left: 4px; width: calc(100% - 8px); }
  .site-nav .btn { margin-left: 3px; padding: 0 10px; font-size: 14px; letter-spacing: .02em; }

  /* "Le Bruschette di Maria" is the longest heading on the site and must stay
     on one line. At 320px it measured 276px inside exactly 276px of available
     width — it fitted, but with nothing to spare, so any font-metric variation
     would have wrapped it. Dropping the .02em tracking here buys ~15px of
     headroom without going under the 34px heading floor. */
  .products h2,
  .range-intro h2,
  .contact h2 { letter-spacing: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
