/* ==========================================================================
   ByteFit landing — "Fresh Lab" design system (ground-up, 2026-06).
   Scope: index.html (RU) + en/index.html (EN) ONLY. Legal/support pages keep
   styles.css. Self-hosted Manrope (UI + display) + Space Grotesk (numerals,
   eyebrows — the "data voice"). All motion honors prefers-reduced-motion.
   JS contract preserved: .reveal/.in (+ --d), .site-header.scrolled,
   .faq-item/.faq-a/.open, .btn/.ripple, .is-hidden-by-flag, .cookie-bar.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  /* surfaces */
  --bg: #f7f9f3;
  --bg-tint: #eef4ea;
  --surface: #ffffff;
  --surface-2: #f3f6ef;

  /* ink */
  --ink: #0b1a11;
  --ink-2: #33453a;
  --muted: #55645c;
  --line: rgba(11, 26, 17, 0.09);
  --line-2: rgba(11, 26, 17, 0.06);

  /* brand green ramp */
  --brand: #15a85a;          /* vivid grass */
  --brand-strong: #0c7d41;   /* AA-safe (>=4.5:1) on white for text/icons */
  --brand-deep: #0a4a27;     /* forest */
  --brand-ink: #052a17;      /* deepest, for dark sections */
  --lime: #8fe06a;           /* fresh highlight */
  --lime-soft: #d8f3cb;
  --accent-soft: #e4f4e8;    /* soft green tint surface */
  --accent-ring: rgba(21, 168, 90, 0.16);

  /* macro accents — echo the real app (protein/fat/carbs) */
  --m-protein: #6c5ce7;
  --m-fat: #ec4899;
  --m-carb: #f59e0b;

  /* radii */
  --r-xs: 10px;
  --r-sm: 14px;
  --r: 20px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 999px;

  /* shadow */
  --shadow-xs: 0 1px 2px rgba(11, 26, 17, 0.05);
  --shadow-sm: 0 4px 16px -6px rgba(11, 26, 17, 0.12);
  --shadow: 0 18px 44px -22px rgba(11, 26, 17, 0.30);
  --shadow-lg: 0 40px 90px -40px rgba(11, 26, 17, 0.45);
  --shadow-float: 0 30px 70px -30px rgba(10, 74, 39, 0.40);
  --shadow-brand: 0 14px 30px -12px rgba(15, 138, 72, 0.50);

  /* type */
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Space Grotesk", "Manrope", ui-monospace, monospace;

  --fs-hero: clamp(2.3rem, 1.3rem + 3.2vw, 4.55rem);
  --fs-h2: clamp(1.95rem, 1.2rem + 2.6vw, 3.4rem);
  --fs-h3: clamp(1.18rem, 1.02rem + 0.5vw, 1.45rem);
  --fs-lede: clamp(1.06rem, 0.98rem + 0.45vw, 1.32rem);
  --fs-eyebrow: 0.78rem;

  /* spacing */
  --gut: clamp(1.1rem, 0.6rem + 2vw, 2rem);
  --space-section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --maxw: 1180px;
  --maxw-wide: 1280px;
  --maxw-narrow: 760px;

  /* motion */
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 620ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Keep keyboard-focused elements clear of the fixed cookie card (2.4.11). */
html:has(.cookie-bar) { scroll-padding-bottom: 7rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* `clip` (not `hidden`) prevents a horizontal scrollbar WITHOUT making <body>
     a scroll container. */
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--brand-deep); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.container-wide { width: 100%; max-width: var(--maxw-wide); margin-inline: auto; padding-inline: var(--gut); }
.container-narrow { width: 100%; max-width: var(--maxw-narrow); margin-inline: auto; padding-inline: var(--gut); }
main > section { padding-block: var(--space-section); position: relative; }
.is-hidden-by-flag { display: none !important; }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-deep);
  padding: 0.45em 0.85em;
  background: var(--accent-soft);
  border: 1px solid rgba(15, 138, 72, 0.16);
  border-radius: var(--r-pill);
}
.eyebrow svg { width: 1em; height: 1em; }
.hl { color: var(--brand-strong); }
.lede { font-size: var(--fs-lede); color: var(--ink-2); line-height: 1.55; max-width: 34ch; }
.num { font-family: var(--font-mono); font-feature-settings: "tnum" 1; letter-spacing: -0.01em; }

