/* ============================================================
   CountBite — Landing Page
   Standalone HTML/CSS rebuild of Pencil design "ubMxY"
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg-dark: #0A1A10;
  --bg-dark-2: #0E2417;
  --bg-deep: #091509;
  --green: #8FCB22;
  --green-soft: #C5E86C;
  --green-mid: #4D9B6A;
  --green-line: #15301C;
  --green-line-2: #1F3D24;
  --green-line-3: #2A4D32;
  --cream: #F2F3EE;
  --cream-2: #FAFAF8;
  --cream-3: #F5F4F1;
  --ink: #1A1918;
  --ink-2: #0E2417;
  --muted: #A8BBA3;
  --muted-2: #5A6B57;
  --muted-3: #6D6C6A;
  --muted-light: #5A5957;
  --line-light: #E5E4E1;
  --line-light-2: #EDECEA;

  --w: 1440px;
  --pad-x: 80px;

  --shadow-card: 0 8px 24px rgba(0,0,0,.06);
  --shadow-deep: 0 30px 60px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
*, *::before, *::after { min-width: 0; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-dark);
  color: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}
/* Bullet-proof: every section clips overflow on its X axis */
section,
.hero, .features, .how, .testimonials, .footer-cta, .footer-bar {
  max-width: 100%;
  overflow-x: hidden;
}

/* Force inner containers to never exceed viewport */
.navbar, .hero-main, .hero-left, .hero-right,
.features-header, .feat-cards, .feat-stats-zone,
.how-header, .how-step, .how-step-grid,
.t-top, .t-cards, .t-stats,
.final-cta, .footer-bar, .f-row {
  max-width: 100%;
}

/* Allow long content to wrap rather than overflow */
h1, h2, h3, h4, p, span, a, em, strong, small {
  overflow-wrap: anywhere;
  word-break: break-word;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
hr { border: none; height: 1px; background: var(--line-light-2); margin: 0; }
em { font-style: italic; }

/* ============================================================
   SECTION / HERO
   ============================================================ */
.hero {
  background:
    radial-gradient(140% 120% at 50% 0%, #1A3A20 0%, var(--bg-dark) 70%);
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.navbar {
  max-width: var(--w);
  margin: 0 auto;
  width: 100%;
  padding: 32px var(--pad-x);
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.logo-badge {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--green);
  color: var(--bg-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.logo-badge.sm { width: 36px; height: 36px; font-size: 18px; }
.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--cream);
}
.logo-img {
  height: 44px;
  width: 44px;
  display: block;
  object-fit: cover;
  border-radius: 22%; /* iOS squircle app-icon look */
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.logo-img.sm { height: 36px; width: 36px; }

/* hero layout */
.hero-main {
  max-width: var(--w);
  margin: 0 auto;
  width: 100%;
  padding: 24px var(--pad-x) 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: flex-start;
  align-self: flex-start;
}

/* Eyebrow pill */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--green-line);
  border: 1px solid var(--green-line-3);
  width: max-content;
}
.eyebrow-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--green);
  display: inline-block;
}
.eyebrow-text {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.8px;
  color: var(--green);
}

