/* ═══════════════════════════════════════════════════════════════
   Matter Settle — Stylesheet (dual-theme)
   One file, token-driven, no preprocessor and no build step.
   Colours are defined once in the token blocks below and referenced
   everywhere via var(--token).

   ── HOW TO MODIFY ────────────────────────────────────────────────
   · ALL colors live in the token blocks below (:root = dark,
     [data-theme="light"] = light). To re-skin the whole site, edit
     tokens only — components reference var(--token) everywhere.
   · Layout sections are numbered; jump via the banner comments.
   · Add a new card? Reuse .feat-card / .uc-card / .content-card
     patterns already defined below rather than inventing new CSS.
   ═══════════════════════════════════════════════════════════════ */

/* ─── 0. FONTS ─────────────────────────────────────────────────────
   Self-hosted so the site makes ZERO third-party requests (the privacy
   notice says exactly that — if you ever switch back to a font CDN you
   must update privacy/index.html the same day).
   Both files are variable fonts: one file covers every weight.
   ────────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/space-grotesk-var.woff2') format('woff2');
  font-weight: 300 700;   /* Space Grotesk has no weight above 700 */
  font-style: normal;
  font-display: swap;
}

/* ─── 1. TOKENS ────────────────────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Background layers — deep navy, not pure black */
  --bg0: #02060f;
  --bg1: #060d1c;
  --bg2: #0a1428;
  --bg3: #0f1c34;
  --bg4: rgba(255, 255, 255, 0.03);

  /* Surfaces (cards, nav, forms) */
  --surface:      rgba(255, 255, 255, 0.02);
  --surface-hi:   rgba(255, 255, 255, 0.045);
  --nav-bg:       rgba(2, 6, 15, 0.82);
  --tooltip-bg:   rgba(6, 13, 28, 0.95);
  --shadow:       0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-sm:    0 2px 10px rgba(0, 0, 0, 0.25);

  /* Borders */
  --border:    rgba(255, 255, 255, 0.07);
  --border-md: rgba(255, 255, 255, 0.12);
  --border-hi: rgba(255, 255, 255, 0.20);

  /* Accents — violet/amber, distinct from RLAlphaLabs' cyan/blue */
  --cyan:    #a78bfa;
  --cyan-d:  rgba(167, 139, 250, 0.10);
  --cyan-dd: rgba(167, 139, 250, 0.06);
  --blue:    #f0b429;
  --blue-d:  rgba(240, 180, 41, 0.10);
  --green:   #2dd4a0;
  --green-d: rgba(45, 212, 160, 0.10);
  --amber:   #f0b429;
  --amber-d: rgba(240, 180, 41, 0.10);
  --red:     #fb7185;
  --red-d:   rgba(251, 113, 133, 0.10);

  /* Status */
  --done:    #2dd4a0;
  --active:  #a78bfa;
  --planned: #4a5d7a;

  /* Text — every step below clears WCAG AA (4.5:1) on --bg0…--bg3.
     If you change one, re-check the contrast before shipping it. */
  --t0: #f0f4ff;   /* headings */
  --t1: #c5d0e8;   /* body */
  --t2: #9fb3d0;   /* secondary   (min 7.9:1) */
  --t3: #8ba1c0;   /* muted       (min 6.4:1) */
  --t4: #7d93b4;   /* faintest    (min 5.4:1) */

  /* Type — mono is the OS monospace stack, so there is no third font to load */
  --sans: 'Inter', system-ui, sans-serif;
  --head: 'Space Grotesk', system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  /* Radii */
  --r:  10px;
  --rl: 16px;
  --rx: 24px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.25s var(--ease);

  --dot-grid: rgba(255, 255, 255, 0.028);
}

