/* ==========================================================================
   Kinara Coffee Co. · styles
   The page's colours, fonts and sizes are set once, in :root below. The
   drawings in index.html keep their own colours; see the README before
   changing a font.
   Text colours were checked against WCAG AA (4.5:1 for text). If you change
   a colour, check the contrast again.

   1. Colours, fonts and sizes      9. Shop
   2. Fallback fonts (no jumping)  10. Reservation dialog
   3. Base                         11. Brew guide
   4. Buttons and links            12. Waitlist form
   5. Section frame                13. FAQ
   6. Header                       14. Footer
   7. Hero and countdown           15. Without JavaScript, high contrast, print
   8. Story and tasting notes      16. Reduced motion
   ========================================================================== */

/* ---------- 1. Colours, fonts and sizes ---------- */

:root {
  /* Coffee colours */
  --espresso: #1E120D;      /* main text, dark backgrounds */
  --crema: #F3E6D3;         /* page background */
  --crema-soft: #CDB9A2;    /* quieter text on dark */
  --paper: #EADBC4;         /* panels and cards */
  --milk: #FBF6EE;          /* inputs, cards and the dialog */
  --milk-bright: #FFFDF9;   /* chosen options and text fields */
  --ink-soft: #5E4838;      /* quieter text on light */
  --line: #CDB9A2;          /* thin dividers on light */
  --cherry: #B3261E;        /* coffee-cherry red: buttons, links, prices */
  --cherry-deep: #8C1C16;   /* hover and pressed */
  --monsoon: #3E5C6E;       /* monsoon blue-grey */
  --monsoon-deep: #2C4453;  /* dark blue surface (brew guide) */
  --gold: #D9B86C;          /* pale monsoon gold */
  --gold-deep: #7A5A12;     /* gold for text on light */
  --disabled-on-dark: #8A7A6A; /* the unavailable chapter button */
  --error: #A11F17;
  --error-bg: #F7DCD6;

  /* Story backgrounds, one per chapter (crema text stays above 11:1 on all) */
  --stage-picked: #1A1E14;
  --stage-monsooned: #1C2A31;
  --stage-roasted: #1E120D;
  --stage-packed: #2A1A12;
  --stage-brewed: #1E120D;

  /* Bean colours, from green to dark. story.js blends between them in OKLCH. */
  --bean-green: #8FA36B;
  --bean-gold: #D9B86C;
  --bean-cinnamon: #B07240;
  --bean-medium-dark: #6B3F22;
  --bean-dark: #3B2116;

  /* Fonts (loaded from Google Fonts in index.html). Both contain the ₹ sign. */
  --font-display: "Fraunces", "Fraunces fallback", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", "Figtree fallback", "Segoe UI", system-ui, sans-serif;

  /* Type scale, fluid between 320px and 1440px wide */
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);  /* 14 to 15px: labels, small print */
  --step-0: clamp(1.0625rem, 1.04rem + 0.12vw, 1.125rem);  /* 17 to 18px: body text */
  --step-1: clamp(1.25rem, 1.19rem + 0.3vw, 1.5rem);       /* 20 to 24px: lead text, prices */
  --step-2: clamp(1.5rem, 1.37rem + 0.65vw, 2rem);         /* 24 to 32px: h3 */
  --step-3: clamp(2rem, 1.7rem + 1.5vw, 3rem);             /* 32 to 48px: h2 */
  --step-4: clamp(2.5rem, 1.9rem + 3vw, 4.5rem);           /* 40 to 72px: story headlines */
  --step-5: clamp(2.75rem, 1.6rem + 5.6vw, 6rem);          /* 44 to 96px: hero headline */

  /* Layout */
  --header-h: 60px;
  --max: 1200px;
  --pad: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 120px);
  --radius-s: 8px;
  --radius-l: 18px;
  --focus: var(--cherry);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- 2. Fallback fonts ----------
   While the web fonts load, the browser shows these local fonts instead.
   The size-adjust and override numbers were measured from the real font
   files so the fallback takes up the same space, and the page does not
   jump when Fraunces and Figtree arrive. */

@font-face {
  font-family: "Fraunces fallback";        /* headings, about 32 to 56px */
  src: local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT"), local("Liberation Serif Bold"), local("LiberationSerif-Bold");
  font-weight: 100 900;
  size-adjust: 111%;
  ascent-override: 88.1%;
  descent-override: 23%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Fraunces fallback hero";   /* hero headline on phones, 44 to 60px */
  src: local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT"), local("Liberation Serif Bold"), local("LiberationSerif-Bold");
  font-weight: 100 900;
  size-adjust: 112%;
  ascent-override: 87.2%;
  descent-override: 22.8%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Fraunces fallback large";  /* hero headline from 1100px wide */
  src: local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT"), local("Liberation Serif Bold"), local("LiberationSerif-Bold");
  font-weight: 100 900;
  size-adjust: 97.8%;
  ascent-override: 100%;
  descent-override: 26.1%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Fraunces fallback story";  /* story headlines on phones */
  src: local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT"), local("Liberation Serif Bold"), local("LiberationSerif-Bold");
  font-weight: 100 900;
  size-adjust: 108.5%;
  ascent-override: 90.1%;
  descent-override: 23.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Fraunces fallback story mid";    /* story headlines from 860px */
  src: local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT"), local("Liberation Serif Bold"), local("LiberationSerif-Bold");
  font-weight: 100 900;
  size-adjust: 106%;
  ascent-override: 92.3%;
  descent-override: 24.1%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Fraunces fallback story large";  /* story headlines from 1100px */
  src: local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT"), local("Liberation Serif Bold"), local("LiberationSerif-Bold");
  font-weight: 100 900;
  size-adjust: 104.5%;
  ascent-override: 93.6%;
  descent-override: 24.4%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Figtree fallback";         /* body text */
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("LiberationSans");
  font-weight: 100 500;
  size-adjust: 100.7%;
  ascent-override: 94.5%;
  descent-override: 24.9%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Figtree fallback";         /* bold text */
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold");
  font-weight: 600 900;
  size-adjust: 96.2%;
  ascent-override: 98.8%;
  descent-override: 26%;
  line-gap-override: 0%;
}

