/* Thyme to Cook: thymetocook.co
 *
 * One idea: a dark, warm kitchen with the lights on over the work. Photography
 * and type carry the page; drawn app screens carry the proof. Nothing is here
 * for decoration: every motion says where something came from or what changed.
 *
 * Tokens are the app's own (DesignTokens.swift): forest, hunter, moss, sage,
 * cream, paper, and butter for the one warm accent.
 */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --forest: #102a20;
  --forest-2: #163527;
  --hunter: #214e34;
  --moss: #4f674b;
  --sage: #9caf88;
  --sage-text: #a8bc98;
  --cream: #f4eedc;
  --paper: #fbf8ee;
  --butter: #d6b96b;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  --pad: clamp(1.25rem, 5vw, 4rem);
  --max: 76rem;
  --header: 4rem;
}

/* Two grounds. A section is either lit (paper) or after dark (night). */
.paper {
  --bg: var(--cream);
  --fg: var(--forest);
  --muted: #4f674b;
  --line: #d9e0c9;
  --card: var(--paper);
  --accent: var(--hunter);
  --link: var(--hunter);
}
.night {
  --bg: var(--forest);
  --fg: var(--cream);
  --muted: var(--sage-text);
  --line: rgba(244, 238, 220, 0.14);
  --card: var(--forest-2);
  --accent: var(--sage);
  --link: var(--sage);
}
@media (prefers-color-scheme: dark) {
  .paper {
    --bg: #13291f;
    --fg: var(--cream);
    --muted: var(--sage-text);
    --line: rgba(244, 238, 220, 0.12);
    --card: #183225;
    --accent: var(--sage);
    --link: var(--sage);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 1rem); }
body {
  margin: 0;
  background: var(--forest);
  color: var(--cream);
  font: 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--link, var(--sage)); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--butter); color: var(--forest); }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--cream); color: var(--forest); padding: 0.6rem 1rem; border-radius: 0.5rem; transition: top 0.2s; }
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
.section { background: var(--bg); color: var(--fg); padding-block: clamp(4.5rem, 10vw, 9rem); }
.section.tight { padding-block: clamp(3rem, 6vw, 5rem); }

/* ── Type ─────────────────────────────────────────────────────────────── */
/* Tracking tightens as size grows; body stays at zero (Apple, 2020). */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 560; margin: 0; text-wrap: balance; }
.display { font-size: clamp(2.9rem, 7.4vw, 6.4rem); line-height: 0.97; letter-spacing: -0.038em; }
h1 { font-size: clamp(2.5rem, 6.4vw, 5rem); line-height: 1; letter-spacing: -0.034em; }
h2 { font-size: clamp(2rem, 4.8vw, 3.7rem); line-height: 1.04; letter-spacing: -0.028em; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.15; letter-spacing: -0.012em; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lede { font-size: clamp(1.15rem, 1.9vw, 1.4rem); line-height: 1.5; color: var(--muted); max-width: 38rem; }
.eyebrow { font: 700 0.74rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.25rem; }
.muted { color: var(--muted); }
.measure { max-width: 40rem; }
.detail { font-size: 0.95rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 0.9rem; margin-top: 1.4rem; max-width: 34rem; }
.detail strong { color: var(--fg); font-weight: 600; }

/* ── Header: a material over the page, not a bar beside it ────────────── */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header); color: var(--cream); }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(16, 42, 32, 0); border-bottom: 1px solid transparent;
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease), backdrop-filter 0.45s var(--ease);
}
.site-header.scrolled::before, .site-header.solid::before {
  background: rgba(16, 42, 32, 0.9);
  border-bottom-color: rgba(244, 238, 220, 0.12);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
}
@media (prefers-reduced-transparency: reduce) {
  .site-header.scrolled::before, .site-header.solid::before { background: var(--forest); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--cream); text-decoration: none; font: 600 1.25rem/1 var(--serif); letter-spacing: -0.012em; white-space: nowrap; }
.brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); list-style: none; margin: 0; padding: 0; }
.nav a { color: rgba(244, 238, 220, 0.82); text-decoration: none; font-size: 0.95rem; font-weight: 500; padding: 0.5rem 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--cream); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.45em; text-decoration-thickness: 1.5px; }
.menu-btn { display: none; }

