/* ==========================================================================
   The Treat Trove · site styles
   Tokens follow the brand book (Volume 1 · 2026): mostly Milk and Cocoa,
   Latte for straps and trims, pastels as small sweet touches.
   ========================================================================== */

/* Self-hosted brand typefaces (SIL Open Font License, via Fontsource) */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/jost-latin-500-normal.woff2") format("woff2"); }

:root {
  /* Brand palette */
  --cocoa: #35241A;
  --milk: #FFFFFF;
  --latte: #927963;
  --blush: #FFD9DA;
  --pistachio: #DFEFCA;
  --lemon: #FFF9A5;

  /* Working tones derived from the palette */
  --paper: #F9F6F2;            /* the warm panel tone used throughout the brand book */
  --cocoa-soft: #5E4A3E;       /* secondary text on light backgrounds (AA on Milk, Paper, pastels) */
  --cocoa-wood: #4A3226;       /* tray grain */
  --latte-light: #B9A592;      /* stitching, decorative lines only */
  --line: #E8DFD5;             /* hairlines on Milk */
  --milk-soft: rgba(255, 255, 255, .78);

  /* Type */
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, system-ui, sans-serif;

  --step-display: clamp(2.75rem, 1.6rem + 4.6vw, 4.75rem);   /* ~44 → 76 */
  --step-heading: clamp(2.125rem, 1.5rem + 2.4vw, 3.25rem);  /* ~34 → 52 */
  --step-sub: clamp(1.5rem, 1.25rem + 1vw, 1.95rem);         /* ~24 → 31 */
  --step-body: 1.125rem;   /* 18 */
  --step-label: .9375rem;  /* 15 */
  --step-small: .8125rem;  /* 13 */

  /* Layout */
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  --radius: 18px;
  --radius-lg: 28px;
  --header-h: 84px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.rm { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--step-body);
  line-height: 1.6;
  color: var(--cocoa);
  background: var(--milk);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--cocoa); outline-offset: 3px; border-radius: 6px; }
.on-cocoa :focus-visible { outline-color: var(--milk); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--cocoa); color: var(--milk); padding: .6rem 1rem; border-radius: 999px;
  text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* Headlines: Cormorant, sentence case, one italic word for a sweet accent */
h1, h2, h3, .h-display, .h-heading, .h-sub {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.005em;
  margin: 0 0 .4em;
  text-wrap: balance;
}
.h-display { font-size: var(--step-display); }
.h-heading { font-size: var(--step-heading); }
.h-sub { font-size: var(--step-sub); font-style: italic; line-height: 1.15; }
h1 em, h2 em, h3 em, .h-display em, .h-heading em { font-style: italic; }

.lede { font-size: 1.1875rem; color: var(--cocoa-soft); max-width: 34em; }
.small { font-size: var(--step-small); }
.label { font-size: var(--step-label); font-weight: 500; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.bg-paper { background: var(--paper); }
.bg-blush { background: var(--blush); }
.bg-pistachio { background: var(--pistachio); }
.on-cocoa { background: var(--cocoa); color: var(--milk); }
.on-cocoa .lede { color: var(--milk-soft); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--cocoa); --btn-fg: var(--milk);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.5rem;
  border: 1.5px solid var(--btn-bg); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--sans); font-size: 1rem; font-weight: 500; line-height: 1.1;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease-out), background-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--cocoa); border-color: var(--cocoa); }
.btn--ghost:hover { background: var(--cocoa); color: var(--milk); }
.btn--milk { --btn-bg: var(--milk); --btn-fg: var(--cocoa); }
.btn--ghost-milk { --btn-bg: transparent; --btn-fg: var(--milk); border-color: var(--milk); }
.btn--ghost-milk:hover { background: var(--milk); color: var(--cocoa); }
.btn--sm { min-height: 42px; padding: .5rem 1.15rem; font-size: .9375rem; }

