/* ==========================================================================
   CyberCosmos Solutions (CCS) - Hyper-Premium Cinematic Styling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Light theme - palette taken from the CCS logo (navy / royal blue / sky blue) */
  --bg-dark: #f4f8ff;
  --bg-deep: #eaf2ff;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-hover: rgba(255, 255, 255, 0.97);
  --border-glow: rgba(10, 91, 216, 0.35);
  --border-subtle: rgba(11, 31, 92, 0.10);
  --cyan-neon: #1fb5f5;
  --blue-electric: #0a5bd8;
  --blue-vibrant: #0b66e4;
  --accent-purple: #0b1f5c;
  --emerald-cyber: #10b981;
  --text-primary: #0b1f5c;
  --text-secondary: #3d5280;
  --text-muted: #6b7da5;
  --logo-navy: #0b1f5c;
  --logo-blue: #0a5bd8;
  --logo-sky: #1fb5f5;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  --font-code: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-dark);
  min-height: 100vh;
  overflow-x: clip; /* 'hidden' turns body into a scroll container and breaks position:sticky */
  position: relative;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(10, 91, 216, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 100% 50%, rgba(31, 181, 245, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 0% 80%, rgba(31, 181, 245, 0.07) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #eaf2ff;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0a5bd8, #1fb5f5);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0a5bd8;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.font-mono-tech {
  font-family: var(--font-mono);
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #0a4fd0 0%, #129be6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
  background: linear-gradient(135deg, #0b1f5c 0%, #0a5bd8 50%, #1fb5f5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism Containers */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -14px rgba(11, 31, 92, 0.18);
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(31, 181, 245, 0.7), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glass-panel:hover {
  border-color: var(--border-glow);
  box-shadow: 0 18px 40px -14px rgba(10, 91, 216, 0.28), 0 0 0 1px rgba(10, 91, 216, 0.08);
  transform: translateY(-3px);
}

.glass-panel:hover::before {
  opacity: 1;
}

.glass-panel-glow {
  border-color: rgba(10, 91, 216, 0.3);
  box-shadow: 0 12px 34px -10px rgba(10, 91, 216, 0.25);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(11, 31, 92, 0.10);
  border-radius: 9999px;
}

/* 3D Cyber Tilt Card */
.tilt-card {
  perspective: 1200px;
  transform-style: preserve-3d;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Glowing Neon Buttons */
.btn-cyber-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.85rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #0a5bd8 0%, #1fb5f5 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0.75rem;
  cursor: pointer;
  box-shadow: 0 8px 22px -6px rgba(10, 91, 216, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  text-decoration: none;
}

.btn-cyber-primary::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn-cyber-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px -6px rgba(10, 91, 216, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.btn-cyber-primary:hover::before {
  opacity: 1;
}

.btn-cyber-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.85rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(10, 91, 216, 0.3);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-cyber-secondary:hover {
  background: rgba(10, 91, 216, 0.08);
  border-color: var(--logo-blue);
  box-shadow: 0 8px 20px -8px rgba(10, 91, 216, 0.35);
  transform: translateY(-2px);
  color: var(--logo-blue);
}

/* Glowing Status Dot */
.pulse-indicator {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--emerald-cyber);
  display: inline-block;
}

.pulse-indicator::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background-color: inherit;
  opacity: 0.6;
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Scrollytelling Hero Styles */
#scrolly-container {
  position: relative;
  width: 100%;
  height: 320vh; /* Smooth scrollytelling scroll track for 46 frames */
}

#canvas-sticky-wrap {
  position: sticky;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf2ff;
  z-index: 10;
}

#scrolly-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay Vignette - Clean, Balanced Edge Fade */
.cinematic-vignette {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(180deg, rgba(244, 248, 255, 0.82) 0%, rgba(244, 248, 255, 0) 18%, rgba(244, 248, 255, 0) 84%, rgba(244, 248, 255, 0.88) 100%),
    radial-gradient(ellipse at center, transparent 60%, rgba(11, 31, 92, 0.04) 100%);
  pointer-events: none;
  z-index: 12;
}

/* Chapter Overlays */
.hero-chapter-layer {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  padding: 0 4vw;
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-chapter-layer.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0.25s, 0.25s, 0s;
}

/* Cyber HUD Scrubber Bar */
.scrolly-hud-controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(10, 91, 216, 0.22);
  box-shadow: 0 12px 30px -10px rgba(11, 31, 92, 0.28);
}

.hud-progress-track {
  width: 180px;
  height: 6px;
  background: rgba(11, 31, 92, 0.12);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.hud-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0a5bd8, #1fb5f5);
  box-shadow: 0 0 8px rgba(31, 181, 245, 0.55);
  border-radius: 3px;
  transition: width 0.05s linear;
}

/* Chapter Markers on Scrubber */
.chapter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(11, 31, 92, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
}

.chapter-dot.active {
  background: var(--logo-blue);
  box-shadow: 0 0 10px rgba(10, 91, 216, 0.5);
  transform: scale(1.35);
}

/* Interactive 3D Holographic Globe Canvas */
#globe-canvas-wrap {
  width: 100%;
  height: 520px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#globe-canvas {
  width: 100% !important;
  height: 100% !important;
  border-radius: 1.5rem;
}

/* Three.js Background Canvas */
#bg-three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
}

/* Content Container relative to Three.js canvas */
.main-content {
  position: relative;
  z-index: 5;
}