/* ---------- 3. Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
/* Smooth in-page links once the page has loaded (.ready, set by the script
   at the top of index.html), so a shared link to #shop jumps straight there */
@media (prefers-reduced-motion: no-preference) {
  html.ready { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--crema);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: clip;
}

[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); font-weight: 620; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
strong, b { font-weight: 700; }

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

::selection { background: var(--gold); color: var(--espresso); }

/* Nicer line breaks: no single word left alone on the last line */
.faq-item summary, .eyebrow, .kicker, legend { text-wrap: balance; }
.hero-lede, .section-intro, .chapter-text > p, .note p, .option-note, .faq-item p { text-wrap: pretty; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--espresso); color: var(--crema);
  padding: 12px 18px; border-radius: var(--radius-s);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow, .kicker {
  margin: 0 0 1rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.noscript-note {
  margin: 1rem 0 0; padding: 10px 14px;
  background: var(--paper); color: var(--espresso);
  border-left: 4px solid var(--gold-deep); border-radius: 4px;
  font-size: var(--step--1); font-weight: 600;
}

/* ---------- 4. Buttons and links ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0.5rem 1.4rem;
  background: var(--cherry); color: var(--crema);
  border: 2px solid var(--cherry); border-radius: 999px;
  font: 700 1rem/1.2 var(--font-body);
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-out);
}
.button:hover { background: var(--cherry-deep); border-color: var(--cherry-deep); color: var(--milk); }
/* Pressing gives way a little, straight away; letting go eases it back */
.button:active:not(:disabled) { transform: scale(0.97); transition-duration: 0.08s; }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.button:disabled:hover { background: var(--cherry); border-color: var(--cherry); color: var(--crema); }
.button-small { min-height: 44px; padding: 0.4rem 1.1rem; font-size: 0.9375rem; }
.button-wide { width: 100%; }
.button-alt { background: transparent; color: var(--espresso); border-color: var(--espresso); }
.button-alt:hover { background: var(--espresso); border-color: var(--espresso); color: var(--crema); }
.button-gold { background: var(--gold); border-color: var(--gold); color: var(--espresso); }
.button-gold:hover { background: var(--crema); border-color: var(--crema); color: var(--espresso); }

.text-link {
  display: inline-flex; align-items: center; gap: 0.4em; min-height: 48px;
  font-weight: 700; text-decoration: underline;
}
.text-link:hover { color: var(--cherry); }

.link-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 4px;
  background: none; border: 0; color: var(--cherry); cursor: pointer;
  font: 700 var(--step--1)/1.2 var(--font-body);
  text-decoration: underline; text-underline-offset: 0.2em;
  transition: transform 0.2s var(--ease-out);
}
.link-button:hover { color: var(--cherry-deep); }
.link-button:active:not(:disabled) { transform: scale(0.96); transition-duration: 0.08s; }
.link-button:disabled { color: var(--ink-soft); cursor: default; text-decoration: none; }

/* ---------- 5. Section frame ---------- */

main > section, .site-footer {
  position: relative;
  padding-block: var(--section-y);
  padding-inline: max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
}