.text-link {
  font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  padding-bottom: 2px; transition: background-size .3s var(--ease-out);
}
.text-link:hover { background-size: 0 1.5px; background-position: 100% 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: background-color .3s, box-shadow .3s;
}
.site-header.is-solid,
body:not(.home) .site-header { background: var(--milk); box-shadow: 0 1px 0 var(--line); }
.site-header__inner {
  height: 100%;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
}
.site-header__left { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.25rem); }
.site-header__right { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.site-logo { display: block; width: 150px; }
.site-logo img { width: 100%; height: auto; }

.nav-links { display: flex; gap: clamp(1rem, 2vw, 2rem); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: var(--step-label); font-weight: 500; text-decoration: none;
  padding-block: .4rem; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .3s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.icon-link { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; }
.icon-link svg { width: 22px; height: 22px; }
.icon-link:hover { background: rgba(53, 36, 26, .07); }

/* The home button: a little cloche that lifts to show a cupcake */
.home-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--cocoa); color: var(--milk); text-decoration: none; flex: none;
  transition: transform .35s var(--ease-out);
}
.home-btn svg { width: 34px; height: 34px; overflow: visible; }
.home-btn .cloche { transition: transform .45s var(--ease-out); transform-origin: 14px 22px; }
.home-btn .peek { opacity: 0; transform: translateY(3px); transition: opacity .25s, transform .4s var(--ease-out); }
.home-btn .spark { opacity: 0; transition: opacity .2s; }
.home-btn:hover, .home-btn:focus-visible { transform: rotate(-6deg) scale(1.06); }
.home-btn:hover .cloche, .home-btn:focus-visible .cloche { transform: translate(-3px, -9px) rotate(-22deg); }
.home-btn:hover .peek, .home-btn:focus-visible .peek { opacity: 1; transform: none; }
.home-btn:hover .spark, .home-btn:focus-visible .spark { opacity: 1; }
.home-btn[aria-current="page"]::after {
  content: ""; position: absolute; bottom: -9px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--cocoa);
}

