/* ═══════════════════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════════════════ */
:root {
  --bg:       #050507;
  --bg-2:     #080810;
  --text:     #f0eaf4;
  --muted:    #8a8098;
  --muted-2:  #2e2a3a;
  --accent:   #ff6f86;
  --accent-2: #ff8a4c;
  --blue:     #7b8cff;
  --cyan:     #22d3ee;
  --green:    #4ade80;
  --panel:    rgba(255,255,255,0.04);
  --border:   rgba(255,255,255,0.08);
  --grad:     linear-gradient(135deg, var(--accent), var(--accent-2));
  --grad-b:   linear-gradient(135deg, var(--blue), var(--cyan));
  --font:     'Inter', system-ui, sans-serif;
  --max:      1160px;
  --r:        20px;
}

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════ */
*, *::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; }

/* ═══════════════════════════════════════════════════════════
   SCROLL PROGRESS
═══════════════════════════════════════════════════════════ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  background: var(--grad);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 9999;
  box-shadow: 0 0 10px rgba(255,111,134,.5);
}

/* ═══════════════════════════════════════════════════════════
   CUSTOM CURSOR (desktop only)
═══════════════════════════════════════════════════════════ */
#cursor {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 14px rgba(255,111,134,.8), 0 0 28px rgba(255,111,134,.4);
  mix-blend-mode: screen;
}
#cursor-ring {
  width: 30px; height: 30px;
  border: 1px solid rgba(255,111,134,.32);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
}
@media (hover: none) { #cursor, #cursor-ring { display: none !important; } }

/* ═══════════════════════════════════════════════════════════
   FLOATING LOGO / MENU TRIGGER
═══════════════════════════════════════════════════════════ */
#floating-logo {
  position: fixed;
  top: 1.4rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem 1rem .5rem .7rem;
  background: rgba(8,8,16,.82);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 100px;
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  cursor: pointer;
  font-family: var(--font);
  opacity: 0;
  transform: translateY(-14px);
  pointer-events: none;
  transition: opacity .4s, transform .4s, border-color .25s, box-shadow .25s, background .25s;
}
#floating-logo.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#floating-logo:hover {
  border-color: rgba(255,111,134,.4);
  box-shadow: 0 0 24px rgba(255,111,134,.12);
  background: rgba(12,12,22,.92);
}
#floating-logo.menu-open {
  opacity: 0 !important;
  pointer-events: none;
}
.fl-icon { width: 22px; height: 22px; flex-shrink: 0; }
.fl-wordmark {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}
.fl-burger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-left: .2rem;
}
.fl-burger span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--muted);
  border-radius: 2px;
  transition: background .2s;
}
#floating-logo:hover .fl-burger span { background: var(--text); }

/* ═══════════════════════════════════════════════════════════
   MENU OVERLAY
═══════════════════════════════════════════════════════════ */
#menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}
#menu-overlay.open { pointer-events: auto; }

.mo-bg {
  position: absolute;
  inset: 0;
  background: rgba(4,4,10,.97);
  transform: scaleY(0);
  transform-origin: top center;
}
.mo-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0;
  pointer-events: none;
}

#menu-close {
  position: absolute;
  top: 1.6rem;
  right: 2rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  opacity: 0;
  transition: background .2s, color .2s, border-color .2s;
}
#menu-close:hover {
  background: rgba(255,111,134,.1);
  border-color: rgba(255,111,134,.35);
  color: var(--accent);
}

.mo-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  z-index: 2;
}
.mo-link {
  font-size: clamp(2.2rem, 5.5vw, 4.8rem);
  font-weight: 900;
  letter-spacing: -.045em;
  color: rgba(255,255,255,.18);
  line-height: 1.15;
  opacity: 0;
  transform: translateY(40px);
  transition: color .25s;
  position: relative;
  display: inline-block;
}
.mo-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.25,.46,.45,.94);
}
.mo-link:hover { color: var(--text); }
.mo-link:hover::after { transform: scaleX(1); }