.section-head { max-width: 40rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-intro { max-width: 36em; margin: 0.9rem 0 0; font-size: var(--step-1); line-height: 1.45; color: var(--ink-soft); }

/* ---------- 6. Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  height: var(--header-h);
  padding-inline: max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
  background: var(--crema);
  border-bottom: 1px solid rgba(30, 18, 13, 0.16);
}
.wordmark {
  display: inline-flex; align-items: baseline; gap: 0.35em; min-height: 44px; align-self: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 44px;
  letter-spacing: -0.01em; color: var(--espresso); text-decoration: none;
}
.wordmark-co {
  font-family: var(--font-body); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
}
.site-nav { margin-left: auto; }
.site-nav ul, .nav-menu ul { list-style: none; margin: 0; padding: 0; }
.site-nav ul { display: flex; gap: 4px; }
.site-nav a, .nav-menu a {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 999px; font-weight: 600; text-decoration: none;
}
.site-nav a:hover, .nav-menu a:hover { background: var(--paper); }
.header-cta { flex: none; padding-block: 0; }

.nav-menu { display: none; margin-left: auto; }
.nav-menu summary {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 2px solid var(--espresso); border-radius: 999px;
  font-weight: 700; font-size: 0.9375rem; cursor: pointer; list-style: none;
}
.nav-menu summary:active { background: var(--paper); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after {
  content: ""; width: 10px; height: 10px; margin-top: -4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform 0.2s ease, margin 0.2s ease;
}
.nav-menu[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.nav-menu nav {
  position: absolute; left: 0; right: 0; top: 100%;
  padding: 8px max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad))) 16px;
  background: var(--crema); border-bottom: 1px solid rgba(30, 18, 13, 0.16);
  box-shadow: 0 18px 30px rgba(30, 18, 13, 0.12);
}
@media (prefers-reduced-motion: no-preference) {
  .nav-menu[open] nav { animation: menu-in 0.2s var(--ease-out); }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
.nav-menu a { min-height: 48px; font-size: var(--step-1); font-family: var(--font-display); font-weight: 600; }

@media (max-width: 44.9375em) {
  .site-nav { display: none; }
  .nav-menu { display: block; }
  /* While the phone menu is open, jump targets land below its panel */
  html:has(.nav-menu[open]) { scroll-padding-top: calc(var(--header-h) + 233px); }   /* the 217px menu panel + 16px */
}
@media (max-width: 23.6875em) {
  .site-header .wordmark { font-size: 1.25rem; }
  .nav-menu summary { padding-inline: 10px; gap: 6px; }
  .header-cta { padding-inline: 0.75rem; }
}
@media (max-width: 26.1875em) {
  .site-header .wordmark-co {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .site-header { gap: 8px; }
}
/* Only with a very large browser font: Shop is in the menu too */
@media (max-width: 19.9375em) {
  .header-cta { display: none; }
}

/* ---------- 7. Hero and countdown ---------- */

.hero {
  display: grid; gap: clamp(32px, 5vw, 64px); align-items: center;
  padding-top: clamp(36px, 6vw, 88px);
}
.hero .eyebrow { color: var(--cherry); }
.hero h1 {
  font-family: "Fraunces", "Fraunces fallback hero", Georgia, serif;
  font-size: var(--step-5); font-weight: 720; line-height: 0.98; letter-spacing: -0.02em;
  max-width: 5.6em;
}
/* The lede's size is tuned so its line breaks don't change when Figtree loads
   at common phone widths (360, 375, 390, 412, 414, 430). */
.hero-lede { max-width: 30em; margin: 1.4rem 0 0; font-size: clamp(1.1875rem, 1.12rem + 0.35vw, 1.5rem); line-height: 1.45; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 1.8rem 0 0; }
@media (max-width: 479px) {
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 10px; }
}
/* The eyebrow stays on one line at 320px, before and after launch */
@media (max-width: 22.4375em) {
  .hero .eyebrow { letter-spacing: 0.1em; }
}

.countdown {
  display: grid; gap: 6px; margin-top: 2rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line); max-width: 30rem;
}
.countdown-label { margin: 0; font-weight: 700; text-wrap: balance; }
.countdown-units { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.unit {
  display: inline-flex; align-items: baseline; gap: 6px;
  min-width: 5.2rem; padding: 8px 14px 6px;
  background: var(--milk); border: 1px solid var(--line); border-radius: var(--radius-s);
  font-size: var(--step--1); font-weight: 600; color: var(--ink-soft);
}
.unit b {
  font-family: var(--font-display); font-weight: 650; font-size: var(--step-2); line-height: 1;
  color: var(--espresso); font-variant-numeric: tabular-nums lining-nums;
}
.countdown-note { margin: 0; font-size: var(--step--1); color: var(--ink-soft); }
/* Without JavaScript the label already gives the date, so the note would repeat it */
.countdown-units[hidden] + .countdown-note { display: none; }
/* With JavaScript their space is kept from the first paint, so nothing moves
   when shop.js fills them in (or if it arrives late) */
.js:not(.is-launched) .countdown-units[hidden] { display: flex !important; visibility: hidden; }
.js:not(.is-launched) .countdown-units[hidden] + .countdown-note { display: block; visibility: hidden; }
/* After launch the label is styled from the first paint; until shop.js
   swaps in the words, CSS shows data-text-after, so nothing moves */
.is-launched .countdown-label { font-family: var(--font-display); font-size: var(--step-2); font-weight: 650; color: var(--cherry); }
.is-launched .countdown:not(.is-out) .countdown-label > span { display: none; }
.is-launched .countdown:not(.is-out) .countdown-label::before { content: attr(data-text-after); }

.hero-art { justify-self: center; width: min(100%, 460px); }
.hero-art svg { width: 100%; height: auto; }

@media (min-width: 960px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; }
  .hero-art { justify-self: end; width: min(100%, 520px); }
}
@media (min-width: 1100px) {
  .hero h1 { font-family: "Fraunces", "Fraunces fallback large", Georgia, serif; }
}

/* ---------- 8. Story (stacked layout) ----------
   This is how the story looks with reduced motion or without JavaScript:
   five full-width bands, one per chapter. story.js adds the class
   .is-pinned to switch to the scroll animation. */

.story {
  --focus: var(--gold);
  padding: 0;
  background: var(--stage-picked);
  color: var(--crema);
}
.story-title {
  padding: var(--section-y) max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad))) 0;
}
.chapter {
  display: grid; gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(40px, 7vw, 96px) max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
  background: var(--chapter-bg, var(--stage-picked));
}
.chapter--picked { --chapter-bg: var(--stage-picked); }
.chapter--monsooned { --chapter-bg: var(--stage-monsooned); }
.chapter--roasted { --chapter-bg: var(--stage-roasted); }
.chapter--packed { --chapter-bg: var(--stage-packed); }
.chapter--brewed { --chapter-bg: var(--stage-brewed); padding-bottom: var(--section-y); }

