/* =========================================================
   combined — best-of v3b (look) + v4c (info) + v7c (features)
   Terminal-cyberpunk base, Geist + Geist Mono, single warm-orange accent.
   Fully tokenized so a [data-theme="light"] flip re-skins the whole page.
   Ported in: v4c signals grid + Nexos rank-card + 3-stage how-it-works,
   and v7c interactive surfaces (modal / embed / wallet / banner / toast).
   ========================================================= */

:root,
[data-theme="dark"] {
  /* Surface */
  --bg: #0a0a0a;
  --bg-deep: #080808;
  --surface: #111111;
  --surface-2: #161616;
  --border: #1f1f1f;
  --border-hi: #2a2a2a;
  --border-dashed: #1f1f1f;

  /* Type */
  --text: #fafafa;
  --text-body: #a1a1a1;
  --text-muted: #5a5a5a;
  --text-dim: #3d3d3d;

  /* Accent — MomentScience warm orange */
  --accent: #fe4215;
  --accent-ink: #fe4215; /* accent text readable on --bg */
  --accent-soft: rgba(254, 66, 21, 0.4);
  --accent-faint: rgba(254, 66, 21, 0.12);
  --accent-glow: rgba(254, 66, 21, 0.55);

  /* Marketplace diagram — demand = accent orange, supply = cool blue, moment = blend */
  --demand: var(--accent);
  --demand-ink: var(--accent-ink);
  --demand-edge: rgba(254, 66, 21, 0.32);
  --supply: #5b9bff;
  --supply-ink: #7db0ff; /* readable on dark */
  --supply-edge: rgba(91, 155, 255, 0.32);
  --moment-ink: #b98bff; /* purple blend for "the moment" node */
  --moment-edge: rgba(160, 120, 255, 0.4);
  --on-accent: #0a0a0a; /* text/icon on a solid accent fill */

  /* Syntax */
  --syn-string: #98c379;
  --syn-prop: #61afef;
  --syn-num: #e5c07b;
  --syn-method: #c678dd;
  --syn-comment: #5a5a5a;
  --syn-green: #4ade80;
  --green-glow: rgba(74, 222, 128, 0.55);

  /* Inverted slab (how-it-works) — in dark mode it's a touch lighter than bg */
  --slab-bg: #050505;
  --slab-text: #fafafa;
  --slab-text-soft: #a1a1a1;
  --slab-rule: rgba(255, 255, 255, 0.12);

  /* Grain + scanlines visible only in dark */
  --grain-opacity: 0.04;
  --scanline-color: rgba(255, 255, 255, 0.012);

  /* Mock illustration chrome (v7c) */
  --mock-bg: #0d0d0d;
  --mock-panel: #161616;
  --mock-line: #2a2a2a;

  /* Floating-UI scrim + shadow */
  --scrim: rgba(0, 0, 0, 0.66);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.45);

  --color-scheme: dark;
}

[data-theme="light"] {
  /* Warm-paper light mode — borrows v4c's cream ground so it reads intentional. */
  --bg: #f6f2e9;
  --bg-deep: #efe9da;
  --surface: #fffdf8;
  --surface-2: #f1ebdd;
  --border: #ddd3c0;
  --border-hi: #c4b79e;
  --border-dashed: #cabda4;

  --text: #1d1c19;
  --text-body: #45423b;
  --text-muted: #756e62;
  --text-dim: #9c9484;

  --accent: #fe4215;
  --accent-ink: #c7371e; /* darker orange for AA text on cream */
  --accent-soft: rgba(254, 66, 21, 0.28);
  --accent-faint: rgba(254, 66, 21, 0.1);
  --accent-glow: rgba(254, 66, 21, 0.32);
  --on-accent: #ffffff;

  /* Marketplace diagram — darker supply/moment inks for AA on cream */
  --demand: var(--accent);
  --demand-ink: var(--accent-ink);
  --demand-edge: rgba(254, 66, 21, 0.28);
  --supply: #2f6fb0;
  --supply-ink: #2563a8;
  --supply-edge: rgba(47, 111, 176, 0.28);
  --moment-ink: #7a4bd0;
  --moment-edge: rgba(122, 75, 208, 0.32);

  /* Syntax recoloured for a light terminal (still legible, lower chroma) */
  --syn-string: #4a7c2f;
  --syn-prop: #2f6fb0;
  --syn-num: #9a6b16;
  --syn-method: #8a4bbd;
  --syn-comment: #9c9484;
  --syn-green: #1f7a3d;
  --green-glow: rgba(31, 122, 61, 0.28);

  /* Inverted slab stays dark ink in light mode (v4c "how" treatment) */
  --slab-bg: #1d1c19;
  --slab-text: #f6f2e9;
  --slab-text-soft: rgba(246, 242, 233, 0.74);
  --slab-rule: rgba(243, 237, 226, 0.22);

  --grain-opacity: 0;
  --scanline-color: rgba(0, 0, 0, 0.025);

  --mock-bg: #efe9da;
  --mock-panel: #fffdf8;
  --mock-line: #d8cdb6;

  --scrim: rgba(29, 28, 25, 0.5);
  --shadow-modal: 0 24px 56px rgba(29, 28, 25, 0.22);
  --shadow-card: 0 12px 32px rgba(29, 28, 25, 0.12);

  --color-scheme: light;
}

