:root {
  --bg: #040404;
  --text: #f3f3ef;
  --muted: rgba(243, 243, 239, 0.74);
  --quiet: rgba(243, 243, 239, 0.42);
  --accent: #d8d2c6;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(180deg, #050505 0%, #040404 35%, #080808 100%);
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

img,
canvas {
  display: block;
  max-width: 100%;
}

.page-shell {
  position: relative;
}

.progress-shell {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.95));
  transform-origin: left center;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(6, 6, 6, 0.97)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 40%);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__panel {
  width: min(460px, 100%);
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.loader__meter {
  width: 100%;
  height: 2px;
  margin: 1rem 0 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.loader__meter-fill {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.92));
}

.loader__meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sequence-stage {
  position: relative;
  min-height: 540vh;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.96), rgba(4, 4, 4, 1));
}

.sequence-stage__inner {
  position: relative;
  height: 100vh;
  overflow: clip;
}

.sequence-stage__inner::before,
.sequence-stage__inner::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 2;
}

.sequence-stage__inner::before {
  top: 0;
  height: 28vh;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
}

.sequence-stage__inner::after {
  bottom: 0;
  height: 32vh;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.sequence-stage__canvas,
.sequence-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sequence-stage__canvas {
  z-index: 1;
}

.sequence-fallback {
  display: none;
  object-fit: cover;
  z-index: 0;
}

.ambient-glow {
  position: absolute;
  z-index: 2;
  width: 34vw;
  height: 34vw;
  border-radius: 50%;
  opacity: 0.18;
  filter: blur(70px);
  pointer-events: none;
}

.ambient-glow--left {
  left: -10vw;
  bottom: -8vw;
  background: rgba(255, 246, 224, 0.24);
}

.ambient-glow--right {
  right: -8vw;
  top: 10vh;
  background: rgba(255, 255, 255, 0.12);
}

.sequence-copy {
  position: absolute;
  z-index: 4;
  max-width: min(700px, calc(100vw - 3rem));
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  will-change: opacity, transform;
}

.sequence-copy h1,
.sequence-copy h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  line-height: 0.96;
}

.sequence-copy h1 {
  font-size: clamp(3.1rem, 8vw, 7rem);
  max-width: 10ch;
}

.sequence-copy h2 {
  font-size: clamp(2rem, 4vw, 4.1rem);
  max-width: 11ch;
}

.sequence-copy__body {
  margin: 1rem 0 0;
  max-width: 36rem;
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.6;
  color: var(--muted);
}

.sequence-copy--intro {
  left: clamp(1.25rem, 5vw, 4rem);
  top: clamp(5.5rem, 15vh, 9rem);
}

.sequence-copy--detail,
.sequence-copy--final {
  bottom: clamp(5rem, 10vh, 7rem);
}

.sequence-copy--left {
  left: clamp(1.25rem, 7vw, 6rem);
}

.sequence-copy--right {
  right: clamp(1.25rem, 6vw, 5rem);
}

.sequence-copy--final {
  left: 50%;
  width: min(780px, calc(100vw - 2rem));
  transform: translate3d(-50%, 36px, 0);
  text-align: center;
}

.sequence-copy--final .sequence-copy__body {
  margin-left: auto;
  margin-right: auto;
}

.sequence-meta {
  position: absolute;
  right: clamp(1rem, 4vw, 2rem);
  bottom: clamp(1rem, 3vh, 2rem);
  z-index: 4;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sequence-meta__item {
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(243, 243, 239, 0.8);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

.scroll-cue {
  position: absolute;
  left: clamp(1.25rem, 5vw, 4rem);
  bottom: clamp(1.5rem, 4vh, 2.2rem);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--quiet);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.scroll-cue__line {
  display: block;
  width: 72px;
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scaleX(0.55); opacity: 0.45; }
  50% { transform: scaleX(1); opacity: 1; }
}

@media (max-width: 980px) {
  .sequence-stage {
    min-height: 500vh;
  }

  .ambient-glow {
    width: 46vw;
    height: 46vw;
  }

  .sequence-copy--right {
    left: clamp(1.25rem, 7vw, 3rem);
    right: auto;
  }

  .sequence-meta {
    left: 1rem;
    right: 1rem;
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .sequence-stage {
    min-height: 460vh;
  }

  .loader__panel {
    padding: 1.1rem;
  }

  .sequence-copy {
    max-width: calc(100vw - 2rem);
  }

  .sequence-copy--intro {
    top: 5.25rem;
    left: 1rem;
  }

  .sequence-copy--left,
  .sequence-copy--right,
  .sequence-copy--final {
    left: 1rem;
    right: 1rem;
    width: auto;
    text-align: left;
  }

  .sequence-copy--detail,
  .sequence-copy--final {
    bottom: 5.3rem;
  }

  .sequence-copy--final {
    transform: translate3d(0, 36px, 0);
  }

  .sequence-copy--final .sequence-copy__body {
    margin-left: 0;
    margin-right: 0;
  }

  .scroll-cue {
    left: 1rem;
    bottom: 1.2rem;
  }

  .sequence-meta {
    display: none;
  }
}
