/* FreshCheck site — same tokens as src/theme/tokens.ts ("fresh pop"). */
:root {
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --sunken: #EBEEF5;
  --ink: #111827;
  --ink-soft: #3B4456;
  --muted: #687186;
  --line: #E4E8F0;
  --accent: #10B26C;
  --accent-grad: #00D4A6;
  --accent-ink: #087F4C;
  --accent-tint: rgba(16, 178, 108, 0.1);
  --highlight: #FFE45C;
  --expired: #FF3B5C;
  --today: #FF6B2C;
  --soon: #FFAE00;
  --week: #7CCB1F;
  --later: #12C47A;
  --shadow: 0 8px 20px rgba(58, 74, 122, 0.08);
  --shadow-lg: 0 24px 60px rgba(58, 74, 122, 0.14);
  --glow: 0 10px 26px rgba(16, 178, 108, 0.35);
  --hero-a: #10B26C;
  --hero-b: #00D4A6;
  --phone-bezel: #14171F;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --out: cubic-bezier(0.22, 1, 0.36, 1);
  --z-nav: 10;
  --z-skip: 20;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1017;
    --surface: #161A24;
    --sunken: #090B10;
    --ink: #F4F6FB;
    --ink-soft: #C6CCD9;
    --muted: #8F98AB;
    --line: #262C3A;
    --accent: #2EE095;
    --accent-ink: #2EE095;
    --accent-tint: rgba(46, 224, 149, 0.16);
    --expired: #FF5272;
    --today: #FF8243;
    --soon: #FFC23D;
    --week: #9BE04A;
    --later: #2EE095;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
    --glow: 0 10px 26px rgba(46, 224, 149, 0.28);
    --hero-a: #0E9F60;
    --hero-b: #00B892;
    --phone-bezel: #2A303D;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.6 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.num { font-variant-numeric: tabular-nums; }

/* Bilingual: html[data-lang] hides the other language */
html[data-lang="en"] [data-l="it"],
html[data-lang="it"] [data-l="en"] { display: none !important; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: var(--z-skip);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px;
  font-weight: 700; text-decoration: none; transition: top 0.2s var(--out);
}
.skip:focus { top: 12px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  padding: 12px 0;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.4px; margin-right: auto; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: var(--shadow); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) {
  color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 8px 12px; border-radius: 999px; transition: background 0.2s, color 0.2s;
}
.nav-links a:not(.btn):hover { background: var(--surface); color: var(--ink); }
.nav-links a[aria-current="page"] { background: var(--accent-tint); color: var(--accent-ink); }

.lang {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px;
  background: var(--sunken); border: 1px solid var(--line);
}
.lang button {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.4px;
  border: 0; background: transparent; color: var(--muted);
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.lang button:active { transform: scale(0.94); }
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
  padding: 15px 24px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform 0.25s var(--spring), box-shadow 0.25s, filter 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); transition-duration: 0.08s; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-grad)); box-shadow: var(--glow); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #04130C; } }
