/* ==========================================================================
   TEAM RED SPIRITS — EXPANDED 50-SCENE CYBER ARCHITECTURE
   Hero: 240-frame Ghost-Flame Prologue (Plays once, does not loop or repeat)
   Realms:
     Group A: Deep Obsidian Black, Blood-Orange (#D4452C), Warm Amber (#E8A33D)
     Group B: Near-Black, Phosphor-Green (#39FF88), Alert Red (#FF2A2A)
     Group C: Charcoal (#141315), Muted Rose-Red (#B5484D), Bone-White (#EDE7DD)
     Group D: Deep Indigo (#0A0D18), Electric Cyan (#2DD4FF), Warning Red
     Group E: Desaturated Crimson (#C73E3E), Deep Obsidian (#0B0A0C), Ash Silver
   ========================================================================== */

:root {
  --bg-dark: #0A0A0C;
  --text-primary: #F5F5F5;
  --text-muted: #8E8E98;
  
  /* Shared Typography System */
  --font-display: 'Orbitron', -apple-system, sans-serif;
  --font-heading: 'Rajdhani', -apple-system, sans-serif;
  --font-mono: 'Space Mono', monospace;

  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  
  /* Hero Palette */
  --hero-crimson: #E10600;
  --hero-crimson-glow: rgba(225, 6, 0, 0.45);
  
  /* Group A Palette */
  --ga-bg: #0D0B0A;
  --ga-orange: #D4452C;
  --ga-amber: #E8A33D;
  --ga-amber-glow: rgba(232, 163, 61, 0.35);
  
  /* Group B Palette */
  --gb-bg: #080C0A;
  --gb-green: #39FF88;
  --gb-green-glow: rgba(57, 255, 136, 0.35);
  --gb-alert: #FF2A2A;
  
  /* Group C Palette */
  --gc-bg: #141315;
  --gc-rose: #B5484D;
  --gc-bone: #EDE7DD;
  --gc-rose-glow: rgba(181, 72, 77, 0.35);
  
  /* Group D Palette */
  --gd-bg: #0A0D18;
  --gd-cyan: #2DD4FF;
  --gd-cyan-glow: rgba(45, 212, 255, 0.35);
  --gd-warning: #FF334B;
  
  /* Group E Palette */
  --ge-bg: #0B0A0C;
  --ge-crimson: #C73E3E;
  --ge-ash: #C0BFC3;
  --ge-glow: rgba(199, 62, 62, 0.35);
}

/* RESET */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-heading);
  scroll-behavior: smooth;
  overflow-x: clip;
  font-size: 16px;
}

body {
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body.loading-active {
  overflow: hidden;
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: #070709;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #E10600, #39FF88, #2DD4FF, #C73E3E);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #fff;
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: #070709;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-cinematic), visibility 0.8s;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(225, 6, 0, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 6, 0, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

.preloader-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 580px;
  width: 90%;
  padding: 3rem 2.75rem;
  background: rgba(14, 14, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 36px;
  backdrop-filter: blur(34px) saturate(200%);
  -webkit-backdrop-filter: blur(34px) saturate(200%);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.7), 0 40px 100px rgba(0, 0, 0, 0.95), 0 0 45px rgba(225, 6, 0, 0.28);
}

.preloader-crest {
  width: 76px;
  height: 76px;
  margin: 0 auto 1.5rem;
}

.crest-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 16px var(--hero-crimson));
}

.crest-hex {
  fill: none;
  stroke: var(--hero-crimson);
  stroke-width: 2.5;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: drawHex 2s var(--ease-cinematic) forwards infinite alternate;
}

.crest-flame {
  fill: var(--hero-crimson);
  transform-origin: center;
  animation: pulseFlame 1.8s ease-in-out infinite alternate;
}

.crest-core {
  fill: #fff;
  animation: flickerCore 0.2s infinite;
}

@keyframes drawHex { to { stroke-dashoffset: 0; } }
@keyframes pulseFlame {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 20px #FF4500); }
}
@keyframes flickerCore {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.cyber-badge-sm {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--hero-crimson);
  margin-bottom: 0.75rem;
  padding: 0.35rem 1rem;
  background: rgba(225, 6, 0, 0.12);
  border: 1px solid rgba(225, 6, 0, 0.35);
  border-radius: 999px;
}

.preloader-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fff;
  margin-bottom: 0.5rem;
}

.preloader-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.preloader-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.preloader-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #8B0000, #E10600, #FF4500);
  box-shadow: 0 0 14px var(--hero-crimson);
  border-radius: 999px;
  transition: width 0.15s ease-out;
}

.preloader-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

#preloader-pct {
  color: var(--hero-crimson);
  font-weight: bold;
}

.preloader-notes {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #555562;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   BUTTONS (CYBER THEME WITH GLASS MORPHISM)
   ========================================================================== */
.cyber-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.2rem;
  background: rgba(225, 6, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  text-decoration: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 12px 30px rgba(0, 0, 0, 0.6);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-btn:hover:not(:disabled) {
  background: #E10600;
  color: #fff !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 0 35px rgba(225, 6, 0, 0.65), 0 15px 35px rgba(0, 0, 0, 0.8);
  transform: translateY(-2px) scale(1.02);
}

.cyber-btn.disabled,
.cyber-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-corner {
  display: none !important;
}

.btn-scan {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.6s;
}

.cyber-btn:hover .btn-scan {
  left: 100%;
}

.cyber-btn-sm {
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3);
  transition: all 0.25s ease;
}

.cyber-btn-sm:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
  transform: translateY(-1px);
}

/* ==========================================================================
   CANVAS STAGES (3D WEBGL HELIX SPINE & HERO PROLOGUE)
   ========================================================================== */
.canvas-viewport {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  background-color: var(--bg-dark);
  overflow: hidden;
}

#webgl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#canvas-sequence {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 3;
  transform: translateZ(0);
  transition: opacity 0.8s var(--ease-cinematic), visibility 0.8s;
}

#canvas-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  transition: opacity 0.8s var(--ease-cinematic), visibility 0.8s;
}

