/* ==========================================================================
   Yumu — marketing site
   Tokens mirror the iOS app (Yumu/Core/Theme/YumuTheme.swift): quiet warm
   neutrals, the mascot's greens as accent, macro hues that always mean macros.
   ========================================================================== */

/* Self-hosted variable fonts (latin subset) — no third-party round trips before first paint. */
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/fonts/baloo2-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/nunito-latin.woff2") format("woff2");
}

:root {
  --bg: #F7F7F4;
  --cream: #FBF8EE;
  --surface: #FFFFFF;
  --surface-muted: #F0F0EB;
  --line: #E6E6E0;
  --ink: #1D211C;
  --muted: #6F7569;

  --lime: #94C914;
  --lime-soft: #E7F4C2;
  --green: #6F9C0E;
  --leaf: #238A16;
  --deep: #142010;
  --deep-2: #1E2D17;

  --highlight: #E08600;
  --rose: #E0558C;
  --protein: #D1495B;
  --carbs: #0E7490;
  --fat: #9A6B2F;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 36px;

  --shadow-sm: 0 1px 2px rgba(29, 33, 28, .06), 0 2px 8px rgba(29, 33, 28, .05);
  --shadow-md: 0 2px 6px rgba(29, 33, 28, .05), 0 12px 32px rgba(29, 33, 28, .08);
  --shadow-lg: 0 8px 24px rgba(29, 33, 28, .08), 0 30px 70px rgba(29, 33, 28, .12);

  --font-display: "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;

  --wrap: 1180px;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.05; letter-spacing: -.01em; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 6px; }

/* ---------- type ---------- */
.display {
  font-size: clamp(2.6rem, 5.3vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.025em;
}
.display--sm { font-size: clamp(2.4rem, 5vw, 4rem); }
.h2 {
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.02em;
  max-width: 17ch;
}
.lede { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--muted); max-width: 56ch; margin-top: 18px; }
.lede--light { color: rgba(237, 238, 233, .72); }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 700; font-size: .95rem; letter-spacing: .02em;
  color: var(--leaf);
  margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 18px; height: 18px; background: url("/img/leaf.svg") center/contain no-repeat; }
.eyebrow--light { color: var(--lime); }

.squiggle {
  white-space: nowrap;
  background: url("/img/squiggle.svg") left 100% / 100% .32em no-repeat;
  padding-bottom: .12em;
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px;
  border: 0; border-radius: 999px;
  background: var(--btn-bg); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 2px 0 rgba(0,0,0,.18), 0 8px 20px rgba(29, 33, 28, .18);
  transition: transform .2s var(--ease-spring), box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--small { padding: 10px 18px; font-size: .95rem; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 247, 244, .78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; }
.brand img { border-radius: 10px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { text-decoration: none; font-weight: 700; color: var(--muted); font-size: .98rem; }
.nav__links a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 48px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(148, 201, 20, .20), transparent 60%),
    radial-gradient(600px 400px at 5% 90%, rgba(224, 134, 0, .08), transparent 60%);
}
.hero__grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 40px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 10px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  font-weight: 700; font-size: .9rem; color: var(--muted); box-shadow: var(--shadow-sm);
}
.pill__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(148, 201, 20, .12); } }

.hero .lede { margin-top: 26px; }
.hero .display { max-width: 13ch; }