.section-head { max-width: 56ch; margin-inline: auto; text-align: center; display: grid; gap: 1rem; margin-bottom: clamp(2.2rem, 1.5rem + 2vw, 3.6rem); justify-items: center; }
.section-head.start { margin-inline: 0; text-align: left; justify-items: start; }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { color: var(--muted); font-size: var(--fs-lede); max-width: 48ch; }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  padding: 0.85em 1.4em;
  border-radius: var(--r-pill);
  font-weight: 700; font-size: 1rem; line-height: 1;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-lg { padding: 1.05em 1.7em; font-size: 1.06rem; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary { background: var(--brand-strong); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-2px); box-shadow: 0 20px 38px -14px rgba(15, 138, 72, 0.6); }

.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: rgba(11, 26, 17, 0.2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn-on-dark { background: var(--lime); color: var(--brand-ink); }
.btn-on-dark:hover { background: #a3e87f; transform: translateY(-2px); }
.btn-ghost-dark { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.btn-ghost-dark:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.btn-row-secondary { margin-top: 0.5rem; }

/* ripple */
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, 0.4); pointer-events: none; animation: ripple 0.6s var(--ease-out-expo); }
.btn-secondary .ripple { background: rgba(11, 26, 17, 0.1); }
@keyframes ripple { to { transform: scale(2.4); opacity: 0; } }

/* ---------- topbar ---------- */
.topbar {
  background: var(--brand-deep);
  color: #eafff1; font-size: 0.85rem; font-weight: 500;
}
.topbar .container { display: flex; align-items: center; justify-content: center; gap: 0.6em; padding-block: 0.5rem; text-align: center; }
.topbar strong { font-weight: 700; color: #fff; }
.topbar .spark { display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; }
.topbar .spark svg { width: 1.1em; height: 1.1em; color: var(--lime); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); border-bottom: 1px solid transparent; }
/* Solid (not backdrop-blur) so the sticky header doesn't repaint a blurred
   region every scroll frame — keeps native scrolling smooth. */
.site-header.scrolled { background: rgba(248, 250, 244, 0.97); border-bottom-color: var(--line-2); box-shadow: 0 8px 30px -24px rgba(11, 26, 17, 0.5); }
.site-header .nav { display: flex; align-items: center; gap: 1.5rem; padding-block: 0.68rem; }

.brand { display: inline-flex; align-items: center; gap: 0.55em; font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; }
.brand .mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(15, 138, 72, 0.14); }
.brand .mark img { width: 24px; height: 24px; }
.brand .accent { color: var(--brand-strong); }

.nav-menu { display: flex; gap: 1.4rem; margin-inline: auto; }
.nav-menu a { font-size: 0.96rem; font-weight: 600; color: var(--ink-2); position: relative; padding-block: 0.3em; }
.nav-menu a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; border-radius: 2px; background: var(--brand-strong); transition: width var(--dur) var(--ease); }
.nav-menu a:hover { color: var(--ink); }
.nav-menu a:hover::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 0.9rem; }
.lang-switch { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0.62em 0.85em; transition: border-color var(--dur), color var(--dur); }
.lang-switch:hover { color: var(--ink); border-color: rgba(11, 26, 17, 0.22); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(1.1rem, 0.5rem + 1.6vw, 2.4rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.04fr 0.96fr; gap: clamp(1.5rem, 0.5rem + 3.5vw, 4rem); align-items: center; }
.hero-copy { display: grid; gap: clamp(0.85rem, 0.5rem + 0.8vw, 1.35rem); justify-items: start; }
.hero h1 { font-size: var(--fs-hero); }
.hero .lede { max-width: 40ch; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; color: var(--muted); font-size: 0.9rem; font-weight: 600; margin-top: 0.3rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 0.5em; }
.hero-trust svg { width: 1.1em; height: 1.1em; color: var(--brand-strong); }
.free-flag { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 700; color: var(--brand-deep); font-size: 0.95rem; }
.free-flag svg { width: 1.1em; height: 1.1em; }

/* hero media stage: food visual + floating phone + cards */
.hero-media { position: relative; aspect-ratio: 4 / 4.2; }
/* On laptops/desktops the whole hero (nav + copy + visual) fits above the fold. */
@media (min-width: 981px) {
  .hero { min-height: calc(100svh - 112px); display: grid; align-items: center; }
  .hero-media { height: min(60svh, 600px); width: auto; max-width: 100%; justify-self: end; }
}
/* z-index 0 (not auto) keeps the b-roll explicitly below the phone (3) and the
   float cards (4) in this stacking context, whatever the source order becomes.
   On Android the <video> is swapped for `.hero-poster` in site.js — Android
   composites a playing video above the page and would swallow the screenshot. */
.hero-stage { position: absolute; inset: 0; z-index: 0; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface-2); }
.hero-stage img, .hero-stage video { width: 100%; height: 100%; object-fit: cover; }
.hero-stage .hero-poster { position: absolute; inset: 0; }
.hero-glow { position: absolute; inset: -12% -12% auto auto; width: 60%; aspect-ratio: 1; background: radial-gradient(circle, var(--lime) 0%, transparent 68%); opacity: 0.55; filter: blur(8px); z-index: -1; }

