/* ==========================================================================
   Nutribuddy — landing page styles
   Design tokens copied 1:1 from the app's src/constants/theme.ts
   ("warm clinical": paper backgrounds, ink text, moss/terra/amber/slate accents)
   ========================================================================== */

:root {
  /* Ink (text) */
  --ink: #14130F;
  --ink-2: #33312A;
  --ink-3: #5C5A52;
  --ink-4: #6E6B61;
  --ink-5: #A29F93;

  /* Lines / dividers */
  --line: #DAD6CB;
  --line-2: #E6E2D8;

  /* Paper (backgrounds) */
  --paper: #F6F4EF;
  --paper-2: #EDEBE3;
  --paper-3: #FAF9F5;
  --white: #FFFFFF;

  /* Accents */
  --moss: #1F3D2C;
  --moss-2: #2D5840;
  --moss-soft: #E2EBE3;
  --terra: #A8482A;
  --terra-soft: #F6E5DC;
  --amber: #8A6110;
  --amber-soft: #F7EBD3;
  --slate: #374658;
  --slate-soft: #E1E6ED;
  --plum: #6E4460;
  --plum-soft: #F0E2EC;

  /* Macro graph colors */
  --graph-carbs: #8B5578;
  --graph-protein: #B5851C;
  --graph-fat: #C2603C;
  --graph-moss: #2D5840;

  /* Radii */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --r-xxl: 28px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 3px 12px rgba(20, 19, 15, 0.05);
  --shadow-md: 0 8px 24px rgba(20, 19, 15, 0.06);
  --shadow-lg: 0 16px 38px rgba(20, 19, 15, 0.12);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.35);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", serif;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 80px);
}

/* ── Reset ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
h1, h2, h3, p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--moss); text-decoration: none; }
a:hover { color: var(--moss-2); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--moss-2);
  outline-offset: 3px;
}
ul { list-style: none; margin: 0; padding: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { flex-shrink: 0; }

.btn--nav {
  padding: 9px 16px;
  font-size: 12.5px;
}

.btn--on-dark {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-xl);
}
.btn--on-dark:hover { box-shadow: 0 20px 44px rgba(0,0,0,0.34); color: var(--ink); }

.btn--outline-on-dark {
  background: transparent;
  color: var(--paper);
  border-color: rgba(246,244,239,0.4);
}
.btn--outline-on-dark:hover { background: rgba(246,244,239,0.14); color: var(--paper); }

.btn--solid {
  background: var(--moss);
  color: var(--paper);
  box-shadow: var(--shadow-lg);
}
.btn--solid:hover { box-shadow: 0 20px 44px rgba(20,19,15,0.2); color: var(--paper); }

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--outline:hover { background: var(--paper-2); color: var(--ink); }

.store-ctas {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.store-note {
  font-size: 11.5px;
  color: rgba(246,244,239,0.4);
}
.final-cta .store-note { color: var(--ink-5); }

/* ── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { stroke: var(--moss); }
.brand-name {
  font-size: 17px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--paper);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--paper);
  opacity: .78;
  transition: opacity .15s ease;
}
.nav-link:hover { opacity: 1; color: var(--paper); }

@media (max-width: 720px) {
  .nav-links a.nav-link { display: none; }
}

/* ── Hero (dark) ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--ink);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(45, 88, 64, 0.22);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
  padding: 72px 0 96px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 580px;
  flex-shrink: 0;
}
.eyebrow {
  display: inline-flex;
  width: fit-content;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--moss-soft);
  background: rgba(226,235,227,0.14);
  padding: 7px 13px;
  border-radius: var(--r-pill);
}
.hero-copy h1 {
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.06;
  letter-spacing: -2px;
  font-weight: 700;
  color: var(--paper);
}
.hero-copy h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -1px;
  color: #c9e0cf;
}
.hero-copy p.lede {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(246,244,239,0.72);
  max-width: 480px;
}
.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

/* ── Phone mock ───────────────────────────────────────────────────────── */
.phone {
  width: 290px;
  height: 590px;
  border-radius: 44px;
  background: #0c0b09;
  box-shadow: var(--shadow-xl);
  padding: 14px;
  flex-shrink: 0;
}
.phone--flow { width: 240px; height: 460px; border-radius: 36px; background: var(--ink); padding: 11px; box-shadow: var(--shadow-lg); }
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  background: var(--paper);
  padding: 30px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.phone-date {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-4); font-weight: 600;
}
.phone-title { font-size: 25px; font-weight: 700; letter-spacing: -0.6px; margin-top: 2px; color: var(--ink); }

.ring-card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.ring-value { font-size: 21px; font-weight: 700; letter-spacing: -0.4px; color: var(--ink); }
.ring-target { font-size: 11.5px; color: var(--ink-4); }

