/* Nutrition Coach website. Colors follow the app (mobile/src/theme/colors.ts): dark by default,
   with a light version for people whose phone is set to light mode. */

:root {
  color-scheme: dark light;
  --bg: #070a12;
  --bg-raised: #0d121d;
  --card: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f5f7ff;
  --muted: rgba(245, 247, 255, 0.74);
  --muted-2: rgba(245, 247, 255, 0.58);
  --accent: #6ee7ff;
  --accent-ink: #062530;
  --accent-soft: rgba(110, 231, 255, 0.12);
  --violet: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 20px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f8fc;
    --bg-raised: #ffffff;
    --card: #ffffff;
    --border: rgba(10, 20, 40, 0.1);
    --text: #0b1220;
    --muted: rgba(11, 18, 32, 0.74);
    --muted-2: rgba(11, 18, 32, 0.6);
    --accent: #076a80;
    --accent-ink: #ffffff;
    --accent-soft: rgba(10, 127, 153, 0.1);
    --violet: #6d4fd6;
    --green: #0f8a5f;
    --amber: #a86400;
    --shadow: 0 24px 60px rgba(10, 20, 40, 0.14);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
@media (max-width: 640px) { .nav .nav-hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px;
  border-radius: 14px; font-weight: 650; font-size: 16px; text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--card); }
.btn-soon {
  background: var(--card); color: var(--text); border-color: var(--border); cursor: default;
}
.btn-soon svg, .btn-primary svg { width: 22px; height: 22px; flex: none; }
.btn small { display: block; font-size: 12px; font-weight: 500; color: var(--muted-2); line-height: 1.2; }
.btn .btn-text { display: flex; flex-direction: column; line-height: 1.25; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { color: var(--muted-2); font-size: 14px; margin: 14px 0 0; }

/* Hero */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -120px -20% auto auto; width: 720px; height: 720px;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%); pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 650; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 14px; }
h1 { font-size: clamp(38px, 6vw, 62px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 20px; }
h1 .accent { color: var(--accent); }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); margin: 0 0 30px; max-width: 34ch; }
@media (max-width: 860px) {
  .hero { padding-top: 44px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .lede { max-width: none; }
}

/* Phone frame around screenshots */
.phone {
  width: min(320px, 82vw); margin: 0 auto; padding: 10px; border-radius: 44px;
  background: linear-gradient(160deg, #2a3141, #121722); box-shadow: var(--shadow);
}
.phone img { border-radius: 34px; aspect-ratio: 786 / 1704; object-fit: cover; object-position: top; width: 100%; }

/* A cropped part of a screen, as a card */
.shot-card { border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.shot-card img { width: 100%; }

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; }
h3 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; }
.section-head p { color: var(--muted); margin: 0; font-size: 18px; }
.alt { background: var(--bg-raised); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 14px;
}
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Feature spotlights (text + screenshot) */
.spotlight { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 28px 0; }
.spotlight + .spotlight { border-top: 1px solid var(--border); }
.spotlight.flip .spotlight-media { order: -1; }
.spotlight p { color: var(--muted); margin: 0 0 14px; }
.spotlight ul { margin: 0; padding-left: 20px; color: var(--muted); }
.spotlight li { margin: 6px 0; }
.tag { display: inline-block; font-size: 13px; font-weight: 650; color: var(--violet); margin-bottom: 8px; }
@media (max-width: 860px) {
  .spotlight { grid-template-columns: 1fr; gap: 28px; }
  .spotlight.flip .spotlight-media { order: 0; }
}

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card p { color: var(--muted); margin: 0; }
.card .icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.card .icon svg { width: 22px; height: 22px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

/* Outcomes */
.outcomes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; list-style: none; padding: 0; margin: 0; }
.outcomes li { display: flex; gap: 14px; align-items: flex-start; }
.outcomes svg { width: 24px; height: 24px; flex: none; color: var(--green); margin-top: 3px; }
.outcomes strong { display: block; }
.outcomes span { color: var(--muted); }
@media (max-width: 760px) { .outcomes { grid-template-columns: 1fr; } }

/* Privacy band */
.privacy-band { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.privacy-band ul { margin: 0; padding-left: 20px; color: var(--muted); }
.privacy-band li { margin: 8px 0; }
@media (max-width: 860px) { .privacy-band { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary {
  cursor: pointer; font-weight: 650; font-size: 18px; list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* Final CTA */
.final { text-align: center; }
.final .cta-row { justify-content: center; }
.final p { color: var(--muted); max-width: 52ch; margin: 0 auto 28px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 48px; color: var(--muted-2); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: flex-start; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); }
.disclaimer { flex-basis: 100%; margin: 0; }

/* Plain content pages (support, 404) */
.page { padding: 56px 0 72px; }
.page .wrap { max-width: 780px; }
.page h1 { font-size: clamp(32px, 5vw, 44px); }
.page p, .page li { color: var(--muted); }
.page h2 { font-size: 24px; margin-top: 40px; }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 28px 0; }
.contact-card p { margin: 0 0 8px; }
.contact-card a { font-weight: 650; font-size: 19px; }
