:root {
  color-scheme: dark;
  --void: #0b0e13;
  --ink: #f6f2e8;
  --muted: #c6d0d6;
  --silver: #d7e2e8;
  --gold: #d8bd7f;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Optima, Candara, "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 5rem);
}

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

html {
  overflow-x: hidden;
  background: var(--void);
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background: var(--void);
  color: var(--ink);
  font-family: var(--serif);
}

video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

#scrollybook,
.film-scroll {
  width: 100%;
  background: var(--void);
}

.film-scroll {
  position: relative;
}

.film-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--void);
}

.film-video {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  background: var(--void);
  visibility: hidden;
  pointer-events: none;
}

.film-video.is-active {
  z-index: 1;
  visibility: visible;
}

.scroll-hint {
  position: fixed;
  z-index: 20;
  top: clamp(1rem, 3vw, 2rem);
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  transform: translateX(-50%);
  color: rgba(246, 242, 232, 0.72);
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 500ms ease, transform 500ms ease;
}

.scroll-hint i {
  position: relative;
  width: 1px;
  height: 2.25rem;
  overflow: hidden;
  background: rgba(246, 242, 232, 0.22);
}

.scroll-hint i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, var(--silver), transparent);
  animation: hint-pulse 1.8s ease-in-out infinite;
}

.scroll-hint.is-hidden {
  opacity: 0;
  transform: translate(-50%, -0.75rem);
}

@keyframes hint-pulse {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

body.is-static .scroll-hint {
  display: none;
}

body.is-static .film-scroll {
  height: auto !important;
}

.still-story {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--void);
}

.still-frame {
  display: block;
  width: 100%;
  height: 100vh;
  height: 100svh;
  object-fit: cover;
  background: var(--void);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