[data-theme="light"] {
  color-scheme: light;

  --bg0: #f7f8f6;
  --bg1: #eef1ee;
  --bg2: #ffffff;
  --bg3: #e4e9e6;
  --bg4: rgba(15, 23, 42, 0.03);

  --surface:    #ffffff;
  --surface-hi: #f4f7f5;
  --nav-bg:     rgba(247, 248, 246, 0.85);
  --tooltip-bg: rgba(15, 23, 42, 0.94);
  --shadow:     0 10px 34px rgba(15, 23, 42, 0.10);
  --shadow-sm:  0 2px 10px rgba(15, 23, 42, 0.07);

  --border:    rgba(15, 23, 42, 0.09);
  --border-md: rgba(15, 23, 42, 0.14);
  --border-hi: rgba(15, 23, 42, 0.22);

  /* Accents — deepened for WCAG AA on light surfaces */
  --cyan:    #7c4fe0;
  --cyan-d:  rgba(124, 79, 224, 0.10);
  --cyan-dd: rgba(124, 79, 224, 0.06);
  --blue:    #a96e08;
  --blue-d:  rgba(169, 110, 8, 0.10);
  --green:   #0d9668;
  --green-d: rgba(13, 150, 104, 0.10);
  --amber:   #a96e08;
  --amber-d: rgba(169, 110, 8, 0.10);
  --red:     #d43a55;
  --red-d:   rgba(212, 58, 85, 0.09);

  --done:    #0d9668;
  --active:  #7c4fe0;
  --planned: #94a3b8;

  --t0: #0e1626;
  --t1: #2b3a52;
  --t2: #54677f;   /* min 4.7:1 on the lightest surface */
  --t3: #556577;   /* min 4.8:1 */
  --t4: #586a80;   /* min 4.5:1 */

  --dot-grid: rgba(15, 23, 42, 0.05);
}

/* ─── 2. RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg0);
  color: var(--t1);
  font-family: var(--sans);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Theme cross-fade on structural surfaces only (skipped on first paint).
   Scoped deliberately: a blanket `div` rule would override component
   transitions (hover lifts, scroll reveals) — theme switching on small
   cards is instant instead, which is imperceptible. */
body:not(.no-transitions),
body:not(.no-transitions) section,
body:not(.no-transitions) nav,
body:not(.no-transitions) footer {
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}

/* Subtle dot-grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, var(--dot-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

::selection { background: var(--cyan-d); color: var(--t0); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg1); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

a { color: var(--cyan); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, canvas, svg { max-width: 100%; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 300;
  background: var(--cyan); color: var(--bg0);
  padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ─── 3. UTILITIES ─────────────────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

.grad {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* Gradient text is invisible in Windows High Contrast mode and in print,
   which would silently delete half of several headlines. Fall back to
   ordinary coloured text there. */
@media (forced-colors: active) {
  .grad { background: none; -webkit-text-fill-color: currentColor; color: currentColor; }
}
@media print {
  .grad { background: none; -webkit-text-fill-color: currentColor; color: #000; }
}

.mono { font-family: var(--mono); }

.sec-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
  opacity: 0.9;
}

.sec-h2 {
  font-family: var(--head);
  font-size: clamp(30px, 4.5vw, 50px);
  font-weight: 700;
  line-height: 1.12;
  color: var(--t0);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.sec-p { max-width: 720px; color: var(--t2); font-size: 17px; margin-bottom: 48px; }
.sec-p .fine, p.fine { display: block; font-size: 13px; color: var(--t4); margin-top: 10px; }

section { padding: 110px 0; position: relative; }

/* Scroll reveal — deliberately fast (0.25s, no stagger). Visitors who flick
   down the page must never scroll past content that is still fading in. */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ─── 4. CHROME — progress bar, nav, back-to-top ───────────────── */

#scrollProgress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  z-index: 210; pointer-events: none;
  transition: width 0.08s linear;
}

#navbar {
  position: sticky; top: 0; z-index: 200;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), box-shadow var(--t);
}
#navbar.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; gap: 8px;
  position: relative; z-index: 1;
}
.nav-logo {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--head); font-weight: 700; font-size: 17px; color: var(--t0);
}
/* Inline SVG monogram in the nav and footer (see /assets/favicon.svg) */
.logo-mark { color: var(--cyan); flex-shrink: 0; display: block; }
.nav-links { display: flex; list-style: none; gap: 4px; align-items: center; margin-left: auto; }
.nav-links a {
  color: var(--t2); font-size: 13.5px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: var(--t);
}
.nav-links a:hover { color: var(--t0); background: var(--surface-hi); }
.nav-links a.nav-on { color: var(--cyan); background: var(--cyan-dd); }
.nav-links a.nav-cta {
  color: var(--bg0); background: var(--cyan); font-weight: 600;
  margin-left: 6px;
}
.nav-links a.nav-cta:hover { background: var(--t0); color: var(--bg0); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-left: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; color: var(--t2);
  transition: color var(--t), border-color var(--t), transform var(--t);
}
.theme-toggle:hover { color: var(--cyan); border-color: var(--cyan); transform: rotate(15deg); }
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="dark"]  .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }

.hamburger { display: none; background: none; border: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { width: 20px; height: 2px; background: var(--t1); border-radius: 2px; transition: var(--t); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none; flex-direction: column; gap: 2px;
  position: relative; z-index: 1;
}
.mobile-menu a { color: var(--t2); padding: 10px 8px; border-radius: 8px; font-size: 15px; }
.mobile-menu a:hover { color: var(--t0); background: var(--surface-hi); }
.mobile-menu a.nav-cta { color: var(--cyan); font-weight: 600; }
.mobile-menu.open { display: flex; }

#backTop {
  position: fixed; right: 20px; bottom: 22px; z-index: 150;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-md);
  color: var(--t2); font-size: 17px;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity var(--t), transform var(--t), color var(--t), border-color var(--t);
}
#backTop.show { opacity: 1; pointer-events: auto; transform: none; }
#backTop:hover { color: var(--cyan); border-color: var(--cyan); }

/* ─── 5. BUTTONS, PILLS, TAGS ──────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--cyan); color: var(--bg0);
  font-family: var(--head);
  font-weight: 600; font-size: 15px;
  padding: 13px 28px; border-radius: 12px; border: none;
  transition: transform var(--t), box-shadow var(--t), background var(--t);
  box-shadow: 0 4px 20px var(--cyan-d);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--cyan-d); background: var(--t0); }
.btn-primary.full { width: 100%; text-align: center; }

.btn-ghost {
  display: inline-block;
  color: var(--t1); font-family: var(--head); font-weight: 500; font-size: 15px;
  padding: 13px 26px; border-radius: 12px;
  border: 1px solid var(--border-md);
  transition: var(--t);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dd); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 6px 13px; border-radius: 20px;
  border: 1px solid var(--border-md); color: var(--t2);
}

.mono-tag {
  font-family: var(--mono); font-size: 11px; color: var(--t3);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 9px; display: inline-block;
}

/* ─── 6. HERO ───────────────────────────────────────────────────── */
/* Two columns: the claim on the left, the evidence for it on the right.
   The right-hand panel is the whole point of this layout — a stranger who
   never scrolls still sees real, checkable facts. Don't replace it with
   decoration. */
