/* ============================================================
   NIRRA WEBSITE — Editorial wellness aesthetic
   Tokens drawn from the app's "Refined" palette (Material green
   on warm cream) with Fraunces serif as the editorial voice.
   ============================================================ */

:root {
  /* Brand — Refined palette from src/core/theme/colors.ts */
  --green-50:  #ecf6ed;
  --green-100: #d3ebd5;
  --green-300: #66BB6A;
  --green-500: #43A047;
  --green-700: #2E7D32;
  --green-900: #1B5E20;

  --cream-50:  #fdfcf9;
  --cream-100: #faf8f5;
  --cream-200: #f1eeeb;
  --cream-300: #e7e2db;
  --cream-400: #c8c2ba;

  --ink-900: #0f172a;
  --ink-700: #1e293b;
  --ink-500: #475569;
  --ink-400: #64748b;
  --ink-300: #94a3b8;
  --ink-200: #cbd5e1;

  /* Macros */
  --m-protein: #0ea5e9;
  --m-carbs:   #f59e0b;
  --m-fat:     #78909C;
  --m-fiber:   #a78bfa;

  /* Verdict */
  --v-great-bg:   #d1fae5;
  --v-great-ink:  #065f46;
  --v-good-bg:    #dbeafe;
  --v-good-ink:   #1e40af;
  --v-skip-bg:    #fee2e2;
  --v-skip-ink:   #991b1b;
  --v-warn-bg:    #fef3c7;
  --v-warn-ink:   #92400e;

  /* Type */
  --serif: 'Fraunces', 'Iowan Old Style', 'Georgia', serif;
  --sans:  'Geist', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --mono:  'Geist Mono', 'IBM Plex Mono', monospace;

  /* Layout */
  --max-w: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-xl: 44px;
}

/* ---------------------------------------------------------
   Resets & base
   --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--cream-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
em { font-style: italic; }

::selection { background: var(--green-500); color: white; }

/* Subtle film grain overlay */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: .035; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------
   NAV
   --------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 24px;
  padding: 16px var(--gutter);
  background: color-mix(in oklab, var(--cream-100) 88%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, padding .3s ease;
}
.nav.is-stuck { border-bottom-color: rgba(15,23,42,.06); padding-block: 12px; }

.nav__brand { display: inline-flex; align-items: center; gap: 10px; }
.nav__mark {
  width: 28px;
  height: 28px;
  color: var(--green-700); /* drives `stroke="currentColor"` on the palm-frond paths */
  transition: color .35s ease;
}
.nav__word {
  font-family: var(--serif); font-weight: 600; font-size: 24px;
  letter-spacing: -0.02em; font-variation-settings: "opsz" 60, "SOFT" 50;
}

.nav__links { display: flex; gap: 28px; justify-content: center; }
.nav__links a {
  font-size: 14px; color: var(--ink-500); position: relative;
  transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: var(--green-500);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav__links a:hover { color: var(--ink-900); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink-900); color: var(--cream-50);
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  transition: transform .25s ease, background .2s;
}
.nav__cta:hover { transform: translateY(-1px); background: var(--green-700); }
.nav__cta svg { width: 14px; height: 14px; transition: transform .25s; }
.nav__cta:hover svg { transform: translateX(3px); }

@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav { grid-template-columns: auto 1fr auto; }
}

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(12px, 2vw, 24px) var(--gutter) 0;
  overflow: hidden;
}
.hero::before {
  /* warm sun gradient bleed */
  content: ""; position: absolute;
  top: -200px; right: -200px; width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(255,196,120,.4), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero::after {
  content: ""; position: absolute;
  bottom: -300px; left: -200px; width: 640px; height: 640px;
  background: radial-gradient(closest-side, rgba(67,160,71,.18), transparent 70%);
  pointer-events: none; z-index: 0;
}

.hero__inner {
  position: relative; z-index: 1;
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding-block: clamp(20px, 4vw, 56px);
}

.hero__copy { max-width: 580px; }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 999px;
  background: white; border: 1px solid var(--cream-300);
  font-size: 13px; color: var(--ink-500);
  box-shadow: 0 1px 0 rgba(15,23,42,.04);
}
.hero__eyebrow .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--green-500); box-shadow: 0 0 0 4px rgba(67,160,71,.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(67,160,71,.18); }
  50%       { box-shadow: 0 0 0 7px rgba(67,160,71,.0); }
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(54px, 8.5vw, 120px);
  line-height: .92;
  letter-spacing: -0.035em;
  margin: 28px 0 24px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.hero__title-soft { color: var(--ink-500); font-style: italic; font-weight: 300; }
.hero__period { color: var(--green-500); }
.hero__accent { display: inline-block; position: relative; }
.hero__accent em {
  font-style: italic; font-weight: 500;
  background: linear-gradient(105deg, var(--green-700) 30%, var(--green-500) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__underline {
  position: absolute; left: -2%; right: -4%; bottom: -8px;
  width: 108%; height: 14px; color: var(--green-300);
  opacity: .8;
}

.hero__lede {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-500); line-height: 1.6;
  max-width: 50ch; margin: 0 0 36px;
}

.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }

/* App store badges */
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  background: var(--ink-900); color: white;
  border-radius: 14px;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 4px 14px rgba(15,23,42,.12);
}
.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15,23,42,.18);
}
.store-badge svg { width: 26px; height: 26px; }
.store-badge span { display: flex; flex-direction: column; line-height: 1; gap: 3px; text-align: left; }
.store-badge em { font-style: normal; font-size: 10px; opacity: .7; letter-spacing: .04em; text-transform: uppercase; }
.store-badge strong { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.store-badge--lg { padding: 16px 28px; }
.store-badge--lg svg { width: 30px; height: 30px; }
.store-badge--lg strong { font-size: 18px; }

.hero__proof {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-500);
}
.rating { display: inline-flex; align-items: center; gap: 8px; }
.stars { color: #f59e0b; letter-spacing: 1px; font-size: 14px; }
.proof-divider { width: 1px; height: 14px; background: var(--cream-400); }
.proof-text { color: var(--ink-400); }

/* ---------- HERO DEVICE ---------- */
.hero__device-wrap {
  position: relative; justify-self: center;
  perspective: 1400px;
}
.hero__halo {
  position: absolute; inset: -10% -20%;
  background:
    radial-gradient(closest-side, rgba(67,160,71,.22), transparent 70%),
    radial-gradient(closest-side at 70% 80%, rgba(255,180,80,.25), transparent 65%);
  filter: blur(40px);
  z-index: -1;
}

/* PHONE MOCKUP */
.phone {
  --phone-w: 320px;
  width: var(--phone-w);
  filter: drop-shadow(0 30px 60px rgba(15,23,42,.18)) drop-shadow(0 8px 20px rgba(15,23,42,.1));
  transform-style: preserve-3d;
  animation: floaty 7s ease-in-out infinite;
}
.phone--hero {
  transform: rotate(-2deg) rotateY(-6deg) rotateX(4deg);
}
.phone--track {
  transform: rotate(3deg) rotateY(8deg) rotateX(-3deg);
  --phone-w: 300px;
}
@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -12px; }
}

