/* purabioma prototype D — implementation of the EXTRACTED design system in
   ../DESIGN.md (guerlain.com/de screenshots, founder-provided, 2026-07-04).
   That file is the contract; this stylesheet only translates it:

   - white maison canvas; opulent photography is the voltage, chrome is quiet
   - wide-tracked UPPERCASE display (Tenor Sans substitute), grotesque
     nav/body/buttons (Montserrat substitute); weights 400/500 only
   - sharp rectangles ONLY — radius 0 everywhere including buttons
   - signature patterns: ink-filled active-nav chip, white ENTDECKEN-style
     rectangles over photography (1px ink border on canvas, hover inverts),
     underlined tracked-caps "discover" links, cream highlight panels,
     centered editorial titles with narrow centered body, dark editorial
     bands with centered white stacks
   - gold #B69B5C strictly micro: the emblem, kickers on ink — never body
     text on white (fails AA there)
   - no shadows, no gradients in chrome, no marquees; motion = gentle fades */

:root {
  /* colors — from DESIGN.md */
  --canvas: #FFFFFF;
  --cream: #F5F1E9;
  --cream-deep: #EFEAE0;
  --ink: #121212;
  --body-c: #3A3A3A;
  --muted: #6F6F6F;
  --hairline: #E4E0D6;
  --hairline-strong: #C9C4B8;
  --gold: #B69B5C;
  --on-photo: #FFFFFF;
  --status: #A03A2A;
  /* the editorial band is scene-invariant ink; literal on purpose — the
     night scene flips --ink to white, which must never reach the band */
  --band-bg: #121212;
  /* type — maison substitutes, Cyrillic-complete */
  --display: "Tenor Sans", "Trebuchet MS", -apple-system, sans-serif;
  --body: "Montserrat", -apple-system, "Helvetica Neue", Arial, sans-serif;
  /* rhythm */
  /* SPACING SCALE — 4px grid, shared token NAMES across all four directions
     (see themes/b/theme.css), this direction's own VALUES: the maison is the
     airiest of the four, so the section step is a fixed, generous 96px. */
  --sp-2xs: 4px;
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-xxl: 48px;
  --sp-section: 96px;
  --pad: clamp(20px, 4vw, 48px);
  --measure: 66ch;
  /* legacy aliases (markup inline styles reference these names) */
  --madder-text: var(--status);
  --bg: var(--canvas);
  --surface: var(--cream);
  --line: var(--hairline);
  --line-strong: var(--hairline-strong);
  --band-line: rgba(255, 255, 255, 0.25);
  --text-3: var(--muted);
}

* { box-sizing: border-box; }
/* smooth in-page scrolling is motion — only for users who haven't opted out */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--body-c);
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

/* display: tracked caps, weight 400, centered by default (maison titles) */
h1, h2, h3, b, strong { font-weight: 400; }
h1, h2 {
  font-family: var(--display); color: var(--ink); text-transform: uppercase;
  letter-spacing: 0.18em; line-height: 1.25; margin: 0 0 0.6em; text-wrap: balance;
}
h1 { font-size: clamp(26px, 3.6vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 34px); }
h3 { font-family: var(--display); color: var(--ink); font-size: 18px; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.4; margin: 0 0 0.5em; text-wrap: balance; }
p { margin: 0 0 1em; max-width: var(--measure); color: var(--body-c); text-wrap: pretty; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--ink); }
img, svg { max-width: 100%; display: block; }
::selection { background: var(--ink); color: var(--canvas); }

/* kicker layer: tiny tracked caps grotesque */
/* --track mirrors this rule's letter-spacing so .dot-sep (assets/flow.css)
   can cancel the trailing letter-space of the glyph before each dot */
.mono {
  font-family: var(--body); font-weight: 500; font-size: 11px;
  letter-spacing: 0.22em; --track: 0.22em; text-transform: uppercase; color: var(--muted);
}
.num { font-family: var(--display); color: var(--ink); letter-spacing: 0.14em; }

/* visually hidden, still announced by screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* botanical Latin names: lowercase muted (the maison grotesque has no italic here) */
.herb-card .latin, .chip em { font-style: normal; text-transform: none; letter-spacing: 0.02em; color: var(--muted); }