@media (max-width: 52rem) {
  .menu-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: none; border: 1px solid rgba(244, 238, 220, 0.3); color: var(--cream); font: 500 0.9rem var(--sans); padding: 0.5rem 0.9rem; border-radius: 999px; cursor: pointer; }
  .nav { position: fixed; inset: var(--header) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--pad) 1.5rem; background: var(--forest); border-bottom: 1px solid rgba(244, 238, 220, 0.14); transform: translateY(-0.75rem); opacity: 0; visibility: hidden; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s 0.25s; }
  .nav a { display: block; padding: 0.95rem 0; font-size: 1.15rem; border-bottom: 1px solid rgba(244, 238, 220, 0.1); }
  .menu-open .nav { opacity: 1; transform: none; visibility: visible; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
  /* Without JS there is no button: the links stay visible, in a row. */
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .nav { position: static; flex-direction: row; flex-wrap: wrap; opacity: 1; visibility: visible; transform: none; padding: 0; border: 0; background: none; gap: 1rem; }
  html:not(.js) .nav a { border: 0; padding: 0.25rem 0; font-size: 0.9rem; }
  html:not(.js) .site-header { height: auto; }
  html:not(.js) .site-header .wrap { flex-direction: column; align-items: flex-start; padding-block: 0.75rem; }
}

/* ── Buttons & pills ──────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.65rem 1.1rem; border-radius: 999px; background: rgba(244, 238, 220, 0.12); border: 1px solid rgba(244, 238, 220, 0.22); color: var(--cream); font-size: 0.95rem; font-weight: 600; }
.pill::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--butter); }
.paper .pill { background: var(--card); border-color: var(--line); color: var(--fg); }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 1.4rem; border-radius: 999px; background: var(--cream); color: var(--forest); font-weight: 600; text-decoration: none; transition: transform 0.12s ease-out; }
.btn:active { transform: scale(0.97); }
.btn.ghost { background: transparent; color: var(--cream); border: 1px solid rgba(244, 238, 220, 0.4); }
.arrow-link { display: inline-flex; gap: 0.5rem; align-items: center; font-weight: 600; text-decoration: none; color: var(--link); }
.arrow-link::after { content: "→"; transition: transform 0.3s var(--ease); }
.arrow-link:hover::after { transform: translateX(0.3rem); }

/* ── Hero and full-bleed photography ──────────────────────────────────── */
.hero, .bleed { position: relative; isolation: isolate; overflow: hidden; background: var(--forest); color: var(--cream); display: grid; align-items: end; }
.hero { min-height: 100svh; min-height: max(100svh, 34rem); }
.bleed { min-height: min(92svh, 58rem); }
.bleed.short { min-height: min(70svh, 40rem); }
.media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.media img, .media picture { display: block; width: 100%; height: 100%; }
.media img { object-fit: cover; }
.bleed .media img { height: 120%; margin-top: -10%; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.hero .media img { animation: settle 2.8s var(--ease) both; }
/* On wide screens the photograph enters from the right and dissolves into the
   forest green, so the headline sits on clear ground and the subject on light. */
@media (min-width: 48rem) {
  .hero .media { inset: 0 0 0 auto; width: 74%; -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%); mask-image: linear-gradient(to right, transparent 0%, #000 38%); }
  .hero.scrim::after { background: linear-gradient(to top, rgba(12, 33, 26, 0.55) 0%, rgba(12, 33, 26, 0) 32%), linear-gradient(to bottom, rgba(12, 33, 26, 0.45) 0%, rgba(12, 33, 26, 0) 22%); }
}
/* The forest tint ties every photograph to the brand; the gradient keeps type
   legible without burying the picture. Light where the subject is. */
.scrim::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(to top, rgba(12, 33, 26, 0.78) 0%, rgba(12, 33, 26, 0.26) 28%, rgba(12, 33, 26, 0) 52%),
  linear-gradient(to right, rgba(12, 33, 26, 0.6) 0%, rgba(12, 33, 26, 0) 52%),
  rgba(12, 33, 26, 0.16); }
.scrim.right::after { background:
  linear-gradient(to top, rgba(12, 33, 26, 0.7) 0%, rgba(12, 33, 26, 0) 45%),
  linear-gradient(to left, rgba(12, 33, 26, 0.72) 0%, rgba(12, 33, 26, 0) 58%),
  rgba(12, 33, 26, 0.1); }
.scrim.center::after { background: linear-gradient(rgba(12, 33, 26, 0.5), rgba(12, 33, 26, 0.7)); }
@media (max-width: 47.99rem) {
  .scrim::after, .scrim.right::after { background:
    linear-gradient(to top, rgba(12, 33, 26, 0.94) 0%, rgba(12, 33, 26, 0.7) 38%, rgba(12, 33, 26, 0.1) 72%),
    rgba(12, 33, 26, 0.18); }
}
.hero-copy, .bleed-copy { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; padding-block: calc(var(--header) + 3rem) clamp(3rem, 9vh, 6.5rem); }
.hero-copy .lede, .bleed-copy .lede { color: rgba(244, 238, 220, 0.86); margin-top: 1.5rem; }
.hero-copy .pill { margin-top: 2rem; }
.hero-copy .row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-top: 2rem; }
.hero-copy .row .pill { margin-top: 0; }
.bleed-copy h2 { max-width: 16ch; font-size: clamp(2.3rem, 6.2vw, 5.2rem); letter-spacing: -0.034em; line-height: 1; }
.bleed-copy.center { text-align: center; }
@media (min-width: 48rem) {
  .bleed-copy.right { margin-left: max(var(--pad), 54%); margin-right: var(--pad); width: auto; max-width: 34rem; }
  .hero-copy { max-width: calc(46rem + 2 * var(--pad)); margin-left: max(var(--pad), calc((100% - var(--max)) / 2)); width: auto; }
}
.bleed-copy.center h2 { margin-inline: auto; }
.credit-tag { position: absolute; right: var(--pad); bottom: 1rem; font-size: 0.72rem; color: rgba(244, 238, 220, 0.62); }
.credit-tag a { color: inherit; }

