/* Heartio · Attune site styles. Depends on tokens.css. Dark only, mobile-first. */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; }

.num { font-variant-numeric: tabular-nums; }

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

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 18, 32, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .18em;
}

.nav-brand svg { display: block; }

.nav-links {
  display: none;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--text-2);
  transition: color .2s;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  margin-left: auto;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  background: var(--coral);
  color: #14060A;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  box-shadow: 0 6px 20px rgba(255, 77, 94, .25);
}

@media (min-width: 720px) {
  .nav-links { display: flex; }
  .nav-cta { margin-left: 0; }
}

/* ---------- sections ---------- */

.section { padding: 72px 0; }

.section + .section { border-top: 1px solid var(--hairline); }

.overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.overline.cyan { color: var(--cyan); }
.overline.amber { color: var(--amber); }
.overline.coral { color: var(--coral); }

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.12; }

.section h2 { font-size: clamp(24px, 4.4vw, 30px); margin-bottom: 14px; }

.lede {
  color: var(--text-2);
  font-size: 15px;
  max-width: 34em;
  margin: 0;
}

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

.hero { padding: 72px 0 64px; text-align: center; position: relative; overflow: hidden; }

.hero::before {
  content: '';
  position: absolute;
  top: -140px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(255, 77, 94, .12) 0%, transparent 65%);
  pointer-events: none;
}

.hero-heart { margin-bottom: 22px; }

.hero-heart svg {
  animation: hbeat 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 22px rgba(255, 77, 94, .55));
}

.hero h1 {
  font-size: clamp(34px, 7.5vw, 58px);
  letter-spacing: -.01em;
  max-width: 13em;
  margin: 0 auto 16px;
}

.hero-sub {
  color: var(--text-2);
  font-size: clamp(15px, 2.6vw, 17px);
  max-width: 30em;
  margin: 0 auto 30px;
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.badge-appstore img, .badge-appstore svg { height: 52px; width: auto; display: block; }

.hero-secondary {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 2px;
  transition: color .2s;
}

.hero-secondary:hover { color: var(--text); }

.hero-note { margin-top: 26px; font-size: 12px; color: var(--muted-2); }

/* ---------- the reveal-gap demo ---------- */

.demo-card {
  position: relative;
  border-radius: var(--r-card);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 77, 94, .7), rgba(255, 77, 94, .12) 55%, rgba(67, 198, 224, .25));
  max-width: 560px;
  margin: 0 auto;
}

.demo-inner {
  border-radius: 19px;
  background: var(--surface-raised);
  padding: 30px 24px 26px;
  text-align: center;
}

.demo-readouts {
  display: flex;
  justify-content: center;
  gap: 44px;
  margin-bottom: 24px;
}

.demo-readout .overline { margin-bottom: 4px; }

.demo-readout .big {
  font-size: clamp(46px, 10vw, 64px);
  font-weight: 700;
  line-height: .95;
  font-variant-numeric: tabular-nums;
}

.demo-readout.truth .big { text-shadow: 0 0 34px var(--coral-glow); color: var(--coral); }

.demo-gap {
  min-height: 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 18px;
}

.demo-gap .tier { letter-spacing: .14em; font-size: 12px; }
.demo-gap .tier.perfect { color: var(--coral); }
.demo-gap .tier.great { color: var(--cyan); }

/* the ruler: minor ticks via gradient, major ticks + needles as elements */
.ruler { position: relative; height: 44px; margin: 0 8px; }

.ruler-ticks {
  position: absolute;
  inset: auto 0 12px;
  height: 12px;
  background: repeating-linear-gradient(90deg, var(--tick-minor) 0 1.5px, transparent 1.5px 10%);
  background-size: 10% 8px;
  background-position: bottom;
  background-repeat: repeat-x;
}

.ruler-tick-major {
  position: absolute;
  bottom: 12px;
  width: 1.5px;
  height: 16px;
  background: var(--tick);
}

