/* Haste: fresh and light. Pale sage paper, deep forest ink, and one dark phone that travels down the page. */
:root {
  --bg: #eef2e9; --bg-soft: #e3eadf; --paper: #fbfcf8;
  --fg: #13231a; --muted: #55675c; --line: rgba(19, 35, 26, .13);
  --forest: #0e1b14; --forest-2: #16291f; --mint: #a9d2bd; --accent: #2c8a62;
  --protein: #3fae7d; --carbs: #e9a23b; --fat: #ea7462;
  --sans: 'Geist', system-ui, sans-serif; --serif: 'Instrument Serif', Georgia, serif;
  --ease: cubic-bezier(.19, .9, .22, 1);
}
body { background: var(--bg); }
main { position: relative; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--accent); }

/* The travelling phone is drawn on one fixed canvas above the page. */
.h-stage { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0; transition: opacity 1s ease .2s; }
.h-stage.is-ready { opacity: 1; }
.h-stage canvas { width: 100%; height: 100%; }
.h-anchor { width: 100%; height: 100%; display: grid; place-items: center; }
.h-fallback, .h-step-shot { display: none; }
.no-webgl .h-fallback, .no-webgl .h-step-shot { display: block; width: auto; max-height: 100%; border-radius: 34px; border: 8px solid var(--forest); box-shadow: 0 30px 60px -30px rgba(14, 27, 20, .5); }
.no-webgl .h-step-shot { max-height: 420px; margin-top: 28px; }

/* Navigation */
.h-nav { position: fixed; top: 14px; left: 50%; z-index: 20; width: min(1180px, 100% - 28px); transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 9px 10px 9px 16px; border-radius: 999px; border: 1px solid transparent; transition: background .4s, border-color .4s, box-shadow .4s; }
.h-nav.is-scrolled { background: rgba(244, 247, 240, .8); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-color: var(--line); box-shadow: 0 12px 34px -22px rgba(14, 27, 20, .45); }
.h-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1.14rem; letter-spacing: -.03em; text-decoration: none; }
.app-icon { border-radius: 28%; }
.h-nav nav { display: flex; gap: 4px; }
.h-nav nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-size: .93rem; font-weight: 500; color: var(--muted); transition: color .25s, background .25s; }
.h-nav nav a:hover { color: var(--fg); background: rgba(19, 35, 26, .06); }
.h-nav-end { display: flex; align-items: center; gap: 10px; }

.btn { display: inline-flex; white-space: nowrap; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 600; letter-spacing: -.01em; text-decoration: none; transition: transform .35s var(--ease), background .25s, opacity .25s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); background: var(--accent); }
.btn:disabled { opacity: .35; cursor: default; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: .92rem; }
.btn-quiet { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.btn-quiet:hover:not(:disabled) { background: var(--fg); color: var(--bg); }

/* Type */
.h-display { font-size: clamp(3.4rem, 8.6vw, 8.2rem); line-height: .92; letter-spacing: -.055em; font-weight: 600; }
.h-headline { font-size: clamp(2.3rem, 5vw, 4.4rem); line-height: 1; letter-spacing: -.045em; font-weight: 600; }
.h-lead { max-width: 34em; font-size: clamp(1.06rem, 1.5vw, 1.28rem); color: var(--muted); }
.h-eyebrow, .h-kicker, .h-step-no { font-size: .92rem; font-weight: 500; color: var(--accent); }
.h-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.h-sub { max-width: 34em; color: var(--muted); font-size: 1.1rem; }
.h-sub a { color: var(--fg); font-weight: 500; text-underline-offset: 4px; display: inline-flex; align-items: center; gap: 4px; }

/* Hero */
.h-hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(20px, 4vw, 60px); width: min(1280px, 100% - clamp(40px, 8vw, 112px)); margin-inline: auto; padding: 118px 0 86px; }
.h-hero::before { content: ''; position: absolute; z-index: -1; inset: -10% -30% 0 30%; background: radial-gradient(46% 50% at 62% 48%, rgba(169, 210, 189, .75), transparent 70%), radial-gradient(30% 34% at 86% 18%, rgba(243, 174, 69, .16), transparent 70%); pointer-events: none; }
.h-hero-copy { display: grid; gap: 26px; justify-items: start; }
.h-kicker { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--fg); }
.h-kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--protein); box-shadow: 0 0 0 0 rgba(63, 174, 125, .6); animation: h-pulse 2.2s ease-out infinite; }
@keyframes h-pulse { to { box-shadow: 0 0 0 12px rgba(63, 174, 125, 0); } }
.h-fine { font-size: .9rem; color: var(--muted); }
.h-hero-phone { position: relative; height: min(74svh, 720px); }
/* A plate under the phone. */
.h-hero-phone::before { content: ''; position: absolute; left: 50%; top: 50%; width: min(118%, 600px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, var(--paper) 0 52%, rgba(251, 252, 248, .55) 52.4% 66%, transparent 66.4%); box-shadow: inset 0 0 0 1px rgba(19, 35, 26, .05), 0 60px 90px -60px rgba(14, 27, 20, .4); }
.h-float { position: absolute; z-index: 6; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 18px; background: rgba(251, 252, 248, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(19, 35, 26, .08); box-shadow: 0 24px 40px -24px rgba(14, 27, 20, .45); font-size: .92rem; font-weight: 500; white-space: nowrap; animation: h-bob 6s ease-in-out infinite; }
.h-float strong { font-size: 1.35rem; font-weight: 650; letter-spacing: -.04em; }
.h-float small { display: block; color: var(--muted); font-size: .76rem; font-weight: 400; }
.h-float-a { left: -4%; top: 20%; display: block; line-height: 1.25; }
.h-float-b { right: -2%; top: 46%; animation-delay: -2s; }
.h-float-b i { width: 9px; height: 9px; border-radius: 50%; background: var(--protein); }
.h-float-c { left: 4%; bottom: 12%; animation-delay: -4s; color: var(--fg); }
.h-float-c .icon { color: var(--carbs); width: 1.4em; height: 1.4em; }
@keyframes h-bob { 50% { transform: translateY(-12px); } }
.h-scroll { position: absolute; left: 0; bottom: 30px; display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 500; text-decoration: none; color: var(--muted); }
.h-scroll .icon { animation: h-nudge 1.8s ease-in-out infinite; }
@keyframes h-nudge { 50% { transform: translateY(5px); } }

/* Story: the page turns dark and the phone settles on the left. */
.h-story { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--forest); color: #eef4ee; border-radius: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0 0; --muted: #9fb3a6; --accent: var(--mint); }
.h-story em { color: var(--mint); }
.h-story-phone { position: sticky; top: 0; height: 100svh; padding: 110px 8% 60px; }
.h-story-phone::before { content: ''; position: absolute; inset: 12% 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(169, 210, 189, .2), transparent); }
.h-steps { padding: 0 clamp(24px, 6vw, 96px) 0 0; }
.h-step { min-height: 100svh; display: grid; align-content: center; gap: 22px; opacity: .22; transition: opacity .6s ease; }
.h-step.is-active { opacity: 1; }
.h-step-no { display: flex; align-items: center; gap: 14px; }
.h-step-no span { padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(169, 210, 189, .35); }
.h-step-text { max-width: 30em; font-size: clamp(1.06rem, 1.5vw, 1.28rem); color: var(--muted); }

