/* ============================================================
   EMBER ROASTERY — shared stylesheet (all pages)
   ------------------------------------------------------------
   Palette   : cream paper, espresso brown, burnt-orange ember
   Type      : rounded system stack + Georgia for serif moments
   Radius    : 8px family (8 / 16 / 24, pills for buttons)
   Texture   : paper grain via an inline SVG noise overlay
   Sections  :
     1. Tokens & reset          6. Home hero + steam cup
     2. Base type & texture     7. Coffee cards + roast gauge
     3. Buttons, chips, links   8. Craft strip + CTA banner
     4. Header & nav            9. Shop (filters, cart bar)
     5. Page hero / sections   10. Brew (tabs, timer, steps)
                               11. Story (timeline, stats)
                               12. Reveal + responsive
   ============================================================ */

/* ---------- 1. Tokens & reset ---------- */
:root {
  --cream:       #f6efe1;   /* page background            */
  --paper:       #fbf6ea;   /* cards, raised surfaces     */
  --cream-2:     #ece0c8;   /* recessed cream             */
  --ink:         #2a1a10;   /* near-black espresso text   */
  --coffee:      #4a3120;   /* secondary text             */
  --muted:       #8a7059;   /* tertiary text              */
  --ember:       #d96a2b;   /* burnt-orange accent        */
  --ember-deep:  #b04e17;   /* accent, pressed / on cream */
  --gold:        #dfa653;   /* warm highlight             */
  --dark:        #241509;   /* dark band background       */
  --dark-2:      #33200f;   /* dark band raised surface   */
  --line:        rgba(42, 26, 16, 0.12);
  --line-strong: rgba(42, 26, 16, 0.28);

  --r:    8px;
  --r-lg: 16px;
  --r-xl: 24px;

  --font-round: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui,
                -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;

  --header-h: 68px;
  --shadow-card: 0 24px 44px -26px rgba(42, 26, 16, 0.38);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-round);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ---------- 2. Base type & paper texture ---------- */

/* Paper grain: tiny inline-SVG fractal noise, tiled over everything.
   pointer-events:none keeps it purely decorative. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.015em; font-weight: 800; }

h1 em, h2 em, .display em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ember-deep);
}

.display { font-size: clamp(2.6rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h3 { font-size: 1.15rem; }

p { color: var(--coffee); }

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ember-deep);
  margin-bottom: 14px;
}
.eyebrow-light { color: var(--gold); }

::selection { background: var(--ember); color: #fff6ea; }

:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px; left: 16px;
  z-index: 200;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 18px;
  border-radius: 0 0 var(--r) var(--r);
  text-decoration: none;
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-link:focus-visible { top: 0; }

.wrap {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 32px);
}

.section { padding-block: clamp(48px, 8vw, 88px); }

.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-sub { margin-top: 12px; font-size: 1.05rem; }

.center { text-align: center; }

/* ---------- 3. Buttons, chips, links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font: 700 0.98rem/1.1 var(--font-round);
  border: 0;
  cursor: pointer;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background-color 0.18s ease, color 0.18s ease;
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: var(--ember);
  color: #fff6ea;
  box-shadow: 0 10px 22px -10px rgba(217, 106, 43, 0.65);
}
.btn-primary:hover { background: var(--ember-deep); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line-strong);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); transform: translateY(-2px); }

.btn-lg { padding: 1.05em 2em; font-size: 1.05rem; }
.btn-sm { padding: 0.65em 1.2em; font-size: 0.9rem; }

.btn.added { background: #47774f; box-shadow: 0 10px 22px -10px rgba(71, 119, 79, 0.6); }

.link-btn {
  background: none;
  border: 0;
  cursor: pointer;
  font: 700 0.92rem var(--font-round);
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  padding: 0.4em 0.2em;
}
.link-btn:hover { color: var(--ember); }

.chip-btn {
  border: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--coffee);
  font: 700 0.88rem var(--font-round);
  padding: 0.55em 1.15em;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip-btn:hover { border-color: var(--ink); color: var(--ink); }
.chip-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

/* ---------- 4. Header & nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 239, 225, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -18px rgba(42, 26, 16, 0.3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.brand em {
  font-style: normal;
  font-weight: 500;
  color: var(--ember-deep);
}
.brand-mark { width: 30px; height: 30px; flex: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--coffee);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); border-bottom-color: var(--ember); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.cart-link:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.cart-link svg { width: 20px; height: 20px; }

.cart-count {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ember);
  color: #fff6ea;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px -2px rgba(217, 106, 43, 0.8);
}

/* Hamburger (mobile only) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. Page hero (shop / brew / story) ---------- */
.page-hero { padding: clamp(48px, 8vw, 84px) 0 clamp(8px, 2vw, 16px); }
.page-hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.7rem); max-width: 15ch; }
.page-sub { margin-top: 16px; max-width: 56ch; font-size: 1.08rem; }

