/*
  Casa Bora: fragrance product page (Screenery template)
  Dark luxury: a near-black aubergine ground, champagne metal for the fixed chrome, and one accent that follows the
  chosen scent (sea glass, roasted amber, Karst rose). Gilda Display for the voice, Manrope for everything else.

  Contents
   1. Tokens (the accent and liquid are registered properties so they can transition)
   2. Base and browser surfaces
   3. Components: buttons, fields, select, checkbox, radio rows, chips
   4. Header
   5. Hero: stage (WebGL canvas over the drawn bottle) and buy panel
   6. The house and the comparison table
   7. Pyramid
   8. The making
   9. Scent finder
  10. Discovery set
  11. Bag and checkout
  12. Stockists
  13. Questions
  14. Footer
  15. Motion
  16. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
@property --accent { syntax: '<color>'; inherits: true; initial-value: #9cc9b3; }
@property --liquid { syntax: '<color>'; inherits: true; initial-value: #7fae95; }
@property --liquid-hi { syntax: '<color>'; inherits: true; initial-value: #cfe5d2; }

:root {
  /* Ground: ink with a little aubergine in it */
  --ground: #140f16;
  --ground-2: #1b1420;     /* raised panels */
  --ground-3: #261c2b;     /* wells, hover */
  --ink: #f1e9e1;          /* ivory text, 16:1 on ground */
  --ink-2: #c4b7bb;        /* secondary text, 9.6:1 */
  --ink-3: #a3959b;        /* tertiary, labels, 6.4:1 */
  --line: rgb(241 233 225 / 0.14);
  --line-strong: rgb(241 233 225 / 0.28);

  /* The one warm metal: champagne gold, for chrome that never changes */
  --gold: #c8a86b;
  --gold-deep: #8c7243;

  /* The scent accent (set per scent below) */
  --accent: #9cc9b3;
  --on-accent: #140f16;
  --liquid: #7fae95;
  --liquid-hi: #cfe5d2;

  --error: #f0a08c;        /* warm coral, 8:1 on ground */

  /* Type */
  --display: "Gilda Display", "Didot", Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --fs-h2: clamp(2.2rem, 1.5rem + 2.4vw, 3.6rem);
  --fs-h1: clamp(3rem, 1.6rem + 4.4vw, 5.6rem);

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: clamp(88px, 10vw, 152px);
  --gutter: clamp(16px, 4vw, 56px);
  --wrap: 1240px;

  /* Shape: glass and card, very small radii */
  --r-1: 2px;
  --r-2: 4px;
  --r-pill: 999px;

  /* Depth: offset and soft, warm black */
  --lift: 0 18px 40px -20px rgb(0 0 0 / 0.7);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t-mid: 360ms;
  --t-scent: 900ms;
}

/* The three scents. The page accent and the drawn liquid follow these. */
:root[data-scent="sale"] { --accent: #9cc9b3; --liquid: #7fae95; --liquid-hi: #cfe5d2; }
:root[data-scent="torrefazione"] { --accent: #d9a066; --liquid: #8a4f1f; --liquid-hi: #d39a52; }
:root[data-scent="rosa"] { --accent: #e28b98; --liquid: #8d2238; --liquid-hi: #d0596f; }

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--ground);
  color-scheme: dark;
  accent-color: var(--accent);
  scrollbar-color: var(--gold-deep) var(--ground);
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: clip;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--on-accent); }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--gold-deep); border: 3px solid var(--ground); border-radius: 8px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-xl); }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-1); }
table, .tnum, dd, [data-price], .totals, .lines { font-variant-numeric: tabular-nums lining-nums; }

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s-4); top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: var(--s-3) var(--s-4); border-radius: var(--r-2); font-weight: 600; text-decoration: none; }
.skip:focus { top: var(--s-4); }
.skip:hover { color: var(--on-accent); }

