/* ═══════════════════════════════════════════════════════════════════════════
   ATLAS Life — marketing page system
   Spec: docs/mission-control/SITE-SPEC-2026-08-20.md (locked)
   Zero frameworks. Zero gradients outside app screenshots. One accent.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --canvas:    #0B0A08;
  --bone:      #F4F1E9;
  --bone-70:   rgba(244, 241, 233, 0.70);
  --bone-50:   rgba(244, 241, 233, 0.50);
  --bone-40:   rgba(244, 241, 233, 0.40);
  --bone-32:   rgba(244, 241, 233, 0.32);
  --hairline:  rgba(244, 241, 233, 0.12);
  --raise:     #12110E;
  --accent:    #E8A33D;
  --accent-dk: #D69334; /* hover: fill darkened 8% */
  --accent-ink:#0B0A08;

  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --gap-section: 96px;   /* 390 */
  --margin-page: 24px;
  --frame-w: 300px;
}
@media (min-width: 768px) {
  :root { --gap-section: 128px; --margin-page: 48px; --frame-w: 340px; }
}
@media (min-width: 1280px) {
  :root { --gap-section: 160px; --frame-w: 380px; }
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--canvas);
  color: var(--bone);
  font-family: var(--font-ui);
  font-optical-sizing: auto;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (min-width: 1280px) { body { font-size: 17px; } }
img { max-width: 100%; height: auto; display: block; }

/* ── Type scale ─────────────────────────────────────────────────────────── */
.display-1 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(44px, 7.5vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.display-2 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.012em;
}
.display-3 {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.008em;
}
.number-hero {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(64px, 9vw, 96px);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
}
.lede {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--bone-70);
  max-width: 58ch;
}
.body-copy {
  font-size: 16px;
  line-height: 1.65;
  color: var(--bone-70);
  max-width: 56ch;
}
@media (min-width: 1280px) { .body-copy { font-size: 17px; } }
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bone-50);
}
.caption {
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--bone-50);
}
.tt-none { text-transform: none; }

/* ── Links + focus ──────────────────────────────────────────────────────── */
a { color: var(--bone-70); text-decoration: none; }
a:hover, a:focus-visible {
  color: var(--bone);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
a { transition: text-decoration-color 120ms ease; }
/* Resting affordance for links that sit inside or beside prose (matches the
   subpages' quiet hairline underline; hover swaps it to accent as usual). */
.chapter-note a, .privacy-link, .band-link {
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 4px;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 16px; border-radius: 6px; font-weight: 500; font-size: 14px;
}
.skip-link:focus-visible { left: 8px; text-decoration: none; color: var(--accent-ink); }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--margin-page);
}
@media (min-width: 1280px) { .container { padding-inline: 0; } }
.section { margin-top: var(--gap-section); }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  height: 64px;
  background: var(--canvas);
  border-bottom: 1px solid transparent;
}
.site-nav.scrolled { border-bottom-color: var(--hairline); }
.site-nav .container {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone);
}
.wordmark:hover, .wordmark:focus-visible { color: var(--bone); }
.nav-links { display: none; align-items: center; gap: 32px; list-style: none; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a { font-size: 14px; font-weight: 500; line-height: 1.4; }
.nav-right { display: flex; align-items: center; gap: 32px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-accent {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 500; line-height: 1.4;
  padding: 12px 24px;
  border-radius: 6px;
  border: none;
  transition: background-color 120ms ease;
}
.btn-accent:hover, .btn-accent:focus-visible {
  background: var(--accent-dk);
  color: var(--accent-ink);
  text-decoration: none;
}
.site-nav .btn-accent { padding: 8px 16px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding-top: 64px; }
@media (min-width: 768px) { .hero { padding-top: 88px; } }
.hero-eyebrow { margin-bottom: 20px; }
.hero h1 { max-width: 22ch; }
.hero .lede { margin-top: 24px; }
.hero-curve { margin-top: 56px; position: relative; }
@media (min-width: 768px) { .hero-curve { margin-top: 72px; } }
.hero-cta { margin-top: 40px; }
.hero-cta .btn-accent { font-size: 15px; padding: 16px 28px; }
.hero-cta .caption { margin-top: 12px; }

/* ── The curve ──────────────────────────────────────────────────────────── */
.curve-readout {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 8px;
  visibility: hidden; /* revealed by site.js once the value is real */
}
.curve-readout.live { visibility: visible; }
.curve-now { font-size: 13px; font-weight: 400; letter-spacing: 0.01em; color: var(--bone-50); }
.curve-svg { display: block; width: 100%; height: 200px; }
@media (min-width: 768px) { .curve-svg { height: 240px; } }
@media (min-width: 1280px) {
  .curve-svg { height: 280px; }
  .curve-readout { position: absolute; top: -8px; left: 0; margin-bottom: 0; }
  .hero-curve { padding-top: 24px; }
}
.curve-past { stroke: var(--bone); stroke-width: 2; fill: none; stroke-linecap: round; }
.curve-future { stroke: var(--bone-40); stroke-width: 2; fill: none; stroke-linecap: round; }
.curve-baseline { stroke: var(--hairline); stroke-width: 1; }
.curve-tick { stroke: var(--bone-32); stroke-width: 1; }
.curve-tick-label {
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em;
  fill: var(--bone-50);
}
.tick-mid { display: none; }
@media (min-width: 768px) { .tick-mid { display: block; } }
.curve-dot-glow { fill: var(--accent); }
.curve-dot { fill: var(--accent); }
.curve-dot-group { opacity: 0; }
.curve-dot-group.live { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .curve-dot-group.live { animation: dot-breathe 3s ease-in-out infinite; }
}
@keyframes dot-breathe {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}
.curve-caption { margin-top: 16px; }

/* ── Thesis ─────────────────────────────────────────────────────────────── */
.thesis h2 { max-width: 24ch; }
.thesis .lede { margin-top: 28px; }

/* ── Chapters ───────────────────────────────────────────────────────────── */
.chapter { display: block; }
.chapter-time {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.chapter-time::before {
  content: ""; display: inline-block;
  width: 12px; height: 2px;
  background: var(--accent);
}
.chapter h3 { max-width: 18ch; }
.chapter .body-copy { margin-top: 20px; }
.chapter-note { margin-top: 16px; font-size: 14px; font-weight: 400; color: var(--bone-70); max-width: 56ch; }
.chapter-figure { margin: 40px auto 0; width: var(--frame-w); max-width: 100%; }
/* Chapters stay stacked through tablet — at 768 the 12-col split leaves the
   copy ~31ch, far under the 45ch floor. Side-by-side starts at 1024. */
@media (min-width: 1024px) {
  .chapter {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    align-items: center;
  }
  .chapter-copy { grid-column: 1 / span 5; }
  .chapter-figure { grid-column: 7 / span 6; margin: 0; justify-self: center; }
  .chapter--flip .chapter-copy { grid-column: 8 / span 5; }
  .chapter--flip .chapter-figure { grid-column: 1 / span 6; grid-row: 1; }
}

/* ── Device frame (six layers, flat, no tilt) ───────────────────────────── */
.phone {
  width: var(--frame-w); max-width: 100%;
  border-radius: 55px;
  background: linear-gradient(135deg, #3a3a3e, #131315); /* 1px metallic ring */
  padding: 1px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.28),
    0 8px 24px rgba(0, 0, 0, 0.14),
    0 16px 48px rgba(0, 0, 0, 0.07),
    0 32px 96px rgba(0, 0, 0, 0.035);
}
.phone-frame {
  background: #0f0f11;
  border-radius: 54px;
  padding: 5px;
}
.phone-screen {
  position: relative;
  border-radius: 46px;
  overflow: hidden;
  background: #0B0A08;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.6);
  aspect-ratio: 390 / 890; /* 46px status strip + 844 screenshot */
}
.phone-screen img {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
}
.phone-island {
  position: absolute;
  top: 2.2%; left: 50%;
  transform: translateX(-50%);
  width: 30.8%;
  aspect-ratio: 120 / 36;
  border-radius: 999px;
  background: #000;
  z-index: 2;
}
.phone-island::after { /* off-center lens highlight */
  content: "";
  position: absolute;
  right: 12%; top: 28%;
  width: 18%; height: 44%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(88, 96, 112, 0.55), rgba(20, 22, 28, 0.9) 70%);
}
.phone-screen::after { /* one glass glint, static */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.04) 38%, transparent 38.5%);
  pointer-events: none;
  z-index: 3;
}