:root {
  /* Type stacks */
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Radii */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-pill: 9999px;

  /* Layout */
  --container: 1200px;
  --container-pad: 32px;

  /* Spacing (4px scale — used by ported v7c surfaces) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 320ms;
}

/* -------- Reset / base -------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  color-scheme: var(--color-scheme);
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
  transition:
    background 240ms ease,
    color 240ms ease;
}

/* Grain overlay — fades to 0 in light mode */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: var(--grain-opacity);
}

.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--scanline-color) 0px,
    var(--scanline-color) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 1;
}

main,
header,
footer {
  position: relative;
  z-index: 2;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button {
  font: inherit;
  border: 0;
  background: 0;
  cursor: pointer;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* -------- Utilities -------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  z-index: 100;
}
.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 13px;
  border-radius: var(--r-sm);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

body.body-lock {
  overflow: hidden;
}

/* -------- Header -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand img {
  filter: brightness(0) invert(1);
  height: 22px;
  width: auto;
}
[data-theme="light"] .brand img,
[data-theme="light"] .footer-brand img {
  filter: none;
}

.nav-primary ul {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: center;
}
.nav-primary a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-body);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 120ms ease;
}
.nav-primary a:hover {
  color: var(--text);
}
.nav-primary a.is-active {
  color: var(--text);
}
.nav-primary a.is-active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.link-quiet {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-body);
  padding: 6px 8px;
  border-radius: var(--r-sm);
  transition: color 120ms ease;
}
.link-quiet:hover {
  color: var(--text);
}

.cmdk {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  transition:
    border-color 120ms ease,
    color 120ms ease;
}
.cmdk:hover {
  border-color: var(--border-hi);
  color: var(--text-body);
}
.cmdk kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 5px;
  border: 1px solid var(--border-hi);
  border-radius: 3px;
  color: var(--text);
  background: var(--bg);
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-body);
  transition:
    border-color 120ms ease,
    color 120ms ease,
    background 120ms ease;
}
.theme-toggle:hover {
  border-color: var(--border-hi);
  color: var(--text);
}
.theme-toggle svg {
  width: 17px;
  height: 17px;
}
/* Show sun in dark mode (to switch → light), moon in light mode */
.theme-toggle .icon-moon {
  display: none;
}
.theme-toggle .icon-sun {
  display: block;
}
[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}
[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* -------- Buttons -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition:
    transform 120ms ease,
    box-shadow 160ms ease,
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    filter 120ms ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 0 24px var(--accent-soft);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 36px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-hi);
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.btn-lg {
  padding: 13px 20px;
  font-size: 15px;
}
.btn-md {
  padding: 11px 16px;
  font-size: 14px;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* -------- Hero -------- */
.hero {
  position: relative;
  padding: 80px 0 96px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-body);
  text-transform: uppercase;
}
.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--syn-green);
  box-shadow: 0 0 8px var(--green-glow);
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(48px, 7.5vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 24px;
}
.hero h1 .line {
  display: block;
}
.hero h1 .accent-word {
  color: var(--accent-ink);
  position: relative;
}

