/* BellyBuddy landing — tokens from the app; see design-system-sources.md */
/* Roboto = what the Android app renders; self-hosted, so no gstatic request (IP leak). */
/* One variable file covers 100–900 and every latin accent (de/fr/es/it) + €. */
@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --primary: #5F9D5C; --primary-dark: #487C38; --primary-light: #B1D784;
  --green-dark: #2e633e;
  --symptom: #e6a817; --symptom-tint: #fef3cd;
  --text: #212121; --text-2: #616161; --text-muted: #6b6b6b;
  --wash: #edf5e6; --surface: #fff; --bg-alt: #fafafa;
  --border: #e0e0e0;
  --shadow-md: 0 2px 8px rgba(0,0,0,.08);
  --shadow-glow: 0 4px 12px rgba(95,157,92,.30);
  --ease: cubic-bezier(.22,.75,.22,1);   /* decelerating, no overshoot */
  --dur-fast: .18s;     /* hovers */
  --nav-h: 4.5rem;
  --font-brand: "Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
* { margin: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* keyboard focus: `.nav a` strips underlines and `summary` its marker, so a ring is the only cue */
:where(a, summary):focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 3px; border-radius: 6px; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text); background: var(--surface);
  line-height: 1.6; font-size: 17px;
}
h1 { font-size: clamp(2.2rem, 5.5vw, 3.2rem); line-height: 1.12; margin: 0 0 .6em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); line-height: 1.2; margin: 0 0 .7em; }
h3 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 .4em; }
/* brand lockup + large headings only — body copy and h3 stay on the system stack */
.nav-brand, h1, h2 { font-family: var(--font-brand); }
p { margin: 0 0 1em; }
.lead { font-size: 1.12em; }
strong { font-weight: 650; }
/* The rag is CSS's job, not the copy's — every locale has different word lengths.
   `balance` evens out short blocks so none ends on a stub line; `pretty` keeps
   orphans off the longer prose without reflowing the whole paragraph. */
h1, h2, h3,
.lead, .price,
.four p, .two p,
#log > .wrap > p     { text-wrap: balance; }
#export p            { text-wrap: pretty; }