section { padding: var(--s-9) var(--gutter); }
section > * { max-width: var(--wrap); margin-inline: auto; }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s-5) var(--s-8); align-items: end; margin-bottom: var(--s-8); }
.section-head p { color: var(--ink-2); max-width: 52ch; }
.section-head h2 + p:only-of-type { justify-self: end; }

/* ---------- 3. Components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3);
  min-height: 52px; padding: 0 var(--s-6);
  border: 1px solid transparent; border-radius: var(--r-1);
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: color-mix(in oklab, var(--accent) 84%, white); color: var(--on-accent); }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--wide { width: 100%; }
.btn[aria-busy="true"] { cursor: progress; }
.btn__spin { display: none; width: 16px; height: 16px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; }
.btn[aria-busy="true"] .btn__spin { display: inline-block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 6px; align-content: start; }
.field label, fieldset legend { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.field__opt { font-weight: 400; color: var(--ink-3); margin-left: var(--s-2); }
.field__help { font-size: var(--fs-xs); color: var(--ink-3); }
.field__error { font-size: var(--fs-xs); color: var(--error); min-height: 0; }
.field__error:empty { display: none; }
input[type="text"], input[type="email"], select {
  width: 100%; min-height: 50px; padding: 0 var(--s-4);
  background: var(--ground); border: 1px solid var(--line-strong); border-radius: var(--r-1);
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast);
}
input::placeholder { color: var(--ink-3); opacity: 1; }
input:hover, select:hover { border-color: color-mix(in oklab, var(--ink) 45%, transparent); }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
input[aria-invalid="true"] { border-color: var(--error); }
.select { position: relative; }
.select select { appearance: none; padding-right: 44px; cursor: pointer; }
.select .icon { position: absolute; right: 14px; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--ink-2); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset legend { padding: 0; margin-bottom: var(--s-3); }

.check { display: flex; align-items: flex-start; gap: var(--s-3); cursor: pointer; min-height: 44px; padding-top: 10px; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box { width: 22px; height: 22px; flex: none; border: 1px solid var(--line-strong); border-radius: var(--r-1); display: grid; place-items: center; margin-top: 1px; transition: background-color var(--t-fast), border-color var(--t-fast); }
.check__box .icon { width: 16px; height: 16px; opacity: 0; color: var(--on-accent); stroke-width: 2; }
.check input:checked + .check__box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check__box .icon { opacity: 1; }
.check input:focus-visible + .check__box { outline: 2px solid var(--accent); outline-offset: 3px; }
.check__text { color: var(--ink-2); }
.check__text strong { color: var(--ink); font-weight: 600; }

.radio-row { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-1); cursor: pointer; color: var(--ink-2); font-size: var(--fs-sm); transition: border-color var(--t-fast); }
.radio-row + .radio-row { margin-top: var(--s-2); }
.radio-row input { margin: 4px 0 0; width: 18px; height: 18px; flex: none; }
.radio-row strong { color: var(--ink); font-weight: 600; display: block; }
.radio-row:has(input:checked) { border-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.chip { min-height: 44px; padding: 0 var(--s-5); background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r-pill); cursor: pointer; font-size: var(--fs-sm); font-weight: 500; transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- 4. Header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--s-6);
  padding: var(--s-3) var(--gutter);
  min-height: 68px;
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}
.mark { display: flex; align-items: baseline; gap: var(--s-3); text-decoration: none; margin-right: auto; }
.mark__word { font-family: var(--display); font-size: 1.6rem; letter-spacing: 0.02em; color: var(--gold); }
.mark__city { font-size: var(--fs-xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.mark:hover .mark__word { color: var(--gold); }
.nav { display: flex; gap: var(--s-5); }
.nav a { font-size: var(--fs-sm); color: var(--ink-2); text-decoration: none; padding: var(--s-2) 0; }
.nav a:hover { color: var(--ink); }
.bag-link { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--r-pill); text-decoration: none; font-size: var(--fs-sm); font-weight: 600; }
.bag-link__count { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.bag-link.is-bumped .bag-link__count { animation: bump 600ms var(--ease-out); }
@keyframes bump { 30% { transform: scale(1.35); } }

/* ---------- 5. Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.9fr);
  gap: var(--s-6) var(--s-8);
  align-items: center;
  padding-top: var(--s-6);
  padding-bottom: var(--s-8);
  min-height: calc(100svh - 68px);
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
}
.hero > * { max-width: none; margin: 0; }

.stage {
  position: sticky;
  top: 84px;
  align-self: start;
  height: min(78svh, 720px);
  min-height: 440px;
  border-radius: var(--r-2);
  /* the studio: a lit sweep that takes a little of the scent's colour */
  background:
    radial-gradient(60% 52% at 50% 46%, color-mix(in oklab, var(--accent) 16%, var(--ground-3)) 0%, transparent 72%),
    radial-gradient(90% 30% at 50% 92%, rgb(0 0 0 / 0.35), transparent 70%),
    var(--ground);
}
.stage__drawn { position: absolute; inset: 6% 12% 8%; width: 76%; height: 86%; margin: auto; }
.drawn-label__paper { fill: #efe6da; }
.drawn-label__rule { fill: none; stroke: var(--gold-deep); stroke-width: 0.8; }
.drawn-label__house { font: 700 8.5px var(--sans); letter-spacing: 0.32em; fill: #6d5733; }
.drawn-label__name { font: 21px var(--display); fill: #1f1622; }
.drawn-label__sub { font: 600 7px var(--sans); letter-spacing: 0.16em; fill: #5b4a55; }
.gl .stage { background: var(--ground); }
.stage__gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 900ms var(--ease-out);
  -webkit-mask-image: radial-gradient(50% 50% at 50% 50%, #000 66%, transparent 100%);
          mask-image: radial-gradient(50% 50% at 50% 50%, #000 66%, transparent 100%); }
.gl .stage__gl { opacity: 1; }
.gl .stage__drawn { opacity: 0; transition: opacity 900ms var(--ease-out); }
.stage__turn { position: absolute; inset: 0; z-index: 2; display: none; cursor: grab; touch-action: pan-y; border-radius: var(--r-2); }
.gl .stage__turn { display: block; }
.stage__turn.is-dragging { cursor: grabbing; }
.stage__turn:focus-visible { outline-offset: -6px; }
.stage__hint { position: absolute; left: 50%; bottom: var(--s-4); translate: -50% 0; z-index: 3; display: none; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; pointer-events: none; }
.gl .stage__hint { display: flex; }

.buy { display: grid; gap: var(--s-5); align-content: center; }
.buy__name { font-size: var(--fs-h1); line-height: 1; letter-spacing: -0.01em; }
.buy__line { color: var(--ink-2); font-size: var(--fs-lg); line-height: 1.5; max-width: 34ch; }
.buy__form { display: grid; gap: var(--s-5); margin-top: var(--s-2); }

.scents__row { display: grid; gap: var(--s-2); }
.scent-chip { position: relative; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: var(--s-3); min-height: 54px; padding: 0 var(--s-4); border: 1px solid var(--line); border-radius: var(--r-1); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast); }
.scent-chip:hover { border-color: var(--line-strong); background: var(--ground-2); }
.scent-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.scent-chip__swatch { width: 16px; height: 16px; border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 3px var(--ground), 0 0 0 4px transparent; transition: box-shadow var(--t-fast); }
.scent-chip__name { font-weight: 600; }
.scent-chip__family { font-size: var(--fs-xs); color: var(--ink-3); text-align: right; }
.scent-chip:has(input:checked) { border-color: var(--accent); background: var(--ground-2); }
.scent-chip:has(input:checked) .scent-chip__swatch { box-shadow: 0 0 0 3px var(--ground-2), 0 0 0 4px var(--sw); }
.scent-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

.sizes__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.size-opt { position: relative; display: flex; justify-content: space-between; align-items: baseline; min-height: 54px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-1); cursor: pointer; transition: border-color var(--t-fast); }
.size-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size-opt__ml { font-weight: 600; }
.size-opt__price { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.size-opt:has(input:checked) { border-color: var(--accent); background: var(--ground-2); }
.size-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

.buy__facts { margin: 0; display: grid; border-top: 1px solid var(--line); }
.buy__facts div { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-2) 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.buy__facts dt { color: var(--ink-3); }
.buy__facts dd { margin: 0; text-align: right; }
.buy__act { display: grid; gap: var(--s-3); }
.buy__note { font-size: var(--fs-xs); color: var(--ink-3); }
.buy__status { font-size: var(--fs-sm); color: var(--accent); min-height: 1.4em; }

/* ---------- 6. The house ---------- */
.house { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-7) var(--s-8); align-items: start; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; border-top: 1px solid var(--line); }
.house > * { margin: 0; max-width: none; }
.house__text { display: grid; gap: var(--s-4); }
.house__text h2 { margin-bottom: var(--s-3); }
.house__text p { color: var(--ink-2); max-width: 62ch; }
.compare-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.compare th, .compare td { text-align: left; padding: var(--s-4) var(--s-3); border-bottom: 1px solid var(--line); vertical-align: baseline; }
.compare thead th { font-weight: 500; color: var(--ink-3); font-size: var(--fs-xs); letter-spacing: 0.06em; }
.compare tbody th { font-family: var(--display); font-weight: 400; font-size: 1.25rem; white-space: nowrap; }
.compare td { color: var(--ink-2); }
.compare td:nth-child(n+5) { text-align: right; color: var(--ink); }
.compare thead th:nth-child(n+5) { text-align: right; }
.compare tr { transition: background-color var(--t-mid) var(--ease-out); }
.compare tr.is-current { background: color-mix(in oklab, var(--accent) 9%, transparent); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--sw); margin-right: var(--s-3); vertical-align: 0.1em; }

/* ---------- 7. Pyramid ---------- */
.pyramid { background: var(--ground-2); max-width: none; }
.pyramid__body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-7) var(--s-8); align-items: start; }
.pyr { display: grid; grid-template-columns: clamp(96px, 16vw, 210px) minmax(0, 1fr); grid-template-rows: repeat(3, minmax(132px, auto)); column-gap: var(--s-6); }
.pyr__shape { grid-column: 1; grid-row: 1 / -1; width: 100%; height: 100%; }
.pyr__tier { fill: color-mix(in oklab, var(--ink) 5%, transparent); stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill var(--t-mid) var(--ease-out), stroke var(--t-mid); }
.pyr[data-active="top"] .pyr__tier--top,
.pyr[data-active="heart"] .pyr__tier--heart,
.pyr[data-active="base"] .pyr__tier--base { fill: color-mix(in oklab, var(--accent) 40%, transparent); stroke: var(--accent); }
.pyr__row { grid-column: 2; display: grid; align-content: center; gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.pyr__row:first-of-type { border-top: 1px solid var(--line); }
.pyr__label { font-family: var(--display); font-size: 1.5rem; line-height: 1.2; }
.pyr__label span { font-family: var(--sans); font-size: var(--fs-xs); color: var(--ink-3); margin-left: var(--s-3); }
.pyr__notes { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.note { min-height: 44px; padding: 0 var(--s-5); border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: transparent; cursor: pointer; font-size: var(--fs-sm); font-weight: 500; transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.note:hover { border-color: var(--accent); }
.note[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.note-card { position: sticky; top: 100px; display: grid; gap: var(--s-3); padding: var(--s-6); background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--lift); }
.note-card__name { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.8rem); }
.note-card__latin { color: var(--accent); font-size: var(--fs-sm); font-style: italic; }
.note-card__text { color: var(--ink-2); max-width: 58ch; }
.note-card__facts { margin: var(--s-3) 0 0; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s-2) var(--s-6); border-top: 1px solid var(--line); padding-top: var(--s-4); }
.note-card__facts dt { font-size: var(--fs-xs); color: var(--ink-3); }
.note-card__facts dd { margin: 0; font-size: var(--fs-sm); }
.note-card__keys { font-size: var(--fs-xs); color: var(--ink-3); }
.note-card.is-swapping > * { animation: note-in 520ms var(--ease-out) both; }
@keyframes note-in { from { opacity: 0.2; filter: blur(4px); translate: 0 6px; } }

/* ---------- 8. The making ---------- */
.scale { display: flex; gap: 3px; height: 56px; margin-bottom: var(--s-2); }
.scale__seg { flex: var(--d) 1 0; min-width: 7px; border-radius: var(--r-1); position: relative; display: flex; align-items: center; padding-inline: var(--s-3); overflow: hidden; }
.scale__seg em { font-style: normal; font-size: var(--fs-xs); white-space: nowrap; color: var(--ink); }
.scale__seg--work { background: var(--gold); }
.scale__seg--wait { background: color-mix(in oklab, var(--accent) 22%, var(--ground-2)); border: 1px solid color-mix(in oklab, var(--accent) 45%, transparent); }
.scale__seg--cold { background: #b9c4d6; flex-basis: 0; }
.scale__ticks { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: var(--s-8); font-variant-numeric: tabular-nums; }

.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--s-7); counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-4); align-content: start; padding-top: var(--s-5); border-top: 1px solid var(--line-strong); }
.steps li::before { content: counter(step); grid-row: 1 / span 3; font-family: var(--display); font-size: 2.6rem; line-height: 0.9; color: var(--gold); }
.steps h3 { font-size: 1.5rem; }
.steps__when { font-size: var(--fs-xs); color: var(--accent); font-weight: 600; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.steps li > p:last-child { color: var(--ink-2); font-size: var(--fs-sm); }

/* ---------- 9. Scent finder ---------- */
.finder { background: var(--ground-2); max-width: none; }
.quiz { max-width: 760px; margin-inline: auto; padding: clamp(24px, 4vw, 48px); background: var(--ground); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--lift); display: grid; gap: var(--s-5); }
.quiz__progress { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; display: none; }
.quiz__q { display: grid; gap: var(--s-2); }
.quiz__q + .quiz__q { margin-top: var(--s-5); }
.quiz__q legend { font-family: var(--display); font-weight: 400; font-size: var(--fs-xl); line-height: 1.2; margin-bottom: var(--s-4); }
.opt { display: flex; align-items: center; gap: var(--s-4); min-height: 56px; padding: var(--s-2) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-1); cursor: pointer; transition: border-color var(--t-fast), background-color var(--t-fast); }
.opt input { width: 18px; height: 18px; margin: 0; flex: none; }
.opt:hover { background: var(--ground-2); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--ground-2); }
.quiz__error { color: var(--error); font-size: var(--fs-sm); }
.quiz__error:empty { display: none; }
.quiz__nav { display: none; justify-content: space-between; gap: var(--s-3); }
.quiz__result { display: grid; gap: var(--s-4); }
.quiz__result[hidden] { display: none; }
.quiz__result:focus { outline: none; }
.quiz__result-name { font-family: var(--display); font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); line-height: 1.1; }
.quiz__result-name strong { font-weight: 400; color: var(--accent); }
.quiz__result-why { color: var(--ink-2); max-width: 58ch; }
.quiz__result-act { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
/* With JS the quiz shows one question at a time */
.quiz.is-stepped .quiz__progress { display: block; }
.quiz.is-stepped .quiz__nav { display: flex; }
.quiz.is-stepped .quiz__q { display: none; margin: 0; }
.quiz.is-stepped .quiz__q.is-current { display: grid; animation: q-in 480ms var(--ease-out) both; }
.quiz.is-stepped.is-done .quiz__q, .quiz.is-stepped.is-done .quiz__nav, .quiz.is-stepped.is-done .quiz__progress { display: none; }
.quiz [data-quiz-back][disabled] { visibility: hidden; }
@keyframes q-in { from { opacity: 0; translate: 12px 0; } }

/* ---------- 10. Discovery set ---------- */
.disc { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--s-7) var(--s-8); align-items: start; }
.disc__pick { display: grid; gap: var(--s-6); }
.vials legend { display: flex; width: 100%; justify-content: space-between; gap: var(--s-4); }
.vials__count { font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.vials__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.vial { position: relative; display: grid; justify-items: center; align-content: start; text-align: center; gap: 2px; padding: var(--s-4) var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-2); cursor: pointer; transition: border-color var(--t-fast), background-color var(--t-fast), opacity var(--t-fast); }
.vial input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.vial:hover { background: var(--ground-2); }
.vial__art { width: 34px; height: 82px; margin-bottom: var(--s-2); }
.vial__cap { fill: var(--gold); }
.vial__glass { fill: rgb(241 233 225 / 0.06); stroke: rgb(241 233 225 / 0.4); }
.vial__liquid { fill: var(--lq); opacity: 0.35; transition: opacity var(--t-mid) var(--ease-out); }
.vial__name { font-weight: 600; font-size: var(--fs-sm); line-height: 1.3; }
.vial__name small { display: block; font-weight: 500; font-size: 0.75rem; color: var(--ink-3); letter-spacing: 0.04em; }
.vial__notes { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.4; }
.vial:has(input:checked) { border-color: var(--accent); background: var(--ground-2); }
.vial:has(input:checked) .vial__liquid { opacity: 1; }
.vial:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.vials.is-full .vial:not(:has(input:checked)) { opacity: 0.62; }