.hero-phone { position: absolute; right: -4%; bottom: -6%; width: 38%; max-width: 220px; z-index: 3; filter: drop-shadow(0 30px 50px rgba(10, 74, 39, 0.35)); }
.float-card {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 0.6rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 138, 72, 0.16); border-radius: var(--r); padding: 0.7rem 0.95rem;
  box-shadow: var(--shadow), 0 0 0 5px rgba(143, 224, 106, 0.14); font-size: 0.85rem;
}
.float-card .ic { display: inline-grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: 12px; background: var(--brand-strong); color: #fff; flex: none; }
.float-card .ic svg { width: 1.2em; height: 1.2em; }
.float-card b { display: block; font-weight: 700; color: var(--ink); }
.float-card small { color: var(--muted); font-size: 0.92em; }
.float-card .num { color: var(--brand-strong); font-weight: 700; }
.fc-top { top: 7%; left: -5%; }
.fc-bottom { bottom: 16%; left: -8%; }

/* ---------- availability marquee ---------- */
.availability { border-block: 1px solid var(--line-2); background: var(--surface); padding-block: 1.1rem !important; }
.availability .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.8rem 1.6rem; }
.avail-item { display: inline-flex; align-items: center; gap: 0.55em; color: var(--ink-2); font-weight: 600; font-size: 0.95rem; }
.avail-item svg { width: 1.2em; height: 1.2em; color: var(--brand-strong); }
.avail-sep { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }

/* ---------- stat band (problem/solution) ---------- */
.solution { background: var(--surface); border-block: 1px solid var(--line-2); }
.solution-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.solution-copy { display: grid; gap: 1.2rem; }
.solution-copy h2 { font-size: var(--fs-h2); }
.solution-copy p { color: var(--ink-2); font-size: var(--fs-lede); max-width: 46ch; }
.pain-list { display: grid; gap: 0.7rem; margin-top: 0.4rem; }
.pain-list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ink-2); list-style: none; }
.pain-list .x { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: #fde8e8; color: #d4504a; flex: none; font-weight: 700; margin-top: 0.1em; }
.pain-list .x svg { width: 0.9em; height: 0.9em; }

.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat-card { background: var(--bg-tint); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 1.5rem 1.4rem; display: grid; gap: 0.35rem; }
.stat-card.feature-span { grid-column: 1 / -1; }
.stat-card .stat-num { font-family: var(--font-mono); font-size: clamp(2.2rem, 1.5rem + 2.2vw, 3.2rem); font-weight: 700; color: var(--brand-strong); line-height: 1; letter-spacing: -0.02em; }
.stat-card .stat-num small { font-size: 0.42em; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.stat-card .stat-label { color: var(--ink-2); font-weight: 600; font-size: 0.96rem; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 0.6rem + 1.6vw, 2.2rem); }
.step { display: grid; gap: 1.3rem; }
.step .figure { display: grid; place-items: center; }
.step .body { display: grid; gap: 0.55rem; position: relative; padding-left: 3.4rem; }
.step-num { position: absolute; left: 0; top: 0; display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--brand-strong); color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; box-shadow: var(--shadow-brand); }
.step h3 { font-size: var(--fs-h3); }
.step .body p { color: var(--muted); }

/* ---------- phone mockup (real screenshots) ---------- */
/* Fixed-padding bezel so the inner box keeps the screenshot's exact aspect
   (1206/2622) — `object-fit: cover` then shows the FULL screen with no
   horizontal crop. Owner phone captures must KEEP that aspect: the iOS status
   bar is replaced with app-background padding (not cropped away), otherwise
   cover trims the sides and clips header text. No notch overlay. */