.mo-link-cta {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mo-link-cta::after { background: var(--grad); }

.mo-footer {
  position: absolute;
  bottom: 2.5rem;
  left: 50%; transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  opacity: 0;
  z-index: 2;
}
.mo-logo { height: 20px; width: auto; }
.mo-footer p {
  font-size: .72rem;
  color: rgba(255,255,255,.2);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .9rem 2.2rem;
  background: var(--grad);
  color: #fff;
  border-radius: 100px;
  font-size: .95rem;
  font-weight: 700;
  box-shadow: 0 0 40px rgba(255,111,134,.22), 0 4px 16px rgba(255,138,76,.15);
  transition: transform .25s, box-shadow .25s, filter .25s;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .25s;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 60px rgba(255,111,134,.4), 0 12px 28px rgba(255,138,76,.22); filter: brightness(1.06); }
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 2rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
  font-size: .95rem;
  transition: border-color .25s, color .25s, background .25s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.25); color: var(--text); background: rgba(255,255,255,.04); }

.btn-learn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 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, box-shadow .25s;
  margin-top: .5rem;
}
.btn-learn:hover { border-color: rgba(255,111,134,.5); color: var(--accent); background: rgba(255,111,134,.07); box-shadow: 0 0 18px rgba(255,111,134,.1); }

/* ═══════════════════════════════════════════════════════════
   HERO - centered layout
═══════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem 5rem;
  overflow: hidden;
  text-align: center;
}

/* Aurora */
.hero-aurora {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(ellipse 65% 55% at 15% 35%, rgba(255,111,134,.14) 0%, transparent 55%),
    radial-gradient(ellipse 50% 65% at 85% 60%, rgba(123,140,255,.10) 0%, transparent 55%),
    radial-gradient(ellipse 75% 50% at 55% 95%, rgba(255,138,76,.08) 0%, transparent 55%);
  filter: blur(60px);
  animation: auroraDrift 16s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes auroraDrift {
  0%   { transform: scale(1)    translate(0,  0); }
  33%  { transform: scale(1.05) translate(-2%, 1.5%); }
  66%  { transform: scale(0.97) translate(2%, -1%); }
  100% { transform: scale(1.03) translate(-1%, 2%); }
}

/* Dot grid */
.hero-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 20%, transparent 100%);
}

/* Brain - centered atmospheric element */
.hero-brain-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(320px, 52vw, 680px);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}
.hero-brain-img {
  width: 100%;
  opacity: .28;
  filter: saturate(1.6) brightness(1.2);
}
.hero-brain-ring {
  position: absolute;
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.r1 { width: 106%; height: 106%; border: 1px solid rgba(255,111,134,.15); }
.r2 { width: 132%; height: 132%; border: 1px solid rgba(255,111,134,.07); }
.r3 { width: 164%; height: 164%; border: 1px solid rgba(255,111,134,.035); }
.r4 { width: 198%; height: 198%; border: 1px solid rgba(123,140,255,.025); }
.hero-scan-line {
  position: absolute;
  left: 5%; right: 5%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,111,134,.65), transparent);
  top: 15%;
  animation: scanDown 4.5s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255,111,134,.4);
}
@keyframes scanDown {
  0%   { top: 12%; opacity: 0; }
  8%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { top: 85%; opacity: 0; }
}

/* Hero content - centered */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 740px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Large logo in hero */
.hero-logo-large {
  height: 44px;
  width: auto;
  margin-bottom: 2.4rem;
  opacity: 0;
  filter: drop-shadow(0 0 28px rgba(255,111,134,.25));
}

/* Tag */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 100px;
  padding: .36rem 1rem;
  margin-bottom: 1.8rem;
  opacity: 0;
  backdrop-filter: blur(12px);
}
.hero-tag-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--green), 0 0 18px rgba(74,222,128,.45);
  animation: dotPulse 2.4s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.4); box-shadow: 0 0 14px var(--green), 0 0 28px rgba(74,222,128,.5); }
}

/* Title */
.hero-title {
  font-size: clamp(3.2rem, 8.5vw, 8rem);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .95;
  margin-bottom: 1.8rem;
}
.ht-line { display: block; opacity: 0; transform: translateY(55px); }
.ht-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtitle */
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2.4rem;
  opacity: 0;
  max-width: 520px;
}
.hero-br { display: inline; }

/* CTAs */
.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
}