/* ---------- 6. Home hero + steam cup ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding-block: clamp(40px, 7vw, 84px);
}
.hero-sub {
  margin-top: 20px;
  font-size: 1.12rem;
  max-width: 46ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  margin-top: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-ticks li::before { content: "\25C6\00a0"; color: var(--gold); font-size: 0.7em; }

.hero-art { position: relative; }

.cup-scene {
  position: relative;
  max-width: 430px;
  margin-inline: auto;
}
.cup-glow {
  position: absolute;
  inset: -6% -10%;
  border-radius: 50%;
  background:
    radial-gradient(closest-side at 50% 62%, rgba(217, 106, 43, 0.22), transparent 72%),
    radial-gradient(closest-side at 50% 55%, rgba(251, 246, 234, 0.9), transparent 78%);
  z-index: 0;
}
.cup-svg { position: relative; z-index: 1; }

/* Rising steam: three blurred wisps on independent loops */
.steam {
  position: absolute;
  left: 24%; right: 26%;
  bottom: 61%;
  height: 150px;
  z-index: 2;
  pointer-events: none;
}
.wisp {
  position: absolute;
  bottom: 0;
  width: 26px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(to top,
    rgba(255, 252, 244, 0) 0%,
    rgba(255, 252, 244, 0.9) 45%,
    rgba(255, 252, 244, 0) 100%);
  filter: blur(6px);
  opacity: 0;
  animation: steam-rise 4.4s ease-in-out infinite;
}
.wisp.w1 { left: 18%; }
.wisp.w2 { left: 46%; height: 120px; animation-delay: 1.5s; }
.wisp.w3 { left: 72%; animation-delay: 2.9s; }

@keyframes steam-rise {
  0%   { transform: translateY(14px) scaleX(1); opacity: 0; }
  22%  { opacity: 0.85; }
  60%  { opacity: 0.45; transform: translateY(-58px) translateX(-6px) scaleX(1.25); }
  100% { transform: translateY(-120px) translateX(-16px) scaleX(1.7); opacity: 0; }
}

.hero-chip {
  position: absolute;
  top: 6%;
  right: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(251, 246, 234, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--coffee);
  text-decoration: none;
  box-shadow: 0 12px 26px -14px rgba(42, 26, 16, 0.4);
  animation: chip-float 5s ease-in-out infinite;
}
.hero-chip strong { color: var(--ember-deep); }
.hero-chip:hover { color: var(--ink); border-color: var(--line-strong); }

@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* ---------- 7. Coffee cards + roast gauge ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: clamp(18px, 3vw, 28px);
}

.coffee-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.coffee-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}
.coffee-card:nth-child(2) { transition-delay: 0.06s; }
.coffee-card:nth-child(3) { transition-delay: 0.12s; }
.coffee-card:hover { transition-delay: 0s; }

.coffee-art { background: var(--cream-2); }
.coffee-art svg { width: 100%; height: auto; transition: transform 0.4s ease; }
.coffee-card:hover .coffee-art svg { transform: rotate(-2deg) scale(1.05); }

.coffee-body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.coffee-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.coffee-price {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ember-deep);
  white-space: nowrap;
}
.coffee-origin {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.note-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}
.note-chips li {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.34em 0.85em;
  border-radius: 999px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  color: var(--coffee);
}

.roast-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}
.gauge { width: 58px; height: 37px; flex: none; }
.roast-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.add-btn { width: 100%; }

/* ---------- 8. Craft strip + CTA banner ---------- */
.craft { background: var(--paper); border-block: 1px solid var(--line); }

.craft-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 3vw, 30px);
}
.craft-step {
  position: relative;
  padding: 26px 22px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.craft-step:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.craft-step h3 { margin: 14px 0 8px; }
.craft-step p { font-size: 0.94rem; }
.craft-icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--ember);
  color: #fff6ea;
  box-shadow: 0 8px 18px -8px rgba(217, 106, 43, 0.7);
}
.craft-icon svg { width: 24px; height: 24px; }
.craft-num {
  position: absolute;
  top: 18px; right: 20px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--cream-2);
  -webkit-text-stroke: 1px var(--line-strong);
}

