/* Design tokens lifted from quantlys.ai (dark theme, brand default) */
:root {
  --background: #050a14;
  --foreground: #f0f4ff;
  --surface: #0d1726;
  --surface-2: #131f33;
  --muted: #1f2b44;
  --muted-foreground: #6b80a0;
  --border: #1a2740;
  --brand-cyan: #00d4ff;
  --brand-violet: #7b61ff;
  --brand-gradient: linear-gradient(135deg, var(--brand-cyan) 0%, var(--brand-violet) 100%);
  --primary: #00d4ff;
  --primary-foreground: #050a14;
  --success: #00e599;
  --danger: #ff4d4d;
  --warning: #ffb83d;
  --radius: 0.75rem;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

/* Light theme — token values lifted from quantlys.ai's .light palette.
   --brand-gradient and all color-mix() usages resolve from these vars at
   use-time, so overriding the base tokens reskins the whole page. */
html.light {
  --background: #f7f9fc;
  --foreground: #0a1220;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --muted: #eef2f8;
  --muted-foreground: #5a6a85;
  --border: #d7deea;
  --brand-cyan: #00b3d9;
  --brand-violet: #6a4fe6;
  --primary: #00b3d9;
  --primary-foreground: #ffffff;
  --success: #00a874;
  --danger: #d93030;
  --warning: #c77700;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container.narrow { max-width: 52rem; }
.center { text-align: center; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1rem; color: var(--foreground); }

a { color: inherit; }

.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-cyan);
  margin: 0 0 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }

.btn-primary {
  background: var(--brand-gradient);
  color: var(--primary-foreground);
}
.btn-primary:hover { opacity: 0.9; }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--foreground);
}
.btn-ghost:hover { border-color: var(--brand-cyan); color: var(--brand-cyan); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.cta-row.center { justify-content: center; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 80%, transparent);
  backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.logo { display: flex; flex-direction: row; align-items: center; gap: 0.6rem; text-decoration: none; }
.logo-mark { flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; }

.logo-word {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.nav-links { display: flex; gap: 1.75rem; }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.theme-toggle:hover { color: var(--brand-cyan); border-color: var(--brand-cyan); }

.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: inline-flex; }
html.light .theme-toggle .icon-sun { display: none; }
html.light .theme-toggle .icon-moon { display: inline-flex; }

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--foreground); }

@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 7rem 0 5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 80%;
  background:
    radial-gradient(ellipse at 30% 20%, color-mix(in srgb, var(--brand-cyan) 14%, transparent), transparent 60%),
    radial-gradient(ellipse at 75% 10%, color-mix(in srgb, var(--brand-violet) 14%, transparent), transparent 60%);
  pointer-events: none;
}

.hero .container { position: relative; }

.subhead {
  max-width: 44rem;
  font-size: 1.15rem;
  color: var(--muted-foreground);
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 4rem;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.proof-item { background: var(--surface); padding: 1.25rem 1.5rem; }

.proof-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--brand-cyan);
}

.proof-label { font-size: 0.8rem; color: var(--muted-foreground); }

@media (max-width: 860px) {
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-intro { max-width: 44rem; color: var(--muted-foreground); margin-bottom: 2.5rem; }
.section p { color: var(--muted-foreground); }
.section h2 { color: var(--foreground); }

.pull-quote {
  margin: 2.5rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid;
  border-image: var(--brand-gradient) 1;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--foreground);
}

/* ---------- Contrast strip ---------- */
.contrast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}

.contrast-col {
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.contrast-us { border-color: color-mix(in srgb, var(--brand-cyan) 45%, var(--border)); }

.contrast-head {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--muted-foreground);
}

.contrast-us .contrast-head { color: var(--brand-cyan); }

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

.contrast li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted-foreground);
}

.contrast-us li { color: var(--foreground); }

@media (max-width: 700px) {
  .contrast { grid-template-columns: 1fr; }
}

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 1rem; margin: 2.5rem 0; }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1000px) {
  .card-grid.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .card-grid.four, .card-grid.three { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.15s, transform 0.15s;
}

.card:hover { border-color: color-mix(in srgb, var(--brand-cyan) 40%, var(--border)); transform: translateY(-2px); }

.card-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }

.card p { font-size: 0.92rem; margin-bottom: 0; }

.product-card { display: flex; flex-direction: column; }
.product-card p { flex: 1; }

.tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.tag-flagship {
  border-color: transparent;
  background: var(--brand-gradient);
  color: var(--primary-foreground);
}

.card-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-cyan);
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.5rem 0;
}

@media (max-width: 700px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-foreground);
  background: var(--brand-gradient);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.step p { font-size: 0.92rem; margin-bottom: 0; }

/* ---------- Privacy block ---------- */
.privacy-block {
  margin: 2.5rem 0;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--brand-cyan) 35%, var(--border));
  background:
    radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--brand-cyan) 8%, transparent), transparent 60%),
    var(--surface);
}

.privacy-block p { margin-bottom: 0; }

.pricing-line {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted-foreground);
}
.pricing-line a { color: var(--brand-cyan); text-decoration: none; }
.pricing-line a:hover { text-decoration: underline; }

/* ---------- Pricing tiers ---------- */
.price {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.25rem 0 1.25rem;
}

.price-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-top: 0.35rem;
}

.price-list { flex: 1; list-style: none; margin: 0; padding: 0; }

.price-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.6rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 600;
}

/* ---------- Supervisor banner (5th element) ---------- */
.supervisor-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--brand-violet) 45%, var(--border));
  background:
    radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--brand-violet) 12%, transparent), transparent 60%),
    var(--surface-2);
}

.supervisor-icon { font-size: 1.6rem; line-height: 1.4; }
.supervisor-body h3 { margin-bottom: 0.4rem; }
.supervisor-body p { font-size: 0.95rem; margin-bottom: 0; color: var(--muted-foreground); }

/* ---------- Orchestration / Custom Agents shared ---------- */
.orchestration, .custom-agents {
  margin: 3.5rem 0 0;
  padding: 3rem 0 0;
  border-top: 1px solid var(--border);
}

.block-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
  margin-bottom: 1rem;
  max-width: 48rem;
}

.block-body { max-width: 48rem; color: var(--muted-foreground); }

/* ---------- Pipeline (typed handoffs) ---------- */
.pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 2rem 0 0.75rem;
}

.pipeline-node {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--brand-cyan) 40%, var(--border));
  background: var(--surface-2);
}

.pipeline-check { color: var(--success); font-weight: 600; }

.pipeline-arrow {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--brand-cyan);
}

.pipeline-caption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

@media (max-width: 700px) {
  .pipeline { flex-direction: column; align-items: stretch; }
  .pipeline-node { justify-content: flex-start; }
  .pipeline-arrow { transform: rotate(90deg); align-self: center; }
}

/* ---------- Patent badge ---------- */
.badge-patent {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--brand-gradient) border-box;
  color: var(--brand-cyan);
}

/* ---------- Custom agents list ---------- */
.custom-list { margin: 1.5rem 0 0; padding: 0; list-style: none; }

.custom-list li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--foreground);
}

.custom-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 600;
}

/* ---------- Proof metrics ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2.5rem 0 1rem;
}

@media (max-width: 700px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
}

.metric {
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
}

.metric-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.disclaimer {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1rem;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--warning);
}

.live-badge.is-live .live-dot {
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- Final CTA ---------- */
.final-cta {
  position: relative;
  padding: 7rem 0;
  overflow: hidden;
}

.final-cta::before {
  content: "";
  position: absolute;
  inset: auto -20% -60%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--brand-violet) 16%, transparent), transparent 65%);
  pointer-events: none;
}

.final-cta .container { position: relative; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

.footer-tagline { font-size: 0.85rem; color: var(--muted-foreground); margin-top: 0.5rem; }

.footer-head {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.9rem;
}

.footer ul { margin: 0; padding: 0; list-style: none; }
.footer li { margin-bottom: 0.5rem; }

.footer li a {
  font-size: 0.88rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s;
}
.footer li a:hover { color: var(--foreground); }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
