/* ─────────────────────────────────────────────────────────────
   Brownie — design system
   Colors pulled from GroceryBuddy/Views/Components/Theme.swift
   Display font: Fraunces (closest web pairing for Sitka Heading)
   ───────────────────────────────────────────────────────────── */

:root {
  /* Surfaces */
  --bg:           #FDFAF6;
  --bg-deep:      #F5EFE6;
  --surface:      #F2E2D1;
  --card:         #FFFFFF;
  --border:       #E8DDD0;
  --border-soft:  #F0E6D9;

  /* Ink */
  --ink:          #1A0F08;
  --ink-2:        #4A2E1F;
  --muted:        #7A5C44;
  --muted-2:      #B89880;

  /* Brand */
  --brown:        #6B3A2A;   /* logo */
  --brown-mid:    #9B5340;
  --brown-light:  #C67D4B;
  --espresso:     #3B2416;
  --gold:         #D4A24C;
  --gold-soft:    #E7C27A;

  /* Accents from Theme.swift */
  --green:        #3DAA6E;
  --red:          #C73A2E;
  --blue:         #4A8FE7;
  --purple:       #7B5EA7;

  /* Motion */
  --ease:         cubic-bezier(0.22, 1, 0.36, 1);

  /* Type scale */
  --serif:        "Fraunces", "Sitka Heading", "Iowan Old Style", "Palatino", Georgia, serif;
  --sans:         "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ─── Base ──────────────────────────────────────────── */
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Subtle paper grain */
  background-image:
    radial-gradient(1200px 800px at 85% -10%, rgba(212, 162, 76, 0.10), transparent 55%),
    radial-gradient(900px 600px at -10% 30%, rgba(107, 58, 42, 0.06), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.42  0 0 0 0 0.23  0 0 0 0 0.16  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
}

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

/* ─── Layout ────────────────────────────────────────── */
.wrap      { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.wrap-sm   { max-width: 760px;  margin: 0 auto; padding: 0 28px; }

/* ─── Typography ────────────────────────────────────── */
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-variation-settings: "SOFT" 40, "WONK" 0, "opsz" 144;
  color: var(--espresso);
}
.display em {
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  color: var(--brown);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brown-mid);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 162, 76, 0.22);
}

.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--muted);
  line-height: 1.55;
  max-width: 56ch;
}

/* ─── Nav ───────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(253, 250, 246, 0.78);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom-color: var(--border-soft);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--espresso);
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(107, 58, 42, 0.15);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.nav-links { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.nav-links a { color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--espresso); }

/* ─── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  font-size: 15px; font-weight: 600;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--espresso);
  color: var(--bg);
  box-shadow: 0 10px 26px -8px rgba(59, 36, 22, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(59, 36, 22, 0.6); }
.btn-ghost {
  color: var(--espresso);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
}
.btn-ghost:hover { background: var(--card); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ─── Hero ──────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 160px 0 80px;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 60px;
  align-items: center;
}
.hero-title {
  font-size: clamp(48px, 7.5vw, 108px);
  margin-bottom: 32px;
}
.hero-title .line { display: block; }
.hero-lede {
  font-size: clamp(18px, 1.4vw, 21px);
  color: var(--muted);
  max-width: 48ch;
  margin-bottom: 40px;
  line-height: 1.55;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted-2);
  margin-top: 24px;
}
.hero-note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(61, 170, 110, 0.2); }

/* Mascot stage */
.stage {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  margin: 0 auto;
}
.stage::before {
  content: "";
  position: absolute; inset: -10%;
  background: radial-gradient(circle at 50% 55%, rgba(212, 162, 76, 0.35), transparent 60%);
  filter: blur(20px);
  z-index: 0;
}
.stage-mascot {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  object-fit: contain;
  animation: breathe 7s ease-in-out infinite;
  filter: drop-shadow(0 30px 60px rgba(59, 36, 22, 0.25));
}
@keyframes breathe {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-14px) rotate(1deg); }
}
.stage .star {
  position: absolute;
  width: 42px; height: 42px;
  color: var(--gold);
  filter: drop-shadow(0 4px 10px rgba(212, 162, 76, 0.4));
  animation: drift 6s ease-in-out infinite;
  z-index: 3;
}
.stage .star.s1 { top: 8%;  right: 12%; animation-delay: 0s;    }
.stage .star.s2 { top: 22%; right: 2%;  animation-delay: 1.5s; width: 28px; height: 28px; }
.stage .star.s3 { bottom: 18%; left: 6%; animation-delay: 3s;  width: 34px; height: 34px; }
.stage .star.s4 { top: 50%; right: -4%; animation-delay: 4.5s; width: 22px; height: 22px; }
@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 0.9; }
  50%      { transform: translateY(-16px) scale(1.08) rotate(12deg); opacity: 1; }
}