.macro-rows { display: flex; flex-direction: column; gap: 9px; }
.macro-row { display: flex; align-items: center; gap: 10px; }
.macro-label { font-size: 11px; color: var(--ink-4); width: 44px; flex-shrink: 0; }
.macro-track { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--line-2); overflow: hidden; }
.macro-fill { height: 100%; }
.macro-fill--carbs { background: var(--graph-carbs); width: 64%; }
.macro-fill--protein { background: var(--graph-protein); width: 48%; }
.macro-fill--fat { background: var(--graph-fat); width: 55%; }

.meal-card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.meal-thumb { width: 42px; height: 42px; border-radius: var(--r-md); background: var(--moss-soft); flex-shrink: 0; }
.meal-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.meal-meta { font-size: 10.5px; color: var(--ink-4); margin-top: 2px; }
.meal-chip {
  font-size: 9.5px; font-weight: 600; color: var(--moss-2);
  background: var(--moss-soft); padding: 4px 7px; border-radius: var(--r-pill);
}

.capture-btn {
  width: 52px; height: 52px; border-radius: var(--r-pill);
  background: var(--moss);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(20,19,15,0.18);
  margin: 0 auto;
}
.capture-btn svg { stroke: var(--paper); }
.spacer { flex: 1; }

/* ── For specialists ──────────────────────────────────────────────────── */
.specialists {
  background: var(--paper-2);
  padding: 104px 0;
}
.specialists-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
}
.specialists-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 520px;
  flex-shrink: 0;
}
.badge-amber {
  display: inline-flex;
  width: fit-content;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-soft);
  padding: 7px 13px;
  border-radius: var(--r-pill);
}
.specialists-copy h2 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -1.2px;
  font-weight: 700;
}
.specialists-copy > p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-3);
}
.check-list { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; }
.check-list svg { stroke: var(--moss); flex-shrink: 0; margin-top: 2px; }
.check-list span { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.specialist-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--moss);
}
.specialist-link svg { stroke: var(--moss); }

.dashboard-mock {
  width: 520px;
  max-width: 100%;
  flex-shrink: 0;
  background: var(--paper-3);
  border-radius: var(--r-xxl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.dashboard-titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
}
.dot { width: 9px; height: 9px; border-radius: var(--r-pill); background: var(--line); }
.dashboard-titlebar span { font-size: 11.5px; color: var(--ink-4); margin-left: 8px; }
.dashboard-body { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.client-row { display: flex; align-items: center; gap: 12px; }
.client-avatar { width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--moss-soft); flex-shrink: 0; }
.client-name { font-size: 14.5px; font-weight: 700; }
.client-meta { font-size: 11.5px; color: var(--ink-4); }
.status-chip { font-size: 10px; font-weight: 600; color: var(--moss-2); background: var(--moss-soft); padding: 4px 9px; border-radius: var(--r-pill); }
.mini-bars { display: flex; align-items: flex-end; gap: 6px; height: 70px; }
.mini-bars div { flex: 1; background: var(--line-2); border-radius: 4px 4px 0 0; }
.mini-bars div.peak { background: var(--moss-2); }
.stat-pair { display: flex; gap: 10px; }
.stat-card { flex: 1; background: var(--white); border-radius: var(--r-md); padding: 12px; }
.stat-card .label { font-size: 10px; color: var(--ink-4); }
.stat-card .value { font-size: 16px; font-weight: 700; margin-top: 2px; }
.note-row {
  background: var(--white); border-radius: var(--r-md); padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.note-row svg { stroke: var(--ink-5); flex-shrink: 0; }
.note-row span { font-size: 12.5px; color: var(--ink-5); }

/* ── How it works ─────────────────────────────────────────────────────── */
.how {
  padding: 104px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  scroll-margin-top: 24px;
}
.section-kicker {
  font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-bottom: 18px;
}
.how h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.12;
  letter-spacing: -1.4px;
  font-weight: 700;
  max-width: 760px;
}
.how > p {
  font-size: 16px; line-height: 1.65; color: var(--ink-3);
  margin-top: 18px; max-width: 540px;
}
.flow-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 64px;
  flex-wrap: wrap;
  justify-content: center;
}
.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transition: transform .2s ease, box-shadow .2s ease;
  border-radius: var(--r-xxl);
}
.flow-step:hover { transform: translateY(-8px); }
.flow-step .step-num { font-size: 12px; font-weight: 600; color: var(--ink-5); }
.flow-step .step-name { font-size: 15.5px; font-weight: 700; }
.flow-connector { flex-shrink: 0; stroke: var(--ink-5); }