/* Metric pills */
.hero-metrics {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
  opacity: 0;
}
.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .38rem .95rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 100px;
  font-size: .73rem;
  color: var(--muted);
  backdrop-filter: blur(14px);
  transition: border-color .25s, color .25s;
}
.metric-pill:hover { border-color: rgba(255,111,134,.3); color: var(--text); }
.metric-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(255,111,134,.7);
}

/* Byline */
.hero-byline {
  margin-top: 1.4rem;
  font-size: .72rem;
  color: rgba(255,255,255,.22);
  letter-spacing: .04em;
  opacity: 0;
}
.hero-byline strong {
  color: rgba(255,255,255,.45);
  font-weight: 600;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2; opacity: 0;
}
.scroll-mouse {
  width: 22px; height: 36px;
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 11px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-wheel {
  width: 3px; height: 6px;
  background: var(--accent);
  border-radius: 2px;
  animation: swAnim 2s ease-in-out infinite;
  box-shadow: 0 0 7px var(--accent);
}
@keyframes swAnim {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ═══════════════════════════════════════════════════════════
   STATS STRIP
═══════════════════════════════════════════════════════════ */
.stats-strip {
  padding: 4rem 2rem;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.stats-strip::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(255,111,134,.04) 0%, transparent 70%);
  pointer-events: none;
}
.stats-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}
.stat-item {
  padding: 0 2rem;
  text-align: center;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .4rem;
  align-items: center;
}
.stat-item:last-child { border-right: none; }
.stat-val {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  font-weight: 900;
  letter-spacing: -.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.05;
  display: block;
}
.stat-text { background: var(--grad-b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-unit { font-size: .48em; font-weight: 700; letter-spacing: 0; }
.stat-sub { font-size: .77rem; color: var(--muted); line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════
   SECTION LABEL
═══════════════════════════════════════════════════════════ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .8rem;
}
.section-label::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   TABLE OF CONTENTS
═══════════════════════════════════════════════════════════ */
#toc {
  padding: 8rem 2rem;
  background: var(--bg);
  position: relative;
}
#toc::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
  opacity: .5;
}
.toc-inner { max-width: var(--max); margin: 0 auto; position: relative; }
.toc-title {
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.15;
  margin-bottom: 3rem;
  max-width: 500px;
}
.toc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  perspective: 1400px;
}
.toc-card {
  background: var(--bg-2);
  padding: 2.2rem 1.6rem 2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: background .3s;
  position: relative;
  overflow: hidden;
}
.toc-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,111,134,.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.toc-card:hover { background: rgba(255,111,134,.04); }
.toc-card:hover::before { opacity: 1; }
.toc-card:hover .toc-arrow { color: var(--accent); transform: translateY(5px); }
.toc-num { font-size: .63rem; font-weight: 700; letter-spacing: .14em; color: var(--accent); margin-bottom: .2rem; display: inline-block; }
.toc-card-body { flex: 1; }
.toc-card-body h3 { font-size: .93rem; font-weight: 700; margin-bottom: .45rem; line-height: 1.3; }
.toc-card-body p  { font-size: .79rem; color: var(--muted); line-height: 1.6; }
.toc-arrow { font-size: 1rem; color: var(--muted-2); transition: color .25s, transform .35s cubic-bezier(.34,1.56,.64,1); align-self: flex-end; }

/* ═══════════════════════════════════════════════════════════
   FEATURE SECTIONS
═══════════════════════════════════════════════════════════ */
.feature-section {
  padding: 9rem 2rem;
  border-top: 1px solid var(--border);
  position: relative;
}
.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: .63rem; font-weight: 700; letter-spacing: .15em;
  color: var(--accent);
  border: 1px solid rgba(255,111,134,.22);
  background: rgba(255,111,134,.07);
  padding: .2rem .65rem; border-radius: 5px;
  margin-bottom: 1rem;
}
.fs-title {
  font-size: clamp(2.2rem, 3.8vw, 3.8rem);
  font-weight: 900; letter-spacing: -.045em; line-height: .98;
  margin-bottom: 1.3rem;
}
.fs-sub {
  font-size: .98rem; color: var(--muted); line-height: 1.8;
  margin-bottom: 1.7rem; max-width: 430px;
}
.fs-bullets {
  list-style: none; display: flex; flex-direction: column;
  gap: .55rem; margin-bottom: 2rem;
}
.fs-bullets li {
  font-size: .85rem; color: var(--muted);
  padding-left: 1.4rem; position: relative; line-height: 1.5;
}
.fs-bullets li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--accent); font-size: .68rem; top: .18em;
}

