/* ═══════════════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════════════ */
:root {
  --bg:      #050507;
  --bg-2:    #09090e;
  --text:    #fff7f8;
  --muted:   #9a8f96;
  --muted-2: #3d3545;
  --accent:  #ff6f86;
  --accent-2:#ff8a4c;
  --blue:    #7b8cff;
  --green:   #7be8a6;
  --panel:   rgba(255,255,255,0.05);
  --border:  rgba(255,255,255,0.09);
  --grad:    linear-gradient(135deg, var(--accent), var(--accent-2));
  --font:    'Inter', system-ui, sans-serif;
  --max:     1140px;
  --r:       16px;
}

/* ═══════════════════════════════════════════════════════════
   RESET
═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  padding: 0 2.5rem;
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
}
#navbar.scrolled {
  background: rgba(5,5,7,.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-color: var(--border);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-logo-full {
  height: 26px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 1.8rem;
  margin-left: auto;
}
.nav-links a {
  font-size: .8rem;
  color: var(--muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: .42rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--accent); color: #fff; }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 2rem;
  background: var(--grad);
  color: #fff;
  border-radius: 100px;
  font-size: .95rem;
  font-weight: 700;
  box-shadow: 0 0 36px rgba(255,111,134,.22);
  transition: opacity .2s, transform .2s, box-shadow .2s;
}
.btn-primary:hover {
  opacity: .88;
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(255,111,134,.38);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.8rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
  font-size: .95rem;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }
.btn-learn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  transition: border-color .25s, color .25s, background .25s;
  margin-top: .5rem;
}
.btn-learn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255,111,134,.06);
}

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 7rem 2.5rem 5rem;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
}
.g1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,111,134,.1) 0%, transparent 70%);
  top: -200px; right: 0;
}
.g2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(123,140,255,.07) 0%, transparent 70%);
  bottom: 0; left: 5%;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
.hero-eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
  opacity: 0;
}
.hero-title {
  font-size: clamp(3.8rem, 7.5vw, 7.5rem);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: .98;
  margin-bottom: 1.8rem;
}
.ht-line { display: block; opacity: 0; transform: translateY(50px); }
.ht-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.08rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  opacity: 0;
}
.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
}
.hero-brain-wrap {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(280px, 36vw, 500px);
  z-index: 1;
  opacity: 0;
}
.hero-brain-img {
  width: 100%;
  filter: saturate(1.3);
}
.hero-brain-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,111,134,.12);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
}
.r1 { width: 105%; height: 105%; }
.r2 { width: 130%; height: 130%; border-color: rgba(255,111,134,.07); }
.r3 { width: 160%; height: 160%; border-color: rgba(255,111,134,.04); }
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
}
.scroll-mouse {
  width: 24px; height: 38px;
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-wheel {
  width: 3px; height: 7px;
  background: var(--accent);
  border-radius: 2px;
  animation: swAnim 2s ease-in-out infinite;
}
@keyframes swAnim {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ═══════════════════════════════════════════════════════════
   SECTION LABEL
═══════════════════════════════════════════════════════════ */
.section-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

/* ═══════════════════════════════════════════════════════════
   TABLE OF CONTENTS
═══════════════════════════════════════════════════════════ */
#toc {
  padding: 7rem 2.5rem;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}
.toc-inner { max-width: var(--max); margin: 0 auto; }
.toc-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 3rem;
}
.toc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.toc-card {
  background: var(--bg-2);
  padding: 2rem 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: background .25s;
  cursor: pointer;
}
.toc-card:hover { background: rgba(255,111,134,.05); }
.toc-card:hover .toc-arrow { color: var(--accent); transform: translateY(4px); }
.toc-num {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.toc-card-body { flex: 1; }
.toc-card-body h3 { font-size: .95rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.3; }
.toc-card-body p { font-size: .82rem; color: var(--muted); line-height: 1.55; }
.toc-arrow {
  font-size: 1rem;
  color: var(--muted-2);
  transition: color .25s, transform .25s;
  align-self: flex-end;
}

/* ═══════════════════════════════════════════════════════════
   FEATURE SECTIONS
═══════════════════════════════════════════════════════════ */
.feature-section {
  padding: 9rem 2.5rem;
  border-top: 1px solid var(--border);
}
.fs-alt { background: var(--bg-2); }
.fs-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.fs-reverse { direction: rtl; }
.fs-reverse > * { direction: ltr; }

.fs-num {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--accent);
  border: 1px solid rgba(255,111,134,.25);
  background: rgba(255,111,134,.07);
  padding: .22rem .65rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.fs-title {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.0;
  margin-bottom: 1.2rem;
}
.fs-sub {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.6rem;
  max-width: 440px;
}
.fs-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: 2rem;
}
.fs-bullets li {
  font-size: .87rem;
  color: var(--muted);
  padding-left: 1.2rem;
  position: relative;
}
.fs-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: .75rem;
}

