/* LAMINA · Croissant Pro
   Flagship-launch register: pure black, gold product name, Inter Tight with
   Instrument Serif italic accents, mono readouts. */

:root {
  --ground: #000;
  --surface: #0e0d0b;
  --surface-2: #181611;
  --ink: #f1efea;
  --ink-2: #b8b0a2;
  --gold: #e2b35c;
  --gold-hi: #fbe7b0;
  --gold-lo: #9c6627;
  --gold-ink: #1a1206;

  --sans: "Inter Tight", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; /* taste-skill-ignore: brief asks for mono readouts */

  --margin: clamp(16px, 3.2vw, 48px);
  --bar-h: 64px;
  --gap-section: clamp(120px, 16vw, 220px);

  --t-display: clamp(3.4rem, 12.6vw, 13rem);
  --t-claim: clamp(3.4rem, 8.6vw, 8.6rem);
  --t-h2: clamp(2.4rem, 5.6vw, 5.6rem);
  --t-tag: clamp(1.4rem, 2.3vw, 2.1rem);
  --t-body: clamp(1.0625rem, 1.15vw, 1.1875rem);
  --t-small: 0.9375rem;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; } /* taste-skill-ignore: brief asks for mono readouts */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: fixed; left: var(--margin); top: -80px; z-index: 50;
  background: var(--gold); color: var(--gold-ink); padding: 10px 16px; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--bar-h);
  display: flex; align-items: center; gap: clamp(12px, 2vw, 32px);
  padding: 0 var(--margin);
  background: var(--ground);
}
.wordmark {
  font-weight: 800; font-size: 1.125rem; letter-spacing: 0.02em; text-decoration: none;
  margin-right: auto;
}
.bar-links { display: flex; gap: clamp(14px, 2vw, 28px); }
.bar-links a {
  text-decoration: none; color: var(--ink-2); font-size: var(--t-small); font-weight: 500;
  transition: color 160ms ease;
}
.bar-links a:hover { color: var(--ink); }
.sound {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 0; border-radius: var(--radius);
  padding: 8px 14px; font-size: var(--t-small); font-weight: 500; cursor: pointer;
  transition: background-color 160ms ease, transform 120ms ease;
}
.sound:hover { background: #24211a; }
.sound:active { transform: scale(0.97); }
.sound-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); transition: background-color 160ms ease; }
.sound[aria-pressed="true"] .sound-dot { background: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; text-decoration: none; border: 0; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: var(--gold-hi); }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-ghost:hover { background: #24211a; }
.bar-cta { min-height: 40px; padding: 0 18px; font-size: var(--t-small); }

/* ---------- Chapters (pinned canvas scrubs) ---------- */
.chapter { position: relative; height: calc(var(--len) * 1vh); }
.chapter + .chapter { margin-top: 0; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; /* taste-skill-ignore: 100vh is the fallback before 100svh */
  background: var(--ground);
}
.film {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform-origin: 50% 50%;
  will-change: transform;
}

/* Spin */
.spin-title {
  position: absolute; inset: calc(var(--bar-h) + 2vh) var(--margin) auto;
  text-align: center;
  will-change: transform, opacity;
}
.pro-name {
  font-size: var(--t-display); font-weight: 700; line-height: 0.88; letter-spacing: -0.045em;
  background: linear-gradient(176deg, var(--gold-hi) 8%, var(--gold) 46%, var(--gold-lo) 92%); /* taste-skill-ignore: brief asks for a gold gradient product name */
  -webkit-background-clip: text; background-clip: text; color: transparent; /* taste-skill-ignore: brief asks for a gold gradient product name */
  padding-bottom: 0.06em;
}
.pro-tag {
  font-family: var(--serif); font-style: italic; font-size: var(--t-tag); line-height: 1.15;
  margin-top: clamp(10px, 1.6vh, 20px);
}
.pro-sub { font-size: 1.25rem; margin: 12px auto 0; max-width: 40ch; }
.pro-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }
.scroll-cue {
  position: absolute; left: 0; right: 0; bottom: 28px; text-align: center;
  font-size: var(--t-small); color: var(--ink-2);
}

