/* ============================================================
   BioNexus, Design System
   Display: Space Grotesk · Body: IBM Plex Sans · Data: IBM Plex Mono
   ============================================================ */

:root {
  /* Ink & surfaces (cool neutral) */
  --ink:        #0a1326;
  --navy:       #0e2a52;
  --navy-700:   #133a6b;
  --paper:      #ffffff;
  --paper-2:    #f4f8fc;
  --paper-3:    #e9f1f8;
  --line:       #d9e4f0;
  --line-soft:  #eaf1f8;
  --text:       #14233d;
  --muted:      #5b6b85;
  --muted-2:    #8493ab;

  /* Accent, single cyan-teal, harmonic */
  --accent:     oklch(0.72 0.115 215);
  --accent-ink: oklch(0.55 0.10 220);
  --accent-soft:oklch(0.95 0.03 215);
  --accent-line:oklch(0.86 0.06 215);

  /* eLab secondary tint (in-silico), same chroma/L, shifted hue */
  --bio:        oklch(0.70 0.115 175);
  --bio-soft:   oklch(0.95 0.03 175);

  /* WhatsApp, reserved ONLY for WA actions */
  --wa:         #1faa55;
  --wa-700:     #178a45;

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --r-xl: 30px;

  --sh-sm: 0 1px 2px rgba(13,38,75,.06), 0 1px 3px rgba(13,38,75,.05);
  --sh:    0 6px 22px -8px rgba(13,38,75,.16), 0 2px 6px rgba(13,38,75,.05);
  --sh-lg: 0 28px 60px -22px rgba(13,38,75,.30), 0 8px 22px -12px rgba(13,38,75,.14);

  --maxw: 1200px;
  --nav-h: 72px;
  --ease: cubic-bezier(.22,.61,.36,1);

  /* fonts (overridable via Tweaks) */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}
::selection { background: var(--accent-soft); color: var(--navy); }

h1,h2,h3,h4 { font-family: var(--font-display); color: var(--ink); margin: 0; line-height: 1.06; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: clamp(64px, 9vw, 132px) 0; }
.section--tight { padding: clamp(44px, 6vw, 84px) 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-ink); font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent-line); display: inline-block; }
.eyebrow--center { justify-content: center; }

.display { font-size: clamp(2.5rem, 6vw, 4.6rem); }
.h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
.h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); line-height: 1.65; }
.kicker-mono { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s, color .2s;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--navy); color: #fff; box-shadow: var(--sh-sm); }
.btn--primary:hover { background: var(--navy-700); box-shadow: var(--sh); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent-line); background: var(--paper-2); transform: translateY(-2px); }
.btn--accent { background: var(--accent); color: #04222a; box-shadow: var(--sh-sm); }
.btn--accent:hover { transform: translateY(-2px); box-shadow: var(--sh); filter: brightness(1.04); }
.btn--wa { background: var(--wa); color: #fff; box-shadow: 0 6px 18px -8px rgba(31,170,85,.7); }
.btn--wa:hover { background: var(--wa-700); transform: translateY(-2px); box-shadow: 0 10px 26px -10px rgba(31,170,85,.75); }
.btn--sm { padding: 9px 15px; font-size: 13.5px; }
.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn svg { width: 17px; height: 17px; flex: none; }

.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--accent-ink); }
.link-arrow svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Cards ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.card--hover:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: var(--accent-line); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  padding: 5px 11px; border-radius: 999px;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--muted);
  letter-spacing: .02em;
}
.chip--accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.chip--bio { background: var(--bio-soft); border-color: color-mix(in oklch, var(--bio) 35%, white); color: oklch(0.45 0.10 178); }