.cursor {
  display: inline-block;
  width: 0.5ch;
  height: 0.95em;
  margin-left: 6px;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent-soft);
  vertical-align: -0.06em;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink {
  to {
    visibility: hidden;
  }
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-body);
  max-width: 56ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================================================
   Marketplace match diagram (hero right side, ported from v2a)
   Re-skinned to combined tokens: demand=orange, supply=blue,
   moment=blend. Theme-flips via the shared tokens.
   ========================================================= */
.hero-diagram-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.diagram-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.diagram-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.diagram-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--moment-ink);
  box-shadow: 0 0 0 3px var(--moment-edge);
}
.diagram-h {
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
}
.diagram-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  padding: 20px;
  background: var(--surface-2);
}
.side {
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--border);
}
.side-demand {
  border-color: var(--demand-edge);
}
.side-supply {
  border-color: var(--supply-edge);
}
.side-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}
.side-demand .side-tag {
  color: var(--demand-ink);
}
.side-supply .side-tag {
  color: var(--supply-ink);
}
.side-title {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.side-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-list li {
  /* Stack name above meta so neither has to share a narrow row — avoids the
     awkward mid-word wrapping ("1 month / free / · CPA") in the slim columns. */
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 13px;
}
.side-name {
  font-weight: 600;
  color: var(--text);
}
.side-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.side-stat {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.side-stat .metric {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.side-demand .metric {
  color: var(--demand-ink);
}
.side-supply .metric {
  color: var(--supply-ink);
}
.side-stat .metric-lbl {
  font-size: 12px;
  color: var(--text-muted);
}
.bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 6px;
  min-width: 0;
  /* Lift the whole bridge above the two side cards so the node floats on top */
  position: relative;
  z-index: 2;
}
.bridge-line {
  flex: 1;
  width: 2px;
  border-radius: 2px;
  min-height: 20px;
}
.bridge-line-top {
  background: linear-gradient(to bottom, transparent, var(--demand) 40%, var(--moment-ink));
}
.bridge-line-bot {
  background: linear-gradient(to top, transparent, var(--supply) 40%, var(--moment-ink));
}
.bridge-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--moment-edge);
  border-radius: 16px;
  /* Float on top of both side cards, centered over the gap */
  position: relative;
  z-index: 3;
  box-shadow:
    0 0 0 4px var(--bg),
    0 8px 22px -6px var(--moment-edge);
  white-space: nowrap;
  text-align: center;
}
.bridge-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--moment-ink);
  letter-spacing: -0.01em;
}
/* Sub stacks onto two centered lines (Nexos / 0.91 conf) so the pill stays
   narrow and the two side columns get more room. */
.bridge-sub {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.diagram-foot {
  padding: 12px 24px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.diagram-foot p {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* Docs link directly below the marketplace diagram */
.term-docs-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 4px 2px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--text-body);
  border-radius: var(--r-sm);
  transition: color 140ms ease;
}
.term-docs-link:hover {
  color: var(--text);
}
.term-docs-link .term-docs-glyph {
  color: var(--accent-ink);
  font-weight: 600;
}
.term-docs-link .term-docs-arrow {
  color: var(--text-muted);
  transition: transform 140ms ease;
}
.term-docs-link:hover .term-docs-arrow {
  transform: translateX(3px);
  color: var(--accent-ink);
}
.diagram-docs-link {
  margin-top: 2px;
  align-self: flex-start;
}

/* -------- Metrics bar -------- */
.metrics {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 32px 0;
}
.metric {
  padding: 4px 28px;
  border-left: 1px solid var(--border);
}
.metric:first-child {
  border-left: 0;
  padding-left: 0;
}
.metric .label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.metric .value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1;
}
.metric .value .unit {
  color: var(--text-muted);
  font-size: 0.55em;
  margin-left: 2px;
}
.metric .delta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--syn-green);
  margin-top: 10px;
  letter-spacing: 0.02em;
}
.metric .delta.neutral {
  color: var(--text-muted);
}

/* -------- Trust bar — auto-scroll marquee -------- */
.trust {
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  overflow: hidden;
}
.trust-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.trust-label .trust-label-split {
  color: var(--text-dim);
  margin: 0 8px;
}

/* The viewport: full-bleed, fades at both edges */
.marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}
/* The moving track: two identical sequences side by side → seamless loop.
   Promoted to its own GPU compositor layer (translate3d + will-change +
   backface-visibility) so the scroll is painted once and merely transformed,
   which removes per-frame repaint stutter. */