.spin-claim {
  position: absolute; top: 50%; width: min(46vw, 720px);
  opacity: 0; transform: translateY(-50%);
  will-change: transform, opacity;
}
.spin-claim-right { right: var(--margin); }
.spin-claim-left { left: var(--margin); }
.claim-big { font-size: var(--t-claim); font-weight: 700; line-height: 0.9; letter-spacing: -0.045em; white-space: nowrap; }
.claim-tag {
  font-family: var(--serif); font-style: italic; font-size: var(--t-tag); line-height: 1.18;
  margin-top: 18px; max-width: 22ch;
}

/* Shared overlay */
.overlay { position: absolute; z-index: 1; inset: calc(var(--bar-h) + 3vh) var(--margin) 4vh; pointer-events: none; }

/* Desktop framing: shrink the product films so titles and readouts sit
   beside the croissant, not on it. */
@media (min-width: 861px) {
  [data-chapter="crunch"] .film { transform: translate3d(-5vw, 9vh, 0) scale(0.74); }
  [data-chapter="lamination"] .film { transform: translate3d(0, 4vh, 0) scale(0.84); }
}
.overlay a, .overlay button { pointer-events: auto; }
.ch-title { font-size: var(--t-h2); font-weight: 700; line-height: 0.95; letter-spacing: -0.04em; max-width: 12ch; }
.ch-tag { font-family: var(--serif); font-style: italic; font-size: var(--t-tag); line-height: 1.18; margin-top: 18px; max-width: 22ch; }

/* Crunch */
.overlay-split { display: flex; justify-content: space-between; align-items: flex-start; gap: 4vw; }
.readout-crunch { width: min(30vw, 400px); display: grid; gap: 28px; }
.meter-value { display: flex; align-items: baseline; gap: 10px; }
.meter-value .mono { font-size: clamp(4rem, 9vw, 8.5rem); line-height: 0.85; font-weight: 500; letter-spacing: -0.05em; }
.meter-unit { font-size: 1.5rem; font-weight: 600; color: var(--ink-2); }
.meter-bar { position: relative; height: 14px; margin-top: 14px; background: var(--surface-2); border-radius: 7px; overflow: hidden; }
.meter-bar span {
  position: absolute; inset: 0 auto 0 0; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: var(--gold); border-radius: 7px;
}
.meter-bar i { position: absolute; top: 0; bottom: 0; width: 4px; left: 0; background: var(--gold-hi); transform: translateX(0); }
.meter-note { margin-top: 10px; color: var(--ink-2); font-size: var(--t-small); }
.count-value { font-size: clamp(2.6rem, 5vw, 4.6rem); line-height: 0.9; font-weight: 500; letter-spacing: -0.04em; }
.count-label { color: var(--ink-2); margin-top: 6px; }
.hint {
  position: absolute; left: 0; right: 0; bottom: 5vh; text-align: center;
  font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.75rem);
  opacity: 0; transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms var(--ease-out);
}
.hint.on { opacity: 1; transform: none; }

/* Lamination */
.overlay-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 4vw; }
.layer-count { text-align: right; }
.layer-value { font-size: clamp(5rem, 13vw, 12rem); line-height: 0.8; font-weight: 500; letter-spacing: -0.06em; color: var(--gold); }
.layer-label { color: var(--ink-2); margin-top: 8px; }
.spec-strip {
  position: absolute; left: var(--margin); right: var(--margin); bottom: 4vh;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
  opacity: 0; transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms var(--ease-out);
}
.spec-strip.on { opacity: 1; transform: none; }
.spec-strip div { background: var(--surface); padding: 14px 16px; border-radius: 14px; }
.spec-strip dt { color: var(--ink-2); font-size: var(--t-small); }
.spec-strip dd { font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 500; margin-top: 4px; }