section { padding: clamp(3rem, 8vw, 5.5rem) 1.25rem; scroll-margin-top: var(--nav-h); }
.wrap { max-width: 1060px; margin: 0 auto; }
.center { text-align: center; }
.wash { background: var(--wash); }
.alt { background: var(--bg-alt); }
/* sub-pages (imprint etc.) */
.page  { padding-top: calc(var(--nav-h) + clamp(2rem, 6vw, 4rem)); }  /* clear fixed nav, mirrors .hero */
.prose { max-width: 40em; }
.prose address { font-style: normal; margin: 0 0 1em; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ol, .prose ul { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin: .35em 0; }
.prose li address { margin: .4em 0; }

/* top bar — glass always on; app.js toggles .is-scrolled (background + shadow only, never height) */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  height: var(--nav-h); padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: rgba(237,245,230,.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(95,157,92,.16);
}
/* scrolled: whiter, sharper — background + shadow only; never blur radius, height, transform or filter */
.nav { transition: background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.nav.is-scrolled { background: rgba(255,255,255,.90); box-shadow: 0 1px 0 rgba(95,157,92,.16), 0 6px 20px rgba(46,99,62,.08); }
/* no `color: inherit` here — `.nav a` (0,1,1) would outrank `.nav-cta` (0,1,0) and blacken the button */
.nav a { text-decoration: none; }
/* flex-shrink: 0 — otherwise the brand is the only nav item that can wrap, so it absorbs
   the whole squeeze and the tagline breaks to two lines (the app keeps it on one) */
.nav-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1rem;
  color: inherit; flex-shrink: 0; }
.nav-brand img { border-radius: 9px; }
/* must target the <b>: its UA default `bolder` maps the inherited 700 (and 600) up to 900,
   which Roboto — variable 100–900 — actually renders. 600 = the app's Header.tsx weight. */
.nav-brand b { font-weight: 600; }
/* two-line lockup, same as the app's Header.tsx: 16/11px, tagline in primary green */
.nav-brand span { display: grid; line-height: 1.15; }
.nav-brand small { font-size: .6875rem; color: var(--primary); font-weight: 500; }
/* auto margins eat the free space, so the CTA + lang pill sit flush right as one cluster */
.nav-links { display: flex; gap: 1.4rem; margin-inline: auto; }
.nav-links a { position: relative; white-space: nowrap;
  font-size: .95rem; color: var(--text-2); padding: .3rem 0;
  border-bottom: 2px solid transparent; }
/* dash between links — absolute so the hover underline stops at the word */
.nav-links a + a::before { content: "–"; position: absolute; left: -.7rem; translate: -50% 0;
  color: var(--text-2); pointer-events: none; }
.nav-links a[aria-current] {  color: var(--text); border-bottom-color: var(--primary); }   /* scrollspy */
.nav-links a:hover { color: var(--text); border-bottom-color: var(--primary); }
.nav-links a { transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
/* same gradient + hover as the hero .badge buttons, so the nav CTA reads as the small sibling */
.nav-cta { display: inline-flex; align-items: center; gap: .55rem; white-space: nowrap;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: .95rem; font-weight: 650;
  padding: .6rem 1.5rem; border-radius: 10px; box-shadow: var(--shadow-md); }
.nav-cta svg { width: 18px; height: 18px; flex: none; }
.nav-cta:hover { filter: brightness(1.05); box-shadow: var(--shadow-glow); }
/* language switcher — native <details>; app.js adds close-on-outside-click / Escape */
.nav-lang { position: relative; }
.nav-lang summary { display: flex; align-items: center; gap: .45rem; cursor: pointer;
  list-style: none; white-space: nowrap; font-size: .95rem; color: var(--text-2);
  padding: .45rem .7rem; border: 1px solid var(--border); border-radius: 10px; }
.nav-lang summary::-webkit-details-marker { display: none; }  /* Safari */
.nav-lang summary::after { content: "▾"; }
.nav-lang summary { transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.nav-lang summary:hover { color: var(--text); border-color: var(--primary); }
.nav-lang ul { position: absolute; right: 0; top: calc(100% + .4rem);
  margin: 0; padding: .3rem; list-style: none; min-width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-md); }
.nav-lang a { display: flex; align-items: center; gap: .45rem; white-space: nowrap;
  font-size: .95rem; color: var(--text-2); padding: .4rem .6rem; border-radius: 7px; }
.nav-lang a:hover { color: var(--text); background: var(--wash); }
.nav-lang a[aria-current] { color: var(--text); font-weight: 650; background: var(--wash); }
.nav-lang img { border-radius: 2px; flex: none; }
/* 1080, measured: with brand and CTA both unwrappable the nav overflows below ~1070px.
   Raise this if the de/fr/es/it nav labels turn out longer than the EN ones. */
@media (max-width: 1080px) { .nav-links { display: none; } }
/* CTA dropped on phones — the hero and footer download buttons cover it */
@media (max-width: 560px) { .nav-cta { display: none; } }

/* hero + contrast circle (from .deprecated/07) */
.hero { position: relative; overflow: hidden; isolation: isolate;
  padding-top: calc(var(--nav-h) + clamp(2rem, 6vw, 4rem)); }
.hero-text { max-width: 34em; }
.sun {
  position: absolute; z-index: -1; border-radius: 50%;
  width: clamp(420px, 52vw, 780px); aspect-ratio: 1;
  background: var(--primary-light); opacity: .55;
  right: max(-14vw, -180px); top: 12%;
}
/* stacked layout puts the phone below the copy — move the circle with it */
@media (max-width: 800px) {
  .sun { top: auto; bottom: 4%; right: auto; left: 50%; translate: -50% 0;
    width: min(110vw, 560px); }
}

/* split layout */
.split { display: flex; align-items: center; gap: clamp(2rem, 5vw, 4.5rem); }
.split > div { flex: 1 1 0; }
@media (max-width: 800px) {
  .split { flex-direction: column; }
  .split .stage { order: 2; }
}

/* phone frame */
figure { margin: 0; flex: none; }
.phone img, .sheet img { display: block; width: 100%; height: auto; }
.phone {
  width: min(300px, 78vw);
  border: 10px solid #1c1c1e; border-radius: 42px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.18); background: #1c1c1e;
}
.phone img { border-radius: 30px; }
.phone.small { width: min(210px, 62vw); border-width: 7px; border-radius: 30px; }
.phone.small img { border-radius: 22px; }

/* hero stage: timeline phone with an entry card floating past each side */
.stage { position: relative; }
.split > .stage { flex: none; }
.float { position: absolute; z-index: 1; width: 78%; height: auto;
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 14px 28px rgba(0,0,0,.16); }
.float.meal    { top: 11%;    left:  -20%; }
.float.symptom { bottom: 28%; right: -20%; }
@media (max-width: 480px) { .float.meal { left: -6%; } .float.symptom { right: -6%; } }

/* logging / symptoms grids */
.four, .two { list-style: none; padding: 0; margin: 2.5rem 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 3vw, 2rem);
  justify-items: center; }
.four p, .two p { color: var(--text-2); font-size: .95rem; margin: 0; }
.four figure, .two figure { margin: 1.1rem auto 0; }
/* captions are 1 or 2 lines depending on the locale — pin the frames to the bottom
   of the (grid-stretched) card so the row of phones stays level either way */
.four li { display: flex; flex-direction: column; height: 100%; }
.four li figure { margin-top: auto; }
/* breakpoints are set by the frames, not by taste: the columns are `1fr` = minmax(auto, 1fr),
   so they refuse to shrink below the fixed .phone width and the grid overflows the viewport.
   4 cols need 4×210 + 3×gap + 40 ≈ 970px; 2 cols need 2×210 + gap + 40 ≈ 480px. */
@media (max-width: 1000px) { .four { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; } }
@media (max-width: 480px) { .four { grid-template-columns: 1fr; } }
.two { grid-template-columns: repeat(2, 1fr); align-items: start;
  column-gap: clamp(2rem, 6vw, 5rem); max-width: 820px; margin-inline: auto; }
.two figure + p { margin-top: 1.8rem; }
.bar { width: min(330px, 84vw); }
/* the confirm shot closing #log — child combinator keeps it off the ul.four items,
   which have their own margins; figure{margin:0} (l.134) would otherwise pin it left */
#log > .wrap > p      { margin: 2.5rem auto 0; max-width: 34em; color: var(--text-2); }
#log > .wrap > figure { margin: 1.5rem auto 0; }
/* timeline: both columns end in a phone — bottom-align so the frames line up under uneven copy */
#timeline .two { align-items: end; }
/* widest .two row is #timeline: two full .phone = 2×300 + gap + 40 ≈ 680px */
@media (max-width: 700px) { .two { grid-template-columns: 1fr; row-gap: 2.5rem; } }

/* pdf sheet */
.sheet { width: min(420px, 88vw); box-shadow: 0 18px 40px rgba(0,0,0,.18);
  border-radius: 8px; overflow: hidden; transform: rotate(1.5deg); }

/* store badges */
.badges { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.6rem 0 .8rem; }
.center .badges { justify-content: center; }
.badge { display: inline-block; line-height: 0; }
.badge img { height: 3rem; }   /* official store badges, keep >= 40px */
/* lift, not fade — an opacity dip reads cheap */
.badge { transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease); }
.badge:hover { transform: translateY(-2px); filter: drop-shadow(0 6px 10px rgba(46,99,62,.28)); }
.price { color: var(--text-2); font-size: .95rem; }