/* ---------- Placeholder (no fake imagery) ---------- */
.ph {
  position: relative; overflow: hidden; border-radius: var(--r);
  background:
    repeating-linear-gradient(135deg, var(--paper-2) 0 11px, var(--paper-3) 11px 22px);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.ph__tag {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em;
  color: var(--muted-2); background: rgba(255,255,255,.82); backdrop-filter: blur(2px);
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line);
  text-align: center; max-width: 86%;
}
.ph--dark {
  background:
    repeating-linear-gradient(135deg, #122a4d 0 11px, #0f2342 11px 22px);
  border-color: rgba(255,255,255,.08);
}
.ph--dark .ph__tag { background: rgba(10,19,38,.6); color: #9db4d6; border-color: rgba(255,255,255,.12); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Divider dot row ---------- */
.dotline { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-family: var(--font-mono); font-size: 12px; }
.dotline::before, .dotline::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s, box-shadow .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav--solid { background: rgba(255,255,255,.82); backdrop-filter: saturate(1.4) blur(14px); border-bottom-color: var(--line-soft); box-shadow: 0 4px 20px -16px rgba(13,38,75,.4); }

/* Over dark hero (top of Home / eLab): flip text to light for legibility */
.nav--ondark .nav__link { color: #eaf2fb; }
.nav--ondark .nav__link:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav--ondark .nav__link.active { color: var(--accent); }
.nav--ondark .nav__link.active::after { background: var(--accent); }
.nav--ondark .logo__txt { color: #fff; }
.nav--ondark .logo__txt b { color: var(--accent); }
.nav--ondark .hamburger { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative; padding: 9px 14px; border-radius: 10px; font-weight: 500; font-size: 14.5px;
  color: var(--text); cursor: pointer; transition: color .2s, background .2s; display: inline-flex; align-items: center; gap: 6px;
}
.nav__link:hover { background: var(--paper-2); color: var(--navy); }
.nav__link.active { color: var(--accent-ink); }
.nav__link.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent); }
.nav__cta { display: flex; align-items: center; gap: 10px; }
.caret { width: 13px; height: 13px; transition: transform .25s var(--ease); }
.nav__item--has:hover .caret { transform: rotate(180deg); }

/* dropdown */
.nav__item--has { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(8px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-lg);
  padding: 8px; min-width: 230px; opacity: 0; visibility: hidden; transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.nav__item--has:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown__item { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px; border-radius: 9px; cursor: pointer; transition: background .18s; }
.dropdown__item:hover { background: var(--paper-2); }
.dropdown__item b { font-weight: 600; font-size: 14px; color: var(--ink); }
.dropdown__item span { font-size: 12px; color: var(--muted); }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; }
.logo__mark { width: 34px; height: 34px; flex: none; }
.logo__txt { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -.02em; color: var(--ink); }
.logo__txt b { color: var(--accent-ink); font-weight: 600; }

/* hamburger / mobile sheet */
.hamburger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; align-items: center; justify-content: center; }
.hamburger svg { width: 20px; height: 20px; }
.sheet { position: fixed; inset: 0; z-index: 200; background: var(--ink); color: #fff; transform: translateY(-100%); transition: transform .4s var(--ease); overflow-y: auto; padding: 22px; display: flex; flex-direction: column; }
.sheet.open { transform: none; }
.sheet__row { padding: 16px 4px; border-bottom: 1px solid rgba(255,255,255,.1); font-family: var(--font-display); font-size: 20px; }
.sheet__sub { display: block; padding: 10px 14px; color: #9db4d6; font-family: var(--font-body); font-size: 15px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; padding-top: calc(var(--nav-h) + 56px); }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.hero__glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; pointer-events: none; }
.hero__inner { position: relative; z-index: 2; }

/* split hero with featured 3D helix */
.hero--split .hero__canvas { left: 36%; opacity: .92; }
.hero__inner--split { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 30px; }
.hero__copy { position: relative; z-index: 3; }
.hero__viz { position: relative; min-height: 460px; }
.hero__viz-label { position: absolute; top: 14px; right: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-family: var(--font-mono); font-size: 11px; color: #7f9bc4; }
.hero__viz-label span:first-child { color: var(--accent); letter-spacing: .08em; }
.hero__scrollcue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #6f86ac; }
.hero__scrollcue i { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }
.hero__scrollcue i::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 40%; background: var(--accent); animation: scrollcue 1.8s var(--ease) infinite; }
@keyframes scrollcue { 0% { transform: translateY(-100%); } 100% { transform: translateY(250%); } }
.hero h1 { color: #fff; }
.hero .accent-text { color: var(--accent); }
.hero__lead { color: #adc2e0; font-size: clamp(1.05rem,1.5vw,1.3rem); max-width: 600px; line-height: 1.6; }
.hero-grid-fade { position: absolute; inset: 0; background:
   linear-gradient(transparent, var(--ink) 92%),
   linear-gradient(90deg, var(--ink), transparent 12%, transparent 88%, var(--ink)); z-index: 1; pointer-events: none;}

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat { background: #fff; padding: 26px 22px; }
.stat__n { font-family: var(--font-display); font-size: clamp(1.8rem,3vw,2.4rem); color: var(--navy); font-weight: 600; letter-spacing: -.02em; }
.stat__l { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

/* ============================================================
   GRIDS & SHARED PAGE BITS
   ============================================================ */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }

.sub-hero { padding-top: calc(var(--nav-h) + 52px); padding-bottom: 8px; background: var(--paper-2); border-bottom: 1px solid var(--line-soft); position: relative; overflow: hidden; }
.breadcrumb { display: flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 18px; flex-wrap: wrap; }
.breadcrumb a { cursor: pointer; transition: color .2s; }
.breadcrumb a:hover { color: var(--accent-ink); }
.breadcrumb .sep { color: var(--muted-2); }
.breadcrumb .cur { color: var(--ink); }

/* category card */
.cat {
  position: relative; overflow: hidden; padding: 30px; cursor: pointer; display: flex; flex-direction: column; min-height: 230px;
  background: var(--paper);
}
.cat__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--accent-line); margin-bottom: auto; }
.cat__icon svg { width: 26px; height: 26px; color: var(--accent-ink); }
.cat__count { font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); }
.cat h3 { margin-top: 18px; }
.cat p { color: var(--muted); font-size: 14.5px; margin-top: 8px; }

/* subject card */
.subj { padding: 22px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; }
.subj__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.subj__dot { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); border: 1px solid var(--accent-line); display: grid; place-items: center; flex: none; }
.subj__dot svg { width: 19px; height: 19px; color: var(--accent-ink); }
.subj h3 { font-size: 1.15rem; }
.subj p { font-size: 13.8px; color: var(--muted); }
.subj__meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-2); }