/* Hero sequence plays ONCE and fades out completely */
body.scrolled-past-hero #canvas-sequence,
body.scrolled-past-hero #canvas-particles {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.cinematic-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 40%, rgba(5, 5, 8, 0.85) 85%, #050508 100%);
}

.scanlines-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.18) 0px,
    rgba(0, 0, 0, 0.18) 1px,
    transparent 1px,
    transparent 2px
  );
  opacity: 0.7;
}

.ambient-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40vh;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse at bottom center, rgba(225, 6, 0, 0.14) 0%, transparent 70%);
}

/* ==========================================================================
   CYBER HUD: TOP HEADER
   ========================================================================== */
.cyber-hud-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-crest-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hero-crimson);
  filter: drop-shadow(0 0 8px currentColor);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #fff;
}

.brand-geo {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(225, 6, 0, 0.16);
  border: 1px solid rgba(225, 6, 0, 0.45);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.rank-pulse {
  width: 6px;
  height: 6px;
  background-color: var(--hero-crimson);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--hero-crimson);
  animation: pulseRank 1.5s infinite;
}

@keyframes pulseRank {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.4; }
}

.rank-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
}

.hud-center-telemetry {
  display: flex;
  align-items: center;
}

.telemetry-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(18, 18, 24, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.4rem 1.25rem;
  border-radius: 999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
}

.realm-dot {
  width: 6px;
  height: 6px;
  background-color: var(--hero-crimson);
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
  transition: background-color 0.3s;
}

.telemetry-sep {
  color: #444452;
}

.hud-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.2rem;
  background: rgba(18, 18, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
}

.hud-btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.hud-btn.active {
  border-color: currentColor;
  background: rgba(225, 6, 0, 0.25);
}

.hud-btn.cta-glow {
  border-color: var(--hero-crimson);
  background: rgba(225, 6, 0, 0.2);
  color: #fff;
  font-weight: bold;
}

.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 14px;
  height: 12px;
}
.sound-bars .bar {
  width: 2px;
  background: var(--text-muted);
  height: 4px;
}
.hud-btn.active .sound-bars .bar {
  background: currentColor;
}
.hud-btn.active .sound-bars .bar-1 { animation: soundBarAnim 0.7s infinite alternate 0.1s; }
.hud-btn.active .sound-bars .bar-2 { animation: soundBarAnim 0.9s infinite alternate 0.3s; }
.hud-btn.active .sound-bars .bar-3 { animation: soundBarAnim 0.6s infinite alternate 0.2s; }
.hud-btn.active .sound-bars .bar-4 { animation: soundBarAnim 0.8s infinite alternate 0.4s; }

@keyframes soundBarAnim {
  0% { height: 3px; }
  100% { height: 12px; }
}

/* ==========================================================================
   REALM JUMP MENU DRAWER
   ========================================================================== */
.realm-menu-drawer {
  position: fixed;
  top: 72px;
  right: 2.5rem;
  z-index: 2000;
  width: 440px;
  max-width: 90vw;
  background: rgba(14, 14, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.3), 0 30px 80px rgba(0, 0, 0, 0.95);
  padding: 1.75rem;
  backdrop-filter: blur(34px) saturate(200%);
  -webkit-backdrop-filter: blur(34px) saturate(200%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.realm-menu-drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.menu-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.menu-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.realm-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.realm-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.realm-link:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(4px);
}

.realm-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--hero-crimson);
  min-width: 24px;
}

.realm-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.realm-info strong {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: #fff;
}

.realm-info span {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.realm-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border-radius: 2px;
}

/* ==========================================================================
   PART 1: HERO PROLOGUE (240 FRAMES PINNED STAGE)
   ========================================================================== */
.hero-prologue-container {
  position: relative;
  width: 100%;
}

.hero-scroll-track {
  height: 3800px; /* Provides calibrated scroll depth for 240 frames */
  width: 100%;
  position: relative;
}

