/* ============================================================
 * breathtime.tech — breathtime ink + accent, dark-locked.
 * Rendered from _template/public by scripts/new-site.sh. Tokens
 * mirror the app manifest (movebook-ios/apps/breathtime/manifest.json,
 * brand.{accent,accent_dark,accent_soft,ink}) — change them there
 * first, then re-render. Do not hand-edit the colors below; run
 * the script again instead.
 * Static on purpose: a challenge link must render instantly on a
 * phone; there is no account, no backend, no JS framework.
 *
 * The long-form article styles (main.doc, .faq, .refs, .callout,
 * .disclaimer, .agerows, .stats, .bench) live HERE, shared across
 * every page, so a family of guide pages doesn't duplicate a
 * per-page <style> block and drift. The .depth-* rules are the
 * squattime-style progress-bar widget, kept as an optional idiom
 * for a hand-written hero — delete them if the creative section
 * doesn't use one.
 * ============================================================ */

@font-face { font-family: 'Space Mono'; font-weight: 400; font-display: swap; src: url('/fonts/SpaceMono-400.woff2') format('woff2'); }
@font-face { font-family: 'Space Mono'; font-weight: 700; font-display: swap; src: url('/fonts/SpaceMono-700.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-display: swap; src: url('/fonts/SpaceGrotesk-600.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('/fonts/SpaceGrotesk-700.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 400; font-display: swap; src: url('/fonts/HankenGrotesk-400.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 600; font-display: swap; src: url('/fonts/HankenGrotesk-600.woff2') format('woff2'); }

:root {
  --bg:     #0b0b0d;   /* family ink, shared across the dark-locked sites */
  --text:   #f3f0ec;   /* family paper */
  --dim:    #9c9a96;
  --faint:  #6a6864;
  --line:   #2b2a28;
  --accent:       #3EA9EE;   /* breathtime accent (dark value) — from manifest brand.accent_dark */
  --accent-press: #7cc5f3;  /* computed: accent_dark lightened, for hover */
  --accent-soft:  #0A1A2F;           /* from manifest brand.ink */
  --accent-glow:  rgba(62, 169, 238, 0.35);
  --mono:    'Space Mono', ui-monospace, monospace;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body:    'Hanken Grotesk', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: dark; }

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(60% 42% at 50% 108%, rgba(62, 169, 238, 0.16), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  text-align: center;
  padding: 28px 24px 40px;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  width: 100%;
  max-width: 520px;
}

/* ── Logo lockup ─────────────────────────────────────────── */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}
.logo .word {
  font-family: var(--display);
  font-weight: 700;
  font-size: 31px;
  letter-spacing: -0.02em;
}
.logo .word em { font-style: normal; color: var(--accent); }
.logo svg { stroke: var(--accent); fill: var(--accent); }

/* ── Hero: optional depth/progress bar beside a dial ────────
 * squattime-style widget: a bar with a lit "zone" and a travelling
 * dot, next to a circular readout. Reuse it if the hand-written
 * hero needs a bar-plus-dial layout; otherwise ignore or delete. */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}

.dial {
  position: relative;
  width: min(272px, 62vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.dial svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.dial .track  { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 6; }
.dial .fill   {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 14px var(--accent-glow));
}
.dial .inner { display: grid; gap: 7px; }
.time {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(44px, 13vw, 58px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.dial-label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.dial-hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  color: var(--faint);
  text-transform: uppercase;
}

.depth {
  position: relative;
  width: 15px;
  height: min(272px, 62vw);
  flex: 0 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  overflow: hidden;
}
.depth-zone {
  position: absolute;
  left: 0; right: 0;
  top: 58%; bottom: 0;
  background: linear-gradient(180deg, rgba(62, 169, 238, 0.30), rgba(62, 169, 238, 0.14));
  border-top: 1.5px solid var(--accent);
}
.depth-tick {
  position: absolute;
  left: 2px; right: 2px;
  top: var(--y);
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
}
.depth-dot {
  position: absolute;
  left: 50%;
  top: var(--y, 8%);
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
}
.depth-cap {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-transform: uppercase;
  line-height: 1.7;
  max-width: 34ch;
}
.depth-cap b { color: var(--accent); font-weight: 700; }

.breathe { animation: breathe 4.2s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.022); }
}

/* ── Type ────────────────────────────────────────────────── */