.marquee-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: marquee-scroll var(--marquee-duration, 60s) linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}
/* Keep scrolling on hover (don't pause). Still pause when a logo is keyboard-
   focused, as an accessibility affordance. */
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}
.marquee-seq {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
@keyframes marquee-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.trust-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Fixed-height box so the track width is locked before logos decode — no
     reflow, no load-time stutter. Width is intrinsic so each logo keeps its
     own aspect ratio (assets are pre-trimmed to remove letterbox padding). */
  height: 96px;
  padding: 0 26px;
  flex-shrink: 0;
}
.trust-logo img {
  height: 54px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  /* Chipless: every logo is a trimmed, transparent PNG floating on the dark
     strip in full brand color. A tight white edge-light lifts dark wordmarks/
     marks (Chase, Micro Center, AdAction, Truist…) off the dark background
     without drawing a visible box. Kept small-radius on purpose — a wide glow
     pools into a rectangle behind dense colored wordmarks (textnow, etc.). */
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.85))
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
  transition: filter 200ms ease;
}
.trust-logo:hover img {
  /* Warm + slightly expand the edge-light on hover. */
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 8px rgba(255, 150, 60, 0.35));
}
[data-theme="light"] .trust-logo img {
  /* On the cream light theme the bright halo would muddy light logos — swap to
     a soft dark shadow so logos still get gentle definition. */
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18)) drop-shadow(0 0 10px rgba(0, 0, 0, 0.08));
}
[data-theme="light"] .trust-logo:hover img {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28)) drop-shadow(0 0 14px rgba(255, 120, 40, 0.22));
}
/* Fallback wordmark shown if a logo image fails to load (set by JS) */
.trust-logo .trust-wordmark {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    overflow-x: auto;
  }
  .marquee-track {
    animation: none;
  }
}

/* -------- Section heads -------- */
.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}
.section-head {
  max-width: 760px;
  margin-bottom: 56px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 16px;
}
.section h2 {
  font-family: var(--font-sans);
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
}
.section-lede {
  font-size: 18px;
  color: var(--text-body);
  max-width: 60ch;
}

/* -------- Platform cards -------- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.platform-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition:
    border-color 160ms ease,
    transform 160ms ease;
}
.platform-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}
.card-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.platform-card h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 24px;
  color: var(--text);
  letter-spacing: -0.015em;
}
.platform-card > p {
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.6;
  flex: 1;
}
.kv-meta {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-hi);
  display: grid;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-body);
}
.kv-meta .k {
  color: var(--text-muted);
}
.kv-meta .arrow {
  color: var(--text-muted);
  margin: 0 6px;
}
.kv-meta .v {
  color: var(--text);
}
.kv-meta .v-accent {
  color: var(--accent-ink);
}

/* =========================================================
   Nexos ranking figure (ported from v4c .rank-card)
   Re-expressed against combined tokens so it theme-flips.
   ========================================================= */
.rank-section .rank-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.rank-aside .eyebrow {
  margin-bottom: 16px;
}
.rank-aside h2 {
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.rank-aside p {
  font-size: 16px;
  color: var(--text-body);
  max-width: 42ch;
}
.rank-aside .footnotes {
  margin-top: 24px;
  display: grid;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
}
.fn-ref {
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.7em;
  vertical-align: super;
  padding: 0 1px;
}

.rank-card {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  padding: 24px;
}
.rank-head {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.rank-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.rank-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-body);
}
.rank-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--syn-green);
  box-shadow: 0 0 8px var(--green-glow);
}
.rank-time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--accent-ink);
}
.rank-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}
.rank-table {
  width: 100%;
  border-collapse: collapse;
}
.rank-table thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: left;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-hi);
}
.rank-table .rank-num-col {
  text-align: right;
}
.rank-row th,
.rank-row td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: baseline;
}
.rank-row:last-child th,
.rank-row:last-child td {
  border-bottom: 0;
}
.rank-name {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 14px;
  color: var(--text-body);
  text-align: left;
}
.rank-bar {
  display: block;
  margin-top: 8px;
  height: 4px;
  width: 100%;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.rank-fill {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--border-hi);
}
.rank-row-picked .rank-fill {
  background: var(--accent);
}
.rank-row-picked .rank-name {
  font-weight: 600;
  color: var(--text);
}
.rank-score {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text-body);
  text-align: right;
  white-space: nowrap;
  padding-left: 16px !important;
}
.rank-row-picked .rank-score {
  color: var(--accent-ink);
  font-weight: 600;
}
.rank-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-hi);
}
.rank-foot-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
}
.rank-foot-value {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-body);
}
.fig-caption {
  margin-top: 16px;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}
