/* Agent INDX site. Brand tokens from brand/README.md. */
:root {
  --obsidian: #0b0f1a;
  --obsidian-2: #0f1424;
  --panel: #131a2c;
  --panel-2: #182037;
  --line: rgba(203, 213, 225, 0.12);
  --line-strong: rgba(203, 213, 225, 0.22);
  --text: #f8fafc;
  --alloy: #cbd5e1;
  --muted: #94a3b8;
  --indigo: #6366f1;
  --indigo-btn: #4f46e5;
  --indigo-btn-hover: #5b53f0;
  --indigo-link: #818cf8;
  --fail: #f87171;
  --ok: #34d399;
  --radius: 16px;
  --max: 1180px;
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--obsidian);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--indigo-link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--indigo-link); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.025em; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--panel); padding: 8px 14px; border-radius: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 26, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 40px; }
.nav-links { display: flex; gap: 36px; }
.nav-links a { color: var(--alloy); font-size: 15px; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); text-decoration: none; }
.menu { display: none; position: relative; }
.menu summary {
  list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; border: 1px solid var(--line-strong);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary span, .menu summary span::before, .menu summary span::after {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; position: relative;
}
.menu summary span::before, .menu summary span::after { content: ""; position: absolute; left: 0; }
.menu summary span::before { top: -6px; }
.menu summary span::after { top: 6px; }
.menu-panel {
  position: absolute; right: 0; top: 54px; min-width: 220px; padding: 10px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.menu-panel a { display: block; padding: 12px 14px; color: var(--text); border-radius: 10px; font-weight: 500; }
.menu-panel a:hover { background: var(--panel-2); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font: 600 16px/1 var(--font); letter-spacing: -0.005em;
  border: 1px solid transparent; transition: background 0.18s, border-color 0.18s, transform 0.18s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--indigo-btn); color: #fff; box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35); }
.btn-primary:hover { background: var(--indigo-btn-hover); }
.btn-outline { border-color: rgba(129, 140, 248, 0.7); color: var(--text); background: rgba(99, 102, 241, 0.06); }
.btn-outline:hover { border-color: var(--indigo-link); background: rgba(99, 102, 241, 0.14); }
.btn-sm { min-height: 42px; padding: 0 22px; font-size: 14px; }
.btn-text { color: var(--indigo-link); font-weight: 600; min-height: 52px; display: inline-flex; align-items: center; gap: 8px; }
.btn-text .arrow { transition: transform 0.18s; }
.btn-text:hover { text-decoration: none; }
.btn-text:hover .arrow { transform: translateX(4px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; min-height: 680px; display: flex; align-items: center; padding: 72px 0 96px; }
.hero-copy { position: relative; z-index: 2; max-width: 600px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 84px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; }
.hero .lede { margin-top: 28px; font-size: 20px; color: var(--alloy); max-width: 520px; line-height: 1.55; }
.hero .actions { margin-top: 44px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--indigo-link);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--indigo); border-radius: 2px; }

.globe {
  position: absolute; z-index: 1; top: 50%; right: -90px;
  width: min(780px, 66vw); aspect-ratio: 1; transform: translateY(-50%);
  pointer-events: none;
}
.globe svg { width: 100%; height: 100%; overflow: visible; }
.globe .pill {
  position: absolute; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 11px; border-radius: 999px;
  font: 700 12px/1 var(--font); letter-spacing: 0.12em; color: var(--text);
  background: rgba(11, 15, 26, 0.78); border: 1px solid rgba(203, 213, 225, 0.32);
  box-shadow: 0 0 0 4px rgba(11, 15, 26, 0.35);
}
.globe .pill .x { color: var(--fail); font-size: 14px; line-height: 1; }
.globe .solved {
  position: absolute; transform: translate(-22px, -50%);
  display: flex; align-items: center; gap: 14px;
  font: 700 12px/1.5 var(--font); letter-spacing: 0.14em; color: var(--indigo-link); white-space: nowrap;
}
.globe .solved .check {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--indigo); box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.18), 0 0 40px rgba(99, 102, 241, 0.8);
}
.vertical-words {
  position: absolute; z-index: 2; right: 28px; bottom: 36px;
  font: 600 12px/2 var(--font); letter-spacing: 0.42em; color: var(--alloy);
}
.vertical-words span { display: block; }

