/* FM Fathom marketing site — design tokens from the approved Paper mockup */
:root {
  --ink: #0C2A33;
  --fog: #5C6B70;
  --mist: #F2F7F7;
  --paper: #FFFFFF;
  --teal: #0D9488;
  --teal-deep: #0A7A70;
  --brass: #D9A036;
  --hairline: #E8EFEF;
  --panel: #FAFBFC;
  --panel-border: #E2ECEC;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; }
.mono  { font-family: 'Geist Mono', monospace; }

a { color: inherit; text-decoration: none; }

/* ---------- Nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 64px;
}
.nav.on-dark { background: var(--ink); }
.nav.on-light { background: var(--paper); border-bottom: 1px solid #EEF4F4; }
.nav .logo { display: flex; align-items: center; gap: 10px; }
.nav .wordmark { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.nav.on-dark .wordmark { color: #fff; }
.nav .links { display: flex; align-items: center; gap: 36px; font-size: 14px; }
.nav.on-dark .links a { color: rgba(255,255,255,0.72); }
.nav.on-light .links a { color: var(--fog); }
.nav .links a:hover { opacity: 0.8; }
.nav .links a.active { font-weight: 500; }
.nav.on-light .links a.active { color: var(--ink); }
.nav.on-dark .links a.active { color: #fff; }

/* ---------- Hero ---------- */
.hero { background: var(--ink); position: relative; overflow: hidden; }
.hero-inner { padding: 72px 64px 0 64px; max-width: 800px; position: relative; z-index: 2; }
.beta-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.07);
  font-size: 13px; color: rgba(255,255,255,0.85); margin-bottom: 34px;
}
.beta-badge .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--teal); }
.hero h1 { display: flex; flex-direction: column; gap: 4px; }
.hero h1 .serif { font-size: 72px; line-height: 78px; letter-spacing: -0.01em; color: #fff; }
.hero h1 .sans { font-weight: 600; font-size: 66px; line-height: 72px; letter-spacing: -0.03em; color: #fff; }
.hero .sub {
  margin-top: 28px; font-size: 19px; line-height: 30px;
  color: rgba(255,255,255,0.68); max-width: 560px;
}
.hero .cta-row { display: flex; align-items: center; gap: 8px; margin-top: 36px; padding-bottom: 90px; }
.hero .cta-row a { font-size: 15px; color: rgba(255,255,255,0.8); display: inline-flex; align-items: center; gap: 8px; }
.hero .cta-row a:hover { color: #fff; }

/* Sounding line + submarine */
.sounding { position: absolute; right: 180px; top: 0; width: 240px; height: 660px; z-index: 1; }
.sounding .line { position: absolute; left: 120px; top: 0; width: 1px; height: 560px; background: rgba(255,255,255,0.22); }
.sounding .tick { position: absolute; height: 1px; background: rgba(255,255,255,0.14); }
.sounding .lbl {
  position: absolute; left: 152px;
  font-family: 'Geist Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.35);
}
.sounding .lbl.hot { color: rgba(255,255,255,0.6); }
.sounding .node { position: absolute; left: 116px; width: 8px; height: 8px; border-radius: 999px; background: var(--teal); }
.sub-wrap { position: absolute; left: 68px; top: 4px; }
@keyframes sub-dive {
  0%   { transform: translateY(0); }
  100% { transform: translateY(440px); }
}
.sub-wrap { animation: sub-dive 14s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .sub-wrap { animation: none; } }

.trust-bar {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 28px 64px 36px 64px; font-size: 14px; color: rgba(255,255,255,0.55);
}

/* ---------- Sections ---------- */
.section { padding: 100px 64px; }
.section.mist { background: var(--mist); }
.kicker {
  font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: 0.08em;
  color: var(--teal); margin-bottom: 12px;
}
.section h2 { font-weight: 600; font-size: 34px; line-height: 44px; letter-spacing: -0.02em; }
.section .lede { margin-top: 12px; font-size: 16px; line-height: 27px; color: var(--fog); max-width: 620px; }

/* Problem */
.problem { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 120px 64px; }
.problem h2 { max-width: 780px; font-size: 34px; line-height: 46px; }
.problem p { margin-top: 20px; max-width: 620px; font-size: 17px; line-height: 28px; color: var(--fog); }

/* Pillars */
.pillars { padding: 0 64px 110px 64px; display: flex; flex-direction: column; align-items: center; gap: 56px; }
.pillar-cols { display: flex; gap: 48px; width: 100%; max-width: 1180px; }
.pillar { flex: 1 1 0; }
.pillar .num { font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: 0.08em; color: var(--teal); }
.pillar h3 { margin-top: 14px; font-weight: 600; font-size: 24px; letter-spacing: -0.02em; }
.pillar p { margin-top: 14px; font-size: 15px; line-height: 25px; color: var(--fog); }
.spine { display: flex; align-items: center; gap: 14px; }
.spine .rule { width: 120px; height: 1px; background: #D2DEDE; }
.spine .txt { font-size: 15px; }
.spine .txt .serif { font-size: 19px; color: var(--teal); font-style: italic; }

/* AI spotlight */
.ai-section { display: flex; align-items: center; gap: 80px; padding: 110px 130px; background: var(--mist); }
.ai-copy { width: 420px; flex-shrink: 0; }
.ai-copy h2 { font-size: 40px; line-height: 48px; letter-spacing: -0.025em; }
.ai-copy .body { margin-top: 18px; font-size: 16px; line-height: 27px; color: var(--fog); }
.ai-copy .note { margin-top: 16px; font-size: 14px; line-height: 22px; color: var(--fog); }
.ai-copy .whale-face { margin-top: 26px; }
.chat-card { flex: 1 1 0; background: #fff; border-radius: 18px; border: 1px solid var(--panel-border); }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 16px 24px; border-bottom: 1px solid #EEF4F4; }
.chat-head .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--teal); }
.chat-head span { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--fog); }
.chat-body { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.msg-user { align-self: flex-end; background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 18px; max-width: 380px; font-size: 14px; line-height: 22px; }
.msg-ai { max-width: 460px; font-size: 14px; line-height: 23px; }
.code-block {
  margin-top: 10px; padding: 14px 16px; border-radius: 10px;
  background: var(--mist); border: 1px solid var(--panel-border);
  font-family: 'Geist Mono', monospace; font-size: 12px; line-height: 19px; white-space: pre;
  overflow-x: auto;
}
.code-block .dim { color: var(--fog); }
.chat-suggest { display: flex; gap: 8px; padding: 0 24px 22px 24px; flex-wrap: wrap; }
.chat-suggest span { padding: 7px 13px; border-radius: 999px; border: 1px solid #DCE7E7; font-size: 12px; color: var(--fog); }

/* Feature panels (kanban / relationships / call chain) */
.panel {
  margin-top: 44px; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-border);
}
.kanban { display: flex; gap: 20px; padding: 24px; background: var(--mist); }
.kanban .col { flex: 1 1 0; display: flex; flex-direction: column; gap: 12px; }
.kanban .col-title { font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.05em; color: var(--fog); }
.kcard { background: #fff; border-radius: 10px; padding: 12px 14px; border-left: 3px solid #C9C9CC; }
.kcard.progress { border-left-color: var(--brass); }
.kcard.done { border-left-color: var(--teal); opacity: 0.75; }
.kcard.done .t { text-decoration: line-through; }
.kcard .t { font-weight: 500; font-size: 13px; line-height: 18px; }
.kcard .s { margin-top: 5px; font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--fog); }

.diagram { padding: 16px; }
.diagram svg { width: 100%; height: auto; display: block; }
.hops-bar {
  display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 0 16px;
  padding: 7px 10px; border-radius: 8px; background: #fff; border: 1px solid #E5E9EC;
  font-size: 11px; color: #94A3B8;
}
.hops-bar .seg { display: flex; border-radius: 6px; overflow: hidden; border: 1px solid #E5E9EC; font-weight: 700; }
.hops-bar .seg b { padding: 3px 9px; background: var(--teal); color: #fff; font-weight: 700; }
.hops-bar .seg span { padding: 3px 9px; background: #fff; border-left: 1px solid #E5E9EC; }

/* Differentiators */
.diff-rows { margin-top: 44px; }
.diff-row { display: flex; gap: 48px; padding: 28px 0; border-top: 1px solid var(--hairline); }
.diff-row h3 { width: 320px; flex-shrink: 0; font-weight: 600; font-size: 19px; line-height: 27px; }
.diff-row p { flex: 1; font-size: 15px; line-height: 25px; color: var(--fog); }

/* Depth ladder */
.ladder { background: var(--ink); padding: 110px 130px; }
.ladder .kicker { color: #4FB8AD; }
.ladder h2 { color: #fff; font-size: 40px; line-height: 48px; letter-spacing: -0.025em; max-width: 640px; }
.ladder .lede { color: rgba(255,255,255,0.62); max-width: 640px; }
.steps { margin-top: 52px; }
.step { display: flex; gap: 40px; padding: 30px 0; border-top: 1px solid rgba(255,255,255,0.12); }
.step.indent-1 { padding-left: 48px; }
.step.indent-2 { padding-left: 96px; }
.step .depth { width: 90px; flex-shrink: 0; font-family: 'Geist Mono', monospace; font-size: 12px; color: rgba(255,255,255,0.4); line-height: 18px; }
.step .body { flex: 1; }
.step .title-row { display: flex; align-items: center; gap: 12px; }
.step h3 { color: #fff; font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }
.chip { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; letter-spacing: 0.04em; }
.chip.now { background: rgba(13,148,136,0.25); color: #5ECCC1; }
.chip.alpha { background: rgba(217,160,54,0.18); color: #E5BE6E; }
.chip.progress { background: rgba(255,255,255,0.09); color: rgba(255,255,255,0.55); }
.step p { margin-top: 8px; font-size: 15px; line-height: 24px; color: rgba(255,255,255,0.62); max-width: 640px; }

/* Roadmap teaser */
.teaser { display: flex; gap: 80px; padding: 110px 130px; }
.teaser .left { width: 380px; flex-shrink: 0; }
.teaser .left h2 { font-size: 34px; line-height: 42px; }
.teaser .left a { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 15px; font-weight: 500; color: var(--teal); }
.teaser .rows { flex: 1; }
.trow { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--hairline); font-size: 15px; }
.trow .slot { width: 110px; flex-shrink: 0; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; letter-spacing: 0.03em; white-space: nowrap; }
.pill.alpha { background: rgba(217,160,54,0.14); color: #A87415; }
.pill.progress { background: rgba(217,160,54,0.14); color: #A87415; }
.pill.done { background: rgba(22,163,74,0.13); color: #15803D; }
.pill.usable { background: rgba(22,163,74,0.05); color: #15803D; border: 1px solid rgba(22,163,74,0.35); }
.pill.soon { background: rgba(13,148,136,0.07); color: var(--teal-deep); border: 1px solid rgba(13,148,136,0.25); }
.pill.planned { background: transparent; color: var(--fog); border: 1px solid #C3D2D2; }
.item h3 .pill { margin-left: 8px; vertical-align: 2px; }

/* Final CTA */
.finale { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 130px 64px; background: var(--mist); text-align: center; }
.finale .serif { font-size: 44px; line-height: 52px; color: var(--teal); }
.finale .line { font-weight: 600; font-size: 34px; line-height: 44px; letter-spacing: -0.02em; }

/* Footer */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 64px; background: var(--ink);
  font-size: 13px; color: rgba(255,255,255,0.5);
}
.footer .brand { display: flex; align-items: center; gap: 10px; }
.footer .links { display: flex; gap: 28px; }
.footer .links a { color: rgba(255,255,255,0.6); }

/* ---------- Roadmap page ---------- */
.rm-header { padding: 90px 64px 64px 64px; }
.rm-header .title-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rm-header h1 { font-weight: 600; font-size: 48px; letter-spacing: -0.025em; }
.rm-header .title-row .serif { font-size: 26px; color: var(--teal); }
.rm-header .lede { margin-top: 18px; font-size: 16px; line-height: 27px; color: var(--fog); max-width: 560px; }
.legend { display: flex; gap: 20px; margin-top: 22px; font-size: 13px; color: var(--fog); }
.legend span { display: flex; align-items: center; gap: 7px; }
.ldot { width: 8px; height: 8px; border-radius: 999px; }
.ldot.done { background: var(--teal); }
.ldot.progress { background: var(--brass); }
.ldot.soon { border: 1.5px solid var(--teal); }
.ldot.planned { border: 1.5px solid #C3D2D2; }

.rm-body { display: flex; gap: 96px; padding: 20px 64px 110px 64px; align-items: flex-start; }
.rm-col { flex: 1 1 0; display: flex; flex-direction: column; gap: 64px; }
.theme h2 { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; font-size: 26px; line-height: 32px; margin-bottom: 22px; }
.item { display: flex; gap: 14px; margin-bottom: 22px; }
.item:last-child { margin-bottom: 0; }
.item .dot-slot { width: 20px; flex-shrink: 0; padding-top: 6px; }
.item h3 { font-weight: 600; font-size: 16px; line-height: 22px; }
.item p { margin-top: 4px; font-size: 14px; line-height: 22px; color: var(--fog); }
.theme.local-card { padding: 26px 28px; border-radius: 14px; background: var(--mist); border: 1px solid var(--panel-border); }

.rm-footer { display: flex; align-items: center; padding: 36px 64px; border-top: 1px solid #EEF4F4; }
.rm-footer .k { width: 34px; height: 34px; border-radius: 999px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }
.rm-footer .txt { margin-left: 12px; }
.rm-footer .t1 { font-weight: 500; font-size: 14px; }
.rm-footer .t2 { font-size: 13px; color: var(--fog); margin-top: 1px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ai-section, .ladder, .teaser { padding-left: 64px; padding-right: 64px; }
  .sounding { right: 40px; }
}
@media (max-width: 900px) {
  .nav, .section, .hero-inner, .trust-bar, .problem, .rm-header, .rm-body, .footer { padding-left: 28px; padding-right: 28px; }
  .hero h1 .serif { font-size: 52px; line-height: 58px; }
  .hero h1 .sans { font-size: 44px; line-height: 50px; }
  .sounding { display: none; }
  .pillars { padding: 0 28px 80px 28px; }
  .pillar-cols { flex-direction: column; gap: 40px; }
  .ai-section { flex-direction: column; padding: 80px 28px; gap: 40px; }
  .ai-copy { width: auto; }
  .kanban { flex-direction: column; }
  .diff-row { flex-direction: column; gap: 10px; }
  .diff-row h3 { width: auto; }
  .ladder { padding: 80px 28px; }
  .step.indent-1, .step.indent-2 { padding-left: 0; }
  .teaser { flex-direction: column; padding: 80px 28px; gap: 32px; }
  .teaser .left { width: auto; }
  .rm-body { flex-direction: column; gap: 64px; }
  .footer { flex-direction: column; gap: 14px; text-align: center; }
}

/* ---------- Docs ---------- */
.docs-wrap { display: flex; gap: 64px; padding: 48px 64px 90px 64px; align-items: flex-start; }
.docs-side { width: 230px; flex-shrink: 0; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 26px; }
.docs-side > a { font-size: 14px; font-weight: 500; color: var(--ink); }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-label {
  font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.07em;
  text-transform: uppercase; color: #9AABAB; margin-bottom: 8px;
}
.side-group a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 7px; font-size: 14px; color: var(--fog); line-height: 20px; }
.side-group a:hover { color: var(--ink); background: var(--mist); }
.side-group a.active, .docs-side > a.active { color: var(--teal-deep); font-weight: 500; background: rgba(13,148,136,0.07); }
.docs-main { flex: 1; max-width: 720px; min-width: 0; }
.docs-main h1 { font-weight: 600; font-size: 36px; letter-spacing: -0.02em; line-height: 44px; }
.docs-updated { margin-top: 8px; font-family: 'Geist Mono', monospace; font-size: 12px; color: #9AABAB; }
.docs-main h2 { font-weight: 600; font-size: 22px; letter-spacing: -0.015em; line-height: 30px; margin: 40px 0 12px 0; }
.docs-main h3 { font-weight: 600; font-size: 17px; line-height: 24px; margin: 28px 0 10px 0; }
.docs-main p { font-size: 15px; line-height: 26px; color: #3D4E53; margin: 14px 0; }
.docs-main a { color: var(--teal-deep); text-decoration: underline; text-decoration-color: rgba(13,148,136,0.35); text-underline-offset: 2px; }
.docs-main a:hover { text-decoration-color: var(--teal-deep); }
.docs-main ul, .docs-main ol { margin: 14px 0; padding-left: 24px; }
.docs-main li { font-size: 15px; line-height: 26px; color: #3D4E53; margin: 7px 0; }
.docs-main code {
  font-family: 'Geist Mono', monospace; font-size: 13px;
  background: var(--mist); border: 1px solid var(--panel-border);
  padding: 1px 5px; border-radius: 5px;
}
.docs-main pre {
  margin: 16px 0; padding: 14px 16px; border-radius: 10px;
  background: var(--mist); border: 1px solid var(--panel-border);
  overflow-x: auto;
}
.docs-main pre code { background: none; border: none; padding: 0; font-size: 13px; line-height: 21px; }
.callout {
  margin: 18px 0; padding: 13px 16px; border-radius: 10px;
  font-size: 14px; line-height: 24px; color: #3D4E53;
  background: var(--mist); border: 1px solid var(--panel-border);
}
.callout strong:first-child { display: inline-block; margin-right: 6px; color: var(--ink); }
.callout.tip { background: rgba(13,148,136,0.06); border-color: rgba(13,148,136,0.2); }
.callout.heads-up { background: rgba(217,160,54,0.08); border-color: rgba(217,160,54,0.3); }
.docs-main blockquote {
  margin: 16px 0; padding: 10px 16px; border-left: 3px solid var(--teal);
  background: var(--mist); border-radius: 0 10px 10px 0;
}
.docs-main blockquote p { margin: 0; }
.docs-main hr { border: none; border-top: 1px solid var(--hairline); margin: 36px 0; }
.confirm {
  background: rgba(217,160,54,0.25); border: 1px dashed var(--brass);
  padding: 1px 6px; border-radius: 5px; font-size: 13px;
}
@media (max-width: 900px) {
  .docs-wrap { flex-direction: column; padding: 32px 28px 70px 28px; gap: 36px; }
  .docs-side { position: static; width: auto; }
}
