/* IBS & FODMAP Tracker — marketing site. Colours match the app's theme tokens. */
:root {
  --tint: #0b8a7e;
  --tint-bright: #22b8a4;
  --tint-soft: rgba(11, 138, 126, 0.1);
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #5f6368;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --bowel: #b76e1f;
  --symptom: #d93f56;
  --meal: #2f9e58;
  --med: #6e56cf;
  --life: #2b7fe0;
  --pro: #b8860b;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.06);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tint: #34d1bf;
    --tint-bright: #5eead4;
    --tint-soft: rgba(52, 209, 191, 0.12);
    --bg: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #6e6e73;
    --line: rgba(255, 255, 255, 0.1);
    --bowel: #e8a257;
    --symptom: #ff6b81;
    --meal: #4cd07d;
    --med: #9e8cfc;
    --life: #5aa9ff;
    --pro: #f5c451;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { margin-left: auto; display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--text-2); }
.nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* Buttons and pills */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--tint-soft); color: var(--tint);
  font-size: 14px; font-weight: 600;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tint); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 14px;
  font-weight: 600; font-size: 17px; border: 0; cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-primary { background: var(--tint); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { color: #00201c; } }
.btn-ghost { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

/* Hero */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.035em;
  margin: 18px 0 18px; font-weight: 750;
}
.hero h1 .accent { background: linear-gradient(135deg, var(--tint-bright), var(--tint)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: clamp(18px, 2vw, 21px); color: var(--text-2); max-width: 34em; margin: 0 0 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .note { margin-top: 14px; font-size: 14px; color: var(--text-3); }
.stage { position: relative; height: 640px; }
.stage .phone { position: absolute; }
.stage .phone.front { left: 50%; top: 0; transform: translateX(-62%); z-index: 2; }
.stage .phone.back { left: 50%; top: 60px; transform: translateX(-5%) rotate(5deg) scale(0.9); opacity: 0.95; }
@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero .actions { justify-content: center; }
  .stage { height: 560px; }
}
@media (max-width: 520px) {
  .stage { height: 500px; }
  .stage .phone.back { display: none; }
  .stage .phone.front { transform: translateX(-50%); }
}

/* Phone frame */
.phone {
  width: 290px; aspect-ratio: 402 / 874;
  padding: 9px; border-radius: 50px;
  background: linear-gradient(145deg, #2c2c2e, #0d0d0e);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 40px 80px -20px rgba(0, 0, 0, 0.35), 0 20px 40px -20px rgba(11, 138, 126, 0.25);
}
.phone { position: relative; }
/* Status-bar gap so app content clears the rounded corners, plus a Dynamic Island. */
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 41px; background: #f2f2f7; padding-top: 11%; }
.phone::after {
  content: ''; position: absolute; top: 3.2%; left: 50%; transform: translateX(-50%);
  width: 31%; height: 3.4%; border-radius: 999px; background: #000;
}
@media (max-width: 520px) { .phone { width: 250px; } }

/* Trust strip */
.trust { padding: 8px 0 56px; }
.trust ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; color: var(--text-2); font-size: 15px; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--tint); flex: none; }

/* Sections */
section.block { padding: 88px 0; }
section.block.alt { background: var(--surface); }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tint); margin: 0 0 10px; }
h2 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 16px; font-weight: 720; }
.section-lede { font-size: 19px; color: var(--text-2); max-width: 36em; margin: 0; }
.center { text-align: center; }
.center .section-lede { margin: 0 auto; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature + .feature { margin-top: 110px; }
.feature.flip .copy { order: 2; }
.feature .visual { display: flex; justify-content: center; }
.feature ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.feature li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--text-2); }
.feature li b { color: var(--text); font-weight: 600; }
.tick { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--tint-soft); color: var(--tint); }
.tick svg { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 40px; }
  .feature.flip .copy { order: 0; }
}

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
section.alt .card { background: var(--bg); box-shadow: none; }
.card h3 { font-size: 20px; margin: 14px 0 6px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--text-2); font-size: 16px; }
.card .num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 15px; }
.icon-tile { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; }
.icon-tile svg { width: 22px; height: 22px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

/* Pricing */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 48px; max-width: 880px; margin-left: auto; margin-right: auto; }
.plan { background: var(--surface); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); text-align: left; }
.plan.pro { box-shadow: var(--shadow), inset 0 0 0 2px var(--pro); }
.plan h3 { margin: 0; font-size: 22px; }
.plan .price { font-family: var(--font-display); font-size: 40px; font-weight: 750; letter-spacing: -0.03em; margin: 10px 0 2px; }
.plan .price small { font-size: 16px; color: var(--text-3); font-weight: 500; letter-spacing: 0; }
.plan .sub { color: var(--text-3); font-size: 15px; margin: 0 0 18px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 16px; }
.plan li svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--meal); }
.plan.pro li svg { color: var(--pro); }
.badge { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 6px; background: var(--pro); color: #fff; margin-left: 8px; vertical-align: middle; }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 760px; margin: 40px auto 0; }
.faq details { background: var(--surface); border-radius: 16px; padding: 4px 22px; margin-bottom: 10px; box-shadow: var(--shadow); }
section.alt .faq details { background: var(--bg); box-shadow: none; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--text-3); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 18px; color: var(--text-2); }

/* CTA */
.cta { padding: 96px 0; }
.cta .box {
  border-radius: 32px; padding: 64px 32px; text-align: center; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #22b8a4 0%, #0b8a7e 55%, #075f57 100%);
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.85); font-size: 19px; max-width: 32em; margin: 0 auto 28px; }
.cta .btn { background: #fff; color: #0b6f66; }
.cta img { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 20px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); }

/* Footer */
.site-footer { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer nav a { color: var(--text-2); }
.site-footer .disclaimer { flex-basis: 100%; max-width: 60em; }

/* Legal pages */
.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-family: var(--font-display); font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.03em; margin: 0 0 6px; }
.legal .updated { color: var(--text-3); margin: 0 0 32px; }
.legal h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -0.02em; }
.legal h3 { font-size: 18px; margin: 24px 0 6px; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal strong { color: var(--text); }
.summary { background: var(--surface); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); margin-bottom: 8px; }
.summary h2 { margin-top: 0; font-size: 20px; }
.summary ul { margin: 0; }
.callout { border-left: 4px solid var(--symptom); background: var(--surface); padding: 16px 20px; border-radius: 0 14px 14px 0; margin: 20px 0; }
.callout p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pill .dot { animation: none; }
}