.phone__frame {
  position: relative;
  background: linear-gradient(160deg, #2a2f3a, #0f1318);
  padding: 12px;
  border-radius: 48px;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.06),
    inset 0 0 0 4px rgba(0,0,0,.2);
}
.phone__notch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 26px;
  background: #0a0c10; border-radius: 999px;
  z-index: 2;
}
.phone__screen {
  position: relative;
  background: var(--cream-100);
  border-radius: 36px;
  overflow: hidden;
  height: 640px;
}

/* SCREEN — common */
.screen {
  position: relative;
  height: 100%;
  padding: 60px 16px 16px;
  display: flex; flex-direction: column; gap: 14px;
  font-family: var(--sans);
  font-size: 13px;
}
.screen__status {
  position: absolute; top: 18px; left: 22px; right: 22px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 600; color: var(--ink-900);
  z-index: 3;
}
.screen__status-dots { display: inline-flex; align-items: end; gap: 4px; color: var(--ink-900); }
.screen__status-dots .bar {
  width: 3px; background: var(--ink-900); border-radius: 1px;
}
.screen__status-dots .bar:nth-child(1) { height: 4px; opacity: .7; }
.screen__status-dots .bar:nth-child(2) { height: 6px; }
.screen__status-dots .bar:nth-child(3) { height: 8px; }
.screen__status-dots svg { width: 14px; height: 11px; margin-left: 2px; }

/* RESULT SCREEN */
.screen--result { padding-top: 56px; }
.screen__hero {
  display: flex; gap: 12px; align-items: center;
  background: white; border-radius: 18px;
  padding: 12px;
  border: 1px solid rgba(15,23,42,.05);
}
.screen__meal-img {
  width: 64px; height: 64px; flex-shrink: 0;
  border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, #fed7aa, #f59e0b);
  font-size: 30px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.4);
}
.screen__meal-emoji { line-height: 1; }
.screen__meal-meta { flex: 1; min-width: 0; }
.screen__meal-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-400); margin: 0 0 3px; }
.screen__meal-name { font-family: var(--serif); font-weight: 500; font-size: 16px; margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.screen__meal-cal { font-size: 11px; color: var(--ink-400); margin: 4px 0 0; }

/* VERDICT */
.verdict {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid transparent;
}
.verdict--great { background: var(--v-great-bg); border-color: rgba(6,95,70,.12); color: var(--v-great-ink); }
.verdict--good  { background: var(--v-good-bg);  border-color: rgba(30,64,175,.12); color: var(--v-good-ink); }
.verdict--skip  { background: var(--v-skip-bg);  border-color: rgba(153,27,27,.15);  color: var(--v-skip-ink); }
.verdict--warn  { background: var(--v-warn-bg);  border-color: rgba(146,64,14,.15);  color: var(--v-warn-ink); }

.verdict__badge {
  width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center; flex-shrink: 0;
  background: rgba(255,255,255,.5);
}
.verdict__badge svg { width: 22px; height: 22px; }
.verdict__text { flex: 1; min-width: 0; }
.verdict__label { font-family: var(--serif); font-size: 16px; font-weight: 500; margin: 0; letter-spacing: -.01em; line-height: 1.1; }
.verdict__why { font-size: 11px; opacity: .85; margin: 4px 0 0; line-height: 1.3; }
.verdict__score { display: flex; align-items: baseline; gap: 1px; }
.verdict__score strong { font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1; }
.verdict__score span { font-size: 11px; opacity: .6; }

.verdict--lg {
  padding: 18px 18px;
  border-radius: 20px;
}
.verdict--lg .verdict__badge { width: 44px; height: 44px; }
.verdict--lg .verdict__badge svg { width: 26px; height: 26px; }
.verdict--lg .verdict__label { font-size: 19px; }
.verdict--lg .verdict__why { font-size: 13px; }

/* RINGS / MACROS */
.screen__rings {
  background: white; border-radius: 18px;
  padding: 14px; display: flex; gap: 14px; align-items: center;
  border: 1px solid rgba(15,23,42,.05);
}
.ring {
  position: relative; width: 56px; height: 56px;
  flex-shrink: 0;
}
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring__track { fill: none; stroke: var(--cream-200); stroke-width: 5; }
.ring__bar {
  fill: none; stroke: var(--green-500); stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: calc(2 * 3.14159 * 22);
  stroke-dashoffset: calc(2 * 3.14159 * 22 * (1 - var(--p) / 100));
  transition: stroke-dashoffset 1.4s cubic-bezier(.4,0,.2,1);
}
.ring__center {
  position: absolute; inset: 0; display: grid; place-items: center;
  text-align: center; font-size: 9px; line-height: 1.2;
}
.ring__center strong { font-family: var(--serif); font-size: 13px; font-weight: 500; display: block; }
.ring__center span { color: var(--ink-400); font-size: 8px; }

.ring--big { width: 110px; height: 110px; }
.ring--big .ring__track,
.ring--big .ring__bar {
  stroke-width: 8;
  stroke-dasharray: calc(2 * 3.14159 * 42);
  stroke-dashoffset: calc(2 * 3.14159 * 42 * (1 - var(--p) / 100));
}
.ring--big .ring__center strong { font-size: 22px; }
.ring--big .ring__center span { font-size: 9px; }

.screen__macros { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.screen__macros--col { gap: 10px; }
.macro {
  display: flex; align-items: center; gap: 10px;
}
.macro__bar {
  display: block; flex: 1; height: 6px; border-radius: 999px;
  background: var(--cream-200); overflow: hidden;
}
.macro__bar i {
  display: block; height: 100%; width: var(--p);
  border-radius: 999px;
  transition: width 1.4s cubic-bezier(.4,0,.2,1);
}
.macro--protein .macro__bar i { background: var(--m-protein); }
.macro--carbs .macro__bar i   { background: var(--m-carbs); }
.macro--fat .macro__bar i     { background: var(--m-fat); }
.macro div { display: flex; align-items: baseline; gap: 4px; min-width: 76px; }
.macro strong { font-family: var(--serif); font-size: 13px; font-weight: 500; }
.macro em { font-size: 10px; color: var(--ink-400); font-style: normal; }

/* HOME SCREEN extras */
.screen__greet { padding: 0 4px; }
.screen__greet p { font-size: 11px; color: var(--ink-400); margin: 0; text-transform: uppercase; letter-spacing: .06em; }
.screen__greet h4 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 4px 0 0; letter-spacing: -.01em; }

.screen__strip {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  padding: 10px; background: white; border-radius: 14px;
  border: 1px solid rgba(15,23,42,.05);
}
.screen__strip span {
  text-align: center; font-size: 10px; padding: 6px 4px; border-radius: 8px;
  color: var(--ink-400);
}
.screen__strip .active {
  background: var(--green-500); color: white; font-weight: 600;
}

.screen__big-card {
  background: white; padding: 16px; border-radius: 18px;
  display: flex; gap: 14px; align-items: center;
  border: 1px solid rgba(15,23,42,.05);
}
.big-rings { flex-shrink: 0; }

.screen__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini {
  background: white; padding: 10px 12px; border-radius: 14px;
  border: 1px solid rgba(15,23,42,.05);
  display: flex; flex-direction: column; gap: 6px;
}
.mini__label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-400); }
.mini__big { font-family: var(--serif); font-weight: 500; font-size: 18px; line-height: 1; }
.mini__big em { font-size: 10px; color: var(--ink-400); font-weight: 400; font-style: normal; margin-left: 4px; }