/* ---------- waitlist form ---------- */
.join { margin-top: 30px; max-width: 540px; }
.join__row {
  display: flex; gap: 6px; padding: 6px;
  background: var(--surface); border: 2px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-md);
  transition: border-color .2s, box-shadow .2s;
}
.join__row:focus-within { border-color: var(--lime); box-shadow: 0 0 0 5px rgba(148, 201, 20, .18), var(--shadow-md); }
.join__input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  padding: 0 18px; font: inherit; font-size: 1.05rem; color: var(--ink);
}
.join__input::placeholder { color: #A3A89D; }
.join__btn { --btn-bg: var(--green); white-space: nowrap; box-shadow: 0 2px 0 #557A08, 0 6px 16px rgba(111, 156, 14, .35); }
.join__btn:hover { --btn-bg: #638C0B; }
.join__btn[disabled] { opacity: .7; cursor: progress; }
.join__note { margin-top: 12px; padding-left: 20px; font-size: .92rem; color: var(--muted); font-weight: 600; }
.join__note.is-error { color: #C0392B; }
.join--center { margin-inline: auto; }
.join--center .join__note { padding-left: 0; text-align: center; }

.goals { border: 0; margin: 18px 0 0; padding: 0 0 0 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.goals legend { font-weight: 700; font-size: .92rem; margin-bottom: 10px; padding: 0; color: var(--ink); }
.goals legend span { color: var(--muted); font-weight: 600; }
.goals label { position: relative; cursor: pointer; }
.goals input { position: absolute; opacity: 0; pointer-events: none; }
.goals label span {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--line);
  font-weight: 700; font-size: .9rem; color: var(--muted);
  transition: all .18s;
}
.goals label:hover span { border-color: var(--lime); color: var(--ink); }
.goals input:checked + span { background: var(--lime-soft); border-color: var(--green); color: #3D5A05; }
.goals input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 2px; }

.count { margin-top: 26px; display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--muted); }
.count strong { color: var(--ink); }
.count__faces { display: flex; }
.count__faces img { width: 34px; height: 34px; object-fit: contain; background: var(--surface); border-radius: 50%; border: 2px solid var(--bg); padding: 3px; margin-left: -8px; box-shadow: var(--shadow-sm); }
.count__faces img:first-child { margin-left: 0; }

/* success state */
.success {
  display: flex; gap: 18px; align-items: center;
  padding: 18px 22px 18px 14px; margin-top: 30px; max-width: 540px;
  background: var(--surface); border: 2px solid var(--lime); border-radius: var(--r-lg);
  box-shadow: 0 0 0 6px rgba(148, 201, 20, .15), var(--shadow-md);
  animation: pop .5s var(--ease-spring);
  text-align: left;
}
.success img { width: 92px; flex: none; }
.success__title { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.1; }
.success__text { color: var(--muted); font-weight: 600; margin-top: 4px; }
.share { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.join--center + .success, .final .success { margin-inline: auto; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }

/* stage */
.hero__stage { position: relative; aspect-ratio: 1 / 1.02; max-width: 540px; width: 100%; justify-self: center; }
.blob {
  position: absolute; inset: 10% 6% 4%;
  background: radial-gradient(circle at 40% 35%, #F1FAD6 0%, #D8EE93 55%, #BFE05A 100%);
  border-radius: 46% 54% 50% 50% / 55% 48% 52% 45%;
  animation: morph 12s ease-in-out infinite;
  box-shadow: inset 0 -20px 60px rgba(111, 156, 14, .25);
}
@keyframes morph {
  33% { border-radius: 58% 42% 45% 55% / 45% 58% 42% 55%; }
  66% { border-radius: 42% 58% 57% 43% / 55% 44% 56% 45%; }
}
.hero__mascot {
  position: absolute; left: 50%; bottom: 6%; width: 64%;
  transform: translateX(-50%);
  filter: drop-shadow(0 26px 22px rgba(60, 90, 5, .28));
  animation: bob 4.2s ease-in-out infinite;
  transition: opacity .18s;
  cursor: pointer;
}
@keyframes bob { 50% { transform: translate(-50%, -12px) rotate(-1.5deg); } }
.hero__mascot.is-swapping { opacity: 0; }
.float { position: absolute; filter: drop-shadow(0 14px 14px rgba(29, 33, 28, .18)); animation: drift 6s ease-in-out infinite; }
.f-tomato { width: 17%; top: 6%; left: 4%; animation-delay: -1s; }
.f-broccoli { width: 19%; top: 2%; right: 8%; animation-delay: -3s; }
.f-carrot { width: 21%; bottom: 10%; right: -2%; animation-delay: -2s; }
@keyframes drift { 50% { transform: translateY(-14px) rotate(6deg); } }

.bubble, .chip {
  position: absolute; z-index: 2;
  background: var(--surface); border-radius: 18px;
  font-weight: 700; font-size: .92rem; box-shadow: var(--shadow-md);
  white-space: nowrap;
}
.bubble { padding: 12px 16px; font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; top: 18%; left: -4%; border-bottom-left-radius: 4px; animation: in-bubble .6s .5s var(--ease-spring) both; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; animation: in-bubble .6s var(--ease-spring) both, drift 7s ease-in-out infinite; }
.chip--a { left: -6%; bottom: 26%; animation-delay: 1s, -2s; }
.chip--b { right: -4%; top: 44%; animation-delay: 1.3s, -4s; }
.chip--c { left: 8%; bottom: 4%; animation-delay: 1.6s, -1s; }
@keyframes in-bubble { from { opacity: 0; transform: translateY(12px) scale(.85); } }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot--protein { background: var(--protein); }
.ic { width: 1em; height: 1em; flex: none; vertical-align: -.125em; }
.ic--ok { width: 20px; height: 20px; color: var(--leaf); }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; }

/* problem */
.problem { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.problem .h2 { max-width: 16ch; }
.mess { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin: 56px 0 48px; }
.scrap {
  width: min(250px, 100%); padding: 16px 18px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  transition: transform .6s var(--ease-spring), opacity .6s;
}
.scrap__app .ic { width: 16px; height: 16px; color: var(--green); }
.scrap__app { display: flex; align-items: center; gap: 7px; overflow-wrap: anywhere; min-width: 0; font-size: .8rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.scrap p { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.scrap--1 { transform: rotate(-4deg) translateY(6px); }
.scrap--2 { transform: rotate(2.5deg) translateY(-8px); background: #EEF7E6; }
.scrap--3 { transform: rotate(-1.5deg) translateY(14px); background: #FFF7D6; font-style: italic; }
.scrap--4 { transform: rotate(3.5deg); }
.scrap--5 { transform: rotate(-3deg) translateY(-4px); background: #EAF3FA; }
.mess:not(.is-in) .scrap { opacity: 0; transform: translateY(40px) rotate(0); }
.mess.is-in .scrap:nth-child(2) { transition-delay: .08s; }
.mess.is-in .scrap:nth-child(3) { transition-delay: .16s; }
.mess.is-in .scrap:nth-child(4) { transition-delay: .24s; }
.mess.is-in .scrap:nth-child(5) { transition-delay: .32s; }
.problem__resolve { max-width: 760px; margin: 0 auto; text-align: center; display: grid; gap: 18px; font-size: 1.12rem; color: var(--muted); }
.problem__resolve .big { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.25; color: var(--ink); }
.problem__resolve em { font-style: normal; color: var(--protein); }
.problem__resolve strong { color: var(--leaf); }

/* agent */
.agent { background: var(--deep); color: #EDEEE9; position: relative; overflow: hidden; }
.agent::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(800px 500px at 90% 0%, rgba(148, 201, 20, .16), transparent 60%),
              radial-gradient(700px 500px at 0% 100%, rgba(35, 138, 22, .18), transparent 60%);
}
.agent .wrap { position: relative; }
.agent__head { max-width: 720px; }
.agent .h2 { max-width: none; }

.demo { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; margin-top: 64px; }
.demo__prompts { display: grid; gap: 10px; }
.prompt {
  display: flex; gap: 14px; align-items: flex-start; text-align: left;
  padding: 16px 20px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
  font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.3;
  color: rgba(237, 238, 233, .7); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  position: relative; overflow: hidden;
}
.prompt .ic { width: 22px; height: 22px; margin-top: 1px; color: var(--lime); }
.prompt em { font-style: normal; color: rgba(237, 238, 233, .45); font-size: .95rem; }
.prompt:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.prompt.is-active { color: #fff; background: rgba(148, 201, 20, .12); border-color: rgba(148, 201, 20, .5); transform: translateX(6px); }
.prompt.is-active::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--lime); transform-origin: left; animation: progress var(--scene-ms, 7000ms) linear forwards;
}
.demo.is-paused .prompt.is-active::after { animation-play-state: paused; }
@keyframes progress { from { transform: scaleX(0); } }

/* ---------- iPhone chat demo ----------
   Drawn at iPhone 16 Pro logical size (393 × 852 pt) from the app's own
   metrics (ChatBubble.swift, ChatView.swift, YumuTheme.swift), then scaled
   down as one piece with --k so every proportion stays true to the device. */
.iphone { --k: .8; --w: 393px; --h: 852px; --bezel: 12px; width: calc((var(--w) + var(--bezel) * 2) * var(--k)); height: calc((var(--h) + var(--bezel) * 2) * var(--k)); justify-self: center; }
.iphone__frame {
  width: calc(var(--w) + var(--bezel) * 2); height: calc(var(--h) + var(--bezel) * 2);
  padding: var(--bezel); border-radius: 68px;
  background: linear-gradient(145deg, #3A3F37, #121511 40%, #262A23);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.14), inset 0 0 0 5px #0B0D0A, 0 50px 90px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.6);
  transform: scale(var(--k)); transform-origin: top left;
}
.iphone__screen {
  --y-bg: #F7F7F4; --y-surface: #FFFFFF; --y-muted: #F0F0EB; --y-border: #E6E6E0;
  --y-ink: #1D211C; --y-sub: #6F7569; --y-primary: #6F9C0E; --y-success: #238A16;
  position: relative; width: var(--w); height: var(--h); overflow: hidden;
  border-radius: 56px; background: var(--y-bg); color: var(--y-ink);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  font-size: 17px; line-height: 1.29; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
.iphone .ic { width: 1em; height: 1em; flex: none; }

/* status bar + Dynamic Island */
.ios-status { position: absolute; inset: 0 0 auto; height: 54px; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 0 34px 0 50px; font-family: -apple-system, "SF Pro Text", system-ui, sans-serif; }
.ios-status__time { font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.ios-island { position: absolute; left: 50%; top: 11px; width: 126px; height: 37px; margin-left: -63px; border-radius: 20px; background: #000; }
.ios-status__icons { display: flex; align-items: center; gap: 6px; }
.ios-status__icons .ic--sig { width: 18px; height: 12px; }
.ios-status__icons .ic--wifi { width: 16px; height: 12px; }
.ios-status__icons .ic--bat { width: 27px; height: 13px; }
.ios-home { position: absolute; left: 50%; bottom: 8px; width: 139px; height: 5px; margin-left: -70px; border-radius: 3px; background: var(--y-ink); z-index: 6; }

/* glass controls */
.y-disc {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.72); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.9), 0 1px 1px rgba(0,0,0,.04), 0 6px 16px rgba(29,33,28,.08);
  color: var(--y-ink); font-size: 22px;
}

/* contact header, Messages-style: the photo hangs between the bar buttons */
.y-header { position: absolute; inset: 0 0 auto; z-index: 4; height: 196px; padding: 58px 16px 0; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.y-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(var(--y-bg) 30%, rgba(247,247,244,0));
  -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent);
}
.y-contact { display: flex; flex-direction: column; align-items: center; margin-top: -2px; }
.y-contact__avatar { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: rgba(111,156,14,.14); box-shadow: inset 0 0 0 .5px rgba(230,230,224,.5); }
.y-contact__avatar img { width: 100%; height: 100%; transition: opacity .18s; }
.y-contact__avatar img.is-swapping { opacity: 0; }
.y-contact__avatar.is-busy { animation: y-breathe 1.6s ease-in-out infinite; }
@keyframes y-breathe { 50% { transform: scale(1.05); } }
.y-contact__pill {
  display: flex; flex-direction: column; align-items: center; margin-top: -10px; padding: 7px 16px;
  border-radius: 18px; background: rgba(255,255,255,.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.9), 0 4px 12px rgba(29,33,28,.06);
  transition: padding .3s cubic-bezier(.34, 1.56, .64, 1);
}
.y-contact__name { display: flex; align-items: center; gap: 3px; font-size: 16px; font-weight: 600; line-height: 20px; }
.y-contact__name .ic { width: 11px; height: 11px; color: var(--y-sub); stroke-width: 3; }
/* live tool status: a second line inside the contact pill, under "Yumu ›" */
.y-contact__status {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  max-height: 0; max-width: 0; opacity: 0; overflow: hidden;
  font-size: 12px; font-weight: 600; line-height: 16px; color: var(--y-primary); white-space: nowrap;
  transition: max-height .3s cubic-bezier(.34, 1.56, .64, 1), max-width .3s cubic-bezier(.34, 1.56, .64, 1), opacity .2s, margin .3s;
}
.y-contact__status.is-on { max-height: 18px; max-width: 280px; opacity: 1; margin-top: 2px; }
.y-contact__status .ic { width: 13px; height: 13px; animation: y-pulse 1.1s ease-in-out infinite; }
@keyframes y-pulse { 50% { opacity: .35; } }

/* transcript */
.y-chat { position: absolute; inset: 0 0 96px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.y-col { display: flex; flex-direction: column; gap: 12px; padding: 196px 16px 16px; }
.y-col > * { flex: none; }
.y-anim { animation: y-in .38s cubic-bezier(.34, 1.56, .64, 1) both; }
.y-row--u .y-anim, .y-row--u.y-anim { transform-origin: bottom right; }
@keyframes y-in { from { opacity: 0; transform: scale(.94); } }

.y-divider { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: 11px; font-weight: 600; color: var(--y-sub); text-align: center; line-height: 1.3; }
.y-divider i { flex: 1; height: 1px; background: var(--y-border); }

.y-row { display: flex; }
.y-row--u { justify-content: flex-end; padding-left: 48px; }
.y-row--a { justify-content: flex-start; padding-right: 48px; }
.y-row + .y-row.y-same { margin-top: -9px; } /* 12 gap → 3pt run spacing */
.y-bub { position: relative; padding: 10px 16px; border-radius: 20px; font-size: 17px; line-height: 22px; }
.y-bub b { font-weight: 700; }
.y-bub--u { background: var(--y-primary); color: #fff; }
.y-bub--a { background: var(--y-muted); color: var(--y-ink); }
.y-bub--u.y-run-top { border-top-right-radius: 6px; }
.y-bub--u.y-run-bot { border-bottom-right-radius: 6px; }
.y-bub--a.y-run-top { border-top-left-radius: 6px; }
.y-bub--a.y-run-bot { border-bottom-left-radius: 6px; }
/* the iMessage tail, only on the last bubble of a run */
.y-tail::before, .y-tail::after { content: ""; position: absolute; bottom: 0; height: 20px; }
.y-bub--u.y-tail::before { right: -7px; width: 20px; background: var(--y-primary); border-bottom-left-radius: 16px 14px; }
.y-bub--u.y-tail::after { right: -26px; width: 26px; background: var(--y-bg); border-bottom-left-radius: 10px; }
.y-bub--a.y-tail::before { left: -7px; width: 20px; background: var(--y-muted); border-bottom-right-radius: 16px 14px; }
.y-bub--a.y-tail::after { left: -26px; width: 26px; background: var(--y-bg); border-bottom-right-radius: 10px; }
.y-photo { width: 200px; height: 200px; border-radius: 20px 20px 6px 20px; overflow: hidden; background: #EFE7D6; display: grid; place-items: center; }
.y-photo img { width: 86%; }


.y-typing { align-self: flex-start; display: flex; gap: 4px; padding: 14px 16px; border-radius: 20px; background: var(--y-muted); }
.y-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--y-sub); animation: y-breath .9s ease-in-out infinite alternate; }
.y-typing i:nth-child(2) { animation-delay: .15s; }
.y-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes y-breath { from { opacity: .3; transform: translateY(1.5px); } to { opacity: 1; transform: translateY(-1.5px); } }

/* meal block: photo card with a glass macro strip, actions, carousel dots */
.y-meal { display: grid; gap: 12px; }
.y-meal__card { position: relative; height: 210px; border-radius: 24px; overflow: hidden; background: radial-gradient(circle at 50% 38%, #FBF4E4, #EADFC7); box-shadow: 0 2px 6px rgba(29,33,28,.06), 0 10px 24px rgba(29,33,28,.1); }
.y-meal__img { position: absolute; inset: 0 0 64px; display: grid; place-items: center; }
.y-meal__img img { height: 150px; width: auto; filter: drop-shadow(0 10px 10px rgba(80,60,20,.2)); }
.y-meal__info { position: absolute; inset: auto 0 0; padding: 12px; background: rgba(255,255,255,.72); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); }
.y-meal__info > b { display: block; font-size: 20px; font-weight: 600; line-height: 1.2; margin-bottom: 8px; }
.y-macros { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; font-size: 11px; font-weight: 600; color: var(--y-sub); }
.y-macros b { display: block; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.y-macros .k b { color: var(--y-primary); } .y-macros .p b { color: var(--protein); } .y-macros .c b { color: var(--carbs); } .y-macros .f b { color: var(--fat); }
.y-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.y-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 999px; font-size: 20px; font-weight: 600; background: var(--y-primary); color: #fff; transition: transform .15s, background .25s, color .25s; }
.y-btn .ic { width: 20px; height: 20px; }
.y-btn--2 { background: var(--y-muted); color: var(--y-ink); }
.y-btn.is-pressed { transform: scale(.95); }
.y-btn.is-done { background: rgba(35,138,22,.12); color: var(--y-success); }
.y-dots { display: flex; justify-content: center; gap: 8px; }
.y-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(111,117,105,.35); }
.y-dots i.on { width: 18px; background: var(--y-primary); }

/* glass cards: plan and grocery blocks */
.y-card { padding: 16px; border-radius: 24px; background: rgba(255,255,255,.8); box-shadow: inset 0 0 0 .5px rgba(230,230,224,.9), 0 2px 10px rgba(29,33,28,.05); display: grid; gap: 10px; }
.y-card__title { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 600; }
.y-card__title .ic { width: 20px; height: 20px; color: var(--y-primary); }
.y-card__title .y-chev { margin-left: auto; width: 13px; height: 13px; color: var(--y-sub); }
.y-card__day { font-size: 13px; font-weight: 600; color: var(--y-sub); margin-top: 2px; }
.y-li { display: flex; align-items: baseline; gap: 8px; font-size: 16px; font-weight: 500; }
.y-li .ic { align-self: center; width: 17px; height: 17px; color: var(--y-success); }
.y-li .ic.dim { color: var(--y-sub); width: 12px; height: 12px; }
.y-li small { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--y-sub); white-space: nowrap; }
.y-li small .ic { width: 12px; height: 12px; color: var(--y-sub); }
.y-card__note { font-size: 13px; font-weight: 600; color: var(--y-sub); }
.y-card__note.ok { color: var(--y-success); }
.y-card .y-btn { font-size: 18px; height: 48px; }

/* approval: compact, and it becomes its own receipt */
.y-approve { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 24px; background: rgba(111,156,14,.08); box-shadow: inset 0 0 0 1px rgba(111,156,14,.25); transition: background .3s, box-shadow .3s; }
.y-approve__ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: rgba(111,156,14,.12); color: var(--y-primary); }
.y-approve__ic .ic { width: 17px; height: 17px; }
.y-approve > div { flex: 1; min-width: 0; display: grid; gap: 1px; }
.y-approve b { font-size: 15px; font-weight: 600; line-height: 1.25; }
.y-approve small { font-size: 12px; font-weight: 600; color: var(--y-sub); }
.y-approve__btns { display: flex; gap: 6px; }
.y-approve__btns span { padding: 8px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--y-muted); color: var(--y-ink); transition: transform .15s; }
.y-approve__btns span:last-child { background: var(--y-primary); color: #fff; }
.y-approve__btns span.is-pressed { transform: scale(.9); }
.y-approve__ok { display: none; width: 22px !important; height: 22px !important; color: var(--y-success); }
.y-approve.is-done { background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 .5px var(--y-border); }
.y-approve.is-done .y-approve__btns { display: none; }
.y-approve.is-done .y-approve__ok { display: block; }
.y-approve.is-done small { color: var(--y-success); }

/* composer: + disc and the glass field, like Messages */
.y-composer { position: absolute; inset: auto 0 34px; z-index: 4; display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px; }
.y-composer__plus { flex: none; color: var(--y-primary); font-size: 20px; margin-bottom: 2px; }
.y-composer__field {
  flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 10px; min-height: 48px; padding: 6px 6px 6px 16px;
  border-radius: 24px; background: rgba(255,255,255,.72); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.9), 0 6px 18px rgba(29,33,28,.08);
}
.y-composer__text { flex: 1; min-width: 0; align-self: center; padding: 6px 0; color: #A3A89D; font-size: 17px; line-height: 22px; overflow-wrap: anywhere; }
.y-composer__text.has-text { color: var(--y-ink); }
.y-composer__text.has-text::after { content: ""; display: inline-block; width: 2px; height: 20px; margin-left: 1px; vertical-align: -4px; background: var(--y-primary); animation: y-caret 1s steps(1) infinite; }
@keyframes y-caret { 50% { opacity: 0; } }
.y-composer__mic { flex: none; width: 20px !important; height: 20px !important; margin-bottom: 7px; color: var(--y-sub); }
.y-composer__send { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--y-border); color: #fff; transition: background .2s, transform .15s; }
.y-composer__send .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.y-composer.has-text .y-composer__send { background: var(--y-primary); }
.y-composer__send.is-pressed { transform: scale(.85); }

.trust { list-style: none; padding: 0; margin: 72px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.trust li { color: rgba(237, 238, 233, .68); padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); }
.trust strong { display: block; color: #fff; font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 4px; }

/* loop: see "how it works timeline" below */

/* ---------- how it works timeline ----------
   A rail fills as you scroll; each step lights up when it reaches the middle
   of the screen and plays a small piece of the app's UI. */
.tl { --p: 0; position: relative; margin-top: 72px; }
.tl__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 96px; }
.tl__rail { position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--line); }
.tl__fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(var(--lime), var(--green)); transform-origin: top; transform: scaleY(var(--p)); box-shadow: 0 0 18px rgba(148, 201, 20, .45); }
.tl__rider {
  position: absolute; left: 50%; top: calc(var(--p) * 100%); width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%; overflow: hidden; background: var(--lime-soft);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--lime), 0 10px 24px rgba(60, 90, 5, .3);
  z-index: 2;
}
.tl__rider { transition: opacity .25s, transform .3s var(--ease-spring); }
.tl__rider.is-docked { opacity: 0; transform: scale(.6); }
.tl__rider img { width: 100%; height: 100%; transition: opacity .18s; }
.tl__rider img.is-swapping { opacity: 0; }

.tl__step { position: relative; display: grid; grid-template-columns: 1fr 120px 1fr; align-items: center; }
.tl__node {
  grid-column: 2; grid-row: 1; justify-self: center; z-index: 1;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface); color: var(--muted); box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
  transition: background .4s, color .4s, box-shadow .4s, transform .5s var(--ease-spring);
}
.tl__node .ic { width: 24px; height: 24px; stroke-width: 2.4; }
.tl__copy { grid-column: 1; grid-row: 1; text-align: right; display: grid; justify-items: end; }
.tl__ui { grid-column: 3; grid-row: 1; }
.tl__step:nth-child(even) .tl__copy { grid-column: 3; text-align: left; justify-items: start; }
.tl__step:nth-child(even) .tl__ui { grid-column: 1; justify-self: end; }
.tl__art { width: 128px; height: 96px; display: grid; place-items: center; margin-bottom: 10px; }
.tl__art img { max-height: 96px; width: auto; filter: drop-shadow(0 12px 12px rgba(29,33,28,.16)); transform: scale(.85) rotate(-4deg); transition: transform .6s var(--ease-spring); }
.tl__n { font-family: var(--font-display); font-weight: 800; font-size: .95rem; letter-spacing: .04em; color: var(--muted); transition: color .4s; }
.tl__copy h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; margin: 4px 0 8px; }
.tl__copy p { color: var(--muted); max-width: 36ch; }

/* dim until reached */
.tl__copy, .tl__ui { transition: opacity .6s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .tl__step:not(.is-on) .tl__copy, .js .tl__step:not(.is-on) .tl__ui { opacity: .35; }
.js .tl__step:not(.is-on) .tl__ui { transform: translateY(24px) scale(.97); }
.tl__step.is-on .tl__node { background: var(--green); color: #fff; transform: scale(1.12); box-shadow: 0 0 0 6px var(--lime-soft), 0 10px 24px rgba(111, 156, 14, .35); }
.tl__step.is-on .tl__n { color: var(--green); }
.tl__step.is-on .tl__art img { transform: none; }

/* mini app cards */
.tw { width: min(380px, 100%); padding: 18px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); display: grid; gap: 10px; font-size: .95rem; }
.tw__head { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.tw__head .ic { width: 20px; height: 20px; color: var(--green); }
.tw__head span { margin-left: auto; font-family: var(--font-body); font-size: .8rem; font-weight: 700; color: var(--muted); }
.tw__head em { font-style: normal; color: var(--green); }

.tw__row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: var(--bg); transition: transform .5s var(--ease-spring), opacity .4s; }
.tw__row img { width: 40px; height: 40px; object-fit: contain; }
.tw__row b { min-width: 0; font-weight: 700; line-height: 1.25; }
.tw__row small { margin-left: auto; color: var(--muted); font-weight: 700; font-size: .8rem; }
.tw__row--new { background: var(--lime-soft); }
.tw__name { display: grid; gap: 2px; min-width: 0; }
.tw__name .tw__tag { margin-left: 0; font-size: .78rem; font-weight: 700; }
.tw__tag { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--green) !important; }
.tw__tag .ic { width: 14px; height: 14px; }
.js .tl__step:not(.is-on) .tw__row { opacity: 0; transform: translateX(-16px); }
.tl__step.is-on .tw__row:nth-of-type(2) { transition-delay: .15s; }
.tl__step.is-on .tw__row:nth-of-type(3) { transition-delay: .3s; }
.tl__step.is-on .tw__row:nth-of-type(4) { transition-delay: .6s; }

.tw__week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.tw__day { display: grid; gap: 6px; justify-items: center; }
.tw__day small { font-weight: 800; color: var(--muted); font-size: .75rem; }
.tw__day i { width: 100%; height: 26px; border-radius: 8px; background: var(--surface-muted); transition: background .3s, transform .4s var(--ease-spring); }
.tl__step.is-on .tw__day i { background: var(--lime); transform: scale(1); }
.tl__step.is-on .tw__day i:nth-of-type(2) { background: var(--green); }
.tl__step.is-on .tw__day i:nth-of-type(3) { background: var(--leaf); }
.js .tl__step:not(.is-on) .tw__day i { transform: scale(.7); }
.tl__step.is-on .tw__day:nth-child(1) i:nth-of-type(1) { transition-delay: 0.25s; }
.tl__step.is-on .tw__day:nth-child(1) i:nth-of-type(2) { transition-delay: 0.30s; }
.tl__step.is-on .tw__day:nth-child(1) i:nth-of-type(3) { transition-delay: 0.35s; }
.tl__step.is-on .tw__day:nth-child(2) i:nth-of-type(1) { transition-delay: 0.34s; }
.tl__step.is-on .tw__day:nth-child(2) i:nth-of-type(2) { transition-delay: 0.39s; }
.tl__step.is-on .tw__day:nth-child(2) i:nth-of-type(3) { transition-delay: 0.44s; }
.tl__step.is-on .tw__day:nth-child(3) i:nth-of-type(1) { transition-delay: 0.43s; }
.tl__step.is-on .tw__day:nth-child(3) i:nth-of-type(2) { transition-delay: 0.48s; }
.tl__step.is-on .tw__day:nth-child(3) i:nth-of-type(3) { transition-delay: 0.53s; }
.tl__step.is-on .tw__day:nth-child(4) i:nth-of-type(1) { transition-delay: 0.52s; }
.tl__step.is-on .tw__day:nth-child(4) i:nth-of-type(2) { transition-delay: 0.57s; }
.tl__step.is-on .tw__day:nth-child(4) i:nth-of-type(3) { transition-delay: 0.62s; }
.tl__step.is-on .tw__day:nth-child(5) i:nth-of-type(1) { transition-delay: 0.61s; }
.tl__step.is-on .tw__day:nth-child(5) i:nth-of-type(2) { transition-delay: 0.66s; }
.tl__step.is-on .tw__day:nth-child(5) i:nth-of-type(3) { transition-delay: 0.71s; }
.tl__step.is-on .tw__day:nth-child(6) i:nth-of-type(1) { transition-delay: 0.70s; }
.tl__step.is-on .tw__day:nth-child(6) i:nth-of-type(2) { transition-delay: 0.75s; }
.tl__step.is-on .tw__day:nth-child(6) i:nth-of-type(3) { transition-delay: 0.80s; }
.tl__step.is-on .tw__day:nth-child(7) i:nth-of-type(1) { transition-delay: 0.79s; }
.tl__step.is-on .tw__day:nth-child(7) i:nth-of-type(2) { transition-delay: 0.84s; }
.tl__step.is-on .tw__day:nth-child(7) i:nth-of-type(3) { transition-delay: 0.89s; }

.tw__check { display: flex; align-items: center; gap: 12px; padding: 6px 2px; }
.tw__box { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); color: #fff; transition: background .3s, box-shadow .3s; }
.tw__box .ic { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transform: scale(.3); transition: opacity .2s, transform .35s var(--ease-spring); }
.tl__step.is-on .tw__box .ic { opacity: 1; transform: none; }
.tw__check b { font-weight: 700; transition: color .3s; }
.tw__check small { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--muted); }
.tl__step.is-on .tw__check .tw__box { background: var(--leaf); box-shadow: none; }
.tl__step.is-on .tw__check b { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(111,117,105,.5); }
.tl__step.is-on .tw__check:nth-of-type(2) * { transition-delay: .35s; }
.tl__step.is-on .tw__check:nth-of-type(3) * { transition-delay: .7s; }
.tl__step.is-on .tw__check:nth-of-type(4) * { transition-delay: 1.05s; }
.tl__step.is-on .tw__check:nth-of-type(5) * { transition-delay: 1.4s; }

.tw__bar { height: 8px; border-radius: 4px; background: var(--surface-muted); overflow: hidden; }
.tw__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--lime), var(--green)); transition: width 1.2s .2s cubic-bezier(.2, .8, .2, 1); }
.tl__step.is-on .tw__bar i { width: 50%; }
.tw__stepText { font-size: 1.02rem; font-weight: 600; color: var(--ink); line-height: 1.45; }
.tw__servings { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 700; font-size: .88rem; }
.tw__stepper { display: inline-flex; align-items: center; gap: 12px; padding: 4px 6px; border-radius: 999px; background: var(--bg); }
.tw__stepper i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); font-style: normal; color: var(--green); box-shadow: var(--shadow-sm); }
.tw__servings small { width: 100%; color: var(--muted); font-weight: 600; }

