:root {
  --bg: #050608;
  --bg-soft: #0d1014;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #f5f7fa;
  --muted: rgba(245, 247, 250, 0.7);
  --soft: rgba(245, 247, 250, 0.44);
  --accent: #d6b98a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  background: var(--bg);
}

html.no-js .page,
html.no-js .progress,
html.no-js .loader {
  display: none;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(214, 185, 138, 0.08), transparent 26%),
    linear-gradient(180deg, #07090c 0%, #040507 100%);
}

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

.page {
  position: relative;
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(214, 185, 138, 0.55), rgba(255, 255, 255, 0.95));
  transform-origin: left center;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(7, 9, 12, 0.96), rgba(4, 5, 7, 0.98));
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.loader__inner {
  width: min(420px, calc(100vw - 40px));
}

.loader__eyebrow,
.intro__eyebrow,
.outro__eyebrow,
.copy-block__eyebrow {
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--accent);
}

.loader__meter {
  position: relative;
  overflow: hidden;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

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

.loader__value {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.outro {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 26svh;
  padding: 18px clamp(20px, 3vw, 32px) 20px;
}

.outro--inline {
  margin-top: -24svh;
  min-height: 24svh;
  z-index: 4;
  pointer-events: none;
}

.outro__copy {
  width: min(420px, 100%);
}

.outro h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  line-height: 1;
  font-weight: 800;
  max-width: 14ch;
}

.outro__body {
  width: min(560px, 100%);
  margin: 20px 0 0;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  color: var(--muted);
}

.scrolly {
  position: relative;
  height: var(--scroll-height, 820vh);
}

.scrolly__stage {
  position: sticky;
  top: 0;
  overflow: clip;
  height: 100svh;
  background: #020304;
}

.scrolly__canvas {
  width: 100%;
  height: 100%;
}

.stage-fade {
  position: absolute;
  inset-inline: 0;
  height: 22vh;
  pointer-events: none;
  z-index: 2;
}

.stage-fade--top {
  top: 0;
  background: linear-gradient(180deg, rgba(3, 4, 6, 0.78), rgba(3, 4, 6, 0));
}

.stage-fade--bottom {
  bottom: 0;
  background: linear-gradient(180deg, rgba(3, 4, 6, 0), rgba(3, 4, 6, 0.82));
}

.scrolly__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(2, 3, 4, 0.68) 0%, rgba(2, 3, 4, 0.16) 36%, rgba(2, 3, 4, 0.1) 100%);
  z-index: 1;
  pointer-events: none;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(20px, 3vw, 36px);
  pointer-events: none;
}

.overlay__meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: start;
  width: fit-content;
  color: var(--soft);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.overlay__divider {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.overlay__copy {
  display: flex;
  align-items: center;
  padding-bottom: clamp(72px, 10vh, 128px);
}

.copy-block {
  width: min(760px, 100%);
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease,
    margin 0.6s ease;
}

.copy-block.is-active {
  opacity: 1;
  transform: translateY(0);
}

.copy-block.align-left {
  margin-right: auto;
}

.copy-block.align-right {
  margin-left: auto;
  text-align: right;
}

.copy-block h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.2rem, 6.2vw, 5.8rem);
  line-height: 0.92;
  font-weight: 800;
  max-width: 10ch;
  text-wrap: balance;
}

.copy-block p:last-child {
  width: min(520px, 100%);
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.copy-block.align-right p:last-child {
  margin-left: auto;
}

.overlay__chapters {
  display: flex;
  align-items: center;
  gap: 18px;
  align-self: end;
  margin-bottom: 64px;
  color: rgba(245, 247, 250, 0.42);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.overlay__chapter {
  position: relative;
  padding-left: 14px;
  transition: color 0.45s ease, opacity 0.45s ease;
}

.overlay__chapter::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%);
  transition: background 0.45s ease, box-shadow 0.45s ease;
}

.overlay__chapter.is-active {
  color: rgba(245, 247, 250, 0.96);
}

.overlay__chapter.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(214, 185, 138, 0.12);
}

.overlay__hint {
  align-self: end;
  width: fit-content;
  color: var(--soft);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.overlay__hint span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.overlay__hint span::after {
  content: "";
  width: 38px;
  height: 1px;
  background: rgba(255, 255, 255, 0.24);
}

.no-js {
  min-height: 100svh;
  background: #040507;
  color: var(--text);
}

.no-js__hero,
.no-js__grid {
  display: grid;
}

.no-js__hero {
  gap: 24px;
  padding: 24px;
}

.no-js__hero img,
.no-js__grid img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.no-js__copy h1 {
  margin: 12px 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 0.98;
}

.no-js__copy p:first-child {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.75rem;
}

.no-js__copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.no-js__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0 24px 24px;
}

@media (max-width: 900px) {
  .overlay__copy {
    padding-bottom: clamp(110px, 16vh, 148px);
  }

  .copy-block h2,
  .outro h2 {
    max-width: 9ch;
  }

  .overlay__chapters {
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 84px;
  }
}

@media (max-width: 680px) {
  .outro {
    min-height: 18svh;
  }

  .outro--inline {
    margin-top: -18svh;
    min-height: 18svh;
  }

  .overlay {
    padding: 18px;
  }

  .overlay__copy {
    align-items: end;
    padding-bottom: 128px;
  }

  .copy-block h2 {
    font-size: clamp(2rem, 10vw, 3.4rem);
    max-width: 8.5ch;
  }

  .copy-block.align-right,
  .copy-block.align-left {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
  }

  .copy-block.align-right p:last-child {
    margin-left: 0;
  }

  .copy-block p:last-child,
  .outro__body {
    font-size: 0.98rem;
  }

  .overlay__chapters {
    margin-bottom: 90px;
    gap: 10px 16px;
    font-size: 0.72rem;
  }

  .no-js__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .copy-block,
  .loader,
  .loader__meter-fill,
  .progress__bar {
    transition: none;
  }
}