.phone {
  position: relative; display: block; width: 100%; max-width: 268px; margin-inline: auto;
  background: linear-gradient(155deg, rgba(21, 168, 90, 0.22), rgba(10, 74, 39, 0.10));
  border: 1px solid rgba(15, 138, 72, 0.24); border-radius: 30px; padding: 7px;
  box-shadow: var(--shadow-float);
}
.phone img {
  display: block; width: 100%; height: auto; aspect-ratio: 1206 / 2622;
  object-fit: cover; object-position: top center;
  border-radius: 24px; background: #fff;
}
.phone.tilt { transform: rotate(-3deg); }
.phone.tilt-r { transform: rotate(3deg); }
/* Green halo so the device pops on dark sections (highlight graphic). */
.refine .phone, .showcase .phone { box-shadow: var(--shadow-float), 0 0 64px -8px rgba(143, 224, 106, 0.30); }

/* ---------- features bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(0.9rem, 0.4rem + 1.2vw, 1.4rem); }
.cell { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-xs); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); display: flex; flex-direction: column; }
.cell:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cell .pad { padding: clamp(1.3rem, 1rem + 1vw, 1.9rem); display: grid; gap: 0.6rem; align-content: start; }
.cell .ic { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 14px; background: var(--accent-soft); color: var(--brand-strong); margin-bottom: 0.2rem; }
.cell .ic svg { width: 1.35rem; height: 1.35rem; }
.cell h3 { font-size: var(--fs-h3); }
.cell p { color: var(--muted); font-size: 0.98rem; }
.cell-figure { padding: clamp(1.4rem, 1rem + 1vw, 2rem) clamp(1.4rem, 1rem + 1vw, 2rem) 0; display: grid; place-items: center; background: linear-gradient(180deg, var(--accent-soft), transparent); }
.cell-figure .phone { max-width: 210px; margin-bottom: -8%; }

.cell-feature { grid-column: span 4; }
.cell-text { grid-column: span 4; }
.cell-soft { background: var(--accent-soft); border-color: rgba(15, 138, 72, 0.14); }
.cell-deep { background: linear-gradient(160deg, var(--brand-deep), var(--brand-ink)); color: #eafff1; border-color: transparent; }
.cell-deep h3 { color: #fff; }
.cell-deep p { color: rgba(234, 255, 241, 0.8); }
.cell-deep .ic { background: rgba(255, 255, 255, 0.12); color: var(--lime); }
.cell-wide { grid-column: span 8; }

/* ---------- split (coach / webapp) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-copy { display: grid; gap: 1.1rem; justify-items: start; }
.split-copy h2 { font-size: var(--fs-h2); }
.split-copy > p { color: var(--ink-2); font-size: var(--fs-lede); }
.split-media { display: grid; place-items: center; }

.feature-list { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0.4rem 0 0; }
.feature-list li { display: flex; gap: 0.85rem; align-items: flex-start; }
.feature-list .check { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--accent-soft); color: var(--brand-strong); flex: none; margin-top: 0.1em; }
.feature-list .check svg { width: 1rem; height: 1rem; }
.feature-list strong { display: block; color: var(--ink); font-weight: 700; }
.feature-list span span { color: var(--muted); font-size: 0.96rem; }

/* ---------- webapp showcase (dark) ---------- */
.showcase { background: linear-gradient(165deg, var(--brand-deep) 0%, var(--brand-ink) 100%); color: #eafff1; overflow: hidden; }
.showcase .eyebrow { background: rgba(255, 255, 255, 0.1); color: var(--lime); border-color: rgba(255, 255, 255, 0.18); }
.showcase h2 { color: #fff; }
.showcase .split-copy > p { color: rgba(234, 255, 241, 0.82); }
.showcase .feature-list strong { color: #fff; }
.showcase .feature-list span span { color: rgba(234, 255, 241, 0.72); }
.showcase .feature-list .check { background: rgba(255, 255, 255, 0.12); color: var(--lime); }

/* ---------- faq ---------- */
.faq-list { display: grid; gap: 0.8rem; max-width: 800px; margin-inline: auto; }
.faq-item { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; transition: border-color var(--dur), box-shadow var(--dur); }
.faq-item.open { border-color: rgba(15, 138, 72, 0.3); box-shadow: var(--shadow-sm); }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.3rem; font-weight: 700; font-size: 1.05rem; text-align: left; background: none; border: none; }
.faq-q .pm { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent-soft); color: var(--brand-strong); flex: none; transition: transform var(--dur) var(--ease), background var(--dur); }
.faq-q .pm svg { width: 1.1rem; height: 1.1rem; }
.faq-item.open .faq-q .pm { transform: rotate(45deg); background: var(--brand-strong); color: #fff; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--dur-slow) var(--ease); }
.faq-a-inner { padding: 0 1.3rem 1.25rem; color: var(--muted); }

/* ---------- final CTA ---------- */
.cta-final { background: var(--bg); }
.cta-card { position: relative; overflow: hidden; background: linear-gradient(155deg, var(--brand-deep), var(--brand-ink)); color: #eafff1; border-radius: var(--r-xl); padding: clamp(2.5rem, 1.5rem + 4vw, 5rem); text-align: center; display: grid; gap: 1.3rem; justify-items: center; box-shadow: var(--shadow-lg); }
.cta-card::before { content: ""; position: absolute; inset: auto -10% -40% -10%; height: 70%; background: radial-gradient(60% 100% at 50% 100%, rgba(143, 224, 106, 0.4), transparent 70%); pointer-events: none; }
.cta-card h2 { color: #fff; font-size: var(--fs-h2); max-width: 18ch; }
.cta-card p { color: rgba(234, 255, 241, 0.85); font-size: var(--fs-lede); max-width: 44ch; position: relative; }
.cta-card .btn-row { position: relative; justify-content: center; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line-2); padding-block: clamp(3rem, 2rem + 3vw, 5rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
.footer-about { display: grid; gap: 1rem; max-width: 34ch; }
.footer-about p { color: var(--muted); font-size: 0.96rem; }
.site-footer h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-family: var(--font-mono); font-weight: 600; margin-bottom: 0.9rem; }
.footer-links { display: grid; gap: 0.6rem; }
.footer-links a, .footer-soon { color: var(--ink-2); font-size: 0.96rem; font-weight: 500; transition: color var(--dur); }
.footer-links a:hover { color: var(--brand-strong); }
.footer-soon { color: var(--muted); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 0.88rem; }

/* ---------- cookie bar (injected by site.js) ----------
   Deliberately SMALL: corner card, compact buttons, no focus steal — the old
   centered 680px bar swallowed misclicks meant for page CTAs. */
.cookie-bar { position: fixed; left: 1rem; bottom: 1rem; z-index: 90; width: min(320px, calc(100% - 2rem)); display: grid; gap: 0.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); padding: 0.85rem 1rem; animation: cookie-in 0.45s var(--ease) both; }
.cookie-bar p { font-size: 0.82rem; line-height: 1.45; color: var(--ink-2); }
.cookie-bar a { color: var(--brand-strong); text-decoration: underline; font-weight: 600; }
.cookie-actions { display: flex; gap: 0.5rem; }
.cookie-btn { padding: 0.5em 1.05em; border-radius: var(--r-pill); font-size: 0.82rem; font-weight: 700; line-height: 1; border: 1px solid transparent; background: none; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.cookie-btn.primary { background: var(--brand-strong); color: #fff; }
.cookie-btn.primary:hover { background: var(--brand-deep); }
.cookie-btn.ghost { color: var(--muted); border-color: var(--line); }
.cookie-btn.ghost:hover { color: var(--ink); border-color: rgba(11, 26, 17, 0.25); }
@keyframes cookie-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cookie-bar { animation: none; } }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .btn:hover, .cell:hover { transform: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 460px; margin-inline: auto; width: 100%; }
  .solution-grid { grid-template-columns: 1fr; }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .cell-feature, .cell-text, .cell-wide { grid-column: span 6; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-menu { display: none; }
  .nav-cta-bot { display: none; }
  .steps { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cell-feature, .cell-text, .cell-wide { grid-column: 1 / -1; }
  .bento { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .btn-row .btn { flex: 1 1 auto; }
  /* Never let a long label push the layout past the viewport edge. */
  .btn { white-space: normal; line-height: 1.2; }
  /* Keep the hero float cards fully inside the screen. */
  .fc-top { left: 2%; }
  .fc-bottom { left: 2%; }
}

/* ==========================================================================
   DISH SLIDESHOW — "ByteFit reads your plate" (showcase.js)
   Auto-advancing, user-controllable slideshow with a per-ingredient kcal
   breakdown panel. NO scroll pinning/hijack. Baseline (no JS): the first
   dish + its panel render fully static; controls simply do nothing.
   ========================================================================== */
.dishshow { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-tint) 100%); }
.dish-stage { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: clamp(1.5rem, 0.5rem + 4vw, 4rem); align-items: center; }

.dish-photos { position: relative; display: grid; width: 100%; max-width: 500px; margin-inline: auto; perspective: 1400px; }
/* visibility keeps inactive slides OUT of the accessibility tree */
.dish-photo { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transform: rotateY(65deg) scale(0.96); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease), visibility 0s linear var(--dur-slow); pointer-events: none; }
.dish-photo.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.dish-photo img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }
.dish-photos .scan { position: absolute; left: 2%; right: 2%; top: 0; height: 26%; border-radius: var(--r-xl); background: linear-gradient(180deg, transparent, rgba(143, 224, 106, 0.5), transparent); opacity: 0; pointer-events: none; }
.dish-photos.scanning .scan { animation: scan-sweep 0.9s var(--ease); }
@keyframes scan-sweep { 0% { opacity: 0; transform: translateY(-30%); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(300%); } }

.dish-chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 0.45em; background: rgba(255, 255, 255, 0.97); border: 1px solid rgba(15, 138, 72, 0.16); border-radius: var(--r-pill); padding: 0.5rem 0.85rem; box-shadow: var(--shadow), 0 0 0 5px rgba(143, 224, 106, 0.14); font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.dish-chip .num { font-family: var(--font-mono); color: var(--brand-strong); }
.dish-chip .ic { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 9px; background: var(--brand-strong); color: #fff; }
.dish-chip .ic svg { width: 1em; height: 1em; }
.chip-cal { top: 5%; left: -4%; font-size: 1rem; }
.chip-ok { bottom: 5%; right: -3%; color: var(--brand-strong); }
.chip-ok svg { width: 1.1em; height: 1.1em; }

.dish-panels { display: grid; }
.dish-panel { grid-area: 1 / 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: clamp(1.2rem, 1rem + 1vw, 1.8rem); display: grid; gap: 0.9rem; align-content: start; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease), visibility 0s linear var(--dur-slow); }
.dish-panel.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0.08s, 0.08s, 0s; }
.dish-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.dish-head h3 { font-size: var(--fs-h3); }
.dish-kcal { font-family: var(--font-mono); color: var(--brand-strong); font-weight: 700; white-space: nowrap; }
.dish-kcal b { font-size: 1.55em; }
.macro-row { display: flex; flex-wrap: wrap; gap: 0.45rem 1.1rem; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); }
.macro { display: inline-flex; align-items: center; gap: 0.45em; }
.macro i { width: 0.62em; height: 0.62em; border-radius: 50%; }
.macro b { font-family: var(--font-mono); }
.ing-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.ing-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 0.3rem 0.8rem; font-size: 0.95rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--line-2); position: relative; }
.ing-name { font-weight: 600; }
.ing-qty { color: var(--muted); font-size: 0.88em; }
.ing-kcal { font-weight: 700; color: var(--brand-strong); text-align: right; }
.ing-kcal small { font-size: 0.76em; color: var(--muted); font-weight: 600; }
/* kcal-share underline per ingredient */
.ing-bar { position: absolute; left: 0; bottom: -1px; height: 2px; width: var(--w, 0%); background: linear-gradient(90deg, var(--brand), var(--lime)); border-radius: 2px; }
.dish-tip { display: inline-flex; gap: 0.5em; align-items: center; color: var(--brand-deep); font-weight: 600; font-size: 0.95rem; background: var(--accent-soft); border-radius: var(--r-pill); padding: 0.45em 0.9em; justify-self: start; }
.dish-tip svg { width: 1.1em; height: 1.1em; flex: none; }