.viewfinder {
  width: 100%; height: 100%; border-radius: 27px;
  background: #1c1c18;
  position: relative;
  overflow: hidden;
}
.viewfinder .corner {
  position: absolute; width: 28px; height: 28px;
  border-color: rgba(246,244,239,0.55);
}
.viewfinder .corner.tl { top: 24px; left: 24px; border-top: 2px solid; border-left: 2px solid; border-radius: 6px 0 0 0; }
.viewfinder .corner.tr { top: 24px; right: 24px; border-top: 2px solid; border-right: 2px solid; border-radius: 0 6px 0 0; }
.viewfinder .corner.bl { bottom: 24px; left: 24px; border-bottom: 2px solid; border-left: 2px solid; border-radius: 0 0 0 6px; }
.viewfinder .corner.br { bottom: 24px; right: 24px; border-bottom: 2px solid; border-right: 2px solid; border-radius: 0 0 6px 0; }
.viewfinder .frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 104px; height: 104px; border-radius: 16px; background: rgba(246,244,239,0.06); }
.viewfinder .shutter { position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%); width: 52px; height: 52px; border-radius: var(--r-pill); border: 3px solid var(--paper); }

.confirm-screen {
  width: 100%; height: 100%; border-radius: 27px; background: var(--paper);
  padding: 22px 16px; display: flex; flex-direction: column; gap: 14px;
}
.confirm-photo { width: 100%; height: 126px; border-radius: 16px; background: var(--moss-soft); }
.confirm-name { font-size: 14.5px; font-weight: 700; letter-spacing: -0.2px; }
.confirm-items { display: flex; flex-direction: column; gap: 6px; }
.confirm-items .row { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }
.confirm-actions { display: flex; gap: 8px; margin-top: auto; }
.confirm-actions .primary { flex: 1; padding: 10px; border-radius: var(--r-pill); background: var(--moss); color: var(--paper); font-size: 11.5px; font-weight: 600; text-align: center; }
.confirm-actions .secondary { flex: 1; padding: 10px; border-radius: var(--r-pill); background: var(--paper-2); color: var(--ink-2); font-size: 11.5px; font-weight: 600; text-align: center; }

.trend-screen {
  width: 100%; height: 100%; border-radius: 27px; background: var(--paper);
  padding: 22px 16px; display: flex; flex-direction: column; gap: 18px;
}
.trend-label { font-size: 10.5px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--ink-4); font-weight: 600; }
.trend-value { font-size: 19px; font-weight: 700; letter-spacing: -0.3px; margin-top: 2px; }
.trend-bars { display: flex; align-items: flex-end; gap: 6px; height: 100px; }
.trend-bars div { flex: 1; background: var(--line-2); border-radius: 5px 5px 0 0; }
.trend-bars div.peak { background: var(--moss-2); }

/* ── Why it's credible ────────────────────────────────────────────────── */
.why {
  background: var(--white);
  border-top: 1px solid var(--line-2);
  padding: 104px 0 96px;
  scroll-margin-top: 24px;
}
.why-head { max-width: 640px; margin-bottom: 56px; }
.why-head h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -1px;
  font-weight: 700;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: var(--line-2);
  border-radius: var(--r-xxl);
  overflow: hidden;
}
.trust-card {
  background: var(--paper-3);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .2s ease;
}
.trust-card:hover { transform: translateY(-4px); }
.trust-icon {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
}
.trust-icon--moss { background: var(--moss-soft); }
.trust-icon--slate { background: var(--slate-soft); }
.trust-icon--terra { background: var(--terra-soft); }
.trust-icon--plum { background: var(--plum-soft); }
.trust-card h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.trust-card p { font-size: 13.5px; line-height: 1.65; color: var(--ink-3); }

/* ── Final CTA ────────────────────────────────────────────────────────── */
.final-cta {
  background: var(--paper-2);
  padding: 96px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.final-cta h2 {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 700;
  margin-bottom: 32px;
  max-width: 560px;
}
.final-cta .store-ctas { justify-content: center; }
.final-cta .store-note { margin-top: 14px; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  padding: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line-2);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-brand .brand-mark { width: 24px; height: 24px; border-radius: 7px; background: var(--moss); }
.footer-brand .brand-mark svg { stroke: var(--paper); }
.footer-brand span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.footer-tag { font-size: 12px; color: var(--ink-5); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid { flex-direction: column; align-items: flex-start; padding: 48px 0 64px; gap: 48px; }
  .phone { margin: 0 auto; }
  .specialists-grid { flex-direction: column; align-items: flex-start; }
  .dashboard-mock { width: 100%; }
  .how, .specialists, .why, .final-cta { padding-top: 72px; padding-bottom: 72px; }
  .flow-row { gap: 32px; }
  .flow-connector { transform: rotate(90deg); }
  .trust-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero-copy h1 { letter-spacing: -1px; }
  .store-ctas { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .phone { width: 100%; max-width: 320px; height: 560px; }
  .phone--flow { width: 100%; max-width: 280px; height: 420px; }
}