.tw--track { display: flex; align-items: center; gap: 18px; }
.tw__ring { position: relative; flex: none; width: 120px; height: 120px; }
.tw__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tw__ring circle { fill: none; stroke: var(--surface-muted); stroke-width: 11; stroke-linecap: round; }
.tw__ring .tw__ringFg { stroke: var(--green); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.4s .5s cubic-bezier(.2, .8, .2, 1); }
.tl__step.is-on .tw__ringFg { stroke-dashoffset: 32; }
.tw__ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.tw__ring strong { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }
.tw__ring small { font-size: .72rem; font-weight: 700; color: var(--muted); }
.tw__track { display: grid; gap: 10px; }
.tw__ate { display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 10px 18px; border-radius: 999px; background: var(--green); color: #fff; font-family: var(--font-display); font-weight: 700; transition: background .4s .3s, color .4s .3s, transform .3s .2s var(--ease-spring); }
.tw__ate .ic { width: 18px; height: 18px; }
.tl__step.is-on .tw__ate { background: rgba(35, 138, 22, .12); color: var(--leaf); }
.tw__track small { color: var(--muted); font-weight: 600; }

@media (max-width: 719px) {
  .tl { margin-top: 48px; }
  .tl__list { gap: 64px; }
  .tl__rail { left: 22px; }
  .tl__rider { left: 22px; width: 40px; height: 40px; margin: -20px 0 0 -20px; }
  .tl__step, .tl__step:nth-child(even) { grid-template-columns: 44px 1fr; column-gap: 20px; align-items: start; }
  .tl__node { grid-column: 1; width: 44px; height: 44px; }
  .tl__node .ic { width: 20px; height: 20px; }
  .tl__copy, .tl__step:nth-child(even) .tl__copy { grid-column: 2; grid-row: 1; text-align: left; justify-items: start; }
  .tl__ui, .tl__step:nth-child(even) .tl__ui { grid-column: 2; grid-row: 2; justify-self: stretch; margin-top: 20px; }
  .tl__art { width: 96px; height: 72px; }
  .tl__art img { max-height: 72px; }
  .tw { width: 100%; }
}

/* logging */
.log { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.log__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.log__mascot { position: relative; justify-self: center; max-width: 380px; }
.log__mascot::before { content: ""; position: absolute; inset: 8% -6% 0; background: radial-gradient(circle, var(--lime-soft) 0%, transparent 70%); z-index: -1; }
.log__mascot img { animation: bob-soft 5s ease-in-out infinite; filter: drop-shadow(0 22px 18px rgba(60, 90, 5, .2)); }
@keyframes bob-soft { 50% { transform: translateY(-10px); } }
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.way { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.way__ic { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--lime-soft); color: var(--green); margin-bottom: 10px; }
.way__ic .ic { width: 24px; height: 24px; }
.way h3 { font-size: 1.25rem; font-weight: 700; }
.way p { color: var(--muted); font-size: .96rem; margin-top: 4px; }

/* for you */
.personas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.persona {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 26px 28px; min-height: 230px; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-spring), box-shadow .3s, border-color .3s;
}
.persona:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--lime); }
.persona img { position: absolute; right: 14px; bottom: -34px; width: 104px; transition: transform .4s var(--ease-spring); }
.persona:hover img { transform: translateY(-12px) rotate(-6deg); }
.persona h3 { font-size: 1.45rem; font-weight: 700; padding-right: 60px; }
.persona p { color: var(--muted); margin-top: 10px; padding-right: 104px; }
.persona em { font-style: normal; color: var(--ink); font-weight: 700; }

