/* Meros — marketing site
   Ember & Oat palette (light) + Midnight Kitchen (dark)
   Auto-switches with prefers-color-scheme. Manual override via [data-scheme]
*/

:root {
  /* Ember & Oat — light */
  --bg: #F5F0E6;
  --surface: #FDFAF3;
  --elev: #F7F1E4;
  --ink: #1A1915;
  --muted: #6F6A5C;
  --faint: #B8B1A0;
  --primary: #C6411F;
  --accent: #E4A53A;
  --support: #5A6B3A;
  --tint: #EDE4D2;
  --stripe1: #EDE4D2;
  --stripe2: #E4DAC5;
  --chip-bg: #EFE7D4;
  --hair: rgba(26,25,21,0.08);
  --hair-strong: rgba(26,25,21,0.14);
  --shadow-card:
    0 1px 1px rgba(26,25,21,0.04),
    0 4px 14px rgba(26,25,21,0.07),
    0 2px 4px rgba(26,25,21,0.03);
  --shadow-strong:
    0 2px 4px rgba(26,25,21,0.06),
    0 16px 40px rgba(26,25,21,0.10);
  --primary-on: #FDFAF3;
  /* motion tokens (non-color — shared by both schemes) */
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --bg: #14110E;
    --surface: #1F1B17;
    --elev: #2A251F;
    --ink: #F0ECE1;
    --muted: #8C8678;
    --faint: #4D4740;
    --primary: #E26B3A;
    --accent: #E8B450;
    --support: #8AA06A;
    --tint: #2A251F;
    --stripe1: #26211C;
    --stripe2: #2D2822;
    --chip-bg: #2A251F;
    --hair: rgba(240,236,225,0.08);
    --hair-strong: rgba(240,236,225,0.14);
    --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
    --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
    --primary-on: #14110E;
    color-scheme: dark;
  }
}
:root[data-scheme="dark"] {
  --bg: #14110E;
  --surface: #1F1B17;
  --elev: #2A251F;
  --ink: #F0ECE1;
  --muted: #8C8678;
  --faint: #4D4740;
  --primary: #E26B3A;
  --accent: #E8B450;
  --support: #8AA06A;
  --tint: #2A251F;
  --stripe1: #26211C;
  --stripe2: #2D2822;
  --chip-bg: #2A251F;
  --hair: rgba(240,236,225,0.08);
  --hair-strong: rgba(240,236,225,0.14);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
  --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
  --primary-on: #14110E;
  color-scheme: dark;
}

/* ══════════════════════════════════════════════════════════════
   Palette overrides — html[data-palette="<key>"] sets light values;
   dark variants follow the same dual pattern (media + [data-scheme]).
   Ember & Oat is the default: no attribute needed, zero visual change.
   ══════════════════════════════════════════════════════════════ */

/* ── Iris & Linen (lavender) ── */
html[data-palette="lavender"] {
  --bg: #EFEDEE;
  --surface: #F8F6F7;
  --elev: #E2DCE6;
  --ink: #1F1A26;
  --muted: #766E80;
  --faint: #C0B8CC;
  --primary: #6B5AAA;
  --accent: #B89668;
  --support: #5E8068;
  --tint: #E2DCE6;
  --stripe1: #E2DCE6;
  --stripe2: #DAD2DF;
  --chip-bg: #E6E0EA;
  --hair: rgba(31,26,38,0.08);
  --hair-strong: rgba(31,26,38,0.14);
  --shadow-card: 0 1px 1px rgba(31,26,38,0.04), 0 4px 14px rgba(31,26,38,0.07), 0 2px 4px rgba(31,26,38,0.03);
  --shadow-strong: 0 2px 4px rgba(31,26,38,0.06), 0 16px 40px rgba(31,26,38,0.10);
  --primary-on: #F8F6F7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  html[data-palette="lavender"]:not([data-scheme="light"]) {
    --bg: #13111A;
    --surface: #1C1826;
    --elev: #272132;
    --ink: #EAE5F0;
    --muted: #8B83A0;
    --faint: #453D56;
    --primary: #A48EE0;
    --accent: #D4B07A;
    --support: #8EB298;
    --tint: #272132;
    --stripe1: #232030;
    --stripe2: #2C2838;
    --chip-bg: #272132;
    --hair: rgba(234,229,240,0.08);
    --hair-strong: rgba(234,229,240,0.14);
    --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
    --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
    --primary-on: #13111A;
    color-scheme: dark;
  }
}
html[data-palette="lavender"][data-scheme="dark"] {
  --bg: #13111A;
  --surface: #1C1826;
  --elev: #272132;
  --ink: #EAE5F0;
  --muted: #8B83A0;
  --faint: #453D56;
  --primary: #A48EE0;
  --accent: #D4B07A;
  --support: #8EB298;
  --tint: #272132;
  --stripe1: #232030;
  --stripe2: #2C2838;
  --chip-bg: #272132;
  --hair: rgba(234,229,240,0.08);
  --hair-strong: rgba(234,229,240,0.14);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
  --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
  --primary-on: #13111A;
  color-scheme: dark;
}

