/* Haider launch site — design system. Self-hosted, no external fonts or assets
   (strict CSP). Dark cybersecurity theme; restrained accents. */

:root {
  --background: #070b11;
  --surface: #0d141d;
  --surface-elevated: #111b27;
  --surface-soft: #172230;
  --border: #233246;
  --border-strong: #34485f;
  --text: #f1f6fb;
  --text-secondary: #a8b6c5;
  --text-muted: #75869a;
  --primary: #4dd4ac;
  --primary-hover: #6ce2bd;
  --offensive: #ff5d6c;
  --defensive: #4aa8ff;
  --purple-team: #a98cf5;
  --success: #4bd789;
  --warning: #f1bd58;
  --danger: #ff5d6c;

  --font-sans: Inter, "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
    Consolas, monospace;

  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 9px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1000px 600px at 85% -5%, rgba(77, 212, 172, 0.08), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(74, 168, 255, 0.06), transparent 55%),
    var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--text-secondary); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img, svg { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; border-top: 1px solid rgba(35, 50, 70, 0.5); }
.section--tight { padding: 48px 0; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--primary); margin: 0 0 12px;
}
.section h2 { font-size: clamp(28px, 4vw, 40px); }
.section__lead { max-width: 62ch; font-size: 18px; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--primary);
  color: #04140d; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600;
  font-size: 16px; padding: 13px 22px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: background 0.15s, transform 0.15s, border-color 0.15s;
  min-height: 46px; text-align: center;
}
.btn--primary { background: var(--primary); color: #04140d; }
.btn--primary:hover { background: var(--primary-hover); color: #04140d; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--primary); color: var(--text); }
.btn--block { width: 100%; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 17, 0.72); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; }
.brand img { height: 30px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text-secondary); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); }
.header-cta { margin-left: 20px; }
.nav-toggle { display: none; margin-left: auto; background: transparent; border: 1px solid var(--border-strong);
  color: var(--text); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; }

/* hero */
.hero { padding: 72px 0 40px; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; }
.badge-pre {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.08em; color: var(--primary);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 14px; margin-bottom: 22px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 10px var(--primary); }
.hero h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 800; }
.hero h1 .accent { color: var(--primary); }
.hero__sub { font-size: 19px; max-width: 54ch; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 18px; }
.hero__note { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); }
.hero__figure { position: relative; }
.concept-tag {
  position: absolute; top: 14px; right: 14px; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-muted); background: rgba(7,11,17,0.7); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px;
}

/* pill row (credibility strip) */
.pills { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pill {
  display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); background: var(--surface); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 999px;
}
.pill svg { width: 16px; height: 16px; }

/* cards */
.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); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--border-strong); }
.card__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 16px; border: 1px solid var(--border); }
.card__icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 20px; }
.card p { font-size: 15.5px; margin-bottom: 0; }
.card ul { margin: 12px 0 0; padding-left: 0; list-style: none; }
.card li { font-size: 14.5px; color: var(--text-secondary); padding-left: 22px; position: relative; margin-bottom: 6px; }
.card li::before { content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 12px;
  background: no-repeat center/contain; }
.accent-red { color: var(--offensive); } .accent-blue { color: var(--defensive); }
.accent-purple { color: var(--purple-team); } .accent-green { color: var(--primary); }
.icon-red { border-color: rgba(255,93,108,0.4); }
.icon-blue { border-color: rgba(74,168,255,0.4); }
.icon-purple { border-color: rgba(169,140,245,0.4); }
.icon-green { border-color: rgba(77,212,172,0.4); }

/* problem section: disconnected -> unified */
.merge { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.chip-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; font-family: var(--font-mono); color: var(--text-muted);
  border: 1px dashed var(--border-strong); border-radius: 8px; padding: 7px 11px; }
.merge__arrow { color: var(--primary); font-size: 26px; }
.merge__unified { background: var(--surface-elevated); border: 1px solid var(--primary);
  border-radius: var(--radius); padding: 22px; text-align: center; }

/* status labels */
.status { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--text-muted); }
.status--dev { color: var(--warning); border-color: rgba(241,189,88,0.4); }
.status--planned { color: var(--defensive); border-color: rgba(74,168,255,0.4); }
.status--research { color: var(--purple-team); border-color: rgba(169,140,245,0.4); }
.status--done { color: var(--success); border-color: rgba(75,215,137,0.4); }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat__num { font-size: 34px; font-weight: 800; color: var(--primary); font-family: var(--font-mono); }
.stat__label { font-size: 13px; color: var(--text-muted); }

/* agents grid */
.agent { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.agent h4 { margin: 0 0 3px; font-size: 15px; }
.agent__role { font-size: 13px; color: var(--text-muted); margin: 0 0 10px; }
.agent__meta { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-family: var(--font-mono); font-size: 10.5px; padding: 3px 8px; border-radius: 6px;
  background: var(--surface-soft); color: var(--text-secondary); }
.tag--local { color: var(--primary); }

/* capability matrix */
.matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.matrix__col h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-mono); }
.matrix__col ul { list-style: none; margin: 0; padding: 0; }
.matrix__col li { font-size: 14px; color: var(--text-secondary); padding: 7px 0 7px 24px; position: relative; border-top: 1px solid rgba(35,50,70,0.5); }
.matrix__col li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* flow diagram wrapper */
.flow-wrap { overflow-x: auto; padding: 8px 0; }

/* waitlist */
.waitlist { background: linear-gradient(180deg, var(--surface-elevated), var(--surface)); }
.form-card { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 30px; max-width: 620px; margin: 0 auto; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field input[type="email"], .field select {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--background); border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 12px 14px; min-height: 46px;
}
.field input:focus, .field select:focus { border-color: var(--primary); }
.checkbox-group { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); font-weight: 400; }
.check input { width: 18px; height: 18px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-secondary); }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 24px; margin-top: 14px; font-size: 15px; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; margin-top: 5px; }
.form-note { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--text-muted); font-size: 14px; }
.site-footer a { color: var(--text-secondary); }
.footer__grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; }
.dev-notice { text-align: center; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-top: 26px; }

/* legal pages */
.legal { max-width: 760px; }
.legal h1 { font-size: 34px; }
.legal h2 { font-size: 22px; margin-top: 32px; }
.legal p, .legal li { color: var(--text-secondary); font-size: 16px; }

/* reveal on scroll (progressive; visible by default if JS off) */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* responsive */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .grid--4, .stats, .matrix { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: 1fr; }
  .nav, .header-cta { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header.is-open .nav {
    display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 16px 24px; gap: 14px;
  }
  .site-header.is-open .header-cta { display: block; padding: 0 24px 18px; background: var(--surface); }
  .merge { grid-template-columns: 1fr; }
  .merge__arrow { transform: rotate(90deg); text-align: center; }
}
@media (max-width: 560px) {
  .grid--2, .grid--4, .stats, .matrix, .checkbox-group { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}
