/* ─── HERO SECTION ────────────────────────────────────────────────────────── */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* Fade in after 2.8s (matches hero.js timeline) */
  opacity: 0;
  animation: fade-in 1.4s 2.8s forwards ease-out;
}

.hero-text .logo-wrap span {
  font-size: clamp(80px, 18vw, 180px);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow:
    0 0 10px var(--cyan),
    0 0 30px var(--cyan-mid),
    0 0 70px var(--cyan-dark),
    0 0 120px #1050a0;
  animation: glow-pulse 3s ease-in-out infinite 4.2s;
}

.hero-text .tagline {
  margin-top: 14px;
  font-size: clamp(11px, 2vw, 16px);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--cyan-mid);
  text-shadow: 0 0 10px var(--cyan-mid);
  /* Scanline wipe-in */
  clip-path: inset(0 0 100% 0);
  animation: wipe-in 0.9s 4s forwards ease-out;
}

@keyframes glow-pulse {
  0%, 100% {
    text-shadow: 0 0 10px var(--cyan), 0 0 30px var(--cyan-mid), 0 0 70px var(--cyan-dark);
  }
  50% {
    text-shadow: 0 0 20px #a0f0ff, 0 0 55px var(--cyan), 0 0 100px var(--cyan-mid);
  }
}

@keyframes wipe-in {
  to { clip-path: inset(0 0 0% 0); }
}

@keyframes fade-in {
  to { opacity: 1; }
}

/* ─── STORY SECTIONS ──────────────────────────────────────────────────────── */
.story-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 100vh;
  padding: 120px 60px 80px;
  gap: 60px;
  position: relative;
}

/* Alternate: text left on .reverse */
.story-section.reverse { direction: rtl; }
.story-section.reverse > * { direction: ltr; }

/* The Three.js canvas for each section */
.scene-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 60vh;
  border-radius: 4px;
  /* Subtle inner glow border */
  box-shadow: 0 0 0 1px rgba(74, 184, 232, 0.1),
              inset 0 0 40px rgba(0, 2, 10, 0.5);
}

/* Story text block */
.story-text {
  max-width: 480px;
}

.story-text h2 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 16px var(--cyan-mid), 0 0 40px var(--cyan-dark);
  margin-bottom: 28px;
  /* Animate in when scrolled into view (class added by scroll.js) */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.story-text p {
  font-size: clamp(13px, 1.6vw, 16px);
  line-height: 2;
  color: var(--text);
  text-shadow: 0 0 6px rgba(74, 184, 232, 0.3);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s 0.2s ease, transform 0.9s 0.2s ease;
}

/* Class toggled by scroll.js IntersectionObserver */
.story-section.visible .story-text h2,
.story-section.visible .story-text p {
  opacity: 1;
  transform: none;
}

/* Divider between sections */
.story-section::before {
  content: '';
  position: absolute;
  top: 0; left: 60px; right: 60px;
  height: 1px;
  background: linear-gradient(to right,
    transparent,
    rgba(74, 184, 232, 0.2) 30%,
    rgba(74, 184, 232, 0.2) 70%,
    transparent
  );
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .story-section {
    grid-template-columns: 1fr;
    padding: 100px 24px 60px;
    gap: 40px;
  }
  .story-section.reverse { direction: ltr; }
  #site-header nav { display: none; }
  #site-header { padding: 16px 24px; }
}