/* Headline */
.h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 0;
  color: var(--cream);
}
.h1-line { display: block; }
.h1-accent {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.h1-accent em {
  font-style: italic;
  color: var(--green);
}
.accent-underline {
  height: 5px;
  border-radius: 999px;
  background: var(--green);
  width: 100%;
}

.subhead {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 540px;
  margin: 0;
}
.subhead.dark { color: #3A3938; max-width: 640px; font-size: 18px; }

/* CTAs */
.ctas {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 16px;
  font-family: 'Outfit', sans-serif;
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-light {
  background: var(--cream);
  color: var(--bg-dark);
}
.btn-dark {
  background: var(--green-line);
  color: var(--cream);
  border: 1px solid var(--green-line-3);
}
.btn-labels { display: inline-flex; flex-direction: column; line-height: 1.1; }
.btn-labels small {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: .7;
}
.btn-labels strong { font-size: 18px; font-weight: 600; }
.btn .icon { font-size: 22px; }

/* Store badges (SVG) */
.store-badge {
  display: inline-block;
  line-height: 0;
  transition: transform .15s ease, filter .15s ease;
  outline: none;
}
.store-badge:hover { transform: translateY(-2px); filter: brightness(1.08); }
.store-badge:focus { outline: none; }
.store-badge img {
  height: 68px;
  width: auto;
  display: block;
  border: 0;
}

/* Trust row */
.trust {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.stars { display: inline-flex; gap: 3px; color: var(--green); font-size: 16px; }
.icon-star { color: var(--green); }
.icon-star.green { color: var(--green); }
.trust-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

/* Phone — hero */
.hero-right {
  position: relative;
  align-self: stretch;
  height: auto;
  min-height: 740px;
  width: 520px;
  flex-shrink: 0;
}
.backglow {
  position: absolute;
  width: 400px; height: 400px;
  left: 60px; top: 140px;
  background: radial-gradient(circle, var(--green) 0%, rgba(143,203,34,0) 70%);
  opacity: 0.35;
  filter: blur(20px);
  pointer-events: none;
}

.phone {
  position: absolute;
  left: 90px;
  top: 0;
  bottom: -120px;     /* hangs 120px below hero-right bottom (= below viewport) */
  width: 340px;
  height: auto;
  min-height: 730px;
  background: var(--bg-dark-2);
  border-radius: 52px;
  border: 6px solid #1F3D24;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
}
.phone-notch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  height: 54px;
}
.phone-notch.small { padding: 14px 20px; height: 44px; }
.phone-notch .time {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
}
.notch-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.notch-right::before,
.notch-right::after {
  content: '';
  display: inline-block;
  width: 14px; height: 10px;
  background: rgba(242,243,238,.8);
  border-radius: 2px;
}

.phone-body {
  background: var(--bg-dark-2);
  padding: 40px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.phone-body.small { padding: 24px 18px; gap: 12px; }

.brand-mark {
  width: 120px; height: 120px;
  border-radius: 999px;
  background: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-mark .big { font-size: 56px; color: var(--bg-dark); }

.title-block {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.kicker {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--green);
  margin: 0;
}
.phone-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--cream);
  margin: 0;
  text-align: center;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--green-line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  display: block;
  width: 62%;
  height: 100%;
  background: var(--green);
  border-radius: 999px;
}
.status-row {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  text-align: center;
}
.found-label {
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin: 0;
}

.pills-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(143,203,34,0.12);
  border: 1px solid rgba(143,203,34,0.3);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

/* Floating tags */
.float-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.float-kcal {
  background: var(--green);
  color: var(--bg-dark);
  top: 280px; left: 0;
  transform: rotate(6deg);
  z-index: 2;
}
.float-macro {
  background: var(--cream);
  color: var(--bg-dark);
  top: 480px; left: 340px;
  transform: rotate(-4deg);
  font-size: 15px;
  z-index: 2;
}
.float-macro .dot {
  width: 10px; height: 10px; border-radius: 999px; background: var(--green);
  display: inline-block;
}
.float-voice {
  background: var(--green-line);
  color: var(--cream);
  border: 1px solid var(--green-line-3);
  top: 560px; left: -10px;
  transform: rotate(-3deg);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
  z-index: 2;
}
.float-voice .icon { color: var(--green); }

/* ============================================================
   SECTION / FEATURES
   ============================================================ */
.features {
  position: relative;
  background: var(--cream-3);
  color: var(--ink);
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(140px);
  pointer-events: none;
}
.orb-1 { width: 780px; height: 780px; left: -260px; top: -200px; background: #CDF291; opacity: .35; }
.orb-2 { width: 680px; height: 680px; left: 980px; top: 120px; background: #FFD9B2; opacity: .4; }
.orb-3 { width: 880px; height: 680px; left: 380px; top: 780px; background: #B2CCFF; opacity: .2; filter: blur(160px); }
.orb-4 { width: 520px; height: 520px; left: -200px; top: 680px; background: #A1E5A1; opacity: .22; filter: blur(120px); }
.veil {
  position: absolute;
  inset: 0;
  background: var(--cream-2);
  opacity: .65;
  pointer-events: none;
}

.features-header {
  position: relative;
  max-width: var(--w);
  margin: 0 auto;
  padding: 96px var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.eyebrow.light {
  background: rgba(197,232,108,0.07);
  border-color: rgba(197,232,108,0.25);
}
.eyebrow-dot.light { background: var(--green-soft); }
.eyebrow-text.light { color: var(--green-soft); }

.display {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -2.5px;
  color: var(--ink);
  margin: 0;
  display: flex;
  gap: 18px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.display-italic {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
}
.display-italic em {
  color: var(--green-soft);
  font-style: italic;
  font-weight: 600;
}
.display-underline {
  height: 4px;
  border-radius: 2px;
  background: var(--green-soft);
  width: 100%;
}

.trust-row-light {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.trust-row-light strong { color: var(--ink); font-weight: 600; }
.trust-row-light .muted { color: var(--muted-light); }
.trust-row-light .sep {
  width: 3px; height: 3px; border-radius: 999px; background: #9C9B99;
  display: inline-block;
}

/* Feature cards */
.feat-cards {
  position: relative;
  max-width: var(--w);
  margin: 0 auto;
  padding: 24px var(--pad-x) 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feat-card {
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
}
.feat-stage {
  position: relative;
  height: 520px;
  border-radius: 20px;
  background: radial-gradient(130% 130% at 50% 40%, #1B3A22 0%, var(--bg-dark) 80%);
  overflow: hidden;
}
.stage-glow {
  position: absolute;
  border-radius: 999px;
  width: 260px; height: 260px;
  background: var(--green);
  opacity: 0.18;
  pointer-events: none;
}
.stage-glow-a { top: -40px; right: -40px; }
.stage-glow-b { width: 240px; height: 240px; background: #3D8A5A; opacity: .22; bottom: -40px; left: -40px; }
.stage-glow-a.left { left: -40px; right: auto; }
.stage-glow-b.right { right: -40px; left: auto; }
.stage-glow-a.top { left: 60px; right: auto; }
.stage-glow-b.bottom { left: 140px; }

.mini-phone {
  position: absolute;
  width: 240px;
  height: 480px;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #0A0A0A;
  border-radius: 36px;
  padding: 5px;
  box-shadow: 0 24px 48px rgba(0,0,0,.5);
}
.mini-screen {
  width: 100%;
  height: 100%;
  border-radius: 31px;
  background: #F8FAF5;
  padding: 24px 14px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
.mini-notch {
  width: 60px; height: 4px; border-radius: 99px; background: #1A1918;
  margin: 0 auto 6px;
}
.mini-eye {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--green);
  text-align: center;
  margin: 0;
}
.mic-circle {
  width: 96px; height: 96px;
  border-radius: 999px;
  background: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto 8px;
  color: var(--bg-dark);
  font-size: 36px;
  box-shadow: 0 0 0 12px rgba(143,203,34,0.18);
}
.waveform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 4px auto 8px;
}
.waveform span {
  width: 4px;
  background: var(--green);
  border-radius: 999px;
}
.waveform span:nth-child(1) { height: 12px; }
.waveform span:nth-child(2) { height: 20px; }
.waveform span:nth-child(3) { height: 28px; }
.waveform span:nth-child(4) { height: 16px; }
.waveform span:nth-child(5) { height: 24px; }
.waveform span:nth-child(6) { height: 14px; }
.waveform span:nth-child(7) { height: 22px; }
.waveform span:nth-child(8) { height: 10px; }
.mini-quote {
  font-size: 12px;
  font-style: italic;
  color: var(--muted-light);
  text-align: center;
  margin: 0 6px;
}
.mini-pill {
  margin: 4px auto 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(143,203,34,0.15);
  border: 1px solid rgba(143,203,34,0.4);
  color: var(--green-mid);
  font-size: 11px;
  font-weight: 600;
  width: max-content;
}

/* photo screen — plate + barcode swap stack */
.photo-stack {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 0;
}
.photo-stack .plate,
.photo-stack .barcode {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.plate {
  width: 140px; height: 140px;
  border-radius: 999px;
  background: linear-gradient(135deg, #F2E5C8, #D8C99C);
  position: relative;
  box-shadow: inset 0 0 0 6px #fff, 0 6px 18px rgba(0,0,0,.1);
}
.plate-inner {
  position: absolute;
  inset: 22px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, #8FBF55 0 18%, transparent 19%),
    radial-gradient(circle at 70% 35%, #C97A4C 0 22%, transparent 23%),
    radial-gradient(circle at 50% 70%, #E2C36C 0 26%, transparent 27%),
    #F4EBD2;
}

/* Barcode */
.barcode {
  width: 150px;
  height: 96px;
  background: #FAFAF8;
  border-radius: 10px;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  overflow: hidden;
}
.barcode-bars {
  display: flex;
  align-items: stretch;
  gap: 1px;
  height: 50px;
  width: 100%;
  justify-content: center;
}
.barcode-bars span {
  display: inline-block;
  height: 100%;
  background: #1a1918;
  width: 2px;
  border-radius: 0;
}
.barcode-bars span:nth-child(2n)  { width: 1px; }
.barcode-bars span:nth-child(3n)  { width: 3px; opacity: .9; }
.barcode-bars span:nth-child(5n)  { width: 4px; }
.barcode-bars span:nth-child(7n)  { width: 1px; opacity: .6; }
.barcode-bars span:nth-child(11n) { width: 2px; }
.barcode-num {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  font-weight: 600;
  color: #1a1918;
  margin: 0;
  letter-spacing: 1.5px;
}
.barcode .scanline {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff4040, transparent);
  box-shadow: 0 0 8px #ff4040;
  top: 30%;
  border-radius: 999px;
}

/* Detect lists stack — swap between photo + barcode results */
.detect-stack {
  position: relative;
  min-height: 96px;
  margin-top: 8px;     /* sit just below the plate / barcode */
}
.detect-stack .detect-list {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detect-list:not(.photo-detect):not(.barcode-detect) {
  /* fallback for any other single-list usage */
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.detect-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #E5E4E1;
  font-size: 11px;
  color: var(--ink);
}
.detect-row span:last-child { color: var(--green-mid); font-weight: 600; }

/* text screen */
.text-input-mock {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #E5E4E1;
  font-size: 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 4px;
}
.caret {
  display: inline-block;
  width: 1px; height: 12px;
  background: var(--ink);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.text-results { display: flex; flex-direction: column; gap: 6px; }
.text-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #E5E4E1;
  font-size: 11px;
}
.text-row strong { color: var(--ink); font-weight: 600; }
.text-row span { color: var(--muted-light); }

.feat-labels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feat-labels .micro {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: var(--green);
  margin: 0;
}
.feat-labels h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 0;
}
.feat-labels p {
  font-size: 14px;
  line-height: 1.55;
  color: #3A3938;
  margin: 0;
}

/* Stats card */
.feat-stats-zone {
  position: relative;
  max-width: var(--w);
  margin: 0 auto;
  padding: 60px var(--pad-x) 96px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.proof-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.proof-eyebrow .sep-line {
  width: 24px; height: 1px;
  background: var(--line-light);
  display: inline-block;
}
.proof-text {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.6px;
  color: var(--green);
}
.stats-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: 32px;
  padding: 44px 32px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.stat-num {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  line-height: 1;
}
.stat-num .num {
  font-family: 'Outfit', sans-serif;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -1.5px;
  color: var(--ink);
}
.stat-num .suffix {
  font-family: 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--green);
}
.stat-num .big-star {
  font-size: 36px;
  color: var(--green);
  margin-right: 4px;
}
.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: #3A3938;
  margin: 0;
  text-align: center;
}
.stat-sep {
  width: 1px;
  height: 72px;
  background: var(--line-light);
}

/* ============================================================
   SECTION / HOW IT WORKS
   ============================================================ */
.how {
  background:
    radial-gradient(140% 120% at 50% 35%, var(--green-line) 0%, var(--bg-dark) 75%);
  overflow: hidden;
}
.how-header {
  max-width: var(--w);
  margin: 0 auto;
  padding: 120px var(--pad-x) 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.how-eyebrow-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.eye-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-dark-2);
  border: 1px solid var(--green-line-2);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: var(--green);
}
.eye-sep { width: 24px; height: 1px; background: var(--line-light); opacity: .3; }
.eye-meta {
  font-size: 13px; font-weight: 500;
  color: var(--muted-2);
}

.how-headline {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: flex-end;
}
.how-head-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.how-title-1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--cream);
  margin: 0;
}
.how-title-2-wrap {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  width: max-content;
}
.how-title-2 em {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(34px, 3.6vw, 52px);
  font-weight: 700;
  font-style: italic;
  letter-spacing: -1.5px;
  color: var(--green);
}
.how-title-2-under { height: 6px; border-radius: 999px; background: var(--green); }

.how-head-right { padding: 40px 0 12px; display: flex; flex-direction: column; gap: 18px; }
.how-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.how-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin: 0;
}
.icon.icon-green { color: var(--green); }

.step-pills {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding-top: 28px;
  flex-wrap: wrap;
}
.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: var(--bg-dark-2);
  border: 1px solid var(--green-line-2);
  color: var(--cream);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
}
.step-pill b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--green);
  color: var(--bg-dark);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
}
.step-pill .meta { color: var(--muted-2); font-size: 13px; font-weight: 500; }
.step-line {
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--line-light);
  opacity: .25;
}

/* how-step shared — full-bleed background, content centered inside */
.how-step {
  position: relative;
  width: 100%;
  padding: 80px var(--pad-x);
  overflow: hidden;
}
.how-step-dark { background: var(--bg-dark-2); }
.how-step-light { background: var(--cream-2); color: var(--ink); }

.big-num {
  position: absolute;
  top: 0;
  left: var(--pad-x);
  font-family: 'Outfit', sans-serif;
  font-size: 320px;
  font-weight: 700;
  color: var(--green);
  opacity: 0.07;
  line-height: 0.9;
  pointer-events: none;
}
.big-num.light { color: var(--green); opacity: 0.07; font-size: 280px; }

.how-step-grid {
  position: relative;
  max-width: var(--w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.how-step-grid.reverse { grid-template-columns: 1fr 1fr; }

.how-step-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
}
.step-eye {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.4px;
  color: var(--green);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.step-eye.green { color: var(--green); }
.line-dash {
  display: inline-block;
  width: 24px; height: 2px;
  background: var(--green);
}
.step-h {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--cream);
  margin: 0;
}
.step-h.dark { color: var(--ink); }
.step-h-em em {
  display: block;
  font-style: italic;
  color: var(--green);
  font-weight: 500;
}
.green-italic { color: var(--green); font-style: italic; font-weight: 500; }
.step-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 520px;
  margin: 0;
}
.step-sub.muted-dark { color: #3A3938; }

.step-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #0A1F16;
  border: 1px solid rgba(143,203,34,0.25);
  color: var(--cream);
  font-size: 14px;
  font-weight: 500;
}

/* step 1 phone */
.how-step-visual {
  display: flex;
  justify-content: center;
}
.how-phone {
  position: relative;
  /* reset hero .phone absolute offsets that this class inherits */
  left: auto;
  top: auto;
  bottom: auto;
  min-height: 0;
  width: 300px;
  height: 620px;
  background: var(--bg-dark-2);
  border-radius: 46px;
  border: 1.5px solid var(--green-line-2);
  padding: 8px;
  box-shadow: 0 30px 60px rgba(0,0,0,.6);
  overflow: hidden;
}
.how-phone .phone-body.small {
  background: var(--bg-dark-2);
  height: calc(100% - 44px);
  border-radius: 38px;
  padding: 16px;
  gap: 10px;
}
.grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin: 8px 0;
}
.grid-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(143,203,34,0.08);
  border: 1px solid rgba(143,203,34,0.2);
  border-radius: 16px;
  padding: 20px 10px;
  color: var(--cream);
  font-family: 'Outfit', sans-serif;
}
.grid-tile span { font-size: 28px; }
.grid-tile b { font-size: 13px; font-weight: 600; }
.helper {
  font-size: 11px;
  text-align: center;
  color: var(--muted);
  margin: 4px 0 0;
}

/* step 2 light */
.ps-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(140px);
  pointer-events: none;
}
.ps-orb-1 { width: 680px; height: 680px; left: -180px; top: -160px; background: #CDF291; opacity: .4; }
.ps-orb-2 { width: 680px; height: 680px; left: 920px; top: -100px; background: #FFD9B2; opacity: .4; }
.ps-orb-3 { width: 560px; height: 520px; left: 520px; top: 380px; background: #B2CCFF; opacity: .22; filter: blur(150px); }
.ps-veil { position: absolute; inset: 0; background: var(--cream-2); opacity: .6; pointer-events: none; }

.how-visual-card {
  position: relative;
  border-radius: 32px;
  background: linear-gradient(135deg, #1A4030 0%, #0A1F18 100%);
  border: 1px solid rgba(255,255,255,0.08);
  height: 540px;
  padding: 56px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--cream);
  overflow: hidden;
}
.vc-glow {
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(143,203,34,0.25) 0%, rgba(143,203,34,0) 70%);
  top: 80px; right: -40px;
  pointer-events: none;
}
.input-pill {
  padding: 12px 18px;
  border-radius: 999px;
  background: #EDECEA;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 2;
}
.arrow-wrap {
  z-index: 2;
  color: var(--green);
  font-size: 22px;
}
.detection {
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(143,203,34,0.2);
  border-radius: 24px;
  padding: 20px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}
.detection .detect-row {
  background: #FAFAF8;
  border-color: var(--line-light);
}
.detection .detect-row strong { color: var(--ink); font-weight: 600; font-size: 13px; }
.detection .detect-row span { color: var(--muted-3); font-size: 12px; }

.conf-chip {
  position: absolute;
  top: 32px;
  right: 32px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(143,203,34,0.25);
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  color: var(--ink);
  font-size: 13px;
  z-index: 3;
  backdrop-filter: blur(16px);
}
.conf-chip .ring {
  width: 24px; height: 24px;
  border-radius: 999px;
  border: 3px solid var(--green);
  border-right-color: rgba(143,203,34,0.25);
  display: inline-block;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  max-width: 540px;
}
.mini-stat {
  background: #fff;
  border: 1px solid #D1D0CD;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(26,25,24,0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mini-stat strong {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
}
.mini-stat span {
  font-size: 12px;
  color: var(--muted-3);
}

/* step 3 phone content */
.ring-row {
  display: inline-flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 8px 0;
}
.ring-row .ring {
  flex: 1;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 4px solid var(--green);
  border-right-color: var(--green-line-2);
  border-bottom-color: var(--green-line-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-family: 'Outfit', sans-serif;
}
.ring-row .ring span { font-size: 15px; font-weight: 700; }
.ring-row .ring small { font-size: 9px; color: var(--muted); }

.meal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(143,203,34,0.06);
  border: 1px solid var(--green-line-2);
  font-size: 11px;
  color: var(--cream);
}

.bottom-nav {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 8px;
  padding: 10px 4px;
  border-top: 1px solid var(--green-line-2);
  font-size: 18px;
  color: var(--muted);
}
.bottom-nav .active {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: var(--bg-dark);
  border-radius: 999px;
  font-weight: 700;
}

.badges { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-dark-2);
  border: 1px solid var(--green-line-2);
  color: var(--cream);
  font-size: 13px;
  font-weight: 500;
}

/* ============================================================
   SECTION / TESTIMONIALS
   ============================================================ */
.testimonials {
  background: var(--cream);
  color: var(--ink);
  padding: 80px var(--pad-x);
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}
.t-top {
  max-width: var(--w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: flex-end;
}
.t-eye {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--green);
  margin: 0;
}
.t-h {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(36px, 3.8vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--bg-dark-2);
  margin: 18px 0 0;
}
.t-h-em {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  width: max-content;
}
.t-h-em em { color: var(--green); font-style: italic; font-weight: 700; }
.t-under {
  height: 4px;
  border-radius: 999px;
  background: var(--green);
}
.t-sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted-2);
  margin: 0;
  max-width: 380px;
}

.t-cards {
  max-width: var(--w);
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.t-card {
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.t-card .stars { color: var(--green); font-size: 18px; letter-spacing: 2px; }
.t-quote {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--bg-dark-2);
  margin: 0;
}
.t-foot {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 40px; height: 40px; border-radius: 999px;
  display: inline-block;
}
.t-foot strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--bg-dark-2);
}
.t-foot small {
  font-size: 13px;
  color: var(--muted-3);
}

.t-stats {
  max-width: var(--w);
  margin: 56px auto 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  width: 100%;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--bg-dark-2);
}
.t-dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--green);
  display: inline-block;
}