#hero {
  min-height: calc(100svh - 68px);
  display: flex; align-items: center;
  padding: 56px 0 72px;
  position: relative;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 48px; align-items: center;
  position: relative; z-index: 1;
}
.hero-copy { max-width: 640px; }
.hero-pills { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.hero-h1 {
  font-family: var(--head);
  font-size: clamp(38px, 5.2vw, 60px);
  font-weight: 700; line-height: 1.06; letter-spacing: -1.5px;
  color: var(--t0); margin-bottom: 20px;
}
.hero-p { font-size: 18px; color: var(--t2); max-width: 560px; margin-bottom: 16px; }
.hero-icp {
  font-size: 15px; color: var(--t2); max-width: 560px; margin-bottom: 30px;
  border-left: 2px solid var(--cyan); padding-left: 14px;
}
.hero-icp b { color: var(--t0); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* Fold-level evidence panel (styled like a spec sheet, not a marketing card) */
.proof-panel {
  background: var(--surface); border: 1px solid var(--border-md);
  border-radius: var(--rl); padding: 22px 24px;
  box-shadow: var(--shadow);
}
.pp-head {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--t3);
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.pp-title { font-family: var(--head); font-weight: 600; font-size: 17px; color: var(--t0); margin-bottom: 16px; }
.pp-list { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 18px; }
.pp-list li { display: grid; grid-template-columns: 88px 1fr; gap: 10px; align-items: baseline; }
.pp-k {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--t3);
}
.pp-v { font-size: 13.5px; color: var(--t1); line-height: 1.5; }
.pp-v b { color: var(--cyan); font-family: var(--mono); }
.pp-link { display: inline-block; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.pp-link:hover { text-decoration: underline; }
.pp-note { font-size: 12px; color: var(--t4); border-top: 1px solid var(--border); padding-top: 12px; }

/* ─── 7. WORK / PROOF CARD ──────────────────────────────────────── */
#work { background: var(--bg1); }
.work-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rx); padding: 40px;
  transition: border-color var(--t), box-shadow var(--t);
}
.work-card:hover { border-color: var(--cyan); box-shadow: var(--shadow); }
.work-card-body h3 { font-family: var(--head); font-size: 24px; color: var(--t0); margin-bottom: 10px; }
.work-card-body p { font-size: 15px; color: var(--t2); margin-bottom: 20px; max-width: 540px; }
.rigor-list { list-style: none; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.rigor-list li { font-size: 14px; color: var(--t2); padding-left: 20px; position: relative; line-height: 1.55; }
.rigor-list li::before { content: '→'; position: absolute; left: 0; color: var(--cyan); }
.rigor-list b { color: var(--t0); }
.work-links { display: flex; gap: 14px; flex-wrap: wrap; }
.work-caption {
  margin-top: 18px; font-size: 12.5px; color: var(--t4); font-style: italic;
  border-top: 1px solid var(--border); padding-top: 16px;
}
/* ─── 8. FEATURE / SERVICE CARDS ────────────────────────────────── */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.feat-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 30px;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  overflow: hidden;
}
.feat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--ac, var(--cyan)), transparent);
  opacity: 0; transition: opacity var(--t);
}
.feat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-md); }
.feat-card:hover::before { opacity: 1; }
.feat-card[data-color="cyan"]  { --ac: var(--cyan); }
.feat-card[data-color="blue"]  { --ac: var(--blue); }
.feat-card[data-color="green"] { --ac: var(--green); }
.feat-card[data-color="amber"] { --ac: var(--amber); }
.feat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.cyan-bg  { color: var(--cyan);  background: var(--cyan-d); }
.blue-bg  { color: var(--blue);  background: var(--blue-d); }
.green-bg { color: var(--green); background: var(--green-d); }
.amber-bg { color: var(--amber); background: var(--amber-d); }
.feat-card h3 { font-family: var(--head); color: var(--t0); font-size: 19px; margin-bottom: 10px; }
.feat-card p { font-size: 14.5px; color: var(--t2); margin-bottom: 18px; }
.feat-meta { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── 9-11. HOW WE WORK — step strip + two short columns ────────────
   This section used to be three long sections of prose. It is short on
   purpose: promises about future behaviour convince nobody, so they get
   the smallest possible amount of the page. Keep it scannable. */
#process { background: var(--bg1); }

.step-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-bottom: 40px;
}
.step {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px 20px;
}
.step-n { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--cyan); display: block; margin-bottom: 8px; }
.step b { display: block; font-family: var(--head); font-size: 16px; color: var(--t0); margin-bottom: 4px; }
.step span { font-size: 13px; color: var(--t2); line-height: 1.5; }

.how-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.how-col h3 { font-family: var(--head); font-size: 18px; color: var(--t0); margin-bottom: 12px; }
.tight-list { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; }
.tight-list li { font-size: 14.5px; color: var(--t2); padding-left: 18px; position: relative; }
.tight-list li::before { content: '·'; position: absolute; left: 4px; color: var(--cyan); font-weight: 700; }
.tight-list b { color: var(--t0); }

