/* ============================================================================
   Comeback — the website.

   Show the app, don't describe it. Every section is one phone and one short
   sentence; an earlier version was paragraphs of prose and read like a document.

   The phones are real interface, rebuilt in HTML with the app's own tokens from
   mobile/src/theme/tokens.ts — not screenshots, so they stay sharp at any size and
   adapt to light and dark like the app does.

   No fonts, no scripts, no third-party requests. That's partly speed and partly
   the point: a health app's site that phones home to five ad networks has already
   lost the argument.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --ground: #ffffff;
  --raise: #f7faf9;
  --card: #ffffff;
  --card-2: #f6f8f7;

  --ink: #101d1b;
  --ink-2: #4a5a57;
  --muted: #6e807c;
  --on-wash: #33403d;
  --on-accent: #ffffff;

  --line: #e2e9e7;
  --dash: #c3d0cd;
  --idle: #dbe3e1;

  --teal: #1f7a6b;
  --teal-deep: #12564b;
  --teal-soft: #e6f2ef;
  --teal-ink: #12564b;
  --teal-edge: #bfded6;

  --data: #118f78;
  --data-fill: rgba(17, 143, 120, 0.12);

  --warn: #a86a10;
  --warn-soft: #fbf1e0;
  --warn-ink: #a86a10;
  --crit: #8f2416;
  --crit-soft: #fbeae8;

  --frame: #0d1214;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue",
    Arial, sans-serif;

  --wrap: 1120px;
  --shadow: 0 30px 70px -34px rgba(6, 44, 37, 0.34);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0a0e0f;
    --raise: #0f1516;
    --card: #141b1c;
    --card-2: #1b2325;

    --ink: #e6ecea;
    --ink-2: #b3c2be;
    --muted: #839792;
    --on-wash: #cfdcd8;
    --on-accent: #04120f;

    --line: #26302f;
    --dash: #33403e;
    --idle: #2b3634;

    --teal: #2aa891;
    --teal-deep: #7fd6c0;
    --teal-soft: #122a26;
    --teal-ink: #7fd6c0;
    --teal-edge: #25473f;

    --data: #1b9e86;
    --data-fill: rgba(27, 158, 134, 0.19);

    --warn: #c0842a;
    --warn-soft: #2a2214;
    --warn-ink: #e3ad50;
    --crit: #d4564c;
    --crit-soft: #2b1715;

    --frame: #000000;
    --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

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

h1, h2, h3 { font-family: var(--serif); font-weight: normal; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.06; margin: 0 0 20px; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); line-height: 1.14; margin: 0 0 16px; }
h3 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 6px; font-family: var(--sans); font-weight: 650; letter-spacing: 0; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 650; color: var(--ink); }
a { color: var(--teal-deep); }

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 14px;
}
.lede { font-size: clamp(1.08rem, 1.9vw, 1.3rem); line-height: 1.6; color: var(--ink-2); }
.tiny { font-size: 0.8rem; color: var(--muted); line-height: 1.55; }

/* ------------------------------------------------------------------- header */