.disc__preview { position: sticky; top: 100px; display: grid; gap: var(--s-4); justify-items: stretch; }
.box { width: 100%; height: auto; filter: drop-shadow(0 24px 30px rgb(0 0 0 / 0.55)); }
.box__card { fill: #2b2030; stroke: var(--gold-deep); }
.box__well { fill: #1a121e; }
.slot__hole { fill: #120c15; stroke: rgb(200 168 107 / 0.3); }
.slot__vial { opacity: 0; translate: 0 -14px; transition: opacity var(--t-mid) var(--ease-out), translate var(--t-mid) var(--ease-out); }
.slot.is-filled .slot__vial { opacity: 1; translate: 0 0; }
.slot__liquid { fill: var(--lq, #888); }
.box__label { fill: #efe6da; }
.box__label-rule { fill: none; stroke: #8c7243; stroke-width: 0.8; }
.box__house { font: 700 8.5px var(--sans); letter-spacing: 0.3em; fill: #6d5733; }
.box__engrave { font: 23px var(--display); fill: #1f1622; }
.box__small { font: 600 7.5px var(--sans); letter-spacing: 0.12em; fill: #5b4a55; text-transform: uppercase; }
.box__wrap { opacity: 0; transition: opacity var(--t-mid) var(--ease-out); pointer-events: none; }
.box.is-wrapped .box__wrap { opacity: 1; }
.ribbon { fill: var(--accent); opacity: 0.9; }
.disc__price { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: var(--s-4); color: var(--ink-2); }
.disc__price strong { font-family: var(--display); font-weight: 400; font-size: 1.9rem; color: var(--ink); }

/* ---------- 11. Bag and checkout ---------- */
.checkout { border-top: 1px solid var(--line); }
.checkout__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-7) var(--s-8); align-items: start; }
.summary { display: grid; gap: var(--s-5); }
.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lines:empty { display: none; }
.line { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "art name price" "art meta price" "art ctrl ctrl"; gap: 2px var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.line__art { grid-area: art; width: 30px; height: 64px; }
.line__name { grid-area: name; font-family: var(--display); font-size: 1.3rem; line-height: 1.2; }
.line__meta { grid-area: meta; font-size: var(--fs-xs); color: var(--ink-3); }
.line__price { grid-area: price; font-weight: 600; text-align: right; }
.line__ctrl { grid-area: ctrl; display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-2); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-pill); }
.stepper button { width: 44px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; border-radius: var(--r-pill); }
.stepper button:hover { color: var(--accent); }
.stepper button[disabled] { color: var(--ink-3); cursor: not-allowed; opacity: 0.5; }
.stepper output { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.line__remove { background: none; border: 0; padding: var(--s-2) 0; min-height: 44px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 0.22em; cursor: pointer; font-size: var(--fs-sm); }
.line__remove:hover { color: var(--accent); }
.lines__empty { display: grid; gap: var(--s-3); justify-items: start; padding: var(--s-6); border: 1px dashed var(--line-strong); border-radius: var(--r-2); color: var(--ink-2); }
.lines__empty[hidden] { display: none; }
.lines__empty-title { font-family: var(--display); font-size: 1.6rem; color: var(--ink); }
.totals { margin: 0; display: grid; gap: var(--s-2); }
.totals div { display: flex; justify-content: space-between; color: var(--ink-2); }
.totals dd { margin: 0; color: var(--ink); }
.totals__grand { padding-top: var(--s-3); border-top: 1px solid var(--line-strong); }
.totals__grand dt, .totals__grand dd { font-family: var(--display); font-size: 1.7rem; color: var(--ink); }
.totals__hint { font-size: var(--fs-sm); color: var(--accent); }
.totals__hint:empty { display: none; }

.co { display: grid; gap: var(--s-5); padding: clamp(20px, 3vw, 40px); background: var(--ground-2); border: 1px solid var(--line); border-radius: var(--r-2); }
.co[hidden] { display: none; }
.co__title { font-size: 1.8rem; }
.co__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.field--wide { grid-column: 1 / -1; }
.addr { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.addr[hidden] { display: none; }
.co input[type="text"], .co input[type="email"], .co select { background: var(--ground); }
.co__pay { font-size: var(--fs-sm); color: var(--ink-3); }
.co__alert { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border: 1px solid var(--error); border-radius: var(--r-1); color: var(--error); background: color-mix(in oklab, var(--error) 8%, transparent); font-size: var(--fs-sm); }
.co__alert[hidden] { display: none; }
.co.is-loading input, .co.is-loading select { opacity: 0.6; }

.done { display: grid; gap: var(--s-4); justify-items: start; padding: clamp(24px, 4vw, 48px); background: var(--ground-2); border: 1px solid var(--accent); border-radius: var(--r-2); }
.done[hidden] { display: none; }
.done:focus { outline: none; }
.done h3 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); }
.done p { color: var(--ink-2); max-width: 52ch; }
.done p strong { color: var(--ink); }
.done__mark { width: 64px; height: 64px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.done__mark path { stroke-dasharray: 40; stroke-dashoffset: 0; }

/* ---------- 12. Stockists ---------- */
.stockists { border-top: 1px solid var(--line); }
.shops { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s-7); }
.shop { padding: var(--s-5) 0; border-top: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.shop[hidden] { display: none; }
.shop h3 { font-size: 1.45rem; }
.shop p { font-size: var(--fs-sm); color: var(--ink-2); }
.shop .shop__has { color: var(--ink-3); font-size: var(--fs-xs); }
.shop--home h3 { color: var(--gold); }

/* ---------- 13. Questions ---------- */
.faq { background: var(--ground-2); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: var(--s-6) var(--s-8); align-items: start; padding-inline: max(var(--gutter), (100% - var(--wrap)) / 2); }
.faq > * { margin: 0; max-width: none; }
.faq .section-head { display: block; }
.faq__list { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 68px; padding: var(--s-3) 0; cursor: pointer; list-style: none; font-family: var(--display); font-size: 1.4rem; line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary .icon { transition: rotate var(--t-mid) var(--ease-out); color: var(--accent); }
.faq details[open] summary .icon { rotate: 45deg; }
.faq details p { padding: 0 0 var(--s-5); color: var(--ink-2); max-width: 66ch; }

/* ---------- 14. Footer ---------- */
.foot { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; gap: var(--s-6) var(--s-7); padding: var(--s-8) var(--gutter) var(--s-6); max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; }
.foot__word { font-family: var(--display); font-size: 2.2rem; color: var(--gold); margin-bottom: var(--s-2); }
.foot__brand p:last-child { color: var(--ink-2); font-size: var(--fs-sm); max-width: 32ch; }
.foot__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-5); align-content: start; }
.foot__nav a { font-size: var(--fs-sm); color: var(--ink-2); text-decoration: none; min-height: 36px; display: flex; align-items: center; }
.foot__nav a:hover { color: var(--accent); }
.foot__news { display: grid; gap: var(--s-3); align-content: start; }
.foot__news label { font-size: var(--fs-sm); color: var(--ink-2); }
.foot__news-row { display: flex; gap: var(--s-2); }
.foot__news-row input { flex: 1; min-width: 0; }
.foot__msg { font-size: var(--fs-xs); color: var(--accent); min-height: 1.2em; }
.foot__msg.is-error { color: var(--error); }
.foot__fine { grid-column: 1 / -1; padding-top: var(--s-5); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); }

/* ---------- 15. Motion ---------- */
/* The scent change: accent and liquid colours glide over 900ms */
@media (prefers-reduced-motion: no-preference) {
  :root { transition: --accent var(--t-scent) var(--ease-out), --liquid var(--t-scent) var(--ease-out), --liquid-hi var(--t-scent) var(--ease-out); }
  .buy__name.is-swapping { animation: name-in 700ms var(--ease-out) both; }
  @keyframes name-in { from { opacity: 0.15; filter: blur(6px); letter-spacing: 0.02em; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- 16. Narrow screens ---------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: var(--s-4); gap: var(--s-5); }
  .stage { position: relative; top: 0; height: min(58svh, 480px); min-height: 340px; }
  .house, .pyramid__body, .disc, .checkout__grid { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: 1fr; align-items: start; margin-bottom: var(--s-7); }
  .section-head h2 + p:only-of-type { justify-self: start; }
  .note-card, .disc__preview { position: static; }
  .disc__preview { max-width: 520px; }
  .foot { grid-template-columns: 1fr 1fr; }
  .faq { grid-template-columns: 1fr; }
  .foot__news { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  :root { --fs-md: 1rem; }
  .top { min-height: 60px; gap: var(--s-3); }
  .mark__word { font-size: 1.35rem; }
  .mark__city { display: none; }
  .bag-link > span:first-of-type { display: none; }
  .stage { height: 46svh; min-height: 300px; max-height: 400px; margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
  .stage__drawn { inset: 4% 18% 6%; width: 64%; height: 90%; }
  .buy__line { font-size: var(--fs-md); }
  .scent-chip { grid-template-columns: 20px 1fr; padding-block: var(--s-2); }
  .scent-chip__family { grid-column: 2; text-align: left; margin-top: -4px; }
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr { display: block; }
  .compare tr { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); gap: 2px var(--s-3); }
  .compare th, .compare td { border: 0; padding: 0; }
  .compare tr.is-current { padding-inline: var(--s-3); margin-inline: calc(-1 * var(--s-3)); }
  .compare tbody th { grid-column: 1 / -1; margin-bottom: var(--s-2); }
  .compare td::before { content: attr(data-label); display: block; font-size: 0.75rem; color: var(--ink-3); }
  .compare td:nth-child(n+5) { text-align: left; }
  .pyr { grid-template-columns: 64px minmax(0, 1fr); column-gap: var(--s-4); grid-template-rows: repeat(3, minmax(120px, auto)); }
  .pyr__label span { display: block; margin: 2px 0 0; }
  .note { padding: 0 var(--s-4); }
  .note-card { padding: var(--s-5); }
  .note-card__facts { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; gap: var(--s-6); }
  .scale__long { display: none; }
  .scale__seg { padding-inline: var(--s-2); }
  .vials__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co__grid, .addr { grid-template-columns: 1fr; }
  .shops { grid-template-columns: 1fr; }
  .quiz__nav .btn { padding: 0 var(--s-4); }
  .foot { grid-template-columns: 1fr; }
  .foot__news-row { flex-direction: column; }
}