/* Crumb */
.overlay-crumb { display: flex; justify-content: space-between; align-items: flex-start; gap: 4vw; }
.ch-title-shadow { position: relative; }
.overlay-crumb::before, .overlay-bake::before {
  /* neutral scrim so the title reads over bright footage */
  content: ""; position: absolute; inset: calc(-3vh - var(--bar-h)) calc(-1 * var(--margin)) auto;
  height: 52vh; background: linear-gradient(180deg, rgba(0,0,0,0.8), rgba(0,0,0,0)); /* taste-skill-ignore: neutral scrim under a title on footage */
  z-index: -1;
}
.glass-stack { position: relative; width: min(30vw, 420px); align-self: flex-end; margin-bottom: 2vh; height: 100%; }
.glass {
  position: absolute; right: 0; bottom: 0; width: 100%;
  padding: 24px 26px 26px; border-radius: 22px;
  background: rgba(20, 14, 6, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); /* taste-skill-ignore: brief asks for glass cards in the crumb */
  opacity: 0; transform: translateY(40px);
  will-change: transform, opacity;
}
.glass h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.glass p { margin-top: 8px; font-size: 1.0625rem; line-height: 1.5; }

/* Bake */
.overlay-bake { display: flex; flex-direction: column; justify-content: space-between; }
.oven {
  align-self: flex-start;
  display: grid; grid-template-columns: repeat(4, auto); gap: 6px;
  background: rgba(0, 0, 0, 0.78); padding: 8px; border-radius: 22px;
}
.oven-cell { background: var(--surface-2); border-radius: 16px; padding: 14px 20px 16px; min-width: 150px; }
.oven-label { color: var(--ink-2); font-size: var(--t-small); }
.oven-value { font-size: clamp(1.6rem, 2.6vw, 2.4rem); font-weight: 500; line-height: 1.1; margin-top: 4px; display: flex; align-items: center; gap: 10px; }
.oven-colour .oven-value { font-family: var(--serif); font-style: italic; font-weight: 400; }
.swatch { width: 26px; height: 26px; border-radius: 50%; background: #e9d6a2; flex: none; }

/* ---------- Blocks (normal flow) ---------- */
.block { padding: var(--gap-section) var(--margin) 0; }
.block-head { display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; align-items: end; }
.sec-title { font-size: var(--t-h2); font-weight: 700; line-height: 0.95; letter-spacing: -0.04em; }
.sec-lede { max-width: 44ch; font-size: clamp(1.125rem, 1.4vw, 1.3rem); }

/* Lens */
.lens-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 40px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--radius); padding: 4px; }
.seg button {
  border: 0; background: transparent; padding: 10px 20px; border-radius: var(--radius);
  font-weight: 600; cursor: pointer; color: var(--ink-2);
  transition: background-color 160ms ease, color 160ms ease;
}
.seg button[aria-checked="true"] { background: var(--ink); color: var(--ground); }
.lens-readout { font-size: 1.25rem; }
.lens-readout .mono { color: var(--gold); font-size: 1.5rem; }
.lens-stage {
  --x: 50%; --y: 50%; --r: clamp(90px, 12vw, 190px); --shift: 0px;
  position: relative; margin-top: 20px; aspect-ratio: 21 / 9; max-height: 74vh; width: 100%; overflow: hidden;
  border-radius: 28px; background: var(--ground); cursor: none; touch-action: pan-y;
}
.lens-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lens-layer {
  /* measured: overlay plates sit 8px left of the hero at 4K; lens.js sets the shift */
  transform: translateX(var(--shift));
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 72%, transparent 100%); /* taste-skill-ignore: lens mask, not a fill */
  mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 72%, transparent 100%); /* taste-skill-ignore: lens mask, not a fill */
}
.lens-ring {
  position: absolute; left: var(--x); top: var(--y); width: calc(var(--r) * 2); height: calc(var(--r) * 2);
  translate: -50% -50%; border-radius: 50%;
  border: 2px solid rgba(251, 231, 176, 0.55);
  pointer-events: none;
}

