/* Connected Minds — site styles */

:root {
  color-scheme: dark;
  --ground: #0A1216;
  --surface: #0F1B20;
  --surface-2: #13232A;
  --line: #1F3139;
  --line-strong: #2B434C;
  --text: #E4ECEA;
  --muted: #8A9EA2;
  --impulse: #FFB547;
  --impulse-ink: #1A1204;
  --impulse-soft: rgba(255, 181, 71, .12);
  --axon: #5FD4C8;
  --axon-soft: rgba(95, 212, 200, .12);
  --paper: #EEF2EF;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --radius: 12px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--impulse); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.05; text-wrap: balance; letter-spacing: -.02em; }
h1 { font-weight: 800; font-size: clamp(40px, 6.2vw, 80px); }
h2 { font-weight: 800; font-size: clamp(32px, 4.4vw, 54px); }
h3 { font-weight: 600; font-size: 21px; letter-spacing: -.01em; line-height: 1.2; }
p { margin: 0; }
.hl { color: var(--impulse); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text); max-width: 60ch; }
.eyebrow, .label {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase; color: var(--axon);
}
.eyebrow { margin-bottom: 16px; }
.label { color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--impulse); color: var(--impulse-ink); padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

.container { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

/* Buttons & links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 15px/1 var(--body); text-decoration: none; cursor: pointer;
  padding: 13px 20px; border-radius: 999px; border: 1px solid transparent;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.btn-primary { background: var(--impulse); color: var(--impulse-ink); }
.btn-primary:hover { box-shadow: 0 0 0 6px var(--impulse-soft), 0 0 32px rgba(255,181,71,.35); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--axon); }
.btn:active { transform: translateY(1px); }
.text-link { color: var(--impulse); text-decoration: none; border-bottom: 1px solid rgba(255,181,71,.35); }
.text-link:hover { border-bottom-color: var(--impulse); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 18, 22, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 19px var(--display); letter-spacing: -.01em; white-space: nowrap; }
.mark { width: 32px; height: 24px; overflow: visible; }
.mark-arc { fill: none; stroke: var(--axon); stroke-width: 1.6; }
.mark-node { fill: var(--text); }
.mark-spark { fill: var(--impulse); filter: drop-shadow(0 0 3px rgba(255,181,71,.8)); }
/* Header logo: the spark travels along the arc from one mind to the other, then rests */
@supports (offset-path: path("M0 0")) {
  .site-header .mark-spark {
    cx: 0; cy: 0;
    offset-path: path("M5 16 C 10 3, 20 3, 25 16");
    offset-rotate: 0deg;
    offset-distance: 50%;
    animation: spark 4.8s cubic-bezier(.45, 0, .35, 1) infinite;
  }
  .site-header .brand:hover .mark-spark { animation-duration: 1.6s; }
}
@keyframes spark {
  0%   { offset-distance: 0%;   opacity: 0; }
  8%   { opacity: 1; }
  42%  { offset-distance: 100%; opacity: 1; }
  52%  { offset-distance: 100%; opacity: 0; }
  100% { offset-distance: 100%; opacity: 0; }
}

.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav a:not(.btn):hover, .nav a.active { color: var(--text); }
.nav-cta { padding: 10px 16px; font-size: 14px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 1.6px; background: var(--text); margin-inline: auto; position: relative; transition: transform .25s, background-color .25s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { position: relative; padding-bottom: clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-stage { position: relative; }
#brain { width: 100%; height: clamp(360px, 54vw, 620px); touch-action: pan-y; }
.hero-hint { position: absolute; right: var(--gutter); top: 16px; font-size: 11px; color: var(--muted); }
.hero-copy { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px 64px; align-items: end; margin-top: -24px; position: relative; }
.hero-sub { margin-top: 20px; color: var(--muted); font-size: clamp(16px, 1.4vw, 18px); max-width: 56ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.picker { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(15, 27, 32, .7); }
.picker .label { display: block; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 500 13px var(--mono); padding: 8px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--axon); }
.chip[aria-pressed="true"] { border-color: var(--impulse); background: var(--impulse-soft); color: var(--impulse); }
.readout { margin-top: 14px; font-size: 12px; color: var(--muted); min-height: 1.6em; }
.readout b { color: var(--impulse); font-weight: 500; }

/* Stats */
.stats { border-block: 1px solid var(--line); background: var(--surface); }
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 24px; display: grid; gap: 6px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num { font: 800 clamp(32px, 3.6vw, 44px)/1 var(--display); letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 14px; color: var(--muted); }

/* Sections */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 760px; }
.section-head.row { max-width: none; grid-template-columns: 1fr minmax(0, 380px); align-items: end; gap: 24px 48px; }
.section-head p.muted { font-size: 17px; max-width: 60ch; }
.head-note { font-size: 15px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(40px, 6vw, 96px); align-items: start; }
.stack-y { display: grid; gap: 32px; }
.thesis { font-size: clamp(36px, 4.8vw, 62px); line-height: 1; letter-spacing: -.03em; }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th { font: 500 12px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.compare tbody th { font-weight: 500; color: var(--muted); }
.compare td { color: var(--muted); }
.compare td.us { color: var(--text); }
.compare td.us::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--impulse); box-shadow: 0 0 8px rgba(255,181,71,.7); margin-right: 10px; vertical-align: 2px; }

/* How it works — axon line */
.axon-steps { list-style: none; margin: 0; padding: 0 0 0 40px; position: relative; display: grid; gap: 0; --progress: 0; }
.axon-steps::before, .axon-steps::after { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; }
.axon-steps::before { background: var(--line); }
.axon-steps::after { background: linear-gradient(var(--axon), var(--impulse)); transform-origin: top; transform: scaleY(var(--progress)); box-shadow: 0 0 12px rgba(255,181,71,.4); }
.axon-step { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px 24px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.axon-step:last-child { border-bottom: 0; }
.axon-step h3 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 10px; }
.axon-step p { color: var(--muted); max-width: 62ch; }
.step-num { font-size: 13px; color: var(--muted); padding-top: 8px; transition: color .4s; }
.axon-node { position: absolute; left: -40px; top: 38px; width: 16px; height: 16px; border-radius: 50%; background: var(--ground); border: 2px solid var(--line-strong); transition: border-color .4s, background-color .4s, box-shadow .4s; z-index: 1; }
.axon-step.lit .axon-node { border-color: var(--impulse); background: var(--impulse); box-shadow: 0 0 0 6px var(--impulse-soft), 0 0 22px rgba(255,181,71,.6); }
.axon-step.lit .step-num { color: var(--impulse); }

/* Minds */
.minds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mind { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 10px; align-content: start; transition: border-color .25s, transform .25s; }
.mind:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.mind-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.mind-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--ground); border: 1px solid var(--line); }
.mind-id { font-size: 12px; color: var(--muted); }
.mind h3 { font-size: 19px; }
.mind dl { margin: 4px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 14px; }
.mind dt { font: 400 12px/1.7 var(--mono); color: var(--muted); }
.mind dd { margin: 0; font-variant-numeric: tabular-nums; }
.status { font: 400 11px var(--mono); color: var(--axon); display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--axon); box-shadow: 0 0 8px var(--axon); }
.status.busy { color: var(--muted); }
.status.busy::before { background: var(--muted); box-shadow: none; }