.kicker {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  text-wrap: balance;
  line-height: 1.6;
}
h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 9vw, 46px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.sub { color: var(--dim); font-size: 16.5px; line-height: 1.55; max-width: 40ch; }

/* ── Buttons ─────────────────────────────────────────────── */

.ctas { display: flex; flex-direction: column; gap: 12px; align-items: center; width: 100%; }
.btn {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-radius: 14px;
  padding: 15px 30px;
  width: min(320px, 100%);
  transition: transform 0.12s ease, background 0.12s ease;
  text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #f5f8ff; }
.btn-primary:hover { background: var(--accent-press); color: #0b0b0d; }
.btn-ghost {
  color: var(--dim);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { color: var(--text); }
/* Pre-launch: the App Store record may exist before the listing does.
   A badge, not a link — a dead App Store URL is worse than no button. */
.btn-soon {
  border: 1px dashed var(--line);
  color: var(--dim);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  border-radius: 14px;
  padding: 15px 30px;
  width: min(320px, 100%);
  display: grid;
  place-items: center;
}
.soon {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.fine {
  font-size: 13px;
  line-height: 1.5;
  color: var(--dim);
  max-width: 380px;
}
.fine a { color: var(--accent); text-decoration: none; }
.fine a:hover { color: var(--accent-press); }

/* ── Feature chips (landing) ─────────────────────────────── */

.feats {
  display: grid;
  gap: 10px;
  width: 100%;
  list-style: none;
  text-align: left;
}
.feats li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.02);
}
.feats .k {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  white-space: nowrap;
  flex: 0 0 88px;
}
.feats .v { color: var(--dim); font-size: 14.5px; line-height: 1.45; }
.feats .v strong { color: var(--text); font-weight: 600; }

/* ── Why / science teaser block (landing) ────────────────── */

.why {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.why-h {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 7vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.08;
}
.why-cards { margin-top: 4px; }
.why-cards .v { font-size: 14px; line-height: 1.5; }
.why-note { max-width: 42ch; }
.why-note a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.why-note a:hover { color: var(--accent-press); }

/* Stat blocks — one per headline research number. Stacked rather than
   n-up: the numbers are large and several across at 520px crush them. */
.stats { display: grid; gap: 12px; width: 100%; }
.stats .stat { padding: 20px 20px 18px; }
.stats .stat-num { font-size: clamp(38px, 12vw, 52px); }
.stats .stat-body { font-size: 14.5px; max-width: 36ch; }
.stat-tag {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.stat-tag span { color: var(--faint); }

.stat {
  width: 100%;
  border: 1px solid var(--accent-soft);
  border-radius: 16px;
  padding: 24px 22px;
  background:
    radial-gradient(80% 120% at 50% -10%, rgba(62, 169, 238, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.02);
}
.stat-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 15vw, 66px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--accent);
  text-shadow: 0 0 26px var(--accent-glow);
}
.stat-body {
  margin-top: 10px;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.5;
  max-width: 34ch;
  margin-inline: auto;
}
.stat-body strong { color: var(--accent-press); font-weight: 600; }
.stat-cite {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.stat-cite em { font-style: italic; color: var(--dim); }

/* Benchmark strip — "how many/long should you be able to do?" */
.bench { width: 100%; }
.bench-h {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.bench-rows { width: 100%; border-collapse: collapse; }
.bench-rows td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.bench-rows tr:last-child td { border-bottom: none; }
.bench-rows .bench-lvl {
  text-align: left;
  font-family: var(--body);
  font-weight: 400;
  font-size: 13.5px;
  color: var(--dim);
}
.bench-rows td span {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin-left: 4px;
}

/* ── Long-form guide pages (main.doc) ────────────────────── */

main.doc {
  justify-content: flex-start;
  align-items: stretch;
  text-align: left;
  gap: 16px;
  padding-top: 34px;
  max-width: 620px;
}
main.doc h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 7vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.08;
}
main.doc .lede { color: var(--dim); font-size: 17px; line-height: 1.6; }
main.doc h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 22px;
}
main.doc h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.01em;
}
main.doc p { color: var(--dim); font-size: 15.5px; line-height: 1.62; }
main.doc a { color: var(--text); }
main.doc sup a { color: var(--accent); text-decoration: none; font-size: 0.75em; padding-left: 1px; }
main.doc strong { color: var(--text); font-weight: 600; }
main.doc ul, main.doc ol.steps {
  color: var(--dim);
  font-size: 15.5px;
  line-height: 1.62;
  padding-left: 20px;
  margin: 4px 0;
}
main.doc li { margin-bottom: 6px; }
main.doc li strong { color: var(--text); }
main.doc .lnk { color: var(--accent); text-decoration: none; }
main.doc .lnk:hover { color: var(--accent-press); }
.updated { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--faint); }

/* Data tables inside guides (benchmarks, protocols, plans). */
.agerows { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.agerows th, .agerows td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.agerows th {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--faint);
  text-transform: uppercase;
}
.agerows td { color: var(--dim); }
.agerows td:first-child {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 700;
  white-space: nowrap;
}
.agerows caption {
  text-align: left;
  font-size: 12px;
  color: var(--faint);
  margin-top: 6px;
  caption-side: bottom;
  line-height: 1.5;
}
.scroller { width: 100%; overflow-x: auto; }
.scroller .agerows { min-width: 460px; }

.callout {
  border: 1px solid var(--accent-soft);
  border-radius: 14px;
  padding: 16px 18px;
  background: rgba(62, 169, 238, 0.06);
  margin-top: 10px;
}
.callout p { color: var(--text); font-size: 14.5px; margin: 0; }
.callout p + p { margin-top: 8px; }

.disclaimer {
  border-left: 3px solid var(--faint);
  padding: 10px 14px;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}
.disclaimer p { color: var(--faint); font-size: 12.5px; line-height: 1.55; margin: 0; }
.disclaimer strong { color: var(--dim); }
.disclaimer a { color: var(--dim); }

.faq { margin-top: 8px; display: grid; gap: 14px; }
.faq p { margin-top: 4px; }

.refs { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.refs ol { margin: 8px 0 0 18px; padding: 0; }
.refs li { color: var(--faint); font-size: 12.5px; line-height: 1.55; margin-bottom: 8px; }
.refs a { color: var(--dim); }
.backcta { margin-top: 26px; }

.guidenav {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--faint);
}
.guidenav a { color: var(--accent); text-decoration: none; }
.guidenav a:hover { color: var(--accent-press); }

/* ── Footer ──────────────────────────────────────────────── */

footer {
  margin-top: 34px;
  font-size: 13px;
  color: var(--faint);
}
footer a { color: var(--dim); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ── Staggered load reveal ───────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: reveal 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--d, 0) * 120ms);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .breathe { animation: none; }
}

