/* ============================================================
   RTO marketing site
   Fonts self-hosted locally (fonts/), icons real Phosphor SVGs (icons/),
   all product imagery generated (images/), none are real screenshots.
   Dark-mode-only by deliberate brand choice. The product itself is a
   dark-terminal-native trading interface; a light variant would be a
   different brand, not an accessibility gap.
   ============================================================ */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  color-scheme: dark;

  --bg: #0a0c0f;
  --bg-elevated: #12151a;
  --bg-elevated-2: #171b21;
  --border: #1f242b;
  --border-soft: #171a1f;

  --text: #edf1f4;
  --text-dim: #97a1ab;
  --text-faint: #58626c;

  --accent: #00e5c0;
  --accent-dim: rgba(0, 229, 192, 0.12);
  --accent-line: rgba(0, 229, 192, 0.28);
  --danger: #e0685c;
  --danger-dim: rgba(224, 104, 92, 0.12);

  --font-sans: "Geist", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 1px var(--accent-line), 0 0 40px -8px rgba(0, 229, 192, 0.35);

  --radius: 10px;
  --radius-sm: 6px;
  --nav-h: 68px;
}

/* ── Reset ──────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent-dim); color: var(--text); }

.icon { width: 1em; height: 1em; display: inline-block; flex-shrink: 0; }
.icon svg { width: 100%; height: 100%; }

/* ── Layout helpers ─────────────────────────────────────── */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

h1, h2, h3 { font-family: var(--font-sans); text-wrap: balance; letter-spacing: -0.02em; }

section { padding: 96px 0; border-bottom: 1px solid var(--border-soft); }
section:last-of-type { border-bottom: none; }
@media (max-width: 768px) { section { padding: 64px 0; } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Nav ────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10, 12, 15, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
  transition: border-color 0.3s, background 0.3s;
}
.nav.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 12, 15, 0.92);
}
.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #0a0c0f;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.nav-links a { transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-toggle { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: #04120e;
  border: 1px solid var(--accent);
}
.btn-primary:hover { box-shadow: var(--shadow-glow); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--text-faint); background: var(--bg-elevated); }
.btn-lg { height: 46px; padding: 0 24px; font-size: 14.5px; }

.nav-mobile-panel {
  display: none;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; }

  .nav-mobile-panel {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 49;
    background: rgba(10, 12, 15, 0.98);
    backdrop-filter: blur(14px);
    padding: 28px 20px 40px;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  body.nav-open .nav-mobile-panel {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }

  .nav-mobile-panel a.nav-mobile-link {
    padding: 14px 4px;
    font-size: 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border-soft);
  }
  .nav-mobile-panel .hero-ctas {
    margin-top: 20px;
    flex-direction: column;
  }
  .nav-mobile-panel .btn { width: 100%; }
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  padding-top: 72px;
  padding-bottom: 88px;
  border-bottom: 1px solid var(--border-soft);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.1;
  font-weight: 600;
  max-width: 580px;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p {
  margin-top: 20px;
  font-size: 17px;
  color: var(--text-dim);
  max-width: 46ch;
  line-height: 1.6;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 40px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hero-meta-item .num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}
.hero-meta-item .lbl {
  font-size: 12px;
  color: var(--text-faint);
}
.hero-visual {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10,12,15,0.5) 100%);
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: none; }
}

/* ── Integrations strip ─────────────────────────────────── */
.strip {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-soft);
}
.strip-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 22px;
}
.logo-row {
  display: flex;
  align-items: center;
  gap: 44px;
  flex-wrap: wrap;
  color: var(--text-faint);
}
.logo-row .logo-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  opacity: 0.85;
  transition: opacity 0.15s, color 0.15s;
}
.logo-row .logo-item:hover { opacity: 1; color: var(--text); }
.logo-row svg { width: 18px; height: 18px; }

/* ── Section headers ────────────────────────────────────── */
.sec-head {
  max-width: 620px;
  margin-bottom: 52px;
}
.sec-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 600;
  line-height: 1.15;
}
.sec-head p {
  margin-top: 14px;
  font-size: 16px;
  color: var(--text-dim);
  max-width: 58ch;
  line-height: 1.65;
}

/* ── Metrics strip ──────────────────────────────────────── */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.metric {
  padding: 26px 24px;
  border-right: 1px solid var(--border);
}
.metric:last-child { border-right: none; }
.metric .num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.metric .num small {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.metric .lbl {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}
@media (max-width: 760px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: none; }
}

/* ── Bento: strategies ──────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.b-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.b-card:hover { border-color: var(--text-faint); transform: translateY(-2px); }
.b-card .b-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  margin-bottom: 18px;
}
.b-card h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 8px; }
.b-card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }
.b-card .b-tag {
  margin-top: auto;
  padding-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

.b-lead { grid-column: span 3; min-height: 220px; }
.b-lead-2 { grid-column: span 3; min-height: 220px; }
.b-row { grid-column: span 2; }

.b-lead::before {
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: 140px; height: 140px;
  background: radial-gradient(circle at top right, var(--accent-dim), transparent 70%);
  border-radius: 0 var(--radius) 0 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .b-lead, .b-lead-2, .b-row { grid-column: span 2; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .b-lead, .b-lead-2, .b-row { grid-column: span 1; }
}

/* ── Full-width stacked feature (risk engine) ───────────── */
.feature-stack .sec-head { max-width: 640px; }
.feature-banner {
  margin-top: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-elevated);
}
.feature-banner img { width: 100%; height: auto; display: block; }