/* Try it */
.h-try { position: relative; z-index: 6; background: var(--forest); padding: clamp(40px, 6vw, 90px) 0 clamp(80px, 10vw, 140px); color: #eef4ee; --muted: #9fb3a6; --accent: var(--mint); }
.h-try em { color: var(--mint); }
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 52px); padding: clamp(22px, 4vw, 48px); border-radius: clamp(24px, 3vw, 40px); background: var(--bg); color: var(--fg); --muted: #55675c; --accent: #2c8a62; box-shadow: 0 60px 120px -60px rgba(0, 0, 0, .8); }
.demo-label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; }
.demo-field { margin-top: 16px; min-height: 66px; display: flex; align-items: center; padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--paper); font-size: 1.2rem; letter-spacing: -.01em; }
.demo-field .caret { width: 2px; height: 1.3em; margin-left: 3px; background: var(--accent); opacity: 0; }
.is-typing .demo-field .caret { opacity: 1; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.demo-chips button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 9px 14px; border-radius: 999px; font-size: .9rem; transition: color .25s, border-color .25s, background .25s; }
.demo-chips button:hover { color: var(--fg); border-color: var(--fg); }
.demo-chips button[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.demo-run { margin-top: 24px; }
.is-thinking .demo-run { background: linear-gradient(100deg, var(--fg) 30%, var(--protein) 50%, var(--fg) 70%) 0 0 / 300% 100%; animation: shimmer 1s linear infinite; opacity: 1; }
@keyframes shimmer { to { background-position: -300% 0; } }
.demo-result { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px 28px; padding: clamp(18px, 3vw, 28px); border-radius: 24px; background: var(--forest); color: #eef4ee; }
.demo-ring { position: relative; width: 150px; height: 150px; }
.demo-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.demo-ring circle { fill: none; stroke-width: 10; stroke: rgba(255, 255, 255, .09); }
.demo-ring .demo-ring-fill { stroke: var(--mint); stroke-linecap: round; }
.demo-ring p { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.demo-ring strong { font-size: 2.3rem; font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.demo-ring small { color: #9fb3a6; font-size: .85rem; }
.demo-macros { display: grid; gap: 14px; }
.demo-macros div { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.demo-macros dt { color: #9fb3a6; font-size: .9rem; }
.demo-macros dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.demo-macros i { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.demo-macros b { display: block; height: 100%; border-radius: 6px; transform-origin: 0 50%; transform: scaleX(0); }
.macro-protein b { background: var(--protein); } .macro-carbs b { background: var(--carbs); } .macro-fat b { background: var(--fat); }
.demo-status { grid-column: 1 / -1; color: #9fb3a6; font-size: .95rem; min-height: 3em; }
.is-saved .demo-status { color: var(--mint); }
.demo-save { grid-column: 1 / -1; justify-self: start; color: #eef4ee; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.demo-save:hover:not(:disabled) { background: var(--mint); color: var(--forest); }
.demo-note { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; }

/* Features */
.h-features { position: relative; z-index: 6; background: var(--bg); padding: clamp(80px, 10vw, 150px) 0; border-radius: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0 0; margin-top: calc(clamp(28px, 4vw, 56px) * -1); }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(210px, auto); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 26px; border-radius: 28px; background: var(--paper); border: 1px solid rgba(19, 35, 26, .07); overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s; }
.tile:hover { transform: translateY(-5px); box-shadow: 0 34px 50px -36px rgba(14, 27, 20, .45); }
.tile-wide { grid-column: span 2; }
.tile-tall { grid-row: span 2; background: var(--forest); color: #eef4ee; }
.tile-tall p { color: #9fb3a6; }
.tile:nth-child(1) { background: linear-gradient(140deg, #cfe5d7, #eaf2e4); }
.tile:nth-child(8) { background: linear-gradient(140deg, #f6ead2, #f3f3e6); }
.tile-icon { position: absolute; top: 24px; left: 26px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(19, 35, 26, .06); color: var(--accent); font-size: 1.2rem; }
.tile-tall .tile-icon { background: rgba(255, 255, 255, .08); color: var(--mint); }
.tile h3 { font-size: 1.22rem; font-weight: 600; letter-spacing: -.025em; }
.tile p { color: var(--muted); font-size: .96rem; }
.tile-stat { margin-bottom: auto; padding-top: 68px; font-size: clamp(3.6rem, 6vw, 5.4rem); font-weight: 600; letter-spacing: -.06em; line-height: .9; color: var(--mint) !important; }
.tile-stat small { display: block; margin-top: 10px; font-size: .9rem; font-weight: 400; color: #9fb3a6; }

/* Privacy */
.h-privacy { position: relative; z-index: 6; background: var(--bg); padding: 0 0 clamp(80px, 10vw, 150px); }
.h-privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); padding: clamp(32px, 5vw, 72px); border-radius: clamp(24px, 3vw, 40px); background: #d7e7db; }
.h-privacy .h-head { margin: 0; align-content: start; }
.h-checks { display: grid; gap: 4px; }
.h-checks li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid rgba(19, 35, 26, .12); font-size: 1.06rem; font-weight: 500; letter-spacing: -.01em; }
.h-checks li:last-child { border: 0; }
.h-checks .icon { margin-top: 3px; color: var(--accent); }

/* Questions */
.h-faq { position: relative; z-index: 6; background: var(--bg); padding: 0 0 clamp(90px, 11vw, 160px); }
.h-faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 6vw, 90px); }

/* Get the app */
.h-get { position: relative; background: var(--forest); color: #eef4ee; border-radius: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0 0; overflow: hidden; --muted: #9fb3a6; --store-bg: #eef4ee; --store-fg: var(--forest); }
.h-get em { color: var(--mint); }
.h-get::before { content: ''; position: absolute; inset: 0; background: radial-gradient(40% 60% at 78% 50%, rgba(169, 210, 189, .22), transparent 70%); }
.h-get-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; min-height: 92svh; padding: 110px 0 80px; }
.h-get-copy { display: grid; gap: 28px; justify-items: start; }
.h-get-phone { height: min(70svh, 640px); }

.foot { --foot-bg: var(--forest); --fg: #eef4ee; --muted: #9fb3a6; --line: rgba(238, 244, 238, .14); }

@media (max-width: 960px) {
  .h-nav nav { display: none; }
  .h-hero { grid-template-columns: 1fr; padding-top: 104px; gap: 10px; }
  .h-hero-phone { height: 58svh; order: 2; }
  .h-float-a { left: 0; } .h-float-b { right: 0; } .h-float-c { left: 2%; }
  .h-scroll { display: none; }
  .h-story { grid-template-columns: 1fr; }
  .h-story-phone { z-index: 2; height: 52svh; padding: 76px 20% 34px; background: linear-gradient(var(--forest) 93%, transparent); }
  .h-steps { padding: 0 clamp(20px, 6vw, 40px); }
  .h-step { min-height: 58svh; align-content: start; padding-top: 5svh; }
  .demo, .h-privacy-grid, .h-faq-grid, .h-get-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .h-get-grid { min-height: 0; padding-bottom: 20px; }
  .h-get-phone { height: 54svh; }
  .no-webgl .h-story-phone { display: none; }
}
@media (max-width: 560px) {
  .studio-chip span { display: none; }
  .studio-chip { padding: 6px; }
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; }
  .tile { min-height: 190px; }
  .demo-result { grid-template-columns: 1fr; justify-items: center; }
  .demo-macros { width: 100%; }
  .demo-save { justify-self: stretch; }
  .h-float { font-size: .8rem; padding: 9px 12px; }
  .h-float strong { font-size: 1.1rem; }
  .stores .store { flex: 1 1 150px; }
}