/* Globe animation */
.route { stroke-dasharray: 5 9; animation: flow 2.4s linear infinite; }
.route-main { stroke-dasharray: 520; stroke-dashoffset: 520; animation: draw 5.5s ease-in-out infinite; }
.node-fail { animation: blink 2.8s ease-in-out infinite; }
.twinkle { animation: twinkle 4s ease-in-out infinite; }
.twinkle:nth-child(3n) { animation-delay: -1.3s; }
.twinkle:nth-child(3n+1) { animation-delay: -2.6s; }
@keyframes flow { to { stroke-dashoffset: -56; } }
@keyframes draw { 0% { stroke-dashoffset: 520; } 45%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -520; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes twinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .route, .route-main, .node-fail, .twinkle { animation: none; }
  .route-main { stroke-dashoffset: 0; }
  .btn, .btn-text .arrow { transition: none; }
}

/* Sections */
.section { padding: 96px 0; position: relative; }
.section-tight { padding: 80px 0; }
.section-alt { background: linear-gradient(180deg, var(--obsidian-2), var(--obsidian)); border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2, .h2 { font-size: clamp(32px, 4vw, 50px); }
.section-head p { margin-top: 20px; color: var(--alloy); font-size: 19px; }
.muted { color: var(--muted); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background: linear-gradient(180deg, rgba(24, 32, 55, 0.7), rgba(19, 26, 44, 0.7));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
}
.card h3 { font-size: 21px; letter-spacing: -0.015em; }
.card p { margin-top: 12px; color: var(--alloy); font-size: 16px; }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 22px;
  display: grid; place-items: center; color: var(--indigo-link);
  background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.3);
}
.card-link { display: flex; flex-direction: column; transition: border-color 0.2s, transform 0.2s; color: inherit; }
.card-link:hover { text-decoration: none; border-color: rgba(129, 140, 248, 0.55); transform: translateY(-2px); }
.card-link .btn-text { margin-top: auto; padding-top: 26px; min-height: 0; }
.card-feature { padding: 40px; min-height: 300px; }
.card-feature h3 { font-size: 30px; letter-spacing: -0.02em; }
.card-feature .kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--indigo-link); margin-bottom: 18px; }

/* Where agents break */
.op { padding: 24px; }
.op h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.op h3 .x { color: var(--fail); font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  font: 600 12px/1 var(--font); padding: 7px 10px; border-radius: 8px;
  color: var(--alloy); background: rgba(203, 213, 225, 0.06); border: 1px solid var(--line);
}
.callout { margin-top: 48px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: -0.02em; }
.callout em { font-style: normal; color: var(--indigo-link); }

/* Steps */
.step .num { font: 700 14px/1 var(--mono); color: var(--indigo-link); letter-spacing: 0.08em; }
.step h3 { margin-top: 22px; font-size: 24px; }
.step p { margin-top: 14px; color: var(--alloy); }
.steps-line { position: relative; }

/* Company */
.company { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.company p.big { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.45; letter-spacing: -0.015em; font-weight: 500; }
.contact-card h3 { font-size: 20px; }
.contact-card p { margin-top: 10px; }
.contact-list { margin-top: 22px; display: grid; gap: 12px; }
.contact-list a { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid rgba(99, 102, 241, 0.35); border-radius: 28px; padding: 88px 28px;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(99, 102, 241, 0.32), transparent 70%),
    linear-gradient(180deg, var(--panel), var(--obsidian));
}
.cta-band h2 { font-size: clamp(34px, 5vw, 64px); font-weight: 500; letter-spacing: -0.035em; }
.cta-band p { margin: 20px auto 0; max-width: 560px; color: var(--alloy); font-size: 19px; }
.cta-band .actions { justify-content: center; margin-top: 40px; }