.chapter-text { max-width: 30rem; }
.kicker { color: var(--gold); display: flex; align-items: center; gap: 0.25em; }
.kicker::before { content: ""; width: 28px; height: 1px; margin-right: 0.6em; background: currentColor; }
.chapter h3 {
  font-family: "Fraunces", "Fraunces fallback story", Georgia, serif;
  font-size: var(--step-4); font-weight: 650; line-height: 1; letter-spacing: -0.015em;
}
.chapter-text > p:not(.kicker) {
  margin-top: 1.1rem; font-size: var(--step-1); line-height: 1.5;
}
.chapter-cta { margin-top: 1.6rem !important; }

.chapter-art svg {
  width: 100%; height: auto;
  border-radius: var(--radius-l);
}

@media (min-width: 860px) {
  .chapter { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .chapter:nth-child(even) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  .chapter:nth-child(even) .chapter-text { order: 2; }
  .chapter h3 { font-family: "Fraunces", "Fraunces fallback story mid", Georgia, serif; }
}
@media (min-width: 1100px) {
  .chapter h3 { font-family: "Fraunces", "Fraunces fallback story large", Georgia, serif; }
}

/* ---------- 8a. Story, pinned (scroll animation) ----------
   story.js adds .is-pinned when motion is allowed. The section becomes
   tall, the stage sticks to the screen, the canvas draws the pictures and
   the chapter words fade in and out on top of it. Narrow portrait screens
   (under 860px: phones and small tablets) get the picture on top and the
   words below; everything else, landscape phones included, gets words on
   the left and the picture on the right. Screens too short for the words
   keep the stacked story.
   story.js reads the same media query, so keep the two in step.
   Screens only: on paper the story prints as stacked chapters. */

@media screen {
  .story.is-pinned { height: 560vh; height: 560svh; scroll-margin-top: calc(-16px - var(--header-h)); }
  .story.is-pinned .story-title,
  .story.is-pinned .chapter-art {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .story.is-pinned .story-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
  .story-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
  .story.is-pinned .chapters { position: absolute; inset: 0; }
  .story.is-pinned .chapter {
    position: absolute; inset: 0;
    display: flex; align-items: center; align-items: safe center;
    padding: calc(var(--header-h) + 24px) max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad))) 96px;
    background: transparent;
    opacity: 0;
    will-change: opacity, transform;
  }
  .story.is-pinned .chapter--picked { opacity: 1; }
  .story.is-pinned .chapter-text { width: min(30rem, 38%); }
  /* The 03 headline on two lines, like the drawing beside it */
  .story.is-pinned [data-roast-title] { max-width: 5em; }

  /* Chapter buttons, bottom right of the stage */
  .story-nav {
    position: absolute; z-index: 2;
    right: max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
    bottom: 20px;
    display: flex; align-items: stretch; overflow: hidden;
    border: 1px solid rgba(217, 184, 108, 0.35); border-radius: 999px;
    background: rgba(30, 18, 13, 0.88); color: var(--crema);
  }
  .story-nav-info { display: flex; flex-direction: column; justify-content: center; min-width: 8.5rem; margin: 0; padding: 6px 18px; }
  .story-nav-name { color: var(--gold); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
  .story-nav-count { margin-top: 2px; color: var(--crema-soft); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
  .story-nav-btn {
    display: grid; place-items: center; width: 52px; min-height: 52px; padding: 0;
    border: 0; border-left: 1px solid rgba(217, 184, 108, 0.2);
    background: transparent; color: var(--crema); cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
  }
  .story-nav-btn svg { width: 20px; height: 20px; transition: transform 0.2s var(--ease-out); }
  [data-story-next]:active:not([aria-disabled="true"]) svg { transform: translateY(3px); transition-duration: 0.08s; }
  [data-story-prev]:active:not([aria-disabled="true"]) svg { transform: translateY(-3px); transition-duration: 0.08s; }
  @media (hover: none) { .story-nav-btn:active:not([aria-disabled="true"]) { background: rgba(217, 184, 108, 0.25); } }
  .story-nav-btn:last-of-type { border-radius: 0 999px 999px 0; }
  @media (hover: hover) { .story-nav-btn:hover:not([aria-disabled="true"]) { background: var(--gold); color: var(--espresso); } }
  .story-nav-btn[aria-disabled="true"] { color: var(--disabled-on-dark); cursor: default; }
  .story-nav-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: -5px; }

  /* Short landscape screens: smaller type so the words fit between the
     header and the chapter buttons */
  @media (max-height: 560px) and (min-aspect-ratio: 1301/1000) {
    .story.is-pinned .chapter { padding-top: calc(var(--header-h) + 12px); padding-bottom: 80px; }
    .story.is-pinned .chapter-text { width: min(30rem, 46%); }
    .story.is-pinned .chapter h3 { font-size: clamp(1.75rem, 7svh + 0.6rem, 3rem); }
    .story.is-pinned .chapter-text > p:not(.kicker) { margin-top: 0.6rem; font-size: var(--step-0); line-height: 1.45; }
    .story.is-pinned .kicker { margin-bottom: 0.5rem; }
    .story.is-pinned .chapter-cta { margin-top: 0.9rem !important; }
    .story-nav { bottom: 12px; }
  }

  @media (max-width: 859px) and (max-aspect-ratio: 13/10) {
    .story.is-pinned { height: 520vh; height: 520svh; }
    /* Words at the bottom, picture above (story.js keeps the picture clear
       of the words and fades its bottom edge). --nav-room is the measured
       height of the chapter buttons plus a gap, also set by story.js. */
    .story.is-pinned .chapter { align-items: flex-end; padding: 0 max(var(--pad), 16px) var(--nav-room, 76px); }
    .story.is-pinned .chapter-text { width: 100%; max-width: 34rem; padding-top: 40px; }
    .story.is-pinned .chapter h3 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); }
    .story.is-pinned [data-roast-title] { max-width: none; }
    .story.is-pinned .chapter-text > p:not(.kicker) { margin-top: 0.7rem; font-size: var(--step-0); line-height: 1.5; }
    .story.is-pinned .kicker { margin-bottom: 0.6rem; }
    .story.is-pinned .chapter-cta { margin-top: 1rem !important; }
    .story-nav { bottom: 14px; right: 16px; }
    .story-nav-info { min-width: 7.7rem; padding: 4px 14px; }
    .story-nav-btn { width: 46px; min-height: 48px; }
  }
}