/* ── Basil & Bone ── */
html[data-palette="basil"] {
  --bg: #EFEDE2;
  --surface: #F8F6EC;
  --elev: #DDE0D2;
  --ink: #161812;
  --muted: #677065;
  --faint: #B8BEAC;
  --primary: #2F6B43;
  --accent: #C68233;
  --support: #A4472A;
  --tint: #DDE0D2;
  --stripe1: #DDE0D2;
  --stripe2: #D5D9C6;
  --chip-bg: #E1E5D5;
  --hair: rgba(22,24,18,0.08);
  --hair-strong: rgba(22,24,18,0.14);
  --shadow-card: 0 1px 1px rgba(22,24,18,0.04), 0 4px 14px rgba(22,24,18,0.07), 0 2px 4px rgba(22,24,18,0.03);
  --shadow-strong: 0 2px 4px rgba(22,24,18,0.06), 0 16px 40px rgba(22,24,18,0.10);
  --primary-on: #F8F6EC;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  html[data-palette="basil"]:not([data-scheme="light"]) {
    --bg: #0E140F;
    --surface: #161D17;
    --elev: #1D2520;
    --ink: #E6EAE2;
    --muted: #828B81;
    --faint: #3D4840;
    --primary: #5FA873;
    --accent: #DEA058;
    --support: #CC6E50;
    --tint: #1D2520;
    --stripe1: #192118;
    --stripe2: #212B22;
    --chip-bg: #1D2520;
    --hair: rgba(230,234,226,0.08);
    --hair-strong: rgba(230,234,226,0.14);
    --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
    --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
    --primary-on: #0E140F;
    color-scheme: dark;
  }
}
html[data-palette="basil"][data-scheme="dark"] {
  --bg: #0E140F;
  --surface: #161D17;
  --elev: #1D2520;
  --ink: #E6EAE2;
  --muted: #828B81;
  --faint: #3D4840;
  --primary: #5FA873;
  --accent: #DEA058;
  --support: #CC6E50;
  --tint: #1D2520;
  --stripe1: #192118;
  --stripe2: #212B22;
  --chip-bg: #1D2520;
  --hair: rgba(230,234,226,0.08);
  --hair-strong: rgba(230,234,226,0.14);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
  --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
  --primary-on: #0E140F;
  color-scheme: dark;
}

/* ── Indigo & Cream (inkwell) ── */
html[data-palette="inkwell"] {
  --bg: #EEEAE2;
  --surface: #F8F4EC;
  --elev: #DEDDE3;
  --ink: #15192A;
  --muted: #6F7382;
  --faint: #BBBDC8;
  --primary: #2A4690;
  --accent: #C68233;
  --support: #4D8868;
  --tint: #DEDDE3;
  --stripe1: #DEDDE3;
  --stripe2: #D5D5DC;
  --chip-bg: #E2E1E8;
  --hair: rgba(21,25,42,0.08);
  --hair-strong: rgba(21,25,42,0.14);
  --shadow-card: 0 1px 1px rgba(21,25,42,0.04), 0 4px 14px rgba(21,25,42,0.07), 0 2px 4px rgba(21,25,42,0.03);
  --shadow-strong: 0 2px 4px rgba(21,25,42,0.06), 0 16px 40px rgba(21,25,42,0.10);
  --primary-on: #F8F4EC;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  html[data-palette="inkwell"]:not([data-scheme="light"]) {
    --bg: #0E1018;
    --surface: #171A26;
    --elev: #1F2330;
    --ink: #E8EAEF;
    --muted: #888D9C;
    --faint: #3E4256;
    --primary: #7A9CE8;
    --accent: #E0AC58;
    --support: #7DC79A;
    --tint: #1F2330;
    --stripe1: #1B1F2C;
    --stripe2: #232735;
    --chip-bg: #1F2330;
    --hair: rgba(232,234,239,0.08);
    --hair-strong: rgba(232,234,239,0.14);
    --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
    --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
    --primary-on: #0E1018;
    color-scheme: dark;
  }
}
html[data-palette="inkwell"][data-scheme="dark"] {
  --bg: #0E1018;
  --surface: #171A26;
  --elev: #1F2330;
  --ink: #E8EAEF;
  --muted: #888D9C;
  --faint: #3E4256;
  --primary: #7A9CE8;
  --accent: #E0AC58;
  --support: #7DC79A;
  --tint: #1F2330;
  --stripe1: #1B1F2C;
  --stripe2: #232735;
  --chip-bg: #1F2330;
  --hair: rgba(232,234,239,0.08);
  --hair-strong: rgba(232,234,239,0.14);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
  --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
  --primary-on: #0E1018;
  color-scheme: dark;
}