.btn-primary:hover { filter: saturate(1.1) brightness(1.03); }
.btn-light { color: #0B1A12; background: #fff; box-shadow: 0 12px 30px rgba(0, 70, 45, 0.25); }
.btn-small { padding: 9px 16px; font-size: 14px; }
.btn-small svg { width: 16px; height: 16px; }
.more { margin-top: 22px; }
.link-arrow { font-weight: 700; color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow span { transition: transform 0.25s var(--spring); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Hero (gradient panel, like the app's summary card) ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 12px;
  border-radius: 36px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.18) 0 120px, transparent 121px),
    radial-gradient(circle at 70% 108%, rgba(255, 255, 255, 0.12) 0 170px, transparent 171px),
    linear-gradient(150deg, var(--hero-a), var(--hero-b));
  box-shadow: 0 30px 80px rgba(16, 178, 108, 0.28);
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 24px;
  padding: 72px 64px 0;
  min-height: min(760px, calc(100dvh - 90px));
}
.hero::after { /* grain */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.18; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-copy { align-self: center; padding-bottom: 72px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; padding: 7px 14px 7px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
}
.eyebrow img { width: 22px; height: 22px; border-radius: 6px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 82px); line-height: 0.98; letter-spacing: -0.045em; margin: 22px 0 0; font-weight: 800; }
.hero h1 .hl { color: var(--highlight); display: inline-block; }
.hero .underline { width: 64px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.85); margin: 22px 0 22px; transform-origin: left; }
.hero .lede { font-size: 19px; line-height: 1.5; max-width: 30ch; color: rgba(255, 255, 255, 0.92); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 32px; }
.hero-cta .note { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.sparkle { position: absolute; color: #fff; pointer-events: none; animation: twinkle 3.2s ease-in-out infinite; }
.sparkle svg { width: 100%; height: 100%; }
.sparkle.s1 { width: 30px; height: 30px; top: 40px; right: 44px; }
.sparkle.s2 { width: 18px; height: 18px; top: 46%; left: 50%; animation-delay: 1.1s; }
.sparkle.s3 { width: 14px; height: 14px; bottom: 80px; left: 40px; animation-delay: 2s; }

/* Launch "burst": the app's cold-start colour bloom, replayed once */
.burst {
  position: absolute; z-index: -1; left: 50%; top: 50%;
  width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 60%);
  pointer-events: none; opacity: 0;
}

/* ---------- Phone mockup (HTML rendering of the Pantry screen) ---------- */
.stage { position: relative; align-self: end; display: flex; justify-content: center; }
.phone {
  position: relative; width: 320px; height: 610px;
  border-radius: 52px 52px 0 0; padding: 12px 12px 0;
  background: var(--phone-bezel);
  box-shadow: 0 -10px 60px rgba(0, 60, 40, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.screen {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 42px 42px 0 0; background: var(--bg); color: var(--ink);
  padding: 18px 16px 0;
}
.status { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; padding: 0 10px; height: 26px; }
.island { width: 92px; height: 26px; border-radius: 20px; background: #000; }
.status .bars { display: flex; gap: 2px; align-items: flex-end; }
.status .bars i { width: 3px; border-radius: 1px; background: currentColor; }
.status .bars i:nth-child(1) { height: 4px; } .status .bars i:nth-child(2) { height: 6px; } .status .bars i:nth-child(3) { height: 8px; } .status .bars i:nth-child(4) { height: 10px; }
.app-date { font-size: 11px; color: var(--muted); margin-top: 18px; font-weight: 600; }
.app-title { font-size: 25px; font-weight: 800; letter-spacing: -0.8px; line-height: 1.1; }
.sum {
  position: relative; overflow: hidden; margin-top: 12px; padding: 14px; border-radius: var(--r-lg); color: #fff;
  background: radial-gradient(circle at 92% 0, rgba(255, 255, 255, 0.16) 0 64px, transparent 65px), linear-gradient(140deg, #10B26C, #00D4A6);
  box-shadow: 0 10px 24px rgba(16, 178, 108, 0.32);
}
.sum-top { display: flex; align-items: center; gap: 12px; }
.sum-big { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -2px; }
.sum-top b { display: block; font-size: 15px; }
.sum-top small { font-size: 10.5px; opacity: 0.9; font-weight: 600; }
.ubar { display: flex; gap: 3px; height: 9px; margin-top: 12px; padding: 2px; border-radius: 6px; background: rgba(255, 255, 255, 0.9); }
.ubar i { border-radius: 4px; transform-origin: left; }
.ubar i:nth-child(1) { flex: 1; background: var(--expired); }
.ubar i:nth-child(2) { flex: 1; background: var(--today); }
.ubar i:nth-child(3) { flex: 4; background: var(--soon); }
.ubar i:nth-child(4) { flex: 1; background: var(--week); }
.ubar i:nth-child(5) { flex: 4; background: var(--later); }
.chips { display: flex; gap: 6px; margin-top: 12px; }
.chips span { font-size: 11px; font-weight: 700; padding: 6px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.chips span:first-child { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .chips span:first-child { color: #04130C; } }
.group { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; margin: 14px 2px 7px; }
.group::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }

/* Food card: same anatomy as src/components/FoodCard.tsx */
.food { position: relative; border-radius: var(--r-md); margin-bottom: 8px; overflow: hidden; }
.food-action {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 6px; padding-left: 18px;
  background: var(--later); color: #fff; font-size: 11px; font-weight: 800;
}
.food-action svg { width: 18px; height: 18px; }
.food-card {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 7px;
  border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow);
}
.stub {
  width: 46px; height: 46px; border-radius: 14px; flex: none; color: #fff;
  display: grid; place-content: center; text-align: center; line-height: 1;
  background: var(--tone); box-shadow: 0 6px 14px color-mix(in srgb, var(--tone) 45%, transparent);
}
.stub b { font-size: 20px; font-weight: 800; letter-spacing: -0.6px; font-variant-numeric: tabular-nums; }
.stub small { font-size: 8.5px; font-weight: 700; opacity: 0.92; margin-top: 2px; }
.food-card strong { display: block; font-size: 13.5px; }
.food-card span { font-size: 11px; color: var(--muted); font-weight: 600; }
.t-expired { --tone: var(--expired); --dot: var(--expired); }
.t-today { --tone: var(--today); --dot: var(--today); }
.t-soon { --tone: var(--soon); --dot: var(--soon); }
.t-week { --tone: var(--week); --dot: var(--week); }
.t-later { --tone: var(--later); --dot: var(--later); }

/* Floating pills from the App Store screenshots */
.pill {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 11px 18px; border-radius: 999px; background: #fff; color: #111827;
  font-weight: 800; font-size: 15px; letter-spacing: -0.2px;
  box-shadow: 0 16px 36px rgba(0, 60, 40, 0.22);
}
.pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, #12C47A); }
.pill.p1 { top: 44px; right: -18px; rotate: -3deg; }
.pill.p2 { top: 330px; left: -54px; rotate: 3deg; --dot: #FF6B2C; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding: 120px 0 0; }
.kicker { font-size: 14px; font-weight: 700; color: var(--accent-ink); font-style: italic; }
.h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 800; margin-top: 10px; }
.sub { color: var(--muted); font-size: 18px; max-width: 52ch; margin-top: 16px; }

/* Urgency scale */
.scale-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 48px; }
.tone {
  position: relative; padding: 22px 20px 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow);
  transition: transform 0.35s var(--spring), box-shadow 0.3s;
}
.tone:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.tone .stub { width: 62px; height: 62px; border-radius: 19px; }
.tone .stub b { font-size: 26px; }
.tone .stub small { font-size: 10px; }
.tone h3 { font-size: 17px; margin-top: 18px; letter-spacing: -0.2px; }
.tone p { font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.45; }

/* Feature rows (zig-zag) */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding-top: 120px; }
.feature.flip .feature-copy { order: 2; }
.feature-copy ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.feature-copy li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); max-width: 46ch; }
.feature-copy li svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 1px; }
.visual {
  position: relative; border-radius: var(--r-xl); background: var(--sunken); padding: 40px;
  min-height: 420px; display: grid; place-items: center; overflow: hidden;
}
.visual::before {
  content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-tint), transparent 70%);
}