header.site {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
header.site .bar {
  max-width: var(--wrap); margin: 0 auto; padding: 11px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.brand .name { font-family: var(--serif); font-size: 1.24rem; color: var(--teal-deep); line-height: 1.05; }
.brand .sub {
  display: block; font-size: 0.56rem; letter-spacing: 0.17em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin-top: 2px;
}
header.site nav { margin-left: auto; display: flex; gap: 20px; align-items: center; }
header.site nav a { text-decoration: none; color: var(--ink-2); font-size: 0.92rem; }
header.site nav a:hover { color: var(--teal-deep); }
@media (max-width: 700px) { .hide-sm { display: none; } }

/* --------------------------------------------------------------------- hero */

.hero {
  padding: clamp(40px, 7vw, 84px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(1100px 520px at 15% -10%, var(--teal-soft), transparent 70%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(30px, 5vw, 60px); align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .art { order: -1; }
}

.status {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink-2); border-radius: 100px; padding: 6px 14px;
  font-size: 0.8rem; font-weight: 600; margin-bottom: 22px;
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex: none; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }
.btn {
  display: inline-block; padding: 15px 26px; border-radius: 13px;
  background: var(--teal); color: var(--on-accent); text-decoration: none;
  font-weight: 650; font-size: 1rem; border: 1px solid var(--teal);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--dash); filter: none; }

/* -------------------------------------------------------------- feature rows */

section { padding: clamp(48px, 8vw, 96px) 0; }
section.tint { background: var(--raise); border-block: 1px solid var(--line); }

.row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 76px); align-items: center;
}
.row + .row { margin-top: clamp(56px, 9vw, 110px); }
@media (max-width: 900px) {
  .row { grid-template-columns: 1fr; gap: 34px; }
  .row .art { order: -1; }
}
@media (min-width: 901px) { .row.flip .art { order: 2; } }

.row .copy { max-width: 460px; }
.row .copy p { color: var(--ink-2); }
.row .copy .big { font-size: 1.06rem; color: var(--ink-2); }

.points { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 11px; }
.points li {
  display: grid; grid-template-columns: 20px 1fr; gap: 11px;
  font-size: 0.95rem; color: var(--ink-2); align-items: start;
}
.points .tick { color: var(--teal); font-weight: 700; line-height: 1.5; }

.section-head { max-width: 620px; margin: 0 auto clamp(34px, 5vw, 56px); text-align: center; }
.section-head .eyebrow { color: var(--teal); }

/* --------------------------------------------------------------- phone frame */

.art { display: flex; justify-content: center; }

.phone {
  width: clamp(268px, 30vw, 320px);
  background: var(--card);
  border-radius: 40px;
  padding: 9px;
  box-shadow: var(--shadow), 0 0 0 9px var(--frame);
  position: relative;
}
.phone-screen {
  background: var(--card);
  border-radius: 32px;
  overflow: hidden;
  display: grid;
  gap: 9px;
  padding: 14px 13px 16px;
  font-size: 13px;
  line-height: 1.5;
}
.phone::before {
  content: "";
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 74px; height: 5px; border-radius: 3px;
  background: var(--frame); opacity: 0.85; z-index: 2;
}
.phone-screen > * { position: relative; }
.phone-screen .pad-top { height: 12px; }

.caption { font-size: 0.76rem; color: var(--muted); text-align: center; margin: 16px 0 0; }

/* ------------------------------------------------------- app UI, rebuilt small */

.a-eyebrow {
  font-size: 8.5px; letter-spacing: 0.13em; text-transform: uppercase;
  font-weight: 700; color: var(--muted);
}
.a-h1 { font-family: var(--serif); font-size: 21px; line-height: 1.1; margin: 3px 0 0; color: var(--ink); }
.a-sub { font-size: 10.5px; color: var(--ink-2); margin: 4px 0 0; }

.a-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: var(--card);
}
.a-wash { background: var(--teal-soft); border: none; border-radius: 12px; padding: 12px; }
.a-wash .t { font-family: var(--serif); font-size: 15px; color: var(--teal-ink); margin: 0 0 4px; }
.a-wash .s { font-size: 10px; color: var(--on-wash); margin: 0 0 10px; line-height: 1.5; }

.a-btn {
  background: var(--teal); color: var(--on-accent); border-radius: 9px;
  padding: 9px; text-align: center; font-size: 11.5px; font-weight: 650;
}

.a-label {
  font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px;
}
.a-label .chev { margin-left: auto; color: var(--muted); font-size: 12px; }

.a-big { font-family: var(--serif); font-size: 22px; color: var(--teal-ink); line-height: 1; }
.a-big small { display: block; font-family: var(--sans); font-size: 9.5px; font-weight: 600; color: var(--ink-2); margin-top: 3px; }
.a-note { font-size: 10px; color: var(--ink-2); line-height: 1.5; margin: 8px 0 0; }