/* Page hero (inner pages) */
.page-hero { position: relative; overflow: hidden; padding: 120px 0 104px; }
.page-hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 900px; height: 900px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.28), transparent);
  pointer-events: none;
}
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(42px, 5.6vw, 76px); font-weight: 500; letter-spacing: -0.035em; max-width: 900px; }
.page-hero .lede { margin-top: 28px; font-size: 20px; color: var(--alloy); max-width: 680px; }
.page-hero .actions { margin-top: 44px; }
.grid-lines {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(70% 80% at 80% 20%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(70% 80% at 80% 20%, #000 10%, transparent 70%);
}

/* Record section */
.record-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.checklist { display: grid; gap: 18px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; color: var(--alloy); }
.checklist li strong { color: var(--text); font-weight: 600; }
.checklist svg { margin-top: 4px; color: var(--indigo-link); }

.code-panel {
  border-radius: 18px; overflow: hidden; background: #0a0e18;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(99, 102, 241, 0.08), 0 0 80px rgba(99, 102, 241, 0.12);
  position: sticky; top: 100px;
}
.code-bar {
  display: flex; align-items: center; gap: 16px; padding: 0 16px; height: 50px;
  background: #0f1422; border-bottom: 1px solid var(--line);
}
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a3247; display: block; }
.tabs { display: flex; gap: 4px; }
.tab-btn {
  font: 600 13px/1 var(--mono); color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 9px 12px; border-radius: 8px;
}
.tab-btn[aria-selected="true"] { color: var(--text); background: rgba(203, 213, 225, 0.08); }
.code-meta { margin-left: auto; font: 500 12px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.code-body { max-height: 620px; overflow: auto; }
.code-body pre {
  margin: 0; padding: 22px 24px; font: 13.5px/1.7 var(--mono); color: #c7d0e0; tab-size: 2;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.code-body[hidden] { display: none; }
.code-body .jl { display: block; padding-left: 2ch; text-indent: -2ch; }
.code-body .jl + .jl { margin-top: 8px; }
.j-key { color: #a5b4fc; }
.j-str { color: #86efac; }
.j-num { color: #fbbf24; }
.j-bool { color: #f472b6; }
.j-null { color: #94a3b8; }
.j-red { color: #fca5a5; background: rgba(248, 113, 113, 0.14); border-radius: 4px; padding: 0 3px; }
.code-foot {
  display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 14px 20px; border-top: 1px solid var(--line);
  font: 500 12px/1.4 var(--mono); color: var(--muted); background: #0f1422;
}
.code-foot b { color: var(--alloy); font-weight: 600; }

/* Lists */
.standards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.standard { display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start; }
.standard .icon { margin: 0; }
.standard h3 { font-size: 19px; }
.standard p { margin-top: 8px; color: var(--alloy); font-size: 16px; }

/* Operators */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fact h3 { font-size: 19px; }
.fact p { margin-top: 10px; color: var(--alloy); font-size: 16px; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.timeline .step { padding: 28px; }
.timeline .step h3 { font-size: 20px; margin-top: 18px; }
.timeline .step p { font-size: 16px; }

.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 26px 44px 26px 0; position: relative;
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 400; color: var(--indigo-link); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 0 28px; color: var(--alloy); max-width: 720px; }
.faq .answer p + p { margin-top: 12px; }

/* Prose (privacy) */
.prose { max-width: 720px; }
.prose h2 { font-size: 24px; margin: 44px 0 14px; letter-spacing: -0.015em; }
.prose p, .prose li { color: var(--alloy); }
.prose p + p { margin-top: 14px; }
.prose ul { list-style: disc; padding-left: 22px; margin-top: 12px; display: grid; gap: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 44px; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: flex-start; }
.footer-inner .brand img { height: 26px; }
.footer-tag { margin-top: 14px; color: var(--muted); font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.footer-links a { color: var(--alloy); font-size: 15px; font-weight: 500; }
.footer-bottom { margin-top: 40px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Responsive */
@media (max-width: 1080px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-4, .timeline { grid-template-columns: repeat(2, 1fr); }
  .record-layout { grid-template-columns: 1fr; }
  .code-panel { position: relative; top: 0; }
  .globe { right: -260px; width: 780px; opacity: 0.85; }
  .vertical-words { display: none; }
}
@media (max-width: 860px) {
  .nav-links, .nav > .btn { display: none; }
  .menu { display: block; }
  .grid-3, .facts, .company, .standards { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .company { gap: 32px; }
  .section { padding: 84px 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .header-inner { height: 64px; }
  .brand img { height: 26px; }
  .hero-inner { min-height: 0; padding: 56px 0 72px; align-items: flex-start; }
  .hero .lede, .page-hero .lede { font-size: 18px; }
  .globe { top: 0; right: -230px; width: 560px; transform: none; opacity: 0.4; }
  .globe .pill, .globe .solved { display: none; }
  .actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .actions .btn { width: 100%; }
  .actions .btn-text { justify-content: center; }
  .grid-5, .grid-4, .timeline { grid-template-columns: 1fr; }
  .card, .card-feature { padding: 24px; }
  .card-feature { min-height: 0; }
  .page-hero { padding: 72px 0 64px; }
  .cta-band { padding: 64px 20px; border-radius: 22px; }
  .code-body pre { padding: 18px 16px; font-size: 12.5px; }
  .code-meta { display: none; }
  .section-head { margin-bottom: 40px; }
  .faq summary { font-size: 18px; }
}