/* ── Rose & Clay (blush) ── */
html[data-palette="blush"] {
  --bg: #F2E8E2;
  --surface: #FAF1EC;
  --elev: #E8D8CC;
  --ink: #241814;
  --muted: #7A6A60;
  --faint: #C4B0A8;
  --primary: #A4434E;
  --accent: #C9883A;
  --support: #6B7E54;
  --tint: #E8D8CC;
  --stripe1: #E8D8CC;
  --stripe2: #DFD0C4;
  --chip-bg: #ECDCD0;
  --hair: rgba(36,24,20,0.08);
  --hair-strong: rgba(36,24,20,0.14);
  --shadow-card: 0 1px 1px rgba(36,24,20,0.04), 0 4px 14px rgba(36,24,20,0.07), 0 2px 4px rgba(36,24,20,0.03);
  --shadow-strong: 0 2px 4px rgba(36,24,20,0.06), 0 16px 40px rgba(36,24,20,0.10);
  --primary-on: #FAF1EC;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  html[data-palette="blush"]:not([data-scheme="light"]) {
    --bg: #16100E;
    --surface: #211814;
    --elev: #2A1E1A;
    --ink: #F0E5DD;
    --muted: #998578;
    --faint: #4A3830;
    --primary: #D86F7E;
    --accent: #DEA552;
    --support: #9CB17F;
    --tint: #2A1E1A;
    --stripe1: #261B17;
    --stripe2: #2E221E;
    --chip-bg: #2A1E1A;
    --hair: rgba(240,229,221,0.08);
    --hair-strong: rgba(240,229,221,0.14);
    --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
    --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
    --primary-on: #16100E;
    color-scheme: dark;
  }
}
html[data-palette="blush"][data-scheme="dark"] {
  --bg: #16100E;
  --surface: #211814;
  --elev: #2A1E1A;
  --ink: #F0E5DD;
  --muted: #998578;
  --faint: #4A3830;
  --primary: #D86F7E;
  --accent: #DEA552;
  --support: #9CB17F;
  --tint: #2A1E1A;
  --stripe1: #261B17;
  --stripe2: #2E221E;
  --chip-bg: #2A1E1A;
  --hair: rgba(240,229,221,0.08);
  --hair-strong: rgba(240,229,221,0.14);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
  --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
  --primary-on: #16100E;
  color-scheme: dark;
}

/* ── Porcelain & Slate ── */
html[data-palette="porcelain"] {
  --bg: #F1EFEA;
  --surface: #FAF8F2;
  --elev: #E3E1DA;
  --ink: #0F0F0E;
  --muted: #6C6B65;
  --faint: #B8B7B0;
  --primary: #0F0F0E;
  --accent: #A6802A;
  --support: #4E6347;
  --tint: #E3E1DA;
  --stripe1: #E3E1DA;
  --stripe2: #DAD9D1;
  --chip-bg: #E6E4DC;
  --hair: rgba(15,15,14,0.08);
  --hair-strong: rgba(15,15,14,0.14);
  --shadow-card: 0 1px 1px rgba(15,15,14,0.04), 0 4px 14px rgba(15,15,14,0.07), 0 2px 4px rgba(15,15,14,0.03);
  --shadow-strong: 0 2px 4px rgba(15,15,14,0.06), 0 16px 40px rgba(15,15,14,0.10);
  --primary-on: #FAF8F2;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  html[data-palette="porcelain"]:not([data-scheme="light"]) {
    --bg: #0D0D0C;
    --surface: #161614;
    --elev: #1F1F1C;
    --ink: #EDECE6;
    --muted: #86857F;
    --faint: #3A3A36;
    --primary: #EDECE6;
    --accent: #D6A848;
    --support: #8FA77B;
    --tint: #1F1F1C;
    --stripe1: #1B1B18;
    --stripe2: #232320;
    --chip-bg: #1F1F1C;
    --hair: rgba(237,236,230,0.08);
    --hair-strong: rgba(237,236,230,0.14);
    --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
    --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
    --primary-on: #0D0D0C;
    color-scheme: dark;
  }
}
html[data-palette="porcelain"][data-scheme="dark"] {
  --bg: #0D0D0C;
  --surface: #161614;
  --elev: #1F1F1C;
  --ink: #EDECE6;
  --muted: #86857F;
  --faint: #3A3A36;
  --primary: #EDECE6;
  --accent: #D6A848;
  --support: #8FA77B;
  --tint: #1F1F1C;
  --stripe1: #1B1B18;
  --stripe2: #232320;
  --chip-bg: #1F1F1C;
  --hair: rgba(237,236,230,0.08);
  --hair-strong: rgba(237,236,230,0.14);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.5), 0 6px 18px rgba(0,0,0,0.35);
  --shadow-strong: 0 2px 4px rgba(0,0,0,0.6), 0 20px 50px rgba(0,0,0,0.5);
  --primary-on: #0D0D0C;
  color-scheme: dark;
}

