/* ==========================================================================
   TopOut — marketing site v1  ·  Direction D "Level" (DECISIONS D14)
   Single deliberate light theme (Mist world). Footer goes Slate.
   Hi-Vis #D8F84A appears ONLY in plan-markup contexts (bubbles, counter chip).
   Tokens: docs/05-BRAND.md §0.
   ========================================================================== */

:root {
  /* --- color (Direction D) --- */
  --ink:              #0F172A;  /* Slate — headings + body, 16.61:1 on Mist (AAA) */
  --interactive:      #0E7C7B;  /* Teal */
  --interactive-hover:#0B6160;  /* Teal Deep — buttons/links, 6.75:1 on Mist */
  --accent:           #12B5A5;  /* Aqua — logo teal + on-dark accent (never body text on Mist) */
  --highlight:        #D8F84A;  /* Hi-Vis — plan-markup contexts ONLY */
  --text-secondary:   #5B6870;  /* Steel — 5.34:1 on Mist (AA) */
  --text-secondary-dk:#9AA7AD;  /* on-Slate secondary */
  --bg:               #F5F7F8;  /* Mist */
  --surface:          #FFFFFF;
  --surface-alt:      #EFF2F3;
  --line:             #E3E8EA;  /* Fog — borders, rules */
  --border:           #5B6870;
  --slate-surface:    #1E293B;  /* raised surface on dark */

  /* --- semantic (icon + text label always, never color alone) --- */
  --success:          #137C4B;
  --warning:          #8A5A00;
  --danger:           #C22B2B;
  --info:             #1B6FB0;

  /* --- type --- */
  --font-heading: 'Sora', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', Consolas, ui-monospace, monospace;

  /* --- radius --- */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* --- shadow --- */
  --sh-sm: 0 1px 2px rgba(15,23,42,.06);
  --sh-md: 0 4px 12px rgba(15,23,42,.10);
  --sh-lg: 0 12px 32px rgba(15,23,42,.14);
  --sh-xl: 0 24px 60px rgba(15,23,42,.14);

  /* --- motion --- */
  --dur-fast: 150ms; --dur-base: 250ms; --dur-reveal: 900ms;
  --ease: cubic-bezier(.22,1,.36,1);

  /* --- layout --- */
  --maxw: 1160px;
  --focus: #0E7C7B;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;               /* 16px floor */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--interactive-hover); }
img, svg { max-width: 100%; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Accessibility: focus, skip-link, touch targets
   ========================================================================== */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: var(--r-md); font-weight: 600; z-index: 100;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
section { scroll-margin-top: 84px; }
.section { padding-block: 72px; }
.section-alt { background: var(--surface-alt); }
.eyebrow {
  font-family: var(--font-mono); font-size: .8125rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--interactive-hover);
  margin: 0 0 10px;
}
.section-head { max-width: 60ch; margin: 0 0 40px; }
.section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.25rem); }
.section-head p { color: var(--text-secondary); font-size: 1.0625rem; margin-top: 12px; }

