/* MacroSnap marketing landing page (web/index.html).
   Other pages (privacy, terms, translations) keep using styles.css. */

@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/caveat-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #FAFCF8;
  --bg-band: #F5F8F3;
  --surface: #FFFFFF;
  --green: #3FA962;            /* brand: icons, rings, bars, decoration */
  --green-strong: #2F9A55;     /* large bold text / button fills (>= 3:1) */
  --green-text: #268048;       /* normal-size green text (>= 4.5:1) */
  --green-deep: #237A42;
  --green-tint: #E8F7EA;
  --green-soft: #DFF4E1;
  --navy: #0E1A2F;
  --text: #1F2937;
  --muted: #6B7280;
  --border: #EAEFE8;
  --carbs: #F5BE3C;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(22, 44, 30, 0.04), 0 6px 22px rgba(22, 44, 30, 0.05);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --max: 1340px;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
picture { display: contents; } /* <img> inside keeps its own positioning/blend styles */
h1, h2, h3, p { margin: 0; }
a { color: var(--green-text); }
:focus-visible { outline: 3px solid var(--green-strong); outline-offset: 3px; border-radius: 6px; }
[id] { scroll-margin-top: 92px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  color: var(--green-deep); font-size: 13px; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase;
}

/* ---------- buttons & store badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 28px; border-radius: 9px;
  font: 700 19px/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, transform .15s ease;
}
.btn-primary { background: var(--green-strong); color: #fff; box-shadow: 0 4px 14px rgba(47, 154, 85, 0.25); }
.btn-primary:hover { background: var(--green-deep); color: #fff; }

.store-badges { display: flex; flex-wrap: wrap; gap: 18px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 198px; height: 64px; padding: 0 20px 0 16px;
  background: #050505; color: #fff; border-radius: 10px; text-decoration: none;
  border: 1px solid #2a2a2a;
  transition: transform .15s ease, box-shadow .15s ease;
}
.store-badge:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }
.store-icon { width: 32px; height: 32px; flex: none; }
.store-text { display: flex; flex-direction: column; line-height: 1.05; white-space: nowrap; }
.store-text small { font-size: 12px; font-weight: 500; letter-spacing: 0.01em; }
.store-badge:nth-child(2) .store-text small { text-transform: uppercase; font-size: 11px; letter-spacing: 0.04em; }
.store-text strong { font-size: 25px; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- handwritten notes ---------- */
.note {
  position: absolute; z-index: 6; pointer-events: none;
  font-family: var(--hand); font-weight: 500; color: #33413A; line-height: 1.12;
  font-size: 23px;
}
.note span { display: block; }
.note .arrow {
  width: 54px; height: 34px; margin-top: 6px;
  fill: none; stroke: #33413A; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- phone frame (screenshots already include status bar + dynamic island) ---------- */
.phone { position: absolute; container-type: inline-size; }
.phone-frame {
  position: relative;
  padding: 3.4cqw;
  border-radius: 16cqw;
  background: linear-gradient(145deg, #5B6066 0%, #1B1D20 22%, #2C3035 60%, #121315 100%);
  box-shadow:
    inset 0 0 0 0.9cqw #0B0C0D,
    inset 0 0 0 1.3cqw rgba(255, 255, 255, 0.14),
    0 30px 60px -12px rgba(24, 46, 32, 0.32),
    0 12px 24px -8px rgba(24, 46, 32, 0.18);
}
.phone-frame img {
  width: 100%; height: auto; aspect-ratio: 1320 / 2868; object-fit: cover; object-position: top center;
  border-radius: 12.6cqw; background: #F4F6F3;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 252, 248, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  color: var(--navy); text-decoration: none; font-weight: 800; font-size: 28px; letter-spacing: -0.03em;
}
.brand svg { width: 44px; height: 36px; }
.brand:hover { color: var(--navy); }
.nav { display: flex; gap: 32px; margin-left: 88px; }
.nav a { color: #4B5563; text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--navy); }
.header-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }

/* language switcher */
.lang { position: relative; }
.lang summary {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px;
  border-radius: 9px; border: 1px solid transparent; cursor: pointer; list-style: none;
  color: #374151; font-size: 15px; font-weight: 600;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { border-color: var(--border); background: var(--surface); color: var(--navy); }
.lang-globe { width: 18px; height: 18px; }
.lang-chevron { width: 14px; height: 14px; transition: transform .15s ease; }
.lang[open] .lang-chevron { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  width: 220px; max-height: min(70vh, 520px); overflow: auto;
  margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 50px rgba(22, 44, 30, 0.14);
}
.lang-menu a {
  display: block; padding: 9px 12px; border-radius: 9px;
  color: var(--text); text-decoration: none; font-size: 15px; line-height: 1.35;
}
.lang-menu a:hover { background: var(--green-tint); color: var(--green-deep); }
.lang-menu a[aria-current="page"] { color: var(--green-deep); font-weight: 600; background: #F2F5F1; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  align-items: center; column-gap: 0;
  padding-top: 8px;
}
.hero-copy { position: relative; z-index: 7; padding: 40px 0 56px; }
.hero h1 {
  margin-top: 16px;
  color: var(--navy); font-size: 60px; line-height: 1.08; font-weight: 800; letter-spacing: -0.035em;
  white-space: nowrap;
}
.hero h1 span { display: block; color: var(--green-strong); }
.hero-lead { margin-top: 18px; max-width: 470px; color: var(--muted); font-size: 19px; line-height: 1.55; }
.hero .store-badges { margin-top: 30px; gap: 20px; }
.watch-link {
  display: inline-flex; align-items: center; gap: 18px; margin-top: 30px;
  color: var(--green-text); font-size: 20px; font-weight: 500; text-decoration: none;
}
.watch-link:hover { color: var(--green-deep); }
.play-circle {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  border: 2.5px solid var(--green); color: var(--green-strong); transition: background-color .15s ease;
}
.play-circle svg { width: 26px; height: 26px; margin-left: 3px; }
.watch-link:hover .play-circle { background: var(--green-tint); }
.hero-perks {
  display: flex; gap: 44px; margin: 46px 0 0 -12px; padding: 0; list-style: none;
}
.hero-perks li {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #4B5563; font-size: 17px; white-space: nowrap;
}
.hero-perks svg { width: 36px; height: 36px; color: var(--green); }

.hero-visual {
  position: relative;
  aspect-ratio: 1.2; margin-right: -48px; margin-left: -40px;
}
.hero-visual > *, .hero-visual > picture > img { position: absolute; }
.deco { pointer-events: none; }
/* Food/leaf art is opaque on white: multiply drops the white onto the light backgrounds.
   Keep these clear of phones and dark elements, and no filters (they would outline the white box). */
.blend { mix-blend-mode: multiply; }
.leaf { height: auto; }

.hv-phone-1 { left: 7%; top: 11%; width: 23.5%; rotate: -8deg; z-index: 2; }
.hv-phone-2 { left: 31%; top: 1.5%; width: 27%; rotate: -4deg; z-index: 3; }
.hv-phone-3 { left: 60.5%; top: 11%; width: 25%; rotate: 6deg; z-index: 2; }
.hv-bowl { left: 16%; top: 62%; width: 44%; height: auto; z-index: 5; filter: drop-shadow(0 18px 24px rgba(30, 50, 35, 0.2)); }
.hv-leaf-a { left: 60%; top: 0; width: 6%; z-index: 1; rotate: -20deg; }
.hv-leaf-b { left: 0; top: 54%; width: 7%; z-index: 4; rotate: 10deg; }
.hv-leaf-c { left: 90.5%; top: 23%; width: 8%; z-index: 1; rotate: 15deg; }
.hv-leaf-d { left: 93%; top: 40%; width: 5%; z-index: 1; rotate: -30deg; }
.hv-badge {
  right: 1%; top: 78%; width: 18.5%; aspect-ratio: 1; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 50%; background: radial-gradient(circle at 40% 35%, #E9F8EA, #D8F1DB);
  color: var(--navy); text-align: center; font-size: clamp(11px, 1.12vw, 16px); font-weight: 600; line-height: 1.25;
}
.hv-badge svg { width: 30%; height: auto; color: var(--green); }
.hv-note-good { left: 88%; top: 4%; rotate: -4deg; font-size: clamp(15px, 1.6vw, 23px); }
.hv-note-good .arrow { margin-left: -10px; width: 44px; }
.hv-note-scan { left: 89%; top: 50%; rotate: -2deg; font-size: clamp(15px, 1.75vw, 25px); }
.hv-note-scan .arrow { margin-left: -12px; width: 44px; }
.hv-note-real { left: 1%; top: 72%; rotate: -12deg; font-size: clamp(15px, 1.6vw, 23px); }
.hv-note-real .arrow { margin-left: 18px; width: 44px; rotate: 18deg; }

@media (prefers-reduced-motion: no-preference) {
  .hv-phone-1, .hv-phone-2, .hv-phone-3 { animation: float 7s ease-in-out infinite; }
  .hv-phone-2 { animation-delay: -2.3s; }
  .hv-phone-3 { animation-delay: -4.6s; }
  @keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
}

/* ---------- generic sections & cards ---------- */
.section { padding: 48px 0 56px; }
.section-head { text-align: center; margin: 0 auto 36px; max-width: 760px; }
.section-head h2 { color: var(--navy); font-size: 36px; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; }
.section-head p { margin-top: 8px; color: var(--muted); font-size: 18px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }

/* features */
.features { background: linear-gradient(#FCFEFB, var(--bg)); padding-top: 36px; }
.feature { padding: 26px 26px 30px; }
.icon-tile {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px;
  background: var(--green-tint); color: var(--green);
}
.icon-tile svg { width: 32px; height: 32px; }
.feature h3 { margin-top: 18px; color: var(--navy); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.feature p { margin-top: 8px; color: var(--muted); font-size: 18px; line-height: 1.45; }

/* how it works */
.how { background: var(--bg-band); padding-top: 36px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.step {
  position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 18px;
  padding: 22px 26px 22px 24px; min-height: 216px;
}
.step-num {
  position: absolute; left: 24px; top: 24px; z-index: 2;
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--green-strong); color: #fff; font-size: 19px; font-weight: 700;
}
.step-visual { display: flex; justify-content: center; align-items: center; min-height: 176px; padding-left: 26px; }
.step-phone { position: relative; width: 84px; }
.step-phone .phone-frame { box-shadow: inset 0 0 0 0.9cqw #0B0C0D, 0 14px 26px -8px rgba(24, 46, 32, 0.3); }
.step-text h3 { color: var(--navy); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.step-text p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.45; }

.mini-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 22px rgba(22, 44, 30, 0.08);
}
.meal-card { width: 132px; padding: 10px 10px 10px; }
.meal-card img { width: 100%; height: 84px; object-fit: contain; }
.meal-card > b { margin-top: 6px; color: var(--navy); font-size: 12px; line-height: 1.2; }
.meal-card > small { color: var(--muted); font-size: 11px; }
.mini-macros { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); text-align: center; }
.mini-macros > span { display: flex; flex-direction: column; font-size: 9px; color: var(--muted); }
.mini-macros b { font-size: 13px; line-height: 1.2; }
.m-protein b { color: var(--green-text); }
.m-carbs b { color: #D2690E; }
.m-fat b { color: #6A4DE8; }

.logged-card { width: 150px; min-height: 170px; align-items: center; justify-content: center; padding: 14px 10px; text-align: center; }
.logged-check { width: 84px; height: 68px; margin-left: 10px; }
.logged-card b { margin-top: 8px; color: var(--navy); font-size: 15px; white-space: nowrap; letter-spacing: -0.01em; }
.logged-card small { margin-top: 2px; color: var(--muted); font-size: 12px; }

/* correct AI results */
.fix { position: relative; overflow: hidden; background: #FBFCF9; }
.fix-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 520px; }
.fix-visual {
  grid-column: 1; grid-row: 1; position: relative; justify-self: end;
  width: 100%; max-width: 760px; height: 520px;
}
.fix-visual > *, .fix-visual > picture > img { position: absolute; }
.fx-banana {
  left: -4%; top: 8%; width: 38%; height: auto; z-index: 1;
  /* the art has hard shadow cut-offs at its right/bottom edges: fade them out */
  -webkit-mask-image: linear-gradient(to right, #000 78%, transparent 97%), linear-gradient(to bottom, #000 80%, transparent 97%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, #000 78%, transparent 97%), linear-gradient(to bottom, #000 80%, transparent 97%);
  mask-composite: intersect;
}
.fx-phone { left: 43%; top: 18px; width: 290px; rotate: -7deg; z-index: 2; }
.fx-note-update { left: 15%; top: 14%; rotate: -10deg; z-index: 4; }
.fx-note-update span { text-align: right; }
.fx-note-update .arrow { margin-left: 44px; }
.fix-copy {
  grid-column: 2; grid-row: 1; align-self: center; position: relative; z-index: 4;
  padding: 44px clamp(24px, 17vw, 260px) 44px 6px; max-width: 760px;
}
.fix-copy h2 { margin-top: 12px; color: var(--navy); font-size: 42px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; }
.fix-lead { margin-top: 16px; color: var(--muted); font-size: 19px; line-height: 1.5; }
.fix-list { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.fix-list li { display: flex; align-items: center; gap: 22px; }
.icon-round {
  display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: var(--green-tint); color: var(--green);
}
.icon-round svg { width: 26px; height: 26px; }
.fix-list h3 { color: var(--navy); font-size: 18px; font-weight: 600; }
.fix-list p { color: var(--muted); font-size: 16px; }
.fx-avocado { position: absolute; right: 0; bottom: 0; width: min(15vw, 230px); height: auto; z-index: 1; }
.fx-note-control { right: 3.2vw; top: 8%; rotate: -10deg; }
.fx-note-control .arrow { margin-left: 4px; width: 46px; }

/* progress */
.progress { padding-top: 40px; padding-bottom: 28px; }
.stats { gap: 28px; }
.stat { padding: 20px 22px 22px; min-height: 170px; }
.stat h3 { color: var(--navy); font-size: 16px; font-weight: 600; }
.stat-cal { display: flex; align-items: center; gap: 22px; margin-top: 14px; }
.ring { width: 92px; height: 92px; flex: none; }
.stat-cal strong { display: block; color: var(--navy); font-size: 36px; line-height: 1.1; letter-spacing: -0.03em; }
.stat-cal span { color: var(--muted); font-size: 20px; }
.stat-weight { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.spark { flex: 1; min-width: 0; height: 88px; }
.stat-weight p { display: flex; flex-direction: column; gap: 4px; flex: none; }
.stat-weight strong { color: var(--navy); font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; white-space: nowrap; }
.delta { display: inline-flex; align-items: center; gap: 4px; color: var(--green-text); font-size: 15px; font-weight: 600; }
.delta svg { width: 18px; height: 18px; }
.stat-weight small { color: var(--muted); font-size: 14px; }
.macro-bars { margin: 14px 0 0; display: grid; gap: 12px; }
.macro-bars > div { display: grid; grid-template-columns: 58px 44px minmax(0, 1fr) 38px; align-items: center; gap: 8px; }
.macro-bars dt { color: var(--text); font-size: 14px; }
.macro-bars dd { margin: 0; }
.mb-val { color: var(--text); font-size: 14px; font-weight: 500; text-align: right; }
.mb-bar { height: 12px; border-radius: 99px; background: #EEF1EE; overflow: hidden; }
.mb-bar i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.mb-carbs i { background: var(--carbs); }
.mb-pct { color: var(--muted); font-size: 13px; text-align: right; }
.stat-insight { display: flex; flex-direction: column; }
.bulb { width: 48px; height: 48px; margin: 6px auto 0; }
.stat-insight p { margin: 10px auto 0; max-width: 250px; color: var(--text); font-size: 16px; text-align: center; line-height: 1.45; }

/* CTA */
.cta { padding: 16px 0 28px; }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) 130px; align-items: center; gap: 16px; }
.cta-band {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px;
  min-height: 124px; padding: 24px 36px 24px 176px; border-radius: 18px;
  background: linear-gradient(90deg, #E3F4E4 0%, #EAF7EA 55%, #E6F5E7 100%);
}
.cta-leaf { position: absolute; left: -36px; bottom: -34px; width: 210px; height: auto; pointer-events: none; }
.cta-copy h2 { color: var(--navy); font-size: 25px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.cta-copy p { margin-top: 4px; color: #4B5563; font-size: 17px; }
.cta-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cta .store-badges { gap: 18px; flex-wrap: nowrap; }
.cta .store-badge { min-width: 184px; height: 58px; }
.cta .store-text strong { font-size: 22px; }
.soon-note { color: #4B5563; font-size: 13px; }
.cta-note { position: relative; rotate: -10deg; font-size: 22px; }
.cta-note .arrow { width: 52px; margin-left: -8px; }

/* footer */
.site-footer { background: #FDFEFD; border-top: 1px solid #F0F3EF; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; padding-top: 12px; padding-bottom: 12px; }
.brand-sm { font-size: 22px; }
.brand-sm svg { width: 36px; height: 30px; }
.footer-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 48px; }
.footer-meta nav { display: flex; gap: 40px; }
.footer-meta a { color: #4B5563; font-size: 14px; text-decoration: none; }
.footer-meta a:hover { color: var(--navy); text-decoration: underline; }
.footer-meta p { color: #4B5563; font-size: 14px; }

/* ================= responsive ================= */
@media (max-width: 1279px) {
  .nav { margin-left: 40px; gap: 24px; }
  .card-grid { gap: 20px; }
  .feature { padding: 22px; }
  .feature h3 { font-size: 20px; }
  .feature p { font-size: 16px; }
  .step { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 26px 20px; }
  .step-visual { justify-content: center; }
  .stat-cal strong { font-size: 30px; }
  .stat-cal span { font-size: 17px; }
  .ring { width: 78px; height: 78px; }
  .cta-band { padding-left: 170px; padding-right: 32px; }
  .cta-leaf { width: 180px; }
  .cta .store-badges { gap: 14px; }
  .cta .store-badge { min-width: 0; height: 56px; }
  .cta .store-text strong { font-size: 21px; }
}

@media (max-width: 1099px) {
  .fix .fx-note-control { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 0; }
  .hero-copy { padding: 36px 0 12px; max-width: 640px; }
  .hero-visual { width: 100%; max-width: 820px; margin: 8px auto 0; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fix-inner { grid-template-columns: 1fr; }
  .fix-copy { grid-column: 1; grid-row: 1; padding: 48px var(--gutter) 8px; max-width: 680px; justify-self: start; }
  .fix-visual { grid-column: 1; grid-row: 2; justify-self: center; max-width: 640px; height: 500px; }
  .hv-note-good, .hv-note-real { font-size: clamp(14px, 2.5vw, 22px); }
  .hv-note-scan { font-size: clamp(14px, 2.7vw, 24px); }
  .hv-badge { font-size: clamp(11px, 1.9vw, 16px); }
  .fx-avocado { width: 170px; bottom: 0; }
  .cta-inner { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; gap: 18px; padding: 28px 32px 28px 170px; }
  .cta-actions { align-items: flex-start; }
  .cta-note { justify-self: end; margin-right: 24px; rotate: -6deg; }
  .cta-note .arrow { display: none; }
}

@media (max-width: 999px) {
  .nav { display: none; }
}

@media (max-width: 899px) {
  .steps { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .step { grid-template-columns: 160px minmax(0, 1fr); justify-items: stretch; text-align: left; min-height: 0; padding: 20px; }
  .step-visual { justify-content: center; min-height: 160px; }
  .step-phone { width: 76px; }
  .logged-card { width: 150px; min-height: 150px; }
  .logged-card b { font-size: 16px; }
  .logged-card small { font-size: 11px; }
  .meal-card { width: 124px; }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }
  [id] { scroll-margin-top: 72px; }
  .header-inner { min-height: 64px; gap: 8px; }
  .brand { font-size: 21px; gap: 7px; }
  .brand svg { width: 32px; height: 26px; }
  .header-actions { gap: 4px; }
  .lang summary { padding: 0 8px; gap: 4px; font-size: 14px; }
  .lang-chevron { display: none; }
  .btn { min-height: 40px; padding: 0 14px; font-size: 15px; font-weight: 700; background: var(--green-text); }

  .hero-copy { padding-top: 26px; }
  .eyebrow { font-size: 12px; letter-spacing: 0.18em; }
  .hero h1 { font-size: clamp(34px, 10vw, 44px); white-space: normal; }
  .hero-lead { font-size: 17px; }
  .hero .store-badges { gap: 12px; }
  .store-badge { min-width: 0; flex: 1 1 150px; height: 56px; padding: 0 12px; gap: 8px; }
  .store-icon { width: 26px; height: 26px; }
  .store-text strong { font-size: 19px; }
  .store-text small { font-size: 10.5px; }
  .watch-link { font-size: 18px; gap: 14px; margin-top: 24px; }
  .play-circle { width: 50px; height: 50px; }
  .hero-perks { gap: 0; justify-content: space-between; margin: 32px 0 0; }
  .hero-perks li { font-size: 15px; flex: 1; }
  .hero-perks svg { width: 30px; height: 30px; }

  .hero-visual { aspect-ratio: 0.92; margin-top: 4px; }
  .hv-phone-1, .hv-note-good, .hv-note-scan, .hv-leaf-a { display: none; }
  .hv-phone-2 { left: 7%; top: 3%; width: 42%; }
  .hv-phone-3 { left: 51%; top: 8%; width: 40%; }
  .hv-bowl { left: -2%; top: 62%; width: 72%; }
  .hv-badge { right: 0; top: 74%; width: 27%; font-size: clamp(10px, 3vw, 14px); }
  .hv-note-real { display: none; }
  .hv-leaf-b { left: -2%; top: 52%; width: 9%; }
  .hv-leaf-c { left: 91%; top: 0; width: 9%; }
  .hv-leaf-d { display: none; }

  .section { padding: 40px 0 44px; }
  .section-head { margin-bottom: 26px; }
  .section-head h2 { font-size: 28px; }
  .section-head p { font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; gap: 14px; }
  .feature { display: grid; grid-template-columns: 52px 1fr; column-gap: 16px; padding: 18px; }
  .feature .icon-tile { grid-row: span 2; width: 52px; height: 52px; }
  .feature h3 { margin-top: 0; font-size: 18px; }
  .feature p { margin-top: 2px; font-size: 15px; }

  .step { grid-template-columns: 124px minmax(0, 1fr); gap: 16px; padding: 18px 16px; }
  .step-num { left: 12px; top: 12px; width: 34px; height: 34px; font-size: 18px; }
  .step-visual { min-height: 150px; padding-left: 14px; }
  .step-phone { width: 68px; }
  .meal-card { width: 116px; padding: 8px; }
  .meal-card img { height: 66px; }
  .logged-card { width: 122px; min-height: 140px; padding: 10px 6px; }
  .logged-check { width: 64px; height: 52px; }
  .logged-card b { font-size: 14px; }
  .logged-card small { font-size: 10px; }
  .step-text h3 { font-size: 16px; }
  .step-text p { font-size: 14px; }

  .fix-copy { padding: 40px var(--gutter) 4px; }
  .fix-copy h2 { font-size: 32px; }
  .fix-lead { font-size: 17px; }
  .fix-list li { gap: 14px; }
  .icon-round { width: 46px; height: 46px; }
  .fix-list h3 { font-size: 17px; }
  .fix-list p { font-size: 15px; }
  .fix-visual { height: 420px; max-width: 420px; }
  .fx-banana { left: -8%; top: 22%; width: 36%; }
  .fx-phone { left: 34%; top: 20px; width: 210px; }
  .fx-note-update { left: 2%; top: 3%; font-size: 20px; }
  .fx-note-update .arrow { display: none; }
  .fx-avocado { width: 120px; right: -10px; }

  .stat { min-height: 0; }
  .stat-cal strong { font-size: 32px; }

  .cta { padding-bottom: 20px; }
  .cta-band { align-items: stretch; padding: 104px 20px 24px; text-align: center; }
  .cta-leaf { left: -22px; top: -26px; bottom: auto; width: 140px; rotate: 20deg; }
  .cta-copy h2 { font-size: 23px; }
  .cta-copy p { font-size: 15px; }
  .cta-actions { align-items: center; }
  .cta .store-badges { width: 100%; flex-wrap: wrap; gap: 10px; }
  .cta .store-badge { min-width: 0; flex: 1 1 140px; height: 54px; padding: 0 10px; gap: 7px; }
  .cta .store-icon { width: 23px; height: 23px; }
  .cta .store-text strong { font-size: 17px; }
  .cta-note { justify-self: center; margin: 4px 0 0; font-size: 21px; text-align: center; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 22px; padding-bottom: 22px; }
  .footer-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-meta nav { gap: 28px; }
}

@media (max-width: 370px) {
  .brand span { font-size: 19px; }
  .lang-globe { display: none; }
  .btn { padding: 0 11px; font-size: 14px; }
  .step { grid-template-columns: 108px minmax(0, 1fr); }
  .step-phone { width: 62px; }
  .meal-card, .logged-card { width: 106px; }
}

/* ================= translated pages (web/<code>/) — language-specific rules only ================= */
.en-note { font-size: 0.85em; opacity: 0.8; } /* "(in English)" after legal links; only on translated pages */

/* Handwritten notes: Caveat only covers Latin-1, so Vietnamese diacritics and CJK/Thai would mix
   fonts glyph by glyph. Use a clean system face there, a bit smaller and with more leading. */
:lang(vi) .note { font-family: var(--font); }
:lang(ja) .note { font-family: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "BIZ UDPGothic", "Yu Gothic", Meiryo, system-ui, sans-serif; }
:lang(ko) .note { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; }
:lang(zh) .note { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
:lang(th) .note { font-family: Thonburi, "Leelawadee UI", "Noto Sans Thai", system-ui, sans-serif; }
:is(:lang(vi), :lang(ja), :lang(ko), :lang(zh), :lang(th)) .note span { font-size: 0.74em; line-height: 1.35; }
:lang(th) .note span { line-height: 1.5; }
/* Note lines are set with <br>; never let a narrow positioning box re-wrap them. */
html:not(:lang(en)) .note span { white-space: nowrap; }

/* Line breaking */
html:lang(ja) { line-break: strict; word-break: auto-phrase; } /* phrase-aware breaks where supported */
html:lang(zh) { line-break: strict; }
html:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
:is(:lang(ja), :lang(ko), :lang(zh), :lang(th)) :is(.section-head h2, .fix-copy h2, .cta-copy h2) { text-wrap: balance; }
:is(:lang(ja), :lang(ko), :lang(zh)) .eyebrow { letter-spacing: 0.1em; }
:lang(th) .eyebrow { letter-spacing: 0.02em; }
:lang(vi) .hero h1 { line-height: 1.16; }
:lang(vi) :is(.section-head h2, .fix-copy h2) { line-height: 1.25; }
:lang(th) .hero h1 { line-height: 1.3; }
:lang(th) :is(.section-head h2, .fix-copy h2, .cta-copy h2) { line-height: 1.4; }

/* Longer labels */
:is(:lang(es), :lang(pt), :lang(de), :lang(id), :lang(th)) .logged-card b { white-space: normal; line-height: 1.2; }
:is(:lang(vi), :lang(es), :lang(fr), :lang(ja)) .macro-bars > div { grid-template-columns: 72px 44px minmax(0, 1fr) 38px; }
:lang(vi) .mini-macros > span { white-space: nowrap; font-size: 8.5px; }
:lang(ja) .mini-macros { grid-template-columns: 1.2fr 1fr 0.8fr; }
:lang(ja) .mini-macros > span { white-space: nowrap; font-size: 7.5px; letter-spacing: -0.03em; }

@media (min-width: 1100px) {
  /* The hero headline is nowrap in a 480px column: scale the longer Latin headlines to fit. */
  :is(:lang(vi), :lang(pt), :lang(it)) .hero h1 { font-size: 50px; }
  :is(:lang(es), :lang(fr)) .hero h1 { font-size: 53px; }
  :is(:lang(de), :lang(id)) .hero h1 { font-size: 58px; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  /* narrow copy column next to the phone: keep longer headings to about three lines */
  :is(:lang(es), :lang(pt), :lang(fr), :lang(de), :lang(it), :lang(id)) .fix-copy h2 { font-size: 34px; }
}
@media (min-width: 1100px) and (max-width: 1339px) {
  /* The hero art bleeds past the container here; anchor the right-hand notes inward so longer text stays on screen. */
  html:not(:lang(en)) :is(.hv-note-good, .hv-note-scan) { left: auto; right: 20px; }
}
@media (min-width: 1000px) and (max-width: 1099px) {
  /* longer nav labels: drop the nav "Download" link, which duplicates the header button */
  :is(:lang(fr), :lang(es), :lang(de)) .nav a[href="#download"] { display: none; }
}
@media (max-width: 640px) {
  :lang(vi) .store-badge:nth-child(2) .store-text small { letter-spacing: 0; }
  :lang(fr) .mini-macros > span { font-size: 8px; }
  :lang(fr) .mini-macros b { font-size: 12px; }
}