/* ══ Palette card interactive styles ══ */
.palette-card {
  cursor: pointer;
  background: var(--surface);
}
.palette-card > button {
  all: unset;
  display: block;
  width: 100%;
  cursor: pointer;
}
.palette-card > button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.palette-card.is-active {
  box-shadow: 0 0 0 2.5px var(--primary), var(--shadow-strong);
}
.palette-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary);
  color: var(--primary-on);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ══ Recipe dialog ══ */
.recipe-dialog {
  border: none;
  border-radius: 28px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-strong);
  max-width: min(660px, calc(100vw - 32px));
  width: 100%;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.recipe-dialog::backdrop {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.recipe-dialog[open] {
  animation: dialogIn 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes dialogIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .recipe-dialog[open] { animation: dialogFadeIn 200ms ease both; }
  @keyframes dialogFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}
.recipe-dialog-inner {
  padding: 36px 40px 40px;
}
@media (max-width: 600px) { .recipe-dialog-inner { padding: 28px 24px 32px; } }
.recipe-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.recipe-dialog-close {
  background: var(--tint);
  border: 1px solid var(--hair);
  color: var(--ink);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 120ms, transform 120ms;
  font-size: 20px;
  line-height: 1;
}
.recipe-dialog-close:hover { background: var(--chip-bg); transform: scale(1.08); }
.recipe-dialog-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
  display: block;
}
.recipe-dialog-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: 0;
  color: var(--ink);
}
.recipe-dialog-title em { color: var(--primary); font-style: italic; }
.recipe-dialog-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--tint);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 28px;
}
@media (max-width: 480px) { .recipe-dialog-stats { grid-template-columns: repeat(2, 1fr); } }
.recipe-dialog-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}
.recipe-dialog-stat-value {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
}
.recipe-dialog-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.recipe-dialog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}
.recipe-dialog-chip {
  font-size: 13px;
  font-weight: 500;
  background: var(--chip-bg);
  color: var(--ink);
  padding: 5px 12px;
  border-radius: 999px;
}
.recipe-dialog-chip.to-buy {
  background: color-mix(in oklab, var(--accent) 14%, var(--surface));
  color: var(--ink);
}
.recipe-dialog-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 14px;
}
.recipe-dialog-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
}
.recipe-dialog-steps li .step-n {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--primary);
  line-height: 1.2;
  text-align: right;
}
.recipe-dialog-steps li p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  padding-top: 2px;
}
.recipe-dialog-quote {
  padding-left: 18px;
  border-left: 2px solid var(--primary);
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

/* meal card as button */
.meal-card {
  border: none;
  text-align: left;
  font: inherit;
  width: 100%;
}
.meal-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.meal-card .meal-view-hint {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--primary);
  opacity: 0;
  transition: opacity 200ms;
  margin-top: 6px;
  display: block;
}
.meal-card:hover .meal-view-hint,
.meal-card:focus-visible .meal-view-hint {
  opacity: 1;
}

/* modern spring easing where the browser knows linear() — cubic-bezier above is the fallback */
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --ease-spring: linear(
      0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%,
      0.937 38.1%, 0.968 41.8%, 1.011 50.1%, 1.022 55.4%, 1.017 63.3%, 0.998 80%, 1
    );
  }
}

* { box-sizing: border-box; }

