/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 300; font-display: swap; src: url(fonts/inter-tight-300.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-tight-400.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-tight-500.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-tight-600.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-500.woff2) format("woff2"); }

:root {
  --bg: #06080b;
  --bg-2: #0b0f14;
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.18);
  --text: #ffffff;
  --muted: #8b95a3;
  --accent: #7cc8ff;
  --accent-soft: rgba(124,200,255,0.14);
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1240px;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
h2 { font-weight: 400; letter-spacing: -0.03em; line-height: 1.06; font-size: clamp(32px, 4.6vw, 64px); }
h1 em, h2 em { font-style: normal; color: var(--muted); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(6,8,11,0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.logo { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 23px; letter-spacing: -0.02em; }
.logo svg { width: 38px; height: 38px; filter: drop-shadow(0 0 10px rgba(124,200,255,0.35)); }
.logo .ai { color: var(--accent); font-weight: 500; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  padding: 11px 18px; border: 1px solid var(--line-strong); border-radius: 2px;
  transition: border-color .25s, background .25s;
}
.btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding-bottom: clamp(64px, 12vh, 140px); overflow: hidden; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 30%, transparent 0%, var(--bg) 75%), linear-gradient(to bottom, transparent 60%, var(--bg)); pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero h1 {
  font-weight: 400; letter-spacing: -0.035em; line-height: 1.02;
  font-size: clamp(42px, 7.6vw, 108px); max-width: 13ch; margin: 24px 0 32px;
}
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.hero .lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 46ch; }
.scroll-cue { display: flex; align-items: center; gap: 12px; }
.scroll-cue .bar { width: 1px; height: 40px; background: linear-gradient(var(--accent), transparent); animation: drip 2s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Generic section ---------- */
.section { padding: clamp(96px, 16vh, 180px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; margin-bottom: clamp(48px, 8vh, 96px); }

/* ---------- Convergence (sticky scroll) ---------- */
#converge { height: 340vh; border-top: 1px solid var(--line); }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.sticky .wrap { width: 100%; display: grid; grid-template-columns: 4fr 8fr; gap: 48px; align-items: center; }
.captions { position: relative; min-height: 220px; }
.cap { position: absolute; inset: 0; opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s; pointer-events: none; }
.cap.on { opacity: 1; transform: none; }
.cap h2 { font-size: clamp(30px, 3.8vw, 54px); margin: 20px 0; }
.steps { display: flex; gap: 8px; position: absolute; bottom: -64px; left: 0; }
.steps i { width: 32px; height: 2px; background: var(--line-strong); transition: background .4s; }
.steps i.on { background: var(--accent); }
#diagram { width: 100%; height: auto; max-height: 78vh; overflow: visible; }
#diagram .node rect { fill: var(--bg-2); stroke: rgba(124,200,255,0.55); }
#diagram .node text { fill: #fff; font-family: var(--sans); font-size: 24px; font-weight: 500; text-anchor: middle; }
#diagram .node text.sub { fill: var(--muted); font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: .04em; }
#diagram .link { stroke: var(--accent); stroke-width: 1; opacity: .6; }
#diagram .pulse { fill: var(--accent); }
#diagram .core .label { font-family: var(--sans); font-size: 26px; letter-spacing: -0.01em; fill: #fff; font-weight: 500; text-anchor: middle; }

/* ---------- Agents ---------- */
.agents { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.agent { padding: 36px 28px 44px 0; }
.agent + .agent { padding-left: 28px; border-left: 1px solid var(--line); }
.agent .glyph { display: block; width: 44px; height: 44px; margin: 28px 0 40px; color: var(--accent); }
.agent h3 { font-weight: 400; font-size: 22px; letter-spacing: -0.015em; line-height: 1.2; }

/* ---------- Contact ---------- */
.contact { padding: clamp(96px, 16vh, 160px) 0; border-top: 1px solid var(--line); background: radial-gradient(ellipse at 15% 100%, rgba(124,200,255,0.08), transparent 55%); }
.contact .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; }
.contact .cta { justify-self: end; }
.mail { font-size: clamp(22px, 2.6vw, 34px); letter-spacing: -0.02em; border-bottom: 1px solid var(--line-strong); padding-bottom: 6px; transition: border-color .25s, color .25s; display: inline-flex; gap: 14px; align-items: baseline; }
.mail:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 32px 0 40px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer nav { display: flex; gap: 24px; }
footer nav a { transition: color .25s; }
footer nav a:hover, footer nav a[aria-current] { color: var(--text); }

/* ---------- Legal pages ---------- */
.legal { padding: 160px 0 clamp(96px, 16vh, 160px); }
.legal .wrap { max-width: calc(760px + 2 * var(--gutter)); }
.legal h1 { font-weight: 400; letter-spacing: -0.03em; line-height: 1.06; font-size: clamp(36px, 5vw, 56px); margin: 20px 0 16px; }
.legal .updated { font-size: 12px; margin-bottom: 56px; }
.legal h2 { font-size: 22px; letter-spacing: -0.015em; line-height: 1.3; margin: 48px 0 12px; }
.legal h3 { font-weight: 500; font-size: 16px; margin: 24px 0 8px; }
.legal p, .legal li, .legal address { color: var(--muted); font-size: 16px; font-style: normal; }
.legal p + p, .legal p + ul, .legal ul + p { margin-top: 12px; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--text); font-weight: 400; }
.legal a { color: var(--text); border-bottom: 1px solid var(--line-strong); transition: border-color .25s, color .25s; }
.legal a:hover { color: var(--accent); border-color: var(--accent); }
.legal dl { display: grid; grid-template-columns: 200px 1fr; gap: 10px 24px; font-size: 16px; }
.legal dt { color: var(--text); }
.legal dd { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .agents { grid-template-columns: repeat(2, 1fr); }
  .agent:nth-child(3) { padding-left: 0; border-left: 0; }
  .agent:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .nav .wrap { height: 72px; }
  .logo { font-size: 19px; gap: 10px; }
  .logo svg { width: 30px; height: 30px; }
  .section-head, .contact .wrap { grid-template-columns: 1fr; gap: 20px; }
  .contact .cta { justify-self: start; }
  .agents { grid-template-columns: 1fr; }
  .agent, .agent + .agent { padding: 28px 0 36px; border-left: 0; }
  .agent + .agent { border-top: 1px solid var(--line); }
  .agent .glyph { margin: 0 0 24px; }
  #converge { height: 300vh; }
  .sticky .wrap { grid-template-columns: 1fr; gap: 12px; align-content: center; }
  .captions { min-height: 150px; order: 2; }
  .cap h2 { margin: 12px 0; }
  .steps { bottom: -28px; }
  #diagram { max-height: 46vh; }
  .legal { padding-top: 120px; }
  .legal dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue .bar { animation: none; }
  .cap { transition: none; }
}