.cta-banner {
  background:
    radial-gradient(120% 160% at 85% -20%, rgba(217, 106, 43, 0.35), transparent 55%),
    var(--dark);
  color: var(--cream);
  padding-block: clamp(52px, 8vw, 92px);
}
.cta-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.cta-banner h2 { color: #fdf8ec; }
.cta-banner p { color: rgba(246, 239, 225, 0.78); }
.cta-copy p:last-child { margin-top: 14px; font-size: 1.05rem; }

.sub-form { display: flex; gap: 10px; flex-wrap: wrap; }
.sub-form input {
  flex: 1 1 220px;
  font: 600 1rem var(--font-round);
  color: var(--cream);
  background: rgba(251, 246, 234, 0.08);
  border: 1.5px solid rgba(251, 246, 234, 0.25);
  border-radius: 999px;
  padding: 0.9em 1.4em;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.sub-form input::placeholder { color: rgba(246, 239, 225, 0.45); }
.sub-form input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(251, 246, 234, 0.12);
}
.sub-note { margin-top: 14px; font-size: 0.86rem; color: rgba(246, 239, 225, 0.6); }
.sub-note.error { color: #f0a184; font-weight: 700; }

.sub-success {
  background: rgba(251, 246, 234, 0.07);
  border: 1px solid rgba(251, 246, 234, 0.18);
  border-radius: var(--r-lg);
  padding: 26px 28px;
}
.sub-success-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.sub-success .link-btn { margin-top: 14px; color: rgba(246, 239, 225, 0.7); }

/* ---------- 9. Shop: filters + cart bar ---------- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.ship-note {
  padding-bottom: clamp(48px, 7vw, 80px);
  text-align: center;
}
.ship-note p {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  padding: 10px 22px;
}

.cart-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100vw - 24px);
  background: rgba(36, 21, 9, 0.94);
  color: var(--cream);
  border: 1px solid rgba(246, 239, 225, 0.16);
  border-radius: 999px;
  padding: 10px 12px 10px 22px;
  box-shadow: 0 22px 44px -16px rgba(36, 21, 9, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: bar-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.cart-bar[hidden] { display: none; }
#cartSummary { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.cart-bar-actions { display: flex; align-items: center; gap: 8px; }
.cart-bar .link-btn { color: rgba(246, 239, 225, 0.75); }
.cart-bar .link-btn:hover { color: var(--gold); }
.cart-bar.cart-done .cart-bar-actions { display: none; }
.cart-bar.cart-done #cartSummary { color: var(--gold); }

@keyframes bar-in {
  from { transform: translateX(-50%) translateY(24px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

/* ---------- 10. Brew: tabs, timer, steps ---------- */
.brew-wrap { padding-top: clamp(24px, 3vw, 40px); }

.tabs {
  display: flex;
  gap: 6px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}
.tabs [role="tab"] {
  border: 0;
  background: transparent;
  padding: 0.72em 1.35em;
  border-radius: 999px;
  font: 700 0.95rem var(--font-round);
  color: var(--coffee);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 3px 12px -3px rgba(42, 26, 16, 0.3);
}

.brew-timer {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background:
    radial-gradient(140% 200% at 90% -40%, rgba(217, 106, 43, 0.3), transparent 55%),
    var(--dark);
  color: var(--cream);
  border-radius: var(--r-lg);
  padding: 20px 26px;
}
.timer-readout { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.timer-clock {
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #fdf8ec;
}
.timer-step { font-size: 0.95rem; font-weight: 700; color: var(--gold); }
.timer-actions { display: flex; gap: 10px; }
.brew-timer .btn-ghost {
  color: var(--cream);
  box-shadow: inset 0 0 0 2px rgba(246, 239, 225, 0.3);
}
.brew-timer .btn-ghost:hover { box-shadow: inset 0 0 0 2px rgba(246, 239, 225, 0.7); }

.brew-panel { margin-top: 26px; }

.brew-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}
.brew-stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 16px;
}
.brew-stat b {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.brew-stat span { font-weight: 700; font-size: 0.98rem; color: var(--ink); }

.brew-steps { list-style: none; display: grid; gap: 12px; }
.brew-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: var(--r-lg);
  padding: 16px 20px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.brew-step.active { border-left-color: var(--ember); background: #fffaf0; }
.brew-step.done { border-left-color: var(--gold); }
.brew-step.done .step-num { background: var(--gold); color: var(--ink); }

.step-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step-num {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cream-2);
  color: var(--coffee);
  font-weight: 800;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  transition: background-color 0.2s ease;
}
.brew-step.active .step-num { background: var(--ember); color: #fff6ea; }
.step-copy { flex: 1; }
.step-copy strong { font-size: 1.02rem; }
.step-copy p { font-size: 0.92rem; margin-top: 2px; }
.step-secs {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--muted);
  padding-top: 4px;
}

.bar {
  height: 8px;
  min-width: 64px;
  margin: 14px 0 2px 44px;
  background: var(--cream-2);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--ember));
  transition: width 0.2s linear;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 26px);
}
.rule-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rule-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.rule-card h3 { margin-bottom: 8px; color: var(--ember-deep); }
.rule-card p { font-size: 0.95rem; }