/* Scroll indicator */
.scroll-cue {
  position: absolute; bottom: 36px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted-2);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 44px;
  background: linear-gradient(to bottom, var(--muted-2), transparent);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); transform-origin: top;    opacity: 0; }
  50%  { transform: scaleY(1); transform-origin: top;    opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ─── Section rhythm ────────────────────────────────── */
section { position: relative; padding: 140px 0; }
section.alt { background: var(--bg-deep); }
section.dark {
  background: var(--espresso);
  color: var(--bg);
}
section.dark .display { color: var(--bg); }
section.dark .display em { color: var(--gold-soft); }
section.dark .lede { color: rgba(253, 250, 246, 0.72); }

.section-head { margin-bottom: 80px; max-width: 760px; }
.section-head .display {
  font-size: clamp(36px, 5vw, 68px);
  margin: 20px 0 20px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lede { margin: 0 auto; }

/* ─── Chapter grid (compact 2x2) ─────────────────────── */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.chapter-card {
  position: relative;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 20px 40px -30px rgba(59,36,22,0.25);
  display: flex; flex-direction: column; gap: 18px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.chapter-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 30px 50px -25px rgba(59,36,22,0.3);
}
.chapter-card .chapter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--brown-mid);
  display: block;
}
.chapter-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--espresso);
  margin: 0;
}
.chapter-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.chapter-card .chapter-viz {
  margin-top: auto;
  padding-top: 8px;
  display: flex; align-items: center; justify-content: center;
  min-height: 120px;
}
.chapter-card .chapter-viz img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
}
@media (max-width: 780px) {
  .chapter-grid { grid-template-columns: 1fr; gap: 14px; }
  .chapter-card { padding: 24px; }
}

/* ─── Split storytelling ─────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 80px;
  align-items: center;
  margin-bottom: 140px;
}
.split:last-child { margin-bottom: 0; }
.split.reverse .split-art { order: -1; }

.split-copy .chapter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--brown-mid);
  margin-bottom: 16px;
  display: block;
}
.split-copy h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--espresso);
  margin-bottom: 20px;
}
.split-copy p {
  font-size: 17px; color: var(--muted); line-height: 1.6;
  max-width: 46ch;
}
.split-copy .details {
  margin-top: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.split-copy .details li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px; color: var(--ink-2);
  list-style: none;
}
.split-copy .details li::before {
  content: ""; flex: 0 0 auto;
  width: 6px; height: 6px; margin-top: 9px;
  border-radius: 50%; background: var(--gold);
}

/* Art panel */
.art-panel {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: 28px;
  background: linear-gradient(155deg, var(--card), var(--bg-deep));
  border: 1px solid var(--border);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 30px 60px -30px rgba(59, 36, 22, 0.35);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.art-panel::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(212, 162, 76, 0.18), transparent 55%);
}
.art-panel img {
  position: relative; z-index: 1;
  width: 68%;
  filter: drop-shadow(0 20px 30px rgba(59, 36, 22, 0.18));
}
.art-panel.warm { background: linear-gradient(155deg, #FBF2E5, #F2DFC5); }
.art-panel.deep { background: linear-gradient(155deg, #3B2416, #2A1810); }
.art-panel.deep::before { background: radial-gradient(circle at 30% 20%, rgba(231, 194, 122, 0.25), transparent 55%); }
.art-panel .tag {
  position: absolute; top: 20px; left: 20px; z-index: 2;
  font-family: var(--sans);
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brown-mid);
  border: 1px solid var(--border);
}
.art-panel.deep .tag { background: rgba(231, 194, 122, 0.2); color: var(--gold-soft); border-color: rgba(231, 194, 122, 0.3); }

/* ─── Feature grid (compact) ─────────────────────────── */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px 28px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -24px rgba(59, 36, 22, 0.2);
  border-color: var(--gold-soft);
}
.tile-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--brown);
}
.tile h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--espresso);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.tile p { font-size: 15px; color: var(--muted); line-height: 1.55; }

/* ─── Pullquote / stat rail ─────────────────────────── */
.rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 48px 32px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--border);
}
.rail .cell {
  border-right: 1px solid var(--border-soft);
  padding-right: 20px;
}
.rail .cell:last-child { border-right: none; }
.rail .num {
  font-family: var(--serif);
  font-size: 44px; font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--espresso);
  line-height: 1;
  margin-bottom: 8px;
}
.rail .num em { font-style: italic; color: var(--brown); }
.rail .lab { font-size: 13px; color: var(--muted); }