/* View Transitions (theme-toggle circular reveal) — only active while a
   transition is running; the clip-path is driven from script.js */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* scroll-reveal (universal path: IntersectionObserver adds .is-in)
     Gated on html.js so content is never hidden when JS doesn't run. */
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out-soft),
                transform 700ms var(--ease-out-soft);
    will-change: transform, opacity;
  }
  html.js [data-reveal].is-in {
    opacity: 1;
    transform: translateY(0);
  }
  html.js [data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms var(--ease-out-soft),
                transform 600ms var(--ease-out-soft);
  }
  html.js [data-reveal-stagger].is-in > * { opacity: 1; transform: translateY(0); }
  html.js [data-reveal-stagger].is-in > *:nth-child(1) { transition-delay: 60ms; }
  html.js [data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: 140ms; }
  html.js [data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: 220ms; }
  html.js [data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: 300ms; }
  html.js [data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: 380ms; }
  html.js [data-reveal-stagger].is-in > *:nth-child(6) { transition-delay: 460ms; }
  html.js [data-reveal-stagger].is-in > *:nth-child(7) { transition-delay: 540ms; }
  html.js [data-reveal-stagger].is-in > *:nth-child(8) { transition-delay: 620ms; }
  html.js [data-reveal-stagger].is-in > *:nth-child(9) { transition-delay: 700ms; }

  /* hero entry */
  .hero .hero-eyebrow, .hero .hero-lede,
  .hero .hero-cta-row, .hero .hero-meta {
    opacity: 0;
    animation: heroIn 900ms var(--ease-out-soft) forwards;
  }
  .hero .hero-eyebrow { animation-delay: 80ms; }
  .hero .hero-lede { animation-delay: 460ms; }
  .hero .hero-cta-row { animation-delay: 580ms; }
  .hero .hero-meta { animation-delay: 680ms; }
  .hero .phone-stage {
    opacity: 0;
    animation: phoneIn 1100ms var(--ease-out-soft) 240ms forwards;
  }
  @keyframes heroIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes phoneIn {
    from { opacity: 0; transform: translateY(40px) scale(0.96) rotate(-1deg); }
    to   { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
  }

  /* hero h1: staggered word mask-reveal (spans added in HTML) */
  .hero h1 .hw-in {
    opacity: 0;
    transform: translateY(120%);
    animation: wordIn 850ms var(--ease-out-soft) forwards;
  }
  .hero h1 .hw:nth-child(1) .hw-in { animation-delay: 160ms; }
  .hero h1 .hw:nth-child(2) .hw-in { animation-delay: 250ms; }
  .hero h1 .hw:nth-child(3) .hw-in { animation-delay: 340ms; }
  .hero h1 .hw:nth-child(4) .hw-in { animation-delay: 430ms; }
  @keyframes wordIn {
    from { opacity: 0; transform: translateY(120%); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* gentle background pulse behind phone */
  .phone-stage::before {
    animation: heroGlow 8s ease-in-out infinite;
  }
  @keyframes heroGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
  }

  /* progress bar fill animation when revealed (html.js set inline in <head>;
     without JS the bar stays at its full 72% base width) */
  html.js .ph-bar > div {
    width: 0;
    transition: width 1400ms var(--ease-out-soft) 500ms;
  }
  html.js .phone.is-in .ph-bar > div { width: 72%; }

  /* auto-cycling highlight across phone meal cards (script.js adds .is-hl) */
  .phone-content .ph-meal::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1.5px var(--primary);
    opacity: 0;
    transition: opacity 600ms ease;
    pointer-events: none;
  }
  .phone-content .ph-meal.is-hl::after { opacity: 1; }

  /* marquee ribbon */
  .marquee-track {
    animation: marqueeScroll 42s linear infinite;
    will-change: transform;
  }
  .marquee:hover .marquee-track { animation-play-state: paused; }
  @keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }

  /* hover lifts (+ very subtle tilt on free-standing cards) */
  .step, .feature, .palette-card, .meal-card {
    transition: transform 420ms var(--ease-spring),
                box-shadow 300ms var(--ease-out-soft);
  }
  .feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
  }
  .step:hover {
    transform: translateY(-4px) rotate(-0.35deg);
    box-shadow: var(--shadow-strong);
  }
  .step:nth-child(2):hover { transform: translateY(-4px) rotate(0.35deg); }
  .palette-card:hover {
    transform: translateY(-4px) rotate(0.5deg);
    box-shadow: var(--shadow-strong);
  }
  .palette-card:nth-child(even):hover { transform: translateY(-4px) rotate(-0.5deg); }
  .meal-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
  }

  /* magnetic CTAs: JS owns transform via rAF lerp — hand it the keys */
  .btn-primary.is-magnetic, .app-store-badge.is-magnetic {
    transition: box-shadow 220ms var(--ease-out-soft);
  }

  /* active day pill pulse */
  .day-pill.is-active {
    animation: pillPulse 3.5s ease-in-out infinite;
  }
  @keyframes pillPulse {
    0%, 100% { box-shadow: 0 4px 14px color-mix(in oklab, var(--primary) 33%, transparent); }
    50% { box-shadow: 0 6px 22px color-mix(in oklab, var(--primary) 50%, transparent); }
  }

  /* feature icon micro-animation on hover */
  .feature-icon { transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), background 200ms; }
  .feature:hover .feature-icon { transform: rotate(-6deg) scale(1.08); background: var(--primary); color: var(--bg); }

  /* step number sweep on reveal */
  .step .step-num {
    display: inline-block;
    transform-origin: bottom left;
  }
  .steps.is-in .step:nth-child(1) .step-num { animation: numIn 700ms cubic-bezier(0.34, 1.56, 0.64, 1) 200ms backwards; }
  .steps.is-in .step:nth-child(2) .step-num { animation: numIn 700ms cubic-bezier(0.34, 1.56, 0.64, 1) 320ms backwards; }
  .steps.is-in .step:nth-child(3) .step-num { animation: numIn 700ms cubic-bezier(0.34, 1.56, 0.64, 1) 440ms backwards; }
  @keyframes numIn {
    from { opacity: 0; transform: translateY(16px) rotate(-8deg) scale(0.8); }
    to   { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
  }

  /* CTA buttons: subtle shimmer */
  .btn-primary, .app-store-badge {
    position: relative;
    overflow: hidden;
  }
  .btn-primary::after, .app-store-badge::after {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.18), transparent);
    transform: skewX(-20deg);
    transition: left 700ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  .btn-primary:hover::after, .app-store-badge:hover::after {
    left: 130%;
  }

  /* nav: border emphasis on scroll + auto-hide on scroll down (script.js) */
  .nav.is-scrolled { box-shadow: 0 1px 0 var(--hair), 0 8px 24px rgba(26,25,21,0.04); }
  .nav { transition: box-shadow 240ms ease, transform 360ms var(--ease-out-soft); }
  .nav.nav-hidden { transform: translateY(calc(-100% - 2px)); }

  /* recipe card decoration float */
  .recipe-card::before {
    animation: blobFloat 9s ease-in-out infinite;
  }
  @keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-12px, 14px) scale(1.05); }
  }

  /* scroll progress hairline: pure CSS where scroll-driven animations exist
     (script.js drives the same transform as a fallback elsewhere) */
  @supports (animation-timeline: scroll()) {
    .nav-progress {
      animation: navProgress linear both;
      animation-timeline: scroll(root);
    }
    @keyframes navProgress {
      from { transform: scaleX(0); }
      to   { transform: scaleX(1); }
    }
  }
}