.hero-overlay-scenes {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.scrolled-past-hero .hero-overlay-scenes {
  display: none !important;
}

.hero-text-card {
  position: absolute;
  max-width: 660px;
  width: 86%;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-align: left;
  left: 8vw;
  right: auto;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hero-text-card.text-right {
  left: auto;
  right: 8vw;
  text-align: right;
}

.hero-text-card.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ==========================================================================
   ROW 1 CHOREOGRAPHED LINE ANIMATIONS (4 DISTINCT TREATMENTS)
   Line 1: Sharp glitch-flicker reveal (signal locking on, static frames)
   Line 2: Slow typewriter/terminal reveal with faint red cursor blink
   Line 3: Smoke-dissolve reveal (drifting embers condensing into letterforms)
   Line 4: Sharp directional slide with motion blur and hard snap settle
   ========================================================================== */

/* Line 1: Sharp Glitch-Flicker Signal Lock */
.hero-line-1.anim-glitch-flicker {
  opacity: 0;
  visibility: hidden;
}

.hero-text-card.is-active .hero-line-1.anim-glitch-flicker {
  animation: glitchSignalLock 0.58s steps(2, jump-none) 0.06s forwards;
}

@keyframes glitchSignalLock {
  0% {
    opacity: 0;
    clip-path: inset(35% 0 45% 0);
    transform: translate(-5px, 2px) skew(-6deg);
    filter: drop-shadow(-3px 0 #E10600) drop-shadow(3px 0 #2DD4FF);
    visibility: visible;
  }
  20% {
    opacity: 0.85;
    clip-path: inset(12% 0 65% 0);
    transform: translate(4px, -2px) skew(4deg);
    filter: drop-shadow(4px 0 #E10600);
  }
  38% {
    opacity: 0.25;
    clip-path: inset(70% 0 10% 0);
    transform: translate(-3px, 1px) skew(-2deg);
    filter: none;
  }
  56% {
    opacity: 0.95;
    clip-path: inset(20% 0 35% 0);
    transform: translate(2px, -1px) skew(1deg);
    filter: drop-shadow(-2px 0 #E10600);
  }
  74% {
    opacity: 0.65;
    clip-path: inset(5% 0 80% 0);
    transform: translate(-1px, 1px) skew(0deg);
  }
  88% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translate(0, 0) skew(0deg);
    filter: drop-shadow(0 0 14px rgba(225, 6, 0, 0.7));
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translate(0, 0) skew(0deg);
    visibility: visible;
    filter: drop-shadow(0 0 20px rgba(225, 6, 0, 0.55));
  }
}

/* Line 2: Slow Typewriter / Terminal Character Reveal with Red Cursor */
.hero-line-2.anim-typewriter {
  display: inline-block;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  visibility: hidden;
}

.hero-text-card.is-active .hero-line-2.anim-typewriter {
  opacity: 1;
  visibility: visible;
  animation: typewriterClip 1.15s steps(36, end) 0.38s forwards;
}

@keyframes typewriterClip {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

.hero-line-2.anim-typewriter::after {
  content: " ▍";
  display: inline-block;
  color: #E10600;
  opacity: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.92em;
  text-shadow: 0 0 8px #E10600;
  vertical-align: middle;
}

.hero-text-card.is-active .hero-line-2.anim-typewriter::after {
  animation: cursorBlink 0.8s infinite 0.38s;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.9; }
}

/* Line 3: Smoke-Dissolve Reveal (Drifting Embers Condensing into Letterforms) */
.hero-line-3.anim-smoke-dissolve {
  opacity: 0;
  filter: blur(20px) brightness(2);
  transform: translateY(16px) scale(0.96);
  visibility: hidden;
}

.hero-text-card.is-active .hero-line-3.anim-smoke-dissolve {
  animation: smokeCondenseReveal 1.35s cubic-bezier(0.19, 1, 0.22, 1) 0.72s forwards;
}

@keyframes smokeCondenseReveal {
  0% {
    opacity: 0;
    filter: blur(22px) brightness(2.4);
    transform: translateY(18px) scale(0.95);
    text-shadow: 0 0 35px #FF4500, 0 0 55px #E10600;
    visibility: visible;
  }
  32% {
    opacity: 0.5;
    filter: blur(12px) brightness(1.7);
    transform: translateY(8px) scale(0.98);
    text-shadow: 0 0 24px #E8A33D, 0 0 38px #E10600;
  }
  68% {
    opacity: 0.88;
    filter: blur(4px) brightness(1.2);
    transform: translateY(2px) scale(1.0);
    text-shadow: 0 0 14px rgba(232, 163, 61, 0.6);
  }
  100% {
    opacity: 1;
    filter: blur(0px) brightness(1.0);
    transform: translateY(0) scale(1.0);
    text-shadow: 0 4px 22px rgba(0, 0, 0, 0.98);
    visibility: visible;
  }
}

/* Line 4: Sharp Directional Snap-Slide with Motion Blur and Hard Settle */
.hero-line-4.anim-snap-slide {
  display: inline-block;
  opacity: 0;
  visibility: hidden;
}

.hero-text-card:not(.text-right) .hero-line-4.anim-snap-slide {
  transform: translateX(-140px);
  filter: blur(14px);
}

.hero-text-card.text-right .hero-line-4.anim-snap-slide {
  transform: translateX(140px);
  filter: blur(14px);
}

.hero-text-card.is-active:not(.text-right) .hero-line-4.anim-snap-slide {
  animation: snapSlideLeft 0.38s cubic-bezier(0.08, 0.84, 0.16, 1.05) 1.02s forwards;
}

.hero-text-card.is-active.text-right .hero-line-4.anim-snap-slide {
  animation: snapSlideRight 0.38s cubic-bezier(0.08, 0.84, 0.16, 1.05) 1.02s forwards;
}

@keyframes snapSlideLeft {
  0% {
    opacity: 0;
    transform: translateX(-140px) skewX(-12deg);
    filter: blur(14px);
    visibility: visible;
  }
  68% {
    opacity: 1;
    transform: translateX(5px) skewX(2deg);
    filter: blur(2px);
  }
  86% {
    transform: translateX(-2px) skewX(-1deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0) skewX(0);
    filter: blur(0);
    visibility: visible;
  }
}

@keyframes snapSlideRight {
  0% {
    opacity: 0;
    transform: translateX(140px) skewX(12deg);
    filter: blur(14px);
    visibility: visible;
  }
  68% {
    opacity: 1;
    transform: translateX(-5px) skewX(-2deg);
    filter: blur(2px);
  }
  86% {
    transform: translateX(2px) skewX(1deg);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0) skewX(0);
    filter: blur(0);
    visibility: visible;
  }
}

.hero-accent-line {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  color: var(--hero-crimson);
  margin-top: 1.1rem;
  text-shadow: 0 0 12px rgba(225, 6, 0, 0.7);
}

.meta-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--hero-crimson);
  margin-bottom: 0.85rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.02;
  color: #fff;
  letter-spacing: 0.14em;
  margin-bottom: 0.85rem;
  text-shadow: 0 6px 35px rgba(0, 0, 0, 0.98), 0 0 60px rgba(225, 6, 0, 0.6);
}

.hero-strapline {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.95);
}

.hero-step-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
  text-shadow: 0 6px 35px rgba(0, 0, 0, 0.98), 0 0 40px rgba(0, 0, 0, 0.9);
}

.hero-quote {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 600;
  color: #EDE7DD;
  font-style: italic;
  margin-bottom: 0.6rem;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.98);
}

.hero-body-p {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 1.6vw, 1.38rem);
  color: #d2d2db;
  line-height: 1.65;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.98);
}

.hero-meta-row {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
}

.hero-scroll-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.hero-text-card.text-center .hero-scroll-cta {
  align-items: center;
}

.cta-pulse {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--hero-crimson);
  animation: pulsePrompt 2s infinite ease-in-out;
}

@keyframes pulsePrompt {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; text-shadow: 0 0 10px var(--hero-crimson); }
}

.scroll-chevron {
  width: 8px;
  height: 8px;
  border-bottom: 2px solid var(--hero-crimson);
  border-right: 2px solid var(--hero-crimson);
  transform: rotate(45deg);
  animation: chevronBob 1.6s infinite;
}