/* ==========================================================================
   Buttons / links
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 24px;
  font-family: var(--font-body); font-size: 1.0313rem; font-weight: 600; line-height: 1;
  border: 2px solid transparent; border-radius: var(--r-md);
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn-primary { background: var(--interactive-hover); color: #fff; }
.btn-primary:hover { background: #08504f; }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: transparent; color: var(--interactive-hover); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--interactive-hover); background: #fff; }
.btn-lg { min-height: 52px; padding: 16px 32px; font-size: 1.125rem; }

.textlink {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--interactive-hover); font-weight: 600; text-decoration: none;
}
.textlink:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Sticky nav
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,247,248,.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.35rem;
  color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
.brand svg { display: block; width: 30px; height: 30px; }
.brand .o { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .975rem;
  border-radius: var(--r-md);
}
.nav-links a:hover { color: var(--interactive-hover); background: var(--surface-alt); }
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-left: auto;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-md);
  cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    margin: 0; padding: 12px 16px 18px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { min-height: 48px; padding: 0 12px; }
  .nav-cta { margin: 6px 0 0; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: 56px 64px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.06; letter-spacing: -.015em; }
.hero .sub {
  font-size: 1.1875rem; line-height: 1.55; color: var(--text-secondary);
  max-width: 52ch; margin: 20px 0 28px;
}
.hero .sub b { color: var(--ink); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.hero-trust {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 24px; font-size: .95rem; color: var(--text-secondary); max-width: 46ch;
}
.hero-trust svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--interactive-hover); }

/* --- plan-markup card (the money shot) --- */
.plan-card {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-xl); padding: 14px; position: relative;
  border: 1px solid var(--line);
}
.sheetbar {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: .6875rem; color: #8B959B; padding: 2px 6px 10px; letter-spacing: .02em;
}
.plan-grid { display: block; width: 100%; height: auto; border-radius: var(--r-sm); background: #F8FAFA; }
.counter {
  position: absolute; right: 22px; bottom: 22px;
  background: var(--ink); color: var(--highlight);   /* counter chip = allowed Hi-Vis context */
  border-radius: var(--r-md); padding: 9px 14px;
  font-size: .875rem; font-weight: 500; box-shadow: var(--sh-md);
}

/* ==========================================================================
   Trust strip
   ========================================================================== */
.trust-strip { border-block: 1px solid var(--line); background: var(--surface); }
.trust-strip .wrap {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding-block: 26px;
}
.trust-item { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.0313rem; }
.trust-item svg { flex: none; width: 24px; height: 24px; color: var(--interactive-hover); }

/* ==========================================================================
   How it works
   ========================================================================== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 24px; position: relative;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff;
  font-family: var(--font-mono); font-weight: 500; font-size: 1.0625rem; margin-bottom: 16px;
}
.step h3 { font-size: 1.25rem; margin-bottom: 8px; }
.step p { color: var(--text-secondary); }
.badge-turnaround {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 28px;
  padding: 10px 18px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff; font-weight: 600; font-size: .975rem;
}
.badge-turnaround svg { width: 18px; height: 18px; color: var(--accent); }

/* ==========================================================================
   The package (six deliverables)
   ========================================================================== */
.package-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.deliverable {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 20px;
}
.deliverable svg { flex: none; width: 26px; height: 26px; color: var(--interactive-hover); margin-top: 2px; }
.deliverable h3 { font-size: 1.0625rem; font-family: var(--font-body); font-weight: 600; }
.deliverable .fmt {
  display: inline-block; margin-top: 6px;
  font-family: var(--font-mono); font-size: .75rem; color: var(--text-secondary);
  letter-spacing: .02em;
}

/* ==========================================================================
   Trades
   ========================================================================== */
.trades { display: flex; flex-wrap: wrap; gap: 10px; }
.trade {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-pill);
  font-weight: 600; font-size: .95rem; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink);
}
.trade-live { background: var(--ink); color: #fff; border-color: var(--ink); }
.trade-live .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.trade-live .tag { font-family: var(--font-mono); font-size: .75rem; color: var(--accent); letter-spacing: .04em; }
.trade-soon { border-style: dashed; color: var(--text-secondary); background: transparent; }
.trade-soon .tag { font-family: var(--font-mono); font-size: .75rem; color: var(--text-secondary); letter-spacing: .04em; }
.trades-note { margin-top: 20px; color: var(--text-secondary); font-size: 1.0313rem; }

/* ==========================================================================
   Proof (geo-label chips — D16 anonymization is absolute)
   ========================================================================== */
.proof-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.proof-chip {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 14px 20px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
}
.proof-chip .geo { font-weight: 600; color: var(--ink); }
.proof-chip .kind { color: var(--text-secondary); font-size: .9375rem; }

/* ==========================================================================
   Pricing
   ========================================================================== */
.pricing-free {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px 24px; margin-bottom: 28px;
  background: var(--ink); color: #fff; border-radius: var(--r-lg);
  font-size: 1.1875rem; font-weight: 600;
}
.pricing-free svg { width: 24px; height: 24px; color: var(--accent); flex: none; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tier {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 24px;
}
.tier h3 { font-size: 1.25rem; margin-bottom: 4px; }
.tier .scope { color: var(--text-secondary); font-size: .95rem; min-height: 2.6em; }
.tier .price { font-family: var(--font-mono); font-weight: 500; font-size: 1.875rem; color: var(--ink); margin: 16px 0 2px; }
.tier .per { color: var(--text-secondary); font-size: .875rem; }
.tier .rush { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-secondary); font-size: .9375rem; }
.pricing-foot { margin-top: 24px; color: var(--text-secondary); font-size: 1.0313rem; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 4px 20px;
}
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 0;
  font-weight: 600; font-size: 1.0625rem; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { flex: none; width: 20px; height: 20px; color: var(--interactive-hover); transition: transform var(--dur-fast) var(--ease); }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .answer { padding: 0 0 18px; color: var(--text-secondary); }
@media (prefers-reduced-motion: reduce) { .faq summary .chev { transition: none; } }

/* ==========================================================================
   Funnel / sample section
   ========================================================================== */
.funnel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 44px 40px; }
.funnel-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.funnel h2 { font-size: clamp(1.75rem, 3.2vw, 2.25rem); }
.funnel-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.funnel-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.0625rem; }
.funnel-steps .n {
  flex: none; width: 26px; height: 26px; border-radius: var(--r-pill);
  background: var(--interactive-hover); color: #fff;
  font-family: var(--font-mono); font-size: .8125rem; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
}
.funnel-steps .email { font-family: var(--font-mono); font-weight: 500; color: var(--ink); }
.funnel-cta { text-align: center; }
.funnel-cta .btn { width: 100%; }
.funnel-note { margin-top: 16px; color: var(--text-secondary); font-size: .95rem; }
.funnel-addr {
  display: block; margin-bottom: 14px; font-family: var(--font-mono); font-weight: 500;
  font-size: 1.0625rem; color: var(--ink); text-align: center;
}