/* Stacks */
.clusters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cluster { background: var(--ground); padding: 26px; display: grid; gap: 16px; align-content: start; }
.cluster h3 { display: flex; align-items: center; gap: 10px; }
.cluster h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--axon); box-shadow: 0 0 10px var(--axon); }
.cluster.core h3::before { background: var(--impulse); box-shadow: 0 0 10px var(--impulse); }
.cluster ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cluster li { font: 400 13px var(--mono); padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--surface); }
.cluster > p { color: var(--muted); font-size: 15px; }
.cluster.wide { grid-column: span 2; }
.cluster.wide h3::before { background: var(--impulse); box-shadow: 0 0 10px var(--impulse); }
.cluster.ask { background: var(--surface); }
.cluster.ask h3::before { background: transparent; border: 1.5px dashed var(--muted); box-shadow: none; width: 10px; height: 10px; }
.cluster.ask p { color: var(--muted); font-size: 15px; }

/* Engagement models */
.models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.model { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; align-content: start; background: var(--surface); }
.model.featured { border-color: rgba(255,181,71,.45); background: linear-gradient(180deg, rgba(255,181,71,.06), transparent 60%), var(--surface); }
.model p { color: var(--muted); }
.model dl { margin: 8px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.model dt { font: 400 12px/1.8 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.model dd { margin: 0; }
.model-graphic { display: block; height: 56px; }
.center-note { margin-top: 28px; font-size: 15px; }

/* Scenarios */
.scenarios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.scenario { display: grid; gap: 12px; align-content: start; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.scenario .tag { font-size: 12px; color: var(--axon); }
.scenario p { color: var(--muted); }

/* Join */
.join { background: radial-gradient(ellipse 60% 70% at 85% 30%, rgba(95,212,200,.07), transparent 70%), var(--ground); }
.join .lead { margin-block: 22px 30px; color: var(--muted); }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.benefits li { display: grid; gap: 8px; align-content: start; padding-top: 18px; border-top: 1px solid var(--line); }
.benefits h3 { font-size: 19px; }
.benefits p { color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative; font: 600 clamp(18px, 1.8vw, 21px)/1.3 var(--display); letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font: 400 24px var(--mono); color: var(--axon); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--impulse); }
.faq details p { padding: 0 40px 24px 0; color: var(--muted); max-width: 64ch; }

/* Contact */
.contact { background: var(--surface); }
.contact .lead { margin-block: 22px 32px; color: var(--muted); }
.mail-line { display: grid; gap: 8px; margin-bottom: 28px; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mail-addr { font-size: clamp(16px, 1.8vw, 19px); color: var(--impulse); text-decoration: none; border-bottom: 1px solid rgba(255,181,71,.35); overflow-wrap: anywhere; }
.mail-addr:hover { border-bottom-color: var(--impulse); }
.copy-btn { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); cursor: pointer; transition: border-color .2s, color .2s; }
.copy-btn:hover { border-color: var(--axon); color: var(--text); }
.copy-btn.done { border-color: var(--axon); color: var(--axon); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form { position: relative; }
.address { font-style: normal; color: var(--muted); line-height: 1.7; }
.address strong { color: var(--text); font-weight: 500; }
.form { display: grid; gap: 18px; background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.intent { border: 0; margin: 0 0 4px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface); border-radius: 999px; }
.intent label { position: relative; cursor: pointer; }
.intent input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.intent span { display: block; text-align: center; padding: 10px 12px; border-radius: 999px; font-size: 14px; color: var(--muted); transition: background-color .2s, color .2s; }
.intent input:checked + span { background: var(--impulse); color: var(--impulse-ink); font-weight: 500; }
.intent input:focus-visible + span { outline: 2px solid var(--impulse); outline-offset: 2px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 12px 14px; font-size: 15px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #5A6E73; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--axon); box-shadow: 0 0 0 3px var(--axon-soft); }
.field.invalid input, .field.invalid textarea { border-color: #E5776A; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-status { font-size: 14px; color: var(--muted); }
.form-status.ok { color: var(--axon); }
.form-status.err { color: #E5776A; }
.form-note { font-size: 13px; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px; }
.footer-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 16px 32px; align-items: center; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }
.footer-inner > .small { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--line); }

/* Reveal on scroll (content stays visible without JS) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Legal page */
.legal { padding-block: 64px 96px; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 12px; }
.legal h2 { font-size: 24px; margin-top: 40px; margin-bottom: 12px; }
.legal p, .legal li { color: var(--muted); max-width: 68ch; }
.legal p + p { margin-top: 12px; }

/* Responsive */
@media (max-width: 1080px) {
  .minds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clusters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ground); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav-cta { margin-top: 18px; padding: 14px; font-size: 15px; }
  .hero-copy, .split, .section-head.row { grid-template-columns: 1fr; }
  .hero-copy { margin-top: 0; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 22px 16px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .models, .scenarios { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .minds, .clusters, .benefits, .field-row { grid-template-columns: 1fr; }
  .axon-steps { padding-left: 32px; }
  .axon-node { left: -32px; }
  .axon-step { grid-template-columns: 1fr; }
  .step-num { padding-top: 0; }
  .hero-hint { display: none; }
  #brain { height: 300px; }
  .cluster.wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
