* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-dark: #1a1614;
}

html, body {
  background: var(--bg-dark);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* LOADER */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity 0.6s ease;
}

.loader-brand {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -1.5px;
  color: white;
  margin-bottom: 32px;
}

#loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1px;
  overflow: hidden;
}

#loader-bar-fill {
  height: 100%;
  width: 0%;
  background: white;
  transition: width 0.2s ease;
}

/* HEADER */
.intro-header {
  position: fixed;
  top: 24px;
  left: 48px;
  z-index: 100;
}

.intro-logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: white;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* SCROLL CONTAINER */
/* The scroll container holds the height needed to advance frames.
   The canvas itself is FIXED to the viewport so nothing shows below it. */
.intro-scroll {
  position: relative;
  width: 100%;
  height: 200vh;  /* scroll space for frame advancement */
}

.intro-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-dark);
  z-index: 1;
}

.intro-sticky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(0, 0, 0, 0.15) 25%,
    rgba(0, 0, 0, 0.15) 55%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

/* Ensure body doesn't show anything beyond the scroll container */
body {
  background: var(--bg-dark);
}

#intro-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* SCROLL HINT */
.intro-scroll-hint {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  z-index: 10;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: opacity 0.5s ease;
}

.arrow-down {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.7);
  margin: 12px auto 0;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(8px); opacity: 1; }
}


@media (max-width: 768px) {
  .intro-header { top: 18px; left: 24px; }
  .loader-brand { font-size: 36px; }
}
