/* Reset and page frame. Owned by the build, not by a single piece. */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
/* ...except a dialog. A modal <dialog> is centred by the UA's own `margin: auto`
   against `inset: 0`, and the universal reset above silently replaces that with
   `margin: 0` — which pins the dialog to the top-left corner of the viewport and
   makes a perfectly correct stylesheet look broken. This is the one element the
   reset must not touch. */
dialog { margin: auto; }

/* A closed dialog must stay out of the way. The UA gives it `display: none`, but
   any component stylesheet that sets `display` on the dialog itself — to lay out
   its own insides — overrides that, and the closed dialog then covers the page.
   It is invisible, so nothing looks wrong; it just eats taps aimed at whatever is
   underneath. `:not([open])` outranks a plain class selector, so this holds
   wherever the component rule lives in the cascade. */
dialog:not([open]) { display: none; }

/* The header is sticky, so every jump target has to clear it or a chapter lands
   with its own heading hidden behind the bar. */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: clamp(84px, 7vw, 118px);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font);
  font-weight: var(--w-body);
  color: var(--c-structure);
  /* The page's ground is deep purple, not cream: every section brings its own
     field and the seams between them are drips, so what shows through anywhere a
     field has not painted is the darkest of the five rather than the lightest. */
  background: var(--c-structure);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* `height: auto` matters. Every scenic <img> carries width="800" height="800"
   for layout stability, and that presentational height beats `aspect-ratio`,
   which left the floating cut-outs in 800px-tall boxes with the food hundreds of
   pixels from where the composition put it.

   AND `max-width: 100%` IS THE OTHER HALF OF THE SAME TRAP. Every derivative is
   a SQUARE canvas with the food centred in transparent padding, so a tall
   product's square is deliberately WIDER than the box it stands in — the Choco
   Banana's square is 142% of its card. A global clamp to 100% silently shrinks
   exactly those, and the page renders as a grid of small food with no rule
   anywhere that says why. Every element that stands a square in a smaller box
   turns the clamp off explicitly, and says so where it does it. */
img, svg { display: block; max-width: 100%; }
img { height: auto; }

button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }

.u-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: var(--s-3); top: -100px; z-index: 200;
  background: var(--c-reading); color: var(--c-structure);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-tile);
  font-family: var(--font-display); font-weight: var(--w-semi);
  letter-spacing: var(--tr-wide); text-transform: uppercase; text-decoration: none;
}
.skip:focus { top: var(--s-3); }

:where(a, button, input, [tabindex]):focus-visible {
  outline: 3px solid var(--c-highlight);
  outline-offset: 3px;
  border-radius: var(--s-2);
}

/* The page frame. One measure, one gutter, used by every section. */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* The diamond: the ticker's separator, reused as the page's one small mark. */
.dia {
  display: inline-block; width: 6px; height: 6px; background: currentColor;
  transform: rotate(45deg); flex: 0 0 auto; vertical-align: middle;
}

/* ---- the buttons the approved design uses ------------------------------- */
/* `.btn`/`.btn--primary` are kept for the product dialog, which already uses
   them. `.btn2` is the approved page's own pill: a flat brand fill with a hard
   drop under it, no gradient. */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-4) var(--s-6);
  border-radius: var(--r-pill);
  font-weight: var(--w-bold); text-decoration: none;
  transition: transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease);
}
.btn--primary { background: var(--c-reading); color: var(--c-structure); box-shadow: var(--shadow-card); }
.btn--primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-lift); }

.btn2 {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 52px; padding: 0 var(--s-5);
  border-radius: var(--r-panel-lg);
  background: var(--c-brand); color: var(--c-reading);
  font-family: var(--font-display); font-weight: var(--w-display);
  font-size: clamp(0.8125rem, 1.1vw, 0.9375rem);
  letter-spacing: var(--tr-wider); text-transform: uppercase; text-decoration: none;
  box-shadow: 0 4px 0 rgb(var(--c-deep-purple-rgb) / .34);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn2:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgb(var(--c-deep-purple-rgb) / .34); }
.btn2--yellow { background: var(--c-highlight); color: var(--c-structure); }
.btn2--cream { background: var(--c-reading); color: var(--c-structure); }
.arrow {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--dur) var(--ease);
}
.btn2:hover .arrow { transform: translateX(4px); }

/* ---- the draft chip ------------------------------------------------------
   Every line of prose on this page that the client has not approved carries one
   of these, in the reader's own language. Deep purple on sunny yellow is 8.3:1,
   so it is legible at 11px on any of the five fields, and it is deliberately not
   subtle: a marker nobody notices is a marker that ships. */
.dft {
  display: inline-block; vertical-align: middle;
  margin-left: var(--s-2); position: relative; top: -0.15em;
  font-family: var(--font); font-weight: var(--w-display);
  font-size: var(--fs-tiny); line-height: 1.4;
  letter-spacing: var(--tr-wide); text-transform: uppercase;
  color: var(--c-structure); background: var(--c-highlight);
  padding: 3px 7px; border-radius: var(--s-1);
  -webkit-text-fill-color: var(--c-deep-purple);
  -webkit-text-stroke: 0;
}

/* ---- the no-JavaScript menu ---------------------------------------------
   The grid is built client-side, so without this the page is an empty field.
   Same data, same photographs, same approved copy, set as a plain list — not a
   second design — and inert the moment JavaScript runs. */
.plain {
  padding: var(--s-9) var(--gutter); max-width: var(--maxw); margin-inline: auto;
  background: var(--c-reading);
}
.plain h2 {
  font-family: var(--font-display); font-weight: var(--w-display);
  text-transform: uppercase; font-size: var(--fs-section);
  color: var(--c-item); margin-bottom: var(--s-6);
}
.plain h3 {
  font-family: var(--font-display); font-weight: var(--w-display);
  font-size: var(--t-eyebrow); text-transform: uppercase; letter-spacing: var(--tr-caps);
  color: var(--c-category); margin: var(--s-8) 0 var(--s-4);
}
.plain ul { list-style: none; padding: 0; display: grid; gap: var(--s-4); }
.plain li { display: flex; gap: var(--s-4); align-items: center; }
.plain li img { width: 84px; height: 84px; object-fit: contain; flex: none; }
.plain li strong {
  display: block; color: var(--c-item); font-size: var(--fs-item);
  font-family: var(--font-display); text-transform: uppercase;
}
.plain li span { display: block; color: var(--c-body); font-size: var(--t-desc); line-height: var(--lh-desc); }
.plain > p { margin-top: var(--s-8); color: var(--c-muted); font-size: var(--t-desc); }
