/* =================================================================
   Continuum Landing — Shared Design System
   One source of truth for tokens, layout, header, footer, forms.
   Link from: /, /expert, /build, /invest, /wemet
   DO NOT link from: /traverse, /traverse-scroll
   ================================================================= */

/* ── TOKENS ─────────────────────────────────────────────────────── */
:root {
  /* Surface palette */
  --navy:      #0B0F19;
  --navy-soft: #111726;
  --gold:      #D4A843;
  --gold-dim:  rgba(212,168,67,0.10);
  --gold-mid:  rgba(212,168,67,0.35);
  --faint:     rgba(255,255,255,0.40);
  --line:      rgba(255,255,255,0.10);

  /* Semantic text / UI tokens — spec-defined */
  --color-heading: #FFFFFF;
  --color-body:    rgba(255,255,255,0.88);
  --color-muted:   rgba(255,255,255,0.65);
  --color-accent:  #D4A843;

  /* Wordmark spectrum (multi-colour rainbow — do not remap) */
  --c1:#1565C0; --c2:#00BCD4; --c3:#4CAF50; --c4:#8BC34A;
  --c5:#FFEB3B; --c6:#FFC107; --c7:#FF9800; --c8:#FF5722; --c9:#F44336;

  /* Typefaces */
  --font-display: 'Jost', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Type scale — desktop */
  --text-h1:        60px;
  --text-h2:        40px;
  --text-h3:        24px;
  --text-lead:      22px;
  --text-body:      19px;
  --text-secondary: 16px;
  --text-caption:   15px;
  --text-eyebrow:   13px;

  /* Section vertical rhythm */
  --section-v: 96px;
}

/* Mobile token overrides */
@media (max-width: 768px) {
  :root {
    --text-h1:   34px;
    --text-h2:   26px;
    --text-h3:   20px;
    --text-lead: 19px;
    --text-body: 17px;
    /* --text-secondary, --text-caption, --text-eyebrow unchanged (floor) */
    --section-v: 60px;
  }
}

/* ── GLOBAL RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--color-heading);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── BACKGROUND FX ──────────────────────────────────────────────── */
.atmosphere {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 20% 12%, rgba(21,101,192,0.16), transparent 42%),
    radial-gradient(circle at 86% 78%, rgba(244,67,54,0.10), transparent 46%),
    radial-gradient(circle at 50% 50%, rgba(212,168,67,0.05), transparent 60%);
}
.stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 32% 64%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 58% 18%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 74% 52%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 88% 30%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 22% 90%, rgba(255,255,255,0.5), transparent);
  opacity: 0.5;
}

/* ── LAYOUT ─────────────────────────────────────────────────────── */
.wrap { position: relative; z-index: 1; }

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: var(--section-v) 0; }

/* ── HEADER ─────────────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11,15,25,0.72);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 80px;
  min-width: 0;
}

.brand-row {
  display: flex; align-items: center; gap: 7px;
  text-decoration: none;
  min-width: 0; flex-shrink: 1;
}

.bracket {
  font-family: var(--font-display); font-weight: 700;
  line-height: 1; flex-shrink: 0;
}
.bracket.left  { color: var(--c1); }
.bracket.right { color: var(--c9); }

.wordmark {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: 0.05em; display: flex; line-height: 1;
}
.wordmark span:nth-child(1){color:var(--c1)} .wordmark span:nth-child(2){color:var(--c2)}
.wordmark span:nth-child(3){color:var(--c3)} .wordmark span:nth-child(4){color:var(--c4)}
.wordmark span:nth-child(5){color:var(--c5)} .wordmark span:nth-child(6){color:var(--c6)}
.wordmark span:nth-child(7){color:var(--c7)} .wordmark span:nth-child(8){color:var(--c8)}
.wordmark span:nth-child(9){color:var(--c9)}

/* Header wordmark: mobile-first, scales with viewport, capped on desktop */
.bar .bracket  { font-size: clamp(22px, 6vw, 48px); }
.bar .wordmark { font-size: clamp(18px, 5vw, 40px); }