@keyframes chevronBob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.4; }
  50% { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

.badge-top1 {
  display: inline-block;
  background: var(--hero-crimson);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: bold;
  padding: 0.25rem 0.65rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   ROW ACT CONTAINERS & VERTICAL SCROLL FLOW
   ========================================================================== */
.row-act {
  position: relative;
  width: 100%;
}

/* ==========================================================================
   ROW 2 — DNA STRUCTURE ONLY (CINEMATIC, SCROLL-SEQUENCED)
   ========================================================================== */
.row-2-dna {
  position: relative;
  width: 100%;
  background: transparent;
}

.dna-scroll-track {
  height: 2800px;
  width: 100%;
  position: relative;
}

.dna-moments-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

body.in-row-2 .dna-moments-stage {
  opacity: 1;
  visibility: visible;
}

.dna-moment-card {
  position: absolute;
  max-width: 520px;
  width: 86%;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(24px);
  filter: blur(10px);
  transition: 
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.75s;
}

.dna-moment-card.moment-1 {
  left: 9vw;
  top: 26vh;
  text-align: left;
}

.dna-moment-card.moment-2 {
  right: 9vw;
  top: 38vh;
  text-align: right;
}

.dna-moment-card.moment-3 {
  left: 9vw;
  top: 50vh;
  text-align: left;
}

.dna-moment-card.moment-4 {
  right: 9vw;
  top: 62vh;
  text-align: right;
}

.dna-moment-card.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  filter: blur(0);
}

.dna-moment-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  color: var(--ga-orange);
  text-shadow: 0 0 14px rgba(212, 69, 44, 0.7);
  margin-bottom: 0.75rem;
}

.dna-moment-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.98), 0 0 25px rgba(212, 69, 44, 0.35);
}

.dna-moment-desc {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 1.55vw, 1.35rem);
  color: #cfcfd8;
  line-height: 1.6;
  margin-bottom: 0.85rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.95);
}

.dna-moment-sub {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

/* ==========================================================================
   ROW 3 — GLASS PALETTE PANELS (SEQUENTIAL JOIN-IN)
   ========================================================================== */
.row-3-glass {
  position: relative;
  width: 100%;
  background: transparent;
}

.glass-scroll-track {
  height: 3800px;
  width: 100%;
  position: relative;
}

.glass-cluster-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 12;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(1) translateZ(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

body.in-row-3 .glass-cluster-stage {
  opacity: 1;
  visibility: visible;
}

body.past-row-3 .glass-cluster-stage {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: scale(0.88) translateZ(-100px) !important;
  pointer-events: none !important;
}

.cluster-backdrop-glow {
  position: absolute;
  width: 75vw;
  height: 75vh;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.38;
  pointer-events: none;
  background: radial-gradient(circle, rgba(232, 163, 61, 0.22) 0%, rgba(57, 255, 136, 0.16) 35%, rgba(45, 212, 255, 0.18) 70%, transparent 100%);
  animation: clusterGlowPulse 9s infinite alternate ease-in-out;
}

@keyframes clusterGlowPulse {
  0% { transform: scale(0.95); opacity: 0.3; }
  100% { transform: scale(1.08); opacity: 0.45; }
}

.cluster-stage-header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 2.2rem;
  transition: opacity 0.5s ease;
}

.cluster-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: #fff;
  opacity: 0.75;
  margin-bottom: 0.5rem;
}

.cluster-headline {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.08em;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.9);
}

.cluster-cards-wrapper {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1280px;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  transform-style: preserve-3d;
}

/* Individual Glassmorphic Panel Base */
.cluster-glass-card {
  position: absolute;
  width: 420px;
  max-width: 88vw;
  padding: 2.2rem 2.4rem;
  border-radius: 36px;
  backdrop-filter: blur(34px) saturate(200%);
  -webkit-backdrop-filter: blur(34px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 35px 80px rgba(0, 0, 0, 0.95);
  transition: 
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.65s ease;
  opacity: 0;
  filter: blur(14px);
  pointer-events: none;
  transform: translate3d(0, 60px, -120px) scale(0.6);
  user-select: none;
  overflow: hidden;
  will-change: transform, box-shadow;
  transform-style: preserve-3d;
}

.cluster-glass-card .glass-specular-edge {
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  pointer-events: none;
  z-index: 3;
}

/* SCENE III CURSOR-REACTIVE REFRACTION SHEEN */
.cluster-glass-card .glass-refraction-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  background: radial-gradient(
    circle 280px at var(--sheen-x, 50%) var(--sheen-y, 50%),
    rgba(255, 255, 255, 0.28) 0%,
    rgba(255, 255, 255, 0.08) 35%,
    transparent 70%
  );
  mix-blend-mode: overlay;
  transition: opacity 0.4s ease;
}

.cluster-glass-card.is-cursor-active .glass-refraction-sheen {
  opacity: 1;
}

.panel-glass-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.8vw, 1.6rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.9);
  position: relative;
  z-index: 4;
}

.panel-glass-body {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  color: #c8c8d4;
  line-height: 1.55;
  margin-bottom: 1.4rem;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9);
  position: relative;
  z-index: 4;
}

.panel-glass-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--gc-bone);
  opacity: 0.85;
}

.panel-badge-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
  position: relative;
  z-index: 4;
}

.panel-badge-pill.amber-pill {
  background: rgba(232, 163, 61, 0.18);
  border: 1px solid rgba(232, 163, 61, 0.45);
  color: var(--ga-amber);
}

.panel-badge-pill.green-pill {
  background: rgba(57, 255, 136, 0.16);
  border: 1px solid rgba(57, 255, 136, 0.45);
  color: var(--gb-green);
}

.panel-badge-pill.rose-pill {
  background: rgba(181, 72, 77, 0.18);
  border: 1px solid rgba(181, 72, 77, 0.45);
  color: var(--gc-rose);
}

.panel-badge-pill.cyan-pill {
  background: rgba(45, 212, 255, 0.18);
  border: 1px solid rgba(45, 212, 255, 0.45);
  color: var(--gd-cyan);
}

.panel-glass-metric {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 4;
}