/* Visual container */
.fs-visual {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  aspect-ratio: 5/4;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── COREGISTRATION ANIMATION ── */
.coreg-stack {
  position: relative;
  width: min(85%, 380px);
  height: 88%;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.coreg-img {
  position: absolute;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}
#cl-t1  { opacity: 0.72; transform: translate(-14px, 0); }
#cl-ct  { opacity: 0;    transform: translate(220px, -70px) rotate(5deg); }
#cl-pet { opacity: 0;    transform: translate(-220px, 90px) rotate(-5deg); }
.coreg-controls {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 10;
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}
.coreg-toggle {
  cursor: pointer;
  min-height: 36px;
  padding: 0 1rem;
  border-radius: 100px;
  color: var(--text);
  font-size: .78rem;
  font-weight: 700;
  font-family: var(--font);
  background: rgba(255,255,255,.075);
  border: 1px solid rgba(255,111,134,.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .2s, opacity .2s, background .2s, border-color .2s;
}
.coreg-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(255,111,134,.7);
  background: rgba(255,111,134,.14);
}
.coreg-toggle.inactive {
  opacity: 0.42;
  text-decoration: line-through;
  background: rgba(255,255,255,.035);
}

.coreg-badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: .28rem .7rem;
  border-radius: 6px;
  background: rgba(5,5,7,.88);
  border: 1px solid rgba(255,111,134,.5);
  color: var(--accent);
  opacity: 0;
  z-index: 10;
}

/* ── RECONSTRUCTION REAL VISUAL ── */
.recon-real {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: .75rem;
  padding: 1.2rem;
  overflow: hidden;
}
.recon-tabs {
  display: flex;
  gap: .5rem;
}
.recon-tab {
  cursor: pointer;
  padding: .28rem 1rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 700;
  font-family: var(--font);
  color: var(--muted);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  transition: background .2s, color .2s, border-color .2s;
}
.recon-tab.active {
  color: var(--text);
  background: rgba(255,111,134,.12);
  border-color: rgba(255,111,134,.45);
}
.recon-tab:hover:not(.active) {
  color: var(--text);
  border-color: var(--muted-2);
}
.recon-panel {
  display: none;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  border: 1px solid var(--border);
}
.recon-panel.active { display: block; }
.recon-media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* ── OBLIQUE GIF VIEWER ── */
.obl-gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: none;
  border-radius: 20px;
}
.obl-gif.active { display: block; }
.obl-tabs {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.obl-tab {
  cursor: pointer;
  padding: .25rem .85rem;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--font);
  color: var(--muted);
  background: rgba(5,5,7,.65);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color .2s, border-color .2s, background .2s;
}
.obl-tab.active {
  color: var(--text);
  border-color: rgba(255,111,134,.5);
  background: rgba(255,111,134,.15);
}
.obl-tab:hover:not(.active) {
  color: var(--text);
  border-color: rgba(255,255,255,.25);
}

/* ── 3D VIEW — BRAIN VIEWER ── */
#vis-3d {
  background: #000;
  overflow: hidden;
}
.sag-tabs {
  position: absolute;
  top: 1rem; left: 1rem; right: 1rem;
  z-index: 10;
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}
.sag-tab {
  padding: .32rem .75rem;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(5,5,7,.65);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  font-family: var(--font);
  white-space: nowrap;
}
.sag-tab:hover { color: var(--text); }
.sag-tab.active {
  background: rgba(255,111,134,.18);
  color: var(--text);
  border-color: rgba(255,111,134,.5);
}
.sag-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  display: none;
  border-radius: 20px;
}
.sag-img.active { display: block; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 4rem 2.5rem 2rem;
}
.footer-top {
  max-width: var(--max);
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
}
.footer-logo { height: 22px; width: auto; margin-bottom: 1rem; }
.footer-tagline { font-size: .85rem; color: var(--muted); }
footer h4 {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.footer-nav a { font-size: .85rem; color: var(--muted); transition: color .2s; }
.footer-nav a:hover { color: var(--text); }
.footer-contact { display: flex; flex-direction: column; gap: .4rem; }
.footer-contact p, .footer-contact a { font-size: .85rem; color: var(--muted); }
.footer-contact a:hover { color: var(--text); }
.footer-institution { font-size: .78rem; color: var(--muted-2) !important; margin-top: .3rem; }
.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-copy { font-size: .75rem; color: var(--muted-2); }
.footer-disclaimer {
  font-size: .75rem;
  color: var(--muted-2);
  max-width: 480px;
  line-height: 1.5;
}
.footer-disclaimer strong { color: var(--accent); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: var(--delay, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .fs-inner { grid-template-columns: 1fr; gap: 3rem; }
  .fs-reverse { direction: ltr; }
  .toc-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; gap: 2.5rem; }
  .nav-links { display: none; }
  .hero-brain-wrap { display: none; }
  .hero-title { font-size: clamp(3rem, 14vw, 5rem); }
}
@media (max-width: 540px) {
  .toc-grid { grid-template-columns: 1fr; }
}