.back-link {
  font-family: var(--font-mono); font-size: var(--text-eyebrow);
  letter-spacing: 0.06em; color: var(--color-muted);
  text-decoration: none; transition: color 0.15s;
  flex-shrink: 0;
  min-height: 44px; display: inline-flex; align-items: center;
}
.back-link:hover { color: var(--color-heading); }

.nav-sub {
  font-family: var(--font-mono); font-size: var(--text-eyebrow);
  letter-spacing: 0.22em; color: var(--color-accent);
  text-transform: uppercase; flex-shrink: 0;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────────────── */
.kicker {
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: 0.28em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin: 0 0 22px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--color-heading);
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); line-height: 1.12; }
h3 { font-size: var(--text-h3); line-height: 1.25; }

p.lead {
  font-size: var(--text-lead);
  color: var(--color-body);
  max-width: 640px;
  margin: 24px 0 0;
  line-height: 1.6;
}

/* ── FORMS ──────────────────────────────────────────────────────── */
form { margin-top: 36px; max-width: 520px; }
.field { margin-bottom: 18px; }

label {
  display: block;
  font-family: var(--font-mono); font-size: var(--text-eyebrow);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 8px;
}

input, textarea, select {
  width: 100%;
  background: var(--navy-soft);
  border: 1px solid var(--line); border-radius: 6px;
  color: var(--color-heading);
  font-family: var(--font-display); font-size: 16px;
  padding: 13px 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(212,168,67,0.14);
}

/* ── FOCUS-VISIBLE (keyboard navigation) ───────────────────────── */
a:focus-visible,
button:focus-visible,
.submit:focus-visible,
.back-link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── SKIP LINK ──────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: 8px;
  top: -56px;
  z-index: 200;
  background: var(--color-accent);
  color: var(--navy);
  padding: 10px 16px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }
select option { background: var(--navy-soft); }
textarea { resize: vertical; min-height: 96px; }

.submit {
  font-family: var(--font-mono); font-size: var(--text-caption);
  letter-spacing: 0.06em;
  background: var(--color-accent); color: var(--navy);
  border: none; border-radius: 6px;
  padding: 15px 28px; font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 44px;
}
.submit:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(212,168,67,0.3); }

.confirm {
  display: none; margin-top: 24px; padding: 22px 24px;
  border: 1px solid rgba(212,168,67,0.4); border-radius: 8px;
  background: rgba(212,168,67,0.07);
}
.confirm.show { display: block; animation: fade 0.5s ease both; }
.confirm .mono {
  font-family: var(--font-mono); color: var(--color-accent);
  font-size: var(--text-eyebrow); letter-spacing: 0.14em;
}
.confirm p { margin: 8px 0 0; color: var(--color-heading); }

/* ── FOOTER ─────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
}
.foot-row { display: flex; flex-direction: column; gap: 16px; }
.foot-brand { display: flex; align-items: center; gap: 6px; }
.foot-brand .bracket { font-size: 17px; }
.foot-brand .wordmark { font-size: 15px; }
.foot-sub {
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: 0.34em; font-size: 10px;
  color: var(--color-accent); margin-left: 6px;
}
.foot-meta {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--faint); line-height: 1.9;
}
.foot-meta .b { color: var(--c1); }
.foot-meta .r { color: var(--c9); }
.foot-meta a { color: inherit; text-decoration: none; transition: color 0.15s; }
.foot-meta a:hover { color: var(--color-accent); }
.foot-links { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
.foot-links a { color: var(--color-muted); text-decoration: none; transition: color 0.15s; }
.foot-links a:hover { color: var(--color-accent); }

/* ── SCROLL REVEAL ──────────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in  { opacity: 1; transform: none; }
.d1 { transition-delay: 0.05s; }
.d2 { transition-delay: 0.15s; }
.d3 { transition-delay: 0.25s; }
.d4 { transition-delay: 0.35s; }
.d5 { transition-delay: 0.45s; }

@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ── SECTION MARK ── typewriter [ kicker text ] in gold ─────────── */
.section-mark {
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin: 0 0 22px;
  min-height: 1.4em;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .confirm.show { animation: none; }
  html { scroll-behavior: auto; }
}

/* ── DESKTOP LAYOUT OVERRIDES (≥ 769 px) ────────────────────────── */
@media (min-width: 769px) {
  .foot-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