.metric-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.metric-desc {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.amber-metric .metric-num { color: var(--ga-amber); text-shadow: 0 0 16px rgba(232, 163, 61, 0.6); }
.green-metric .metric-num { color: var(--gb-green); text-shadow: 0 0 16px rgba(57, 255, 136, 0.6); }
.cyan-metric .metric-num { color: var(--gd-cyan); text-shadow: 0 0 16px rgba(45, 212, 255, 0.6); }

.team-glass-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 0.9rem;
  position: relative;
  z-index: 4;
}

.founder-glass-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 72, 77, 0.5) 0%, rgba(20, 19, 21, 0.9) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), 0 0 18px rgba(181, 72, 77, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
}

/* Panel 1: Mission (Amber-Orange) */
.cluster-glass-card.panel-mission {
  background: radial-gradient(130% 130% at 20% 20%, rgba(232, 163, 61, 0.2) 0%, rgba(212, 69, 44, 0.12) 55%, rgba(13, 11, 10, 0.88) 100%);
  border-color: rgba(232, 163, 61, 0.35);
}

.cluster-glass-card.panel-mission.is-joined {
  opacity: 1;
  filter: blur(0);
  pointer-events: auto;
  transform: translate3d(-260px, -110px, 15px) rotate(-2deg) perspective(850px) rotateX(var(--cursor-tilt-x, 0deg)) rotateY(var(--cursor-tilt-y, 0deg)) translateZ(var(--cursor-tz, 0px));
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 35px 80px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(232, 163, 61, 0.28);
}

.cluster-glass-card.panel-mission.is-joined.is-cursor-active {
  border-color: rgba(232, 163, 61, 0.65);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.65),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 40px 95px rgba(0, 0, 0, 0.98),
    0 0 75px rgba(232, 163, 61, 0.52);
  z-index: 10;
}

/* Panel 2: Services (Phosphor-Green) */
.cluster-glass-card.panel-services {
  background: radial-gradient(130% 130% at 20% 20%, rgba(57, 255, 136, 0.18) 0%, rgba(0, 255, 136, 0.08) 55%, rgba(8, 12, 10, 0.88) 100%);
  border-color: rgba(57, 255, 136, 0.35);
}

.cluster-glass-card.panel-services.is-joined {
  opacity: 1;
  filter: blur(0);
  pointer-events: auto;
  transform: translate3d(-270px, 130px, 30px) rotate(1.8deg) perspective(850px) rotateX(var(--cursor-tilt-x, 0deg)) rotateY(var(--cursor-tilt-y, 0deg)) translateZ(var(--cursor-tz, 0px));
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 35px 80px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(57, 255, 136, 0.28);
}

.cluster-glass-card.panel-services.is-joined.is-cursor-active {
  border-color: rgba(57, 255, 136, 0.65);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.65),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 40px 95px rgba(0, 0, 0, 0.98),
    0 0 75px rgba(57, 255, 136, 0.52);
  z-index: 10;
}

/* Panel 3: Team (Rose-White) */
.cluster-glass-card.panel-team {
  background: radial-gradient(130% 130% at 20% 20%, rgba(181, 72, 77, 0.2) 0%, rgba(237, 231, 221, 0.08) 55%, rgba(20, 19, 21, 0.88) 100%);
  border-color: rgba(181, 72, 77, 0.35);
}

.cluster-glass-card.panel-team.is-joined {
  opacity: 1;
  filter: blur(0);
  pointer-events: auto;
  transform: translate3d(260px, -105px, 10px) rotate(2deg) perspective(850px) rotateX(var(--cursor-tilt-x, 0deg)) rotateY(var(--cursor-tilt-y, 0deg)) translateZ(var(--cursor-tz, 0px));
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 35px 80px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(181, 72, 77, 0.28);
}

.cluster-glass-card.panel-team.is-joined.is-cursor-active {
  border-color: rgba(181, 72, 77, 0.65);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.65),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 40px 95px rgba(0, 0, 0, 0.98),
    0 0 75px rgba(181, 72, 77, 0.52);
  z-index: 10;
}

/* Panel 4: Projects (Electric-Cyan) */
.cluster-glass-card.panel-projects {
  background: radial-gradient(130% 130% at 20% 20%, rgba(45, 212, 255, 0.2) 0%, rgba(16, 21, 48, 0.12) 55%, rgba(10, 13, 24, 0.88) 100%);
  border-color: rgba(45, 212, 255, 0.35);
}

.cluster-glass-card.panel-projects.is-joined {
  opacity: 1;
  filter: blur(0);
  pointer-events: auto;
  transform: translate3d(270px, 135px, 25px) rotate(-1.8deg) perspective(850px) rotateX(var(--cursor-tilt-x, 0deg)) rotateY(var(--cursor-tilt-y, 0deg)) translateZ(var(--cursor-tz, 0px));
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 35px 80px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(45, 212, 255, 0.3);
}

.cluster-glass-card.panel-projects.is-joined.is-cursor-active {
  border-color: rgba(45, 212, 255, 0.65);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.65),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 40px 95px rgba(0, 0, 0, 0.98),
    0 0 75px rgba(45, 212, 255, 0.55);
  z-index: 10;
}

@media (max-width: 1024px) {
  .cluster-cards-wrapper {
    height: auto;
    flex-direction: column;
    gap: 1.5rem;
  }
  .cluster-glass-card {
    position: relative;
    width: 90%;
    transform: translateY(30px) scale(0.9);
  }
  .cluster-glass-card.panel-mission.is-joined,
  .cluster-glass-card.panel-services.is-joined,
  .cluster-glass-card.panel-team.is-joined,
  .cluster-glass-card.panel-projects.is-joined {
    transform: translateY(0) scale(1) !important;
  }
}

/* ==========================================================================
   ROW 4 — FLOATING GLASS PANELS (SUSPENDED 3D MULTI-PANE GALLERY)
   Translucent glass panels of varying sizes floating at different depths & angles
   in 3D space, like panes of glass or lenses suspended in dark atmospheric void
   catching colored bokeh light behind them.
   ========================================================================== */
.row-4-floating {
  position: relative;
  width: 100%;
  background: #060608;
  overflow: visible;
  z-index: 20;
}