.dish-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); }
.dish-arrow { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); box-shadow: var(--shadow-xs); transition: color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease); }
.dish-arrow:hover { color: var(--brand-strong); border-color: rgba(15, 138, 72, 0.35); transform: translateY(-1px); }
.dish-dots { display: flex; gap: 0.1rem; }
/* 24x24 hit target (WCAG 2.5.8) with a 10px visible dot via transparent border */
.dish-dot { width: 24px; height: 24px; border-radius: 50%; border: 7px solid transparent; background: rgba(11, 26, 17, 0.18); background-clip: padding-box; padding: 0; transition: transform var(--dur), background var(--dur); }
.dish-dot:hover { background: var(--brand); background-clip: padding-box; }
.dish-dot.is-active { background: var(--brand-strong); background-clip: padding-box; transform: scale(1.15); }

/* ---------- AI-refine "killer feature" (dark, 3-phone proof) ---------- */
.refine { background: linear-gradient(170deg, var(--brand-ink) 0%, #06160d 100%); color: #eafff1; overflow: hidden; }
.refine .section-head h2 { color: #fff; }
.refine .section-head p { color: rgba(234, 255, 241, 0.78); }
.refine .eyebrow { background: rgba(255, 255, 255, 0.1); color: var(--lime); border-color: rgba(255, 255, 255, 0.18); }
.refine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 0.4rem + 1.6vw, 2.2rem); align-items: start; margin-top: clamp(1.5rem, 1rem + 2vw, 2.6rem); }
.refine-step { display: grid; gap: 1.1rem; justify-items: center; text-align: center; }
.refine-step .phone { max-width: 230px; }
.refine-badge { display: inline-flex; align-items: center; gap: 0.5em; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lime); }
.refine-badge .n { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; }
.refine-step h3 { color: #fff; font-size: var(--fs-h3); }
.refine-step p { color: rgba(234, 255, 241, 0.74); font-size: 0.96rem; max-width: 32ch; }
.refine-cta { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); display: flex; justify-content: center; }