/* ---------- Scroll-driven reveals (progressive enhancement) ----------
   Where view() timelines exist, reveals ride the scroll position instead of
   the IO trigger. The IO still adds .is-in — it becomes a no-op here. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html.js [data-reveal] {
      opacity: 1;
      transform: none;
      transition: none;
      animation: svReveal 700ms var(--ease-out-soft) both;
      animation-timeline: view();
      animation-range: entry 0% entry 48%;
    }
    html.js [data-reveal-stagger] > * {
      opacity: 1;
      transform: none;
      transition: none;
      animation: svReveal 700ms var(--ease-out-soft) both;
      animation-timeline: view();
      animation-range: entry 0% entry 44%;
    }
    html.js [data-reveal-stagger] > *:nth-child(2) { animation-range: entry 6% entry 50%; }
    html.js [data-reveal-stagger] > *:nth-child(3) { animation-range: entry 12% entry 56%; }
    html.js [data-reveal-stagger] > *:nth-child(4) { animation-range: entry 18% entry 62%; }
    html.js [data-reveal-stagger] > *:nth-child(5) { animation-range: entry 24% entry 68%; }
    html.js [data-reveal-stagger] > *:nth-child(6) { animation-range: entry 30% entry 74%; }
    html.js [data-reveal-stagger] > *:nth-child(7) { animation-range: entry 36% entry 80%; }
    html.js [data-reveal-stagger] > *:nth-child(8) { animation-range: entry 42% entry 86%; }
    html.js [data-reveal-stagger] > *:nth-child(9) { animation-range: entry 48% entry 92%; }
    @keyframes svReveal {
      from { opacity: 0; transform: translateY(24px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
  .nav-progress { display: none; }
  .marquee-track { animation: none !important; }
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Type ---------- */
.serif { font-family: 'Instrument Serif', 'Times New Roman', Georgia, serif; font-weight: 400; }
.kicker {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}
.kicker--muted { color: var(--muted); }
.kicker--accent { color: var(--accent); }

/* ---------- Layout ---------- */
.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .shell { padding: 0 20px; } }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid var(--hair);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.wordmark {
  font-family: 'Instrument Serif', serif;
  font-size: 30px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
}
.wordmark .dot { color: var(--primary); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 120ms;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--primary);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}
.scheme-toggle {
  background: var(--surface);
  border: 1px solid var(--hair);
  color: var(--ink);
  width: 36px; height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 120ms;
}
.scheme-toggle:hover { border-color: var(--hair-strong); transform: translateY(-1px); }
@media (max-width: 720px) {
  .nav-links { gap: 16px; }
  .nav-links .nav-link-hide { display: none; }
}

/* ---------- App Store ---------- */
.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: transform 120ms, box-shadow 120ms;
  box-shadow: var(--shadow-card);
}
.app-store-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-strong); }
.app-store-badge svg { width: 28px; height: 28px; }
.app-store-badge .as-top { font-size: 11px; opacity: 0.7; line-height: 1; letter-spacing: 0.02em; }
.app-store-badge .as-bot { font-size: 18px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: var(--primary-on);
  padding: 14px 26px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 120ms, box-shadow 120ms;
  box-shadow: 0 4px 14px color-mix(in oklab, var(--primary) 33%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 28px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--support);
}
.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 40px;
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 em {
  color: var(--primary);
  font-style: italic;
}
/* word mask-reveal wrappers — visible by default, animated under motion */
.hero h1 .hw {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.hero h1 .hw-in { display: inline-block; }
.hero-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 36px;
  max-width: 520px;
}
.hero-cta-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 28px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.hero-meta-item {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-meta-item svg { width: 14px; height: 14px; color: var(--support); }

/* phone mockup */
.phone-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.phone-stage::before {
  content: '';
  position: absolute;
  width: 120%;
  height: 80%;
  background: radial-gradient(ellipse at center, color-mix(in oklab, var(--primary) 18%, transparent) 0%, transparent 65%);
  filter: blur(40px);
  z-index: 0;
}

/* ---------- Marquee ribbon ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  background: var(--surface);
  padding: 14px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
}
.marquee-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.marquee-list li {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.marquee-list li::after {
  content: '·';
  margin: 0 22px;
  color: var(--faint);
  font-size: 14px;
}
.mq-dish {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.mq-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Section ---------- */
section { padding: 90px 0; }
@media (max-width: 720px) { section { padding: 60px 0; } }
.section-head {
  margin-bottom: 56px;
  max-width: 700px;
}
.section-head .kicker { margin-bottom: 18px; display: block; }
.section-head h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.section-head h2 em { color: var(--primary); font-style: italic; }
.section-head p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  max-width: 580px;
  line-height: 1.55;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; gap: 20px; } }
