/* AIDA: deep ink and cobalt. Dark-first, with light sections for breathing room. */
:root {
  --paper: #0A0F1C;
  --surface: #111A2D;
  --ink: #EEF1F8;
  --muted: #9AA5BC;
  --line: #222D45;
  --accent: #7C97FF;
  --accent-ink: #0A0F1C;
  --accent-soft: rgba(124, 151, 255, 0.14);
  --btn: #3B5BFF;
  --btn-hover: #5673FF;
  --font-display: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

.theme-light {
  --paper: #F5F4F0;
  --surface: #FFFFFF;
  --ink: #0A0F1C;
  --muted: #4F596E;
  --line: #D9D8D2;
  --accent: #2748E0;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(39, 72, 224, 0.09);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.015em; font-weight: 700; }
h1, h2 { letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5vw, 4.4rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.9vw, 3.1rem); }
h3 { font-size: 1.28rem; letter-spacing: -0.01em; line-height: 1.2; }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }
.muted { color: var(--muted); }
.muted a { text-decoration: none; border-bottom: 1px solid var(--line); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.eyebrow, .label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow { margin-bottom: 18px; }
.label { display: block; margin-bottom: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid var(--btn);
  background: var(--btn);
  color: #fff;
  font: 600 0.98rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn::after { content: "→"; transition: transform 0.18s ease; }
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); transform: translateY(-2px); }
.btn:hover::after { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-small { padding: 10px 18px; font-size: 0.88rem; }
.btn-small::after { content: none; }

.mark {
  font-style: normal;
  color: var(--accent);
}

.preview-note {
  background: #F5F4F0; color: #0A0F1C; text-align: center;
  font: 400 0.76rem var(--font-mono); padding: 8px 16px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 15, 28, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 20px; }
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 1.5rem var(--font-display); letter-spacing: 0.03em;
  text-decoration: none; color: var(--ink);
}
.logo-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.logo-mark i { width: 5px; background: var(--accent); border-radius: 1px; display: block; }
.logo-mark i:nth-child(1) { height: 8px; }
.logo-mark i:nth-child(2) { height: 18px; }
.logo-mark i:nth-child(3) { height: 12px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav-link {
  position: relative; text-decoration: none; color: var(--muted); font-size: 0.95rem; font-weight: 500;
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--ink); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 8vw, 120px) 0 clamp(56px, 8vw, 110px);
  background:
    radial-gradient(800px 480px at 82% 40%, rgba(59, 91, 255, 0.22), transparent 70%),
    var(--paper);
}
.hero::before { /* faint grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.28;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0, transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 14ch; }
.lead { margin-top: 26px; font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 32px; }
.trust li { font: 400 0.8rem var(--font-mono); color: var(--muted); display: inline-flex; align-items: center; gap: 9px; }
.trust li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Flow diagram */
.flow { width: 100%; height: auto; overflow: visible; }
.flow .wire { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 7; opacity: 0.85; animation: dash 1.6s linear infinite; }
.flow .node rect { fill: var(--surface); stroke: var(--line); stroke-width: 1.2; }
.flow .node.out rect { stroke: var(--accent); }
.flow .node text { fill: var(--ink); font: 500 12px var(--font-mono); }
.flow .halo { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0.32; }
.flow .halo.h2 { opacity: 0.16; }
.flow .hub { fill: var(--btn); }
.flow .hub-t { fill: #fff; font: 800 20px var(--font-display); letter-spacing: 0.08em; }
.flow .cap { fill: var(--muted); font: 400 10.5px var(--font-mono); letter-spacing: 0.1em; }
@keyframes dash { to { stroke-dashoffset: -20; } }

/* hero animation: an 8s loop. Inputs light up one by one, the hub pulses, then outputs light up one by one. */
.flow .wire { animation: dash 1.6s linear infinite, wirelit 8s ease-in-out infinite; animation-delay: 0s, var(--d, 0s); }
.flow .node rect { animation: nodelit 8s ease-in-out infinite; animation-delay: var(--d, 0s); }
.flow .node.out rect { animation-name: nodelit-out; }
.flow .node text { animation: textlit 8s ease-in-out infinite; animation-delay: var(--d, 0s); }
.flow .halo { transform-box: fill-box; transform-origin: center; animation: haloPulse 8s ease-in-out infinite; animation-delay: 3.4s; }
.flow .halo.h2 { animation-delay: 3.6s; }
.flow .orbit { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 9; opacity: 0.6; transform-box: fill-box; transform-origin: center; animation: spin 14s linear infinite reverse; }
.flow .orbit-arc { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 44 308; opacity: 0.9; transform-box: fill-box; transform-origin: center; animation: spin 3.2s linear infinite; }
.flow .hub { animation: hubGlow 8s ease-in-out infinite; animation-delay: 3.2s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wirelit { 0%, 12%, 100% { stroke-width: 1.5; opacity: 0.55; } 3%, 8% { stroke-width: 2.4; opacity: 1; } }
@keyframes nodelit { 0%, 12%, 100% { fill: var(--surface); stroke: var(--line); stroke-width: 1.2; } 3%, 8% { fill: rgba(124, 151, 255, 0.2); stroke: var(--accent); stroke-width: 2; } }
@keyframes nodelit-out { 0%, 12%, 100% { fill: var(--surface); stroke: var(--accent); stroke-width: 1.2; } 3%, 8% { fill: rgba(124, 151, 255, 0.28); stroke: #fff; stroke-width: 2; } }
@keyframes textlit { 0%, 12%, 100% { fill: var(--ink); } 3%, 8% { fill: #fff; } }
@keyframes haloPulse { 0%, 22%, 100% { transform: scale(1); opacity: 0.3; } 8%, 12% { transform: scale(1.1); opacity: 0.75; } }
@keyframes haloSoft { 0%, 22%, 100% { opacity: 0.3; } 8%, 12% { opacity: 0.75; } }
@keyframes hubGlow { 0%, 22%, 100% { fill: var(--btn); } 8%, 12% { fill: #5974FF; } }

/* Strip */
.strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip-row { display: flex; align-items: center; gap: 28px; padding-block: 22px; flex-wrap: wrap; }
.strip-row .label { margin: 0; white-space: nowrap; }
.strip ul { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.strip li { font: 500 0.95rem var(--font-display); color: var(--ink); letter-spacing: -0.01em; }

/* Stats */
.stats-band { border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: clamp(32px, 4.5vw, 56px) clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { font: 700 clamp(2.6rem, 5.4vw, 4.4rem)/0.95 var(--font-display); letter-spacing: -0.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 0.95rem; max-width: 24ch; }

/* Sections */
.section { padding: clamp(72px, 10vw, 128px) 0; background: var(--paper); color: var(--ink); }
.section-head { margin-bottom: clamp(36px, 5vw, 60px); max-width: 820px; }
.sub { margin-top: 20px; color: var(--muted); max-width: 58ch; font-size: 1.1rem; }

.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card p { color: var(--muted); font-size: 0.98rem; }
.num { font: 500 0.8rem var(--font-mono); color: var(--accent); letter-spacing: 0.08em; }
.get { margin-top: auto; padding-top: 16px; min-height: 6rem; border-top: 1px solid var(--line); color: var(--ink) !important; font-weight: 500; }

.tag {
  align-self: flex-start;
  font: 500 0.66rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}

/* Method */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 28px 24px 8px 0; border-right: 1px solid var(--line); margin-right: 24px; display: flex; flex-direction: column; gap: 10px; }
.step:last-child { border-right: 0; margin-right: 0; }
.letter { font: 700 clamp(4.5rem, 9vw, 8rem)/0.9 var(--font-display); letter-spacing: -0.03em; color: var(--accent); }
.step p { color: var(--muted); font-size: 0.98rem; max-width: 30ch; }

/* Case cards */
.case { gap: 14px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.metrics dt { min-height: 2.4em; font: 400 0.68rem var(--font-mono); color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.metrics dd { font: 700 1.5rem var(--font-display); letter-spacing: -0.02em; color: var(--accent); margin-top: 4px; }

/* Two column blocks */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.checks { display: flex; flex-direction: column; gap: 18px; }
.checks li { position: relative; padding: 0 0 18px 34px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 1rem; }
.checks li:last-child { border-bottom: 0; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 16px; height: 9px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.checks b { color: var(--ink); font-weight: 600; }

/* Insights */
a.card.post { text-decoration: none; color: inherit; }
.post h3 { font-size: 1.3rem; }
.post .meta { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font: 500 0.8rem var(--font-mono); color: var(--accent); }
.post.soon { opacity: 0.6; }
.post.soon:hover { transform: none; border-color: var(--line); }
.post.soon .meta { color: var(--muted); }

/* Article pages */
.prose { max-width: 740px; padding-block: clamp(48px, 8vw, 96px); }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 8px 0 14px; }
.prose .byline { font: 400 0.82rem var(--font-mono); color: var(--muted); margin-bottom: 36px; }
.prose h2 { font-size: 1.6rem; margin: 40px 0 12px; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--muted); line-height: 1.75; font-size: 1.08rem; }
.prose p { margin: 14px 0; }
.prose ul { padding-left: 1.2em; margin: 12px 0; list-style: disc; }
.prose li { margin: 8px 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .cta { margin-top: 48px; padding: 28px; border: 1px solid var(--accent); border-radius: 18px; background: var(--surface); }
.prose .cta h2 { margin-top: 0; }
.prose .back { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; font: 500 0.88rem var(--font-mono); }
.prose .back:hover { color: var(--ink); }

/* Plans */
.plan { position: relative; }
.plan .when { font: 500 0.82rem var(--font-mono); color: var(--muted); }
.plan ul { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 12px; }
.plan li { position: relative; padding-left: 20px; font-size: 0.97rem; color: var(--ink); }
.plan li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 10px; height: 2px; background: var(--accent); }
.plan .btn { margin-top: auto; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.badge { position: absolute; top: -12px; left: 24px; background: var(--btn); color: #fff; font: 500 0.68rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }

/* Person */
.person { flex-direction: row; gap: 22px; align-items: flex-start; }
.avatar { flex: none; width: 96px; height: 96px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 500 0.75rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.creds { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.in-link { color: var(--accent); font: 500 0.9rem var(--font-mono); text-decoration: none; border-bottom: 1px solid var(--accent); }
.role { font: 400 0.82rem var(--font-mono); color: var(--accent) !important; margin: 4px 0 10px; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.faq-wrap .section-head { margin-bottom: 0; position: sticky; top: 100px; }
.faq-wrap h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.faq { margin-top: 30px; }
@media (max-width: 900px) { .faq-wrap { grid-template-columns: 1fr; } .faq-wrap .section-head { position: static; margin-bottom: 0; } .faq { margin-top: 0; } }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative; font: 600 1.18rem var(--font-display); letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 400 1.5rem var(--font-mono); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding: 0 40px 24px 0; max-width: 64ch; }

/* Contact */
.contact { background: var(--surface); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.direct { margin-top: 28px; color: var(--muted); }
.direct a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); }
.form { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.field-row { display: flex; gap: 14px; }
label { font: 500 0.82rem var(--font-mono); color: var(--muted); letter-spacing: 0.02em; }
input, select, textarea {
  width: 100%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px;
  font: 400 1rem var(--font-body);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; min-height: 110px; }
.form .btn { align-self: flex-start; }
.form-status { min-height: 1.4em; font-size: 0.92rem; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 1040px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2) { border-right: 0; margin-right: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 24px; }
}
@media (max-width: 900px) {
  .hero-grid, .two-col, .contact-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .nav-link { display: none; }
  .hero-visual { max-width: 560px; }
}
@media (max-width: 620px) {
  .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step, .step:nth-child(2) { border-right: 0; margin-right: 0; }
  .step:nth-child(n+2) { border-top: 1px solid var(--line); margin-top: 24px; }
  .letter { font-size: 4.5rem; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+2) { border-top: 1px solid var(--line); }
  .field-row { flex-direction: column; }
  .person { flex-direction: column; }
  .metrics { grid-template-columns: 1fr 1fr 1fr; }
  .strip-row { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Reduced motion: no spinning, flowing or scaling, but keep the gentle colour-only highlight so the diagram still reads as alive. */
  .flow .wire { animation: wirelit 8s ease-in-out infinite; animation-delay: var(--d, 0s); }
  .flow .orbit, .flow .orbit-arc { animation: none !important; }
  .flow .orbit-arc { display: none; }
  .flow .halo, .flow .halo.h2 { animation-name: haloSoft; }
  .btn, .btn::after, .card { transition: none; }
  .btn:hover, .card:hover { transform: none; }
}

.post.feature { max-width: 720px; }