/* tutor card */
.tutor { overflow: hidden; display: flex; flex-direction: column; }
.tutor__photo { aspect-ratio: 4/3.1; width: 100%; border-radius: 0; }
.tutor__body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tutor__name { font-size: 1.18rem; }
.tutor__role { font-family: var(--font-mono); font-size: 12px; color: var(--accent-ink); margin-top: 3px; }
.tutor__bio { font-size: 13.8px; color: var(--muted); }
.tutor__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tutor__creds { display: flex; flex-direction: column; gap: 7px; margin-top: 2px; }
.tutor__cred { display: flex; gap: 8px; font-size: 13px; color: var(--text); align-items: flex-start; }
.tutor__cred svg { width: 15px; height: 15px; color: var(--accent-ink); flex: none; margin-top: 3px; }
.tutor__actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }

/* feature / workflow */
.feat { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.feat__ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--paper-2); border: 1px solid var(--line); }
.feat__ic svg { width: 23px; height: 23px; color: var(--navy); }

.workflow { counter-reset: step; display: grid; gap: 14px; }
.wstep { display: grid; grid-template-columns: 54px 1fr; gap: 18px; align-items: start; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; position: relative; transition: border-color .3s, box-shadow .3s; }
.wstep:hover { border-color: var(--accent-line); box-shadow: var(--sh); }
.wstep__n { counter-increment: step; width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: #fff; font-family: var(--font-mono); font-weight: 500; display: grid; place-items: center; font-size: 15px; }
.wstep__n::before { content: counter(step,decimal-leading-zero); }
.wstep h4 { font-size: 1.05rem; margin-bottom: 5px; }
.wstep p { font-size: 14px; color: var(--muted); }

/* pricing-ish service tiles (MD durations) */
.dur { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 14px; }
.dur__tile { border: 1px solid var(--line); border-radius: var(--r); padding: 20px; text-align: center; transition: border-color .3s, transform .3s, box-shadow .3s; cursor: pointer; background: #fff; }
.dur__tile:hover { border-color: var(--accent-line); transform: translateY(-4px); box-shadow: var(--sh); }
.dur__n { font-family: var(--font-display); font-size: 1.8rem; color: var(--navy); font-weight: 600; }
.dur__u { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); letter-spacing: .1em; text-transform: uppercase; }

/* checklist */
.checks { display: grid; gap: 11px; }
.checks li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; list-style: none; }
.checks svg { width: 19px; height: 19px; color: var(--accent-ink); flex: none; margin-top: 3px; }
.checks ul, .checks { padding: 0; margin: 0; }