.skip-link {
  position: absolute; inset-inline-start: -999px; inset-block-start: var(--sp-xs); z-index: 100;
  background: var(--ink); color: var(--canvas); padding: var(--sp-xs) var(--sp-md);
  font-family: var(--body); font-weight: 500; font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.skip-link:focus { inset-inline-start: var(--sp-xs); }

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

/* ---------- header: white maison bar, emblem beside the wordmark ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: var(--sp-xl);
  height: 72px; padding: 0 var(--pad);
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 21px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.wordmark .emblem { width: 13px; height: 22px; color: var(--gold); flex: none; }
.main-nav { display: flex; gap: var(--sp-lg); flex: 1; }
.main-nav a {
  text-decoration: none; font-family: var(--body); font-weight: 500;
  font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap; padding: 6px 8px;
}
.main-nav a:hover { color: var(--muted); }
/* THE signature: active section = ink-filled chip, white label */
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--canvas); }
.header-tools { display: flex; align-items: center; gap: var(--sp-md); }
.header-tools a {
  text-decoration: none; font-family: var(--body); font-weight: 500;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
}
.header-tools a:hover { color: var(--muted); }
/* language lives in the footer (see assets/js/main.js) — sized for a
   comfortable pointer target rather than the old 22px header control */
.lang-wrap { display: inline-flex; align-items: center; gap: var(--sp-xs); }
.lang-select {
  font-family: var(--body); font-size: 12px; letter-spacing: 0.08em; color: var(--ink);
  background: transparent; border: 1px solid var(--hairline-strong); border-radius: 0;
  padding: var(--sp-xs) var(--sp-sm); min-height: 32px;
}
.menu-btn { display: none; }