.menu-toggle {
  display: none; width: 46px; height: 46px; border: 0; background: transparent; border-radius: 50%;
  cursor: pointer; place-items: center;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 22px; height: 1.5px; background: var(--cocoa); position: relative;
  transition: transform .3s var(--ease-out), background-color .2s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45; background: var(--blush);
  display: flex; flex-direction: column; justify-content: center; gap: 2rem;
  padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; transition: opacity .3s; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li a {
  display: block; font-family: var(--serif); font-size: 3rem; line-height: 1.2; text-decoration: none;
}
.mobile-menu li a[aria-current="page"] { font-style: italic; }
.mobile-menu .small { color: var(--cocoa-soft); }
.menu-open { overflow: hidden; }

/* Floating booking button on phones */
.book-float {
  display: none; position: fixed; z-index: 40; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translate(-50%, 140%); transition: transform .4s var(--ease-out);
  box-shadow: 0 10px 30px -10px rgba(53, 36, 26, .55);
}
.book-float.is-visible { transform: translate(-50%, 0); }

@media (max-width: 900px) {
  :root { --header-h: 72px; }
  .nav-links, .site-header__right .btn, .site-header__right .icon-link { display: none; }
  .menu-toggle { display: inline-grid; }
  .site-logo { width: 124px; }
  .book-float { display: inline-flex; }
}

/* ==========================================================================
   Harness parts (straps, buckles, rings), shared by the reveal and page heads
   ========================================================================== */
.strap {
  position: absolute; width: var(--strap-w, 46px);
  background: linear-gradient(90deg, #2c1d15 0%, var(--cocoa) 22%, #3d2a1f 55%, var(--cocoa) 80%, #2c1d15 100%);
  border-radius: 0 0 14px 14px;
}
.strap::before {                     /* stitching */
  content: ""; position: absolute; inset: 0 7px 10px;
  border-left: 1.5px dashed var(--latte-light); border-right: 1.5px dashed var(--latte-light);
  opacity: .7;
}
.strap::after {                      /* rivet */
  content: ""; position: absolute; left: 50%; bottom: 13px; width: 9px; height: 9px; margin-left: -4.5px;
  border-radius: 50%; background: var(--latte);
}
.strap__buckle {
  position: absolute; left: 50%; width: calc(var(--strap-w, 46px) * 1.85); height: calc(var(--strap-w, 46px) * 1.38);
  transform: translateX(-50%);
  border: 6px solid var(--latte); border-radius: 9px;
}
.strap__buckle::before {             /* centre bar */
  content: ""; position: absolute; top: -2px; bottom: -2px; left: 50%; width: 6px; margin-left: -3px; background: var(--latte);
}
.strap__keeper {
  position: absolute; left: -5px; right: -5px; height: 14px; border-radius: 4px;
  background: #2a1b13; border: 1.5px solid #5a4335;
}
.ring {
  position: absolute; width: var(--ring, 64px); height: var(--ring, 64px);
  border: 7px solid var(--latte); border-radius: 50%;
  border-top-color: transparent; transform: rotate(0deg);
}

/* ==========================================================================
   Home · the trove reveal
   ========================================================================== */
.reveal { position: relative; background: var(--blush); }
.js .reveal { height: 520vh; }
.reveal__stage {
  position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden;
  contain: layout paint style;
  --w: min(540px, 90vw, calc((52svh - 100px) * 1.8));
  --g: calc(var(--w) * .55);            /* goods area above the tray */
  --t: calc(var(--w) * .175);           /* tray height */
  --ring-y: max(calc(var(--header-h) + var(--g) + 18px), 53svh);
  --strap-w: clamp(30px, calc(var(--w) * .085), 46px);
  --ring: calc(var(--strap-w) * 1.4);
}
.js .reveal__stage { position: sticky; top: 0; }

/* Composition: a rig whose width sets everything else */
.rig {
  position: absolute; left: 50%; top: 0; width: var(--w); height: 100%;
  transform: translateX(-50%);
}
.rig .strap { bottom: calc(100% - var(--ring-y) + var(--ring) * .62); top: -20px; }
.rig .strap--l { left: calc(6% - var(--strap-w) / 2); }
.rig .strap--r { right: calc(6% - var(--strap-w) / 2); }
.rig .strap__buckle { top: 34%; }
.rig .strap__keeper { top: calc(34% + var(--strap-w) * 1.65); }
.rig .ring { top: calc(var(--ring-y) - var(--ring) * .62); }
.rig .ring--l { left: calc(6% - var(--ring) / 2); }
.rig .ring--r { right: calc(6% - var(--ring) / 2); }

.rig__dots {                          /* the dotted line where the tray will hang */
  position: absolute; left: 6%; right: 6%; top: calc(var(--ring-y) + var(--ring) * .18);
  border-top: 3px dotted var(--latte);
}

/* The tray and everything on it, rising up to clip onto the rings.
   Scroll-linked motion is written straight to transform/opacity by main.js,
   so each frame only touches the few elements that move (no style recalc
   of the whole scene) and the GPU can composite it without repainting. */
.load {
  position: absolute; left: 0; right: 0; top: calc(var(--ring-y) - var(--g));
  height: calc(var(--g) + var(--t));
  transform: translateY(calc(100svh - var(--ring-y) + var(--g) + 40px));
  will-change: transform;
}
.goods { position: absolute; left: 7%; right: 7%; bottom: calc(var(--t) * .7); aspect-ratio: 400 / 220; }
.treat {
  position: absolute; inset: 0; width: 100%; height: 100%;
  visibility: hidden; transform-origin: 50% 100%; will-change: transform;
  transform: translate3d(0,9%,0) scale(.9);   /* sits low under the closed lid */
}
.reveal__stage[data-treat="0"] .treat--0,
.reveal__stage[data-treat="1"] .treat--1,
.reveal__stage[data-treat="2"] .treat--2,
.reveal__stage[data-treat="3"] .treat--3 { visibility: visible; }

.tray { position: absolute; left: 0; right: 0; bottom: 0; height: var(--t); }
.tray svg { width: 100%; height: 100%; }

/* The lid: a little trove that lifts away */
.lid {
  position: absolute; left: 4%; right: 4%; bottom: calc(var(--t) * .66); aspect-ratio: 400 / 250;
  transform-origin: 20% 100%;
  will-change: transform, opacity;
}
.lid svg { width: 100%; height: 100%; overflow: visible; }
.lid__logo { position: absolute; left: 50%; top: 50%; width: 40%; min-width: 120px; height: auto; transform: translate(-50%, -50%); }

/* Confetti that pops when the lid opens */
.confetti { position: absolute; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; }
.confetti i {
  position: absolute; width: 14px; height: 4px; border-radius: 2px; background: var(--c, var(--lemon));
  opacity: 0;                         /* popped by main.js with the Web Animations API */
}
.confetti i.star { width: 12px; height: 12px; border-radius: 0; background: none; }
.confetti i.star::before {
  content: ""; position: absolute; inset: 0; background: var(--c, var(--cocoa));
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* Intro copy, sitting under the rings like the coming-soon poster */
.reveal__intro {
  position: absolute; left: 0; right: 0;
  top: calc(var(--ring-y) + 28px);
  text-align: center; padding-inline: var(--gutter);
  will-change: transform, opacity;
}
.reveal__intro.is-gone { visibility: hidden; }
.reveal__intro h1 { margin-bottom: .25em; }
.reveal__intro .lede { margin-inline: auto; margin-bottom: 1.6rem; color: var(--cocoa-soft); }

/* Quick booking bar */
.quick-book {
  display: inline-flex; align-items: stretch; gap: 0; text-align: left;
  background: var(--milk); border-radius: 999px; padding: 6px;
  box-shadow: 0 18px 40px -24px rgba(53, 36, 26, .5);
  max-width: 100%;
}
.quick-book__field { display: flex; flex-direction: column; justify-content: center; padding: .25rem 1.1rem; min-width: 0; }
.quick-book__field + .quick-book__field { border-left: 1px solid var(--line); }
.quick-book__field label { font-size: .75rem; font-weight: 500; color: var(--cocoa-soft); line-height: 1.2; }
.quick-book__field input, .quick-book__field select {
  border: 0; background: transparent; padding: .1rem 0; font-size: 1rem; min-width: 0; outline: none;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.quick-book__field select { padding-right: 1.1rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2335241A' stroke-width='1.5'/%3E%3C/svg%3E") right center no-repeat; }
.quick-book__field:focus-within { background: var(--paper); border-radius: 999px; }
.quick-book .btn { margin-left: .4rem; white-space: nowrap; }

@media (max-width: 720px) {
  .quick-book { border-radius: 22px; flex-wrap: wrap; justify-content: stretch; }
  .quick-book__field { flex: 1 1 40%; padding: .45rem .9rem; }
  .quick-book__field--treat { display: none; }
  .quick-book .btn { flex: 1 1 100%; margin: 6px 0 0; }
}

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  font-size: var(--step-small); color: var(--cocoa-soft); display: flex; align-items: center; gap: .6rem;
  pointer-events: none; transition: opacity .3s;
}
.reveal__stage.is-scrolled .scroll-cue { opacity: 0; }
.scroll-cue span { width: 1.5px; height: 26px; background: var(--cocoa-soft); transform-origin: top; animation: cue 1.8s var(--ease-out) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (max-height: 760px), (max-width: 720px) { .scroll-cue { display: none; } }

/* Caption under the tray: which treat is showing */
.reveal__caption {
  position: absolute; left: 0; right: 0; top: calc(var(--ring-y) + var(--t) + 26px);
  text-align: center; padding-inline: var(--gutter);
  opacity: 0;
}
.caption { position: absolute; left: 0; right: 0; opacity: 0; padding-inline: var(--gutter); }
.caption h2 { font-size: var(--step-sub); margin-bottom: .2em; }
.caption p { font-size: 1rem; color: var(--cocoa-soft); margin: 0 auto .6rem; max-width: 30em; }
.caption .text-link { font-size: .9375rem; }
.reveal__caption, .treat-dots { pointer-events: none; }
.reveal__stage.is-open .caption[aria-hidden="false"], .reveal__stage.is-rigged .treat-dots { pointer-events: auto; }
.caption[aria-hidden="true"] a { pointer-events: none; }

.treat-dots {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: .9rem; list-style: none; margin: 0; padding: 0;
  opacity: 0; transition: opacity .35s;
}
.reveal__stage.is-rigged .treat-dots { opacity: 1; }
.treat-dots button {
  width: 14px; height: 14px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1.5px solid var(--cocoa); background: transparent; transition: transform .3s var(--ease-out), background-color .2s;
}
.treat-dots button[aria-current="true"] { background: var(--cocoa); transform: scale(1.25); }
@media (max-width: 720px) {
  .treat-dots { top: auto; bottom: 88px; right: 50%; transform: translateX(50%); flex-direction: row; }
}

/* Phones: lift the rings so the intro and booking bar fit on the first screen */
@media (max-width: 720px) {
  .reveal__stage { --ring-y: max(calc(var(--header-h) + var(--g) + 18px), 45svh); }
  .reveal__intro { top: calc(var(--ring-y) + 14px); }
  .reveal__intro .lede { font-size: 1rem; line-height: 1.5; margin-bottom: 1.1rem; }
}

/* Short phones: tighten the reveal */
@media (max-height: 700px) and (max-width: 720px) {
  .reveal__intro .lede { display: none; }
}

/* Reduced motion / no JS: the poster state only; treats are listed below */
.rm .reveal { height: auto; }
.rm .reveal__stage { position: relative; }
.rm .load, .rm .reveal__caption, .rm .treat-dots { display: none; }
.rm .scroll-cue span { animation: none; transform: none; }

/* ==========================================================================
   Steps
   ========================================================================== */
.section-head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { counter-increment: step; position: relative; padding-top: 1.25rem; border-top: 1.5px solid var(--cocoa); }
.step::before {
  content: counter(step, decimal-leading-zero); font-family: var(--serif); font-size: 1.25rem; font-style: italic; color: var(--latte);
  position: absolute; top: 1rem; right: 0;
}
.step svg { width: 64px; height: 64px; margin-bottom: 1.25rem; }
.step h3 { font-size: 1.75rem; margin-bottom: .3em; }
.step p { color: var(--cocoa-soft); margin: 0; font-size: 1.0625rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* ==========================================================================
   Treat cards (home) and product rows (treats page)
   ========================================================================== */
.photo {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 1 / 1; background: var(--paper);
}
.photo > svg { position: absolute; inset: auto 6% 18% 6%; width: 88%; height: auto; }
.photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo--blush { background: var(--blush); }
.photo--pistachio { background: var(--pistachio); }
.photo--lemon { background: var(--lemon); }
.photo--paper { background: var(--paper); }
.photo--milk { background: var(--milk); box-shadow: inset 0 0 0 1px var(--line); }
.photo__tray {                         /* the cocoa tray under each stand-in illustration */
  position: absolute; left: 4%; right: 4%; bottom: 10%; height: 9%;
  background: var(--cocoa); border-radius: 4px 4px 10px 10px;
  box-shadow: inset 0 3px 0 var(--latte);
}
.photo > img ~ .photo__tray, .photo > img ~ svg { display: none; }

.treat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 1.75rem); }
.treat-card { text-decoration: none; display: block; }
.treat-card .photo { transition: transform .5s var(--ease-out); }
.treat-card:hover .photo { transform: translateY(-6px) rotate(-.6deg); }
.treat-card h3 { font-size: 1.75rem; margin: 1rem 0 .2rem; }
.treat-card p { font-size: 1rem; color: var(--cocoa-soft); margin: 0; }
@media (max-width: 1000px) { .treat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .treat-grid { grid-template-columns: 1fr 1fr; gap: .9rem; } .treat-card h3 { font-size: 1.35rem; } .treat-card p { display: none; } }

.section-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: clamp(2rem, 4vw, 3rem); }
.section-foot p { margin: 0; color: var(--cocoa-soft); }

.product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.product + .product { margin-top: clamp(4rem, 9vw, 7.5rem); }
.product:nth-child(even) .product__media { order: 2; }
.product__media { max-width: 520px; width: 100%; justify-self: center; }
.product__body { max-width: 30rem; }
.product__body h2 { font-size: var(--step-heading); margin-bottom: .15em; }
.product__tagline { color: var(--cocoa-soft); margin: 0 0 1.1rem; font-style: normal; }
.product__tagline em { font-style: italic; }
.product__body .lede { margin-bottom: 1.75rem; }
.product__meta { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1.5rem; margin: 0 0 2rem; font-size: 1rem; }
.product__meta dt { font-weight: 500; }
.product__meta dd { margin: 0; color: var(--cocoa-soft); }
@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; }
  .product:nth-child(even) .product__media { order: 0; }
}

/* ==========================================================================
   Van section
   ========================================================================== */
.van-section { overflow: hidden; overflow: clip; }   /* clip, not hidden: hidden would make this a scroll container and freeze the van's scroll timeline */
.van-section .section-head { margin-bottom: 1rem; }
.van-stage { position: relative; margin-top: clamp(1rem, 3vw, 2rem); }
/* The van is split into layers so the drive-in is pure GPU compositing:
   the whole van slides (transform), the body bobs (CSS animation), the
   wheels spin and the shutter rolls up as separate layers. Nothing inside
   the SVG changes per frame, so it is painted once. */
.van {
  position: relative; width: min(820px, 100%); margin-inline: auto;
  will-change: transform;
}
.van__body { position: relative; will-change: transform; }
.van__body > svg { display: block; width: 100%; height: auto; }
.van.is-driving .van__body { animation: bob .45s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-2px); } }
.van__shutter {
  position: absolute; left: 5%; top: 24.889%; width: 37.037%; height: 32.444%;
  background: linear-gradient(#4A3226 84%, #6B4A35 84%) 0 0 / 100% 16.44%;
  transform-origin: 50% 0; transform: scaleY(.08); will-change: transform;
}
.van__puff {
  position: absolute; left: -8.3%; top: 69.3%; width: 8.7%; height: auto;
  opacity: 0; transition: opacity .4s;
}
.van.is-driving .van__puff { opacity: .9; }
.van__wheel {
  position: absolute; top: 67.556%; width: 11.481%; height: auto; will-change: transform;
}
.van__wheel--back { left: 15.741%; }
.van__wheel--front { left: 75.741%; }
.van__shadow {
  position: absolute; left: 2%; right: 2%; bottom: -1.5%; height: 6%;
  background: radial-gradient(closest-side, rgba(53, 36, 26, .14), rgba(53, 36, 26, 0));
}
.road { height: 26px; margin-top: -8px; position: relative; overflow: hidden; }
.road__line {
  position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 480px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='26'%3E%3Cpath d='M0 13 Q60 1 120 13 T240 13' fill='none' stroke='%2335241A' stroke-width='2.5' stroke-dasharray='1 9' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  will-change: transform;
}

.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); margin-top: clamp(3rem, 6vw, 4.5rem); }
.way h3 { font-size: 1.6rem; margin-bottom: .25em; }
.way p { font-size: 1rem; color: var(--cocoa-soft); margin: 0; }
.way svg { width: 72px; height: 56px; margin-bottom: 1rem; }
@media (max-width: 820px) { .ways { grid-template-columns: 1fr; } }

