/*
 * Throughline public site — "Deep Teal" palette, mirrored from
 * app/src/shared/ui/theme.ts. Keep the two in sync.
 *
 * Layout follows the identity spec (../DESIGN.md § Throughline identity): a
 * single line threads the whole page, with a node at every section heading.
 * The page is built FROM the motif rather than decorated with it.
 */
:root {
  color-scheme: light dark;
  --bg: #f7f4ee;
  --surface: #fdfbf6;
  --ink: #1e1c18;
  --ink-muted: #6e6a62;
  --line: #e7e2d8;
  --accent: #1f6e6e;
  --accent-soft: #dcebea;
  --positive: #3e8e5a;
  --shadow: 0 1px 2px rgba(30, 28, 24, 0.05), 0 8px 24px rgba(30, 28, 24, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191714;
    --surface: #221f1b;
    --ink: #f0ece3;
    --ink-muted: #a5a097;
    --line: #332f2a;
    --accent: #5bb3b0;
    --accent-soft: #20403f;
    --positive: #6fbf8c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.28);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 22px 96px;
}

/* ---- The structural device: one line threading the whole page ---- */

.thread {
  position: relative;
  padding-left: 52px;
}

.thread::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
}

section {
  position: relative;
  padding: 56px 0 0;
}

/* A node on the line, level with each section's eyebrow. */
section::before {
  content: "";
  position: absolute;
  left: -44px;
  top: 68px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

/* Filled node = the section you're being pointed at first. */
section.filled::before {
  background: var(--accent);
}

/* ---- Type ---- */

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px;
  font-weight: 600;
}

h1 {
  font-size: clamp(44px, 8vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  font-weight: 700;
  text-wrap: balance;
}

h2 {
  font-size: clamp(24px, 3.4vw, 31px);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  font-weight: 650;
  text-wrap: balance;
}

h3 {
  font-size: 17px;
  margin: 0 0 4px;
  font-weight: 640;
}

p {
  margin: 0 0 14px;
  max-width: 62ch;
}

.muted {
  color: var(--ink-muted);
}

.sm {
  font-size: 14.5px;
}

.note {
  margin-top: 18px;
}

a {
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---- Hero ---- */

header.hero {
  padding: 92px 0 8px;
  position: relative;
}

/* The hero opens the line rather than sitting on a node. */
header.hero::before {
  display: none;
}

.thesis {
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.5;
  max-width: 34ch;
  color: var(--ink);
  margin: 0 0 26px;
}

.accentword {
  color: var(--accent);
}

.heroline {
  width: 100%;
  height: 120px;
  display: block;
  overflow: visible;
}

.heroline path {
  fill: none;
  stroke-linecap: round;
}

.draw {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* Motion is opt-out at the OS level here, mirroring low-sensory mode in the app. */
@media (prefers-reduced-motion: reduce) {
  .draw {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* ---- Cards ---- */

.grid {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.g2 {
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card p:last-child {
  margin-bottom: 0;
}

.price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price .amount {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.price .term {
  font-weight: 600;
}

/* ---- Footer ---- */

footer {
  position: relative;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

footer p:last-child {
  margin-bottom: 0;
}

/* ---- Privacy page ---- */

.policy h2 {
  margin-top: 34px;
}

.policy ul {
  padding-left: 22px;
  max-width: 62ch;
}

.policy li {
  margin-bottom: 6px;
}

.callout {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 18px 0;
  max-width: 62ch;
}

.updated {
  color: var(--ink-muted);
  font-size: 14px;
}

.back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 15px;
}

/* ---- Narrow screens: the thread would eat the text column ---- */

@media (max-width: 560px) {
  .thread {
    padding-left: 28px;
  }
  .thread::before {
    left: 5px;
  }
  section::before {
    left: -29px;
    top: 60px;
    width: 10px;
    height: 10px;
  }
  header.hero {
    padding-top: 64px;
  }
  .heroline {
    height: 92px;
  }
}