/* ---------- layout: airy maison rhythm ---------- */
.section { padding: var(--sp-section) var(--pad); }
.section + .section { border-top: 0; }
.wrap { max-width: 1360px; margin: 0 auto; }
.narrow { max-width: 720px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.grid-2.offset { grid-template-columns: 1fr 1fr; }

/* ---------- panels: ONE cream tone (the highlight panel) ---------- */
.sheet {
  position: relative;
  background: var(--cream);
  border: 0; border-radius: 0;
  padding: var(--sp-xl);
}
.sheet::before, .sheet::after { content: none; }

.rule { border: 0; border-block-start: 1px solid var(--hairline); margin-block: var(--sp-lg); }
.rule-strong { border-block-start-color: var(--hairline-strong); }

/* list-links pattern from the flyout: tracked caps + chevron */
.chip {
  display: inline-flex; align-items: center; gap: var(--sp-sm);
  border: 0; border-radius: 0; padding: 0;
  font-family: var(--body); font-weight: 500; font-size: 11.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; background: transparent;
}
a.chip::after { content: "\203A"; color: var(--muted); font-size: 14px; }
.chip:hover { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 0; flex: none; }

.badge {
  display: inline-block; font-family: var(--body); font-weight: 500;
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid var(--hairline-strong); color: var(--muted);
  border-radius: 0; padding: var(--sp-2xs) var(--sp-sm); white-space: nowrap;
}

/* photo placeholder: inset editorial frame awaiting the shoot */
.photo-slot {
  position: relative; display: flex; align-items: flex-end; justify-content: center;
  border: 1px solid var(--hairline); border-radius: 0;
  /* the cream panel tone, not a hardcoded near-white: this frame has to
     follow the night scene like everything else */
  background: var(--cream);
  min-height: 340px; padding: var(--sp-md);
}
.photo-slot .mono { color: var(--muted); text-align: center; }
.photo-slot.tall { min-height: 480px; }
.photo-slot.short { min-height: 220px; }
/* comp photography (scraped placeholders): imagery becomes the voltage, kicker on a white chip.
   The chip sits ON the photograph — scene-invariant — so its label colour is
   pinned; inheriting --muted turned it light-grey-on-white at night. */
.photo-slot.has-photo { background-size: cover; background-position: center; }
.photo-slot.has-photo .mono { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); padding: var(--sp-xs) var(--sp-md); color: #6F6F6F; }

/* ---------- buttons: sharp maison rectangles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-sm);
  font-family: var(--body); font-weight: 500; font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: var(--sp-md) var(--sp-xxl); border-radius: 0; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--canvas); color: var(--ink); border: 1px solid var(--ink); }
.btn-primary:hover { background: var(--ink); color: var(--canvas); }
/* secondary action: the underlined tracked-caps "discover" link */
.btn-ghost {
  border: 0; background: transparent; color: var(--ink); padding: var(--sp-md) var(--sp-2xs);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
}
.btn-ghost:hover { color: var(--muted); }
/* on photography / dark band: solid white rectangle, no border.
   Pinned literals — the band underneath is scene-invariant ink, so its
   button must not follow the scene tokens either. */
.band .btn-primary { background: #FFFFFF; color: #121212; border: 0; }
.band .btn-primary:hover { background: #F5F1E9; color: #121212; }

/* ---------- hero: centered maison page-title ---------- */
.hero { padding-block-start: clamp(48px, 7vw, 88px); text-align: center; }
.hero .grid-2, .hero .grid-2.offset { display: block; }
.hero .lead { font-size: 15.5px; color: var(--body-c); max-width: 54ch; margin-inline: auto; }
/* the whole centred hero, not just the lead: p carries max-width var(--measure),
   so a plain paragraph's BOX stays left-anchored and its text centres inside
   that narrower box — the eyebrow and any caption line then float left of the
   centred h1. Centring the box is what makes them agree. */
.hero p { margin-inline: auto; }
.hero-actions { display: flex; gap: var(--sp-md); flex-wrap: wrap; margin-block-start: var(--sp-xl); justify-content: center; }
.hero-mark { width: 44px; margin: 0 auto var(--sp-lg); color: var(--gold); }
.hero .photo-slot { margin-block-start: var(--sp-section); margin-inline: auto; text-align: left; }

/* ---------- recipes: the 4-up category-tile wall ---------- */
.recipe-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-lg); }
.recipe-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; text-align: center;
  min-height: 520px; padding: var(--sp-xl) var(--sp-lg) var(--sp-xl);
  background: var(--cream); border-radius: 0;
  text-decoration: none; color: var(--ink);
  transition: background 0.25s ease;
}
a.recipe-card:hover { background: var(--cream-deep); color: var(--ink); }
.recipe-card .mono { position: absolute; top: var(--sp-lg); inset-inline: 0; text-align: center; }
.recipe-card h3 { font-size: clamp(17px, 1.6vw, 21px); letter-spacing: 0.14em; margin: 0 0 var(--sp-xs); }
.recipe-card p { font-size: 13px; color: var(--muted); margin: 0 0 var(--sp-md); max-width: 30ch; }
.recipe-featured { grid-row: auto; min-height: 520px; }
.recipe-featured h3 { font-size: clamp(17px, 1.6vw, 21px); }
.recipe-meta { display: flex; flex-direction: column; align-items: center; gap: var(--sp-sm); margin: 0 0 var(--sp-md); }
.price { font-family: var(--body); font-weight: 500; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--body-c); }
/* the white rectangle at the tile's foot (ENTDECKEN) */
.tile-btn {
  display: inline-block; background: var(--canvas); color: var(--ink);
  border: 1px solid var(--hairline-strong);
  font-family: var(--body); font-weight: 500; font-size: 11.5px;
  letter-spacing: 0.22em; text-transform: uppercase;
  padding: var(--sp-md) var(--sp-xl);
  transition: background 0.2s ease, color 0.2s ease;
}
a.recipe-card:hover .tile-btn { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
/* comp photo fills the tile's upper field, full-bleed to the tile edges; the
   content keeps the cream base below (the screenshots' product-tile anatomy —
   white-ground specimen comps stay legible without scrim gymnastics) */
.recipe-card .card-photo {
  flex: 1 1 220px; min-height: 220px;
  width: calc(100% + 2 * var(--sp-lg)); max-width: none; /* full-bleed past the tile padding; escapes the global img clamp */
  margin: calc(-1 * var(--sp-xl)) calc(-1 * var(--sp-lg)) var(--sp-lg);
  object-fit: cover;
}
/* with a photo above, the recipe eyebrow rejoins the content stack */
a.recipe-card:has(.card-photo) .mono { position: static; margin-block-end: var(--sp-xs); }

/* ---------- dark editorial band: centered white stack ----------
   The band is SCENE-INVARIANT: it is the ink element in both scenes (at
   night the canvas joins it; --band-bg warms one step so the seam reads).
   Its palette is therefore pinned here, not inherited from scene tokens —
   inheriting them turned the band white-on-white the moment night flipped
   --ink to white. Gold stays: on ink is this direction's home turf. */
.band { background: var(--band-bg); color: #FFFFFF; text-align: center; }
.band h2, .band h3 { color: inherit; }
.band p { color: inherit; opacity: 0.85; margin-inline: auto; }
.band .mono { color: var(--gold); }
.band a { color: inherit; }

/* ---------- steps: four centered columns under the band title ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-xl); margin-block-start: var(--sp-xxl); }
.step { padding-inline: var(--sp-xs); border: 0; text-align: center; }
.step .verb {
  font-family: var(--display); font-size: 19px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); display: block; margin-block: var(--sp-sm) var(--sp-xs);
}
.step p { font-size: 13.5px; margin-inline: auto; }
.band .step .verb { color: inherit; }
.steps.light .step { border: 0; }

/* ---------- evidence: three quiet white cards ---------- */
.evidence-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-lg); }
.evidence-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.study-card {
  display: flex; flex-direction: column; gap: var(--sp-sm); text-align: center; align-items: center;
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: 0;
  padding: var(--sp-xl);
}
.study-card .src { font-family: var(--body); font-weight: 500; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.study-card h3 { font-size: 15px; letter-spacing: 0.08em; }
.study-title { font-size: 15px; letter-spacing: 0.08em; }
.study-card p { font-size: 13.5px; flex: 1; }
.study-card a { font-family: var(--body); font-weight: 500; font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- PDP: gallery + cream highlight panel ---------- */
.pdp { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 4.5vw, 72px); align-items: start; }
.gallery { display: grid; gap: var(--sp-md); position: sticky; top: 96px; }
/* recipe comp photograph opens the gallery, unframed on the white canvas */
.product-photo { position: relative; margin: 0; }
.product-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.product-photo figcaption {
  position: absolute; left: 50%; bottom: var(--sp-md); transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); padding: var(--sp-xs) var(--sp-md); white-space: nowrap;
  color: #3A3A3A; /* pinned: the chip rides the photograph, not the scene */
}
.buy-box { background: var(--cream); border-radius: 0; padding: clamp(28px, 3.5vw, 48px); }
.buy-box h1 { font-size: clamp(22px, 2.8vw, 32px); letter-spacing: 0.16em; text-align: left; }
.promise { font-size: 15px; color: var(--body-c); }
.option-row { display: flex; gap: var(--sp-sm); flex-wrap: wrap; margin-block: var(--sp-lg) var(--sp-xs); }
.option {
  border: 1px solid var(--hairline-strong); border-radius: 0; background: var(--canvas);
  color: var(--ink); font-family: var(--body); font-weight: 500; font-size: 11.5px;
  letter-spacing: 0.18em; text-transform: uppercase; padding: var(--sp-sm) var(--sp-lg); cursor: pointer;
}
.option[aria-pressed="true"] { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.sub-toggle { display: flex; align-items: flex-start; gap: var(--sp-sm); margin-block: var(--sp-md); font-size: 13.5px; color: var(--body-c); }
.sub-toggle input { width: 16px; height: 16px; margin-block-start: 3px; accent-color: var(--ink); }
.price-line { display: flex; align-items: baseline; gap: var(--sp-md); margin-block: var(--sp-md) var(--sp-xs); }
.price-line .price { font-family: var(--display); font-size: 24px; letter-spacing: 0.1em; color: var(--ink); text-transform: none; }
.unit-price { font-family: var(--body); font-weight: 500; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.lot-line { margin-block: var(--sp-md) var(--sp-lg); }
.lot-line a { color: var(--ink); }
.cart-note { margin-block-start: var(--sp-sm); font-size: 13.5px; color: var(--status); min-height: 1.4em; }

details { border-block-start: 1px solid var(--hairline); padding-block: var(--sp-md); }
details:last-of-type { border-block-end: 1px solid var(--hairline); }
summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--sp-sm);
  font-family: var(--display); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
}
summary::after { content: "+"; color: var(--muted); }
details[open] summary::after { content: "\2212"; }
details p { margin-block-start: var(--sp-sm); font-size: 14px; }
/* FAQ opens as a gentle maison fade-and-settle: ::details-content (Baseline
   2025) + the shared interpolate-size opt-in in assets/flow.css; engines without
   interpolate-size keep the instant toggle — pure progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
  details::details-content {
    block-size: 0; overflow-y: clip; opacity: 0;
    transition: content-visibility 0.45s allow-discrete, block-size 0.45s ease, opacity 0.45s ease;
  }
  details[open]::details-content { block-size: auto; opacity: 1; }
}

/* ---------- herb index: flyout-list rows with chevrons ---------- */
.herb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-xxl); border-block-start: 1px solid var(--hairline); }
.herb-card {
  cursor: pointer; text-align: left; font: inherit; color: var(--ink); width: 100%;
  background: transparent; border: 0; border-block-end: 1px solid var(--hairline); border-radius: 0;
  padding: var(--sp-lg) var(--sp-2xs);
  display: grid; grid-template-columns: 72px 1fr auto; gap: var(--sp-2xs) var(--sp-md); align-items: center;
}
.herb-card::after { content: "\203A"; grid-column: 3; grid-row: 1 / span 2; color: var(--muted); font-size: 20px; }
.herb-card:hover h3, .herb-card[aria-expanded="true"] h3 { color: var(--muted); }
/* comp photo: small square plate leading the flyout row */
.herb-thumb { grid-column: 1; grid-row: 1 / span 4; width: 72px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 0; }
.herb-card .mono { grid-column: 2; grid-row: 3; margin-block-start: var(--sp-2xs); }
.herb-card h3 { grid-column: 2; font-size: 15px; letter-spacing: 0.16em; margin: 0; }
.herb-card .latin { grid-column: 2; grid-row: 2; font-size: 13.5px; }
.herb-card .folk { grid-column: 2; grid-row: 4; font-family: var(--body); font-weight: 500; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.herb-detail { margin-block-start: var(--sp-xl); }
/* author display values (flex etc.) would defeat the hidden attribute's UA rule */
[hidden] { display: none !important; }
.detail-grid { display: grid; grid-template-columns: minmax(200px, 260px) 1fr 1fr; gap: clamp(24px, 4vw, 56px); text-align: left; }
.detail-media { margin: 0; }
.detail-media img { display: block; width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.spec-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--sp-sm) var(--sp-lg); font-size: 14px; }
.spec-list dt { font-family: var(--body); font-weight: 500; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.spec-list dd { margin: 0; }

/* ---------- forms: thin bordered rectangles ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-lg) var(--sp-xl); }
.field { display: flex; flex-direction: column; gap: var(--sp-xs); text-align: left; }
.field.wide { grid-column: 1 / -1; }
.field label { font-family: var(--body); font-weight: 500; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.field .help { font-size: 12.5px; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--canvas);
  border: 1px solid var(--hairline-strong); border-radius: 0; padding: var(--sp-sm) var(--sp-md);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--ink);
}
.field .error { display: none; font-size: 12.5px; color: var(--status); }
.field.invalid .error { display: block; }
.field.invalid input { border-color: var(--status); }
/* state also carried on the ARIA attribute so styling can't drift from semantics */
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--status); }

