/* ==================================================================
   STOCHASTIC CASCADE SYSTEMS — STYLES
   You normally won't need to edit this file. Colors live in the
   :root block below if you want to retheme.
   ================================================================== */

:root {
  /* Core palette — deep navy + signal cyan, an instrument-panel feel */
  --bg:          #0a0e14;
  --bg-alt:      #0e131c;
  --bg-card:     #131a26;
  --bg-card-hi:  #182233;
  --ink:         #e8edf4;
  --ink-soft:    #a6b3c4;
  --ink-mute:    #6b7a8f;
  --line:        #1f2937;
  --line-soft:   #172030;

  --accent:      #38e1c4;   /* signal cyan/teal */
  --accent-dim:  #1d9b86;
  --accent-glow: rgba(56, 225, 196, 0.14);
  --violet:      #8b7cf6;   /* secondary accent */

  --danger:      #ff6b6b;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

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

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Language visibility helper ---- */
[data-lang-hide] { display: none !important; }

/* ================================================================= */
/*  NAV                                                              */
/* ================================================================= */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.brand-mark { color: var(--accent); display: flex; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-right { display: flex; align-items: center; gap: 26px; }
.nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.18s;
}
.nav-link:hover { color: var(--ink); }
.nav-link--cta {
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 7px 15px;
  border-radius: 8px;
}
.nav-link--cta:hover {
  background: var(--accent-glow);
  color: var(--accent);
}
.lang-toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 11px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-mute);
  display: flex; gap: 5px; align-items: center;
  transition: border-color 0.18s;
}
.lang-toggle:hover { border-color: var(--accent-dim); }
.lang-opt { transition: color 0.18s; }
.lang-opt--active { color: var(--accent); font-weight: 500; }
.lang-sep { opacity: 0.4; }

/* Mobile controls (hamburger + language) — hidden on desktop */
.nav-mobile-controls {
  display: none;
  align-items: center;
  gap: 12px;
}
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 38px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  padding: 0 10px;
  transition: border-color 0.18s;
}
.menu-toggle:hover { border-color: var(--accent-dim); }
.menu-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
/* Animate to an X when open */
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile dropdown menu */
.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 24px 20px;
  background: rgba(10, 14, 20, 0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line-soft);
  transition: color 0.18s;
}
.mobile-menu-link:last-child { border-bottom: none; }
.mobile-menu-link:hover { color: var(--ink); }
.mobile-menu-link--cta {
  color: var(--accent);
  margin-top: 8px;
  border: 1px solid var(--accent-dim);
  border-radius: 9px;
  text-align: center;
  padding: 13px;
}

/* At <=720px: hide desktop links, show hamburger + mobile language toggle */
@media (max-width: 720px) {
  .nav-right { display: none; }
  .nav-mobile-controls { display: flex; }
  .brand-name { font-size: 14px; }
}

/* ================================================================= */
/*  HERO                                                             */
/* ================================================================= */
.hero {
  position: relative;
  padding: 150px 24px 90px;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.55;
}
.hero::after {
  /* soft glow behind title */
  content: "";
  position: absolute;
  top: -180px; left: 50%;
  width: 700px; height: 500px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 62%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 14px;
  border: 1px solid var(--accent-dim);
  border-radius: 100px;
  margin-bottom: 28px;
  background: var(--accent-glow);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #b9c6d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 auto 38px;
  line-height: 1.65;
}
.hero-cta-row {
  display: flex; gap: 14px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 64px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn--primary {
  background: var(--accent);
  color: #04120f;
  box-shadow: 0 4px 20px rgba(56, 225, 196, 0.25);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(56, 225, 196, 0.38);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent-dim); background: var(--bg-card); }
.btn--full { width: 100%; }

/* Hero metrics */
.hero-metrics {
  display: flex; align-items: stretch; justify-content: center;
  gap: 0; flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(19,26,38,0.4) 100%);
  padding: 6px;
  max-width: 760px;
  margin: 0 auto;
}
.metric { flex: 1; min-width: 180px; padding: 22px 26px; text-align: center; }
.metric-value {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.metric-label { font-size: 13px; color: var(--ink-mute); line-height: 1.45; }
.metric-divider { width: 1px; background: var(--line); margin: 16px 0; }
@media (max-width: 620px) {
  .metric-divider { display: none; }
  .metric { min-width: 100%; }
  .metric:not(:last-child) { border-bottom: 1px solid var(--line-soft); }
}

/* ================================================================= */
/*  SECTIONS                                                         */
/* ================================================================= */
.section { padding: 88px 24px; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-inner { max-width: var(--maxw); margin: 0 auto; }

.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 32px; }
.section-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-dim);
  font-weight: 500;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.section-standfirst {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 760px;
  margin-bottom: 48px;
  line-height: 1.6;
}

/* Two-column prose */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.col-lead p { font-size: 19px; color: var(--ink); line-height: 1.6; font-weight: 450; }
.col-body p { color: var(--ink-soft); margin-bottom: 16px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; gap: 24px; } }