.step {
  background: var(--surface);
  border-radius: 22px;
  padding: 32px 28px 28px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.step-num {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 64px;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 24px;
  display: block;
}
.step h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.1;
}
.step h3 em { color: var(--primary); font-style: italic; }
.step p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 24px;
  overflow: hidden;
}
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}
.feature-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--tint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--primary);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  line-height: 1.15;
}
.feature p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* ---------- Sample week ---------- */
.week-frame {
  background: var(--surface);
  border-radius: 28px;
  padding: 40px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--hair);
}
@media (max-width: 720px) { .week-frame { padding: 24px; } }
.week-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 20px;
}
.week-title {
  font-family: 'Instrument Serif', serif;
  font-size: 40px;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
}
.week-title em { color: var(--primary); font-style: italic; }
.week-meta {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}
.day-pills {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}
.day-pill {
  padding: 14px 6px;
  text-align: center;
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow-card);
}
.day-pill.is-active {
  background: var(--primary);
  color: var(--primary-on);
  box-shadow: 0 4px 14px color-mix(in oklab, var(--primary) 33%, transparent);
}
.day-pill .day-letter {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}
.day-pill .day-kcal {
  font-family: 'Instrument Serif', serif;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.day-pill:not(.is-active) .day-letter { color: var(--muted); }

.meal-list {
  display: grid;
  gap: 12px;
}
.meal-card {
  background: var(--bg);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 18px;
  align-items: center;
}
.meal-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.meal-icon svg { width: 18px; height: 18px; }
.meal-slot {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}
.meal-title {
  font-family: 'Instrument Serif', serif;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  line-height: 1.2;
}
.meal-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--chip-bg);
  color: var(--ink);
  padding: 3px 9px;
  border-radius: 999px;
}
.meal-kcal {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  color: var(--primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ---------- Recipe spotlight ---------- */
.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 900px) { .spotlight { grid-template-columns: 1fr; gap: 40px; } }
.recipe-card {
  background: var(--primary);
  color: var(--primary-on);
  border-radius: 28px;
  padding: 40px;
  box-shadow: var(--shadow-strong);
  position: relative;
  overflow: hidden;
}
.recipe-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.recipe-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
  display: block;
  margin-bottom: 18px;
  position: relative;
}
.recipe-card h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 48px;
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
  position: relative;
}
.recipe-card h3 em { font-style: italic; opacity: 0.92; }
.recipe-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 24px;
  margin-top: 24px;
}
.recipe-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
  display: block;
  margin-bottom: 6px;
}
.recipe-stat-value {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  line-height: 1;
}

.spotlight-text h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 40px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 20px;
}
.spotlight-text h3 em { color: var(--primary); font-style: italic; }
.spotlight-text p {
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.6;
  margin: 0 0 14px;
}
.spotlight-text .quote {
  margin-top: 28px;
  padding-left: 20px;
  border-left: 2px solid var(--primary);
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 21px;
  color: var(--ink);
  line-height: 1.4;
}