/* ==========================================================================
   Page heads (inner pages)
   ========================================================================== */
.page-head {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + clamp(4rem, 10vw, 7.5rem)) 0 clamp(3.5rem, 7vw, 5.5rem);
}
.page-head .wrap { position: relative; }
.page-head h1 { font-size: var(--step-display); max-width: 12em; }
.page-head .lede { font-size: 1.25rem; }
.page-head__straps { position: absolute; top: 0; right: clamp(1.5rem, 10vw, 9rem); width: 220px; height: 100%; pointer-events: none; }
.page-head__straps .strap { --strap-w: 34px; top: 0; height: 58%; }
.page-head__straps .strap--l { left: 0; }
.page-head__straps .strap--r { right: 0; }
.page-head__straps .strap__buckle { top: 38%; }
.page-head__straps .ring { --ring: 48px; top: calc(58% - 22px); }
.page-head__straps .ring--l { left: -7px; }
.page-head__straps .ring--r { right: -7px; }
.page-head__straps .dotline { position: absolute; left: 10px; right: 10px; top: calc(58% + 10px); border-top: 3px dotted var(--latte); }
@media (max-width: 820px) { .page-head__straps { opacity: .35; right: -60px; } }

/* About */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.story p { max-width: 34em; }
@media (max-width: 820px) { .story { grid-template-columns: 1fr; } }
.traits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.trait { border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.25rem); min-height: 9.5rem; }
.trait h3 { font-size: 2rem; margin-bottom: .2em; }
.trait p { margin: 0; font-size: 1rem; }
.trait--blush { background: var(--blush); }
.trait--cocoa { background: var(--cocoa); color: var(--milk); }
.trait--pistachio { background: var(--pistachio); }
.trait--lemon { background: var(--lemon); }
@media (max-width: 520px) { .traits { grid-template-columns: 1fr; } }