/* ─── 12. CONTACT ───────────────────────────────────────────────── */
#contact { background: var(--bg2); }
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-left p { color: var(--t2); font-size: 15.5px; margin-bottom: 30px; max-width: 440px; }
.cform {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rx); padding: 34px;
  display: flex; flex-direction: column; gap: 18px;
}
.cform-group { display: flex; flex-direction: column; gap: 7px; }
.cform-group label { font-size: 12px; font-weight: 600; color: var(--t2); letter-spacing: 0.5px; text-transform: uppercase; }
.cform-group input, .cform-group textarea {
  background: var(--bg0); border: 1px solid var(--border-md); border-radius: var(--r);
  padding: 12px 14px; color: var(--t0); font-family: var(--sans); font-size: 14.5px;
  transition: border-color var(--t);
}
.cform-group input:focus, .cform-group textarea:focus {
  outline: none; border-color: var(--cyan);
}
.cform-group textarea { resize: vertical; }
.cform-note { font-size: 12.5px; color: var(--t3); text-align: center; }
.cform-promise {
  font-size: 13.5px; color: var(--t2); text-align: center;
  padding-top: 4px;
}
.contact-facts { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.contact-facts li { font-size: 14.5px; color: var(--t2); }
.contact-facts b { color: var(--t0); }

/* Recovery panel shown after submit. The form stays on screen underneath it:
   a mailto: link fails silently on webmail and locked-down machines, so the
   visitor must always be able to copy the text and send it themselves. */
.cform-fallback {
  margin-top: 14px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--border-md);
  border-radius: var(--rl);
}
.cform-fallback[hidden] { display: none; }
.cform-fallback b { display: block; font-family: var(--head); color: var(--t0); margin-bottom: 6px; }
.cform-fallback p { font-size: 13.5px; color: var(--t2); margin-bottom: 12px; }
.cform-fallback textarea {
  width: 100%; background: var(--bg0); border: 1px solid var(--border-md);
  border-radius: var(--r); padding: 12px 14px; color: var(--t1);
  font-family: var(--mono); font-size: 13px; resize: vertical; margin-bottom: 12px;
}
.contact-fallback { margin-top: 14px; font-size: 13.5px; color: var(--t3); text-align: center; }
.contact-privacy { margin-top: 10px; font-size: 12px; color: var(--t4); text-align: center; }
.contact-privacy a { color: var(--t3); border-bottom: 1px solid var(--border-md); }

/* ─── 13. FOOTER ─────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); background: var(--bg1); padding: 60px 0 34px; position: relative; z-index: 1; }
.footer-top { display: grid; grid-template-columns: 1.2fr 2fr; gap: 50px; margin-bottom: 44px; }
.footer-brand p { font-size: 13.5px; color: var(--t3); margin-top: 14px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.fnav-col { display: flex; flex-direction: column; gap: 9px; }
.fnav-col b { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--t4); margin-bottom: 5px; font-family: var(--mono); font-weight: 500; }
.fnav-col a { font-size: 13.5px; color: var(--t2); transition: color var(--t); }
.fnav-col a:hover { color: var(--cyan); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 26px; }
.footer-bottom p { font-size: 12.5px; color: var(--t3); }
.footer-disc { margin-top: 8px; color: var(--t4) !important; line-height: 1.6; }

/* ─── 14. SUB-PAGE HEADER / PROSE (work, privacy, 404) ─────────── */
.page-header { padding: 90px 0 46px; background: var(--bg1); border-bottom: 1px solid var(--border); }
.page-header p { max-width: 760px; color: var(--t2); font-size: 16.5px; }
.page-header .lead { font-size: 18px; color: var(--t1); }
.breadcrumbs { font-family: var(--mono); font-size: 11.5px; color: var(--t4); margin-bottom: 22px; letter-spacing: 0.5px; }
.breadcrumbs a { color: var(--t3); }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs span { margin: 0 6px; }

.page-content { padding: 64px 0 100px; }

.article-prose { max-width: 780px; }
.article-prose h2 {
  font-family: var(--head); font-size: 26px; color: var(--t0);
  margin: 44px 0 16px; letter-spacing: -0.3px;
}
.article-prose h3 {
  font-family: var(--head); font-size: 19px; color: var(--t0);
  margin: 30px 0 12px;
}
.article-prose h2:first-child, .article-prose h3:first-child { margin-top: 0; }
.article-prose p { font-size: 15.5px; color: var(--t1); margin-bottom: 16px; }
.article-prose ul, .article-prose ol { margin: 0 0 16px 22px; color: var(--t1); font-size: 15px; }
.article-prose li { margin-bottom: 7px; }
.article-prose strong { color: var(--t0); }
.article-prose a { border-bottom: 1px solid var(--cyan-d); }
.article-prose a:hover { border-bottom-color: var(--cyan); }

.callout {
  border-left: 3px solid var(--cyan);
  background: var(--surface);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 16px 22px; margin: 24px 0; font-size: 14px; color: var(--t1);
}
.callout.warn { border-left-color: var(--amber); background: var(--amber-d); }
.callout.info { border-left-color: var(--blue); background: var(--blue-d); }

.cta-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--rl);
  padding: 30px 34px; margin-top: 40px;
}
.cta-bar h3 { font-family: var(--head); color: var(--t0); font-size: 21px; margin-bottom: 6px; }
.cta-bar p { color: var(--t2); font-size: 14.5px; max-width: 520px; }
.cta-bar-links { display: flex; gap: 12px; flex-wrap: wrap; }