/* ── In-page pacer (pacer.js) ────────────────────────────── */

.pacer {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 8px auto 4px;
  display: grid;
  justify-items: center;
  gap: 12px;
}
.pacer-svg { width: 100%; max-width: 300px; height: auto; display: block; }
.pacer-guide { fill: none; stroke: var(--line); stroke-width: 3; stroke-dasharray: 7 7; }
.pacer-dot { fill: var(--accent); filter: drop-shadow(0 0 10px var(--accent-glow)); }
.pacer-ring { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 4; }
.pacer-center {
  position: absolute;
  top: 0; left: 0; right: 0;
  aspect-ratio: 1 / 1;
  max-width: 300px;
  margin: 0 auto;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.pacer-label { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.pacer-count { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.pacer-meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--faint); }
.pacer-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pacer-chip {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--dim); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 14px; cursor: pointer;
}
.pacer-chip.on { color: var(--text); border-color: var(--accent); }
.pacer-note { font-size: 13.5px; color: var(--faint); text-align: center; max-width: 40ch; margin: 0 auto; }

/* ── Patterns row + privacy strip (landing) ──────────────── */

.patterns { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.patterns-h { font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips a, .chips span {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
}
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.chips span { color: var(--dim); font-weight: 500; }
.trust {
  width: 100%; max-width: 46ch; text-align: left; color: var(--dim); font-size: 14.5px; line-height: 1.5;
  border-left: 3px solid var(--accent); padding: 4px 0 4px 14px;
}
.trust strong { color: var(--text); font-weight: 600; }

/* a real screen recording from the app: phone-shaped, never wider than a phone */
.clipvid { margin: 22px auto; width: 100%; max-width: 260px; text-align: center; }
.clipvid video {
  display: block; width: 100%; height: auto; border-radius: 22px;
  border: 1px solid var(--line, rgba(255,255,255,.10)); background: #0b0b0d;
}
.clipvid figcaption { margin-top: 10px; color: var(--dim); font-size: 13.5px; line-height: 1.45; }