/* ---------- 8b. Tasting notes ---------- */

.notes { background: var(--paper); }
.note-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 16px;
}
.note {
  padding: 24px; border-radius: var(--radius-l);
  background: var(--milk);
}
.note svg { width: 64px; height: 64px; margin-bottom: 18px; }
.note h3 { font-size: var(--step-2); }
.note p { margin-top: 0.5rem; color: var(--ink-soft); }

.spec-card {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px;
  margin: clamp(28px, 4vw, 44px) 0 0;
  border-top: 2px solid var(--espresso);
}
.spec-card > div { padding: 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.spec-card dt { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.spec-card dd { margin: 4px 0 0; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.2; }
.spec-card dt, .spec-card dd { overflow-wrap: break-word; }

/* The notes and the spec card rise in as they scroll into view. shop.js
   adds .reveal-ready only when motion is allowed, so without it they just show. */
.reveal-ready [data-reveal] { transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.reveal-ready [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(18px); }
.reveal-ready .note:nth-child(2) { transition-delay: 0.08s; }
.reveal-ready .note:nth-child(3) { transition-delay: 0.16s; }

@media (min-width: 760px) {
  .note-list { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto; }
  .note { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; row-gap: 0; }
  .spec-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .spec-card { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- 9. Shop ---------- */

.shop { background: var(--crema); }
.shop-grid { display: grid; gap: clamp(28px, 4vw, 48px); align-items: start; }

.configurator { display: grid; gap: clamp(26px, 3.5vw, 36px); min-width: 0; }
.choice { margin: 0; padding: 0; border: 0; min-width: 0; }
.choice legend {
  padding: 0; margin-bottom: 12px;
  font-family: var(--font-display); font-weight: 650; font-size: var(--step-1);
}
.choice-hint { margin: 10px 0 0; font-size: var(--step--1); color: var(--ink-soft); }

.options { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.option {
  position: relative;
  display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; row-gap: 2px;
  align-content: start;
  min-height: 56px; padding: 14px 16px;
  background: var(--milk);
  border: 2px solid var(--line); border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease-out);
}
.option:hover { border-color: var(--ink-soft); }
.option:active { transform: scale(0.98); border-color: var(--ink-soft); transition-duration: 0.08s; }
.option > :not(input) { grid-column: 2; }
.option input {
  grid-column: 1; grid-row: 1;
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; margin: 1px 0 0;
  background: var(--milk); border: 2px solid var(--ink-soft); border-radius: 50%;
  cursor: pointer;
  scroll-margin-block: 24px 96px;
}
.option input[type="checkbox"] { border-radius: 6px; }
.option input:checked {
  border-color: var(--cherry); background: radial-gradient(circle, var(--cherry) 0 42%, transparent 46%);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;   /* print keeps the chosen dot and tick */
}
.option input[type="checkbox"]:checked {
  background: var(--cherry) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.6 3.6 7.4-8' fill='none' stroke='%23FBF6EE' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
@supports selector(:has(*)) {
  .option:has(input:checked) { border-color: var(--cherry); box-shadow: 0 0 0 1px var(--cherry); background: var(--milk-bright); }
  .option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
  .option:has(input:focus-visible) input { outline: none; }
}
.option-name { font-weight: 700; line-height: 1.35; }
.option-price { font-family: var(--font-display); font-weight: 650; font-size: var(--step-1); line-height: 1.2; color: var(--cherry); }
.option-note { font-size: var(--step--1); line-height: 1.4; color: var(--ink-soft); }
.option-note--save { color: var(--gold-deep); font-weight: 700; }
/* Roast colour bar, the same colour as the band on the bag label */
.option-swatch { order: 3; width: 44px; height: 8px; margin-top: 8px; border-radius: 4px; align-self: end; }
.option:has(.option-swatch) { grid-template-rows: auto 1fr auto; align-content: stretch; }
.option-swatch--medium { background: var(--bean-cinnamon); }
.option-swatch--medium-dark { background: var(--bean-medium-dark); }
.option-swatch--dark { background: var(--bean-dark); }
.option--check { grid-template-columns: 22px minmax(0, 1fr) auto; }
.option--check .option-name { grid-column: 2; grid-row: 1; }
.option--check .option-price { grid-column: 3; grid-row: 1; }
.option--check .option-note { grid-column: 2 / -1; }

@media (forced-colors: active) {
  .option input { appearance: auto; -webkit-appearance: auto; background: none; }
  /* The roast bars keep their colours: shop.js copies them onto the bag's label band */
  .option-swatch { forced-color-adjust: none; }
}

@media (min-width: 520px) {
  .options--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .options--grind { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .options--grind .option:first-child { grid-column: 1 / -1; }
}
/* Narrow three-up cards (next to the summary): radio on its own row */
@media (min-width: 1024px) and (max-width: 1299px) {
  .options--3 .option { grid-template-columns: minmax(0, 1fr); }
  .options--3 .option > * { grid-column: 1; }
  .options--3 .option input { grid-row: auto; margin-bottom: 6px; }
}

.summary {
  padding: clamp(20px, 3vw, 28px);
  background: var(--milk);
  border: 2px solid var(--espresso); border-radius: var(--radius-l);
  min-width: 0;
}
.summary h3 { font-size: var(--step-2); }
.summary-bag {
  display: grid; place-items: center;
  margin: 14px 0 12px; padding: 12px 0 6px;
  background: var(--paper); border-radius: 14px;
}
.summary-bag svg { width: min(56%, 200px); height: auto; overflow: visible; }
.bag-scale {
  transform-box: view-box;
  transform-origin: 120px 302px;
  transform: scale(var(--bag-scale, 0.84));
}
/* The drawing only animates once the visitor changes something (shop.js adds .is-live) */
.summary.is-live .bag-scale { transition: transform 0.5s var(--ease-out); }
.summary.is-live .bag-band { transition: fill 0.4s ease; }
.bag-ribbon {
  transform-box: fill-box; transform-origin: 50% 0;
  opacity: 0; transform: translateY(-8px) scale(0.92);
}
.summary.is-live .bag-ribbon { transition: opacity 0.3s ease, transform 0.4s var(--ease-out); }
.summary.has-gift .bag-ribbon { opacity: 1; transform: none; }

.summary-line { margin: 0 0 14px; font-weight: 700; line-height: 1.4; }
.summary-line span { white-space: nowrap; }
.summary-prices { margin: 0; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-top: 1px solid var(--line); }
.price-row dt { color: var(--ink-soft); }
.price-row dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.price-row--saving dd { color: var(--gold-deep); }
.price-row--total { padding-top: 12px; border-top: 2px solid var(--espresso); }
.price-row--total dt { color: var(--espresso); font-weight: 700; }
.price-row--total dd [data-line="total"] { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; color: var(--espresso); }
.total-note { display: block; font-size: var(--step--1); font-weight: 600; color: var(--ink-soft); }
.summary-shipping { margin: 2px 0 18px; font-size: var(--step--1); color: var(--ink-soft); text-align: right; }
.summary-actions { display: grid; gap: 10px; justify-items: center; }
.summary-demo { margin: 12px 0 0; font-size: var(--step--1); color: var(--ink-soft); text-align: center; }

@media (min-width: 1024px) {
  .shop-grid { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); }
}
/* Only stick the summary when the whole card fits on screen (on 900-999px
   tall screens the bag preview shrinks so it does, and on 770-899px tall
   laptop screens the whole card is a little more compact) */
@media (min-width: 1024px) and (min-height: 900px) {
  .summary { position: sticky; top: calc(var(--header-h) + 20px); }
}
@media (min-width: 1024px) and (min-height: 900px) and (max-height: 999px) {
  .summary-bag { margin: 10px 0 8px; }
  .summary-bag svg { width: min(40%, 130px); }
}
@media (min-width: 1024px) and (min-height: 770px) and (max-height: 899px) {
  .summary { position: sticky; top: calc(var(--header-h) + 12px); }
  .summary h3 { font-size: var(--step-1); }
  .summary-bag { margin: 6px 0; padding: 4px 0 0; }
  .summary-bag svg { width: min(26%, 76px); }
  .summary .price-row { padding: 5px 0; }
  .summary-line { margin-bottom: 8px; }
  .summary-shipping { margin-bottom: 10px; }
}

/* ---------- 10. Reservation dialog ---------- */

.reserve-dialog {
  width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px);
  padding: clamp(22px, 4vw, 32px);
  background: var(--milk); color: var(--espresso);
  border: 2px solid var(--espresso); border-radius: var(--radius-l);
  box-shadow: 0 30px 80px rgba(30, 18, 13, 0.35);
}
.reserve-dialog::backdrop { background: rgba(30, 18, 13, 0.62); }
/* The card rises gently into place as the room dims, and leaves the same way */
@media (prefers-reduced-motion: no-preference) {
  .reserve-dialog, .reserve-dialog::backdrop { transition: opacity 0.2s ease-out, transform 0.3s var(--ease-out), overlay 0.3s allow-discrete, display 0.3s allow-discrete; }
  .reserve-dialog:not([open]), .reserve-dialog:not([open])::backdrop { transition-duration: 0.15s; transition-timing-function: cubic-bezier(0.8, 0, 0.8, 0.2); }
  .reserve-dialog:not([open]) { opacity: 0; transform: translateY(16px) scale(0.96); }
  .reserve-dialog:not([open])::backdrop { opacity: 0; }
  @starting-style {
    .reserve-dialog[open] { opacity: 0; transform: translateY(16px) scale(0.96); }
    .reserve-dialog[open]::backdrop { opacity: 0; }
  }
}
.reserve-dialog h2 { font-size: var(--step-3); outline-offset: 6px; overflow-wrap: break-word; }
.dialog-summary { margin: 1rem 0; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.3; }
.demo-note { padding: 10px 12px; background: var(--paper); border-left: 4px solid var(--ink-soft); border-radius: 4px; font-size: var(--step--1); }
.reserve-dialog form { margin: 1.2rem 0 0; }

/* ---------- 11. Brew guide ---------- */

.brew { --focus: var(--gold); background: var(--monsoon-deep); color: var(--crema); }
.brew .section-intro { color: var(--crema); }
.tab-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(20px, 3vw, 32px); }
.tab-list button {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0.4rem 1.2rem 0.4rem 0.9rem;
  background: transparent; color: var(--crema);
  border: 2px solid rgba(243, 230, 211, 0.55); border-radius: 999px;
  font: 700 1rem/1.2 var(--font-body); cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease-out);
}
.tab-list button:active { transform: scale(0.97); transition-duration: 0.08s; }
.tab-list button svg { width: 30px; height: 30px; flex: none; }
.tab-list button:hover { border-color: var(--crema); background: rgba(243, 230, 211, 0.08); }
.tab-list button[aria-selected="true"] { background: var(--crema); border-color: var(--crema); color: var(--monsoon-deep); }
@media (max-width: 519px) {
  .tab-list button { flex: 1 1 auto; justify-content: center; }
}

.brew-panel { display: grid; gap: clamp(20px, 3vw, 40px); align-items: start; }
.brew-panel.is-entering { animation: panel-in 0.2s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.brew-panel:focus-visible { outline-offset: 8px; border-radius: 4px; }
.brew-photo { margin: 0; }
.brew-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-l); background: var(--monsoon); }
.brew-title { font-size: var(--step-2); }
.steps { list-style: none; counter-reset: step; margin: 1rem 0 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; max-width: 36em; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1em;
  display: grid; place-items: center; width: 1.85rem; height: 1.85rem;
  border-radius: 50%; background: var(--gold); color: var(--espresso);
  font: 700 0.95rem/1 var(--font-display);
}
.calc {
  margin-top: 1.6rem; padding: 18px 20px;
  background: var(--monsoon); border-radius: 14px;
}
.calc-per { margin: 0; font-weight: 600; }
.calc-live { margin-top: 14px; display: grid; gap: 6px; }
.calc-live label { font-weight: 700; }
.calc-row { display: flex; align-items: center; gap: 14px; }
.calc-count { min-width: 1.5ch; font-family: var(--font-display); font-weight: 700; font-size: var(--step-2); line-height: 1; }
.calc-out { display: block; min-height: 2.4em; font-family: var(--font-display); font-weight: 650; font-size: var(--step-2); line-height: 1.2; font-variant-numeric: tabular-nums; }
.brew-note { max-width: 36em; margin-top: 1rem; font-size: var(--step--1); color: var(--crema); }

/* The cups slider: a tall hit area with a visible track and thumb */
.calc input[type="range"] {
  flex: 1; min-width: 0; height: 44px; margin: 0;
  background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.calc input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: var(--crema-soft); }
.calc input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: var(--crema-soft); }
.calc input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -10px;
  border-radius: 50%; background: var(--gold); border: 3px solid var(--espresso);
}
.calc input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 3px solid var(--espresso); }
.calc input[type="range"]:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