/* Range Slider Styling for GPU Estimator */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(11, 31, 92, 0.12);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0a5bd8;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(10, 91, 216, 0.45);
  border: 2px solid #ffffff;
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Tech Grid Lines */
.tech-grid-bg {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(11, 31, 92, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 31, 92, 0.05) 1px, transparent 1px);
}

/* Floating animation */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: float-slow 4s ease-in-out infinite;
}

/* Shimmer scanline */
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(1000%); }
}

.scanline-effect {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(10, 91, 216, 0.22), transparent);
  animation: scanline 8s linear infinite;
  pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  #scrolly-container {
    height: 400vh;
  }
  .scrolly-hud-controls {
    bottom: 1.25rem;
    padding: 0.5rem 1rem;
    gap: 0.75rem;
    width: 92%;
    max-width: 480px;
  }
  .hud-progress-track {
    width: 110px;
  }
}

@media (max-width: 768px) {
  .hero-chapter-layer {
    padding: 0 1.25rem;
  }
  .hud-progress-track {
    display: none;
  }
}


/* ==========================================================================
   LIGHT THEME OVERRIDES
   Remaps the Tailwind utility classes used in index.html (written for a dark
   UI) to the CCS logo palette: navy #0b1f5c, royal blue #0a5bd8, sky #1fb5f5.
   Prefixed with "body" so they win over the Tailwind CDN stylesheet.
   ========================================================================== */