/* chips */
.chips { list-style: none; padding: 0; margin: 1.5rem 0; max-width: 640px;
  display: flex; flex-wrap: wrap; gap: .55rem; }
.chips li { display: inline-flex; align-items: center; gap: .45rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9999px; padding: .42rem .95rem; font-size: .92rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.chips li:hover { transform: translateY(-2px); border-color: var(--primary-light); }
.chips i { width: .72rem; height: .72rem; border-radius: 50%; }

/* dark CTA (from .deprecated/07) */
.dark { background: var(--green-dark); color: #f2f7ee; }
.dark h2 { color: #fff; }
.dark .price { color: #c8dcbf; }
.flags { display: flex; gap: .6rem; margin-top: 1.6rem; }
.flags img { border-radius: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }

/* footer */
.site-footer { background: var(--bg-alt); padding: 2.5rem 1.25rem; text-align: center; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; }
.site-footer a { color: var(--text-2); font-size: .92rem; }
.site-footer a { transition: color var(--dur-fast) var(--ease); }
.site-footer a:hover { color: var(--text); }
.fine { font-size: .8rem; color: var(--text-muted); max-width: 46em; margin: 1.2em auto 0; }

/* motion kill-switch */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* button — .nav-cta's gradient, sized for body copy (launch-notification form submit) */
.btn { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  padding: .75rem 1.6rem; border: 0; border-radius: 10px; box-shadow: var(--shadow-md);
  transition: filter var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.btn:hover { filter: brightness(1.05); box-shadow: var(--shadow-glow); }
.btn:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 3px; }

/* launch signup (launch-notification_*.html) — a plain POST, zero JS. Feedback is the 303's
   fragment (#signup-ok / #signup-error) revealing a .notice via :target. Notices sit
   ABOVE the form so the scroll-to-fragment keeps the form in view on error. */
.signup { margin: 1.6rem 0; }
.signup-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.signup-row input { flex: 1 1 14em; min-width: 0; font: inherit; color: var(--text);
  padding: .7rem .95rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); }
.signup-row input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.consent { display: flex; gap: .55rem; align-items: flex-start; margin-top: .8rem;
  font-size: .92rem; color: var(--text-2); }
.consent input { flex: none; margin: .3em 0 0; accent-color: var(--primary); }
/* honeypot: off-screen, not display:none — naive bots skip display:none fields */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { display: none; margin: 0 0 1rem; padding: .7rem 1rem; border-radius: 10px;
  font-size: .95rem; scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
.notice:target { display: block; }
.notice.ok  { background: var(--wash); color: var(--green-dark); }
.notice.err { background: #fde8e8; color: #8a1c1c; }