/* ─── Closing CTA ───────────────────────────────────── */
.coda {
  position: relative;
  text-align: center;
  padding: 180px 0 200px;
  overflow: hidden;
}
.coda .mascot-bg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; opacity: 0.08;
  filter: blur(1px);
  z-index: 0;
  pointer-events: none;
}
.coda .inner { position: relative; z-index: 1; }
.coda .display {
  font-size: clamp(44px, 7vw, 96px);
  margin: 24px auto 32px;
  max-width: 14ch;
}

/* ─── Footer ────────────────────────────────────────── */
footer {
  padding: 60px 0 80px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
}
.foot-brand { max-width: 380px; }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { font-size: 14px; color: var(--muted); line-height: 1.55; }
.foot-cols { display: flex; gap: 60px; font-size: 14px; }
.foot-col h5 {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.foot-col a {
  display: block; color: var(--ink-2);
  margin-bottom: 8px;
  transition: color 0.2s;
}
.foot-col a:hover { color: var(--brown); }
.foot-bottom {
  margin-top: 60px; padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px; color: var(--muted-2);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
}

/* ─── Long-form article (privacy / terms / support) ───── */
.article { padding: 180px 0 140px; }
.article-head { margin-bottom: 60px; }
.article-head .display {
  font-size: clamp(40px, 6vw, 76px);
  margin-bottom: 14px;
}
.article-head .meta { color: var(--muted-2); font-size: 14px; }
.article-body { font-size: 17px; color: var(--ink-2); line-height: 1.7; }
.article-body h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  color: var(--espresso);
  letter-spacing: -0.01em;
  margin: 56px 0 14px;
}
.article-body h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 17px;
  color: var(--espresso);
  margin: 28px 0 8px;
}
.article-body p { margin-bottom: 14px; }
.article-body ul { margin: 10px 0 20px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--brown); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body strong { color: var(--espresso); font-weight: 600; }

/* ─── Reveal animations ─────────────────────────────── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .stage-mascot, .stage .star, .scroll-cue::after { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ─────────────────────────────────────────────────────
   Cinematic layer
   ───────────────────────────────────────────────────── */

/* Scroll progress bar */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--brown-light) 100%);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 100;
  transition: transform 0.1s linear;
}

/* Candlelight cursor glow — warm light following the pointer */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 520px; height: 520px;
  margin: -260px 0 0 -260px;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(212, 162, 76, 0.14) 0%, rgba(212, 162, 76, 0.06) 30%, transparent 65%);
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  will-change: transform;
}
.cursor-glow.on { opacity: 1; }
@media (hover: none), (max-width: 900px) { .cursor-glow { display: none; } }

/* Vignette edges — subtle atmospheric darkening at the frame */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 2;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(59, 36, 22, 0.08) 100%);
}

/* Parallax — applied via JS style.transform */
.parallax { will-change: transform; }