.water { display: flex; gap: 3px; }
.water span {
  flex: 1; height: 14px; border-radius: 4px;
  background: var(--cream-200); border: 1px solid rgba(15,23,42,.04);
}
.water .full { background: var(--m-protein); border-color: var(--m-protein); }

.screen__diary {
  background: white; border-radius: 14px; padding: 8px;
  border: 1px solid rgba(15,23,42,.05);
  display: flex; flex-direction: column; gap: 4px;
}
.diary-row {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center;
  padding: 6px;
}
.diary-row__icon {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--cream-200); font-size: 16px;
}
.diary-row__text strong { font-size: 12px; font-weight: 500; display: block; line-height: 1.1; }
.diary-row__text em { font-size: 10px; color: var(--ink-400); font-style: normal; }
.diary-row__score {
  font-family: var(--serif); font-size: 14px; font-weight: 500;
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
}
.s-good { background: var(--v-great-bg); color: var(--v-great-ink); }
.s-okay { background: var(--v-good-bg); color: var(--v-good-ink); }

/* FLOATING CHIPS around hero phone */
.float-chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: white; box-shadow: 0 8px 24px rgba(15,23,42,.12);
  font-size: 12px; font-weight: 500; color: var(--ink-700);
  border: 1px solid rgba(15,23,42,.05);
  animation: floatChip 5s ease-in-out infinite;
  white-space: nowrap;
  width: max-content;
}
.float-chip svg { width: 14px; height: 14px; color: var(--green-500); }
.float-chip .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--green-500); }
.float-chip .dot--warn { background: var(--m-carbs); }

/* Chips anchor on the OUTSIDE of the phone (not over it) — right:100% pins
   the chip's right edge to the phone's left edge, then a tiny gap. */
.float-chip--scan      { top: 11%;  right: 100%; margin-right: 14px; animation-delay: 0s; }
.float-chip--mic       { bottom: 22%; right: 100%; margin-right: 14px; animation-delay: 1.4s; }
.float-chip--allergen  { top: 36%;  left: 100%;  margin-left: 14px;  animation-delay: .7s; }

/* Uses the `translate` property instead of `transform` so chip-specific
   `transform: translateX(...)` overrides at narrow widths don't conflict. */
@keyframes floatChip {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -8px; }
}

/* MARQUEE */
.marquee {
  position: relative;
  margin-top: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--cream-300);
  border-bottom: 1px solid var(--cream-300);
  padding: 22px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee__inner {
  display: inline-flex; gap: 36px; white-space: nowrap;
  animation: marquee 36s linear infinite;
  font-size: 13px; color: var(--ink-400);
  text-transform: uppercase; letter-spacing: .14em; font-weight: 500;
}
.marquee__inner span { flex-shrink: 0; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------------------------------------------------------
   SECTION HEADS (shared)
   --------------------------------------------------------- */
.section-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head--center { margin-inline: auto; text-align: center; }
.section-head__num {
  display: inline-block;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: var(--green-700); padding: 4px 10px; border-radius: 999px;
  background: var(--green-50); border: 1px solid color-mix(in oklab, var(--green-700) 14%, transparent);
}
.section-head__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 5.4vw, 72px); line-height: 1.02;
  letter-spacing: -.03em;
  margin: 16px 0 18px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.section-head__title em { font-style: italic; color: var(--ink-500); font-weight: 300; }
.section-head__lede {
  font-size: clamp(15px, 1.3vw, 18px);
  color: var(--ink-500); line-height: 1.6;
  margin: 0; max-width: 60ch;
}
.section-head--center .section-head__lede { margin-inline: auto; }

/* ---------------------------------------------------------
   HOW (capture modes)
   --------------------------------------------------------- */
.how {
  padding: clamp(60px, 8vw, 120px) var(--gutter);
  max-width: var(--max-w); margin: 0 auto;
}