/* ---------- 11. Story: timeline, stats, values, quote ---------- */
.timeline {
  list-style: none;
  position: relative;
  max-width: 780px;
  margin-inline: auto;
  padding-block: 6px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 19px; top: 8px; bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--gold), var(--ember) 55%, var(--ink));
}
.tl-item { position: relative; padding: 0 0 34px 66px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: 0; top: 4px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ember);
  color: var(--ember-deep);
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 6px var(--cream);
}
.tl-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tl-card:hover { transform: translateX(4px); box-shadow: var(--shadow-card); }
.tl-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ember-deep);
  margin-bottom: 6px;
}
.tl-card h3 { margin-bottom: 8px; }
.tl-card p { font-size: 0.96rem; }

.stats-band {
  background:
    radial-gradient(130% 180% at 15% -30%, rgba(223, 166, 83, 0.25), transparent 55%),
    var(--dark);
  padding-block: clamp(44px, 6vw, 68px);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(246, 239, 225, 0.6);
}

.pull-quote {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.35;
  color: var(--ink);
}
.pull-quote::before {
  content: "\201C";
  display: block;
  font-size: 4.4rem;
  line-height: 0.6;
  color: var(--ember);
  margin-bottom: 18px;
}
.pull-quote cite {
  display: block;
  margin-top: 20px;
  font-family: var(--font-round);
  font-style: normal;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 26px);
}
.value-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.value-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.value-card h3 { margin: 14px 0 8px; }
.value-card p { font-size: 0.95rem; }
.value-icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--dark);
  color: var(--gold);
}
.value-icon svg { width: 24px; height: 24px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: rgba(246, 239, 225, 0.75);
  margin-top: clamp(40px, 6vw, 72px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  padding-block: clamp(44px, 6vw, 64px);
}
.footer-brand .brand { color: #fdf8ec; margin-bottom: 14px; }
.footer-brand p { color: rgba(246, 239, 225, 0.6); font-size: 0.95rem; max-width: 30ch; }
.footer-col h3 {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a {
  color: rgba(246, 239, 225, 0.75);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--gold); }
.footer-col p { color: rgba(246, 239, 225, 0.6); font-size: 0.95rem; }
.footer-col p + p { margin-top: 10px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-block: 20px;
  border-top: 1px solid rgba(246, 239, 225, 0.12);
  font-size: 0.82rem;
  color: rgba(246, 239, 225, 0.45);
}

/* ---------- 12. Reveal-on-scroll + responsive ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* Once revealed, cards go back to their snappy hover transitions
   (the .reveal rule above would otherwise override them). */
.coffee-card.in, .craft-step.in, .rule-card.in, .value-card.in {
  transition: opacity 0.7s ease, transform 0.28s ease, box-shadow 0.28s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .wisp { opacity: 0.25; }
}

@media (max-width: 960px) {
  .craft-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .cup-scene { max-width: 320px; }
  .hero-chip { top: 0; right: 4%; }
  .cta-inner { grid-template-columns: 1fr; }
  .rules-grid, .values-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-main {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    z-index: 95;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -20px rgba(42, 26, 16, 0.35);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  body.nav-open .nav-main {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0;
  }
  .nav-links a {
    display: block;
    padding: 14px clamp(18px, 4vw, 32px);
    border-bottom: 0;
    font-size: 1.05rem;
  }
  .nav-links a.active { color: var(--ember-deep); }
}

@media (max-width: 480px) {
  .craft-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cart-bar { gap: 10px; padding-left: 16px; }
  #cartSummary { font-size: 0.86rem; }
  .brew-timer { padding: 18px 20px; }
  .bar { margin-left: 0; }
  .step-head { flex-wrap: wrap; }
}
