/* Quant-R landing — dark modern fintech, no frameworks */
:root {
  --bg: #07080b;
  --bg-elev: #0c0e13;
  --bg-card: #0f1218;
  --bg-card-hover: #13171f;
  --line: #1c2230;
  --line-strong: #2a3344;
  --text: #e8eaed;
  --text-muted: #8b93a7;
  --text-dim: #6b7386;
  --accent: #3ddc97;
  --accent-dim: #2aa872;
  --accent-ink: #042015;
  --accent-soft: rgba(61, 220, 151, 0.12);
  --accent-glow: rgba(61, 220, 151, 0.28);
  --danger: #ff6b6b;
  --warn: #e7c36a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --max: 1120px;
  --nav-h: 72px;
  --font: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(61, 220, 151, 0.09), transparent 55%),
    radial-gradient(800px 480px at 0% 20%, rgba(40, 70, 120, 0.16), transparent 50%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.25) 40%, transparent 85%);
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #6aedb3;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 0;
  transform: translateY(-200%);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  transform: translateY(12px);
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(7, 8, 11, 0.78);
  border-bottom: 1px solid rgba(28, 34, 48, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0;
  font-size: 1.05rem;
}

.brand .hyphen {
  display: inline-block;
  padding: 0 0.02em;
  font-weight: 500;
}

.brand:hover {
  color: var(--text);
}

.brand img,
.brand svg {
  width: 32px;
  height: 32px;
}

.brand span em {
  font-style: normal;
  color: var(--accent);
}

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

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.nav a.btn-primary,
.nav a.btn-primary:hover {
  color: var(--accent-ink);
  background: var(--accent);
}

.nav-cta {
  margin-left: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: #58e6a8;
  color: var(--accent-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: #3d4a5e;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  margin: 0 auto;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

/* Hero */
.hero {
  padding: 72px 0 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 18px;
  font-weight: 500;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

h1, h2, h3 {
  letter-spacing: -0.035em;
  line-height: 1.12;
  font-weight: 600;
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.7rem);
  max-width: 18ch;
  text-wrap: balance;
}

.lead {
  margin: 22px 0 0;
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 38ch;
}

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

.hero-note {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.hero-meta {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.hero-visual {
  position: relative;
}

.hero-visual figcaption {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-align: center;
}

/* Sections */
section {
  padding: 80px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  text-wrap: balance;
}

.section-head p {
  margin: 14px 0 0;
  color: var(--text-muted);
}

#how {
  border-top: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 24px;
  min-height: 100%;
  position: relative;
}

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.steps h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* API / code panels */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: start;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #0b0d12;
}

.panel-bar .dots {
  display: flex;
  gap: 6px;
}

.panel-bar .dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a3140;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warn);
  background: rgba(231, 195, 106, 0.1);
  border: 1px solid rgba(231, 195, 106, 0.25);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-preview {
  color: #8ab4ff;
  background: rgba(138, 180, 255, 0.1);
  border-color: rgba(138, 180, 255, 0.25);
}

pre {
  margin: 0;
  padding: 20px 18px 22px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: #c9d0dc;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
}

.prose-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
}

.prose-list li {
  padding-left: 18px;
  position: relative;
  margin: 0 0 10px;
}

.prose-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0.6em;
}

.endpoint {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 18px;
  overflow-wrap: anywhere;
}

/* Pricing */
.pricing-card {
  background:
    linear-gradient(180deg, rgba(61, 220, 151, 0.06), transparent 40%),
    var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 36px 32px;
}

@media (min-width: 881px) {
  .pricing-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
  }
}


.pricing-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.pricing-card p {
  color: var(--text-muted);
  margin: 14px 0 0;
  max-width: 48ch;
}

.pricing-card .hero-actions {
  margin-top: 28px;
}

/* Catalog */
#catalog {
  border-top: 1px solid var(--line);
}

.steps.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.price-tier {
  background:
    linear-gradient(180deg, rgba(61, 220, 151, 0.06), transparent 42%),
    var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 26px;
}

.price-tier h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.price-tier .amount {
  margin: 12px 0 0;
  font-size: clamp(2rem, 3vw, 2.4rem);
  letter-spacing: -0.045em;
  font-weight: 600;
  line-height: 1;
}

.price-tier .amount span {
  margin-left: 4px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-muted);
}