.cuisines { margin-top: 72px; }
.cuisines__label { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 20px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 16px; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee figure { margin: 0; position: relative; width: 190px; height: 240px; border-radius: var(--r-lg); overflow: hidden; flex: none; box-shadow: var(--shadow-sm); }
.marquee img { width: 100%; height: 100%; object-fit: cover; }
.marquee figcaption { position: absolute; left: 10px; bottom: 10px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.92); font-family: var(--font-display); font-weight: 700; font-size: .92rem; }
@keyframes marquee { to { transform: translateX(calc(-50% - 8px)); } }

/* numbers */
.numbers__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.today { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 26px; box-shadow: var(--shadow-lg); max-width: 420px; justify-self: center; width: 100%; }
.today__head { display: flex; justify-content: space-between; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.today__streak .ic { width: 15px; height: 15px; }
.today__streak { display: inline-flex; align-items: center; gap: 4px; font-size: .9rem; color: var(--highlight); background: #FFF3E0; padding: 2px 10px; border-radius: 999px; }
.ring { position: relative; width: 190px; margin: 18px auto; }
.ring svg { width: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.ring__bg { stroke: var(--surface-muted); }
.ring__fg { stroke: var(--green); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s cubic-bezier(.2, .8, .2, 1); }
.today.is-in .ring__fg { stroke-dashoffset: 32; }
.ring__num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring__num strong { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.ring__num span { font-size: .85rem; color: var(--muted); font-weight: 700; }
.macros { display: grid; gap: 10px; }
.macro { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 10px; font-size: .88rem; font-weight: 700; }
.macro b { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.bar { height: 9px; border-radius: 99px; background: var(--surface-muted); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1.4s .2s cubic-bezier(.2, .8, .2, 1); }
.macro--protein span { color: var(--protein); } .macro--protein i { background: var(--protein); }
.macro--carbs span { color: var(--carbs); } .macro--carbs i { background: var(--carbs); }
.macro--fat span { color: var(--fat); } .macro--fat i { background: var(--fat); }
.today.is-in .macro--protein i { width: 78%; }
.today.is-in .macro--carbs i { width: 61%; }
.today.is-in .macro--fat i { width: 66%; }
.today__meals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.today__meals div { position: relative; background: var(--cream); border-radius: var(--r-md); padding: 10px 8px 8px; text-align: center; font-weight: 700; font-size: .8rem; }
.today__meals img { width: 64px; margin: 0 auto 4px; }
.today__meals em { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--leaf); color: #fff; font-style: normal; display: grid; place-items: center; }
.today__meals em .ic { width: 12px; height: 12px; stroke-width: 3; }
.today__meals em.todo { background: var(--line); color: var(--muted); }

.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.checks li { position: relative; padding-left: 38px; color: var(--muted); }
.checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--lime-soft) url("/img/check.svg?v=48d6099279") center / 14px no-repeat; }
.checks strong { color: var(--ink); display: block; font-size: 1.08rem; }

/* privacy */
.privacy { padding-top: 0; }
.privacy__card {
  display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(28px, 5vw, 56px); box-shadow: var(--shadow-md);
}
.privacy__mascot { width: 100%; filter: drop-shadow(0 16px 16px rgba(29,33,28,.14)); }
.privacy__points { display: grid; gap: 14px; margin-top: 24px; }
.privacy__points p { color: var(--muted); display: flex; gap: 14px; align-items: flex-start; }
.privacy__points .pv { width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: var(--lime-soft); color: var(--green); margin-top: 2px; }
.privacy__points strong { color: var(--ink); }

/* meet */
.meet { background: linear-gradient(180deg, var(--bg), #EEF6DA); }
.meet__head { text-align: center; display: grid; justify-items: center; }
.meet__head .h2 { max-width: 18ch; }
.meet__head .lede { text-align: center; }
.moods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.mood {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 14px 16px; cursor: pointer; display: grid; justify-items: center; gap: 10px;
  transition: transform .3s var(--ease-spring), box-shadow .3s;
}
.mood img { height: 150px; width: auto; transition: transform .3s var(--ease-spring); }
.mood span { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.mood:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.mood:hover img { animation: wiggle .6s ease-in-out; }
.mood.is-jump img { animation: jump .7s var(--ease-spring); }
@keyframes wiggle { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes jump { 40% { transform: translateY(-34px) scale(1.06, .94); } 70% { transform: translateY(0) scale(.94, 1.06); } }

/* faq */
.faq__wrap { max-width: 820px; }
.faq .h2 { margin-bottom: 36px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 1.3rem; transition: transform .3s var(--ease-spring), background .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); background: var(--lime-soft); }
.faq details p { color: var(--muted); padding: 0 44px 24px 0; }

/* final */
.final { padding: clamp(80px, 10vw, 130px) 0; background: radial-gradient(900px 500px at 50% 110%, #CBE872, transparent 70%), #EEF6DA; text-align: center; overflow: hidden; }
.final__inner { display: grid; justify-items: center; }
.final__mascot { width: 170px; margin-bottom: 18px; filter: drop-shadow(0 18px 16px rgba(60, 90, 5, .25)); animation: bob-soft 3.6s ease-in-out infinite; }
.final .lede { text-align: center; }

/* footer */
.footer { padding: 40px 0 48px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.footer nav { display: flex; gap: 20px; margin-left: auto; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--ink); }
.footer__legal { width: 100%; font-size: .85rem; }
.footer .brand { font-size: 1.35rem; color: var(--ink); }

/* reveal */
[data-reveal] { transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js [data-reveal]:not(.is-in):not(.mess) { opacity: 0; transform: translateY(28px); }

/* ---------- responsive ----------
   Desktop > 1023 · tablet 720–1023 (iPad portrait keeps two-column layouts)
   · phone < 720 · small phone < 380 */
@media (max-width: 1080px) {
  .personas { grid-template-columns: repeat(2, 1fr); }
}
/* when the page is as wide as the screen, keep the hero's floating chips inside it */
@media (max-width: 1260px) {
  .chip--b { right: 0; }
  .chip--a, .bubble { left: 0; }
}

/* tablet: same structure as desktop, tighter */
@media (max-width: 1023px) {
  .wrap { padding: 0 32px; }
  .nav__links { gap: 20px; }
  .nav__links a { font-size: .92rem; }
  .hero { padding: 32px 0 56px; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; gap: 16px; }
  .display { font-size: clamp(2.5rem, 5.8vw, 3.6rem); }
  .hero .lede { font-size: 1.05rem; }
  .bubble { font-size: .95rem; left: -2%; }
  .chip { font-size: .8rem; padding: 7px 11px; }
  .demo { gap: 32px; margin-top: 48px; }
  .prompt { font-size: 1rem; padding: 14px 16px; }
  .trust { gap: 20px; }
  .log__grid { grid-template-columns: .75fr 1.25fr; gap: 32px; }
  .numbers__grid { gap: 36px; }
  .privacy__card { grid-template-columns: 200px 1fr; gap: 32px; }
  .moods { gap: 12px; }
  .mood img { height: 120px; }
  .tw { padding: 16px; }
  .tw__head { flex-wrap: wrap; row-gap: 2px; }
  .tw__head span { white-space: nowrap; }
  .tw__row small { white-space: nowrap; }
  .persona p { padding-right: 84px; }
  .persona img { width: 92px; right: 10px; bottom: -26px; }
  .persona h3 { padding-right: 0; }
}
/* iPad portrait: the hero is centered and stacked, so the mascot stays big */
@media (min-width: 720px) and (max-width: 899px) {
  .hero__grid { grid-template-columns: 1fr; gap: 0; text-align: center; }
  .hero__stage { order: -1; max-width: 440px; margin: 0 auto -12px; }
  .hero__copy { display: grid; justify-items: center; }
  .hero .display { max-width: 15ch; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .join { width: 100%; }
  .join__note { padding-left: 0; }
  .goals { justify-content: center; padding-left: 0; }
  .goals legend { width: 100%; }
  .count { justify-content: center; }
  .success { margin-left: auto; margin-right: auto; text-align: left; }
}
@media (min-width: 720px) and (max-width: 1023px) {
  .tl__step { grid-template-columns: 1fr 88px 1fr; }
  .tl__list { gap: 72px; }
}

/* phone and small tablets in portrait */
@media (max-width: 719px) {
  .wrap { padding: 0 24px; }
  .nav__links { display: none; }
  .hero { padding-top: 16px; }
  .hero__grid { grid-template-columns: 1fr; gap: 4px; }
  .hero__stage { order: -1; max-width: 380px; margin: 0 auto -8px; }
  .demo { grid-template-columns: 1fr; gap: 28px; }
  .demo__prompts { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -24px; padding: 4px 24px 8px; scrollbar-width: none; }
  .demo__prompts::-webkit-scrollbar { display: none; }
  .prompt { flex: 0 0 min(76%, 300px); scroll-snap-align: center; }
  .prompt.is-active { transform: none; }
  .trust { grid-template-columns: 1fr; gap: 18px; margin-top: 48px; }
  .log__grid, .numbers__grid { grid-template-columns: 1fr; gap: 32px; }
  .log__mascot { max-width: 190px; }
  .privacy__card { grid-template-columns: 1fr; gap: 16px; }
  .privacy__mascot { max-width: 180px; justify-self: center; }
  .moods { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 72px 0; }
  .demo__prompts { margin: 0 -16px; padding-inline: 16px; }
  .btn--small { padding: 9px 14px; font-size: .88rem; }
  .brand { font-size: 1.4rem; }
  .pill__lead { display: none; }
  .join__row { flex-direction: column; border-radius: 26px; padding: 6px; }
  .join__input { padding: 14px 14px; }
  .join__btn { width: 100%; padding: 16px; }
  .join__note { padding-left: 4px; }
  .bubble { font-size: .9rem; left: 0; top: 12%; }
  .chip { font-size: .76rem; padding: 6px 10px; }
  .chip--a { left: 0; }
  .chip--b { right: 0; }
  /* the scattered apps: two small columns instead of one long stack */
  .mess { gap: 12px; margin: 36px 0 32px; }
  .scrap { width: calc(50% - 6px); padding: 12px 12px 14px; }
  .scrap p { font-size: .98rem; }
  .scrap__app { font-size: .66rem; gap: 5px; }
  .scrap__app .ic { width: 13px; height: 13px; }
  .problem__resolve { font-size: 1rem; }
  .ways { grid-template-columns: 1fr 1fr; gap: 10px; }
  .way { padding: 16px; }
  .way h3 { font-size: 1.08rem; }
  .way p { font-size: .9rem; }
  .personas { grid-template-columns: 1fr; gap: 12px; }
  .persona { min-height: 0; padding: 20px 20px 22px; }
  .persona h3 { font-size: 1.3rem; padding-right: 0; }
  .persona p { padding-right: 76px; }
  .persona img { width: 82px; right: 8px; bottom: -24px; }
  .marquee figure { width: 150px; height: 190px; }
  .today { padding: 20px; }
  .mood { padding: 16px 10px 14px; }
  .mood img { height: 104px; }
  .mood span { font-size: .95rem; }
  .faq summary { font-size: 1.12rem; }
  .success { flex-direction: column; text-align: center; }
  .share { justify-content: center; }
  .footer nav { margin-left: 0; }
  /* timeline mini cards */
  .tw__head { flex-wrap: wrap; row-gap: 2px; font-size: 1.02rem; }
  .tw__head span { white-space: nowrap; }
  .tw__row { gap: 10px; padding: 7px; }
  .tw__row img { width: 34px; height: 34px; }
  .tw__row b { font-size: .92rem; }
  .tw__row small { white-space: nowrap; font-size: .75rem; }
  .tw__check { gap: 10px; }
  .tw__check b { font-size: .9rem; }
  .tw__stepText { font-size: .95rem; }
}

@media (max-width: 380px) {
  .tw__check small { display: none; }
  .display { font-size: 2.35rem; }
  .h2 { font-size: 1.8rem; }
  .ways { grid-template-columns: 1fr; }
  .scrap p { font-size: .9rem; }
  .tl__step, .tl__step:nth-child(even) { column-gap: 14px; }
  .tw--track { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee__track { animation: none; }
}

/* ---------- legal & 404 ---------- */
.legal { max-width: 760px; padding-top: 64px; padding-bottom: 96px; }
.legal .h2 { max-width: none; }
.legal__meta { color: var(--muted); font-weight: 600; margin: 12px 0 32px; }
.legal h2 { font-size: 1.5rem; margin: 40px 0 10px; }
.legal p, .legal li { color: #3E443A; }
.legal ul { padding-left: 20px; display: grid; gap: 8px; }
.legal a { color: var(--leaf); font-weight: 700; }
.notfound { min-height: 70vh; display: grid; justify-items: center; align-content: center; text-align: center; gap: 12px; padding-top: 48px; padding-bottom: 96px; }
.notfound img { width: 180px; animation: bob-soft 4s ease-in-out infinite; }
.notfound .lede { margin: 0 0 16px; }

/* Turnstile: invisible unless Cloudflare needs an interaction */
.ts { height: 0; overflow: hidden; }
.ts.is-needed { height: auto; margin-top: 12px; overflow: visible; }
.join--center .ts.is-needed { display: flex; justify-content: center; }

/* demo: the day's progress after a one-line log */
.y-progress { display: grid; gap: 14px; padding: 16px; border-radius: 24px; background: rgba(255,255,255,.85); box-shadow: inset 0 0 0 .5px rgba(230,230,224,.9), 0 2px 10px rgba(29,33,28,.05); }
.y-progress__head { display: flex; align-items: center; justify-content: space-between; }
.y-progress__head b { font-size: 20px; font-weight: 600; }
.y-progress__head span { padding: 3px 10px; border-radius: 999px; background: rgba(111,156,14,.12); color: var(--y-primary); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.y-progress__body { display: flex; align-items: center; gap: 16px; }
.y-ring { position: relative; flex: none; width: 112px; height: 112px; }
.y-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.y-ring circle { fill: none; stroke: var(--y-muted); stroke-width: 11; stroke-linecap: round; }
.y-ring .y-ring__fg { stroke: var(--y-primary); stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.1s cubic-bezier(.2, .8, .2, 1); }
.y-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.y-ring strong { font-size: 24px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.y-ring small { font-size: 11px; font-weight: 600; color: var(--y-sub); margin-top: 3px; }
.y-progress__macros { flex: 1; min-width: 0; display: grid; gap: 10px; }
.y-mac { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; row-gap: 4px; font-size: 13px; font-weight: 600; }
.y-mac > span { grid-column: 1; }
.y-mac em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.y-mac small { color: var(--y-sub); font-size: 11px; }
.y-mac i { grid-column: 1 / -1; grid-row: 2; height: 7px; border-radius: 4px; background: var(--y-muted); overflow: hidden; }
.y-mac i b { display: block; height: 100%; border-radius: inherit; transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.y-mac--protein span, .y-mac--protein em { color: var(--protein); } .y-mac--protein b { background: var(--protein); }
.y-mac--carbs span, .y-mac--carbs em { color: var(--carbs); } .y-mac--carbs b { background: var(--carbs); }
.y-mac--fat span, .y-mac--fat em { color: var(--fat); } .y-mac--fat b { background: var(--fat); }
.y-progress__foot { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--y-border); font-size: 13px; font-weight: 600; color: var(--y-success); }
.y-progress__foot .ic { width: 16px; height: 16px; }
.y-progress__foot span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