/* ---------- wholesale terms: cream panels ---------- */
.terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-lg); }
.terms .sheet h3 { font-size: 15px; letter-spacing: 0.14em; }
/* gap, not per-item margins: no trailing space under the last bullet */
.terms ul { margin-block: var(--sp-sm) 0; padding-inline-start: var(--sp-md); font-size: 13.5px; color: var(--body-c); display: grid; gap: var(--sp-xs); }

/* ---------- discovery set strip: cream highlight band ---------- */
.set-strip { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-lg); flex-wrap: wrap; text-align: left; }
.set-strip .price { font-family: var(--display); font-size: 22px; letter-spacing: 0.08em; text-transform: none; color: var(--ink); }
.set-strip-cta { display: flex; align-items: center; gap: var(--sp-lg); flex-wrap: wrap; }

/* ---------- footer: cream colophon ---------- */
.site-footer { border-block-start: 1px solid var(--hairline); background: var(--cream); padding: var(--sp-section) var(--pad) var(--sp-xxl); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-xxl); max-width: 1360px; margin-inline: auto; }
.site-footer h3 { font-family: var(--body); font-weight: 500; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.site-footer p { font-size: 13.5px; color: var(--body-c); }
.footer-blurb { margin-block-start: var(--sp-md); font-size: 13.5px; }
/* gap, not per-item margins */
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: 13.5px; display: grid; gap: var(--sp-xs); }
.site-footer a { text-decoration: none; color: var(--body-c); }
.site-footer a:hover { color: var(--ink); }
.site-footer .wordmark { font-size: 17px; }
.footer-legal {
  max-width: 1360px; margin-block-start: var(--sp-xxl); margin-inline: auto;
  padding-block-start: var(--sp-lg);
  border-block-start: 1px solid var(--hairline-strong);
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-sm) var(--sp-xl); flex-wrap: wrap;
}
.footer-legal p { font-size: 12px; color: var(--muted); margin: 0; }