/* Visual container - animated gradient border */
.fs-visual-wrap {
  position: relative;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255,111,134,.32) 0%,
    rgba(123,140,255,.15) 33%,
    rgba(255,138,76,.22) 66%,
    rgba(255,111,134,.28) 100%
  );
  background-size: 300% 300%;
  animation: borderFlow 9s linear infinite;
  box-shadow: 0 0 50px rgba(255,111,134,.06), 0 28px 65px rgba(0,0,0,.45);
  transition: box-shadow .4s;
}
.fs-visual-wrap:hover {
  box-shadow: 0 0 70px rgba(255,111,134,.1), 0 32px 75px rgba(0,0,0,.55);
}
@keyframes borderFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.fs-visual {
  background: rgba(6,6,14,.96);
  border-radius: 22px;
  aspect-ratio: 5/4;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── COREGISTRATION ── */
.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.1rem; left: 1.1rem; z-index: 10;
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.coreg-toggle {
  cursor: pointer; min-height: 34px; padding: 0 1rem; border-radius: 100px;
  color: var(--text); font-size: .74rem; font-weight: 700; font-family: var(--font);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,111,134,.3);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform .2s, opacity .2s, background .2s, border-color .2s, box-shadow .2s;
}
.coreg-toggle:hover { transform: translateY(-2px); border-color: rgba(255,111,134,.7); background: rgba(255,111,134,.14); box-shadow: 0 0 14px rgba(255,111,134,.2); }
.coreg-toggle.inactive { opacity: .38; text-decoration: line-through; background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.1); }
.coreg-badge {
  position: absolute; bottom: 1rem; right: 1rem;
  font-size: .62rem; font-weight: 700; letter-spacing: .1em;
  padding: .28rem .7rem; border-radius: 6px;
  background: rgba(5,5,7,.9); border: 1px solid rgba(255,111,134,.5);
  color: var(--accent); opacity: 0; z-index: 10;
  box-shadow: 0 0 14px rgba(255,111,134,.2);
}