.usage-rate {
  margin: 28px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pricing-note {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.price-tier .credit {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.price-extras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.price-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
}

.price-panel h3 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.price-panel h3 span {
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-dim);
}

.price-panel h3 span::before {
  content: "·";
  margin: 0 0.4em;
  color: var(--text-dim);
}

.tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.tier-table th,
.tier-table td {
  text-align: left;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
}

.tier-table th {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tier-table th:last-child,
.tier-table td:last-child {
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tier-table tbody tr:last-child td {
  border-bottom: 0;
  padding-bottom: 0;
}

.price-panel p {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.price-panel p:last-child {
  margin-bottom: 0;
}

.price-panel a[href^="mailto:"] {
  white-space: nowrap;
}

.price-panel .soon,
.also-list .soon {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid rgba(231, 195, 106, 0.4);
  border-radius: 999px;
  color: var(--warn);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.pricing-example {
  margin: 28px 0 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}

.pricing-tagline {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

#pricing .hero-actions {
  margin-top: 28px;
}

#pricing .section-head {
  margin-bottom: 32px;
}

.price-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.price-tier .plan-disc {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid rgba(61, 220, 151, 0.4);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.price-extras .table-scroll {
  overflow-x: auto;
}

.tier-table.plan-rates th,
.tier-table.plan-rates td {
  padding-right: 10px;
  white-space: nowrap;
}

.tier-table.plan-rates .pct {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tier-table.plan-rates th:not(:first-child),
.tier-table.plan-rates td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tier-table.plan-rates td:not(:first-child) {
  color: var(--text);
}

.also-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.also-list li {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.also-list li strong {
  color: var(--text);
  font-weight: 500;
}

@media (max-width: 1080px) {
  .price-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .tier-table.plan-rates {
    font-size: 0.76rem;
  }

  .tier-table.plan-rates th,
  .tier-table.plan-rates td {
    padding-right: 6px;
    white-space: normal;
  }

  .tier-table.plan-rates th {
    letter-spacing: 0.02em;
  }
}

/* Waitlist */
#waitlist {
  background: linear-gradient(180deg, transparent, rgba(61, 220, 151, 0.04) 40%, transparent);
}

.waitlist-box {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  border-radius: 20px;
  padding: 40px;
}

.waitlist-box h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.waitlist-box > p {
  color: var(--text-muted);
  margin: 14px 0 28px;
  max-width: 48ch;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.form-row input[type="email"] {
  flex: 1 1 240px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #0a0c10;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.form-row input[type="email"]::placeholder {
  color: var(--text-dim);
}

.form-row input[type="email"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}

.hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.form-note,
.form-status {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.form-status[data-state="ok"] {
  color: var(--accent);
}

.form-status[data-state="err"] {
  color: var(--danger);
}

/* Disclaimer + footer */
.disclaimer {
  border: 1px solid rgba(231, 195, 106, 0.28);
  background: rgba(231, 195, 106, 0.06);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 auto 48px;
  width: min(var(--max), calc(100% - 40px));
}

.disclaimer h2 {
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--warn);
  margin-bottom: 8px;
}

.disclaimer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px 40px;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.legal-page {
  padding: 64px 0 96px;
  max-width: 720px;
}

.legal-page h1 {
  font-size: 2.2rem;
  max-width: none;
  margin-bottom: 12px;
}

.legal-page p {
  color: var(--text-muted);
}

.legal-page .back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--text-muted);
  text-decoration: none;
}

.legal-page .back:hover {
  color: var(--text);
}

body.theme-c .legal-page h1 {
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-weight: 300;
  margin-bottom: 8px;
}

.legal-page .updated {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0 0 28px;
}

.legal-page .lede {
  color: var(--text-muted);
}

.legal-page .toc {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 20px 24px 22px;
  margin: 0 0 40px;
}

.legal-page .toc h2 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 12px;
  font-weight: 500;
}

.legal-page .toc ol {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 5px;
  color: var(--text-muted);
}

.legal-page .toc a {
  color: var(--text-muted);
  text-decoration: none;
}

.legal-page .toc a:hover {
  color: var(--text);
}

.legal-page h2 {
  font-size: 1.2rem;
  margin: 40px 0 12px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
}

.legal-page h3 {
  font-size: 1.02rem;
  margin: 24px 0 8px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
  font-weight: 500;
  color: var(--text);
}

.legal-page p {
  margin: 0 0 14px;
  color: var(--text-muted);
}

.legal-page ul,
.legal-page ol.content {
  color: var(--text-muted);
  padding-left: 1.25rem;
  margin: 0 0 16px;
}

.legal-page li {
  margin: 0 0 8px;
}

.legal-page li:last-child {
  margin-bottom: 0;
}

.legal-page .caps {
  font-size: 0.92em;
  letter-spacing: 0.01em;
}


/* Mobile */
@media (max-width: 880px) {
  .hero-grid,
  .split,
  .steps,
  .steps.cols-3,
  .price-grid,
  .price-extras {
    grid-template-columns: 1fr;
  }

  .price-grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 0 64px;
  }

  .hero-grid {
    gap: 36px;
  }

  h1 {
    max-width: 18ch;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    background: #07080b;
    border-bottom: 1px solid var(--line);
    gap: 4px;
    z-index: 60;
  }

  .site-header.is-open {
    background: #07080b;
    backdrop-filter: none;
  }

  .site-header.is-open .nav {
    display: flex;
  }

  .nav-cta {
    margin: 8px 0 0;
  }

  .nav-cta .btn {
    width: 100%;
  }

  .waitlist-box,
  .pricing-card {
    padding: 28px 22px;
  }

  section {
    padding: 64px 0;
  }

  pre {
    font-size: 0.74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

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

.site-footer p {
  margin: 0 0 6px;
}

.steps .families{margin-top:.5rem;font-size:.9em;opacity:.85}
.steps .families-note{margin-top:.35rem;font-size:.78em;opacity:.65}