/* ─── Ingredient ticker (cookbook marquee) ───────────── */
.ticker {
  position: relative;
  padding: 56px 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.ticker-track {
  display: flex;
  gap: 56px;
  animation: scroll-left 60s linear infinite;
  width: max-content;
}
.ticker-item {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  color: var(--brown);
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  display: inline-flex; align-items: center; gap: 56px;
}
.ticker-item::after {
  content: "·";
  font-size: 1.4em;
  color: var(--gold);
  font-style: normal;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker:hover .ticker-track { animation-play-state: paused; }

/* ─── Chapter numerals (editorial ghost type) ─────── */
.split { position: relative; }
.chapter-num {
  position: absolute;
  top: -40px;
  right: -10px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(180px, 24vw, 340px);
  line-height: 1;
  color: var(--espresso);
  opacity: 0.05;
  letter-spacing: -0.06em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  font-variation-settings: "SOFT" 80, "WONK" 1, "opsz" 144;
}
.split.reverse .chapter-num {
  right: auto; left: -10px;
}
.split > * { position: relative; z-index: 1; }

/* ─── Interlude — full-bleed dark chapter card ──────── */
.interlude {
  position: relative;
  padding: 160px 0;
  background: radial-gradient(ellipse at 30% 40%, #4A2E1F 0%, #2A1810 60%, #1F1209 100%);
  color: var(--bg);
  overflow: hidden;
  isolation: isolate;
}
.interlude::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background-image:
    radial-gradient(800px 500px at 80% 20%, rgba(212, 162, 76, 0.18), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(231, 194, 122, 0.10), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 0.85  0 0 0 0 0.55  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.interlude-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr minmax(0, 2fr);
  gap: 80px;
  align-items: center;
}
.interlude .mark {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(120px, 16vw, 220px);
  color: var(--gold);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  text-shadow: 0 10px 40px rgba(212, 162, 76, 0.25);
}
.interlude blockquote {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--bg);
  max-width: 22ch;
}
.interlude blockquote em {
  font-style: italic;
  color: var(--gold-soft);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}
.interlude cite {
  display: block;
  margin-top: 28px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
  opacity: 0.75;
}
.interlude .sparkle {
  position: absolute;
  opacity: 0.3;
  filter: drop-shadow(0 0 20px rgba(231, 194, 122, 0.4));
}
.interlude .sparkle.one   { top: 8%;   right: 6%;  width: 140px; animation: drift 8s ease-in-out infinite; }
.interlude .sparkle.two   { bottom: 10%; right: 22%; width: 80px; animation: drift 11s ease-in-out infinite 2s; }
.interlude .sparkle.three { top: 30%;  left: 40%;  width: 60px; animation: drift 9s ease-in-out infinite 4s; }

/* ─── Meals: live nutrition rings ─────────────────── */
.rings-stage {
  position: relative;
  width: 80%; aspect-ratio: 1;
  display: grid; place-items: center;
}
.rings-stage::before {
  content: "";
  position: absolute; inset: -10%;
  background: radial-gradient(circle, rgba(212, 162, 76, 0.25), transparent 55%);
  filter: blur(18px);
}
.rings-svg {
  position: relative;
  width: 100%; height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 14px 30px rgba(59, 36, 22, 0.22));
}
.ring-bg  { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 14; }
.ring-val { fill: none; stroke-linecap: round; stroke-width: 14;
  stroke-dasharray: 0 1000;
  transition: stroke-dasharray 1.6s var(--ease);
}
.rings-legend {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  transform: none;
  text-align: center;
  pointer-events: none;
}
.rings-legend .kcal {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1;
  color: var(--espresso);
  letter-spacing: -0.02em;
}
.rings-legend .kcal small { font-size: 0.45em; font-weight: 400; color: var(--muted); display: block; margin-top: 6px; letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--sans); }
.rings-chips {
  position: absolute;
  bottom: 14%;
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600;
}
.rings-chips span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.rings-chips span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.chip-c::before { background: var(--red); }
.chip-p::before { background: var(--gold); }
.chip-f::before { background: var(--green); }

/* Art panel can hold rings instead of image */
.art-panel.rings-panel { align-items: center; justify-content: center; }

/* Gentle tilt on art panels (desktop) */
@media (hover: hover) {
  .art-panel {
    transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  }
  .art-panel:hover {
    transform: translateY(-4px) rotate3d(1, 0.5, 0, 3deg);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.8) inset,
      0 40px 80px -30px rgba(59, 36, 22, 0.4);
  }
}

/* ─── Interlude responsive ───────────────────────── */
@media (max-width: 900px) {
  .interlude { padding: 100px 0; }
  .interlude-inner { grid-template-columns: 1fr; gap: 24px; }
  .chapter-num { font-size: 140px; top: -20px; opacity: 0.04; }
  .ticker { padding: 40px 0; }
}


/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero { min-height: auto; padding: 140px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .stage { max-width: 380px; }
  section { padding: 90px 0; }
  .split { grid-template-columns: 1fr; gap: 32px; margin-bottom: 80px; }
  .split.reverse .split-art { order: 0; }
  .tiles { grid-template-columns: 1fr; }
  .rail { grid-template-columns: repeat(2, 1fr); }
  .rail .cell { border-right: none; border-bottom: 1px solid var(--border-soft); padding-bottom: 18px; }
  .rail .cell:nth-last-child(-n+2) { border-bottom: none; padding-bottom: 0; }
  .foot { grid-template-columns: 1fr; }
  .foot-cols { gap: 40px; flex-wrap: wrap; }
  .scroll-cue { display: none; }
}
@media (max-width: 520px) {
  .wrap, .wrap-sm { padding: 0 22px; }
  .hero-title { font-size: 56px; }
  .section-head { margin-bottom: 48px; }
  .split-copy h3 { font-size: 30px; }
  .rail { grid-template-columns: 1fr; padding: 32px 24px; }
  .rail .cell { padding-bottom: 16px; }
}
