/* OneOrigin presentation + documentation shared theme */
:root {
  color-scheme: dark;
  --ink-950: #080d18;
  --ink-900: #0b1120;
  --ink-850: #101827;
  --ink-800: #162033;
  --ink-700: #243149;
  --mist-200: #cbd5e1;
  --mist-100: #e2e8f0;
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
  --accent-rgb: 125 211 252;
  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --bg: var(--ink-950);
  --surface: #0d1524;
  --surface-2: #111b2c;
  --surface-3: #162136;
  --line: #22304a;
  --text: var(--mist-100);
  --muted: #94a3b8;
  --shadow: 0 24px 70px -30px rgb(0 0 0 / 0.75);
  --radius: 18px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

body[data-product='base'] {
  --accent: #6ee7b7;
  --accent-strong: #34d399;
  --accent-rgb: 110 231 183;
}

body[data-theme='light'] {
  color-scheme: light;
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-2: #eef3fa;
  --surface-3: #e4ebf5;
  --line: #d8e1ed;
  --text: #0f172a;
  --muted: #52627a;
  --shadow: 0 24px 60px -32px rgb(15 23 42 / 0.28);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s, color 0.25s;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgb(var(--accent-rgb) / 0.3); }

.container { width: min(1140px, calc(100% - 2.5rem)); margin-inline: auto; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent-strong); color: #04121c; padding: 0.6rem 1rem; border-radius: 0 0 10px 10px;
}
.skip-link:focus { left: 1rem; }

/* Progress + header */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 2px; z-index: 60;
  width: 0; background: linear-gradient(90deg, var(--accent-strong), var(--good));
}
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 750; letter-spacing: -0.02em; }
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  background: linear-gradient(145deg, rgb(var(--accent-rgb) / 0.95), rgb(var(--accent-rgb) / 0.35));
  color: #06131e; font-size: 0.85rem; font-weight: 900;
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.35), 0 8px 22px -12px rgb(var(--accent-rgb) / 0.8);
}
.brand-sub { color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-links { display: flex; gap: 0.25rem; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--muted); font-size: 0.88rem; padding: 0.45rem 0.7rem; border-radius: 8px; transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current='true'] { color: var(--text); background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: rgb(var(--accent-rgb) / 0.55); }
.nav-toggle { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 11px; padding: 0.72rem 1.05rem; font-weight: 680; font-size: 0.9rem;
  border: 1px solid transparent; transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #06131e; box-shadow: 0 12px 30px -14px rgb(var(--accent-rgb) / 0.9);
}
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-secondary:hover { border-color: rgb(var(--accent-rgb) / 0.6); }
.btn-sm { padding: 0.48rem 0.8rem; font-size: 0.82rem; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(4rem, 9vw, 7.5rem) 0 4.5rem; }
.hero::before {
  content: ''; position: absolute; inset: -30% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(circle, rgb(var(--accent-rgb) / 0.16), transparent 62%); pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3rem; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.76rem; font-weight: 750;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgb(var(--accent-rgb) / 0.28); background: rgb(var(--accent-rgb) / 0.08);
  padding: 0.35rem 0.7rem; border-radius: 999px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgb(74 222 128 / 0.14); }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.035em; margin: 0; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); font-weight: 800; }
h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 36rem; margin: 1.25rem 0 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 2.2rem; }
.stat strong { display: block; font-size: 1.1rem; }
.stat span { font-size: 0.78rem; color: var(--muted); }

.hero-art { position: relative; }
.window {
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow);
  overflow: hidden; transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
}
.window-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.window-bar i:first-child { background: var(--bad); }
.window-bar i:nth-child(2) { background: var(--warn); }
.window-bar i:nth-child(3) { background: var(--good); }
.window-bar span { margin-left: auto; font: 0.7rem var(--font-mono); color: var(--muted); }
.window-body { padding: 1.1rem; font: 0.78rem/1.75 var(--font-mono); }
.window-body .key { color: var(--accent); }
.window-body .val { color: var(--text); }
.window-body .dim { color: var(--muted); }
.window-body .ok { color: var(--good); }
.window-body .warn { color: var(--warn); }
.float-chip {
  position: absolute; right: -1.2rem; bottom: -1.4rem; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-2); padding: 0.65rem 0.9rem; font-size: 0.76rem; color: var(--muted); box-shadow: var(--shadow);
}
.float-chip b { color: var(--text); }

/* Sections */
section { scroll-margin-top: 84px; }
.section { padding: clamp(4rem, 7vw, 6rem) 0; }
.section-alt { background: color-mix(in srgb, var(--surface) 55%, transparent); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 2.4rem; }
.section-tag { color: var(--accent); font-weight: 750; font-size: 0.76rem; letter-spacing: 0.13em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin: 0.5rem 0 0.8rem; font-weight: 780; }
.section-head p { color: var(--muted); margin: 0; font-size: 1.02rem; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 1.35rem; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: rgb(var(--accent-rgb) / 0.45); box-shadow: var(--shadow); }
.card-icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 1rem;
  background: rgb(var(--accent-rgb) / 0.12); color: var(--accent); font-size: 1.05rem;
}
.card h3 { font-size: 1.05rem; margin-bottom: 0.45rem; }
.card p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.card code, .inline-code {
  font: 0.86em var(--font-mono); background: var(--surface-3); border: 1px solid var(--line);
  padding: 0.1rem 0.35rem; border-radius: 6px; color: var(--accent);
}