.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.pill .icon { color: var(--accent); font-size: 13px; }

/* ── Split sections ─────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.reverse .split-visual { order: -1; }
.split-copy h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 600; line-height: 1.16; }
.split-copy p { margin-top: 16px; font-size: 15.5px; color: var(--text-dim); line-height: 1.65; max-width: 46ch; }
.split-list { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.split-list-item { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; color: var(--text-dim); }
.split-list-item .icon { color: var(--accent); font-size: 16px; margin-top: 2px; }
.split-list-item b { color: var(--text); font-weight: 500; }
.split-visual {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
}
.split-visual img { width: 100%; height: auto; display: block; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-visual { order: 0; }
}

/* ── Architecture grid ──────────────────────────────────── */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.arch-item {
  background: var(--bg);
  padding: 28px;
  display: flex;
  gap: 16px;
}
.arch-item .icon {
  color: var(--accent);
  font-size: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}
.arch-item h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 6px; }
.arch-item p { font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }
@media (max-width: 700px) { .arch-grid { grid-template-columns: 1fr; } }

/* ── CTA band ───────────────────────────────────────────── */
.cta-band {
  text-align: center;
  padding: 100px 0;
}
.cta-band h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 600;
  max-width: 18ch;
  margin: 0 auto;
  line-height: 1.14;
}
.cta-band p {
  margin: 18px auto 0;
  color: var(--text-dim);
  font-size: 16px;
  max-width: 46ch;
}
.cta-band .hero-ctas { justify-content: center; margin-top: 34px; }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  padding: 56px 0 40px;
}
.foot-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-soft);
}
.foot-brand p {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-faint);
  max-width: 34ch;
  line-height: 1.6;
}
.foot-links {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.foot-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
  font-weight: 500;
}
.foot-col a {
  display: block;
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 11px;
  transition: color 0.15s;
}
.foot-col a:hover { color: var(--text); }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 12.5px;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Greek breakdown tiles (Risk Engine) ─────────────────── */
.greek-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.greek-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  background: var(--bg-elevated);
}
.greek-tile.is-dominant {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, var(--accent-dim), transparent 60%), var(--bg-elevated);
}
.greek-tile .g-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.greek-tile.is-dominant .g-label { color: var(--accent); }
.greek-tile .g-name { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.greek-tile p { font-size: 13px; color: var(--text-dim); line-height: 1.55; }
@media (max-width: 760px) {
  .greek-tiles { grid-template-columns: repeat(2, 1fr); }
}

/* ── Gate sequence (How a trade gets placed) ─────────────── */
.gate-sequence {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 8px;
}
.gate-step {
  position: relative;
  padding: 0 18px 0 0;
}
.gate-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(30px + 6px);
  right: -6px;
  height: 1px;
  background: var(--border);
}
.gate-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.gate-step.is-block .gate-num {
  border-color: var(--accent-line);
  color: var(--accent);
}
.gate-step h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.gate-step p { font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }
@media (max-width: 900px) {
  .gate-sequence { grid-template-columns: 1fr; gap: 24px; }
  .gate-step:not(:last-child)::after { display: none; }
}

/* ── Tier comparison (Flow) ───────────────────────────────── */
.tier-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  max-width: 640px;
}
.tier-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.tier-tile.t3 { border-color: var(--accent-line); background: var(--accent-dim); }
.tier-tile .t-name { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.tier-tile.t3 .t-name { color: var(--accent); }
.tier-tile ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.tier-tile li { font-size: 12.5px; color: var(--text-dim); font-family: var(--font-mono); }
@media (max-width: 560px) { .tier-compare { grid-template-columns: 1fr; } }

/* ── Rigor list (borderless, distinct from arch-grid) ─────── */
.rigor-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 48px;
  margin-top: 48px;
}
.rigor-item { display: flex; gap: 16px; }
.rigor-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--accent-line);
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.rigor-item h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.rigor-item p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }
@media (max-width: 760px) { .rigor-list { grid-template-columns: 1fr; } }

/* ── Changelog ──────────────────────────────────────────── */
.changelog {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}
.change-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--border-soft);
  align-items: baseline;
}
.change-row:last-child { border-bottom: 1px solid var(--border-soft); }
.change-date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
}
.change-body p { font-size: 14.5px; color: var(--text-dim); line-height: 1.55; max-width: 62ch; }
.change-body .change-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 10px;
  vertical-align: middle;
}
@media (max-width: 600px) {
  .change-row { grid-template-columns: 1fr; gap: 6px; }
}