/* ---------- motion: the maison is still — gentle fade only ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transition: opacity 0.6s ease; }
  .reveal.in { opacity: 1; }
}

/* ---------- responsive ---------- */
/* the maison header needs ~1280px for wordmark + tracked nav + full tools:
   below that, shed secondary tools (footer carries them); below 1040px the
   inline nav itself no longer fits and the menu button takes over */
@media (max-width: 1300px) {
  .site-header { gap: var(--sp-lg); }
  .main-nav { gap: var(--sp-sm); }
  .header-tools { gap: var(--sp-sm); }
  .header-tools .hide-m { display: none; }
}
/* NB: ordered widest-first — the 1100px block must not re-open columns the
   1040px block has already collapsed */
@media (max-width: 1100px) {
  .recipe-grid { grid-template-columns: 1fr 1fr; }
  .recipe-card { min-height: 440px; }
  .evidence-row, .evidence-row.cols-4 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; gap: var(--sp-xxl) var(--sp-xl); }
  .terms { grid-template-columns: 1fr; }
}
@media (max-width: 1040px) {
  .menu-btn {
    display: block; background: transparent; border: 1px solid var(--hairline-strong); border-radius: 0;
    color: var(--ink); font-family: var(--body); font-weight: 500; font-size: 11px;
    letter-spacing: 0.18em; text-transform: uppercase; padding: var(--sp-xs) var(--sp-sm); margin-inline-start: auto; cursor: pointer;
  }
  .main-nav {
    display: none; position: absolute; top: 72px; inset-inline: 0; z-index: 50;
    flex-direction: column; gap: 0; background: var(--canvas);
    border-block-end: 1px solid var(--hairline); padding: var(--sp-xs) var(--pad) var(--sp-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: var(--sp-md) var(--sp-xs); border-block-start: 1px solid var(--hairline); }
}
@media (max-width: 768px) {
  .wordmark { font-size: 16px; letter-spacing: 0.2em; }
  .grid-2, .grid-2.offset, .pdp, .detail-grid, .form-grid { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .detail-media img { height: auto; aspect-ratio: 16 / 10; }
  .recipe-grid, .evidence-row, .evidence-row.cols-4, .steps { grid-template-columns: 1fr; }
  .herb-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- motion opt-out: collapse whatever the gates above missed ---------- */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- night scene: the dark editorial band becomes the page ----------
   OPT-IN ONLY, never automatic: pages that offer a scene control set
   html[data-scene="night"]. The extraction's own ink band, promoted to
   full-page — gold on ink is this direction's home turf. Token names
   mirror :root 1:1, so every component follows without extra rules. */
html[data-scene="night"] {
  color-scheme: dark;                    /* UA scrollbars/controls follow */
  --canvas: #121212;
  --cream: #1C1B18;                      /* the cream panel, dimmed to a warm ink */
  --cream-deep: #26241F;                 /* card hover, one step deeper than --cream */
  --ink: #FFFFFF;
  --body-c: #D9D9D9;
  --muted: #9C9C9C;
  --hairline: #2E2E2E;
  --hairline-strong: #4A4A4A;
  --status: #E08A72;                     /* sienna lifted for AA on the night canvas */
  --band-bg: #1C1B18;                    /* the band warms one step so its seam reads on the canvas */
  /* --gold is unchanged: it reads correctly on both canvases */
}