/* ==========================================================================
   Footer (Slate world)
   ========================================================================== */
.footer { background: var(--ink); color: var(--bg); padding-block: 56px 40px; }
.footer a { color: var(--accent); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: flex-start; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 700; font-size: 1.35rem; color: var(--bg); }
.footer-brand svg { width: 34px; height: 34px; display: block; }
.footer-brand .o { color: var(--accent); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a { color: var(--bg); text-decoration: none; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.footer-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.footer-handle { margin-top: 20px; color: var(--text-secondary-dk); font-family: var(--font-mono); font-size: .9375rem; }
.footer-meta { margin-top: 28px; padding-top: 24px; border-top: 1px solid #2b3a52; color: var(--text-secondary-dk); font-size: .9375rem; }
.footer-legal { margin-top: 20px; padding: 16px 18px; background: var(--slate-surface); border-radius: var(--r-md); color: var(--text-secondary-dk); font-size: .875rem; line-height: 1.55; }

/* ==========================================================================
   Plan-markup animation
   ========================================================================== */
.bub { opacity: 0; transform: scale(.4); transform-origin: center; }
.bub.pop { animation: pop .5s var(--ease) forwards; }
@keyframes pop { to { opacity: 1; transform: scale(1); } }

.runline { stroke-dasharray: 460; stroke-dashoffset: 460; animation: draw 1.5s .7s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .bub { opacity: 1; transform: none; animation: none; }
  .runline { stroke-dashoffset: 0; animation: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero .sub { max-width: none; }
  .plan-card { order: 2; }
  .trust-strip .wrap { grid-template-columns: 1fr; gap: 16px; padding-block: 22px; }
  .steps { grid-template-columns: 1fr; }
  .package-grid { grid-template-columns: 1fr 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .funnel-grid { grid-template-columns: 1fr; gap: 32px; }
  .funnel { padding: 32px 24px; }
}

@media (max-width: 560px) {
  .section { padding-block: 56px; }
  .package-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .hero-cta .textlink { width: 100%; justify-content: center; }
}
