/* FitsPal website. Tokens mirror tailwind.config.js so the site matches the app. */
:root {
  --ink: #20252b;
  --body: #3a4048;
  --muted: #6a7078;
  --faint: #858b93;
  --line: #e9ecef;
  --subtle: #f7f9fa;
  --bg: #ffffff;
  --card: #ffffff;
  --primary: #10b981;
  --primary-dark: #0e9f6e;
  --primary-soft: #e8f8f2;
  --protein: #e5533d;
  --protein-soft: #fdecea;
  --carbs: #e8960c;
  --carbs-soft: #fef4de;
  --fat: #3d7ff0;
  --fat-soft: #e8f0fe;
  --warning: #b54708;
  --ph-bg: #fff3c4;
  --radius: 16px;
  --max: 1080px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration-color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; color: #fff; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand span { font-weight: 700; font-size: 18px; letter-spacing: -0.45px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px;
  padding: 8px 12px; border-radius: 999px;
}
.nav-links a:hover { color: var(--ink); background: var(--subtle); }
.nav-links a[aria-current="page"] { color: var(--primary-dark); background: var(--primary-soft); }
.nav-links a.nav-cta { background: var(--primary); color: #fff; margin-left: 8px; padding: 8px 16px; }
.nav-links a.nav-cta:hover { background: var(--primary-dark); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  background: var(--primary); color: #fff; border: 0;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn.secondary { background: var(--subtle); color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--line); color: var(--ink); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Store button: "Coming soon" until the Play listing is live. */
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 22px 8px 18px; border-radius: 14px;
  background: var(--ink); color: #fff; text-decoration: none;
}
.store:hover { background: #000; color: #fff; }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 11px; line-height: 1.2; opacity: 0.8; letter-spacing: 0.2px; }
.store b { display: block; font-size: 18px; line-height: 1.2; font-weight: 600; letter-spacing: -0.2px; }
.store[aria-disabled="true"] { cursor: default; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Landing: hero ---------- */
.hero { padding: 72px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-dark);
  font-size: 13px; font-weight: 600;
}
.hero h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.05; letter-spacing: -1.8px; margin: 16px 0 18px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.note { font-size: 14px; color: var(--faint); margin: 14px 0 0; }

/* Phone frames around real app screenshots (720x1488). */
.device {
  position: relative; background: #16191d; border-radius: 44px; padding: 9px;
  box-shadow: 0 30px 70px rgba(32, 37, 43, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.device img { width: 100%; height: auto; aspect-ratio: 720 / 1488; border-radius: 35px; object-fit: cover; }

/* Hero: the camera, then the result. */
.duo { position: relative; width: 100%; max-width: 560px; aspect-ratio: 560 / 620; justify-self: center; }
.duo .device { position: absolute; width: 44%; }
.duo-scan { left: 3%; top: 10%; transform: rotate(-4deg); }
.duo-result { right: 3%; top: 2%; transform: rotate(4deg); z-index: 1; }
.squiggle { position: absolute; left: 40%; top: 44%; width: 20%; color: var(--ink); z-index: 2; }
.tag {
  position: absolute; z-index: 3; background: #fff; border-radius: 14px; padding: 7px 13px;
  box-shadow: 0 10px 28px rgba(32, 37, 43, 0.16); font-size: 13px; line-height: 1.3; text-align: center; color: var(--muted);
}
.tag b { display: block; color: var(--ink); font-size: 14px; }
.tag-1 { right: 24%; top: 1%; }
.tag-2 { right: 0; top: 12%; }
.tag-3 { right: 30%; top: 16%; }
@media (max-width: 520px) {
  .tag { padding: 5px 10px; font-size: 11px; border-radius: 11px; }
  .tag b { font-size: 12px; }
}

/* What's inside: a phone and the feature list that drives it. */
.show { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; }
.show-phone { justify-self: center; width: 100%; max-width: 300px; }
.show-phone .device { display: grid; }
.show-phone .device img { grid-area: 1 / 1; opacity: 0; transition: opacity 0.35s ease; }
.show-phone .device img.active { opacity: 1; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots i.active { background: var(--ink); }
.show-list { display: grid; gap: 14px; }
.show-list button {
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.show-list button:hover { border-color: #cfd5da; }
.show-list button.active { border-color: var(--ink); background: var(--subtle); box-shadow: 0 6px 20px rgba(32, 37, 43, 0.06); }
.show-list h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.2px; }
.show-list p { margin: 0; color: var(--muted); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .show-phone .device img { transition: none; } }

/* ---------- Sections ---------- */
.section { padding: 72px 0; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.section.tint { background: var(--subtle); }
.section h2 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.9px; line-height: 1.15; margin: 0 0 10px; }
.section .intro { color: var(--muted); margin: 0 0 36px; max-width: 620px; font-size: 17px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { background: var(--subtle); border-radius: var(--radius); padding: 24px; }
.section.tint .step { background: #fff; border: 1px solid var(--line); }
.step .num {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 700; margin-bottom: 14px; font-size: 15px;
}
.step h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.2px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--primary-soft); color: var(--primary-dark);
}
.feature .icon svg { width: 22px; height: 22px; }
.feature .icon.orange { background: var(--carbs-soft); color: var(--carbs); }
.feature .icon.blue { background: var(--fat-soft); color: var(--fat); }
.feature .icon.red { background: var(--protein-soft); color: var(--protein); }
.feature h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -0.2px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* Free vs Pro */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 860px; }
.plan { border: 1px solid var(--line); border-radius: 20px; padding: 28px; background: #fff; }
.plan.pro { border: 2px solid var(--primary); position: relative; }
.plan .tag {
  position: absolute; top: -13px; left: 24px; background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.3px;
}
.plan h3 { margin: 0; font-size: 22px; letter-spacing: -0.4px; }
.plan .sub { margin: 2px 0 18px; color: var(--muted); font-size: 15px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; font-size: 15px; color: var(--body); }
.plan li svg { width: 20px; height: 20px; flex: none; color: var(--primary); margin-top: 2px; }
.fine { font-size: 14px; color: var(--faint); margin: 18px 0 0; max-width: 860px; }

/* Privacy promise */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.promise div h3 { margin: 0 0 4px; font-size: 17px; }
.promise div p { margin: 0; color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform 0.15s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0 0 18px; color: var(--body); }

.download { text-align: center; }
.download .wrap { display: flex; flex-direction: column; align-items: center; }
.download .intro { margin-left: auto; margin-right: auto; }

.callout {
  background: var(--primary-soft); border-radius: var(--radius); padding: 20px 24px;
  color: var(--ink); font-size: 15px;
}

/* ---------- Documents (privacy, terms, support, deletion) ---------- */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -1px; line-height: 1.15; margin: 0 0 8px; }
.doc .meta { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.doc h2 {
  font-size: 21px; letter-spacing: -0.3px; margin: 40px 0 8px;
  padding-top: 8px; scroll-margin-top: 80px;
}
.doc h3 { font-size: 16px; margin: 22px 0 4px; }
.doc p, .doc li, .doc td { color: var(--body); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { font-size: 13px; color: var(--muted); font-weight: 600; background: var(--subtle); }
.table-scroll { overflow-x: auto; }
.toc { background: var(--subtle); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 8px; }
.toc strong { display: block; margin-bottom: 8px; font-size: 14px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; font-size: 14px; }
.toc li { margin: 2px 0; break-inside: avoid; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--primary-dark); }
.important {
  border-left: 4px solid var(--primary); background: var(--primary-soft);
  border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 16px 0;
}
.important.warn { border-color: var(--carbs); background: var(--carbs-soft); }
.important p { margin: 0; }
.important p + p { margin-top: 8px; }
.caps { text-transform: uppercase; font-size: 14px; letter-spacing: 0.1px; }
/* Unconfirmed values. Remove the class once filled in. */
.ph { background: var(--ph-bg); color: var(--warning); border-radius: 4px; padding: 0 4px; font-weight: 500; }

.numbered { counter-reset: n; list-style: none; padding: 0 !important; }
.numbered li { counter-increment: n; position: relative; padding-left: 44px; margin: 14px 0; }
.numbered li::before {
  content: counter(n); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: 14px;
}
.contact-card {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 20px 0;
}
.contact-card p { margin: 0; }
.contact-card b { display: block; color: var(--ink); }

.empty { text-align: center; padding: 96px 0; }
.empty .icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px;
  display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-size: 28px; font-weight: 700;
}
.empty p { color: var(--muted); max-width: 420px; margin: 8px auto 24px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--subtle); padding: 36px 0; font-size: 14px; color: var(--muted); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- Small screens ---------- */
@media (max-width: 880px) {
  .hero { padding: 40px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .steps, .features, .promise { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; gap: 28px; }
  .show { grid-template-columns: 1fr; gap: 32px; }
  .show-phone { max-width: 260px; }
  .toc ol { columns: 1; }
  .section { padding: 56px 0; }
}
@media (max-width: 640px) {
  .nav-links a.hide-sm { display: none; }
}
@media (max-width: 420px) {
  .nav-links a { padding: 8px 10px; font-size: 14px; }
  .cta .btn, .cta .store { width: 100%; justify-content: center; }
}