/* Scan widget */
.scan {
  position: relative; width: min(100%, 330px); aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  background: linear-gradient(160deg, #1E2533, #0E1219); box-shadow: var(--shadow-lg);
}
.pack {
  position: absolute; inset: 18% 14% 22%; border-radius: 16px; background: #F7F3EA; color: #2A2A2A;
  display: grid; align-content: center; justify-items: center; gap: 10px; padding: 18px; rotate: -4deg;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}
.pack .barcode { width: 82%; height: 74px; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 7px, transparent 7px 9px, #111 9px 10px, transparent 10px 13px); }
.pack .digits { font: 700 12px/1 ui-monospace, Menlo, monospace; letter-spacing: 2px; }
.pack .exp { font: 700 13px/1 ui-monospace, Menlo, monospace; padding: 6px 9px; border: 1.5px dashed #999; border-radius: 6px; }
.frame { position: absolute; inset: 14% 9% 18%; }
.frame i { position: absolute; width: 34px; height: 34px; border: 4px solid var(--accent-grad); }
.frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.scanline {
  position: absolute; left: 11%; right: 11%; top: 16%; height: 3px; border-radius: 2px;
  background: var(--accent-grad); box-shadow: 0 0 18px 4px rgba(0, 212, 166, 0.6);
  animation: scan 2.6s ease-in-out infinite alternate;
}
.result {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0; width: 84%;
  display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: var(--r-md);
  background: #fff; color: #111827; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  animation: pop 5.2s var(--spring) infinite;
}
.result .stub { width: 40px; height: 40px; border-radius: 12px; }
.result .stub b { font-size: 17px; }
.result strong { display: block; font-size: 13.5px; }
.result span { font-size: 11px; color: #687186; font-weight: 600; }

/* Recipe widget */
.recipes { position: relative; width: min(100%, 380px); display: grid; gap: 12px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); font-weight: 700; font-size: 14px; }
.ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-ink); flex: none; }
.ico svg { width: 20px; height: 20px; }
.recipe { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.recipe-img {
  height: 150px; position: relative;
  background:
    radial-gradient(circle at 30% 40%, #FFD66B 0 22px, transparent 23px),
    radial-gradient(circle at 62% 58%, #FFF4D6 0 26px, transparent 27px),
    radial-gradient(circle at 48% 30%, #4CAF50 0 14px, transparent 15px),
    radial-gradient(circle at 74% 34%, #3E9A44 0 11px, transparent 12px),
    radial-gradient(circle at 38% 68%, #3E9A44 0 10px, transparent 11px),
    radial-gradient(circle at 50% 50%, #F2B544 0 72px, #E59A2F 73px 80px, #D9DEE8 81px 92px, transparent 93px),
    linear-gradient(135deg, #FFE9D6, #FFD9C2);
}
.recipe-img .time { position: absolute; top: 12px; right: 12px; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: #111827; }
.recipe-body { padding: 16px 18px 18px; }
.recipe-body strong { font-size: 18px; letter-spacing: -0.3px; }
.ings { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ings span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--sunken); }
.ings span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--muted)); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 48px; }
.cell { border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow); padding: 30px; overflow: hidden; position: relative; }
.cell h3 { font-size: 21px; letter-spacing: -0.4px; }
.cell p { color: var(--muted); font-size: 15px; margin-top: 6px; max-width: 40ch; }
.cell.c-list { grid-column: span 3; }
.cell.c-impact { grid-column: span 3; }
.cell.c-remind { grid-column: span 4; }
.cell.c-theme { grid-column: span 2; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 8px; }
.checks li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--bg); font-weight: 600; font-size: 15px; }
.box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; flex: none; transition: background 0.3s, border-color 0.3s; }
.box svg { width: 14px; height: 14px; color: #fff; opacity: 0; transform: scale(0.4); transition: opacity 0.2s, transform 0.35s var(--spring); }
.checks li.done .box { background: var(--accent); border-color: var(--accent); }
.checks li.done .box svg { opacity: 1; transform: none; }
.checks li.done span { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.checks li span { transition: color 0.3s; }
.impact { display: flex; align-items: center; gap: 24px; margin-top: 22px; }
.ring { --p: 0.928; width: 128px; height: 128px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; rotate: -90deg; }
.ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.ring .track { stroke: var(--sunken); }
.ring .val { stroke: url(#g-accent); stroke-dasharray: 314; stroke-dashoffset: calc(314 * (1 - var(--p))); transition: stroke-dashoffset 1.4s var(--out); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.ring .lbl b { font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.ring .lbl small { font-size: 11px; color: var(--muted); font-weight: 700; }
.stats { display: grid; gap: 12px; }
.stats div b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.stats div span { font-size: 13px; color: var(--muted); font-weight: 600; }
.notif {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; max-width: 460px;
  padding: 14px 16px; border-radius: 22px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), var(--shadow);
}
.notif img { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.notif .top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 700; }
.notif strong { font-size: 15px; display: block; margin-top: 2px; }
.notif p { font-size: 14px; color: var(--ink-soft); margin: 2px 0 0; }
.notif + .notif { margin-left: 34px; margin-top: 10px; opacity: 0.75; scale: 0.97; transform-origin: left; }
.swatches { display: flex; gap: 10px; margin-top: 24px; }
.swatches i { width: 40px; height: 40px; border-radius: 13px; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: 0 8px 18px color-mix(in srgb, var(--a) 40%, transparent); transition: transform 0.3s var(--spring); }
.swatches i:hover { transform: translateY(-4px) rotate(-6deg); }
.swatches i:nth-child(1) { --a: #10B26C; --b: #00D4A6; }
.swatches i:nth-child(2) { --a: #FF4D2E; --b: #FF2E7E; }
.swatches i:nth-child(3) { --a: #2563FF; --b: #00B8FF; }
.swatches i:nth-child(4) { --a: #E0307F; --b: #FF7A45; }
.swatches i:nth-child(5) { --a: #FFA800; --b: #FF6B2C; }
.modes { display: flex; gap: 8px; margin-top: 14px; }
.modes span { flex: 1; height: 54px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(#F4F6FB 0 30%, #fff 30%); }
.modes span:last-child { background: linear-gradient(#0D1017 0 30%, #1A1F2B 30%); border-color: #262C3A; }

/* Privacy band */
.private { margin-top: 120px; border-radius: 36px; background: var(--sunken); padding: 80px 64px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.private-list { display: grid; gap: 14px; }
.private-list div { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.private-list b { display: block; font-size: 16px; }
.private-list span { font-size: 14px; color: var(--muted); }
.private-list .ico { width: 46px; height: 46px; border-radius: 15px; }

/* Pro */
.pro { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.pro-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; list-style: none; padding: 0; margin: 0; }
.pro-list li { display: flex; gap: 10px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--ink-soft); }
.pro-list li svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.plans { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.plans span { font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.plans span.best { background: var(--accent-tint); border-color: transparent; color: var(--accent-ink); }

/* Final CTA */
.cta {
  position: relative; overflow: hidden; isolation: isolate; margin-top: 120px; border-radius: 36px; color: #fff; text-align: center;
  padding: 88px 24px 96px;
  background: radial-gradient(circle at 12% 110%, rgba(255, 255, 255, 0.16) 0 160px, transparent 161px), linear-gradient(150deg, var(--hero-a), var(--hero-b));
}
.cta img.app { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto; box-shadow: 0 18px 40px rgba(0, 60, 40, 0.3); }
.cta h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1; letter-spacing: -0.04em; font-weight: 800; margin-top: 28px; }
.cta p { margin: 16px auto 32px; max-width: 42ch; color: rgba(255, 255, 255, 0.9); font-size: 18px; }

/* Footer */
footer.site { padding: 56px 0 48px; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-left: auto; }
footer.site a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
footer.site a:hover { color: var(--accent-ink); }

/* ---------- Doc pages (support, privacy) ---------- */
.doc-hero {
  position: relative; overflow: hidden; isolation: isolate; margin-top: 12px; border-radius: 36px; color: #fff;
  padding: 64px 56px 56px;
  background: radial-gradient(circle at 92% 8%, rgba(255, 255, 255, 0.16) 0 130px, transparent 131px), linear-gradient(150deg, var(--hero-a), var(--hero-b));
}
.doc-hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1; letter-spacing: -0.04em; font-weight: 800; margin-top: 18px; }
.doc-hero .lede { margin-top: 16px; font-size: 18px; color: rgba(255, 255, 255, 0.9); max-width: 48ch; }
.doc-hero .underline { width: 56px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.85); margin-top: 22px; transform-origin: left; }
.doc-hero .row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 30px; }
.doc-hero .meta { font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.fact { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.fact b { display: block; font-size: 15px; }
.fact span { font-size: 14px; color: var(--muted); line-height: 1.45; display: block; margin-top: 2px; }

.doc { display: grid; grid-template-columns: 260px 1fr; gap: 56px; margin-top: 64px; align-items: start; }
.toc { position: sticky; top: 88px; }
.toc p { font-size: 13px; font-weight: 700; color: var(--muted); font-style: italic; margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--line); }
.toc a {
  display: block; padding: 7px 14px; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 14px; line-height: 1.35;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.toc a:hover { color: var(--ink); background: var(--surface); }
.toc a.active { color: var(--accent-ink); border-left-color: var(--accent); }
.prose { max-width: 68ch; }
.prose article { padding: 30px 32px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); margin-bottom: 14px; scroll-margin-top: 90px; }
.prose article:target { box-shadow: 0 0 0 2px var(--accent), var(--shadow-lg); }
.prose h2 { font-size: 21px; letter-spacing: -0.4px; display: flex; gap: 12px; align-items: center; }
.prose h2 .n { font-size: 12px; font-weight: 800; color: var(--accent-ink); background: var(--accent-tint); border-radius: 8px; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.prose p { color: var(--ink-soft); margin-top: 10px; line-height: 1.7; }
.prose .path { font-weight: 700; color: var(--ink); white-space: nowrap; }

.contact {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  margin-top: 20px; padding: 22px 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow);
}
.contact .ico { width: 52px; height: 52px; border-radius: 17px; }
.contact .ico svg { width: 24px; height: 24px; }
.contact b { display: block; font-size: 17px; }
.contact span { color: var(--muted); font-size: 14px; }

/* 404 */
.lost { min-height: 70dvh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.lost .stub { width: 132px; height: 132px; border-radius: 40px; margin: 0 auto; }
.lost .stub b { font-size: 52px; letter-spacing: -2px; }
.lost .stub small { font-size: 15px; }
.lost h1 { font-size: clamp(34px, 5vw, 54px); letter-spacing: -0.04em; font-weight: 800; margin-top: 36px; }
.lost p { color: var(--muted); font-size: 18px; margin: 12px auto 30px; max-width: 40ch; }

/* ---------- Motion ---------- */
@keyframes twinkle { 0%, 100% { opacity: 0.35; transform: scale(0.8) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(20deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes scan { from { top: 16%; } to { top: 80%; } }
@keyframes pop {
  0%, 18% { opacity: 0; transform: translateY(14px) scale(0.9); }
  26%, 86% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(8px) scale(0.96); }
}
@keyframes burst { 0% { opacity: 0.9; transform: scale(0.01); } 70% { opacity: 0.6; } 100% { opacity: 0; transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes settle { 0% { opacity: 0; transform: scale(0.6); } 60% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes phone-in { from { opacity: 0; transform: translateY(120px); } to { opacity: 1; transform: none; } }
/* Swipe right to mark as eaten, like Swipeable in FoodCard.tsx */
@keyframes swipe {
  0%, 52% { transform: translateX(0); }
  62%, 70% { transform: translateX(62%); }
  80%, 100% { transform: translateX(0); }
}
@keyframes action-in { 0%, 54% { opacity: 0; } 60%, 72% { opacity: 1; } 82%, 100% { opacity: 0; } }

.pill.p1 { animation: float 5s ease-in-out infinite; }
.pill.p2 { animation: float 5.6s ease-in-out 0.8s infinite; }
.food.swipe .food-card { animation: swipe 6s var(--out) 2.4s infinite; }
.food.swipe .food-action { animation: action-in 6s linear 2.4s infinite; opacity: 0; }

/* Intro choreography (only when JS is on, so content never hides without it) */
.js .burst { animation: burst 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
.js .intro { animation: rise 0.8s var(--out) both; }
.js .intro.d1 { animation-delay: 0.25s; } .js .intro.d2 { animation-delay: 0.35s; }
.js .intro.d3 { animation-delay: 0.45s; } .js .intro.d4 { animation-delay: 0.55s; }
.js .eyebrow img { animation: settle 0.7s var(--spring) 0.3s both; }
.js .hero .underline, .js .doc-hero .underline { animation: draw 0.6s var(--out) 0.6s both; }
.js .phone { animation: phone-in 1s var(--out) 0.35s both; }
.js .pill { opacity: 0; transition: opacity 0.4s; }
.js .pill.on { opacity: 1; }
.js .screen .food { animation: rise 0.6s var(--out) both; }
.js .screen .food:nth-of-type(1) { animation-delay: 0.9s; }
.js .screen .food:nth-of-type(2) { animation-delay: 1s; }
.js .screen .food:nth-of-type(3) { animation-delay: 1.1s; }
.js .screen .food:nth-of-type(4) { animation-delay: 1.2s; }
.js .ubar i { animation: grow 0.8s var(--out) both; }
.js .ubar i:nth-child(1) { animation-delay: 0.8s; } .js .ubar i:nth-child(2) { animation-delay: 0.88s; }
.js .ubar i:nth-child(3) { animation-delay: 0.96s; } .js .ubar i:nth-child(4) { animation-delay: 1.04s; }
.js .ubar i:nth-child(5) { animation-delay: 1.12s; }

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--out), transform 0.8s var(--out); }
.js .reveal.in { opacity: 1; transform: none; }
.js .stagger > * { opacity: 0; transform: translateY(22px) scale(0.98); transition: opacity 0.6s var(--out), transform 0.7s var(--spring); }
.js .stagger.in > * { opacity: 1; transform: none; }
.js .stagger.in > *:nth-child(2) { transition-delay: 0.07s; }
.js .stagger.in > *:nth-child(3) { transition-delay: 0.14s; }
.js .stagger.in > *:nth-child(4) { transition-delay: 0.21s; }
.js .stagger.in > *:nth-child(5) { transition-delay: 0.28s; }
.js .stagger.in > *:nth-child(6) { transition-delay: 0.35s; }
.js .ring:not(.in) .val { stroke-dashoffset: 314; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal, .js .stagger > *, .js .pill { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; padding: 56px 40px 0; min-height: 0; }
  .hero-copy { padding-bottom: 8px; }
  .stage { margin-top: 24px; }
  .scale { grid-template-columns: repeat(3, 1fr); }
  .feature { grid-template-columns: 1fr; gap: 40px; padding-top: 96px; }
  .feature.flip .feature-copy { order: 0; }
  .private, .pro { grid-template-columns: 1fr; gap: 40px; }
  .private { padding: 56px 40px; }
  .cell.c-remind, .cell.c-theme { grid-column: span 3; }
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 6px; border: 0; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; margin: 0; padding: 6px 12px; background: var(--surface); }
  .toc a.active { border-color: var(--accent); }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .nav-links .btn { display: none; }
  .hero, .doc-hero { border-radius: 28px; padding: 44px 22px 0; }
  .doc-hero { padding-bottom: 40px; }
  .hero .lede { font-size: 17px; }
  .phone { width: 286px; height: 540px; }
  .pill { font-size: 13px; padding: 9px 14px; }
  .pill.p1 { right: -6px; }
  .pill.p2 { left: -8px; top: 300px; }
  .section { padding-top: 88px; }
  .scale-head { grid-template-columns: 1fr; gap: 0; }
  .scale { grid-template-columns: 1fr 1fr; }
  .scale .tone:last-child { grid-column: span 2; }
  .visual { padding: 24px; min-height: 360px; }
  .bento { grid-template-columns: 1fr; }
  .cell { grid-column: auto !important; padding: 24px; }
  .impact { flex-direction: column; align-items: flex-start; }
  .private { padding: 40px 22px; border-radius: 28px; }
  .pro-list { grid-template-columns: 1fr; }
  .cta { border-radius: 28px; padding: 64px 20px 72px; }
  .contact { grid-template-columns: auto 1fr; }
  .contact .btn { grid-column: 1 / -1; }
  .prose article { padding: 24px 20px; }
  footer.site nav { margin-left: 0; }
}

/* ---------- Help hub on the home page (App Store support URL) ---------- */
.plans b { font-weight: 800; margin-left: 4px; }
.fine { font-size: 13px; color: var(--muted); margin-top: 12px; max-width: 46ch; }
#help .contact { margin-top: 36px; }
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.help {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
  transition: transform 0.3s var(--spring), box-shadow 0.3s;
}
.help:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.help:active { transform: scale(0.98); }
.help .n { font-size: 12px; font-weight: 800; color: var(--accent-ink); background: var(--accent-tint); border-radius: 8px; padding: 4px 8px; font-variant-numeric: tabular-nums; flex: none; }
.help b { font-size: 15px; flex: 1; line-height: 1.35; }
.help .go { color: var(--muted); font-weight: 700; transition: transform 0.25s var(--spring), color 0.2s; }
.help:hover .go { transform: translateX(4px); color: var(--accent-ink); }
@media (max-width: 1020px) { .help-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) {
  .help-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: inline-block; padding: 7px 10px; font-size: 13px; }
  .nav-links a.wide { display: none; }
  .brand { font-size: 0; gap: 0; }
}