/* Turn */
.turn { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 4vw; align-items: center; }
.turn-deg { margin-top: 28px; font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1; font-weight: 500; color: var(--gold); }
.turn-deg .mono { letter-spacing: -0.05em; }
.turn-stage {
  position: relative; aspect-ratio: 16 / 10; border-radius: 28px; overflow: hidden;
  background: var(--ground); cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.turn-stage.dragging { cursor: grabbing; }
.turn-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.turn-hint {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0;
  background: var(--surface-2); padding: 8px 16px; border-radius: var(--radius); font-size: var(--t-small);
  transition: opacity 300ms ease;
}
.turn-stage.touched .turn-hint { opacity: 0; }

/* Lineup */
.line-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 48px; }
.line-item { background: var(--surface); border-radius: 22px; overflow: hidden; padding-bottom: 22px; transition: background-color 200ms ease; }
.line-item:hover { background: var(--surface-2); }
.line-item img { width: 100%; height: auto; aspect-ratio: 1 / 0.9; object-fit: cover; transition: transform 600ms var(--ease-out); }
.line-item:hover img { transform: scale(1.04); }
.line-item h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); font-weight: 700; letter-spacing: -0.02em; padding: 18px 22px 0; }
.line-price { padding: 4px 22px 0; color: var(--gold); font-size: 1.125rem; }
.table-wrap { margin-top: 6px; overflow-x: auto; border-radius: 22px; background: var(--surface); }
.spec-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
.spec-table th, .spec-table td { text-align: left; padding: 16px 22px; vertical-align: top; }
.spec-table thead th { font-weight: 700; font-size: 1.0625rem; padding-top: 22px; }
.spec-table tbody th { color: var(--ink-2); font-weight: 500; width: 14%; }
.spec-table tbody tr:nth-child(odd) { background: #12110e; }
.spec-table td.mono { font-size: 1.0625rem; }

/* Order */
.order { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4vw; align-items: start; }
.batch { margin-top: 48px; background: var(--surface); border-radius: 22px; padding: 24px 26px 26px; }
.batch-label { margin-top: 10px; }
.batch-value { font-size: clamp(3rem, 6vw, 5.4rem); line-height: 1; font-weight: 500; letter-spacing: -0.05em; color: var(--gold); }
.batch-note { color: var(--ink-2); margin-top: 4px; }
.order-card { background: var(--surface); border-radius: 28px; padding: clamp(20px, 2.4vw, 36px); }
.order-card fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.order-legend { font-weight: 700; font-size: 1.25rem; padding: 0; margin-bottom: 12px; }
.qty-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px;
  background: var(--surface-2); border-radius: 16px; padding: 10px 10px 10px 18px; margin-top: 6px;
}
.qty-name { font-weight: 600; }
.qty-price { color: var(--ink-2); }
.stepper { display: inline-flex; align-items: center; background: var(--ground); border-radius: var(--radius); padding: 4px; }
.stepper button {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  font-size: 1.25rem; line-height: 1; transition: background-color 140ms ease, transform 120ms ease;
}
.stepper button:hover { background: var(--surface-2); }
.stepper button:active { transform: scale(0.9); }
.stepper button:disabled { opacity: 0.35; cursor: default; }
.stepper output { min-width: 2.2ch; text-align: center; font-size: 1.125rem; }
.order-slots { margin-top: 28px; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.slot {
  position: relative; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface-2); border-radius: 14px; padding: 12px 14px; cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 120ms ease;
}
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot:hover { background: #24211a; }
.slot:active { transform: scale(0.98); }
.slot .slot-time { font-family: var(--mono); font-size: 1.125rem; } /* taste-skill-ignore: brief asks for mono readouts */
.slot .slot-left { font-size: var(--t-small); color: var(--ink-2); }
.slot:has(input:checked) { background: var(--gold); color: var(--gold-ink); }
.slot:has(input:checked) .slot-left { color: var(--gold-ink); }
.slot:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 3px; }
.slot.full { opacity: 0.4; cursor: not-allowed; }
.order-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.order-total { font-size: 1.25rem; font-weight: 600; }
.order-total .mono { font-size: 1.75rem; margin-left: 8px; }
.order-msg { margin-top: 16px; min-height: 1.5em; }
.order-msg.ok { color: var(--gold-hi); }