@media (max-width: 900px) {
  .dish-stage { grid-template-columns: 1fr; gap: 1.8rem; }
  .dish-photos { max-width: 420px; }
  .dish-chip { font-size: 0.82rem; }
  .chip-cal { left: 3%; top: 3%; font-size: 0.92rem; }
  .chip-ok { right: 3%; bottom: 3%; }
  .refine-grid { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; gap: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dish-photo, .dish-panel { transition: none; }
  .dish-photos.scanning .scan { animation: none; }
}

/* ==========================================================================
   SPORT & PROGRESS — light section with an illustrative progress board
   (inline SVG weight chart + water/steps meters + workout card).
   ========================================================================== */
.sport { background: var(--surface); border-block: 1px solid var(--line-2); }
/* real workout screenshot + sample-data chart cards side by side */
.sport-duo { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 0.5rem + 1.5vw, 1.6rem); width: 100%; }
.sport-duo .phone { flex: none; max-width: 235px; margin-inline: 0; }
.progress-board { display: grid; grid-template-columns: 1fr; gap: 1rem; width: 100%; max-width: 255px; }
.pb-card { background: var(--bg-tint); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; display: grid; gap: 0.7rem; align-content: start; }
.pb-weight { grid-column: 1 / -1; background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.pb-head { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; font-size: 0.92rem; }
.pb-title { display: inline-flex; align-items: center; gap: 0.5em; color: var(--muted); font-weight: 600; }
.pb-title svg { width: 1.15em; height: 1.15em; color: var(--brand-strong); flex: none; }
.pb-delta { font-family: var(--font-mono); color: var(--brand-strong); font-size: 1.05rem; }
.pb-chart { width: 100%; height: auto; }
.pb-area { fill: rgba(21, 168, 90, 0.12); }
.pb-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.pb-dot { fill: var(--surface); stroke: var(--brand-strong); stroke-width: 2; }
.pb-dot-hl { fill: var(--brand-strong); }
.pb-foot { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink-2); font-weight: 600; font-size: 0.95rem; }
.pb-foot b { color: var(--brand-strong); }
.pb-cap { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.pb-head b { font-family: var(--font-mono); }
.pb-bar { height: 8px; border-radius: var(--r-pill); background: rgba(11, 26, 17, 0.08); overflow: hidden; }
.pb-bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--lime)); transition: width 0.9s var(--ease) 0.35s; }
/* meters fill when the board scroll-reveals */
.reveal:not(.in) .pb-bar i { width: 0; }
.pb-note { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 0.8rem; }
@media (max-width: 560px) {
  .sport-duo { flex-direction: column; }
  .progress-board { max-width: 340px; grid-template-columns: 1fr 1fr; }
  .pb-weight { grid-column: 1 / -1; }
}