.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.trust-item { background: var(--surface); padding: 1.1rem; text-align: center; font-size: 0.84rem; color: var(--muted); }
.trust-item b { display: block; color: var(--text); font-size: 0.92rem; margin-bottom: 0.2rem; }

/* Flow */
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 0.8rem; counter-reset: step; }
.step {
  position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  padding: 1.1rem 1rem 1rem; counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero); display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px; background: rgb(var(--accent-rgb) / 0.12);
  color: var(--accent); font: 700 0.72rem var(--font-mono); margin-bottom: 0.7rem;
}
.step h4 { font-size: 0.92rem; margin-bottom: 0.3rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.82rem; }

/* Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; align-items: center; }
.split-copy h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 0.9rem; }
.split-copy p { color: var(--muted); }
.check-list { list-style: none; padding: 0; margin: 1.3rem 0 0; display: grid; gap: 0.75rem; }
.check-list li { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.92rem; }
.check-list li::before { content: '✓'; color: var(--good); font-weight: 800; }

/* Code blocks */
.code {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #070b13;
  box-shadow: var(--shadow);
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem 0.9rem; border-bottom: 1px solid #1c2739; color: #93a4bd; font: 0.72rem var(--font-mono);
}
.copy-btn {
  border: 1px solid #263449; background: #101827; color: #b6c4d8; border-radius: 7px;
  padding: 0.25rem 0.55rem; font-size: 0.7rem; cursor: pointer;
}
.copy-btn:hover { color: white; border-color: #3d5070; }
pre { margin: 0; padding: 1.1rem; overflow: auto; color: #dbe6f5; font: 0.79rem/1.75 var(--font-mono); }
pre .c-key { color: #7dd3fc; }
pre .c-str { color: #a7f3d0; }
pre .c-com { color: #64748b; }
pre .c-num { color: #fcd34d; }

.callout {
  border: 1px solid rgb(var(--accent-rgb) / 0.35); border-radius: 14px; padding: 1rem 1.1rem;
  background: rgb(var(--accent-rgb) / 0.07); font-size: 0.9rem; color: var(--text);
}
.callout b { color: var(--accent); }
.callout.warn { border-color: rgb(251 191 36 / 0.35); background: rgb(251 191 36 / 0.07); }
.callout.warn b { color: var(--warn); }

/* Docs */
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.docs-sidebar { position: sticky; top: 92px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1rem; }
.docs-sidebar strong { display: block; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem; }
.docs-sidebar a { display: block; padding: 0.42rem 0.55rem; border-radius: 8px; font-size: 0.86rem; color: var(--muted); }
.docs-sidebar a:hover, .docs-sidebar a[aria-current='true'] { background: var(--surface-2); color: var(--accent); }
.doc-section { padding: 1.4rem 0 1.8rem; border-bottom: 1px solid var(--line); }
.doc-section:first-child { padding-top: 0; }
.doc-section:last-child { border-bottom: 0; }
.doc-section h3 { font-size: 1.25rem; margin-bottom: 0.6rem; scroll-margin-top: 92px; }
.doc-section p { color: var(--muted); font-size: 0.92rem; }
.doc-section h4 { font-size: 0.9rem; margin: 1rem 0 0.45rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 650; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

/* FAQ */
details { border: 1px solid var(--line); border-radius: 13px; background: var(--surface); padding: 0; margin-bottom: 0.7rem; }
summary { cursor: pointer; padding: 1rem 1.1rem; font-weight: 650; font-size: 0.95rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent); font-weight: 800; }
details[open] summary::after { content: '−'; }
details p { margin: 0; padding: 0 1.1rem 1.1rem; color: var(--muted); font-size: 0.9rem; }

/* CTA + footer */
.final-cta { text-align: center; }
.final-cta h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin-bottom: 0.8rem; }
.final-cta p { color: var(--muted); max-width: 620px; margin: 0 auto 1.6rem; }
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--muted); font-size: 0.84rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a:hover { color: var(--accent); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-inner, .split { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 560px; }
  .window { transform: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .docs { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; display: flex; flex-wrap: wrap; gap: 0.3rem; }
  .docs-sidebar strong { width: 100%; }
}
@media (max-width: 680px) {
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0; padding: 0.8rem 1.25rem 1.1rem;
    flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: grid; }
  .header-actions .btn { display: none; }
  .grid-2, .grid-3, .grid-4, .trust-strip { grid-template-columns: 1fr; }
  .hero-stats { gap: 1rem 1.5rem; }
  .float-chip { right: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