/* ================================================================= */
/*  STAGE FLOW                                                       */
/* ================================================================= */
.stage-flow {
  display: flex; align-items: stretch; gap: 8px;
  margin-bottom: 44px; flex-wrap: wrap;
}
.stage-card {
  flex: 1; min-width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform 0.18s, border-color 0.18s;
}
.stage-card:hover { transform: translateY(-3px); border-color: var(--accent-dim); }
.stage-card--accent {
  border-color: var(--accent-dim);
  background: linear-gradient(165deg, var(--bg-card-hi) 0%, var(--bg-card) 100%);
  box-shadow: 0 0 28px var(--accent-glow);
}
.stage-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.stage-name {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
  margin-bottom: 10px;
}
.stage-desc { font-size: 14px; color: var(--ink-mute); line-height: 1.55; }
.stage-arrow {
  display: flex; align-items: center;
  color: var(--accent-dim); font-size: 22px;
  flex: 0 0 auto;
}
@media (max-width: 900px) {
  .stage-arrow { display: none; }
  .stage-card { min-width: calc(50% - 4px); }
}
@media (max-width: 520px) { .stage-card { min-width: 100%; } }

/* Approach note */
.approach-note {
  display: flex; gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 24px 26px;
}
.approach-note-mark {
  font-size: 22px; color: var(--accent);
  flex: 0 0 auto; line-height: 1.3;
}
.approach-note p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; }

/* ================================================================= */
/*  STATUS                                                           */
/* ================================================================= */
.status-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-bottom: 40px;
}
.status-item {
  display: flex; gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.status-check {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 700; font-size: 15px;
}
.status-check--progress { color: var(--violet); background: rgba(139, 124, 246, 0.14); }
.status-text h3 {
  font-family: var(--font-display);
  font-size: 16.5px; font-weight: 600;
  margin-bottom: 6px;
}
.status-text p { font-size: 14px; color: var(--ink-mute); line-height: 1.55; }
@media (max-width: 760px) { .status-grid { grid-template-columns: 1fr; } }

/* GitHub block */
.github-block { margin-top: 12px; }
.github-block-inner {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(180deg, var(--bg-card-hi), var(--bg-card));
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 22px 26px;
  color: var(--accent);
}
.github-block-text { color: var(--ink-soft); font-size: 15px; }
.github-link {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  margin-left: 6px;
}
.github-link:hover { color: var(--ink); }

/* ================================================================= */
/*  LEAD MAGNET                                                      */
/* ================================================================= */
.section--magnet { background: var(--bg-alt); border-top: 1px solid var(--line-soft); }
.magnet-card {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-card);
}
.magnet-left {
  padding: 44px;
  background: linear-gradient(160deg, var(--bg-card-hi) 0%, var(--bg-card) 60%);
}
.magnet-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.magnet-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 600; line-height: 1.2;
  letter-spacing: -0.015em; margin-bottom: 16px;
}
.magnet-desc { color: var(--ink-soft); font-size: 15px; margin-bottom: 24px; line-height: 1.6; }
.magnet-list { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.magnet-list li {
  position: relative; padding-left: 26px;
  color: var(--ink-soft); font-size: 14.5px;
}
.magnet-list li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--accent); font-weight: 700;
}
.magnet-right {
  padding: 44px;
  display: flex; align-items: center;
  border-left: 1px solid var(--line);
}
.ml-form { width: 100%; }
.ml-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 7px; margin-top: 16px;
}
.ml-label:first-child { margin-top: 0; }
.ml-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px 14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.ml-input:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.ml-input::placeholder { color: var(--ink-mute); }
.ml-form .btn { margin-top: 22px; }
.ml-fineprint { font-size: 12.5px; color: var(--ink-mute); margin-top: 14px; text-align: center; }
.ml-fallback { font-size: 13px; color: var(--ink-soft); margin-top: 14px; text-align: center; }
.ml-fallback a { color: var(--accent); }
@media (max-width: 800px) {
  .magnet-card { grid-template-columns: 1fr; }
  .magnet-right { border-left: none; border-top: 1px solid var(--line); }
  .magnet-left, .magnet-right { padding: 32px; }
}

/* ================================================================= */
/*  FOUNDER                                                          */
/* ================================================================= */
.founder-body { max-width: 720px; }
.founder-body .section-num { margin-bottom: 8px; display: block; }
.founder-body .section-title { margin-bottom: 20px; }
.founder-body p { color: var(--ink-soft); font-size: 16px; margin-bottom: 16px; line-height: 1.65; }
.founder-invite { color: var(--ink) !important; }
.founder-contact { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.contact-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 10px 18px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  transition: border-color 0.18s;
}
.contact-pill:hover { border-color: var(--accent-dim); }
.contact-pill span { color: var(--accent); }
.contact-pill--static { color: var(--ink-soft); }

/* ================================================================= */
/*  FOOTER                                                           */
/* ================================================================= */
.footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-alt);
  padding: 40px 24px;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  text-align: center;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 600; font-size: 16px;
  color: var(--ink);
}
.footer-meta { display: flex; gap: 10px; color: var(--ink-mute); font-size: 13.5px; }
.footer-patent { color: var(--ink-mute); font-size: 12.5px; margin-top: 4px; }

/* ================================================================= */
/*  MOTION                                                           */
/* ================================================================= */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.in { opacity: 1; transform: none; }
}