.modes {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.mode {
  position: relative;
  padding: 28px 24px 24px;
  background: white; border-radius: var(--radius-lg);
  border: 1px solid rgba(15,23,42,.05);
  display: flex; flex-direction: column;
  gap: 14px; min-height: 280px;
  transition: transform .35s ease, box-shadow .35s ease;
  overflow: hidden;
}
.mode::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% -10%, rgba(67,160,71,.06), transparent 40%);
  opacity: 0; transition: opacity .3s;
}
.mode:hover { transform: translateY(-4px); box-shadow: 0 24px 50px rgba(15,23,42,.08); }
.mode:hover::before { opacity: 1; }
.mode__num {
  font-family: var(--mono); font-size: 11px; color: var(--ink-400);
  letter-spacing: .14em;
}
.mode__icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--cream-100); color: var(--green-700);
  border: 1px solid var(--cream-300);
}
.mode__icon svg { width: 28px; height: 28px; }
.mode h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 28px; letter-spacing: -.02em;
  margin: 0; line-height: 1.05;
}
.mode p {
  font-size: 14px; color: var(--ink-500); line-height: 1.55;
  margin: 0; flex: 1;
}
.mode__chip {
  align-self: flex-start;
  font-family: var(--mono); font-size: 11px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--green-50); color: var(--green-700);
  border: 1px solid color-mix(in oklab, var(--green-700) 14%, transparent);
}

