/* Rheostat — shared styles.
   Palette lifted directly from the app (DashboardView.swift) so the site and the
   product read as one thing rather than two. */

:root {
  --bg: #121217;          /* hwBackground   */
  --card: #1F1F24;        /* hwCardBackground */
  --border: #333333;      /* hwCardBorder   */
  --text: #FFFFFF;        /* hwTextPrimary  */
  --text-dim: #999999;    /* hwTextSecondary */
  --green: #00D98C;       /* hwGreen  */
  --yellow: #FFBF00;      /* hwYellow */
  --red: #F2404D;         /* hwRed    */
  --hrv: #00B3E6;
  --sleep: #9966E6;
  --rhr: #00CC99;
  --maxw: 720px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- header / nav ---- */
header {
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: rgba(18,18,23,0.92);
  backdrop-filter: saturate(160%) blur(12px);
  z-index: 10;
}
header .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand {
  font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none; margin-right: auto;
}
.brand span { color: var(--green); }
nav a {
  color: var(--text-dim); text-decoration: none; font-size: 15px;
}
nav a:hover, nav a:focus { color: var(--text); }
nav { display: flex; gap: 18px; }

/* ---- type ---- */
h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 40px 0 12px; }
h2 { font-size: 22px; letter-spacing: -0.01em; margin: 40px 0 10px; scroll-margin-top: 76px; }
h3 { font-size: 17px; margin: 26px 0 6px; scroll-margin-top: 76px; }
p, li { color: #D6D6DA; }
.lead { font-size: 18px; color: var(--text-dim); margin-bottom: 28px; }
a { color: var(--green); }
small, .meta { color: var(--text-dim); font-size: 14px; }
ul { padding-left: 20px; }
li { margin: 6px 0; }
code {
  background: var(--card); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 5px; font-size: 0.9em;
}

/* ---- cards / callouts ---- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; margin: 20px 0;
}
.card h3 { margin-top: 0; }
.note {
  border-left: 3px solid var(--yellow);
  background: rgba(255,191,0,0.07);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px; margin: 22px 0;
}
.note strong { color: var(--yellow); }
.note.privacy { border-left-color: var(--green); background: rgba(0,217,140,0.07); }
.note.privacy strong { color: var(--green); }

/* ---- scale table ---- */
.scale { list-style: none; padding: 0; margin: 16px 0; }
.scale li {
  display: flex; gap: 12px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.scale li:last-child { border-bottom: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; transform: translateY(-1px); }
.scale .range { color: var(--text-dim); font-variant-numeric: tabular-nums; margin-left: auto; white-space: nowrap; }

/* ---- table of contents ---- */
.toc { columns: 2; column-gap: 28px; }
.toc a { display: block; padding: 4px 0; text-decoration: none; }
@media (max-width: 560px) { .toc { columns: 1; } }

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--border);
  margin-top: 64px; padding: 28px 0 48px;
  color: var(--text-dim); font-size: 14px;
}
footer a { color: var(--text-dim); }
footer nav { gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }

/* Respect users who ask for less motion; nothing here animates, but be explicit. */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- App Store call to action ---- */
.cta { margin: 26px 0 8px; }
.badge-soon {
  display: inline-block;
  border: 1px solid var(--green);
  color: var(--green);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 15px; font-weight: 600;
}
.cta .meta { margin: 10px 0 0; }
/* Used once the App Store listing is live — see website/README.md. */
.app-store-link { display: inline-block; }
.app-store-link img { height: 54px; width: auto; display: block; }

/* ---- pricing plans ---- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }
.plan { margin: 0; }
.plan .price {
  font-size: 34px; font-weight: 700; color: var(--text);
  margin: 6px 0 4px; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.plan .price span { font-size: 16px; font-weight: 400; color: var(--text-dim); }
.plan .plan-note { color: var(--green); margin: 0 0 6px; }
.plan .meta { margin: 0; }