.fig-label {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--text-body);
}

/* =========================================================
   "What the model sees" signals grid (ported from v4c .signals)
   ========================================================= */
.signals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.signal-card {
  padding: 0 32px;
  border-left: 1px solid var(--border-hi);
}
.signal-card:first-child {
  border-left: 0;
  padding-left: 0;
}
.signal-card:last-child {
  padding-right: 0;
}
.signal-mark {
  font-family: var(--font-mono);
  font-size: 16px;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--accent-ink);
  margin-bottom: 16px;
}
.signal-card h3 {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.signal-lede {
  font-style: italic;
  color: var(--text-body);
  margin-bottom: 24px;
  max-width: 32ch;
}
.signal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.signal-list li {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}
.signal-key {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

/* =========================================================
   How it works — 3 numbered stages on an inverted slab (v4c .how)
   ========================================================= */
.how {
  padding: 96px 0;
  background: var(--slab-bg);
  color: var(--slab-text-soft);
  border-bottom: 1px solid var(--border);
}
.how .eyebrow {
  color: var(--accent);
}
.how .section-head h2 {
  color: var(--slab-text);
}
.how-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
.how-steps li {
  counter-increment: step;
  position: relative;
  padding-top: 48px;
  border-top: 1px solid var(--slab-rule);
}
.how-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 12px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--accent);
}
.how-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slab-text-soft);
  margin-bottom: 12px;
}
.how-steps h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  color: var(--slab-text);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.how-steps p {
  font-size: 15px;
  color: var(--slab-text-soft);
  max-width: 34ch;
}

/* =========================================================
   Interactive surfaces section (ported from v7c)
   ========================================================= */
.surfaces .section-head {
  max-width: 760px;
}
.surface-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.surface-card {
  display: grid;
  grid-template-columns: minmax(150px, 200px) 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition:
    border-color var(--t-base) var(--ease),
    transform var(--t-base) var(--ease);
}
.surface-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}
.surface-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-ink);
  margin: 0 0 8px;
}
.surface-meta h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.surface-meta > p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.55;
  margin-bottom: 20px;
  max-width: 44ch;
}