/* ── RECONSTRUCTION ── */
.recon-real { width: 100%; height: 100%; display: grid; grid-template-rows: auto 1fr; gap: .7rem; padding: 1.1rem; overflow: hidden; }
.recon-tabs { display: flex; gap: .45rem; }
.recon-tab {
  cursor: pointer; padding: .28rem 1rem; border-radius: 100px;
  font-size: .72rem; 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, box-shadow .2s;
}
.recon-tab.active { color: var(--text); background: rgba(255,111,134,.12); border-color: rgba(255,111,134,.4); box-shadow: 0 0 12px rgba(255,111,134,.14); }
.recon-tab:hover:not(.active) { color: var(--text); border-color: rgba(255,255,255,.2); }
.recon-panel { display: none; position: relative; overflow: hidden; border-radius: 11px; background: #000; }
.recon-panel.active { display: block; }
.recon-media { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }

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

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

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 5rem 2rem 2.5rem;
  background: var(--bg);
  position: relative;
}
footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,111,134,.28), rgba(123,140,255,.18), transparent);
}
.footer-top {
  max-width: var(--max); margin: 0 auto 3rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3.5rem;
}
.footer-logo { height: 22px; width: auto; margin-bottom: .85rem; }
.footer-tagline { font-size: .88rem; font-weight: 600; margin-bottom: .25rem; }
.footer-org, .footer-inst { font-size: .78rem; color: var(--muted); }
footer h4 { font-size: .63rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem; }
.footer-nav { display: flex; flex-direction: column; gap: .55rem; }
.footer-nav a { font-size: .83rem; 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: .83rem; color: var(--muted); }
.footer-author { color: var(--text) !important; font-weight: 600; }
.footer-role { font-size: .75rem !important; color: rgba(255,255,255,.3) !important; }
.footer-contact a:hover { color: var(--text); }
.footer-bottom {
  max-width: var(--max); margin: 0 auto; padding-top: 1.8rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 2rem; flex-wrap: wrap;
}
/* Institutional logos */
.footer-institutions {
  max-width: var(--max);
  margin: 0 auto 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-inst-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
  flex-shrink: 0;
}
.footer-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.inst-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .4rem .2rem;
  transition: opacity .25s, transform .25s;
  opacity: .55;
}
.inst-logo-card:hover {
  opacity: 1;
  transform: translateY(-2px);
}
.inst-logo-card img {
  height: 40px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer-copy { font-size: .72rem; color: var(--muted-2); }
.footer-disclaimer { font-size: .85rem; color: var(--text); max-width: 540px; line-height: 1.5; }
.footer-disclaimer strong { color: var(--accent); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════
   SCROLL REVEAL
═══════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .75s cubic-bezier(.25,.46,.45,.94), transform .75s cubic-bezier(.25,.46,.45,.94);
  transition-delay: var(--delay, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE - TABLET (≤ 900px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* Nav */
  .nav-links { display: none; }

  /* Hero - keep centered, brain becomes background-only */
  #hero { padding: 6rem 1.5rem 5rem; min-height: 100svh; }
  .hero-brain-wrap {
    width: clamp(220px, 70vw, 400px);
  }
  .hero-brain-img { opacity: .15; }
  .hero-logo-large { height: 36px; margin-bottom: 2rem; }
  .hero-title { font-size: clamp(2.8rem, 12vw, 5rem); }
  .hero-sub { font-size: .95rem; }
  .hero-br { display: none; }

  /* Stats: 2×2 grid */
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-item {
    padding: 1.8rem 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none; }

  /* Feature sections */
  .fs-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .fs-reverse { direction: ltr; }
  .fs-title { font-size: clamp(2rem, 8vw, 3rem); }
  .fs-visual { aspect-ratio: 4/3; }

  /* TOC */
  .toc-grid { grid-template-columns: repeat(2, 1fr); }
  .toc-title { max-width: 100%; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE - MOBILE (≤ 540px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 540px) {
  /* Nav */
  .nav-wordmark { display: none; }
  #navbar { padding: 0 1rem; }

  /* Hero */
  #hero { padding: 5.5rem 1.2rem 4.5rem; text-align: center; }
  .hero-logo-large { height: 30px; margin-bottom: 1.6rem; }
  .hero-title { font-size: clamp(2.4rem, 14vw, 3.8rem); }
  .hero-sub { font-size: .9rem; max-width: 100%; }
  .hero-ctas { gap: .75rem; }
  .btn-primary, .btn-ghost { padding: .8rem 1.6rem; font-size: .88rem; }
  .hero-metrics { gap: .45rem; margin-top: 1.5rem; }
  .metric-pill { font-size: .68rem; padding: .32rem .8rem; }

  /* Stats: single column */
  .stats-inner { grid-template-columns: 1fr; }
  .stat-item { border-right: none !important; border-bottom: 1px solid var(--border); padding: 1.5rem 1rem; }
  .stat-item:last-child { border-bottom: none; }

  /* TOC */
  .toc-grid { grid-template-columns: 1fr; }
  #toc { padding: 5rem 1.2rem; }
  .toc-title { font-size: clamp(1.6rem, 8vw, 2.2rem); }

  /* Feature sections */
  .feature-section { padding: 5rem 1.2rem; }
  .fs-title { font-size: clamp(2rem, 10vw, 2.8rem); }
  .fs-visual { aspect-ratio: 1/1; }

  /* Footer */
  footer { padding: 3.5rem 1.2rem 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; }

  /* Disable tilt on touch */
  .toc-card, .fs-visual-wrap { transform: none !important; }

  /* Coreg controls */
  .coreg-toggle { font-size: .68rem; min-height: 30px; padding: 0 .75rem; }
  .obl-tab, .sag-tab { font-size: .65rem; padding: .22rem .7rem; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE - LARGE (≥ 1300px)
═══════════════════════════════════════════════════════════ */
@media (min-width: 1300px) {
  .hero-content { max-width: 860px; }
  .fs-inner { gap: 8rem; }
}
