/* =============================================================
   Throughline — design tokens and base styles
   All values use CSS custom properties. No hardcoded colors,
   font sizes, or spacing anywhere in this file or in markup.
   ============================================================= */

:root {
  /* Color */
  --paper: #FAF7F2;
  --ink: #16130F;
  --muted: #6B6359;
  --accent: #1F5C4D;       /* muted emerald, CTAs only */
  --accent-ink: #16443A;   /* accent hover/active */
  --line: #E6DFD4;

  /* Type scale (fluid) */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.5rem + 2vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.4vw, 3.6rem);

  /* Spacing */
  --space-s: 0.75rem;
  --space-m: 1.25rem;
  --space-l: 2.5rem;
  --space-xl: 5rem;
  --wrap: 680px;
}

/* Base reset */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
p { color: var(--muted); }
img { max-width: 100%; display: block; }

/* Layout primitives */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: var(--space-xl); }
.section + .section { border-top: 1px solid var(--line); }

/* CTA button */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.9rem 1.6rem;
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--accent-ink); }
.btn:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; }

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

/* Brand name: bold + italic wherever "Throughline" appears */
.brand { font-family: "Newsreader", Georgia, serif; font-weight: 700; font-style: italic; }
.brandmark { margin: 0 0 var(--space-l); font-size: var(--step-1); color: var(--ink); letter-spacing: -0.02em; }

/* =============================================================
   Task 2: Hero section
   ============================================================= */
.hero { padding-top: 4rem; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 var(--space-s); }
.hero h1 { font-size: var(--step-4); margin: 0 0 var(--space-m); max-width: 16ch; }
.hero-sub { font-size: var(--step-1); margin: 0 0 var(--space-l); max-width: 48ch; }
.hero-founder { display: flex; gap: 0.9rem; align-items: center; margin-top: var(--space-l); }
.hero-founder img { border-radius: 50%; flex: 0 0 auto; object-fit: cover; }
.hero-founder p { font-size: var(--step--1); margin: 0; }

/* =============================================================
   Task 3: Problem and Story sections
   ============================================================= */
.problem h2, .story h2 { font-size: var(--step-3); margin: 0 0 var(--space-m); }
.story p + p { margin-top: var(--space-m); }

/* =============================================================
   Task 4: Deliverables section
   ============================================================= */
.lead { font-size: var(--step-1); color: var(--ink); margin: 0 0 var(--space-l); }
.deliver-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-m); }
.deliver-list li { padding-left: 1.5rem; position: relative; }
.deliver-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.deliver-list strong { color: var(--ink); font-weight: 600; }

/* =============================================================
   Task 5: Proof section
   ============================================================= */
.quote-card { margin: 0 0 var(--space-l); padding: var(--space-l); background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.quote-card blockquote { margin: 0 0 var(--space-m); font-family: "Newsreader", Georgia, serif; font-style: italic; font-size: var(--step-2); color: var(--ink); line-height: 1.3; }
.quote-card figcaption { display: flex; align-items: center; gap: 0.75rem; font-size: var(--step--1); color: var(--muted); }
.quote-card figcaption img { border-radius: 50%; object-fit: cover; }
.proof-story { margin: 0 0 var(--space-l); }
.video-slot { display: grid; place-items: center; min-height: 220px; border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: var(--step--1); }

/* =============================================================
   Task 6: How it works section
   ============================================================= */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-l); counter-reset: none; }
.steps li { display: flex; gap: 1.1rem; align-items: flex-start; }
.step-n { flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 600; display: grid; place-items: center; }
.steps strong { color: var(--ink); display: block; margin-bottom: 0.2rem; }

/* =============================================================
   Task 7: Founding offer section
   ============================================================= */
.offer { background: var(--ink); color: var(--paper); border-top: none; }
.offer h2 { color: #fff; font-size: var(--step-3); margin: 0 0 var(--space-m); }
.offer p { color: #C9C2B6; }
.offer-lead { font-size: var(--step-1); color: var(--paper) !important; margin: 0 0 var(--space-m); }
.offer-scarcity { font-weight: 600; color: #fff !important; margin: var(--space-l) 0 var(--space-l); }
.offer .btn { background: var(--paper); color: var(--ink); }
.offer .btn:hover { background: #fff; }
.offer .btn:focus-visible { outline-color: var(--paper); }

/* =============================================================
   Task 8: Application section
   ============================================================= */
.apply iframe { width: 100%; border: 0; margin-top: var(--space-l); }
.apply p { margin-bottom: var(--space-m); }

/* Tally placeholder card */
.tally-placeholder {
  margin-top: var(--space-l);
  padding: var(--space-l);
  border: 2px solid var(--line);
  border-radius: 14px;
  text-align: center;
}
.tally-placeholder p { margin: var(--space-s) 0 0; font-size: var(--step--1); color: var(--muted); }
.tally-placeholder strong { color: var(--ink); font-size: var(--step-1); display: block; margin-bottom: var(--space-s); }

/* =============================================================
   Task 9: FAQ and closing sections
   ============================================================= */
.faq details { border-bottom: 1px solid var(--line); padding: var(--space-m) 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); font-size: var(--step-1); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: var(--space-s) 0 0; }
.closing { text-align: center; }
.closing h2 { font-size: var(--step-3); margin: 0 0 var(--space-m); }
.closing p { margin: 0 auto var(--space-l); max-width: 40ch; }

/* =============================================================
   Task 10: Motion and sticky CTA
   ============================================================= */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

.sticky-cta {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(calc(100% + 3rem));
  bottom: 1rem; z-index: 50; background: var(--accent); color: #fff;
  text-decoration: none; font-weight: 600; padding: 0.8rem 1.4rem; border-radius: 999px;
  white-space: nowrap; max-width: calc(100vw - 2rem);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15); opacity: 0; pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.sticky-cta.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }

/* =============================================================
   Task 10: Reduced-motion guard (must be after motion rules)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  /* Keep a gentle fade (no slide) instead of snapping when motion is reduced. */
  .sticky-cta { transform: translateX(-50%) translateY(0); transition: opacity 0.3s ease; }
  .sticky-cta.show { transform: translateX(-50%) translateY(0); }
  html { scroll-behavior: auto; }
}

/* =============================================================
   Task 11: Responsive small-screen refinements
   ============================================================= */
@media (max-width: 480px) {
  .section { padding-block: 3rem; }
  .quote-card { padding: var(--space-m); }
  .hero-founder { align-items: flex-start; }
}