.page-hero { background: var(--forest); color: var(--cream); padding: calc(var(--header) + clamp(3.5rem, 8vw, 7rem)) 0 clamp(3rem, 6vw, 5rem); }
.page-hero .lede { color: var(--sage-text); margin-top: 1.5rem; }

/* ── Motion: one reveal, one hero settle, one parallax ────────────────── */
@keyframes settle { from { transform: scale(1.09); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translate3d(0, 1.4rem, 0); opacity: 0; } to { transform: none; opacity: 1; } }
.rise { animation: rise 1.1s var(--ease) both; animation-delay: var(--d, 0s); }
.js [data-reveal] { opacity: 0; transform: translate3d(0, 1.25rem, 0); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ── Editorial blocks ─────────────────────────────────────────────────── */
.split { display: grid; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
@media (min-width: 56rem) {
  .split { grid-template-columns: 1fr 1fr; }
  .split.wide-left { grid-template-columns: 1.15fr 0.85fr; }
  .split.flip > :first-child { order: 2; }
}
.photo { position: relative; border-radius: 1.5rem; overflow: hidden; background: var(--forest); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.tall { aspect-ratio: 4 / 5; }
.photo.wide { aspect-ratio: 3 / 2; }
.photo figcaption, .figure figcaption { position: absolute; left: 1rem; bottom: 0.8rem; font-size: 0.72rem; color: rgba(244, 238, 220, 0.75); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }
.photo figcaption a { color: inherit; }
figure { margin: 0; }

.rules { display: grid; gap: 0; margin-top: 3rem; }
.rules.cols { gap: 2.5rem 3rem; }
@media (min-width: 52rem) { .rules.cols { grid-template-columns: repeat(3, 1fr); } .rules.cols-2 { grid-template-columns: repeat(2, 1fr); } }
.rule { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.rule h3 { margin-bottom: 0.6rem; }
.rule p { color: var(--muted); margin: 0; }
.rule a { font-weight: 600; }

.list-rows > li { border-top: 1px solid var(--line); padding: 1.1rem 0; display: grid; gap: 0.25rem 2rem; }
@media (min-width: 52rem) { .list-rows > li { grid-template-columns: 14rem 1fr; } }
.list-rows { list-style: none; margin: 2rem 0 0; padding: 0; }
.list-rows b { font-family: var(--serif); font-weight: 560; font-size: 1.15rem; letter-spacing: -0.01em; }
.list-rows span { color: var(--muted); }

/* Feature sections: the label sticks while you read the explanation. */
.feature { display: grid; gap: 2.5rem; padding-block: clamp(3.5rem, 7vw, 6rem); border-top: 1px solid var(--line); align-items: center; }
.feature:first-of-type { border-top: 0; }
@media (min-width: 56rem) {
  .feature { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 7vw, 7rem); }
  .feature.flip > .copy { order: 2; }
}
.feature .kicker { font: 700 0.74rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.feature h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); margin-bottom: 1.1rem; }
.feature p { color: var(--muted); max-width: 32rem; }

.toc { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 0.5rem 0.95rem; border-radius: 999px; border: 1px solid rgba(244, 238, 220, 0.25); color: var(--cream); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: background 0.2s; }
.toc a:hover { background: rgba(244, 238, 220, 0.1); }

/* ── The stage: where the drawn app screens live ──────────────────────── */
.stage { position: relative; background: var(--hunter); border-radius: 1.75rem; padding: clamp(1.25rem, 3vw, 2.25rem); display: grid; place-items: center; overflow: hidden; min-height: 21rem; }
.stage::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(244, 238, 220, 0.1); pointer-events: none; }
.night .stage { background: var(--forest-2); }

/* The app's own look, drawn. Fixed light values: this is the app, not the page. */
.ui, .deck { --u-bg: #fbf8ee; --u-fg: #102a20; --u-muted: #4f674b; --u-line: #dde5d0; --u-soft: #dceaD1; --u-accent: #214e34; --u-tint: #e9eedf; --u-butter: #d6b96b; }
.ui {
  background: var(--u-bg); color: var(--u-fg); border-radius: 1.1rem; font: 0.95rem/1.4 var(--sans); width: min(100%, 22rem); padding: 1.1rem; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.55); text-align: left; }
.ui h4 { font-size: 1.25em; line-height: 1.15; letter-spacing: -0.015em; margin: 0.15em 0 0.6em; color: var(--u-fg); }
.u-lbl { font: 700 0.68em/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--u-muted); margin: 0.95em 0 0.5em; }
.u-lbl:first-child { margin-top: 0; }
.u-chips { display: flex; flex-wrap: wrap; gap: 0.4em; }
.u-chip { padding: 0.38em 0.8em; border-radius: 999px; border: 1px solid var(--u-line); background: var(--u-bg); font-size: 0.88em; font-weight: 500; transition: background 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease); transition-delay: var(--d, 0s); }
.u-chip.is-on-later { }
.demo.in .u-chip.is-on-later, .u-chip.on { background: var(--u-accent); border-color: var(--u-accent); color: #fff; font-weight: 600; }
.u-note { font-size: 0.8em; color: var(--u-muted); margin-top: 0.5em; }
.u-seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--u-tint); border-radius: 0.8em; padding: 0.2em; font-size: 0.82em; text-align: center; }
.u-seg span { padding: 0.45em 0.2em; border-radius: 0.6em; font-weight: 500; transition: background 0.5s var(--ease), box-shadow 0.5s; transition-delay: var(--d, 0s); }
.u-seg .on, .demo.in .u-seg .is-on-later { background: var(--u-bg); font-weight: 600; box-shadow: 0 1px 3px rgba(16, 42, 32, 0.16); }
.u-btn { display: block; text-align: center; margin-top: 1em; background: var(--u-accent); color: #fff; border-radius: 0.85em; padding: 0.8em; font-weight: 600; }
.u-row { display: flex; align-items: center; gap: 0.6em; }
.u-avatar { width: 2.1em; height: 2.1em; border-radius: 50%; background: var(--u-soft); display: grid; place-items: center; font-weight: 700; font-size: 0.85em; color: var(--u-accent); flex: none; }
.u-muted { color: var(--u-muted); }
.u-sm { font-size: 0.85em; }
.u-list { list-style: none; margin: 0; padding: 0; }
.u-list li { display: flex; align-items: center; gap: 0.6em; padding: 0.55em 0; border-top: 1px solid var(--u-line); }
.u-list li:first-child { border-top: 0; }
.u-list .box { width: 1.05em; height: 1.05em; border-radius: 50%; border: 2px solid var(--u-accent); flex: none; }
.u-list .done { color: var(--u-muted); text-decoration: line-through; }
.u-list .done .box { background: var(--u-accent); }
.u-list .by { margin-left: auto; font-size: 0.78em; color: var(--u-muted); }

/* Anything drawn arrives in order. State changes are CSS transitions, so they
   start from wherever they are, and never fight the reader. */
.demo .t { opacity: 0; transform: translate3d(0, 0.5rem, 0); transition: opacity 0.6s var(--ease) var(--d, 0s), transform 0.6s var(--ease) var(--d, 0s); }
.demo.in .t { opacity: 1; transform: none; }
html:not(.js) .demo .t { opacity: 1; transform: none; }

/* import */
.di-link { display: inline-flex; gap: 0.5em; align-items: center; background: var(--u-tint); border-radius: 999px; padding: 0.4em 0.8em; font-size: 0.82em; color: var(--u-muted); }
.di-state { position: relative; height: 1.5em; margin: 0.7em 0 0.3em; font-size: 0.85em; font-weight: 600; color: var(--u-accent); }
.di-state span { position: absolute; left: 0; top: 0; }
.di-state .a { opacity: 0; }
.demo.in .di-state .a { animation: reading 2.2s var(--ease) 0.5s both; }
.di-state .b { opacity: 0; transition: opacity 0.5s var(--ease) 2.6s; }
.demo.in .di-state .b { opacity: 1; }
@keyframes reading { 0% { opacity: 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; } }
html:not(.js) .di-state .a { display: none; }
html:not(.js) .di-state .b { opacity: 1; }

/* sort: a deck, filed by swiping */
.deck { position: relative; width: 15rem; height: 19rem; }
.deck .sc { position: absolute; inset: 0; border-radius: 1.2rem; overflow: hidden; background: var(--u-bg); color: var(--u-fg); box-shadow: 0 22px 40px -22px rgba(0, 0, 0, 0.6); transform-origin: 50% 110%; transition: transform 0.9s var(--ease), opacity 0.6s var(--ease); transition-delay: var(--d, 0s); }
.deck .sc img { width: 100%; height: 66%; object-fit: cover; }
.deck .sc .cap { padding: 0.7rem 0.9rem; font: 560 1.02rem/1.15 var(--serif); letter-spacing: -0.01em; }
.deck .sc .stamp { position: absolute; top: 1rem; left: 1rem; padding: 0.3rem 0.7rem; border: 2px solid currentColor; border-radius: 0.5rem; font: 800 0.8rem/1 var(--sans); letter-spacing: 0.12em; opacity: 0; transition: opacity 0.3s; transition-delay: var(--d, 0s); transform: rotate(-8deg); background: rgba(251, 248, 238, 0.9); }
.deck .c1 { z-index: 1; transform: translate3d(0, 0.9rem, 0) scale(0.92); }
.deck .c2 { z-index: 2; transform: translate3d(0, 0.45rem, 0) scale(0.96); }
.deck .c3 { z-index: 3; }
.deck .stamp.go { color: #214e34; }
.deck .stamp.skip { color: #8a5a1c; }
.demo.in .deck .sc { transition: none; animation: 9s var(--ease) infinite; }
.demo.in .deck .stamp { transition: none; animation: 9s linear infinite; }
.demo.in .deck .c3 { animation-name: deck-go; }
.demo.in .deck .c3 .stamp { animation-name: deck-stamp-a; }
.demo.in .deck .c2 { animation-name: deck-skip; }
.demo.in .deck .c2 .stamp { animation-name: deck-stamp-b; }
.demo.in .deck .c1 { animation-name: deck-go-last; }
.demo.in .deck .c1 .stamp { animation-name: deck-stamp-c; }
@keyframes deck-go { 0%,12% { transform: none; opacity: 1; } 22%,91% { transform: translate3d(130%,-2%,0) rotate(14deg); opacity: 0; } 92% { transform: none; opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes deck-skip { 0%,34% { transform: translate3d(0,0.45rem,0) scale(0.96); opacity: 1; } 44%,91% { transform: translate3d(-130%,-2%,0) rotate(-14deg); opacity: 0; } 92% { transform: translate3d(0,0.45rem,0) scale(0.96); opacity: 0; } 100% { transform: translate3d(0,0.45rem,0) scale(0.96); opacity: 1; } }
@keyframes deck-go-last { 0%,56% { transform: translate3d(0,0.9rem,0) scale(0.92); opacity: 1; } 66%,91% { transform: translate3d(130%,-2%,0) rotate(14deg); opacity: 0; } 92% { transform: translate3d(0,0.9rem,0) scale(0.92); opacity: 0; } 100% { transform: translate3d(0,0.9rem,0) scale(0.92); opacity: 1; } }
@keyframes deck-stamp-a { 0%,6% { opacity: 0; } 10%,91% { opacity: 1; } 92%,100% { opacity: 0; } }
@keyframes deck-stamp-b { 0%,28% { opacity: 0; } 32%,91% { opacity: 1; } 92%,100% { opacity: 0; } }
@keyframes deck-stamp-c { 0%,50% { opacity: 0; } 54%,91% { opacity: 1; } 92%,100% { opacity: 0; } }
.deck-actions { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.6rem; }
.deck-actions span { padding: 0.5rem 1.1rem; border-radius: 999px; background: rgba(244, 238, 220, 0.12); color: var(--cream); font-size: 0.88rem; font-weight: 600; }
.deck-actions .go { background: var(--cream); color: var(--forest); }
.stage.col { display: flex; flex-direction: column; justify-content: center; align-items: center; }

/* diet */
.dt-row { display: flex; align-items: center; gap: 0.6em; padding: 0.55em 0.5em; border-radius: 0.6em; transition: background 0.6s var(--ease) 0.7s; }
.dt-row .flag { margin-left: auto; font-size: 0.72em; font-weight: 700; letter-spacing: 0.04em; padding: 0.25em 0.6em; border-radius: 999px; background: var(--u-butter); color: #102a20; opacity: 0; transform: scale(0.9); transition: opacity 0.4s 0.9s, transform 0.5s var(--ease) 0.9s; }
.demo.in .dt-row.hit { background: rgba(214, 185, 107, 0.28); }
.demo.in .dt-row.hit .flag { opacity: 1; transform: none; }
.dt-swap { margin-top: 0.7em; background: var(--u-tint); border-radius: 0.8em; padding: 0.8em 0.9em; font-size: 0.88em; }
.dt-swap b { display: block; margin-bottom: 0.2em; }
.dt-swap em { display: block; margin-top: 0.5em; font-style: normal; font-weight: 600; color: var(--u-accent); font-size: 0.9em; }

/* spin */
.wheel-wrap { position: relative; width: min(100%, 17rem); aspect-ratio: 1; }
.wheel-wrap svg { width: 100%; height: 100%; overflow: visible; }
.wheel { transform-origin: 50% 50%; transform: rotate(0deg); transition: transform 3.6s cubic-bezier(0.12, 0.72, 0.12, 1) 0.4s; }
.demo.in .wheel { transform: rotate(1485deg); }
.pointer { position: absolute; left: 50%; top: -0.6rem; width: 1.3rem; height: 1.6rem; transform: translateX(-50%); background: var(--butter); clip-path: polygon(50% 100%, 0 0, 100% 0); z-index: 2; }
.wheel-result { margin-top: 1.4rem; text-align: center; color: var(--cream); font: 560 1.2rem/1.2 var(--serif); letter-spacing: -0.01em; opacity: 0; transform: translateY(0.5rem); transition: opacity 0.6s var(--ease) 4.1s, transform 0.6s var(--ease) 4.1s; }
.wheel-result small { display: block; font: 700 0.68rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage-text); margin-bottom: 0.45rem; }
.demo.in .wheel-result { opacity: 1; transform: none; }
html:not(.js) .wheel-result { opacity: 1; transform: none; }

/* sprig */
.chat { display: grid; gap: 0.6em; font-size: 0.92em; }
.bub { max-width: 88%; padding: 0.7em 0.95em; border-radius: 1.1em; }
.bub.me { justify-self: end; background: var(--u-accent); color: #fff; border-bottom-right-radius: 0.3em; }
.bub.it { background: var(--u-tint); border-bottom-left-radius: 0.3em; }
.bub.it b { display: block; font: 700 0.7em/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--u-muted); margin-bottom: 0.4em; }

/* cook + watch */
.cook-pair { display: flex; gap: 1.2rem; align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.cookui { width: 13.5rem; min-height: 19rem; display: flex; flex-direction: column; }
.cookui .count { font-size: 0.74em; color: var(--u-muted); text-align: center; font-weight: 600; margin-bottom: 0.9em; }
.stepbox { position: relative; flex: 1; min-height: 8.6rem; }
.stepbox .s { position: absolute; inset: 0; font: 560 1.18rem/1.25 var(--serif); letter-spacing: -0.012em; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.stepbox .s2 { opacity: 0; transform: translate3d(0, 0.6rem, 0); }
.demo.in .stepbox .s1 { opacity: 0; transform: translate3d(0, -0.6rem, 0); transition-delay: 2.2s; }
.demo.in .stepbox .s2 { opacity: 1; transform: none; transition-delay: 2.3s; }
.cookui .next { display: block; text-align: center; background: var(--u-accent); color: #fff; border-radius: 0.8em; padding: 0.7em; font-weight: 600; transition: transform 0.15s; }
.demo.in .cookui .next { animation: press 0.5s var(--ease) 2s both; }
@keyframes press { 40% { transform: scale(0.94); } }
.watch { width: 7.4rem; aspect-ratio: 0.82; border-radius: 2rem; background: #0a1a14; border: 0.35rem solid #1d3b2c; padding: 0.7rem 0.6rem; color: var(--cream); display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.7); }
.watch .wc { font: 700 0.58rem/1 var(--sans); letter-spacing: 0.1em; color: var(--sage-text); text-transform: uppercase; }
.watch .ws { position: relative; flex: 1; margin: 0.4rem 0; }
.watch .ws span { position: absolute; inset: 0; font: 560 0.8rem/1.2 var(--serif); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.watch .ws .s2 { opacity: 0; transform: translateY(0.4rem); }
.demo.in .watch .ws .s1 { opacity: 0; transition-delay: 2.25s; }
.demo.in .watch .ws .s2 { opacity: 1; transform: none; transition-delay: 2.35s; }
.watch .wn { background: var(--sage); color: var(--forest); text-align: center; border-radius: 999px; font: 700 0.62rem/1 var(--sans); padding: 0.45rem; }

/* together */
.tg-people { display: flex; gap: 0.8em; align-items: center; flex-wrap: wrap; }
.tg-people .p { display: flex; align-items: center; gap: 0.45em; font-size: 0.9em; font-weight: 600; }
.tg-invite { margin-left: auto; font-size: 0.8em; font-weight: 600; color: var(--u-accent); border: 1px dashed var(--u-muted); border-radius: 999px; padding: 0.3em 0.8em; }
.tg-tonight { background: var(--u-tint); border-radius: 0.85em; padding: 0.75em 0.9em; }
.tg-tonight b { font: 560 1.05em/1.2 var(--serif); display: block; }
.tg-new { background: rgba(214, 185, 107, 0.3); border-radius: 0.5em; padding-inline: 0.4em; margin-inline: -0.4em; }

/* phone */
.phone { container-type: inline-size; width: min(100%, 19rem); aspect-ratio: 9 / 18.6; border-radius: 2.8rem; background: #07140f; padding: 0.5rem; position: relative; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(244, 238, 220, 0.14); }
.phone::before { content: ""; position: absolute; top: 1.05rem; left: 50%; width: 28%; height: 1.45rem; background: #000; border-radius: 999px; transform: translateX(-50%); z-index: 3; }
.screens { position: relative; width: 100%; height: 100%; border-radius: 2.35rem; overflow: hidden; background: var(--paper); }
.screen { font-size: 4.2cqw; line-height: 1.4; position: relative; width: 100%; height: 100%; padding: 27cqw 6cqw 6cqw; background: #fbf8ee; color: #102a20; display: flex; flex-direction: column; gap: 3cqw; }
.screens .screen { position: absolute; inset: 0; opacity: 0; transform: translate3d(0, 3%, 0) scale(0.985); transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); pointer-events: none; }
.screens .screen.active { opacity: 1; transform: none; }
.screen.dark { background: #102a20; color: #f4eedc; }
.screen .ui-top { position: absolute; top: 17cqw; left: 0; right: 0; text-align: center; font: 600 4cqw/1 var(--serif); }
.screen h5 { font: 560 7.4cqw/1.1 var(--serif); letter-spacing: -0.02em; margin: 0; }
.screen .lbl { font: 700 2.9cqw/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: #4f674b; }
.screen.dark .lbl { color: #a8bc98; }
.screen .chips { display: flex; flex-wrap: wrap; gap: 2cqw; }
.screen .chip { padding: 1.8cqw 3.6cqw; border-radius: 999px; border: 1px solid #dde5d0; font-size: 3.7cqw; font-weight: 500; }
.screen.dark .chip { background: #214e34; border-color: transparent; }
.screen .chip.on { background: #214e34; border-color: #214e34; color: #fff; font-weight: 600; }
.screen.dark .chip.on { background: #9caf88; color: #102a20; }
.screen .btnx { margin-top: auto; text-align: center; background: #214e34; color: #fff; padding: 3.4cqw; border-radius: 3.6cqw; font-weight: 600; }
.screen.dark .btnx { background: #9caf88; color: #102a20; }
.screen .pic { height: 38cqw; border-radius: 4cqw; overflow: hidden; flex: none; }
.screen .pic img { width: 100%; height: 100%; object-fit: cover; }
.screen .card { background: #e9eedf; border-radius: 3.6cqw; padding: 3.4cqw 4cqw; }
.screen .item { display: flex; align-items: center; gap: 3cqw; padding: 2.4cqw 0; border-top: 1px solid #dde5d0; }
.screen .item:first-of-type { border-top: 0; }
.screen .item i { width: 4.4cqw; height: 4.4cqw; border-radius: 50%; border: 2px solid #214e34; flex: none; }
.screen .item.done { color: #4f674b; text-decoration: line-through; }
.screen .item.done i { background: #214e34; }
.screen .item small { margin-left: auto; font-size: 3cqw; color: #4f674b; }
.screen .big { font: 560 6.6cqw/1.22 var(--serif); letter-spacing: -0.015em; margin-top: 4cqw; }
.screen .count { text-align: center; font-size: 3.4cqw; color: #4f674b; font-weight: 600; }

/* the film: text on one side, a phone on the other, in step */
.film { display: grid; gap: 3.5rem; margin-top: 3.5rem; }
.film .step { padding-block: 0.5rem; }
.film .step h3 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -0.022em; margin-bottom: 0.9rem; }
.film .step p { color: var(--muted); max-width: 30rem; }
.film .step .phone { margin-top: 1.5rem; }
.film .step .n { font: 700 0.74rem/1 var(--sans); letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; margin-bottom: 0.9rem; display: block; }
.film-stage { display: none; }
@media (min-width: 60rem) {
  .has-stage .film { grid-template-columns: minmax(0, 1fr) 21rem; gap: clamp(3rem, 8vw, 8rem); }
  .has-stage .film .step { min-height: 84svh; display: flex; flex-direction: column; justify-content: center; opacity: 0.32; transition: opacity 0.6s var(--ease); }
  .has-stage .film .step.active { opacity: 1; }
  .has-stage .film .step .phone { display: none; }
  .has-stage .film-stage { display: block; position: sticky; top: calc(50svh - 20rem); align-self: start; height: 40rem; }
  .has-stage .film-stage .phone { width: 100%; }
}

/* highlights: an index, not a card grid */
.index { display: grid; gap: 0; margin-top: 3rem; }
@media (min-width: 52rem) { .index { grid-template-columns: repeat(2, 1fr); column-gap: 4rem; } }
.index a { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; padding: 1.25rem 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--fg); transition: padding-left 0.35s var(--ease); }
.index a:hover { padding-left: 0.6rem; }
.index b { font: 560 1.3rem/1.2 var(--serif); letter-spacing: -0.015em; }
.index span { grid-column: 1; color: var(--muted); font-size: 0.97rem; }
.index a::after { content: "→"; grid-row: 1; grid-column: 2; color: var(--link); align-self: start; }

/* ── Legal and long-form pages ────────────────────────────────────────── */
.prose { max-width: 42rem; margin-inline: auto; }
.prose h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 2.6rem 0 0.8rem; letter-spacing: -0.02em; }
.prose h3 { font-size: 1.2rem; margin: 1.6rem 0 0.4rem; }
.prose p, .prose li { color: var(--fg); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.45em; }
.prose .tag { font-size: 0.9rem; color: var(--muted); }
.prose .box { border: 1px solid var(--line); background: var(--card); border-radius: 1rem; padding: 1rem 1.2rem; margin: 0.9rem 0; }
.prose .box p { margin: 0.2em 0; }
.prose .box .who { font-weight: 700; margin-bottom: 0.2em; }
.prose .alert { border-left: 0; border: 1px solid var(--butter); background: rgba(214, 185, 107, 0.14); border-radius: 1rem; padding: 1rem 1.2rem; }
.draft-note { font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1rem; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { background: var(--forest); color: var(--cream); padding: clamp(3.5rem, 7vw, 6rem) 0 2.5rem; border-top: 1px solid rgba(244, 238, 220, 0.1); }
.foot-grid { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .foot-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.foot-grid h2 { font: 700 0.72rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage-text); margin-bottom: 1.1rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.foot-grid a { color: var(--cream); text-decoration: none; font-size: 0.97rem; }
.foot-grid a:hover { text-decoration: underline; }
.foot-brand p { color: var(--sage-text); max-width: 20rem; margin-top: 1rem; font-size: 0.97rem; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(244, 238, 220, 0.1); font-size: 0.85rem; color: var(--sage-text); }
.foot-base a { color: inherit; }

/* ── Reduced motion & contrast ────────────────────────────────────────── */
/* Gentler, not zero: state still changes, but nothing travels. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .media img, .rise { animation: none; }
  .js [data-reveal], .demo .t { transition: opacity 0.3s linear; transform: none !important; }
  .bleed .media img { transform: none; height: 100%; margin-top: 0; }
  .wheel, .deck .sc, .stepbox .s, .watch .ws span, .screens .screen { transition: opacity 0.3s linear; }
  .demo.in .wheel { transform: rotate(1485deg); transition: none; }
  .demo.in .cookui .next { animation: none; }
  .demo.in .di-state .a { animation: none; }
  .di-state .a { display: none; }
  .di-state .b { opacity: 1; transition: none; }
  .demo.in .deck .sc, .demo.in .deck .stamp { animation: none; }
  .index a, .arrow-link::after { transition: none; }
}
@media (prefers-contrast: more) {
  .rule, .feature, .index a, .list-rows > li { border-top-color: currentColor; }
  .muted, .lede, .rule p, .feature p { color: var(--fg); }
}
@media print {
  .site-header, .site-footer, .menu-btn, .skip { display: none; }
  body, .section { background: #fff; color: #000; }
}

.screen .timer { font: 560 9.5cqw/1 var(--serif); letter-spacing: -0.02em; margin-top: 1.6cqw; }
.screen .voice { display: flex; align-items: center; gap: 2.4cqw; color: #4f674b; font-size: 3.5cqw; font-weight: 600; }
.screen .bars { display: flex; gap: 0.9cqw; align-items: center; height: 4.4cqw; }
.screen .bars i { width: 0.9cqw; height: 45%; background: #214e34; border-radius: 1px; }
.screen .bars i:nth-child(2) { height: 100%; } .screen .bars i:nth-child(3) { height: 70%; } .screen .bars i:nth-child(4) { height: 40%; }