/* ============================================================
   SECTION / FOOTER CTA
   ============================================================ */
.footer-cta {
  background:
    radial-gradient(120% 140% at 50% 40%, var(--green-line) 0%, var(--bg-dark) 80%);
  overflow: hidden;
}
.final-cta {
  max-width: var(--w);
  margin: 0 auto;
  padding: 80px var(--pad-x) 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
.final-h {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--cream);
  margin: 0;
}
.final-em {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.final-em em { color: var(--green); font-style: italic; font-weight: 700; }
.final-under {
  height: 5px;
  border-radius: 999px;
  background: var(--green);
  width: 100%;
}
.final-sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 520px;
  margin: 0;
}

/* Footer bar */
.footer-bar {
  background: var(--bg-deep);
  border-top: 1px solid var(--green-line);
  padding: 36px var(--pad-x) 28px;
}
.f-row {
  max-width: var(--w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  gap: 64px;
  align-items: flex-start;
}
.f-brand-col { display: flex; flex-direction: column; gap: 14px; }
.f-brand-row { display: inline-flex; align-items: center; gap: 10px; }
.f-brand-tag {
  font-size: 13px;
  color: #8B9E8C;
  margin: 0;
}

.f-links {
  display: inline-flex;
  gap: 56px;
}
.f-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.f-col h6 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--green);
  margin: 0 0 4px;
}
.f-col a {
  font-size: 14px;
  font-weight: 500;
  color: #C5D2BF;
}
.f-col a:hover { color: var(--cream); }