/* ==========================================================================
   MINI-GAME — "guess the calories" (showcase.js)
   ========================================================================== */
.game { background: linear-gradient(180deg, var(--bg-tint), var(--bg)); }
.game-card { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(1.4rem, 1rem + 2vw, 2.8rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: clamp(1.2rem, 1rem + 1.5vw, 2rem); max-width: 980px; margin-inline: auto; align-items: center; }
.game-photo { position: relative; }
.game-photo img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.game-chip { position: absolute; top: 4%; left: 4%; background: rgba(255, 255, 255, 0.95); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 0.4em 0.85em; font-weight: 700; font-size: 0.9rem; }
.game-side { display: grid; gap: 0.85rem; align-content: center; justify-items: start; }
.game-side h3 { font-size: var(--fs-h3); }
.game-q { font-weight: 600; color: var(--ink-2); }
.game-guess { display: flex; align-items: baseline; gap: 0.5rem; font-family: var(--font-mono); color: var(--brand-strong); font-weight: 700; }
.game-guess output { font-size: clamp(2.2rem, 1.6rem + 1.6vw, 3rem); line-height: 1; }
.game-unit { color: var(--muted); font-weight: 600; }
.game-slider { width: 100%; max-width: 420px; accent-color: var(--brand-strong); height: 34px; cursor: pointer; }
.game-hint { color: var(--muted); font-size: 0.85rem; }
.game-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.game-result, .game-final { display: grid; gap: 0.6rem; background: var(--accent-soft); border: 1px solid rgba(15, 138, 72, 0.18); border-radius: var(--r); padding: 0.95rem 1.1rem; width: 100%; }
.game-result[hidden], .game-final[hidden] { display: none; }
.game-answer { font-weight: 600; color: var(--ink-2); display: flex; align-items: baseline; gap: 0.45em; flex-wrap: wrap; }
.game-answer b { font-family: var(--font-mono); font-size: 1.5em; color: var(--brand-strong); }
.game-answer small { color: var(--muted); font-weight: 600; }
.game-verdict { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .game-card { grid-template-columns: 1fr; }
  .game-photo { max-width: 380px; margin-inline: auto; width: 100%; }
}

/* ==========================================================================
   COACH cluster (phone + chat demo card) & DEVICE DUO (browser + phone)
   ========================================================================== */
.coach-cluster { position: relative; display: grid; justify-items: start; width: 100%; max-width: 480px; padding-block: 0.5rem; }
.coach-cluster .phone { max-width: 250px; margin-left: 4%; }
.chat-card { position: absolute; right: 0; bottom: 6%; width: min(320px, 72%); display: grid; gap: 0.55rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 1rem; z-index: 2; }
.bubble { padding: 0.6rem 0.85rem; border-radius: 14px; font-size: 0.88rem; line-height: 1.45; max-width: 90%; }
.bubble.user { background: var(--accent-soft); justify-self: end; border-bottom-right-radius: 4px; color: var(--ink); }
.bubble.ai { background: var(--surface-2); justify-self: start; border-bottom-left-radius: 4px; color: var(--ink-2); }
.bubble.ai b { display: block; color: var(--brand-strong); font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.2em; font-family: var(--font-mono); }

.device-duo { position: relative; width: 100%; display: grid; justify-items: center; padding-bottom: 2.2rem; }
.browser { width: 100%; max-width: 470px; margin: 0; background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg), 0 0 64px -8px rgba(143, 224, 106, 0.3); }
.browser-bar { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.8rem; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.b-dots { display: inline-flex; gap: 5px; }
.b-dots i { width: 9px; height: 9px; border-radius: 50%; }
.b-dots i:nth-child(1) { background: #f26d5f; }
.b-dots i:nth-child(2) { background: #f5bf4f; }
.b-dots i:nth-child(3) { background: #5ec269; }
.browser-url { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); background: var(--bg); border-radius: var(--r-pill); padding: 0.32em 1em; }
/* Real desktop capture of /app (the app centers a mobile-width column). */
.browser-body { background: var(--bg); }
.browser-body img { display: block; width: 100%; height: auto; }
.duo-phone { position: absolute; right: 2%; bottom: 0; width: 34%; max-width: 172px; z-index: 2; }

@media (max-width: 560px) {
  .coach-cluster { justify-items: center; }
  .coach-cluster .phone { margin-left: 0; }
  .chat-card { position: static; width: 100%; margin-top: -1.6rem; }
  .browser-body img { width: 62%; }
}