/* ---------- Palette showcase ---------- */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .palette-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .palette-grid { grid-template-columns: 1fr; } }
.palette-card {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--hair);
}
.palette-swatch {
  height: 140px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.palette-mark {
  font-family: 'Instrument Serif', serif;
  font-size: 60px;
  line-height: 0.85;
  letter-spacing: -0.04em;
}
.palette-info {
  padding: 18px 20px 22px;
  background: var(--surface);
}
.palette-info .name {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  letter-spacing: -0.015em;
  margin: 0 0 4px;
}
.palette-info .meta {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.palette-dots {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.palette-dots span {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.06);
}

/* ---------- CTA ---------- */
.cta-block {
  text-align: center;
  padding: 100px 0;
}
.cta-block h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: 0 0 28px;
  text-wrap: balance;
}
.cta-block h2 em { color: var(--primary); font-style: italic; }
.cta-block p {
  color: var(--muted);
  font-size: 18px;
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--hair);
  padding: 56px 0 40px;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
.footer-brand .wordmark { font-size: 36px; }
.footer-brand p {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 22px;
  max-width: 280px;
  line-height: 1.55;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 16px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 120ms;
}
.footer-col a:hover { color: var(--ink); }
.footer-base {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Phone mockup (CSS-drawn) ---------- */
.phone {
  width: 320px;
  aspect-ratio: 320 / 660;
  background: var(--bg);
  border-radius: 46px;
  position: relative;
  box-shadow:
    0 0 0 9px #1a1a1a,
    0 0 0 10px rgba(255,255,255,0.06),
    0 30px 80px rgba(26,25,21,0.20),
    0 12px 30px rgba(26,25,21,0.10);
  overflow: hidden;
  z-index: 1;
}
.phone-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 18px;
  z-index: 5;
}
.phone-content {
  position: absolute;
  inset: 0;
  padding: 50px 18px 18px;
  overflow: hidden;
}
.phone-content .ph-mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.phone-content .ph-mast .wordmark { font-size: 22px; }
.phone-content .ph-mast .ph-icons {
  display: flex; gap: 6px;
}
.phone-content .ph-mast .ph-icons span {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface);
  display: inline-block;
  box-shadow: var(--shadow-card);
}
.phone-content .ph-kicker {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.phone-content .ph-num {
  font-family: 'Instrument Serif', serif;
  font-size: 28px;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.phone-content .ph-num em { color: var(--muted); font-style: italic; }
.phone-content .ph-bar {
  height: 4px;
  background: var(--tint);
  border-radius: 100px;
  margin-bottom: 14px;
  overflow: hidden;
}
.phone-content .ph-bar > div {
  width: 72%;
  height: 100%;
  background: var(--primary);
  border-radius: 100px;
}
.phone-content .ph-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}
.phone-content .ph-day {
  background: var(--surface);
  border-radius: 9px;
  padding: 6px 2px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.phone-content .ph-day.is-active {
  background: var(--primary);
  color: var(--primary-on);
}
.phone-content .ph-day .ph-d-letter {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.14em;
  display: block;
  color: var(--muted);
}
.phone-content .ph-day.is-active .ph-d-letter { color: var(--primary-on); opacity: 0.85; }
.phone-content .ph-day .ph-d-num {
  font-family: 'Instrument Serif', serif;
  font-size: 11px;
}
.phone-content .ph-day-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 12px;
}
.phone-content .ph-day-title {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1;
}
.phone-content .ph-day-title em { color: var(--primary); font-style: italic; }
.phone-content .ph-meal {
  background: var(--surface);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.phone-content .ph-meal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.phone-content .ph-slot {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.phone-content .ph-meal-kcal {
  font-family: 'Instrument Serif', serif;
  font-size: 18px;
  color: var(--primary);
  line-height: 1;
}
.phone-content .ph-meal-title {
  font-family: 'Instrument Serif', serif;
  font-size: 14px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  line-height: 1.2;
}
.phone-content .ph-mini-chips {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.phone-content .ph-mini-chips span {
  font-size: 8px;
  font-weight: 600;
  background: var(--chip-bg);
  padding: 1px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.phone-content .ph-quote {
  background: var(--ink);
  color: var(--bg);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
}
.phone-content .ph-quote .ph-q-kicker {
  font-size: 8px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.phone-content .ph-quote p {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 12px;
  margin: 0;
  line-height: 1.35;
}

/* ---------- Document pages (privacy/terms) ---------- */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 0 100px;
}
.doc h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(44px, 6vw, 72px);
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin: 0 0 12px;
  font-weight: 400;
}
.doc h1 em { color: var(--primary); font-style: italic; }
.doc .doc-updated {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 48px;
  letter-spacing: 0.02em;
}
.doc h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 56px 0 16px;
  font-weight: 400;
}
.doc h2::before {
  content: attr(data-num);
  font-size: 11px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.2em;
  color: var(--primary);
  display: block;
  margin-bottom: 10px;
}
.doc p, .doc li {
  font-size: 16px;
  color: var(--ink);
  line-height: 1.65;
}
.doc p { margin: 0 0 16px; }
.doc strong { font-weight: 600; }
.doc ul { padding-left: 22px; margin: 0 0 20px; }
.doc li { margin-bottom: 8px; }
.doc a { color: var(--primary); }
.doc-toc {
  background: var(--surface);
  border-radius: 18px;
  padding: 24px 28px;
  margin: 32px 0 48px;
  border: 1px solid var(--hair);
}
.doc-toc h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 14px;
}
.doc-toc ol {
  margin: 0; padding: 0;
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
@media (max-width: 600px) { .doc-toc ol { grid-template-columns: 1fr; } }
.doc-toc li {
  counter-increment: toc;
  font-size: 14px;
  margin: 0;
}
.doc-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--primary);
  margin-right: 10px;
  font-variant-numeric: tabular-nums;
}
.doc-toc a { color: var(--ink); text-decoration: none; }
.doc-toc a:hover { color: var(--primary); }

/* ---------- Variant chooser banner ---------- */
.variant-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--hair);
}
.variant-bar a {
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--muted);
}
.variant-bar a.is-active {
  background: var(--ink);
  color: var(--bg);
}
