/* Earmark — shared styles */

/* Inter 4 (Rasmus Andersson, SIL Open Font License), self-hosted variable font.
   The opsz axis switches automatically: Inter Display shapes at headline sizes,
   Inter text shapes at body sizes. */
@font-face { font-family: "Inter"; src: url("fonts/Inter-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Variable-Italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  /* Surfaces */
  --bg: #ffffff;
  --surface: #f6f7fb;
  --line: #e4e6ef;

  /* Text: four steps, darkest to lightest.
     heading  #0b0e1d  headings, the phone number, anything that must pop     (19:1 on white)
     body     #2a2f45  paragraphs and nav: softer than pure black for long reading (13:1)
     muted    #545a73  intro paragraph, card descriptions, form help           (7:1)
     subtle   #6b7189  captions, footer, timestamps, small print                (4.9:1, still passes AA) */
  --text-heading: #0b0e1d;
  --text-body: #2a2f45;
  --text-muted: #545a73;
  --text-subtle: #6b7189;

  /* Brand */
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-ink: #ffffff;
  --accent-soft: #ecebff;
  --accent-text: #4338ca;      /* indigo for small text (eyebrows, links): darker so it reads crisply */

  --bubble-in: #eceef5;
  --bubble-out: #4f46e5;
  --shadow: rgba(15, 18, 34, .16);
  --radius: 14px;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d17;
    --surface: #141729;
    --line: #262a40;
    --text-heading: #f4f5fb;
    --text-body: #d3d6e4;
    --text-muted: #a3a8bf;
    --text-subtle: #8a90a9;
    --accent: #8b85ff;
    --accent-hover: #a29dff;
    --accent-ink: #0b0d17;
    --accent-soft: #23234a;
    --accent-text: #a5a0ff;
    --bubble-in: #1e2238;
    --bubble-out: #8b85ff;
    --shadow: rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font);
  font-size: 16px; line-height: 1.6; font-weight: 400; letter-spacing: -0.011em;
  font-optical-sizing: auto;
  font-feature-settings: "cv11";          /* single-storey a: friendlier, more modern */
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
strong, b { font-weight: 600; color: var(--text-heading); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* ============ Type scale ============
   Role            Size (mobile → desktop)  Weight  Line   Tracking   Color
   Display (h1)    44 → 66                  700     1.02   -0.035em   heading
   Page title      36 → 48                  700     1.08   -0.03em    heading
   Section (h2)    32 → 44                  700     1.1    -0.028em   heading
   Card title (h3) 19                        600     1.3    -0.017em   heading
   Lede            18 → 21                  400     1.5    -0.014em   muted
   Body            16                        400     1.6    -0.011em   body
   Small           14                        400     1.5    -0.006em   subtle/muted
   Eyebrow         13                        600     1      +0.08em    accent-text, caps
   Button / nav    15                        600/500 1      -0.006em   */
h1, h2, h3, h4 { color: var(--text-heading); margin: 0 0 16px; }
h1 { font-size: clamp(44px, 6.4vw, 66px); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.4vw, 44px); font-weight: 700; line-height: 1.1; letter-spacing: -0.028em; text-wrap: balance; }
h3 { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.017em; margin-bottom: 8px; }
.h-page { font-size: clamp(36px, 5.5vw, 48px); line-height: 1.08; letter-spacing: -0.03em; }
.eyebrow { font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin: 0 0 18px; }
.lede { font-size: clamp(18px, 2vw, 21px); font-weight: 400; line-height: 1.5; letter-spacing: -0.014em; color: var(--text-muted); max-width: 32em; margin: 0; text-wrap: pretty; }
.lede-sm { font-size: 18px; }
.small { font-size: 14px; line-height: 1.5; letter-spacing: -0.006em; color: var(--text-subtle); }
p { text-wrap: pretty; }

/* Header / footer */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; line-height: 0; }
.logo img { height: 28px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 500; letter-spacing: -0.006em; }
.nav a { color: var(--text-body); text-decoration: none; }
.nav a:hover { color: var(--text-heading); }
.nav a.btn { color: var(--accent-ink); }
.nav a { white-space: nowrap; }
@media (max-width: 560px) { .nav { gap: 16px; } .nav a:not(.btn) { display: none; } }

.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 32px 0 48px; color: var(--text-subtle); font-size: 14px; letter-spacing: -0.006em; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer a { color: var(--text-subtle); text-decoration: none; }
.site-footer a:hover { color: var(--text-heading); }

/* Buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font: 600 15px/1 var(--font); letter-spacing: -0.006em; text-decoration: none;
  padding: 16px 26px; border-radius: 999px;
  transition: background-color .12s ease, transform .12s ease;
}
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-small { padding: 10px 18px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--text-heading); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--text-heading); }

/* Sections */
section { padding: 80px 0; }
.hero { padding: 48px 0 80px; }
.hero .wrap { display: grid; grid-template-columns: 1.35fr .65fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 32px; }
.hero-note { font-size: 14px; color: var(--text-subtle); letter-spacing: -0.006em; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } section { padding: 64px 0; } }

/* Phone mockup */
.phone {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 36px; padding: 22px 16px 26px; max-width: 360px; margin: 0 auto;
  box-shadow: 0 30px 60px -30px var(--shadow);
}
.phone-top { text-align: center; font-size: 12px; color: var(--text-subtle); margin-bottom: 18px; }
.phone-top strong { display: block; color: var(--text-heading); font-size: 15px; font-weight: 600; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4; letter-spacing: -0.009em; margin: 6px 0; word-wrap: break-word; color: var(--text-heading); }
.bubble.out { margin-left: auto; background: var(--bubble-out); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.bubble.in { background: var(--bubble-in); border-bottom-left-radius: 5px; }
.bubble-time { text-align: center; font-size: 12px; color: var(--text-subtle); margin: 14px 0 4px; }
.episode-card { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.episode-art { flex: 0 0 48px; height: 48px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); font: 700 20px var(--font); }
.episode-meta { font-size: 13px; color: var(--text-subtle); line-height: 1.35; }
.episode-meta strong { color: var(--text-heading); display: block; font-size: 14px; font-weight: 600; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; counter-reset: step; }
.step { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font: 600 14px var(--font); font-variant-numeric: tabular-nums; margin-bottom: 20px; }
.step p { margin: 0; color: var(--text-muted); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 56px; margin-top: 44px; }
.feature p { margin: 0; color: var(--text-muted); }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }

.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* FAQ */
.faq { margin-top: 32px; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; letter-spacing: -0.014em; color: var(--text-heading); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-muted); margin: 10px 0 0; }

.cta-final { text-align: center; }
.cta-final .lede { margin: 0 auto 32px; }

/* Forms / sign-up */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 5vw, 44px); }
.card .lede { margin-bottom: 8px; }
.progress { display: flex; gap: 8px; margin-bottom: 28px; }
.progress span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.progress span.on { background: var(--accent); }
label.field-label { display: block; font-size: 14px; font-weight: 600; color: var(--text-heading); margin: 28px 0 8px; }
input[type="tel"], input[type="email"], input[type="text"] {
  width: 100%; font: 400 17px var(--font); letter-spacing: -0.011em; color: var(--text-heading);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 16px; outline: none;
}
input::placeholder { color: var(--text-subtle); }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0; font-size: 15px; line-height: 1.5; color: var(--text-body); }
.check input { margin-top: 2px; width: 20px; height: 20px; accent-color: var(--accent); flex: 0 0 auto; }
.disclosure { font-size: 13px; line-height: 1.55; color: var(--text-subtle); letter-spacing: -0.003em; }
.disclosure p { margin: 0 0 10px; }
.disclosure strong { color: var(--text-body); font-weight: 600; }
.error { color: #b91c1c; font-size: 14px; margin-top: 8px; }
@media (prefers-color-scheme: dark) { .error { color: #f87171; } }
.number-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 14px 0; }
.number-box .num { font: 600 24px var(--font); letter-spacing: -0.02em; color: var(--text-heading); font-variant-numeric: tabular-nums; }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; }
.checklist li { padding: 16px 0 16px 44px; border-top: 1px solid var(--line); position: relative; }
.checklist li::before { content: attr(data-n); position: absolute; left: 0; top: 15px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.checklist li strong { display: block; font-size: 16px; }
.checklist li span { color: var(--text-muted); font-size: 15px; }

/* Legal pages */
.legal h1 { font-size: clamp(36px, 5.5vw, 48px); line-height: 1.08; letter-spacing: -0.03em; }
.legal h2 { font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -0.017em; margin: 44px 0 12px; }
.legal p, .legal li { color: var(--text-body); }
.legal li { margin-bottom: 6px; }
.legal .updated { color: var(--text-subtle); font-size: 14px; }
.legal .callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 18px 20px; margin: 24px 0; font-size: 15px; }