.f-social {
  display: inline-flex;
  gap: 10px;
}
.soc {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--green-line);
  border: 1px solid var(--green-line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-size: 14px;
}
.soc:hover { background: var(--green-line-2); }

.f-div {
  max-width: var(--w);
  margin: 24px auto 16px;
  background: var(--green-line);
}
.f-copy {
  text-align: center;
  font-size: 12px;
  color: #8B9E8C;
  margin: 0;
}

/* ============================================================
   Responsive
   ============================================================ */
/* ============================================================
   Responsive — Tablet (≤1180px)
   ============================================================ */
@media (max-width: 1180px) {
  :root { --pad-x: 32px; }

  /* Hero stacks vertically, phone visible in full */
  .hero { height: auto; min-height: auto; }
  .hero-main {
    grid-template-columns: 1fr;
    align-items: flex-start;
    padding: 32px var(--pad-x) 64px;
  }
  .hero-right {
    height: 760px;
    min-height: auto;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    align-self: auto;
  }
  .phone { bottom: auto; height: 730px; min-height: auto; }

  .h1 { font-size: 64px; letter-spacing: -2px; }
  .display { font-size: 84px; letter-spacing: -2.5px; }

  .feat-cards { grid-template-columns: 1fr; }
  .stats-card { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stat-sep { display: none; }

  .how-headline { grid-template-columns: 1fr; }
  .how-title-1 { font-size: 56px; letter-spacing: -2px; }
  .how-title-2 em { font-size: 48px; }
  .how-step-grid,
  .how-step-grid.reverse {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  /* Step 2: text first, visual below — match steps 1 & 3 source order on mobile */
  .how-step-grid.reverse > .how-step-content { order: 1; }
  .how-step-grid.reverse > .how-visual-card  { order: 2; }
  .step-h { font-size: 42px; }

  .t-top { grid-template-columns: 1fr; }
  .t-h { font-size: 48px; letter-spacing: -1.5px; }
  .t-cards { grid-template-columns: 1fr; }

  .final-h { font-size: 56px; }
  .f-row { grid-template-columns: 1fr; gap: 40px; }
  .f-links { flex-wrap: wrap; gap: 32px; }
}

/* ============================================================
   Responsive — Mobile (≤640px)
   ============================================================ */
@media (max-width: 640px) {
  :root { --pad-x: 20px; }

  /* Navbar tighter on phone */
  .navbar { padding: 20px var(--pad-x); }
  .logo-img { height: 36px; width: 36px; }
  .logo-text { font-size: 20px; }

  /* Hero text */
  .hero-main { padding: 16px var(--pad-x) 48px; gap: 32px; }
  .hero-left { gap: 20px; }
  .h1 { font-size: 44px; letter-spacing: -1.5px; }
  .h1-accent { margin-top: 6px; }
  .subhead { font-size: 16px; }
  .eyebrow { padding: 6px 12px; }
  .eyebrow-text { font-size: 11px; letter-spacing: 1.4px; }
  .trust { gap: 10px; flex-wrap: wrap; }
  .trust-text { font-size: 12px; }
  /* Store badges share one row on mobile */
  .ctas {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 360px;
  }
  .store-badge {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
  }
  .store-badge img {
    width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
  }

  /* Hero phone — scale down to fit small viewports */
  .hero-right {
    height: 620px;
    max-width: 320px;
  }
  .phone {
    width: 280px;
    height: 600px;
    left: 50%;
    margin-left: -140px;
    border-radius: 42px;
    border-width: 4px;
  }
  .phone-notch { padding: 14px 22px; height: 44px; }
  .phone-body { padding: 18px 14px 16px; gap: 14px; }
  .hero-phone-body { padding: 18px 14px; gap: 12px; }
  .phone-title { font-size: 18px; }
  .kicker { font-size: 10px; }
  .mode-tab { font-size: 11px; padding: 6px 8px; }
  .input-stage { height: 140px; }
  .mic-circle { width: 56px; height: 56px; font-size: 22px; }
  .text-bubble { font-size: 13px; padding: 10px 12px; min-height: 44px; }
  .res-row { font-size: 11px; padding: 6px 10px; }
  .frame-photo .meal-photo { width: 100px; height: 100px; border-radius: 22px; }

  /* Floating tags scaled to smaller phone */
  .float-tag { font-size: 13px; padding: 8px 12px; }
  .float-kcal { top: 200px; left: -6px; }
  .float-macro { top: 360px; left: auto; right: -6px; font-size: 12px; }
  .float-voice { top: 460px; left: -6px; font-size: 11px; max-width: 200px; }

  /* Features section */
  .features-header { padding: 64px var(--pad-x) 24px; gap: 20px; }
  .display { font-size: 56px; letter-spacing: -1.5px; gap: 10px; }
  .subhead.dark { font-size: 15px; }
  .trust-row-light { font-size: 12px; gap: 10px; flex-wrap: wrap; }
  .feat-cards { padding: 16px var(--pad-x) 32px; gap: 16px; }
  .feat-card { padding: 16px; border-radius: 22px; }
  .feat-stage { height: 380px; border-radius: 16px; }
  .mini-phone { width: 180px; height: 360px; top: 20px; }
  .feat-labels h3 { font-size: 20px; }
  .feat-labels p { font-size: 13px; }

  /* Stats card single column */
  .feat-stats-zone { padding: 40px var(--pad-x) 64px; gap: 28px; }
  .stats-card { grid-template-columns: 1fr; padding: 28px 20px; gap: 24px; border-radius: 24px; }
  .stat-num .num { font-size: 48px; }
  .stat-num .suffix { font-size: 36px; }
  .stat-num .big-star { font-size: 30px; }
  .stat { padding: 0; }

  /* How it works */
  .how-header { padding: 64px var(--pad-x) 24px; gap: 24px; }
  .how-eyebrow-row { flex-wrap: wrap; }
  .how-title-1 { font-size: 40px; letter-spacing: -1.5px; }
  .how-title-2 em { font-size: 32px; }
  .how-sub { font-size: 15px; }
  /* Three step pills always on one line */
  .step-pills {
    gap: 6px;
    flex-wrap: nowrap;
    padding-top: 12px;
    width: 100%;
    justify-content: space-between;
  }
  .step-pill {
    font-size: 11px;
    padding: 4px 10px 4px 4px;
    flex: 0 1 auto;
    white-space: nowrap;
  }
  .step-pill b { width: 22px; height: 22px; font-size: 10px; }
  .step-pill .meta { display: none; }   /* hide " · 2s" etc — keep pills compact */
  .step-line { display: none; }

  /* === How It Works — mobile layout === */
  .how-step { padding: 48px var(--pad-x); }
  .how-step-grid { gap: 28px; }

  /* Steps 1 & 3: visual centered below text */
  .how-step-visual {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .how-step-content { width: 100%; }

  /* Step 2: reorder so text comes first on mobile, then the visual */
  .how-step-light .how-step-grid.reverse > .how-step-content { order: 1; }
  .how-step-light .how-step-grid.reverse > .how-visual-card { order: 2; }

  .step-h { font-size: 30px; }
  .step-sub { font-size: 15px; }
  .step-chips, .badges { justify-content: flex-start; }

  /* Faded big number — center horizontally, less screaming */
  .big-num {
    font-size: 140px;
    left: 0;
    right: 0;
    text-align: center;
    opacity: .05;
    line-height: 1;
  }
  .big-num.light { font-size: 120px; }

  /* Step phones smaller and never offset */
  .how-phone {
    width: 240px;
    height: 480px;
    left: auto;
    top: auto;
    bottom: auto;
    margin: 0 auto;
  }

  /* Hide step 1 input-mode chips on mobile (the phone preview already shows them) */
  .step-chips { display: none; }

  /* === Step 2 visual card — rebuilt for mobile === */
  .how-visual-card {
    height: auto;
    min-height: 0;
    width: 100%;
    padding: 28px 20px;
    gap: 16px;
    border-radius: 24px;
    align-items: stretch;     /* let children be full width */
  }
  .vc-glow {
    width: 220px;
    height: 220px;
    top: 30px;
    right: -30px;
  }
  .input-pill {
    font-size: 13px;
    padding: 12px 16px;
    text-align: center;
    align-self: center;
    max-width: 100%;
  }
  .arrow-wrap {
    align-self: center;
    font-size: 22px;
  }
  .detection {
    width: 100%;
    max-width: 100%;
    padding: 16px;
    gap: 10px;
  }
  .detection .detect-row {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .detection .detect-row strong { font-size: 13px; }
  .detection .detect-row span { font-size: 11px; }

  /* Confidence chip → inline below detection (was floating top-right) */
  .conf-chip {
    position: relative;
    top: auto;
    right: auto;
    align-self: center;
    padding: 8px 14px;
    font-size: 12px;
  }

  /* Mini stats: stack cleanly as horizontal rows */
  .mini-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .mini-stat {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 12px;
  }
  .mini-stat strong { font-size: 22px; }
  .mini-stat span   { font-size: 13px; text-align: right; }

  /* Testimonials */
  .testimonials { padding: 56px var(--pad-x); }
  .t-h { font-size: 36px; letter-spacing: -1px; }
  .t-sub { font-size: 15px; }
  .t-card { padding: 24px; border-radius: 20px; }
  .t-quote { font-size: 16px; }
  .t-stats { flex-wrap: wrap; gap: 12px; font-size: 13px; justify-content: flex-start; }

  /* Final CTA + footer */
  .final-cta { padding: 56px var(--pad-x) 40px; gap: 20px; }
  .final-h { font-size: 40px; letter-spacing: -1.5px; }
  .final-sub { font-size: 15px; }
  .footer-bar { padding: 28px var(--pad-x) 20px; }
  .f-links { gap: 24px; }
  .f-col { gap: 8px; }
  .f-col h6 { font-size: 10px; }
  .f-col a { font-size: 13px; }
  .f-brand-tag { font-size: 12px; }
  .soc { width: 32px; height: 32px; }
}

/* ============================================================
   Responsive — Tiny phones (≤380px)
   ============================================================ */
@media (max-width: 380px) {
  :root { --pad-x: 16px; }
  .h1 { font-size: 38px; }
  .display { font-size: 44px; letter-spacing: -1px; }
  .hero-right { max-width: 280px; height: 580px; }
  .phone { width: 250px; height: 560px; margin-left: -125px; border-radius: 38px; }
  .float-kcal { top: 180px; }
  .float-macro { top: 330px; }
  .float-voice { top: 430px; }
  .store-badge img { height: 46px; }
  .how-title-1 { font-size: 34px; }
  .step-h { font-size: 26px; }
  .t-h { font-size: 30px; }
  .final-h { font-size: 34px; }
}

/* ============================================================
   ANIMATIONS — phone-screen flow demos
   ============================================================ */

/* ---------- Hero phone: natural-language input rotating ---------- */
.hero-phone-body { gap: 18px; padding: 24px 18px 20px; }
.hero-phone-body .title-block { gap: 4px; }
.hero-phone-body .phone-title { font-size: 22px; }

/* mode tabs */
.mode-tabs {
  display: inline-flex;
  width: 100%;
  justify-content: space-between;
  padding: 4px;
  background: rgba(143,203,34,0.06);
  border: 1px solid rgba(143,203,34,0.18);
  border-radius: 999px;
}
.mode-tab {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 999px;
  transition: background .35s ease, color .35s ease;
}

/* input stage holds 3 frames, only one visible at a time */
.input-stage {
  position: relative;
  width: 100%;
  height: 170px;
}
.input-frame {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.text-bubble {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(143,203,34,0.25);
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
  min-height: 50px;
}
.frame-text .typed-line {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
}
.frame-text .caret {
  display: inline-block;
  width: 2px; height: 16px;
  background: var(--green);
  margin-left: 2px;
  animation: blink 0.9s steps(2) infinite;
}
.hint-line {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  text-align: center;
}
.transcript {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-style: italic;
  color: var(--cream);
  text-align: center;
  margin: 0;
  max-width: 90%;
}

.frame-voice .mic-circle {
  width: 64px; height: 64px;
  font-size: 24px;
  margin: 0;
}
.frame-voice .waveform { margin: 2px 0; }

.frame-photo .meal-photo {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 28px; /* iOS app-icon style */
  overflow: hidden;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.35),
    inset 0 0 0 2px rgba(255,255,255,0.08);
}
.frame-photo .meal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.frame-photo .photo-flash {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.9);
  opacity: 0;
  pointer-events: none;
  animation: photoFlash 12s ease-out infinite;
  animation-delay: 8s;
}
@keyframes photoFlash {
  0%, 1%   { opacity: 0; }
  3%       { opacity: 1; }
  10%, 100%{ opacity: 0; }
}

/* result rows */
.result-rows {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.res-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(143,203,34,0.08);
  border: 1px solid rgba(143,203,34,0.22);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--cream);
  opacity: 0;
}
.res-row .res-kcal { color: var(--green); font-weight: 600; }

/* === Rotation animations (12s loop: 4s per mode) === */
@keyframes frameRotate {
  0%, 5%    { opacity: 0; transform: translateY(8px) scale(.98); }
  10%, 30%  { opacity: 1; transform: translateY(0) scale(1); }
  35%, 100% { opacity: 0; transform: translateY(-6px) scale(.98); }
}
.frame-voice { animation: frameRotate 12s ease-in-out infinite; animation-delay: 0s; }
.frame-text  { animation: frameRotate 12s ease-in-out infinite; animation-delay: 4s; }
.frame-photo { animation: frameRotate 12s ease-in-out infinite; animation-delay: 8s; }

@keyframes tabActive {
  0%, 4%, 38%, 100% {
    background: transparent;
    color: var(--muted);
  }
  10%, 32% {
    background: var(--green);
    color: var(--bg-dark);
  }
}
.mode-tab[data-mode="voice"] { animation: tabActive 12s ease-in-out infinite; animation-delay: 0s; }
.mode-tab[data-mode="text"]  { animation: tabActive 12s ease-in-out infinite; animation-delay: 4s; }
.mode-tab[data-mode="photo"] { animation: tabActive 12s ease-in-out infinite; animation-delay: 8s; }

/* typewriter inside text frame */
@keyframes typedReveal {
  0%       { width: 0; }
  35%, 75% { width: 100%; }
  100%     { width: 0; }
}
.frame-text .typed-line {
  animation: typedReveal 4s steps(36, end) infinite;
  animation-delay: 4s;
}

/* result rows fade in after each mode lands (every 4s) */
@keyframes resRowReveal {
  0%, 30%   { opacity: 0; transform: translateY(6px); }
  45%, 95%  { opacity: 1; transform: translateY(0); }
  100%      { opacity: 0; }
}
.res-row { animation: resRowReveal 4s ease-out infinite; }
.res-row:nth-child(1) { animation-delay: 0s; }
.res-row:nth-child(2) { animation-delay: 0.25s; }
.res-row:nth-child(3) { animation-delay: 0.5s; }

/* ---------- Floating tags: gentle float ---------- */
@keyframes floatKcal {
  0%, 100% { transform: rotate(6deg) translateY(0); }
  50%      { transform: rotate(6deg) translateY(-10px); }
}
@keyframes floatMacro {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50%      { transform: rotate(-4deg) translateY(-7px); }
}
@keyframes floatVoice {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%      { transform: rotate(-3deg) translateY(-12px); }
}
.float-kcal  { animation: floatKcal  4.0s ease-in-out infinite; }
.float-macro { animation: floatMacro 5.0s ease-in-out infinite; }
.float-voice { animation: floatVoice 4.5s ease-in-out infinite; }

/* ---------- Voice card: waveform + mic pulse ---------- */
@keyframes wavePulse {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1.25); }
}
.waveform span {
  transform-origin: center;
  animation: wavePulse 0.9s ease-in-out infinite;
}
.waveform span:nth-child(1) { animation-delay: 0.00s; }
.waveform span:nth-child(2) { animation-delay: 0.10s; }
.waveform span:nth-child(3) { animation-delay: 0.20s; }
.waveform span:nth-child(4) { animation-delay: 0.05s; }
.waveform span:nth-child(5) { animation-delay: 0.25s; }
.waveform span:nth-child(6) { animation-delay: 0.15s; }
.waveform span:nth-child(7) { animation-delay: 0.30s; }
.waveform span:nth-child(8) { animation-delay: 0.08s; }

