/* WeightIQ public site. System fonts only: the site makes no third-party requests. */
/* Sunrise colours. Light is the default; dark follows the system unless the visitor picked a mode with the toggle
   (theme.js sets data-mode="light" or "dark" on <html>). */
:root {
  --lime: #C6F000;
  --lime-ink: #1B2400;
  --bg: #FFF7EC;
  --surface: #FFFFFF;
  --text: #2B2118;
  --muted: #7A6552;
  --border: #F0E0CB;
  --link: #5B6E00;
  --hero-bg: linear-gradient(160deg, #FFE7C2 0%, #F4F7C8 60%, #FFF7EC 100%);
  --band-bg: #FBEBD3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --bg: #2A2420;
    --surface: #373029;
    --text: #FBF1E4;
    --muted: #CDB9A2;
    --border: #4B4036;
    --link: #C6F000;
    --hero-bg: linear-gradient(160deg, #4A3A22 0%, #2F3A22 60%, #2A2420 100%);
    --band-bg: #322B25;
  }
}
:root[data-mode="dark"] {
  --bg: #2A2420;
  --surface: #373029;
  --text: #FBF1E4;
  --muted: #CDB9A2;
  --border: #4B4036;
  --link: #C6F000;
  --hero-bg: linear-gradient(160deg, #4A3A22 0%, #2F3A22 60%, #2A2420 100%);
  --band-bg: #322B25;
}
/* App screenshots: both images are in the page, CSS shows the one that matches the mode. */
.shot-light { display: block; }
.shot-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) .shot-light { display: none; }
  :root:not([data-mode="light"]) .shot-dark { display: block; }
}
:root[data-mode="dark"] .shot-light { display: none; }
:root[data-mode="dark"] .shot-dark { display: block; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}
a { color: var(--link); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }

header.hero { text-align: center; padding: 40px 20px 36px; background: var(--hero-bg); }
header.hero .brand { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
header.hero .brand span { background: var(--lime); color: var(--lime-ink); border-radius: 10px; padding: 0 10px; }
header.hero .tagline { color: var(--muted); font-size: 1.2rem; max-width: 560px; margin: 14px auto 0; }

.cta {
  display: inline-block; margin-top: 24px; padding: 14px 28px; border-radius: 999px;
  background: var(--lime); color: var(--lime-ink); font-weight: 800; text-decoration: none;
}
.cta.secondary { background: transparent; color: var(--text); border: 2px solid var(--border); }
.cta-note { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }

section { padding: 28px 0; }
h2 { font-size: 1.5rem; margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; margin: 22px 0 6px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; }
.card h3 { margin: 0 0 6px; }
.card p { margin: 0; color: var(--muted); }


.doc { padding: 36px 0 24px; }
.doc h1 { font-size: 2rem; margin: 0 0 4px; letter-spacing: -0.02em; }
.doc .updated { color: var(--muted); margin-bottom: 20px; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 4px 0; }

footer { border-top: 1px solid var(--border); margin-top: 32px; padding: 22px 20px 40px; text-align: center; color: var(--muted); font-size: 0.9rem; }
footer a { margin: 0 8px; }
nav.top { padding: 16px 20px; }
nav.top a { font-weight: 800; text-decoration: none; color: var(--text); }

.center { text-align: center; }

.soon { display: inline-block; margin-left: .4em; padding: .1em .55em; border: 1px solid currentColor; border-radius: 999px; font-size: .6em; font-weight: 600; letter-spacing: .02em; vertical-align: middle; opacity: .8; }

/* Free vs Pro comparison table */
.table-scroll { overflow-x: auto; margin: 18px 0; }
table.compare { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
table.compare th, table.compare td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.compare thead th { background: var(--surface); position: sticky; top: 0; font-size: 1rem; }
table.compare thead th:not(:first-child), table.compare td { width: 76px; text-align: center; padding-left: 6px; padding-right: 6px; }
@media (min-width: 640px) { table.compare thead th:not(:first-child), table.compare td { width: 22%; } }
table.compare tbody th[scope="row"] { font-weight: 500; }
table.compare tr.group th { background: var(--bg); color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
table.compare td.yes { font-weight: 700; color: var(--link); }
table.compare td.no { color: var(--muted); }

/* Science and safety pages */
.doc .toc { font-size: .95rem; color: var(--muted); }
.doc .toc a { margin-right: .35em; }
.doc .small { font-size: .88rem; color: var(--muted); }
.doc .callout { background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--lime); border-radius: 12px; padding: 14px 16px; }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); }
table.data th, table.data td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.data thead th { font-size: .9rem; color: var(--muted); }
table.data tbody th { font-weight: 500; }
.doc code { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
ol.refs { padding-left: 1.4rem; font-size: .9rem; }
ol.refs li { margin: 8px 0; word-break: break-word; }

/* Home page: download first */
.hero-inner { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.hero-copy { text-align: center; }
header.hero .tagline { font-size: 1.5rem; font-weight: 700; color: var(--text); margin: 10px auto 0; }
header.hero .pitch { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin: 10px auto 0; }
.hero-shot { justify-self: center; width: min(62vw, 260px); }
.hero-shot img { width: 100%; height: auto; border-radius: 26px; border: 1px solid var(--border); box-shadow: 0 18px 40px rgba(20, 30, 50, .18); }
.get { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; max-width: 480px; }
.hero-copy .get { margin-left: auto; margin-right: auto; }
.store { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 4px; aspect-ratio: 1 / 1; width: 100%; min-width: 0; min-height: 0; overflow: hidden; box-sizing: border-box; padding: 8px; border-radius: 18px; text-decoration: none; border: 2px solid var(--border); background: var(--surface); color: var(--text); }
.store-os { font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; line-height: 1.2; }
.store-act { font-size: .95rem; font-weight: 800; line-height: 1.2; }
.store.primary { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); box-shadow: 0 8px 20px rgba(150, 190, 0, .35); }
.store.primary .store-os { color: var(--lime-ink); opacity: .75; }
.store.primary:hover { filter: brightness(.96); }
.store.live { border-color: var(--lime); border-width: 3px; }
.store.live:hover { filter: brightness(.97); }
.store.soon { opacity: .75; border-style: dashed; cursor: default; }
header.hero .cta-note { max-width: 520px; margin: 14px auto 0; }
.shots-band { background: var(--band-bg); padding: 36px 0 28px; overflow: hidden; }
.why { padding-top: 32px; }
.features.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cta-bottom { background: var(--band-bg); border-radius: 24px; padding: 32px 20px; margin-top: 12px; }
@media (min-width: 820px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; }
  .hero-copy { text-align: left; }
  header.hero .pitch, header.hero .cta-note { margin-left: 0; }
  .hero-copy .get { margin-left: 0; margin-right: 0; }
  .hero-shot { width: 280px; }
}