/* Mockups (CSS illustrations) — re-skinned to dark/cream chrome */
.mockup {
  background: var(--mock-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  padding: 12px;
}
.mock-browser {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: var(--mock-panel);
  border: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  border-bottom: 0;
}
.mock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mock-line);
}
.mock-url {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}
.mock-page {
  background: var(--mock-panel);
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: calc(100% - 22px);
}
.mock-line {
  height: 6px;
  background: var(--mock-line);
  border-radius: 3px;
}
.mock-line.w30 {
  width: 30%;
}
.mock-line.w40 {
  width: 40%;
}
.mock-line.w50 {
  width: 50%;
}
.mock-line.w60 {
  width: 60%;
}
.mock-line.w70 {
  width: 70%;
}
.mock-line.w80 {
  width: 80%;
}
.mock-modal {
  position: absolute;
  inset: 30% 18% 14%;
  background: var(--mock-panel);
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mock-modal-hero {
  height: 38%;
  background: var(--accent);
}
.mock-modal-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.mock-btn {
  margin-top: auto;
  height: 10px;
  width: 50%;
  background: var(--accent);
  border-radius: 3px;
}
.mockup-embed {
  display: flex;
  align-items: center;
  justify-content: center;
}
.mock-phone {
  width: 56%;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 16px;
  padding: 6px;
  position: relative;
  box-shadow: var(--shadow-card);
}
.mock-phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 6px;
  background: #000;
  border-radius: 4px;
  z-index: 2;
}
.mock-phone-screen {
  background: var(--mock-panel);
  border-radius: 11px;
  height: 100%;
  padding: 14px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mock-embed-card {
  margin-top: auto;
  background: var(--mock-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.mock-embed-logo {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent);
  flex-shrink: 0;
}
.mock-embed-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mockup-wallet {
  display: flex;
  align-items: center;
  justify-content: center;
}
.mock-app {
  width: 78%;
  height: 84%;
  background: var(--mock-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-card);
}
.mock-app-bar {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.mock-perk {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}
.mock-perk-logo {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--accent);
}
.mock-perk-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mock-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  padding: 6px 8px;
  margin-inline: -1px;
}
.mock-banner-logo {
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  flex-shrink: 0;
}
.mock-banner .mock-line {
  background: rgba(255, 255, 255, 0.75);
}
.mock-banner-btn {
  margin-left: auto;
  width: 28px;
  height: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 3px;
  flex-shrink: 0;
}
.mockup-banner .mock-page {
  border-radius: 0 0 6px 6px;
}

/* Live embed preview section */
.live-section {
  padding: 96px 0;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}
.live-section .section-head {
  max-width: 760px;
}
.live-embed {
  max-width: 720px;
  margin-inline: auto;
}
.live-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* Offer embed card (built by app.js) */
.offer-embed {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
@media (max-width: 640px) {
  .offer-embed {
    grid-template-columns: auto 1fr;
    gap: 16px;
  }
  .offer-embed .offer-embed-action {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
  .offer-embed .offer-embed-action .btn {
    width: 100%;
  }
}
.offer-embed-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.offer-embed-logo img {
  width: 32px;
  height: 32px;
}
.offer-embed-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 2px;
}
.offer-embed-headline {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.offer-embed-sub {
  margin-top: 2px;
  font-size: 14px;
  color: var(--text-body);
}
.offer-embed-terms {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.offer-embed-action .btn {
  background: var(--accent);
  color: #fff;
}
.offer-embed-action .btn:hover {
  filter: brightness(0.92);
}

/* -------- Audience split (v3b) -------- */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.audience-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
}
.audience-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  padding: 4px 8px;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  margin-bottom: 20px;
}
.audience-card h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.15;
}
.audience-card > p {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 22px;
}
.check-list {
  display: grid;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.check-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  color: var(--text-body);
  align-items: baseline;
}
.check-list .ok {
  color: var(--syn-green);
}

/* -------- Quote -------- */
.quote-block {
  background: var(--bg);
}
.pull-quote {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 22ch;
  margin: 0;
}
.pull-quote::before {
  content: "\201C";
  color: var(--accent-ink);
  margin-right: 4px;
}
.pull-quote::after {
  content: "\201D";
  color: var(--accent-ink);
  margin-left: 2px;
}
.quote-meta {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.quote-meta .name {
  color: var(--text);
  margin-right: 12px;
}

/* -------- CTA — CLI prompt -------- */
.cta-cli {
  padding: 96px 0;
  border-bottom: 1px solid var(--border);
}
.cli-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.6vw, 28px);
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    padding 200ms ease;
}
.cli-shell:hover {
  border-color: var(--accent);
  box-shadow: 0 0 32px var(--accent-soft);
  padding: 32px 32px;
}
.cli-shell .glyph {
  color: var(--accent-ink);
}
.cli-shell .cmd {
  color: var(--text);
}
.cli-shell .slash {
  color: var(--text-muted);
}
.cli-shell .cursor-cli {
  width: 0.55ch;
  height: 1.1em;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-soft);
  display: inline-block;
  animation: blink 1s steps(2, start) infinite;
  vertical-align: -0.12em;
  margin-left: 4px;
}
.cli-meta {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* =========================================================
   Contact page
   ========================================================= */
.contact-hero {
  padding: 80px 0 40px;
  text-align: center;
}
.contact-hero .eyebrow {
  margin-bottom: 12px;
}
.contact-hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text);
  max-width: 20ch;
  margin: 0 auto 18px;
}
.contact-hero h1 .accent-word {
  color: var(--accent-ink);
}
.contact-hero p {
  font-size: 18px;
  color: var(--text-body);
  max-width: 52ch;
  margin: 0 auto;
}

.contact-wrap {
  padding: 24px 0 112px;
}
.contact-form {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.field {
  display: grid;
  gap: 8px;
}
.field.col-span {
  grid-column: 1 / -1;
}
.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-body);
}
.field label .req {
  color: var(--accent-ink);
  margin-left: 2px;
}
.field input,
.field textarea,
.field select {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  width: 100%;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}
.field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-dim);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #ef4444;
}
.field .error-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #f87171;
  min-height: 0;
}