@keyframes micPulse {
  0%   { box-shadow: 0 0 0 0    rgba(143,203,34,0.55); }
  70%  { box-shadow: 0 0 0 24px rgba(143,203,34,0);    }
  100% { box-shadow: 0 0 0 0    rgba(143,203,34,0);    }
}
.mic-circle { animation: micPulse 1.8s ease-out infinite; }

@keyframes voiceQuoteIn {
  0%, 10%   { opacity: 0; transform: translateY(4px); }
  35%, 92%  { opacity: 1; transform: translateY(0); }
  100%      { opacity: 0; }
}
.voice-screen .mini-quote { opacity: 0; animation: voiceQuoteIn 4.5s ease-out infinite; }
.voice-screen .mini-pill  { opacity: 0; animation: voiceQuoteIn 4.5s ease-out infinite; animation-delay: 0.6s; }

/* ---------- Photo card: plate → barcode swap loop (8s total) ---------- */
/* Phase A (0–4s): plate visible, food detect-list visible */
/* Phase B (4–8s): barcode visible, barcode detect-list visible */

@keyframes plateShow {
  0%, 6%    { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
  14%, 44%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
}
@keyframes barcodeShow {
  0%, 50%   { opacity: 0; transform: translate(-50%, -50%) scale(.88); }
  56%, 94%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100%      { opacity: 0; transform: translate(-50%, -50%) scale(.88); }
}
.photo-stack .plate   { animation: plateShow   8s ease-in-out infinite; transform-origin: center; }
.photo-stack .barcode { animation: barcodeShow 8s ease-in-out infinite; transform-origin: center; }

/* Plate's green scan line */
.photo-stack .plate { overflow: hidden; }
.photo-stack .plate::after {
  content: "";
  position: absolute;
  left: 8%; right: 8%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  border-radius: 999px;
  box-shadow: 0 0 12px var(--green);
  animation: plateScan 2s ease-in-out infinite;
}
@keyframes plateScan {
  0%   { top: 10%; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { top: 90%; opacity: 0; }
}

/* Barcode red laser scan line */
.barcode { position: relative; }
@keyframes barcodeScan {
  0%   { top: 12%; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { top: 60%; opacity: 0; }
}
.barcode .scanline {
  animation: barcodeScan 1.4s ease-in-out infinite;
}

/* Detection rows fade in/out per phase */
@keyframes detectRowPhotoIn {
  0%, 14%   { opacity: 0; transform: translateX(-8px); }
  22%, 46%  { opacity: 1; transform: translateX(0); }
  50%, 100% { opacity: 0; }
}
@keyframes detectRowBarcodeIn {
  0%, 54%   { opacity: 0; transform: translateX(-8px); }
  62%, 94%  { opacity: 1; transform: translateX(0); }
  100%      { opacity: 0; }
}
.photo-detect .detect-row   { opacity: 0; animation: detectRowPhotoIn   8s ease-out infinite; }
.photo-detect .detect-row:nth-child(1) { animation-delay: 0.0s; }
.photo-detect .detect-row:nth-child(2) { animation-delay: 0.2s; }
.photo-detect .detect-row:nth-child(3) { animation-delay: 0.4s; }
.barcode-detect .detect-row { opacity: 0; animation: detectRowBarcodeIn 8s ease-out infinite; }
.barcode-detect .detect-row:nth-child(1) { animation-delay: 0.0s; }
.barcode-detect .detect-row:nth-child(2) { animation-delay: 0.2s; }
.barcode-detect .detect-row:nth-child(3) { animation-delay: 0.4s; }

/* ---------- Text card: typewriter + result rows ---------- */
@keyframes typeIn {
  0%       { width: 0; }
  55%, 95% { width: 100%; }
  100%     { width: 0; }
}
.text-screen .typed {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  animation: typeIn 5s steps(38,end) infinite;
}
@keyframes resultIn {
  0%, 60%  { opacity: 0; transform: translateY(6px); }
  72%, 96% { opacity: 1; transform: translateY(0); }
  100%     { opacity: 0; }
}
.text-screen .text-row {
  opacity: 0;
  animation: resultIn 5s ease-out infinite;
}
.text-screen .text-row:nth-child(1) { animation-delay: 0s; }
.text-screen .text-row:nth-child(2) { animation-delay: 0.4s; }

/* ---------- Step 1 phone: grid tile cycles "active" ---------- */
@keyframes tileActive {
  0%, 18%, 100% {
    background: rgba(143,203,34,0.08);
    border-color: rgba(143,203,34,0.2);
    color: var(--cream);
    transform: scale(1);
  }
  4%, 14% {
    background: var(--green);
    border-color: var(--green);
    color: var(--bg-dark);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(143,203,34,0.35);
  }
}
.grid-tile {
  transition: background .3s, color .3s, transform .3s;
  animation: tileActive 6.4s ease-in-out infinite;
}
.grid-tile:nth-child(1) { animation-delay: 0s;   }
.grid-tile:nth-child(2) { animation-delay: 1.6s; }
.grid-tile:nth-child(3) { animation-delay: 3.2s; }
.grid-tile:nth-child(4) { animation-delay: 4.8s; }

/* ---------- Step 2 visual: input → arrow → detection ---------- */
@keyframes step2Stage {
  0%, 8%    { opacity: 0; transform: translateY(8px); }
  20%, 92%  { opacity: 1; transform: translateY(0); }
  100%      { opacity: 0; transform: translateY(0); }
}
.how-visual-card .input-pill  { opacity: 0; animation: step2Stage 6s ease-out infinite; }
.how-visual-card .arrow-wrap  { opacity: 0; animation: step2Stage 6s ease-out infinite; animation-delay: 0.8s; }
.how-visual-card .detection   { opacity: 0; animation: step2Stage 6s ease-out infinite; animation-delay: 1.6s; }

.how-visual-card .arrow-wrap {
  animation: step2Stage 6s ease-out infinite, arrowBob 1.4s ease-in-out infinite;
}
@keyframes arrowBob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 4px; }
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}
.conf-chip .ring { animation: ringSpin 2.4s linear infinite; }

/* ---------- Step 3 phone: rings + meals ---------- */
@keyframes ringFill {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(259deg); }
}
.ring-row .ring {
  position: relative;
}
.ring-row .ring::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 4px solid transparent;
  border-top-color: var(--green);
  animation: ringFill 4s ease-out infinite alternate;
}
.ring-row .ring:nth-child(2)::before { animation-delay: 0.2s; animation-duration: 4.5s; }
.ring-row .ring:nth-child(3)::before { animation-delay: 0.4s; animation-duration: 5.2s; }

@keyframes mealIn {
  0%, 100% { opacity: 0; transform: translateX(-6px); }
  18%, 92% { opacity: 1; transform: translateX(0); }
}
.how-step:last-child .meal-row {
  opacity: 0;
  animation: mealIn 5s ease-out infinite;
}
.how-step:last-child .meal-row:nth-of-type(1) { animation-delay: 0.6s; }
.how-step:last-child .meal-row:nth-of-type(2) { animation-delay: 1.1s; }
.how-step:last-child .meal-row:nth-of-type(3) { animation-delay: 1.6s; }

@keyframes navActivePulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0    rgba(143,203,34,0.6); }
  50%      { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(143,203,34,0);    }
}
.bottom-nav .active { animation: navActivePulse 1.8s ease-out infinite; }

/* ---------- Reduced motion: respect user pref ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
