/* Three.js scroll story shell */

.has-webgl {
  background: #07090e;
}

#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.story-overlay {
  position: relative;
  z-index: 1;
}

.chapter--overlay {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 6rem clamp(1rem, 4vw, 2.5rem) 4.5rem;
  background: transparent;
  overflow: visible;
}

.chapter--overlay.chapter--hero {
  align-items: center;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(7, 9, 14, 0.55) 0%, rgba(7, 9, 14, 0.15) 45%, rgba(7, 9, 14, 0.65) 100%);
}

.chapter--overlay .chapter__inner--bottom {
  width: min(100%, 640px);
  margin-right: auto;
  padding: 1.25rem 1.35rem;
  border-radius: 1.1rem;
  background: rgba(10, 12, 18, 0.55);
  border: 1px solid rgba(244, 239, 230, 0.1);
  backdrop-filter: blur(10px);
}

.chapter--overlay.chapter--cta {
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(7, 9, 14, 0.85));
}

.chapter--overlay.chapter--cta .chapter__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chapter--overlay.chapter--cta .body {
  margin-inline: auto;
}

.webgl-fallback {
  position: fixed;
  inset: auto 1rem 1rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(20, 24, 32, 0.92);
  color: #f4efe6;
  font-size: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  #webgl {
    opacity: 0.35;
  }
}

@media (max-width: 700px) {
  .chapter--overlay .chapter__inner--bottom {
    width: 100%;
  }
}