.floating-gallery-track {
  position: relative;
  width: 100%;
  height: 3800px;
}

.floating-gallery-stage {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1600px;
  transform-style: preserve-3d;
  background: radial-gradient(circle at 50% 50%, #0d0c10 0%, #060608 100%);
}

/* Atmospheric colored bokeh orbs backdrop drifting behind glass */
.gallery-bokeh-backdrop {
  position: absolute;
  inset: -15vw;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.bokeh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform, opacity;
  opacity: 0.42;
}

.bokeh-orb.orb-amber {
  width: 540px;
  height: 540px;
  top: 10%;
  left: 8%;
  background: radial-gradient(circle, rgba(232, 163, 61, 0.85) 0%, rgba(212, 69, 44, 0.35) 50%, transparent 75%);
  animation: bokeh-drift-amber 20s ease-in-out infinite alternate;
}

.bokeh-orb.orb-green {
  width: 480px;
  height: 480px;
  bottom: 12%;
  left: 20%;
  background: radial-gradient(circle, rgba(57, 255, 136, 0.8) 0%, rgba(0, 180, 80, 0.25) 55%, transparent 75%);
  animation: bokeh-drift-green 24s ease-in-out infinite alternate;
}

.bokeh-orb.orb-rose {
  width: 580px;
  height: 580px;
  top: 16%;
  right: 10%;
  background: radial-gradient(circle, rgba(181, 72, 77, 0.8) 0%, rgba(139, 0, 0, 0.3) 50%, transparent 75%);
  animation: bokeh-drift-rose 22s ease-in-out infinite alternate;
}

.bokeh-orb.orb-cyan {
  width: 500px;
  height: 500px;
  bottom: 8%;
  right: 18%;
  background: radial-gradient(circle, rgba(45, 212, 255, 0.8) 0%, rgba(0, 120, 240, 0.25) 55%, transparent 75%);
  animation: bokeh-drift-cyan 26s ease-in-out infinite alternate;
}

.bokeh-orb.orb-core {
  width: 650px;
  height: 650px;
  top: 30%;
  left: 32%;
  background: radial-gradient(circle, rgba(225, 6, 0, 0.28) 0%, rgba(139, 0, 0, 0.08) 50%, transparent 70%);
  animation: bokeh-drift-core 16s ease-in-out infinite alternate;
}

@keyframes bokeh-drift-amber {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, -50px) scale(1.15); }
  100% { transform: translate(-50px, 60px) scale(0.92); }
}

@keyframes bokeh-drift-green {
  0% { transform: translate(0, 0) scale(0.95); }
  50% { transform: translate(-60px, -70px) scale(1.18); }
  100% { transform: translate(65px, 40px) scale(1.02); }
}

@keyframes bokeh-drift-rose {
  0% { transform: translate(0, 0) scale(1.05); }
  50% { transform: translate(-75px, 60px) scale(0.94); }
  100% { transform: translate(50px, -70px) scale(1.16); }
}

@keyframes bokeh-drift-cyan {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(65px, -65px) scale(1.12); }
  100% { transform: translate(-60px, -40px) scale(0.96); }
}

@keyframes bokeh-drift-core {
  0% { transform: translate(0, 0) scale(1); opacity: 0.22; }
  50% { transform: translate(30px, 30px) scale(1.2); opacity: 0.35; }
  100% { transform: translate(-30px, -20px) scale(0.95); opacity: 0.24; }
}

/* Atmospheric subtle filament veil */
.gallery-atmosphere-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(6, 6, 8, 0.7) 90%);
}

/* HUD telemetry bar for gallery stage */
.gallery-stage-hud {
  position: absolute;
  top: 2.2rem;
  left: 3.5rem;
  right: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  pointer-events: auto;
}

.gallery-hud-tag {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(14, 13, 16, 0.75);
  backdrop-filter: blur(14px);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hud-blink-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39FF88;
  box-shadow: 0 0 10px #39FF88;
  animation: blink 1.6s infinite ease-in-out;
}

.gallery-step-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(14, 13, 16, 0.75);
  backdrop-filter: blur(14px);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.gallery-step-indicator .step-num {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  transition: all 0.35s ease;
}

.gallery-step-indicator .step-num.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.gallery-step-indicator .step-divider {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
}