/* Phone with country prefix */
.phone-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}
.phone-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}
.phone-group select {
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface-2);
  width: auto;
  padding: 12px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-body);
}
.phone-group select:focus {
  box-shadow: none;
}
.phone-group input {
  border: 0;
  border-radius: 0;
  flex: 1;
}
.phone-group input:focus {
  box-shadow: none;
}

/* "How did you hear" radio group */
.radio-legend {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-body);
  margin-bottom: 14px;
  padding: 0;
}
.radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.radio-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-body);
  transition:
    border-color 120ms ease,
    color 120ms ease;
}
.radio-pill:hover {
  border-color: var(--border-hi);
  color: var(--text);
}
.radio-pill input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 2px solid var(--border-hi);
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-color 120ms ease;
}
.radio-pill input:checked {
  border-color: var(--accent);
  border-width: 5px;
}
.radio-pill:has(input:checked) {
  border-color: var(--accent);
  color: var(--text);
}
.radio-pill input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.contact-actions .btn-primary {
  min-width: 180px;
}
.form-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Success / error toast for the contact form */
.form-status {
  grid-column: 1 / -1;
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  font-size: 15px;
  line-height: 1.5;
}
.form-status.is-on {
  display: flex;
}
.form-status.ok {
  background: var(--accent-faint);
  border: 1px solid var(--accent);
  color: var(--text);
}
.form-status.err {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: var(--text);
}
.form-status .status-glyph {
  font-family: var(--font-mono);
  color: var(--accent-ink);
  flex-shrink: 0;
}
.form-status.err .status-glyph {
  color: #f87171;
}

/* -------- Footer -------- */
.site-footer {
  background: var(--bg-deep);
  padding: 72px 0 28px;
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 56px;
}
.footer-brand img {
  filter: brightness(0) invert(1);
  width: 160px;
  height: auto;
  margin-bottom: 12px;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 28ch;
}
.footer-col h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-col ul {
  display: grid;
  gap: 8px;
}
.footer-col a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-body);
}
.footer-col a:hover {
  color: var(--text);
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.footer-bottom .ver {
  color: var(--text-body);
}
.footer-bottom a {
  color: var(--text-muted);
}
.footer-bottom a:hover {
  color: var(--text);
}

/* =========================================================
   Interactive surfaces rendered by app.js
   (modal / wallet / banner / toast) — tokenized from v7c
   ========================================================= */
#ms-surfaces {
  position: relative;
  z-index: 50;
}