/* Light / dark toggle */
.mode-toggle { position: fixed; top: 12px; right: 12px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(20, 30, 50, .12); }
.mode-toggle:hover { border-color: var(--lime); }
.mode-toggle:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

/* Screenshot carousel: the centred phone is large, its neighbours smaller and faded (carousel.js sets --d, 0 = centred, 1 = away). */
.carousel { --w: min(66vw, 270px); position: relative; max-width: 1100px; margin: 0 auto; }
.car-track { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; padding: 18px calc(50% - var(--w) / 2) 26px; outline: none; }
.car-track::-webkit-scrollbar { display: none; }
.car-track figure { margin: 0; flex: 0 0 var(--w); scroll-snap-align: center; transform: scale(calc(1 - var(--d, 0) * .2)); opacity: calc(1 - var(--d, 0) * .55); transition: transform .2s ease-out, opacity .2s ease-out; }
.car-track img { width: 100%; height: auto; border-radius: 26px; border: 1px solid var(--border); box-shadow: 0 16px 36px rgba(40, 25, 10, .22); }
.car-track figcaption { text-align: center; margin-top: 12px; font-weight: 700; color: var(--text); opacity: calc(1 - var(--d, 0)); }
.car-btn { position: absolute; top: 42%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.8rem; line-height: 1; cursor: pointer; box-shadow: 0 6px 16px rgba(20, 30, 50, .18); display: flex; align-items: center; justify-content: center; padding: 0 0 4px; }
.car-btn[hidden] { display: none; }
.car-btn:hover { border-color: var(--lime); }
.car-btn:focus-visible, .car-dot:focus-visible, .car-track:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.car-btn.prev { left: 10px; }
.car-btn.next { right: 10px; }
.car-dots { display: flex; justify-content: center; gap: 8px; }
.car-dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: var(--border); cursor: pointer; transition: width .2s, background .2s; }
.car-dot[aria-current="true"] { width: 26px; border-radius: 6px; background: var(--lime); }
@media (min-width: 820px) { .carousel { --w: 300px; } }
/* Touch screens swipe: no arrows over the neighbouring phones, and bigger dots to tap. */
@media (hover: none) and (pointer: coarse) { .car-btn { display: none; } .car-dots { gap: 4px; } .car-dot { box-sizing: content-box; width: 10px; height: 10px; border: 7px solid transparent; background-clip: padding-box; } .car-dot, .car-dot[aria-current="true"] { border-radius: 999px; } .car-dot[aria-current="true"] { width: 26px; background-clip: padding-box; } }
@media (prefers-reduced-motion: reduce) { .car-track { scroll-behavior: auto; } .car-track figure, .car-dot { transition: none; } }