.ruler-baseline {
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  height: 1px;
  background: var(--hairline-strong);
}

.needle {
  position: absolute;
  bottom: 6px;
  width: 3px;
  height: 30px;
  border-radius: 2px;
  margin-left: -1.5px;
  transition: left .6s var(--needle-ease);
}

.needle.guess { background: rgba(233, 237, 245, .3); height: 24px; bottom: 9px; width: 2px; }
.needle.truth { background: var(--coral); box-shadow: 0 0 12px rgba(255, 77, 94, .8); }

.gap-band {
  position: absolute;
  bottom: 11px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 77, 94, .15), rgba(255, 77, 94, .55));
  border-radius: 2px;
  transition: left .6s var(--needle-ease), width .6s var(--needle-ease);
}

.ruler-scale {
  display: flex;
  justify-content: space-between;
  padding: 2px 8px 0;
  font-size: 10px;
  font-weight: 500;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* ---------- how it works ---------- */

.steps { display: grid; gap: 16px; margin-top: 36px; }

@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card-sm);
  padding: 22px 20px 24px;
}

.step-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--coral);
  margin-bottom: 12px;
}

.step h3 { font-size: 19px; margin-bottom: 8px; }

.step p { margin: 0 0 18px; color: var(--text-2); font-size: 13px; }

/* little watch frame illustration */
.watch {
  width: 124px;
  margin: 0 auto;
  border-radius: 30px;
  background: #060B15;
  border: 1px solid var(--hairline-strong);
  padding: 10px 8px;
  position: relative;
}

.watch::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 34px;
  width: 4px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: #1B2740;
}

.watch-screen {
  border-radius: 22px;
  background: var(--bg);
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  text-align: center;
}

.watch-screen .wl { font-size: 8px; font-weight: 600; letter-spacing: .2em; color: var(--muted-2); }
.watch-screen .wnum { font-size: 30px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.watch-screen .wnum.dim { font-size: 13px; color: var(--faint); font-weight: 500; }
.watch-screen .wbpm { font-size: 8px; font-weight: 600; letter-spacing: .22em; color: var(--coral); }
.watch-screen .wsub { font-size: 9px; color: var(--muted); }

/* ---------- attune gauge (cyan section) ---------- */

.attune-card {
  background: var(--surface);
  border: 1px solid var(--cyan-border);
  border-radius: var(--r-card);
  padding: 30px 24px;
  max-width: 620px;
}

.attune-score {
  font-size: 76px;
  font-weight: 700;
  line-height: .95;
  color: var(--cyan);
  text-shadow: 0 0 44px var(--cyan-glow);
  font-variant-numeric: tabular-nums;
}

.attune-tier { font-size: 12px; font-weight: 600; letter-spacing: .2em; color: var(--cyan); }

.gauge { position: relative; height: 40px; margin-top: 22px; }

.gauge .needle.attune {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(67, 198, 224, .8);
  bottom: 2px;
}

.gauge .needle.ghost { background: rgba(233, 237, 245, .25); width: 2px; height: 22px; bottom: 7px; }

.gauge-fill {
  position: absolute;
  left: 0;
  bottom: 8px;
  height: 2px;
  background: linear-gradient(90deg, rgba(67, 198, 224, .1), var(--cyan));
  transition: width .6s var(--needle-ease);
}

.gauge-ticks {
  position: absolute;
  inset: auto 0 8px;
  height: 15px;
  background: repeating-linear-gradient(90deg, var(--tick-minor) 0 1.5px, transparent 1.5px 5%);
  background-size: 5% 8px;
  background-position: bottom;
  background-repeat: repeat-x;
}

/* ---------- pricing ---------- */

.plans { display: grid; gap: 16px; max-width: 720px; }

@media (min-width: 640px) { .plans { grid-template-columns: 1fr 1fr; } }

.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-card-sm);
  padding: 24px 22px;
}

.plan.best { border-color: var(--coral-border); background: var(--surface-raised); }