/* STACK OF FLOATING 3D GLASS LAYERS */
.floating-layers-container {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1360px;
  height: 75vh;
  transform-style: preserve-3d;
  perspective: 1600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3rem;
  transform-style: preserve-3d;
  pointer-events: none;
  transition: 
    opacity 0.92s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.92s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.92s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-layer.is-upcoming {
  opacity: 0;
  filter: blur(18px);
  transform: translate3d(0, 0, -220px) scale(0.85);
  pointer-events: none;
}

.floating-layer.is-active {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

/* CROSSING DIAGONAL MOTIONS:
   Upper-left drifts UP and further LEFT out of view.
   Lower-right drifts DOWN and further RIGHT out of view.
*/
.floating-cluster {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  transform-style: preserve-3d;
  transition: 
    transform 0.96s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.cluster-upper-left {
  align-items: flex-start;
  transform-origin: top left;
}

.cluster-lower-right {
  align-items: flex-end;
  transform-origin: bottom right;
}

/* Exited states */
.floating-cluster.exited-up-left,
.floating-layer.exited-diagonally .cluster-upper-left {
  transform: translate3d(-140%, -120%, 140px) rotate(-14deg) scale(0.9) !important;
  opacity: 0 !important;
  filter: blur(16px) !important;
  pointer-events: none !important;
}

.floating-cluster.exited-down-right,
.floating-layer.exited-diagonally .cluster-lower-right {
  transform: translate3d(140%, 120%, -100px) rotate(14deg) scale(0.9) !important;
  opacity: 0 !important;
  filter: blur(16px) !important;
  pointer-events: none !important;
}

/* Translucent Glass Panels Base */
.floating-glass-pane {
  position: relative;
  border-radius: 32px;
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transform-style: preserve-3d;
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 35px 80px rgba(0, 0, 0, 0.95);
  transition: 
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s ease,
    border-color 0.5s ease;
  user-select: none;
  overflow: hidden;
  transform: translateZ(var(--depth-z, 0px)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

.floating-glass-pane:hover {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 
    inset 0 2px 5px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 40px 90px rgba(0, 0, 0, 0.98);
}

.pane-specular-edge {
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  pointer-events: none;
  z-index: 3;
}

.pane-bokeh-refraction {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle 300px at 25% 25%, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  mix-blend-mode: overlay;
}

/* Sizing variations */
.floating-glass-pane.pane-lg {
  width: 480px;
  max-width: 44vw;
  padding: 2.2rem 2.4rem;
}

.floating-glass-pane.pane-md {
  width: 450px;
  max-width: 42vw;
  padding: 2rem 2.2rem;
}

.floating-glass-pane.pane-sm {
  width: 290px;
  max-width: 32vw;
  padding: 1.25rem 1.6rem;
  border-radius: 24px;
}

/* Spectacle / Lens variation */
.floating-glass-pane.pane-lens {
  width: 210px;
  height: 110px;
  border-radius: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

/* Palette Variations */
.pane-amber {
  background: radial-gradient(130% 130% at 20% 20%, rgba(232, 163, 61, 0.22) 0%, rgba(212, 69, 44, 0.12) 55%, rgba(13, 11, 10, 0.88) 100%);
  border-color: rgba(232, 163, 61, 0.35);
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 35px 80px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(232, 163, 61, 0.28);
}

.pane-amber-lens {
  background: radial-gradient(circle at center, rgba(232, 163, 61, 0.25) 0%, rgba(13, 11, 10, 0.9) 100%);
  border-color: rgba(232, 163, 61, 0.45);
  box-shadow: 0 0 35px rgba(232, 163, 61, 0.35);
}

.pane-green {
  background: radial-gradient(130% 130% at 20% 20%, rgba(57, 255, 136, 0.2) 0%, rgba(0, 200, 100, 0.08) 55%, rgba(8, 12, 10, 0.88) 100%);
  border-color: rgba(57, 255, 136, 0.35);
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 35px 80px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(57, 255, 136, 0.28);
}

.pane-green-lens {
  background: radial-gradient(circle at center, rgba(57, 255, 136, 0.25) 0%, rgba(8, 12, 10, 0.9) 100%);
  border-color: rgba(57, 255, 136, 0.45);
  box-shadow: 0 0 35px rgba(57, 255, 136, 0.35);
}

.pane-rose {
  background: radial-gradient(130% 130% at 20% 20%, rgba(181, 72, 77, 0.22) 0%, rgba(237, 231, 221, 0.08) 55%, rgba(20, 19, 21, 0.88) 100%);
  border-color: rgba(181, 72, 77, 0.35);
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 35px 80px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(181, 72, 77, 0.28);
}

.pane-bone-lens {
  background: radial-gradient(circle at center, rgba(237, 231, 221, 0.18) 0%, rgba(20, 19, 21, 0.9) 100%);
  border-color: rgba(237, 231, 221, 0.35);
  box-shadow: 0 0 35px rgba(181, 72, 77, 0.25);
}

.pane-cyan {
  background: radial-gradient(130% 130% at 20% 20%, rgba(45, 212, 255, 0.22) 0%, rgba(16, 21, 48, 0.12) 55%, rgba(10, 13, 24, 0.88) 100%);
  border-color: rgba(45, 212, 255, 0.35);
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 35px 80px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(45, 212, 255, 0.3);
}

.pane-cyan-lens {
  background: radial-gradient(circle at center, rgba(45, 212, 255, 0.25) 0%, rgba(10, 13, 24, 0.9) 100%);
  border-color: rgba(45, 212, 255, 0.45);
  box-shadow: 0 0 35px rgba(45, 212, 255, 0.35);
}

.pane-crimson {
  background: radial-gradient(130% 130% at 20% 20%, rgba(225, 6, 0, 0.22) 0%, rgba(139, 0, 0, 0.12) 55%, rgba(11, 10, 12, 0.88) 100%);
  border-color: rgba(225, 6, 0, 0.35);
  box-shadow: 
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 35px 80px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(225, 6, 0, 0.3);
}

.pane-bone, .pane-cyan-accent, .pane-amber-accent, .pane-crimson-accent {
  background: rgba(14, 13, 17, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Typography & Internal Elements */
.pane-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.badge-amber { background: rgba(232, 163, 61, 0.18); border: 1px solid rgba(232, 163, 61, 0.45); color: var(--ga-amber); }
.badge-green { background: rgba(57, 255, 136, 0.16); border: 1px solid rgba(57, 255, 136, 0.45); color: var(--gb-green); }
.badge-rose { background: rgba(181, 72, 77, 0.18); border: 1px solid rgba(181, 72, 77, 0.45); color: var(--gc-rose); }
.badge-cyan { background: rgba(45, 212, 255, 0.18); border: 1px solid rgba(45, 212, 255, 0.45); color: var(--gd-cyan); }
.badge-crimson { background: rgba(225, 6, 0, 0.18); border: 1px solid rgba(225, 6, 0, 0.45); color: #FF4D4D; }

.pane-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.8vw, 1.65rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
  line-height: 1.25;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.9);
}

.pane-body {
  font-family: var(--font-heading);
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  color: #c4c4d2;
  line-height: 1.55;
  margin-bottom: 1.2rem;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9);
}

.pane-metric {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.p-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
}

.p-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.metric-amber .p-num { color: var(--ga-amber); text-shadow: 0 0 16px rgba(232, 163, 61, 0.6); }
.metric-green .p-num { color: var(--gb-green); text-shadow: 0 0 16px rgba(57, 255, 136, 0.6); }
.metric-rose .p-num { color: var(--gc-rose); text-shadow: 0 0 16px rgba(181, 72, 77, 0.6); }
.metric-cyan .p-num { color: var(--gd-cyan); text-shadow: 0 0 16px rgba(45, 212, 255, 0.6); }

.lens-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.25rem;
}

.lens-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.08em;
}

.lens-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.bone-code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--gc-bone);
  display: block;
  margin-bottom: 0.4rem;
}

.bone-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: #ddd;
}

.pane-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gc-bone);
}