.ms-backdrop {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  animation: backdrop-in var(--t-base) var(--ease) forwards;
}
@keyframes backdrop-in {
  to {
    opacity: 1;
  }
}
.ms-modal {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  animation: modal-in var(--t-slow) var(--ease) forwards;
}
@keyframes modal-in {
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
.ms-modal-hero {
  position: relative;
  padding: 32px 24px 24px;
  background: var(--accent, #fe4215);
  text-align: center;
  overflow: hidden;
}
.ms-modal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 60% at 50% 100%,
    rgba(255, 255, 255, 0.18),
    transparent 60%
  );
  pointer-events: none;
}
.ms-modal-logo {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 1;
}
.ms-modal-logo img {
  width: 36px;
  height: 36px;
}
.ms-modal-brand {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.92);
}
.ms-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: background var(--t-fast) var(--ease);
}
.ms-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
.ms-modal-body {
  padding: 24px;
  text-align: center;
}
.ms-modal-headline {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.ms-modal-sub {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-body);
}
.ms-modal-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ms-modal-actions .btn {
  width: 100%;
}
.ms-modal-cta {
  background: var(--accent, #fe4215);
  color: #fff;
}
.ms-modal-cta:hover {
  filter: brightness(0.92);
}
.ms-modal-skip {
  color: var(--text-muted);
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
}
.ms-modal-skip:hover {
  color: var(--text);
  border-color: var(--border-hi);
}
.ms-modal-terms {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.ms-wallet-backdrop {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  z-index: 100;
  opacity: 0;
  animation: backdrop-in var(--t-base) var(--ease) forwards;
}
.ms-wallet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-left: 1px solid var(--border-hi);
  box-shadow: var(--shadow-modal);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  animation: wallet-in var(--t-slow) var(--ease) forwards;
}
@keyframes wallet-in {
  to {
    transform: translateX(0);
  }
}
.ms-wallet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.ms-wallet-title {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ms-wallet-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-ink);
  background: var(--accent-faint);
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
.ms-wallet-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-body);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background var(--t-fast) var(--ease);
}
.ms-wallet-close:hover {
  background: var(--border);
  color: var(--text);
}
.ms-wallet-list {
  list-style: none;
  padding: 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.ms-wallet-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent, #fe4215);
  border-radius: var(--r-md);
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
  width: 100%;
  font-family: inherit;
  color: inherit;
}
.ms-wallet-item:hover {
  background: var(--surface-2);
  transform: translateX(-2px);
}
.ms-wallet-item-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ms-wallet-item-logo img {
  width: 28px;
  height: 28px;
}
.ms-wallet-item-body {
  min-width: 0;
}
.ms-wallet-item-brand {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.ms-wallet-item-head {
  margin-top: 2px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.ms-wallet-arrow {
  color: var(--text-muted);
  font-size: 18px;
}

.ms-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--accent, #fe4215);
  color: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(-100%);
  animation: banner-in var(--t-slow) var(--ease) forwards;
}
@keyframes banner-in {
  to {
    transform: translateY(0);
  }
}
.ms-banner-inner {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}
@media (min-width: 768px) {
  .ms-banner-inner {
    padding: 12px 32px;
  }
}
.ms-banner-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.ms-banner-logo img {
  width: 24px;
  height: 24px;
}
.ms-banner-text {
  flex: 1;
  min-width: 0;
}
.ms-banner-headline {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-banner-sub {
  display: none;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}
@media (min-width: 640px) {
  .ms-banner-sub {
    display: block;
  }
}
.ms-banner-cta {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
}
.ms-banner-cta:hover {
  background: #fff;
}
.ms-banner-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background var(--t-fast) var(--ease);
}
.ms-banner-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--border-hi);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-modal);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    opacity var(--t-base) var(--ease),
    transform var(--t-base) var(--ease);
}
.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-check {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--syn-green);
  color: #04130a;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* -------- Responsive -------- */
/* Diagram: stack the two sides + flip the bridge horizontal on narrow screens */
@media (max-width: 600px) {
  .diagram-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .bridge {
    flex-direction: row;
    min-width: 0;
    padding: 8px 0;
  }
  .bridge-line {
    width: auto;
    height: 2px;
    flex: 1;
    min-height: 0;
  }
  .bridge-line-top {
    background: linear-gradient(to right, var(--demand), var(--moment-ink));
  }
  .bridge-line-bot {
    background: linear-gradient(to left, var(--supply), var(--moment-ink));
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .platform-grid {
    grid-template-columns: 1fr 1fr;
  }
  .rank-section .rank-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --container-pad: 20px;
  }
  .nav-primary {
    display: none;
  }
  .nav-row {
    grid-template-columns: auto 1fr auto;
  }
  .cmdk {
    display: none;
  }
  .hero {
    padding: 56px 0 64px;
  }
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 0;
    padding: 28px 0;
  }
  .metric {
    padding: 0 16px;
    border-left: 1px solid var(--border);
  }
  .metric:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
  .metric:nth-child(3),
  .metric:nth-child(4) {
    padding-top: 24px;
    border-top: 1px solid var(--border);
  }
  .metric:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
  .platform-grid,
  .audience-grid,
  .surface-grid,
  .how-steps,
  .signals-grid {
    grid-template-columns: 1fr;
  }
  .signal-card {
    padding: 24px 0 0;
    border-left: 0;
    border-top: 1px solid var(--border-hi);
    margin-top: 24px;
  }
  .signal-card:first-child {
    padding-top: 0;
    border-top: 0;
    margin-top: 0;
  }
  .surface-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .contact-form {
    grid-template-columns: 1fr;
  }
  .radio-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .section,
  .how,
  .live-section {
    padding: 64px 0;
  }
  .cta-cli {
    padding: 64px 0;
  }
}

/* -------- Reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .cursor,
  .cursor-cli {
    animation: none !important;
    opacity: 1;
  }
}