/* CTA band */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: clamp(40px,6vw,72px); position: relative; overflow: hidden; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #adc2e0; max-width: 540px; margin: 14px auto 0; }
.cta-band__actions { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.cta-band__glow { position: absolute; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, var(--accent), transparent 65%); opacity: .22; filter: blur(40px); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink); color: #c6d4ea; padding: 64px 0 30px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #7f93b5; margin: 0 0 16px; font-weight: 500; }
.footer a:not(.btn) { display: block; padding: 6px 0; color: #c6d4ea; font-size: 14.5px; transition: color .2s; cursor: pointer; }
.footer a:not(.btn):hover { color: var(--accent); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #7f93b5; flex-wrap: wrap; gap: 12px; }
.footer .logo__txt { color: #fff; }

/* floating WA button */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 14px 34px -10px rgba(31,170,85,.7); cursor: pointer; transition: transform .3s var(--ease); border: none; }
.wa-float:hover { transform: scale(1.08) rotate(4deg); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); animation: waPulse 2.4s var(--ease) infinite; }
@keyframes waPulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }

/* ============================================================
   THE JOURNEY (scroll-piloted swarm)
   ============================================================ */
.journey-page { background: var(--ink); }
.journey { position: relative; height: 640vh; height: 640dvh; background: var(--ink); }
.journey__stage { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; background:
   radial-gradient(120% 90% at 70% 18%, #14315a 0%, #0b1f3d 45%, #081428 100%); }
.swarm { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.journey__vignette { position: absolute; inset: 0; pointer-events: none; z-index: 1;
   background: radial-gradient(120% 120% at 50% 50%, transparent 40%, rgba(6,14,28,.55) 100%); }

/* chapter overlay */
.jch { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; padding: calc(var(--nav-h) + 28px) 0 84px; }
.jch .container { width: 100%; }
.jch__inner { max-width: 540px; will-change: transform, opacity; }
.jch__inner--center { max-width: 860px; margin: 0 auto; text-align: center; }
.jch__inner--center .jchips, .jch__inner--center .jactions { justify-content: center; }
.jch__inner--left { margin-right: auto; }
.jch__inner--right { margin-left: auto; margin-right: clamp(104px, 12vw, 160px); text-align: right; }
.jch__inner--right .jchips, .jch__inner--right .jactions { justify-content: flex-end; }

.jeyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.jnum { font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); display: inline-block; }
.jdisplay { font-family: var(--font-display); font-weight: 600; color: #fff; letter-spacing: -.025em; line-height: 1.02; font-size: clamp(2.6rem, 6.4vw, 5.4rem); margin-top: 18px; }
.jh2 { font-family: var(--font-display); font-weight: 600; color: #fff; letter-spacing: -.02em; line-height: 1.03; font-size: clamp(2.1rem, 5vw, 4rem); margin-top: 14px; }
.jh2 em { font-style: normal; color: var(--accent); }
.jlead { color: #b9cce8; font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.6; margin-top: 22px; max-width: 540px; }
.jch__inner--center .jlead { margin-left: auto; margin-right: auto; }
.jtext { color: #aabfdf; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.62; margin-top: 18px; }
.jch__inner--right .jtext, .jch__inner--right .jlead { margin-left: auto; }

.jchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.jchip { font-family: var(--font-mono); font-size: 11.5px; color: #cfe2f5; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(120,200,235,.3); background: rgba(120,200,235,.08); backdrop-filter: blur(4px); }
.jactions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.jactions--center { justify-content: center; }

.jcue { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-top: 46px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: #6f88ae; }
.jcue i { width: 1px; height: 42px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }
.jcue i::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 40%; background: var(--accent); animation: scrollcue 1.8s var(--ease) infinite; }

/* enter-the-site links */
.jenter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 34px; }
.jenter__link { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: #cfe2f5; background: transparent; border: 1px solid rgba(255,255,255,.18); padding: 10px 18px; border-radius: 999px; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.jenter__link:hover { border-color: var(--accent); background: rgba(120,200,235,.1); transform: translateY(-2px); }

/* chapter rail — helix strand */
.jrail { position: absolute; right: 96px; top: 50%; transform: translateY(-50%); z-index: 4; }
.jrail__strand { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.jrail__strand path { fill: none; stroke: rgba(120,170,210,.3); stroke-width: 1.2; stroke-linecap: round; }
.jrail__item { position: absolute; display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; padding: 0; color: #6f88ae; transition: color .25s; }
.jrail__item .jrail__lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-align: left; white-space: nowrap; opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .25s; }
.jrail__item:hover .jrail__lbl, .jrail__item.on .jrail__lbl { opacity: 1; transform: none; }
.jrail__dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; transform: scale(var(--d, 1)); transition: background .25s, transform .25s, border-color .25s, opacity .25s; flex: none; }
.jrail__item.on { color: var(--accent); }
.jrail__item.on .jrail__dot { background: var(--accent); border-color: var(--accent); transform: scale(1.4); opacity: 1 !important; box-shadow: 0 0 12px var(--accent); }

/* meta readout */
.jmeta { position: absolute; left: 30px; bottom: 26px; z-index: 4; display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; color: #7f99c0; }
.jmeta__bar { width: 120px; height: 2px; background: rgba(255,255,255,.14); border-radius: 2px; overflow: hidden; }
.jmeta__bar i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; background: linear-gradient(90deg, var(--accent), var(--bio)); }

@media (max-width: 860px) {
  .jrail { right: 12px; gap: 2px; }
  .jrail__lbl { display: none; }
  .jmeta { left: 18px; bottom: 18px; }
  .jmeta__bar { width: 80px; }
  .jch__inner--right { text-align: left; margin-right: auto; }
  .jch__inner--right .jchips, .jch__inner--right .jactions, .jch__inner--right .jtext, .jch__inner--right .jlead { justify-content: flex-start; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .jcue i::after { animation: none; }
}

/* page enter */
.page { animation: pageIn .5s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   IMMERSIVE FX
   ============================================================ */
/* scroll progress beam */
.scroll-beam { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300; background: transparent; pointer-events: none; }
.scroll-beam__fill { height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--bio)); box-shadow: 0 0 12px var(--accent); }

/* cursor glow */
.cursor-glow { position: fixed; top: 0; left: 0; width: 380px; height: 380px; margin: -190px 0 0 -190px; border-radius: 50%; pointer-events: none; z-index: 80; background: radial-gradient(circle, color-mix(in oklch, var(--accent) 40%, transparent), transparent 62%); mix-blend-mode: multiply; transition: opacity .4s; will-change: transform; }

/* tilt */
.tilt { position: relative; }
.tilt__glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; transition: opacity .3s; z-index: 3; mix-blend-mode: overlay; }

/* magnetic wrapper shouldn't clip the button radius */
.magnetic > * { width: 100%; }

/* ============================================================
   GENERATIVE VIZ FIGURES
   ============================================================ */
.viz {
  position: relative; overflow: hidden; border-radius: var(--r);
  background: radial-gradient(120% 100% at 50% 0%, #122a4d 0%, #0c1f3c 60%, #0a1830 100%);
  border: 1px solid rgba(255,255,255,.08); padding: 16px;
  display: flex; flex-direction: column;
}
.viz::before { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(86,196,222,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(86,196,222,.06) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5; pointer-events: none; }
.viz__plot { position: relative; flex: 1; min-height: 0; }
.viz__svg { width: 100%; height: 100%; display: block; overflow: visible; }
.viz__cap { font-family: var(--font-mono); font-size: 11px; color: #8fb4d8; letter-spacing: .04em; margin-top: 10px; position: relative; z-index: 2; }
.viz__scan { position: absolute; left: 0; right: 0; top: 0; height: 32%; background: linear-gradient(rgba(86,196,222,.16), transparent); opacity: 0; pointer-events: none; }
.viz.in .viz__scan { animation: scan 2.6s var(--ease) .1s 1; }
@keyframes scan { 0% { transform: translateY(-32%); opacity: .9; } 100% { transform: translateY(330%); opacity: 0; } }

/* axes & grid */
.viz__grid { stroke: rgba(255,255,255,.06); stroke-width: 1; }
.viz__axis { stroke: rgba(255,255,255,.28); stroke-width: 1.2; }

/* self-drawing lines */
.viz__draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s cubic-bezier(.4,0,.2,1); }
.viz.in .viz__draw { stroke-dashoffset: 0; }
.viz__line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(86,196,222,.6)); vector-effect: non-scaling-stroke; }
.viz__line--2 { stroke: var(--bio); filter: drop-shadow(0 0 5px rgba(120,232,205,.6)); }
.viz__area { fill: url(#none); fill: rgba(86,196,222,.12); opacity: 0; transition: opacity 1.6s ease 1s; }
.viz__area--2 { fill: rgba(120,232,205,.12); }
.viz.in .viz__area { opacity: 1; }

/* network */
.viz__edge { stroke: rgba(120,200,235,.34); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .7s ease; }
.viz.in .viz__edge { stroke-dashoffset: 0; }
.viz__node { fill: var(--accent); transform: scale(0); transition: transform .5s var(--ease); }
.viz.in .viz__node { transform: scale(1); }
.viz__node--hub { fill: var(--bio); filter: drop-shadow(0 0 6px rgba(120,232,205,.7)); }

/* bubbles */
.viz__bubble { opacity: .55; transform: scale(0); transition: transform .6s var(--ease), opacity .6s; }
.viz.in .viz__bubble { transform: scale(1); }

/* affinity bars */
.viz__bars { display: flex; flex-direction: column; gap: 9px; justify-content: center; height: 100%; padding: 4px 2px; }
.viz__bar-row { display: grid; grid-template-columns: 26px 1fr 42px; align-items: center; gap: 9px; }
.viz__bar-lbl { font-family: var(--font-mono); font-size: 10.5px; color: #8fb4d8; }
.viz__bar-track { height: 11px; background: rgba(255,255,255,.07); border-radius: 6px; overflow: hidden; }
.viz__bar-fill { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--bio), var(--accent)); transition: width 1.1s var(--ease); }
.viz__bar-val { font-family: var(--font-mono); font-size: 10.5px; color: var(--accent); text-align: right; }

/* docking pose */
.viz__box { fill: none; stroke: rgba(120,200,235,.4); stroke-width: 1; stroke-dasharray: 4 4; }
.viz__ring { fill: none; stroke: rgba(86,196,222,.5); stroke-width: 1.2; transform: scale(0); transform-origin: 160px 125px; transition: transform .7s var(--ease); }
.viz.in .viz__ring { transform: scale(1); }
.viz__surf { fill: rgba(143,180,216,.5); opacity: 0; transition: opacity .5s; }
.viz.in .viz__surf { opacity: 1; }
.viz__ligand { opacity: 0; }
.viz__ligand line { stroke: var(--bio); stroke-width: 2; }
.viz__ligand circle { fill: #eafff7; stroke: var(--bio); stroke-width: 1.5; }
.viz.in .viz__ligand { animation: ligand 2.4s var(--ease) .3s forwards; }
@keyframes ligand {
  0% { opacity: 0; transform: translate(40px, -60px) scale(.6); }
  30% { opacity: 1; }
  100% { opacity: 1; transform: translate(160px, 125px) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .viz__draw { stroke-dashoffset: 0 !important; }
  .viz__node, .viz__ring, .viz__bubble { transform: scale(1) !important; }
  .viz__edge { stroke-dashoffset: 0 !important; }
  .viz__area, .viz__surf { opacity: 1 !important; }
  .viz__ligand { opacity: 1 !important; animation: none !important; transform: translate(160px,125px); }
  .viz__bar-fill { transition: none !important; }
  .scroll-beam__fill { transition: none; }
  .cursor-glow { display: none; }
}

/* form inputs */
.inp {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--text);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-2);
  transition: border-color .2s, box-shadow .2s, background .2s; resize: vertical;
}
.inp:focus { outline: none; border-color: var(--accent-line); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.inp::placeholder { color: var(--muted-2); }
.seg { display: flex; gap: 6px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; flex-wrap: wrap; }
.seg__b { flex: 1; min-width: 90px; border: none; background: transparent; font-family: var(--font-body); font-size: 13.5px; font-weight: 500; color: var(--muted); padding: 9px 12px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.seg__b.on { background: var(--navy); color: #fff; }

/* misc */
.center { text-align: center; }
.mt-s { margin-top: 14px; } .mt-m { margin-top: 26px; } .mt-l { margin-top: 44px; }
.maxw-prose { max-width: 680px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-s { gap: 10px; } .gap-m { gap: 18px; } .wrap { flex-wrap: wrap; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta .btn--ghost { display: none; }
  .hamburger { display: inline-flex; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero__inner--split { grid-template-columns: 1fr; }
  .hero--split .hero__canvas { left: 0; opacity: .4; }
  .hero__viz { display: none; }
  .hero__scrollcue { display: none; }
}
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .wstep { grid-template-columns: 40px 1fr; gap: 12px; }
}