/* 404 page */
.error-page {
  min-height: calc(100svh - 68px);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 60px 24px;
}
.error-code { font-family: var(--head); font-size: clamp(60px, 12vw, 120px); font-weight: 700; color: var(--t0); line-height: 1; }
.error-page h1 { font-family: var(--head); font-size: 24px; color: var(--t0); margin: 12px 0 14px; }
.error-page p { color: var(--t2); font-size: 15.5px; margin-bottom: 26px; max-width: 440px; }

/* ─── 15. RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 980px) {
  /* Hero stacks: claim first, evidence panel directly under it. The panel
     must stay near the top — do not move it further down the page. */
  #hero { min-height: 0; padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy { max-width: none; }
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .theme-toggle { margin-left: auto; }
}
@media (max-width: 560px) {
  .cform, .cta-bar { padding: 24px; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
}

/* ─── 16. REDUCED MOTION ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ═══════════════════════════════════════════════════════════════
   17. MOBILE UX (≤860px / touch) — matches RLAlphaLabs' mobile pass
   ═══════════════════════════════════════════════════════════════ */
@media (hover: none) {
  body { -webkit-tap-highlight-color: transparent; }
  .feat-card:hover, .work-card:hover, .step:hover {
    transform: none; box-shadow: none;
  }
}

@media (max-width: 860px) {
  body { line-height: 1.65; }
  section { padding: 72px 0; }
  .container { padding: 0 20px; }
  .sec-p { font-size: 16px; margin-bottom: 38px; }

  #hero { padding: 40px 0 56px; }
  .hero-h1 { font-size: clamp(34px, 9.6vw, 46px); letter-spacing: -1px; margin-bottom: 16px; }
  .hero-p { font-size: 16px; margin-bottom: 14px; }
  .hero-icp { font-size: 14.5px; margin-bottom: 24px; }
  .hero-pills { margin-bottom: 20px; }
  .hero-ctas { flex-direction: column; gap: 12px; }
  .hero-ctas .btn-primary, .hero-ctas .btn-ghost { width: 100%; text-align: center; padding: 15px 28px; font-size: 16px; }
  .proof-panel { padding: 20px; }
  .pp-list li { grid-template-columns: 1fr; gap: 2px; }

  /* 44px minimum touch target — same floor as .mobile-menu a and #backTop */
  .theme-toggle { width: 44px; height: 44px; }
  .hamburger { padding: 14px 12px; margin-right: -12px; }

  .mobile-menu {
    display: flex;
    max-height: 0; overflow: hidden;
    padding: 0 20px;
    border-bottom: 1px solid transparent;
    transition: max-height 0.32s var(--ease), padding 0.32s var(--ease), border-color 0.32s var(--ease);
  }
  .mobile-menu.open { max-height: 520px; padding: 8px 20px 16px; border-bottom-color: var(--border); }
  .mobile-menu a { min-height: 48px; display: flex; align-items: center; font-size: 16px; }

  .menu-backdrop {
    position: fixed; inset: 0; z-index: 190;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }
  .menu-backdrop.show { opacity: 1; pointer-events: auto; }

  .feat-grid, .step-strip { gap: 14px; }
  .feat-card { padding: 24px 22px; }
  .work-card { padding: 26px 22px; }
  .cform { padding: 26px 22px; }

  /* iOS: inputs < 16px trigger focus zoom — prevent it */
  .cform-group input, .cform-group textarea { font-size: 16px; }

  #backTop {
    width: 44px; height: 44px; right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
  /* The sticky CTA bar occupies the bottom of the screen on the homepage;
     lift the back-to-top button above it so the two never overlap.
     js/main.js adds .has-mobile-cta to <body> when it creates that bar. */
  body.has-mobile-cta #backTop {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  #mobileCta {
    position: fixed; left: 14px; right: 14px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 180;
    transform: translateY(140%);
    transition: transform 0.35s var(--ease);
  }
  #mobileCta.show { transform: none; }
  #mobileCta .btn-primary {
    display: block; width: 100%; text-align: center;
    padding: 15px; font-size: 16px; border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  }

  footer { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 560px) {
  .hero-h1 { letter-spacing: -0.8px; }
  .cta-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .cta-bar .btn-primary { width: 100%; }
}