.author-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gc-rose);
  box-shadow: 0 0 8px var(--gc-rose);
}

.pane-stats {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: #FF6B6B;
}

/* Scroll Guidance Prompt */
.gallery-scroll-prompt {
  position: absolute;
  bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(14, 13, 16, 0.6);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 10;
}

.prompt-mouse-icon {
  width: 14px;
  height: 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  position: relative;
}

.mouse-wheel-dot {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 4px;
  background: #39FF88;
  border-radius: 2px;
  animation: mouse-scroll-dot 1.8s infinite ease-in-out;
}

@keyframes mouse-scroll-dot {
  0% { transform: translate(-50%, 0); opacity: 1; }
  80% { transform: translate(-50%, 8px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 0; }
}

/* MASTER CLOSING SCENE */
.master-closing-scene {
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 10rem;
  background: #08080A;
}

.final-footer-card {
  max-width: 720px;
  width: 100%;
  background: rgba(13, 12, 16, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 36px;
  backdrop-filter: blur(34px) saturate(200%);
  padding: 3.5rem 3rem;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.95), 0 0 50px rgba(225, 6, 0, 0.25);
  text-align: center;
}

.closing-crest-mini {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.final-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 0.6rem;
}

.final-sub {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #c4c4d4;
  margin-bottom: 1.8rem;
}

.final-stats-bar {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: #ff5555;
  margin-bottom: 2.2rem;
  padding: 0.6rem 1rem;
  background: rgba(225, 6, 0, 0.1);
  border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(225, 6, 0, 0.25);
}

.final-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.final-legal {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  line-height: 1.8;
}

@media (max-width: 1024px) {
  .floating-layers-container {
    height: 85vh;
  }
  .floating-glass-pane.pane-lg,
  .floating-glass-pane.pane-md {
    max-width: 46vw;
  }
  .gallery-stage-hud {
    left: 1.5rem;
    right: 1.5rem;
  }
}

@media (max-width: 768px) {
  .floating-layer {
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
  }
  .floating-cluster {
    align-items: center !important;
  }
  .floating-glass-pane.pane-lg,
  .floating-glass-pane.pane-md {
    width: 90vw;
    max-width: 90vw;
  }
  .floating-glass-pane.pane-sm,
  .floating-glass-pane.pane-lens {
    display: none;
  }
}


.cyber-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.4s var(--ease-cinematic);
}

.cyber-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
}

.modal-window {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 680px;
  background: rgba(14, 14, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 36px;
  backdrop-filter: blur(36px) saturate(210%);
  -webkit-backdrop-filter: blur(36px) saturate(210%);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.7), 0 40px 100px rgba(0, 0, 0, 0.95), 0 0 50px rgba(225, 6, 0, 0.25);
  padding: 2.75rem 2.5rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot.red { background: #FF5F56; }
.terminal-dot.yellow { background: #FFBD2E; }
.terminal-dot.green { background: #27C93F; }

.modal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  margin-left: 0.5rem;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close-btn:hover {
  color: #fff;
}

.terminal-intro {
  background: rgba(0, 0, 0, 0.45);
  padding: 1.25rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.term-line { margin-bottom: 0.25rem; color: var(--text-muted); }
.term-line.success { color: #39FF88; }
.term-line.warning { color: #E8A33D; }
.prompt-sym { color: var(--hero-crimson); }

.dispatch-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.85rem 1.2rem;
  outline: none;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--hero-crimson);
  box-shadow: 0 0 15px var(--hero-crimson-glow);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.dispatch-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #39FF88;
}

/* ==========================================================================
   GLITCH ANIMATION KEYFRAMES
   ========================================================================== */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip: rect(0, 0, 0, 0);
}

.glitch-text::before {
  left: 2px;
  text-shadow: -2px 0 #E10600;
  animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch-text::after {
  left: -2px;
  text-shadow: -2px 0 #8B0000, 2px 2px #FF4500;
  animation: glitch-anim-2 3.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip: rect(20px, 9999px, 45px, 0); transform: skew(0.3deg); }
  20% { clip: rect(65px, 9999px, 80px, 0); transform: skew(-0.5deg); }
  40% { clip: rect(10px, 9999px, 35px, 0); transform: skew(0.2deg); }
  60% { clip: rect(50px, 9999px, 60px, 0); transform: skew(-0.2deg); }
  80% { clip: rect(85px, 9999px, 95px, 0); transform: skew(0.5deg); }
  100% { clip: rect(12px, 9999px, 40px, 0); transform: skew(-0.1deg); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(40px, 9999px, 65px, 0); transform: skew(-0.4deg); }
  25% { clip: rect(15px, 9999px, 30px, 0); transform: skew(0.4deg); }
  50% { clip: rect(75px, 9999px, 90px, 0); transform: skew(-0.2deg); }
  75% { clip: rect(25px, 9999px, 50px, 0); transform: skew(0.3deg); }
  100% { clip: rect(60px, 9999px, 75px, 0); transform: skew(-0.5deg); }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
  .cyber-hud-top {
    padding: 1rem 1.5rem;
  }
  .hud-center-telemetry {
    display: none;
  }
  .scene-card {
    padding: 2.25rem;
  }
  .timeline-hud-wrap .hud-stat-box.status-box {
    display: none;
  }
}

@media (max-width: 768px) {
  .scene-item {
    min-height: auto;
    padding: 2rem 0;
  }
  .scene-item.right-scene {
    justify-content: flex-start;
  }
  .scene-card {
    padding: 1.75rem 1.25rem;
  }
  .scene-title {
    font-size: 1.75rem;
  }
  .channels-grid,
  .workflow-grid,
  .ember-data-box,
  .founder-credentials-grid,
  .form-row {
    grid-template-columns: 1fr;
  }
  .hud-brand .brand-geo {
    display: none;
  }
  .hero-text-card {
    left: 5vw !important;
    right: 5vw !important;
    width: 90% !important;
    padding: 1.75rem !important;
    text-align: left !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