/* Footer */
.foot { padding: var(--gap-section) var(--margin) 36px; }
.foot-name {
  font-size: 23.5vw; line-height: 0.8; font-weight: 800; letter-spacing: -0.06em;
  margin-left: -0.04em;
  color: #231f17;
}
.foot-row { display: flex; justify-content: space-between; gap: 24px; margin-top: 28px; color: var(--ink-2); flex-wrap: wrap; }
.foot-row a { color: var(--ink); }

/* ---------- Entrances ---------- */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-rise].in { opacity: 1; transform: none; }

/* ---------- Phone ---------- */
@media (max-width: 860px) {
  .bar-links { display: none; }
  .bar { gap: 10px; }
  .sound { padding: 8px 12px; }
  .bar-cta { min-height: 36px; padding: 0 14px; }

  .pro-actions { flex-wrap: wrap; }
  .spin-claim { width: auto; left: var(--margin); right: var(--margin); top: auto; bottom: 9vh; transform: none; }
  .claim-tag { font-size: 1.35rem; }
  .lens-stage { aspect-ratio: 1 / 1; --r: 84px; }
  .spec-strip { grid-template-columns: repeat(3, 1fr); }
  .spec-strip div { padding: 10px 12px; }
  .oven-cell { min-width: 0; padding: 12px 14px; }
  .block-head, .turn, .order { grid-template-columns: 1fr; }
  .line-row { grid-template-columns: 1fr 1fr; }
  .spec-table { min-width: 0; }
  .spec-table th, .spec-table td { padding: 14px 14px; }
  .slots { grid-template-columns: repeat(3, 1fr); }
  .qty-row { grid-template-columns: 1fr auto; }
  .qty-price { display: none; }
  .foot-row { flex-direction: column; }
}

@media (max-width: 600px) {
  .overlay-split, .overlay-top, .overlay-crumb { flex-direction: column; }
  .readout-crunch { width: 100%; grid-template-columns: 1fr 1fr; align-items: end; margin-top: auto; padding-bottom: 7vh; }
  .overlay-split { justify-content: space-between; height: auto; }
  .overlay-top { justify-content: flex-start; gap: 14px; }
  .layer-count { text-align: left; display: flex; align-items: baseline; gap: 10px; }
  .layer-value { font-size: 4.5rem; }
  .glass-stack { width: 100%; flex: 1; }
  .oven { grid-template-columns: 1fr 1fr; align-self: stretch; }
  .pro-name { font-size: 18.6vw; line-height: 0.9; }
  .sound { padding: 8px 10px; }
  .table-wrap { background: transparent; overflow: visible; }
  .spec-table, .spec-table tbody { display: block; min-width: 0; }
  .spec-table thead { display: none; }
  .spec-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 16px 18px; margin-top: 6px; border-radius: 18px; background: var(--surface); }
  .spec-table tbody tr:nth-child(odd) { background: var(--surface); }
  .spec-table tbody th { grid-column: 1 / -1; width: auto; padding: 0 0 6px; color: var(--ink); font-weight: 700; }
  .spec-table td { padding: 0; }
  .spec-table td::before { content: attr(data-label); display: block; color: var(--ink-2); font-family: var(--sans); font-size: var(--t-small); }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-rise] { transform: none; transition: opacity 300ms linear; }
  .hint, .spec-strip { transform: none; }
  .line-item img, .line-item:hover img { transition: none; transform: none; }
}