.occasions { display: flex; flex-wrap: wrap; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.occasions li {
  font-family: var(--serif); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); line-height: 1.1;
  padding: .55rem 1.25rem .65rem; border: 1.5px solid var(--cocoa); border-radius: 999px;
}
.occasions li:nth-child(3n+2) { font-style: italic; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.contact-card { border-radius: var(--radius-lg); padding: clamp(1.75rem, 3vw, 2.5rem); }
.contact-card h2 { font-size: 2rem; }
.contact-list { list-style: none; margin: 0 0 1.75rem; padding: 0; }
.contact-list li { padding: .9rem 0; border-bottom: 1px solid rgba(53, 36, 26, .14); }
.contact-list li:first-child { border-top: 1px solid rgba(53, 36, 26, .14); }
.contact-list span { display: block; font-size: var(--step-small); color: var(--cocoa-soft); }
.contact-list a { font-size: 1.1875rem; font-weight: 500; text-decoration: none; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Booking form (modal and contact page)
   ========================================================================== */
.book-dialog {
  width: min(680px, calc(100vw - 24px)); max-height: calc(100svh - 24px);
  padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--milk); color: var(--cocoa);
  box-shadow: 0 40px 80px -30px rgba(53, 36, 26, .6);
  overflow: auto;
}
.book-dialog::backdrop { background: rgba(53, 36, 26, .55); backdrop-filter: blur(2px); }
.book-dialog[open] { animation: pop .45s var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.book-dialog__head { position: relative; background: var(--blush); padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 1.5rem; }
.book-dialog__head h2 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem); margin: 0 0 .25rem; }
.book-dialog__head p { margin: 0; color: var(--cocoa-soft); font-size: 1rem; }
.book-dialog__close {
  position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: var(--milk); cursor: pointer; display: grid; place-items: center;
}
.book-dialog__close svg { width: 16px; height: 16px; }
.book-dialog__body { padding: 1.75rem clamp(1.25rem, 4vw, 2.5rem) 2rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field > label, .fieldset legend { font-size: var(--step-label); font-weight: 500; }
.field .hint { font-size: var(--step-small); color: var(--cocoa-soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: .7rem .95rem; border: 1.5px solid #D9CEC3; border-radius: 12px;
  background: var(--milk); font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field select { -webkit-appearance: none; appearance: none; padding-right: 2.4rem; background: var(--milk) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2335241A' stroke-width='1.5'/%3E%3C/svg%3E") right .95rem center no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cocoa); box-shadow: 0 0 0 3px var(--blush); }
.field [aria-invalid="true"] { border-color: #A23B3B; }
.field .error { font-size: var(--step-small); color: #A23B3B; min-height: 0; }
.fieldset { border: 0; padding: 0; margin: 0; grid-column: 1 / -1; }
.fieldset legend { padding: 0; margin-bottom: .55rem; }
.fieldset legend .hint { font-weight: 400; margin-left: .25rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .5rem 1rem;
  border: 1.5px solid #D9CEC3; border-radius: 999px; font-size: .9375rem; transition: background-color .2s, border-color .2s;
}
.chip span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--latte)); }
.chip input:checked + span { background: var(--cocoa); border-color: var(--cocoa); color: var(--milk); }
.chip input:focus-visible + span { outline: 2px solid var(--cocoa); outline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.5rem; }
.form-actions .small { color: var(--cocoa-soft); margin: 0; flex: 1 1 14rem; }
.form-status { margin-top: 1rem; padding: 1rem 1.15rem; border-radius: 12px; font-size: 1rem; display: none; }
.form-status.is-shown { display: block; }
.form-status--ok { background: var(--pistachio); }
.form-status--info { background: var(--lemon); }
.form-status--err { background: var(--blush); }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--cocoa); color: var(--milk); padding: clamp(4.5rem, 9vw, 7rem) 0 2rem; position: relative; overflow: hidden; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-cta { display: grid; grid-template-columns: 1fr; gap: 2rem; justify-items: start; position: relative; z-index: 1; padding-bottom: clamp(3rem, 6vw, 4.5rem); border-bottom: 1px solid rgba(255, 255, 255, .16); }
.footer-cta h2 { font-size: var(--step-display); margin: 0; max-width: 9.5em; }
.footer-cta h2 em { color: var(--blush); }
.footer-cta .btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 2rem; padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.footer-grid h3 { font-family: var(--sans); font-size: var(--step-label); font-weight: 500; color: var(--milk-soft); margin-bottom: .9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li + li { margin-top: .45rem; }
.footer-logo { width: 150px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: clamp(3rem, 6vw, 4.5rem); font-size: var(--step-small); color: var(--milk-soft); }
.footer-doodles { position: absolute; right: max(var(--gutter), calc((100vw - var(--max)) / 2)); top: 56px; width: min(380px, 34vw); pointer-events: none; }
@media (max-width: 900px) {
  .footer-cta, .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-doodles { display: none; }
  .site-footer { padding-bottom: 6.5rem; }
}
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* 404 */
.not-found { min-height: 100svh; display: grid; place-items: center; text-align: center; background: var(--blush); padding: calc(var(--header-h) + 2rem) var(--gutter) 3rem; }
.not-found .lede { margin-inline: auto; }

/* ==========================================================================
   Scroll-driven animations (graphics thread)
   Where the browser supports CSS scroll timelines (Chrome/Edge 115+,
   Safari 26+), the reveal and the van are animated by the browser's
   compositor, in lockstep with the finger on phones. main.js detects the
   same support and stops writing those styles itself; older browsers keep
   the script-driven version.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .js .reveal { view-timeline: --tt-reveal block; }
    .js .reveal__stage .reveal__intro,
    .js .reveal__stage .scroll-cue,
    .js .reveal__stage .rig__dots,
    .js .reveal__stage .load,
    .js .reveal__stage .reveal__caption {
      animation-timeline: --tt-reveal;
      animation-range: contain 0% contain 100%;
      animation-fill-mode: both;
      animation-duration: auto;
      animation-timing-function: linear;
    }
    .js .reveal__stage .reveal__intro { animation-name: tt-intro, tt-intro-vis; }
    .js .reveal__stage .scroll-cue { animation-name: tt-cue; transition: none; }
    .js .reveal__stage .rig__dots { animation-name: tt-dots; }
    .js .reveal__stage .load { animation-name: tt-rise; }
    .js .reveal__stage .reveal__caption { animation-name: tt-caption-wrap; }

    .js .van-stage { view-timeline: --tt-van block; }
    .js .van-stage .van,
    .js .van-stage .van__wheel,
    .js .van-stage .road__line,
    .js .van-stage .van__shutter {
      animation-timeline: --tt-van;
      animation-range: cover 0% cover 70vh;
      animation-fill-mode: both;
      animation-duration: auto;
      animation-timing-function: linear;
    }
    .js .van-stage .van { animation-name: tt-van-drive; }
    .js .van-stage .van__wheel { animation-name: tt-van-wheel; }
    .js .van-stage .road__line { animation-name: tt-van-road; }
    .js .van-stage .van__shutter { animation-name: tt-van-shutter; }
  }
}

@keyframes tt-intro {
  0%, 1.5% { opacity: 1; transform: translate3d(0,0,0); animation-timing-function: cubic-bezier(.65,0,.35,1); }
  8.4% { opacity: 0; }
  10.5%, 100% { opacity: 0; transform: translate3d(0,-40px,0); }
}
@keyframes tt-intro-vis { 0%, 10.5% { visibility: visible; } 10.6%, 100% { visibility: hidden; } }
@keyframes tt-cue { 0%, 1.5% { opacity: 1; } 4%, 100% { opacity: 0; } }
@keyframes tt-dots { 0%, 6% { opacity: 1; } 10.5%, 100% { opacity: 0; } }
@keyframes tt-rise {
  0%, 6% { transform: translateY(calc(100svh - var(--ring-y) + var(--g) + 40px)); animation-timing-function: cubic-bezier(.33,1,.68,1); }
  21%, 100% { transform: translateY(0); }
}
@keyframes tt-caption-wrap { 0%, 9% { opacity: 0; } 21%, 100% { opacity: 1; } }


@keyframes tt-van-drive {
  from { transform: translate3d(-115%,0,0); animation-timing-function: cubic-bezier(.33,1,.68,1); }
  to { transform: translate3d(0,0,0); }
}
@keyframes tt-van-wheel {
  from { transform: rotate(-1148deg); animation-timing-function: cubic-bezier(.33,1,.68,1); }
  to { transform: rotate(0deg); }
}
@keyframes tt-van-road {
  from { transform: translate3d(0,0,0); animation-timing-function: cubic-bezier(.33,1,.68,1); }
  to { transform: translate3d(-480px,0,0); }
}
@keyframes tt-van-shutter {
  0%, 82% { transform: scaleY(1); animation-timing-function: cubic-bezier(.33,1,.68,1); }
  100% { transform: scaleY(.08); }
}

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