.plan-chip {
  position: absolute;
  top: -11px;
  left: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  color: #14060A;
  background: var(--coral);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}

.plan-name { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }

.plan-price { font-size: 38px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }

.plan-price .per { font-size: 15px; font-weight: 500; color: var(--muted); }

.plan-sub { font-size: 12px; color: var(--text-2); margin-top: 6px; }

.plan-trial { font-size: 12px; color: var(--muted); margin-top: 12px; }

.features { list-style: none; margin: 28px 0 0; padding: 0; max-width: 720px; }

.features li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
}

.features li + li { margin-top: 8px; }

.features .fdot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--coral);
  flex: none;
}

.free-note { font-size: 12px; color: var(--muted); margin-top: 18px; }

/* ---------- FAQ ---------- */

.faq { max-width: 720px; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card-sm);
  margin-top: 10px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
  transition: transform .2s;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq .faq-a { padding: 0 18px 18px; color: var(--text-2); font-size: 13.5px; }

.faq .faq-a p { margin: 0 0 10px; }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--hairline); padding: 40px 0 48px; }

.footer-inner { display: flex; flex-direction: column; gap: 20px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }

.footer-links a {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  transition: color .2s;
}

.footer-links a:hover { color: var(--text); }

.footer-legal { font-size: 12px; color: var(--muted-2); }

/* ---------- article template (story · terms · privacy · delete-account) ---------- */

.article { max-width: 68ch; margin: 0 auto; padding: 64px var(--pad-screen) 80px; }

.article-dek { color: var(--text-2); font-size: 16px; margin: 14px 0 0; }

.article-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.article-rule { border: 0; border-top: 1px solid var(--hairline); margin: 34px 0; }

.article h1 { font-size: clamp(30px, 6vw, 42px); letter-spacing: -.01em; }

.article h2 { font-size: 21px; margin: 40px 0 12px; }

.article h3 { font-size: 16px; margin: 28px 0 8px; }

.article p, .article li { color: var(--text-2); font-size: 15px; }

.article p strong, .article li strong { color: var(--text); }

.article ul, .article ol { padding-left: 22px; }

.article a { color: var(--cyan); border-bottom: 1px solid var(--cyan-border); }

.article .updated { font-size: 12px; color: var(--muted-2); }

.callout {
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-card-sm);
  padding: 18px 20px;
  margin: 26px 0;
}

.callout.amber { border-color: var(--amber-border); }
.callout.coral { border-color: var(--coral-border); }
.callout p { margin: 0; font-size: 13.5px; }

.article-cta {
  text-align: center;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* ---------- utility pages (finishSignIn / delete-account hero) ---------- */

.center-page {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px var(--pad-screen);
}

.center-page h1 { font-size: clamp(26px, 5.5vw, 34px); margin: 22px 0 12px; }

.center-page .lede { margin: 0 auto 30px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 30px;
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  cursor: pointer;
  border: 0;
}

.btn-primary { background: var(--coral); color: #14060A; box-shadow: var(--cta-shadow); }

.btn-quiet { background: transparent; border: 1px solid var(--coral-border); color: var(--coral); font-weight: 600; }

/* ---------- press ---------- */

.press-grid { display: grid; gap: 16px; margin-top: 28px; }

@media (min-width: 720px) { .press-grid { grid-template-columns: 1fr 1fr; } }

.press-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card-sm);
  padding: 22px 20px;
}

.press-card h3 { font-size: 15px; margin: 0 0 10px; }

.press-card p, .press-card li { font-size: 13.5px; color: var(--text-2); }

.fact-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.fact-table td { padding: 9px 0; border-bottom: 1px solid var(--hairline); color: var(--text-2); vertical-align: top; }

.fact-table td:first-child {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  width: 34%;
  padding-right: 14px;
}

/* ---------- misc ---------- */

.disclaimer-line { font-size: 12.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .hero-heart svg { animation: none; }
  .needle, .gap-band, .gauge-fill { transition: none; }
  html { scroll-behavior: auto; }
}