/* Tinted icon-bg per mode */
.mode--scan   .mode__icon { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #047857; border-color: #d1fae5; }
.mode--photo  .mode__icon { background: linear-gradient(135deg, #fff7ed, #fed7aa); color: #9a3412; border-color: #fed7aa; }
.mode--voice  .mode__icon { background: linear-gradient(135deg, #eff6ff, #bfdbfe); color: #1e40af; border-color: #bfdbfe; }
.mode--search .mode__icon { background: linear-gradient(135deg, #f5f3ff, #ddd6fe); color: #6d28d9; border-color: #ddd6fe; }
.mode--ocr    .mode__icon { background: linear-gradient(135deg, #fef2f2, #fecaca); color: #b91c1c; border-color: #fecaca; }
.mode--recipe .mode__icon { background: linear-gradient(135deg, #f0fdfa, #99f6e4); color: #0f766e; border-color: #99f6e4; }

@media (max-width: 920px) { .modes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .modes { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------
   FIT (Personal Fit V2 — the killer section)
   --------------------------------------------------------- */
.fit {
  padding: clamp(60px, 8vw, 120px) var(--gutter);
  background:
    linear-gradient(180deg, transparent, rgba(67,160,71,.045) 30%, transparent),
    var(--cream-100);
  position: relative;
  overflow: hidden;
}
.fit::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(255,180,80,.18), transparent 28%),
    radial-gradient(circle at 88% 80%, rgba(67,160,71,.18), transparent 32%);
  pointer-events: none;
}

.fit > * { position: relative; }

.fit__compare {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  position: relative;
}
.fit__compare::after {
  /* Connecting line illustrating "same meal" */
  content: "Same meal";
  position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: var(--ink-400); background: var(--cream-100);
  padding: 6px 14px; border-radius: 999px;
  border: 1px dashed var(--cream-400);
  text-transform: uppercase;
  z-index: 2;
}

.fit__card {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid rgba(15,23,42,.06);
  padding: 28px;
  display: flex; flex-direction: column; gap: 20px;
  box-shadow: 0 18px 40px rgba(15,23,42,.06);
}

.fit__profile {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--cream-200);
}
.avatar {
  width: 48px; height: 48px; border-radius: 999px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c1, #FB923C), var(--c2, #EA580C));
  color: white; font-family: var(--serif); font-size: 22px; font-weight: 500;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.fit__profile strong { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.fit__profile p { margin: 2px 0 0; font-size: 12px; color: var(--ink-400); }

.fit__meal {
  display: flex; align-items: center; gap: 14px;
  background: var(--cream-100); border-radius: 16px;
  padding: 14px;
}
.fit__meal-img {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(135deg, #fed7aa, #f59e0b);
  display: grid; place-items: center; font-size: 26px;
  flex-shrink: 0;
}
.fit__meal-name { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 16px; line-height: 1.1; }
.fit__meal-sub { margin: 4px 0 0; font-size: 12px; color: var(--ink-400); }

.fit__points { display: flex; flex-direction: column; gap: 10px; }
.fit__points li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink-700);
}
.dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.dot--ok  { background: var(--green-500); }
.dot--bad { background: #ef4444; }
.dot--warn { background: var(--m-carbs); }

.fit__profile-strip {
  max-width: var(--max-w); margin: 56px auto 0;
  text-align: center;
}
.fit__profile-label { font-size: 14px; color: var(--ink-500); margin-bottom: 16px; }
.fit__profile-tags {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.fit__profile-tags li {
  padding: 8px 14px; border-radius: 999px;
  background: white; border: 1px solid var(--cream-300);
  font-size: 13px; color: var(--ink-700);
}
.fit__profile-tags .more { color: var(--green-700); border-color: var(--green-300); background: var(--green-50); }

@media (max-width: 880px) {
  .fit__compare { grid-template-columns: 1fr; }
  .fit__compare::after { display: none; }
}

/* ---------------------------------------------------------
   TRACK section
   --------------------------------------------------------- */
.track {
  padding: clamp(60px, 8vw, 120px) var(--gutter);
}
.track__inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.track__list {
  margin-top: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.track__list li {
  font-size: 16px; color: var(--ink-500); line-height: 1.55;
  padding-left: 20px; position: relative;
}
.track__list li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 8px; height: 1px; background: var(--green-500);
}
.track__list strong { color: var(--ink-900); font-weight: 500; }

.track__device {
  justify-self: center;
  perspective: 1400px;
}

@media (max-width: 880px) {
  .track__inner { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------
   NUMBERS strip
   --------------------------------------------------------- */
.numbers {
  padding: clamp(40px, 6vw, 80px) var(--gutter);
  background: var(--ink-900); color: var(--cream-50);
  position: relative; overflow: hidden;
}
.numbers::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(67,160,71,.18), transparent 35%),
    radial-gradient(circle at 90% 90%, rgba(255,180,80,.12), transparent 35%);
  pointer-events: none;
}
.numbers__grid {
  position: relative;
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.num strong {
  display: block;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 6vw, 80px); line-height: 1;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--green-300), var(--cream-50) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.num p {
  margin: 14px 0 0;
  font-size: 14px; line-height: 1.55; color: var(--ink-300);
  max-width: 26ch;
}
@media (max-width: 800px) { .numbers__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }

/* ---------------------------------------------------------
   THEMES
   --------------------------------------------------------- */
.themes {
  padding: clamp(60px, 8vw, 120px) var(--gutter);
  max-width: var(--max-w); margin: 0 auto;
}
.themes__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.theme {
  background: white;
  border: 1px solid var(--cream-300);
  border-radius: var(--radius-md);
  padding: 16px; text-align: left;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.theme:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(15,23,42,.08); }
.theme[aria-pressed="true"] { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(67,160,71,.14); }
.theme strong { font-family: var(--serif); font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.theme em { font-size: 12px; color: var(--ink-400); font-style: normal; line-height: 1.4; }
.theme__swatch {
  height: 90px; border-radius: 12px;
  background: linear-gradient(135deg, var(--cream-100), white);
  border: 1px solid var(--cream-300);
  position: relative; overflow: hidden;
}
.theme__swatch::before, .theme__swatch::after {
  content: ""; position: absolute; border-radius: 999px;
}
.theme__swatch::before { width: 36px; height: 36px; bottom: 12px; left: 12px; background: var(--swatch-primary); }
.theme__swatch::after  { width: 18px; height: 18px; bottom: 14px; left: 56px; background: var(--swatch-accent); opacity: .85; }

.theme--refined  { --swatch-primary: #43A047; --swatch-accent: #f59e0b; }
.theme--refined .theme__swatch  { background: linear-gradient(135deg, #faf8f5, #f1eeeb); }
.theme--ocean    { --swatch-primary: #0891B2; --swatch-accent: #6366F1; }
.theme--ocean .theme__swatch    { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); }
.theme--sunset   { --swatch-primary: #EA580C; --swatch-accent: #EAB308; }
.theme--sunset .theme__swatch   { background: linear-gradient(135deg, #FFF7ED, #FFEDD5); }
.theme--midnight { --swatch-primary: #4ADE80; --swatch-accent: #FBBF24; }
.theme--midnight .theme__swatch { background: linear-gradient(135deg, #1E293B, #0F172A); }
.theme--midnight strong, .theme--midnight em { color: var(--ink-900); }

@media (max-width: 880px) { .themes__grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------------
   BUILT FOR
   --------------------------------------------------------- */
.builtfor {
  padding: clamp(60px, 8vw, 120px) var(--gutter);
  background: var(--cream-200);
}
.builtfor__inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start;
}
.builtfor__cols {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.builtfor__col h4 {
  font-family: var(--serif); font-weight: 500; font-size: 18px;
  margin: 0 0 12px; letter-spacing: -.01em;
  padding-bottom: 8px; border-bottom: 1px solid var(--cream-400);
}
.builtfor__col ul { display: flex; flex-direction: column; gap: 6px; }
.builtfor__col li { font-size: 14px; color: var(--ink-700); }

@media (max-width: 880px) {
  .builtfor__inner { grid-template-columns: 1fr; gap: 32px; }
  .builtfor__cols { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------
   PRICING
   --------------------------------------------------------- */
.pricing {
  padding: clamp(60px, 8vw, 120px) var(--gutter);
  max-width: var(--max-w); margin: 0 auto;
}
.plans {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  max-width: 920px; margin: 0 auto;
}
.plan {
  background: white; border: 1px solid var(--cream-300);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex; flex-direction: column; gap: 24px;
}
.plan--pro {
  background: var(--ink-900); color: var(--cream-50);
  border-color: var(--ink-900);
  position: relative;
  box-shadow: 0 30px 60px rgba(15,23,42,.18);
  transform: rotate(-.4deg);
}
.plan__head .plan__eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-400); margin: 0;
  display: inline-flex; align-items: center; gap: 8px;
}
.plan--pro .plan__eyebrow { color: var(--green-300); }
.plan__tag {
  font-family: var(--sans); text-transform: none; letter-spacing: 0;
  background: var(--green-500); color: white;
  padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 500;
}
.plan__price {
  font-family: var(--serif); font-weight: 400;
  font-size: 56px; line-height: 1; margin: 12px 0 0;
  letter-spacing: -.03em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.plan__price em { font-style: italic; font-size: 18px; color: var(--ink-400); font-weight: 300; }
.plan--pro .plan__price em { color: var(--ink-300); }
.plan__sub { font-size: 13px; color: var(--ink-400); margin: 8px 0 0; }
.plan--pro .plan__sub { color: var(--ink-300); }

.plan__list {
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.plan__list li {
  font-size: 15px; color: var(--ink-500); line-height: 1.55;
  padding-left: 24px; position: relative;
}
.plan--pro .plan__list li { color: var(--ink-200); }
.plan__list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 14px; height: 8px;
  background: linear-gradient(45deg, transparent 50%, currentColor 50%);
  -webkit-mask: linear-gradient(45deg, transparent 50%, black 50%);
  mask: linear-gradient(45deg, transparent 50%, black 50%);
  border-bottom: 2px solid var(--green-500);
  border-left: 2px solid var(--green-500);
  background: none;
  transform: rotate(-45deg);
  width: 10px; height: 6px;
  top: 8px;
}
.plan--pro .plan__list li::before { border-color: var(--green-300); }
.plan__list li strong { color: var(--ink-900); }
.plan--pro .plan__list li strong { color: var(--cream-50); }

.plan__cta {
  text-align: center;
  padding: 16px 24px; border-radius: 14px;
  font-weight: 500; font-size: 15px;
  transition: transform .2s, background .2s;
}
.plan__cta--ghost {
  border: 1px solid var(--ink-200); color: var(--ink-900);
}
.plan__cta--ghost:hover { background: var(--cream-100); border-color: var(--ink-900); transform: translateY(-1px); }
.plan__cta--solid {
  background: var(--green-500); color: white;
  box-shadow: 0 10px 24px rgba(67,160,71,.32);
}
.plan__cta--solid:hover { background: var(--green-700); transform: translateY(-2px); }

@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } .plan--pro { transform: none; } }

/* ---------------------------------------------------------
   FAQ
   --------------------------------------------------------- */
.faq {
  padding: clamp(60px, 8vw, 120px) var(--gutter);
  max-width: 980px; margin: 0 auto;
}
.faq__list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--cream-300);
}
.faq details {
  border-bottom: 1px solid var(--cream-300);
  padding: 22px 0;
  transition: background .2s;
}
.faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--serif); font-size: clamp(18px, 2.4vw, 24px); font-weight: 500;
  letter-spacing: -.01em;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  color: var(--ink-900);
  padding: 4px 0;
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--sans); font-weight: 300; font-size: 28px; color: var(--ink-400);
  transition: transform .3s ease, color .2s;
}
.faq details[open] summary { color: var(--green-700); }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--green-500); }
.faq details p {
  margin: 14px 0 0; max-width: 70ch;
  font-size: 16px; line-height: 1.65; color: var(--ink-500);
  animation: faqOpen .35s ease-out;
}
@keyframes faqOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------
   CTA
   --------------------------------------------------------- */
.cta {
  padding: clamp(60px, 8vw, 120px) var(--gutter);
  position: relative; overflow: hidden;
}
.cta::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(67,160,71,.2), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,180,80,.18), transparent 40%);
}
.cta__inner {
  position: relative;
  max-width: var(--max-w); margin: 0 auto;
  background: var(--ink-900); color: var(--cream-50);
  padding: clamp(40px, 6vw, 80px);
  border-radius: var(--radius-xl);
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center;
  box-shadow: 0 30px 60px rgba(15,23,42,.2);
  overflow: hidden; position: relative;
}
.cta__inner::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(67,160,71,.5), transparent 70%);
  pointer-events: none;
}
.cta__copy h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 5.4vw, 64px); line-height: 1.04;
  letter-spacing: -.03em;
  margin: 0 0 18px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.cta__copy h2 em { font-style: italic; color: var(--green-300); }
.cta__copy p { color: var(--ink-300); font-size: 16px; max-width: 50ch; line-height: 1.6; margin: 0; }
.cta__badges { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.cta__badges .store-badge {
  background: white; color: var(--ink-900);
  justify-content: center;
}
@media (max-width: 760px) { .cta__inner { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */
.foot {
  padding: 60px var(--gutter) 32px;
  max-width: var(--max-w); margin: 0 auto;
}
.foot__top {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 32px; border-bottom: 1px solid var(--cream-300);
  flex-wrap: wrap; gap: 16px;
}
.foot__tagline {
  font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-500);
  margin: 0;
}
.foot__cols {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding: 40px 0;
}
.foot__cols::before {
  content: "Eat for the body you actually have.";
  font-family: var(--serif); font-style: italic;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -.02em; line-height: 1.1;
  color: var(--ink-700);
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.foot__col h5 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-400);
  margin: 0 0 14px;
}
.foot__col ul { display: flex; flex-direction: column; gap: 8px; }
.foot__col a { font-size: 14px; color: var(--ink-700); transition: color .2s; }
.foot__col a:hover { color: var(--green-700); }

.foot__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--cream-300);
  font-size: 12px; color: var(--ink-400);
  font-family: var(--mono); letter-spacing: .04em;
  flex-wrap: wrap; gap: 12px;
}

@media (max-width: 760px) {
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .foot__cols::before { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------
   REVEAL ANIMATION (data-reveal staggered fade-up)
   --------------------------------------------------------- */
[data-reveal] {
  opacity: 0; transform: translateY(20px);
  animation: revealUp .8s cubic-bezier(.2,.7,.2,1) forwards;
}
[data-reveal="1"] { animation-delay: .05s; }
[data-reveal="2"] { animation-delay: .15s; }
[data-reveal="3"] { animation-delay: .35s; }
[data-reveal="4"] { animation-delay: .5s; }
[data-reveal="5"] { animation-delay: .6s; }
[data-reveal="6"] { animation-delay: .25s; }

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* In-view reveal for sections */
.in-view-reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.in-view-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------
   RESPONSIVE TWEAKS
   --------------------------------------------------------- */
/* Tighter desktop — the allergen chip would otherwise run off-screen on
   the right. Move it to the LEFT side at the phone's vertical midpoint. */
@media (max-width: 1340px) and (min-width: 981px) {
  .float-chip--allergen {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 14px;
    top: 50%;
  }
}

/* Stack hero columns once the side-by-side layout is too tight. */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 60px; padding-block: 40px; min-height: 0; }
  .hero__copy { text-align: left; }
  .hero__device-wrap { transform: scale(.95); }
}

/* At small widths chips can no longer fully fit beside the phone — let them
   overlap the bezel area slightly so they remain visible without breaking
   off the viewport. */
@media (max-width: 640px) {
  .float-chip { font-size: 11px; padding: 7px 12px; }
  .float-chip--scan      { right: auto; left: 0;  margin: 0; translate: -10% 0; }
  .float-chip--mic       { right: auto; left: 0;  margin: 0; translate: -16% 0; }
  .float-chip--allergen  { left: auto;  right: 0; margin: 0; top: 50%; translate: 14% 0; }
}
@media (max-width: 520px) {
  .hero__device-wrap { transform: scale(.85); margin: -20px 0; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .store-badge { justify-content: center; }
  /* The phone mockup itself communicates the value at mobile widths;
     decorative chips would only obscure the screen content. */
  .float-chip { display: none; }
}

/* ===========================================================
   THEME VARIANTS
   The website mirrors the app's palette system. Default :root
   above is the Refined theme; setting [data-theme] on <html>
   swaps the same set of tokens. JS persists the choice in
   localStorage under "nirra-theme".
   =========================================================== */

/* Smooth swap on the elements whose colours are theme-driven. */
body,
.nav,
.theme,
.mode,
.fit__card,
.plan,
.builtfor,
.fit,
.numbers,
.cta__inner,
.float-chip,
.hero__eyebrow,
.screen__hero,
.screen__rings,
.screen__big-card,
.screen__strip,
.screen__diary,
.mini,
.fit__profile-tags li,
.foot {
  transition:
    background-color .35s ease,
    color .35s ease,
    border-color .35s ease;
}

/* OCEAN — cool teal, calm */
[data-theme="ocean"] {
  --green-50:  #ecfeff;
  --green-100: #cffafe;
  --green-300: #22D3EE;
  --green-500: #0891B2;
  --green-700: #0E7490;
  --green-900: #155E75;

  --cream-50:  #f0f9ff;
  --cream-100: #f0f9ff;
  --cream-200: #e0f2fe;
  --cream-300: #bae6fd;
  --cream-400: #7dd3fc;

  --ink-900: #0c4a6e;
  --ink-700: #075985;
  --ink-500: #475569;
  --ink-400: #64748b;
  --ink-300: #94a3b8;
  --ink-200: #cbd5e1;

  --m-protein: #6366F1;
  --m-carbs:   #F59E0B;
  --m-fat:     #78909C;
  --m-fiber:   #EC4899;

  --v-great-bg:   #ccfbf1;
  --v-great-ink:  #134e4a;
  --v-good-bg:    #e0e7ff;
  --v-good-ink:   #3730a3;
}

/* SUNSET — warm coral, energetic */
[data-theme="sunset"] {
  --green-50:  #FFEDD5;
  --green-100: #FED7AA;
  --green-300: #FB923C;
  --green-500: #EA580C;
  --green-700: #C2410C;
  --green-900: #9a3412;

  --cream-50:  #FFFAF3;
  --cream-100: #FFF7ED;
  --cream-200: #FFEDD5;
  --cream-300: #FED7AA;
  --cream-400: #FDBA74;

  --ink-900: #1C1917;
  --ink-700: #292524;
  --ink-500: #57534E;
  --ink-400: #78716C;
  --ink-300: #A8A29E;
  --ink-200: #D6D3D1;

  --m-protein: #0EA5E9;
  --m-carbs:   #EAB308;
  --m-fat:     #78909C;
  --m-fiber:   #A855F7;

  --v-great-bg:   #dcfce7;
  --v-great-ink:  #166534;
}

/* MIDNIGHT — dark slate, luminous green */
[data-theme="midnight"] {
  color-scheme: dark;

  --green-50:  rgba(74, 222, 128, 0.12);
  --green-100: rgba(74, 222, 128, 0.18);
  --green-300: #86EFAC;
  --green-500: #4ADE80;
  --green-700: #22C55E;
  --green-900: #16A34A;

  --cream-50:  #1E293B;
  --cream-100: #0F172A;
  --cream-200: #1E293B;
  --cream-300: #334155;
  --cream-400: #475569;

  --ink-900: #F1F5F9;
  --ink-700: #E2E8F0;
  --ink-500: #94A3B8;
  --ink-400: #64748B;
  --ink-300: #475569;
  --ink-200: #334155;

  --m-protein: #38BDF8;
  --m-carbs:   #FBBF24;
  --m-fat:     #94A3B8;
  --m-fiber:   #C4B5FD;

  --v-great-bg:   rgba(74, 222, 128, 0.18);
  --v-great-ink:  #4ADE80;
  --v-good-bg:    rgba(96, 165, 250, 0.15);
  --v-good-ink:   #60A5FA;
  --v-skip-bg:    rgba(248, 113, 113, 0.18);
  --v-skip-ink:   #F87171;
  --v-warn-bg:    rgba(251, 191, 36, 0.18);
  --v-warn-ink:   #FBBF24;
}

/* Midnight needs the elements that hard-code white surfaces to flip
   so the dark page background doesn't fight legibility. */
[data-theme="midnight"] .hero__eyebrow,
[data-theme="midnight"] .float-chip,
[data-theme="midnight"] .mini,
[data-theme="midnight"] .screen__hero,
[data-theme="midnight"] .screen__rings,
[data-theme="midnight"] .screen__big-card,
[data-theme="midnight"] .screen__strip,
[data-theme="midnight"] .screen__diary,
[data-theme="midnight"] .fit__card,
[data-theme="midnight"] .mode,
[data-theme="midnight"] .theme,
[data-theme="midnight"] .plan,
[data-theme="midnight"] .fit__profile-tags li {
  background-color: var(--cream-200);
  color: var(--ink-900);
}
[data-theme="midnight"] .nav {
  background: color-mix(in oklab, var(--cream-100) 88%, transparent);
}
[data-theme="midnight"] .phone__screen { background: var(--cream-100); }
[data-theme="midnight"] .phone__frame {
  background: linear-gradient(160deg, #060a14, #000);
}
[data-theme="midnight"] .screen__meal-img {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}
[data-theme="midnight"] .marquee {
  border-top-color: var(--cream-300);
  border-bottom-color: var(--cream-300);
}
[data-theme="midnight"] .num strong {
  background: linear-gradient(135deg, var(--green-300), #ffffff 80%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* =============================================
   STEPS — three-step walkthrough
   ============================================= */
.steps {
  padding: clamp(60px, 8vw, 110px) var(--gutter) clamp(50px, 7vw, 90px);
  background: var(--cream-100);
  position: relative;
}
.steps > .section-head { margin-bottom: clamp(48px, 6vw, 88px); }

.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) 0;
}
.step + .step { border-top: 1px solid var(--cream-300); }

.step__device { display: flex; justify-content: center; }
.step--reverse .step__device { order: 2; }
.step--reverse .step__copy { order: 1; }

.step__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.8vw, 48px);
  letter-spacing: -.02em;
  line-height: 1.05;
  color: var(--ink-900);
  margin: 0 0 18px;
  max-width: 14ch;
}
.step__lede {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-500);
  max-width: 44ch;
  margin: 0 0 22px;
}
.step__bullets {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.step__bullets li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  color: var(--ink-500);
  line-height: 1.55;
}
.step__bullets li::before {
  content: "";
  position: absolute; left: 4px; top: 9px;
  width: 6px; height: 6px;
  background: var(--green-700);
  border-radius: 50%;
}
.step__bullets strong { color: var(--ink-900); font-weight: 500; }

.phone--step {
  --phone-w: 290px;
  transform: rotate(-1.5deg) rotateY(-3deg) rotateX(2deg);
}
.step--reverse .phone--step {
  transform: rotate(2deg) rotateY(5deg) rotateX(-2deg);
}

/* ----- Step 1: Add a meal screen ----- */
.screen--add { padding: 56px 14px 14px; gap: 12px; }
.add__title {
  font-family: var(--serif); font-weight: 500;
  font-size: 17px; letter-spacing: -.01em;
  text-align: center; color: var(--ink-900);
  margin: 0 0 4px;
}
.add__search {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--cream-300);
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--ink-400); font-size: 12px;
}
.add__search svg { width: 13px; height: 13px; color: var(--green-700); flex-shrink: 0; }
.add__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.add__cell {
  background: #fff;
  border: 1px solid var(--cream-300);
  border-radius: 12px;
  padding: 14px 6px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.add__icon {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
}
.add__icon svg { width: 16px; height: 16px; }
.add__icon--barcode { background: #ecfdf5; color: #047857; }
.add__icon--photo   { background: #fff7ed; color: #9a3412; }
.add__icon--voice   { background: #eff6ff; color: #1e40af; }
.add__icon--label   { background: #fef2f2; color: #b91c1c; }
.add__icon--search  { background: #f5f3ff; color: #6d28d9; }
.add__icon--recipe  { background: #f0fdfa; color: #0f766e; }
.add__label { font-size: 11px; color: var(--ink-700); line-height: 1.2; }

.add__cta {
  margin-top: auto;
  background: var(--green-500);
  color: #fff;
  border-radius: 14px;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: -.005em;
}
.add__cta svg { width: 16px; height: 16px; }

/* ----- Step 2: Verdict screen ----- */
.screen--vdict { padding: 56px 14px 14px; gap: 8px; }
.vdict__title {
  font-family: var(--serif); font-weight: 500;
  font-size: 17px; letter-spacing: -.01em;
  text-align: center; color: var(--ink-900);
  margin: 0;
}
.vdict__eyebrow {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-400); margin: 8px 0 0;
}
.vdict__food {
  font-family: var(--serif); font-weight: 500;
  font-size: 17px; line-height: 1.2; letter-spacing: -.01em;
  color: var(--ink-900); margin: 0;
}
.vdict__meta { font-size: 12px; color: var(--ink-400); margin: 2px 0 4px; }

.vdict__card {
  background: var(--green-50);
  border: 1px solid color-mix(in oklab, var(--green-700) 18%, transparent);
  border-radius: 16px;
  padding: 16px 14px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 6px;
}
.vdict__badge {
  width: 36px; height: 36px;
  background: var(--green-500);
  color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.vdict__badge svg { width: 18px; height: 18px; }
.vdict__label {
  font-weight: 600; font-size: 14px;
  color: var(--green-700);
  margin: 4px 0 0;
}
.vdict__why {
  font-size: 12px; color: var(--ink-700);
  line-height: 1.45; margin: 0; max-width: 22ch;
}

.vdict__rows {
  list-style: none; padding: 0;
  margin: 4px 0 0;
  display: flex; flex-direction: column; gap: 8px;
}
.vdict__rows li {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink-900);
}
.vdict__rows em {
  margin-left: auto; font-style: normal;
  color: var(--ink-400);
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot--good { background: var(--green-500); }
.dot--mid  { background: var(--ink-400); }

.vdict__why-row {
  margin-top: auto;
  background: #fff;
  border: 1px solid var(--cream-300);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--ink-700);
}
.vdict__view { color: var(--green-700); font-weight: 500; }

/* ----- Step 3: Profile screen ----- */
.screen--profile { padding: 56px 14px 14px; gap: 4px; }
.prof__title {
  font-family: var(--serif); font-weight: 500;
  font-size: 17px; letter-spacing: -.01em;
  text-align: center; color: var(--ink-900);
  margin: 0 0 8px;
}
.prof__group {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-400);
  margin: 8px 0 4px;
}
.prof__chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.prof__chip {
  background: #fff;
  border: 1px solid var(--cream-300);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--ink-900);
}
.prof__on {
  margin-top: auto;
  background: var(--green-50);
  border: 1px solid color-mix(in oklab, var(--green-700) 18%, transparent);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.prof__on strong {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-700); font-weight: 500;
}
.prof__on span {
  font-size: 12px; color: var(--ink-700);
  line-height: 1.4;
}

/* ----- Plus the everyday stuff ----- */
.steps__plus {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) 0 0;
  border-top: 1px solid var(--cream-300);
  text-align: center;
}
.steps__plus-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--green-700);
  margin: 0 0 14px;
}
.steps__plus-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -.015em;
  line-height: 1.15;
  color: var(--ink-900);
  margin: 0 auto 36px;
  max-width: 22ch;
}
.steps__plus-title em {
  font-style: italic; font-weight: 400;
  color: var(--green-700);
}
.steps__plus-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px 32px;
  text-align: left;
}
.steps__plus-list li {
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.55;
}
.steps__plus-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-900);
  font-weight: 500;
}

/* Theme overlay support — keep step phones' green tinted card readable */
[data-theme="midnight"] .vdict__why-row,
[data-theme="midnight"] .add__search,
[data-theme="midnight"] .add__cell,
[data-theme="midnight"] .prof__chip {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .1);
  color: #fff;
}
[data-theme="midnight"] .add__label,
[data-theme="midnight"] .vdict__why-row { color: rgba(255, 255, 255, .82); }
[data-theme="midnight"] .add__title,
[data-theme="midnight"] .vdict__title,
[data-theme="midnight"] .vdict__food,
[data-theme="midnight"] .prof__title { color: #fff; }
[data-theme="midnight"] .phone__screen { background: #0e1a14; }

/* Mobile */
@media (max-width: 880px) {
  .step {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 0;
  }
  .step--reverse .step__device,
  .step--reverse .step__copy { order: 0; }
  .step__title { max-width: none; }
  .phone--step { --phone-w: 280px; }
  .steps__plus-list { gap: 18px; }
}