.a-dots { display: flex; align-items: center; gap: 5px; }
.a-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); display: block; }
.a-dots i.off { background: transparent; box-shadow: inset 0 0 0 1px var(--teal-edge); }
.a-dots i.today { background: transparent; box-shadow: inset 0 0 0 2px var(--teal); }
.a-dots span { font-size: 9px; color: var(--on-wash); margin-left: 4px; }

.a-warn {
  border-left: 3px solid var(--warn); background: var(--warn-soft);
  border-radius: 0 10px 10px 0; padding: 10px 11px;
}
.a-warn .t { font-size: 10.5px; font-weight: 700; color: var(--warn-ink); margin-bottom: 3px; }
.a-warn p { font-size: 9.5px; line-height: 1.5; color: var(--on-wash); margin: 0; }

.a-band {
  font-size: 8px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 100px; background: var(--teal-soft); color: var(--teal-ink);
  white-space: nowrap; flex: none;
}
.a-band.watch { background: var(--warn-soft); color: var(--warn-ink); }
.a-band.crit { background: var(--crit-soft); color: var(--crit); }

.a-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: var(--card);
}
.a-item.crit { border-color: var(--crit); background: var(--crit-soft); }
.a-item .top { display: flex; align-items: center; gap: 7px; }
.a-item .name { font-size: 11px; font-weight: 650; flex: 1; color: var(--ink); }
.a-item .lead { font-size: 9.5px; color: var(--ink-2); margin: 4px 0 0; line-height: 1.45; }

.a-search {
  border: 1px solid var(--line); background: var(--card-2); border-radius: 9px;
  padding: 8px 10px; font-size: 10.5px; color: var(--muted);
}

.a-entry { border: 1px solid var(--line); border-radius: 12px; padding: 11px; }
.a-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.a-tag {
  font-size: 8px; border-radius: 100px; padding: 3px 7px;
  background: var(--card-2); color: var(--ink-2); font-weight: 600;
}
.a-tag.teal { background: var(--teal-soft); color: var(--teal-ink); }
.a-entry .text { font-size: 10.5px; line-height: 1.6; color: var(--ink); margin: 0; }
.a-now {
  display: flex; align-items: center; gap: 7px; margin-top: 10px;
  padding-top: 9px; border-top: 1px solid var(--line);
}
.a-avatar {
  width: 20px; height: 20px; border-radius: 50%; background: var(--card-2);
  border: 1px solid var(--line); font-size: 8px; color: var(--muted);
  display: grid; place-items: center; flex: none;
}
.a-now .txt { font-size: 9px; color: var(--ink-2); line-height: 1.4; }
.a-now .txt b { color: var(--ink); }

.a-scale { display: flex; gap: 4px; }
.a-scale div {
  flex: 1; border: 1px solid var(--line); background: var(--card-2); border-radius: 7px;
  padding: 7px 2px 5px; text-align: center; font-size: 7.5px; color: var(--ink-2);
}
.a-scale div .g { display: block; font-size: 12px; line-height: 1; margin-bottom: 3px; }
.a-scale div.on { background: var(--teal-soft); border-color: var(--teal-edge); color: var(--teal-ink); font-weight: 700; }
.a-q { font-size: 11px; font-weight: 650; margin: 0 0 6px; color: var(--ink); }

.a-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.a-chip {
  border: 1px solid var(--line); background: var(--card-2); border-radius: 100px;
  padding: 5px 9px; font-size: 9px; color: var(--ink-2);
}
.a-chip.on { background: var(--teal); border-color: var(--teal); color: var(--on-accent); font-weight: 650; }