@media (min-width: 900px) {
  .brew-panel { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
}

/* ---------- 12. Waitlist form ---------- */

.waitlist { --focus: var(--crema); background: var(--cherry); color: var(--crema); display: grid; gap: 28px 64px; align-items: start; }
.waitlist .section-intro { color: var(--crema); }
.waitlist-head { max-width: 30rem; }
.waitlist-form, .waitlist-done {
  --focus: var(--cherry);
  overflow-wrap: anywhere;   /* a long email in the confirmation can't widen the page */
  display: grid; gap: 18px;
  padding: clamp(20px, 4vw, 32px);
  background: var(--milk); color: var(--espresso);
  border-radius: var(--radius-l);
}
.waitlist-form .button { justify-self: start; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 4px; font-weight: 700; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input {
  display: block; width: 100%; min-height: 48px; padding: 9px 12px;
  font: 400 1.0625rem/1.4 var(--font-body); color: var(--espresso);
  background: var(--milk-bright); border: 2px solid var(--ink-soft); border-radius: var(--radius-s);
}
.field input:focus-visible { outline: 3px solid var(--cherry); outline-offset: 2px; border-color: var(--espresso); }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 3px; padding: 8px 11px; }
.field-hint { margin: 6px 0 0; font-size: var(--step--1); color: var(--ink-soft); line-height: 1.35; }
.field-error { margin: 6px 0 0; font-size: 1rem; font-weight: 700; line-height: 1.35; color: var(--error); }
.form-summary {
  margin: 0; padding: 12px 14px;
  background: var(--error-bg); border: 2px solid var(--error); border-radius: var(--radius-s);
  font-weight: 700; color: var(--error);
}
.waitlist-done h3 { font-size: var(--step-3); }
.waitlist-done .button { justify-self: start; }

@media (min-width: 900px) {
  .waitlist { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
}

/* ---------- 13. FAQ ---------- */

.faq { background: var(--crema); }
.faq h2 { margin-bottom: clamp(20px, 3vw, 36px); }
.faq-list { max-width: 50rem; border-top: 2px solid var(--espresso); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 60px; padding: 14px 0;
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); line-height: 1.25;
  cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background:
    linear-gradient(var(--espresso), var(--espresso)) center / 12px 2px no-repeat,
    linear-gradient(var(--espresso), var(--espresso)) center / 2px 12px no-repeat,
    var(--paper);
  transition: transform 0.2s var(--ease-out);
}
.faq-item summary:active::after { transform: scale(0.85); transition-duration: 0.08s; }
.faq-item[open] summary::after {
  background: linear-gradient(var(--crema), var(--crema)) center / 12px 2px no-repeat, var(--cherry);
}
@media (hover: hover) { .faq-item summary:hover { color: var(--cherry); } }
.faq-item p { max-width: 34em; margin-bottom: 1rem; }
.faq-item p:last-child { padding-bottom: 1.2rem; margin-bottom: 0; }
.faq-item a { color: var(--cherry); font-weight: 700; }

/* ---------- 14. Footer ---------- */

.site-footer {
  --focus: var(--gold);
  display: grid; gap: 24px 48px;
  padding-block: clamp(48px, 7vw, 80px) 32px;
  background: var(--espresso); color: var(--crema);
  font-size: var(--step--1);
}
.site-footer p { margin: 0 0 0.5em; }
.site-footer .wordmark { min-height: 0; line-height: 1.1; font-size: 2rem; color: var(--crema); margin-bottom: 0.3em; }
.site-footer .wordmark-co { color: var(--crema-soft); }
.site-footer a { display: inline-flex; align-items: center; gap: 0.35em; min-height: 44px; }
.arrow-icon { width: 0.75em; height: 0.75em; flex: none; }
.site-footer a:hover { color: var(--gold); }
.footer-demo p:first-child { color: var(--crema-soft); max-width: 34em; }
.footer-small {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px;
  margin: 8px 0 0 !important; padding-top: 12px;
  border-top: 1px solid rgba(243, 230, 211, 0.2); color: var(--crema-soft);
}
@media (min-width: 860px) {
  .site-footer { grid-template-columns: 1fr 1fr 1.4fr; align-items: start; }
  .footer-small { grid-column: 1 / -1; }
}

/* ---------- 15. Without JavaScript ----------
   The tabs, sliders and buttons that only work with JavaScript are
   hidden, and every brew method is shown one after another. */

.no-js [data-reserve],
.no-js [data-copy-link],
.no-js .summary-demo,
.no-js .waitlist-form [type="submit"] { display: none; }

/* The brew tabs only appear once shop.js has set them up (it adds
   .tabs-ready to <html>). Until then, and if the script fails, all
   three methods are shown one after another. */
html:not(.tabs-ready) [data-tablist] { display: none; }
html:not(.tabs-ready) .brew-panel + .brew-panel { margin-top: clamp(40px, 6vw, 64px); padding-top: clamp(40px, 6vw, 64px); border-top: 1px solid rgba(243, 230, 211, 0.25); }

/* On touch screens the brief tap flash is a soft cherry, not the browser's blue */
.button, .link-button, .option, .tab-list button, .story-nav-btn, .faq-item summary, .nav-menu summary { -webkit-tap-highlight-color: rgba(140, 28, 22, 0.12); }

/* ---------- High-contrast (forced colours) mode ---------- */
@media (forced-colors: active) {
  .tab-list button[aria-selected="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .faq-item summary::after {
    forced-color-adjust: none; border: 2px solid CanvasText;
    background: linear-gradient(CanvasText, CanvasText) center / 12px 2px no-repeat, linear-gradient(CanvasText, CanvasText) center / 2px 12px no-repeat, Canvas;
  }
  .faq-item[open] summary::after { background: linear-gradient(CanvasText, CanvasText) center / 12px 2px no-repeat, Canvas; }
  .calc input[type="range"]::-webkit-slider-runnable-track { border: 1px solid CanvasText; }
  .calc input[type="range"]::-moz-range-track { border: 1px solid CanvasText; }
  .story-nav-btn[aria-disabled="true"] { color: GrayText; }
}

/* With "Increase contrast" on: firmer outlines and quieter text a step darker */
@media (prefers-contrast: more) {
  :root { --line: #8A7360; --ink-soft: #3F2E22; }
  .site-header { border-bottom: 1px solid var(--espresso); }
  .story-nav { background: var(--espresso); border-color: var(--gold); }
  .reserve-dialog::backdrop { background: rgba(30, 18, 13, 0.8); }
}
/* With "Reduce transparency" on: solid surfaces instead of see-through ones */
@media (prefers-reduced-transparency: reduce) {
  .story-nav { background: var(--espresso); }
  .reserve-dialog::backdrop { background: rgba(30, 18, 13, 0.8); }
}

/* ---------- Print ----------
   Everything shows on paper, in dark text on white: the story as stacked
   chapters with their drawings, the tasting notes that haven't scrolled in
   yet, all three brew methods (not just the open tab, and without the
   slider), the FAQ answers and the whole bag summary. */
@media print {
  .site-header { position: static; }
  .hero { display: block; }
  .hero-art { margin-top: 32px; }
  .story-canvas, .story-nav, .calc-live { display: none !important; }
  .chapter { opacity: 1 !important; transform: none !important; }
  .reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .brew-panel[hidden] { display: grid !important; }
  [data-tablist] { display: none !important; }
  .summary { break-inside: avoid; }
  .faq-item::details-content { content-visibility: visible; display: block; }
  .faq-item summary::after { display: none; }
  .story *, .brew *, .waitlist-head *, .site-footer *, .button { color: var(--espresso) !important; }
  /* and no dark backgrounds, even with "Background graphics" ticked */
  .story, .chapter, .brew, .calc, .waitlist, .site-footer, .button { background: none !important; }
}

/* ---------- 16. Reduced motion ---------- */

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