/* ---- Text ---- */
body .text-white,
body .text-slate-100          { color: var(--logo-navy); }
body .text-slate-200          { color: #16306f; }
body .text-slate-300          { color: #334a7d; }
body .text-slate-400          { color: #4e6290; }
body .text-slate-500          { color: #6b7da5; }
body .text-slate-600          { color: #9aaac6; }
body .text-cyan-300,
body .text-cyan-400,
body .text-cyan-500,
body .text-blue-300,
body .text-blue-400           { color: var(--logo-blue); }
body .text-cyan-400\/40       { color: rgba(10, 91, 216, 0.45); }
body .text-cyan-400\/80       { color: rgba(10, 91, 216, 0.85); }
body .text-emerald-300        { color: #0b66e4; }
body .text-emerald-400        { color: var(--logo-blue); }
body .text-purple-300,
body .text-purple-400,
body .text-pink-300           { color: #0b3fa8; }

body .hover\:text-white:hover,
body .hover\:text-cyan-400:hover,
body .group:hover .group-hover\:text-cyan-300 { color: var(--logo-sky); }

/* keep white text where it sits on a solid blue / gradient background */
body .bg-blue-600.text-white,
body .btn-cyber-primary,
body .btn-cyber-primary:hover,
body .btn-cyber-primary span { color: #ffffff; }

/* ---- Solid / translucent dark surfaces -> white glass ---- */
body.bg-\[\#030712\]          { background-color: var(--bg-dark); }
body .bg-\[\#091124\]         { background-color: #ffffff; }
body .bg-slate-900            { background-color: #ffffff; }
body .bg-slate-900\/90,
body .bg-slate-900\/85,
body .bg-slate-900\/80,
body .bg-slate-900\/70,
body .bg-slate-900\/60        { background-color: rgba(255, 255, 255, 0.78); }
body .bg-slate-950\/70,
body .bg-slate-950\/80,
body .bg-slate-950\/90        { background-color: rgba(255, 255, 255, 0.9); }
body .bg-slate-950\/95        { background-color: rgba(244, 248, 255, 0.97); }
body .bg-slate-800            { background-color: #e6effd; }
body .bg-slate-800\/80        { background-color: rgba(230, 239, 253, 0.9); }
body .bg-slate-700            { background-color: #d3e3fa; }
body .hover\:bg-slate-700:hover { background-color: #c3d8f6; }
body .bg-white\/5             { background-color: #ffffff; }

/* tinted accent chips */
body .bg-cyan-950\/40,
body .bg-cyan-950\/60,
body .bg-cyan-950\/80,
body .bg-blue-950\/60,
body .bg-blue-950\/80,
body .bg-blue-900\/40         { background-color: rgba(10, 91, 216, 0.08); }
body .bg-cyan-500\/20,
body .bg-cyan-500\/10,
body .bg-cyan-400\/20,
body .bg-blue-500\/10,
body .bg-blue-500\/20,
body .bg-blue-600\/20,
body .bg-blue-600\/30         { background-color: rgba(31, 181, 245, 0.14); }
body .bg-emerald-950\/60,
body .bg-emerald-950\/80,
body .bg-purple-950\/80       { background-color: rgba(10, 91, 216, 0.08); }
body .bg-emerald-600\/30,
body .bg-emerald-500\/20,
body .bg-purple-600\/20,
body .bg-purple-600\/30,
body .bg-pink-500\/20         { background-color: rgba(31, 181, 245, 0.14); }
body .bg-blue-600             { background-image: linear-gradient(135deg, #0a5bd8, #1fb5f5); background-color: #0a5bd8; }

/* ---- Card / section gradients (dark -> soft blue-white) ---- */
body .bg-gradient-to-b,
body .bg-gradient-to-br,
body .bg-gradient-to-r {
  background-image: linear-gradient(135deg, rgba(10, 91, 216, 0.07) 0%, rgba(255, 255, 255, 0.92) 55%, rgba(31, 181, 245, 0.08) 100%);
}
body .bg-gradient-to-t {
  background-image: linear-gradient(to top, rgba(244, 248, 255, 0.95) 0%, rgba(244, 248, 255, 0) 60%);
}

/* ---- Borders ---- */
body .border-slate-800,
body .border-slate-800\/80,
body .border-slate-700,
body .border-slate-700\/60,
body .border-slate-700\/80,
body .border-white\/10        { border-color: rgba(11, 31, 92, 0.10); }
body .border-cyan-500\/30,
body .border-cyan-500\/40,
body .border-cyan-500\/20,
body .border-cyan-400\/30,
body .border-cyan-400\/40,
body .border-cyan-400\/50,
body .border-blue-500\/30,
body .border-blue-500\/40,
body .border-blue-400\/40,
body .border-blue-400\/50     { border-color: rgba(10, 91, 216, 0.28); }
body .hover\:border-cyan-400:hover,
body .focus\:border-cyan-400:focus,
body .group:hover .group-hover\:border-cyan-400 { border-color: var(--logo-blue); }
body .border-emerald-400,
body .border-emerald-400\/40,
body .border-emerald-400\/50,
body .border-emerald-500\/30,
body .border-emerald-500\/40,
body .border-purple-400\/50,
body .border-purple-500\/40,
body .border-pink-500\/40    { border-color: rgba(10, 91, 216, 0.28); }

/* keep HUD / status labels on one line */
.scrolly-hud-controls > * { white-space: nowrap; }

/* ---- Brand logo badge: remove neon glow ---- */
body img[class*="drop-shadow"] { filter: drop-shadow(0 4px 10px rgba(10, 91, 216, 0.18)); }
body .group:hover .group-hover\:shadow-\[0_0_20px_rgba\(0\,240\,255\,0\.4\)\] {
  box-shadow: 0 8px 22px -6px rgba(10, 91, 216, 0.35);
}

/* ---- Navigation: floating glass header ---- */
#main-navbar {
  padding-top: 0.75rem;
  padding-bottom: 0;
  background: transparent;
  border-bottom: 0;
  box-shadow: none;
}
#main-navbar > div {
  padding: 0.45rem 0.75rem 0.45rem 1.1rem;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
          backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid rgba(10, 91, 216, 0.12);
  border-radius: 1.4rem;
  box-shadow: 0 1px 2px rgba(11, 31, 92, 0.04), 0 14px 36px -20px rgba(11, 31, 92, 0.38);
  transition: background-color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
#main-navbar.nav-scrolled { background: transparent; border-bottom-color: transparent; box-shadow: none; }
#main-navbar.nav-scrolled > div {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(10, 91, 216, 0.16);
  box-shadow: 0 1px 2px rgba(11, 31, 92, 0.05), 0 20px 44px -20px rgba(11, 31, 92, 0.45);
}
.brand-link { display: inline-flex; align-items: center; flex: none; }
.brand-logo {
  height: 3.6rem; width: auto; object-fit: contain; display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand-link:hover .brand-logo { transform: scale(1.04); }
@media (min-width: 640px)  { .brand-logo { height: 4.1rem; } }
@media (min-width: 1024px) { .brand-logo { height: 4.6rem; } }
.brand-logo-drawer { height: 3.8rem; }
#main-navbar nav .nav-link {
  position: relative;
  padding: 0.35rem 0;
  color: #1c3470;
  white-space: nowrap;
}
#main-navbar nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #0a5bd8, #1fb5f5);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
#main-navbar nav .nav-link:hover { color: var(--logo-blue); }
#main-navbar nav .nav-link:hover::after { transform: scaleX(1); }

#audio-toggle-btn { box-shadow: 0 4px 12px -6px rgba(11, 31, 92, 0.25); }
#audio-toggle-btn:hover { color: var(--logo-blue); }

/* ---- Form fields ---- */
body input,
body select,
body textarea { color: var(--logo-navy); }
body input::placeholder,
body textarea::placeholder { color: #8b9bbd; }

/* ---- Modal backdrop + footer ---- */
#quote-modal-backdrop { background: rgba(11, 31, 92, 0.35) !important; }

/* ---- Chapter text readability over hero photography ---- */
.hero-chapter-layer h1,
.hero-chapter-layer h2 { text-shadow: 0 1px 24px rgba(244, 248, 255, 0.9); }
.hero-chapter-layer p  { text-shadow: 0 0 18px rgba(244, 248, 255, 0.85); }
#hero-loader-status { color: rgba(10, 91, 216, 0.85); }

/* ---- Selection ---- */
::selection { background: rgba(31, 181, 245, 0.35); color: var(--logo-navy); }


/* ==========================================================================
   SECTION BANDS  -  alternating full-width light / deep-navy sections
   ========================================================================== */
body main section[class*="border-t"] { border-top-width: 0; }
footer.band-dark { border-top-width: 0; }

.band-light,
.band-dark { position: relative; isolation: isolate; }

.band-light::before,
.band-dark::before,
.band-dark::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
}

/* ---- light band: plain, smooth, soft background (no effects) ---- */
.band-light::before {
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%);
}
.band-light.band-alt::before {
  background: linear-gradient(180deg, #f1f6ff 0%, #f8fbff 100%);
}

/* ---- dark band: deep logo-navy with sky/blue glows + faint tech grid ---- */
.band-dark::before {
  background:
    linear-gradient(90deg, transparent, rgba(31, 181, 245, 0.65), transparent) top / 100% 1px no-repeat,
    radial-gradient(900px 440px at 88% 0%, rgba(31, 181, 245, 0.22), transparent 62%),
    radial-gradient(760px 460px at 4% 100%, rgba(10, 91, 216, 0.38), transparent 62%),
    linear-gradient(180deg, #071538 0%, #0b1f5c 52%, #081a47 100%);
}
.band-dark.band-cont::before {
  background:
    radial-gradient(800px 420px at 6% 0%, rgba(10, 91, 216, 0.32), transparent 62%),
    radial-gradient(800px 420px at 95% 100%, rgba(31, 181, 245, 0.18), transparent 62%),
    linear-gradient(180deg, #081a47 0%, #0b1f5c 55%, #071538 100%);
}
.band-dark::after {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 20%, transparent 78%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 20%, transparent 78%);
}

/* ---- re-skin everything inside a dark band ---- */
.band-dark {
  --bg-card: rgba(13, 35, 92, 0.58);
  --bg-card-hover: rgba(17, 45, 112, 0.78);
  --border-subtle: rgba(255, 255, 255, 0.10);
  --border-glow: rgba(31, 181, 245, 0.45);
  --text-primary: #ffffff;
  --text-secondary: #b6c6e8;
  --text-muted: #8fa3cf;
}
.band-dark .glass-panel { box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.6); }
.band-dark .glass-panel:hover { box-shadow: 0 20px 44px -16px rgba(31, 181, 245, 0.35), 0 0 0 1px rgba(31, 181, 245, 0.18); }
.band-dark .glass-panel-glow { border-color: rgba(31, 181, 245, 0.4); box-shadow: 0 0 34px -8px rgba(31, 181, 245, 0.35); }
.band-dark .glass-pill { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.14); }
.band-dark .text-gradient-cyan { background-image: linear-gradient(135deg, #ffffff 10%, #8fdcfb 55%, #1fb5f5 100%); }
.band-dark .text-gradient-blue { background-image: linear-gradient(135deg, #8fdcfb 0%, #38bdf8 50%, #1fb5f5 100%); }
.band-dark .btn-cyber-secondary { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.28); color: #ffffff; }
.band-dark .btn-cyber-secondary:hover { background: rgba(31, 181, 245, 0.2); border-color: #1fb5f5; color: #ffffff; box-shadow: 0 0 22px -4px rgba(31, 181, 245, 0.55); }
.band-dark input[type="range"] { background: rgba(255, 255, 255, 0.16); }
.band-dark input[type="range"]::-webkit-slider-thumb { background: #38bdf8; box-shadow: 0 0 14px rgba(56, 189, 248, 0.8); }
.band-dark .scanline-effect { background: linear-gradient(90deg, transparent, rgba(31, 181, 245, 0.5), transparent); }

/* text */
body .band-dark .text-white,
body .band-dark .text-slate-100  { color: #ffffff; }
body .band-dark .text-slate-200  { color: #e2e9f8; }
body .band-dark .text-slate-300  { color: #c3d1ee; }
body .band-dark .text-slate-400  { color: #9db0d9; }
body .band-dark .text-slate-500  { color: #7d92c2; }
body .band-dark .text-slate-600  { color: #56699b; }
body .band-dark .text-cyan-300,
body .band-dark .text-blue-300,
body .band-dark .text-emerald-300 { color: #8fdcfb; }
body .band-dark .text-cyan-400,
body .band-dark .text-cyan-500,
body .band-dark .text-blue-400,
body .band-dark .text-emerald-400,
body .band-dark .text-purple-300,
body .band-dark .text-purple-400,
body .band-dark .text-pink-300   { color: #38bdf8; }
body .band-dark .text-cyan-400\/40 { color: rgba(56, 189, 248, 0.5); }
body .band-dark .text-cyan-400\/80 { color: rgba(56, 189, 248, 0.85); }
body .band-dark .hover\:text-white:hover,
body .band-dark .hover\:text-cyan-400:hover { color: #ffffff; }

/* surfaces */
body .band-dark .bg-slate-900     { background-color: #0c2060; }
body .band-dark .bg-slate-900\/90,
body .band-dark .bg-slate-900\/85,
body .band-dark .bg-slate-900\/80 { background-color: rgba(10, 29, 80, 0.82); }
body .band-dark .bg-slate-900\/70,
body .band-dark .bg-slate-900\/60 { background-color: rgba(10, 29, 80, 0.6); }
body .band-dark .bg-slate-950\/70,
body .band-dark .bg-slate-950\/80,
body .band-dark .bg-slate-950\/90 { background-color: rgba(5, 14, 42, 0.8); }
body .band-dark .bg-slate-800     { background-color: #15306f; }
body .band-dark .bg-slate-800\/80 { background-color: rgba(21, 48, 111, 0.85); }
body .band-dark .bg-slate-700     { background-color: #254484; }
body .band-dark .hover\:bg-slate-700:hover { background-color: #2f5399; }
body .band-dark .bg-white\/5      { background-color: rgba(255, 255, 255, 0.07); }
body .band-dark .bg-cyan-950\/40,
body .band-dark .bg-cyan-950\/60,
body .band-dark .bg-cyan-950\/80,
body .band-dark .bg-blue-950\/60,
body .band-dark .bg-blue-950\/80,
body .band-dark .bg-blue-900\/40,
body .band-dark .bg-emerald-950\/60,
body .band-dark .bg-emerald-950\/80,
body .band-dark .bg-purple-950\/80 { background-color: rgba(31, 181, 245, 0.14); }
body .band-dark .bg-cyan-500\/20,
body .band-dark .bg-cyan-500\/10,
body .band-dark .bg-cyan-400\/20,
body .band-dark .bg-blue-500\/10,
body .band-dark .bg-blue-500\/20,
body .band-dark .bg-blue-600\/20,
body .band-dark .bg-blue-600\/30,
body .band-dark .bg-emerald-600\/30,
body .band-dark .bg-emerald-500\/20,
body .band-dark .bg-purple-600\/20,
body .band-dark .bg-purple-600\/30,
body .band-dark .bg-pink-500\/20  { background-color: rgba(31, 181, 245, 0.18); }

/* gradients */
body .band-dark .bg-gradient-to-b,
body .band-dark .bg-gradient-to-br,
body .band-dark .bg-gradient-to-r {
  background-image: linear-gradient(135deg, rgba(31, 181, 245, 0.16) 0%, rgba(10, 29, 80, 0.55) 60%, rgba(10, 91, 216, 0.18) 100%);
}
body .band-dark .bg-gradient-to-t {
  background-image: linear-gradient(to top, rgba(7, 21, 56, 0.95) 0%, rgba(7, 21, 56, 0) 60%);
}

/* borders */
body .band-dark .border-slate-800,
body .band-dark .border-slate-800\/80,
body .band-dark .border-slate-700,
body .band-dark .border-slate-700\/60,
body .band-dark .border-slate-700\/80,
body .band-dark .border-white\/10 { border-color: rgba(255, 255, 255, 0.12); }
body .band-dark .border-cyan-500\/20,
body .band-dark .border-cyan-500\/30,
body .band-dark .border-cyan-500\/40,
body .band-dark .border-cyan-400\/30,
body .band-dark .border-cyan-400\/40,
body .band-dark .border-cyan-400\/50,
body .band-dark .border-blue-500\/30,
body .band-dark .border-blue-500\/40,
body .band-dark .border-blue-400\/40,
body .band-dark .border-blue-400\/50,
body .band-dark .border-emerald-400,
body .band-dark .border-emerald-400\/40,
body .band-dark .border-emerald-400\/50,
body .band-dark .border-emerald-500\/30,
body .band-dark .border-emerald-500\/40,
body .band-dark .border-purple-400\/50,
body .band-dark .border-purple-500\/40,
body .band-dark .border-pink-500\/40 { border-color: rgba(31, 181, 245, 0.38); }
body .band-dark .hover\:border-cyan-400:hover,
body .band-dark .focus\:border-cyan-400:focus { border-color: #38bdf8; }

/* form fields + placeholders on navy */
body .band-dark input,
body .band-dark select,
body .band-dark textarea { color: #ffffff; }
body .band-dark input::placeholder,
body .band-dark textarea::placeholder { color: #7d92c2; }

/* ---- footer on navy ---- */
body footer.band-dark { background: transparent; }
footer.band-dark img { background: #ffffff; padding: 0.4rem 0.75rem; border-radius: 0.75rem; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.5); }

/* ==========================================================================
   MEGA MENU  -  4 service categories (desktop hover/click + mobile accordion)
   ========================================================================== */
#mega-nav { color: var(--logo-navy); }
.mega-trigger {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.55rem 0.95rem; border-radius: 0.75rem;
  font: 600 0.9rem/1 var(--font-body); color: #16306f; background: transparent;
  border: 0; cursor: pointer; white-space: nowrap;
  transition: background-color .25s ease, color .25s ease;
}
.mega-trigger:hover,
.mega-item.is-open .mega-trigger { background: rgba(10, 91, 216, 0.09); color: var(--logo-blue); }
.mega-trigger:focus-visible { outline: 2px solid var(--logo-sky); outline-offset: 2px; }
.mega-chevron { width: 1rem; height: 1rem; transition: transform .3s cubic-bezier(.16,1,.3,1); }
.mega-item.is-open .mega-chevron { transform: rotate(180deg); }

.mega-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  padding-top: 0.9rem;                    /* invisible hover bridge */
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .28s ease, transform .35s cubic-bezier(.16,1,.3,1), visibility 0s linear .28s;
  z-index: 60;
}
.mega-item.is-open .mega-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
  transition-delay: 0s;
}
.mega-inner {
  display: grid; grid-template-columns: 300px 1fr; gap: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(10, 91, 216, 0.14);
  border-radius: 1.5rem; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(11, 31, 92, 0.45), 0 0 0 1px rgba(255,255,255,.6) inset;
}
.mega-feature {
  position: relative; padding: 2rem 1.75rem; color: #fff;
  display: flex; flex-direction: column; gap: 0.85rem;
  background:
    radial-gradient(260px 200px at 90% 0%, rgba(31,181,245,.45), transparent 70%),
    linear-gradient(160deg, #0b1f5c 0%, #0a3a9e 60%, #0a5bd8 100%);
}
.mega-feature::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 65%); mask-image: linear-gradient(200deg, #000 0%, transparent 65%);
}
.mega-feature > * { position: relative; z-index: 1; }
.mega-tag {
  align-self: flex-start; padding: .3rem .7rem; border-radius: 9999px;
  font: 600 .68rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: #bfe9fd; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
}
.mega-feature h3 { font-size: 1.45rem; line-height: 1.2; font-weight: 800; color: #fff; }
.mega-feature p { font-size: .88rem; line-height: 1.6; color: #cfe0ff; }
.mega-feature-link { font-size: .85rem; font-weight: 600; color: #8fdcfb; text-decoration: none; transition: color .2s, transform .2s; }
.mega-feature-link:hover { color: #fff; }
.mega-cta {
  margin-top: auto; padding: .8rem 1.1rem; border-radius: .8rem; cursor: pointer;
  font: 700 .88rem/1 var(--font-heading); color: #0b1f5c; background: #fff; border: 0;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); transition: transform .25s, box-shadow .25s, background .25s;
}
.mega-cta:hover { transform: translateY(-2px); background: #e9f6ff; }

.mega-grid {
  list-style: none; margin: 0; padding: 1.5rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .5rem; align-content: start;
}
.mega-link {
  display: flex; align-items: center; gap: .85rem; padding: .7rem .8rem; border-radius: .9rem;
  text-decoration: none; transition: background-color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.mega-link:hover, .mega-link:focus-visible { background: linear-gradient(135deg, rgba(10,91,216,.09), rgba(31,181,245,.10)); transform: translateX(3px); outline: none; }
.mega-icon {
  flex: none; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: .75rem;
  color: var(--logo-blue); background: rgba(10, 91, 216, 0.08); border: 1px solid rgba(10, 91, 216, 0.12);
  transition: background .22s, color .22s, border-color .22s;
}
.mega-icon svg { width: 1.3rem; height: 1.3rem; }
.mega-link:hover .mega-icon { background: linear-gradient(135deg, #0a5bd8, #1fb5f5); color: #fff; border-color: transparent; }
.mega-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.mega-text strong { font: 600 .88rem/1.25 var(--font-body); color: var(--logo-navy); }
.mega-text small { font-size: .74rem; line-height: 1.35; color: var(--text-muted); }

@media (min-width: 1024px) and (max-width: 1180px) {
  .mega-inner { grid-template-columns: 240px 1fr; }
  .mega-grid { padding: 1rem; }
  .mega-text small { display: none; }
  .mega-trigger { padding: .5rem .65rem; font-size: .84rem; }
}

/* ---- mobile accordion ---- */
#mobile-menu { overflow-y: auto; }
.m-acc { border-bottom: 1px solid rgba(11,31,92,.12); }
.m-acc-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 1rem .25rem; background: none; border: 0; cursor: pointer;
  font: 600 1.05rem/1.2 var(--font-heading); color: var(--logo-navy);
}
.m-acc-btn[aria-expanded="true"] .mega-chevron { transform: rotate(180deg); }
.m-acc-btn[aria-expanded="true"] { color: var(--logo-blue); }
.m-acc-panel { display: none; flex-direction: column; gap: .15rem; padding: 0 0 .75rem; }
.m-acc.open .m-acc-panel { display: flex; }
.m-acc-link {
  display: flex; align-items: center; gap: .8rem; padding: .6rem .4rem; border-radius: .7rem;
  font-size: .95rem; font-weight: 500; color: #2c4478; text-decoration: none;
}
.m-acc-link:hover { background: rgba(10,91,216,.08); color: var(--logo-blue); }
.m-acc-link .mega-icon { width: 2.1rem; height: 2.1rem; }
.m-acc-link .mega-icon svg { width: 1.1rem; height: 1.1rem; }
@media (prefers-reduced-motion: reduce) { .mega-panel, .mega-chevron, .mega-link { transition: none; } }


/* ==========================================================================
   HERO REFINEMENTS  -  smoother, more modern scrollytelling hero
   ========================================================================== */

/* canvas: GPU-composited so the slow push-in stays buttery */
#scrolly-canvas { will-change: transform; transform-origin: 50% 50%; }

/* softer, eased light fade (more stops = no visible banding) */
.cinematic-vignette {
  background:
    linear-gradient(180deg,
      rgba(244, 248, 255, 0.90) 0%, rgba(244, 248, 255, 0.55) 7%, rgba(244, 248, 255, 0.2) 14%, rgba(244, 248, 255, 0) 24%,
      rgba(244, 248, 255, 0) 74%, rgba(244, 248, 255, 0.3) 86%, rgba(244, 248, 255, 0.75) 94%, rgba(244, 248, 255, 0.97) 100%),
    linear-gradient(90deg,
      rgba(244, 248, 255, 0.96) 0%, rgba(244, 248, 255, 0.9) 16%, rgba(244, 248, 255, 0.76) 28%, rgba(244, 248, 255, 0.55) 40%,
      rgba(244, 248, 255, 0.32) 52%, rgba(244, 248, 255, 0.13) 64%, rgba(244, 248, 255, 0.03) 74%, rgba(244, 248, 255, 0) 82%);
}

/* chapter layers: calm cross-fade, content staggers in */
.hero-chapter-layer {
  visibility: hidden;
  transform: none;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.hero-chapter-layer.active {
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
/* replaced with hero-glass-card transitions */
.hero-chapter-layer.active > div > * {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
}
.hero-chapter-layer.active > div > *:nth-child(1) { transition-delay: 0.05s; }
.hero-chapter-layer.active > div > *:nth-child(2) { transition-delay: 0.14s; }
.hero-chapter-layer.active > div > *:nth-child(3) { transition-delay: 0.24s; }
.hero-chapter-layer.active > div > *:nth-child(4) { transition-delay: 0.34s; }

/* cleaner, tighter modern typography */
.hero-chapter-layer h1,
.hero-chapter-layer h2 {
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-shadow: 0 0 30px rgba(244, 248, 255, 0.55);
}
.hero-chapter-layer p {
  color: #2f4a7e;
  line-height: 1.65;
  text-shadow: 0 0 20px rgba(244, 248, 255, 0.6);
}
.hero-chapter-layer .text-gradient-cyan,
.hero-chapter-layer .text-gradient-blue {
  background-size: 220% auto;
  animation: heroShimmer 9s ease-in-out infinite alternate;
}
@keyframes heroShimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* chapter eyebrow + info pill: crisp frosted glass */
.hero-chapter-layer > div > div:first-child:not(.hero-glass-card) {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(10, 91, 216, 0.22) !important;
  box-shadow: 0 8px 22px -12px rgba(11, 31, 92, 0.3);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
}
.hero-chapter-layer .rounded-lg {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(10, 91, 216, 0.16) !important;
  border-radius: 9999px;
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  box-shadow: 0 8px 22px -14px rgba(11, 31, 92, 0.3);
}

/* HUD: slimmer glass pill with a real progress fill (no scanline) */
.scrolly-hud-controls {
  bottom: 1.75rem;
  padding: 0.6rem 1.25rem;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(10, 91, 216, 0.16);
  box-shadow: 0 1px 2px rgba(11, 31, 92, 0.05), 0 18px 40px -18px rgba(11, 31, 92, 0.4);
}
.hud-progress-track { height: 5px; border-radius: 9999px; }
.hud-progress-fill {
  width: 0;
  background: linear-gradient(90deg, #0a5bd8, #1fb5f5);
  border-radius: 9999px;
  animation: none;
}
#hud-frame-count { font-variant-numeric: tabular-nums; }

/* slim loading bar replaces the "BUFFERING SEQUENCES" text */
.hero-loader {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 30;
  pointer-events: none;
  background: rgba(10, 91, 216, 0.08);
  transition: opacity 0.6s ease;
}
.hero-loader i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  background: linear-gradient(90deg, #0a5bd8, #1fb5f5);
  border-radius: 0 3px 3px 0;
  transition: width 0.3s ease;
}
.hero-loader.done { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .hero-chapter-layer > div > * { transition-duration: 0.01s !important; transition-delay: 0s !important; transform: none; filter: none; }
  .hero-chapter-layer .text-gradient-cyan, .hero-chapter-layer .text-gradient-blue { animation: none; }
}

/* ==========================================================================
   Hero Chapter Layer & Left/Right Glass Cards
   ========================================================================== */
.hero-chapter-layer {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  padding: 0 4vw;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 1.2s;
}

.hero-chapter-layer.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-chapter-layer.align-left {
  justify-content: flex-start;
}

.hero-chapter-layer.align-right {
  justify-content: flex-end;
}

.hero-glass-card {
  width: 100%;
  max-width: 620px;
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.5rem 0 !important;
  box-shadow: none !important;
  position: relative;
  overflow: visible;
  text-align: left;
}

.hero-glass-card h1,
.hero-glass-card h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--logo-navy) !important;
  text-shadow: 0 1px 16px rgba(255, 255, 255, 0.95), 0 0 28px rgba(255, 255, 255, 0.85);
}

.hero-glass-card p {
  color: #0b1f5c !important;
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 500;
  text-shadow: 0 1px 14px rgba(255, 255, 255, 0.95), 0 0 22px rgba(255, 255, 255, 0.85);
}

.hero-glass-card h1,
.hero-glass-card h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--logo-navy) !important;
}

.hero-glass-card p {
  color: #16306f !important;
  font-size: 0.975rem;
  line-height: 1.62;
}

.hero-telemetry-badge {
  background: rgba(255, 255, 255, 0.88) !important;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(10, 91, 216, 0.20) !important;
  border-radius: 1.25rem !important;
  padding: 1.25rem 1.5rem !important;
  box-shadow: 0 16px 36px -10px rgba(11, 31, 92, 0.15) !important;
  max-width: 320px;
  width: 100%;
  text-align: left;
}

@media (max-width: 1024px) {
  .hero-glass-card {
    max-width: 100%;
    padding: 1.5rem !important;
  }
}


/* ==========================================================================
   Smooth, modern slider text: no background, soft staggered reveal
   ========================================================================== */
.hero-chapter-layer .hero-glass-card,
.hero-chapter-layer > div > div.hero-glass-card:first-child {
  background: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
/* inline info pill inside the text: plain text, no box */
.hero-glass-card .rounded-full.bg-white\/80 {
  background: transparent !important;
  border: 0 !important;
  padding-left: 0.25rem !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.hero-glass-card > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.hero-chapter-layer.active .hero-glass-card > * {
  opacity: 1;
  transform: none;
  transition: opacity 1.3s cubic-bezier(0.22, 1, 0.36, 1), transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-chapter-layer.active .hero-glass-card > *:nth-child(1) { transition-delay: 0.30s; }
.hero-chapter-layer.active .hero-glass-card > *:nth-child(2) { transition-delay: 0.50s; }
.hero-chapter-layer.active .hero-glass-card > *:nth-child(3) { transition-delay: 0.70s; }
@media (prefers-reduced-motion: reduce) {
  .hero-glass-card > *, .hero-chapter-layer.active .hero-glass-card > * { transition-duration: 0.01s; transition-delay: 0s; transform: none; }
}

/* Dots-only slider navigation */
.scrolly-hud-controls {
  padding: 0.7rem 1.1rem;
  gap: 0;
}
.scrolly-hud-controls .chapter-dot {
  width: 10px;
  height: 10px;
}
.scrolly-hud-controls .chapter-dot.active {
  width: 26px;
  border-radius: 9999px;
  transform: none;
}


/* ==========================================================================
   MOBILE / TABLET RESPONSIVE LAYER
   ========================================================================== */
body { overflow-x: clip; }  /* clip (not hidden) so the sticky hero keeps working */
img, video, canvas, svg { max-width: 100%; }
section[id], div[id$="-section"] { scroll-margin-top: 5.5rem; }

/* ---- Hero (phones + tablets, portrait): full frame on top, text underneath ---- */
@media (max-width: 1023px) and (min-height: 521px) {
  :root {
    --hero-top: max(5.6rem, calc(46svh - var(--hero-img-h) - 1rem));  /* centres frame+text group, clears header */
    --hero-img-h: calc(100vw * 1072 / 1920);  /* frame aspect ratio = 1920 x 1072 */
  }
  #scrolly-container { height: 380vh; }
  #canvas-sticky-wrap {
    display: block;
    height: 100vh;
    height: 100svh;
    background: #f4f8ff;
  }
  #scrolly-canvas {
    position: absolute;
    top: var(--hero-top);
    left: 0;
    width: 100%;
    height: var(--hero-img-h);
    background: none !important;
    clip-path: inset(0 0 2px 0);      /* trims the 1px source-edge line at the bottom */
  }
  /* soft edge-fade around the frame so it blends into the page (no crop, no hard border) */
  .cinematic-vignette {
    top: var(--hero-top);
    bottom: auto;
    height: var(--hero-img-h);
    background:
      linear-gradient(180deg, #f4f8ff 0%, rgba(244,248,255,0) 9%, rgba(244,248,255,0) 86%, #f4f8ff 97%, #f4f8ff 100%),
      linear-gradient(90deg, #f4f8ff 0%, rgba(244,248,255,0) 7%, rgba(244,248,255,0) 93%, #f4f8ff 100%);
  }

  /* text block sits below the frame */
  .hero-chapter-layer {
    inset: auto 0 0 0;
    top: calc(var(--hero-top) + var(--hero-img-h) + 1.6rem);
    align-items: flex-start;
    justify-content: center;
    padding: 0 1.25rem 1rem;
    overflow: hidden;
  }
  .hero-chapter-layer > div { max-width: 640px; }
  .hero-glass-card {
    max-width: 100%;
    padding: 0 !important;
    text-align: center;
  }
  .hero-glass-card h1,
  .hero-glass-card h2 {
    font-size: clamp(1.65rem, 7.4vw, 3rem) !important;
    line-height: 1.1;
    text-shadow: none;
  }
  .hero-glass-card p {
    font-size: clamp(0.86rem, 3.7vw, 1.08rem) !important;
    line-height: 1.55;
    text-shadow: none;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-glass-card .flex.flex-wrap { justify-content: center; gap: 0.6rem; padding-top: 0.25rem; }
  .hero-glass-card .btn-cyber-primary,
  .hero-glass-card .btn-cyber-secondary { padding: 0.65rem 1.1rem !important; font-size: 0.85rem !important; }

  /* chapter dots: sit on the bottom edge of the frame */
  .scrolly-hud-controls {
    top: calc(var(--hero-top) + var(--hero-img-h) - 1.4rem);
    bottom: auto;
    padding: 0.5rem 0.9rem;
    width: auto;
    background: rgba(255, 255, 255, 0.85);
  }
  .hero-loader { top: 0; }
}

/* very small / short phones: tighten so the text always fits */
@media (max-width: 1023px) and (min-height: 521px) and (max-height: 700px) {
  :root { --hero-top: 5.2rem; }   /* short phones: frame sits right under the header */
  .hero-chapter-layer { top: calc(var(--hero-top) + var(--hero-img-h) + 1.3rem); }
  .hero-glass-card p { font-size: 0.82rem !important; line-height: 1.45; }
  .hero-glass-card .flex.flex-wrap > div { display: none; }   /* hide the small info pill */
}
@media (max-width: 380px) {
  .hero-chapter-layer { padding-left: 1rem; padding-right: 1rem; }
}

/* landscape phones: keep the wide cinematic layout, just smaller text */
@media (max-width: 1023px) and (max-height: 520px) {
  #scrolly-container { height: 300vh; }
  .hero-chapter-layer { padding-top: 4.6rem; padding-bottom: 3rem; align-items: center; }
  .hero-glass-card { max-width: 52%; }
  .hero-glass-card h1, .hero-glass-card h2 { font-size: clamp(1.2rem, 4vw, 1.8rem) !important; line-height: 1.1; }
  .hero-glass-card p { font-size: 0.74rem !important; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-glass-card .flex.flex-wrap > div { display: none; }
  .hero-glass-card .btn-cyber-primary, .hero-glass-card .btn-cyber-secondary { padding: 0.45rem 0.9rem !important; font-size: 0.75rem !important; }
  .scrolly-hud-controls { bottom: 0.6rem; width: auto; padding: 0.35rem 0.8rem; }
}

/* ---- General phone polish ---- */
@media (max-width: 768px) {
  #globe-canvas-wrap { height: 340px; }
  h1, h2 { overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  .scrolly-hud-controls .chapter-dot { width: 9px; height: 9px; }
  .scrolly-hud-controls .chapter-dot.active { width: 22px; }
}

/* header on narrow phones: keep the quote button on one line */
@media (max-width: 400px) {
  #main-navbar .btn-cyber-primary { white-space: nowrap; padding: 0.5rem 0.8rem; font-size: 0.72rem; gap: 0.3rem; }
  #main-navbar .btn-cyber-primary svg { display: none; }
}