.a-tick {
  display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line);
}
.a-tick:last-child { border-bottom: none; }
.a-tick .box {
  width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--dash);
  flex: none; margin-top: 1px;
}
.a-tick .box.on { background: var(--teal); border-color: var(--teal); color: var(--on-accent); font-size: 9px; display: grid; place-items: center; }
.a-tick b { display: block; font-size: 10px; color: var(--ink); font-weight: 650; }
.a-tick span { display: block; font-size: 9px; color: var(--ink-2); margin-top: 2px; line-height: 1.45; }

.a-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.a-pane { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.a-pane .img { height: 74px; background: var(--card-2); display: grid; place-items: center; }
.a-pane .cap { font-size: 8.5px; text-align: center; padding: 4px; border-top: 1px solid var(--line); color: var(--ink-2); }
.a-pane .cap b { display: block; color: var(--ink); font-size: 9.5px; }
.a-crow { display: flex; align-items: baseline; gap: 6px; font-size: 9.5px; padding: 3px 0; }
.a-crow .k { flex: 1; color: var(--ink-2); }
.a-crow .v { font-weight: 650; color: var(--ink); }
.a-crow .arrow { color: var(--muted); font-size: 8px; }

.a-lock {
  display: inline-flex; align-items: center; gap: 5px; background: var(--teal-soft);
  color: var(--teal-ink); border-radius: 100px; padding: 4px 9px; font-size: 9px;
}

.a-nav {
  display: flex; border-top: 1px solid var(--line); margin: 4px -13px -16px;
  padding: 7px 0 9px;
}
.a-nav div { flex: 1; text-align: center; color: var(--muted); font-size: 7.5px; }
.a-nav div .ic { display: block; font-size: 12px; margin-bottom: 2px; }
.a-nav div.on { color: var(--teal); font-weight: 700; }

/* ------------------------------------------------------------- "won't do" strip */

.wont { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.wont div {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px;
}
.wont .x { color: var(--crit); font-weight: 700; font-size: 1rem; }
.wont b { display: block; margin: 8px 0 5px; font-size: 1rem; color: var(--ink); }
.wont p { font-size: 0.9rem; color: var(--ink-2); margin: 0; }

/* ------------------------------------------------------------------- closing */

.promise {
  background: var(--teal-soft); border: 1px solid var(--teal-edge);
  border-radius: 20px; padding: clamp(28px, 5vw, 48px); text-align: center;
}
.promise h2 { color: var(--teal-ink); }
.promise .lede { color: var(--on-wash); max-width: 560px; margin: 0 auto; }
.promise .cta-row { justify-content: center; }

footer.site {
  border-top: 1px solid var(--line); padding: 40px 0 56px;
  color: var(--muted); font-size: 0.85rem;
}
footer.site .cols { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
footer.site a { color: var(--ink-2); text-decoration: none; }
footer.site a:hover { color: var(--teal-deep); text-decoration: underline; }
footer.site .disclaim {
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
  line-height: 1.6; max-width: 760px;
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 12px; top: 12px; z-index: 50; background: var(--teal); color: var(--on-accent);
  padding: 10px 16px; border-radius: 10px;
}
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

/* A single, gentle entrance. Nothing that moves while you're reading. */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero .copy > *, .hero .art { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) backwards; }
.hero .copy > *:nth-child(1) { animation-delay: 0.02s; }
.hero .copy > *:nth-child(2) { animation-delay: 0.08s; }
.hero .copy > *:nth-child(3) { animation-delay: 0.14s; }
.hero .copy > *:nth-child(4) { animation-delay: 0.2s; }
.hero .art { animation-delay: 0.1s; }

/* --------------------------------------------------- prose pages (privacy) */

.prose { max-width: 660px; }
.prose h2 { margin-top: 44px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-2); }
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px; margin: 0 0 18px;
}
.panel .h { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.panel .h b { font-size: 1rem; color: var(--ink); }
.panel p { font-size: 0.9rem; margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pill {
  font-size: 0.76rem; border: 1px solid var(--line); border-radius: 100px;
  padding: 4px 10px; color: var(--ink-2); background: var(--card-2);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