/* ── Also in ATLAS ──────────────────────────────────────────────────────── */
.also h4 { margin-bottom: 8px; }
.also-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
}
.also-row:last-child { border-bottom: 1px solid var(--hairline); }
.also-row svg { flex: none; margin-top: 2px; color: var(--bone-70); }
.also-title { font-size: 16px; font-weight: 500; color: var(--bone); }
.also-sub { font-size: 15px; font-weight: 400; color: var(--bone-70); max-width: 52ch; }
@media (min-width: 768px) {
  .also-row { align-items: baseline; }
  .also-body { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
}

/* ── Privacy ────────────────────────────────────────────────────────────── */
.privacy h2 { max-width: 20ch; }
.privacy-rows { margin-top: 40px; list-style: none; }
.privacy-rows li {
  font-size: 17px;
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
  color: var(--bone);
}
.privacy-rows li:last-child { border-bottom: 1px solid var(--hairline); }
.privacy .body-copy { margin-top: 28px; }
.privacy-link { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 500; }

/* ── Price · builder · close ────────────────────────────────────────────── */
.band h3 { max-width: 16ch; }
.band .body-copy { margin-top: 20px; }
.band-link { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 500; }
.close h2 { max-width: 16ch; }
.close .btn-accent { margin-top: 36px; font-size: 15px; padding: 16px 28px; }
.close .caption { margin-top: 12px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: var(--gap-section);
  border-top: 1px solid var(--hairline);
  padding: 48px 0 64px;
  font-size: 14px;
  color: var(--bone-50);
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 24px; } }
.footer-col .wordmark { display: inline-block; margin-bottom: 12px; }
.footer-col p { margin-top: 4px; max-width: 32ch; }
.footer-head {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bone-50);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-top: 8px; }
.footer-col a { font-size: 14px; }

/* ── Reveals — scroll-driven where supported, IO fallback in site.js ────── */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: fade-up 500ms ease-out both;
      animation-timeline: view();
      animation-range: entry 15% entry 45%;
    }
  }
  .reveal.io-armed { opacity: 0; transform: translateY(12px); }
  .reveal.io-in {
    opacity: 1; transform: none;
    transition: opacity 500ms ease-out, transform 500ms ease-out;
  }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
