:root {
  --bg: #050608;
  --fg: #e9eef5;
  --muted: rgba(233, 238, 245, 0.66);
  --acid: #a8ff5a;
  --danger: #ff3b6b;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  overflow-x: hidden;
}

main {
  scroll-snap-type: y mandatory;
}

.screen {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  scroll-snap-align: start;
}

/* Screen 1 (video) */
.screen--video {
  background: #000;
}

.streamPlayerWrap {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 640px;
  max-height: 480px;
  overflow: hidden;
  background: #000;
  padding: 1.5em;
}

.streamPlayerWrap iframe {
  pointer-events: none;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}


.heroVideo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) saturate(0.9);
}

.videoOverlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(1200px 700px at 50% 30%, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.78)),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.quoteWrap--overlay {
  position: relative;
  z-index: 2;
  padding: 72px 0;
  text-shadow:
    0 2px 24px rgba(0, 0, 0, 0.65),
    0 1px 0 rgba(0, 0, 0, 0.25);
}

/* Unmute / mute button */
.videoSoundToggle {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(233, 238, 245, 0.14);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  color: rgba(233, 238, 245, 0.92);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

.videoSoundToggle:hover {
  border-color: rgba(233, 238, 245, 0.28);
  background: rgba(0, 0, 0, 0.34);
}

.videoSoundToggle:focus-visible {
  outline: 2px solid rgba(168, 255, 90, 0.65);
  outline-offset: 3px;
}

.videoSoundToggle[aria-pressed="true"] {
  border-color: rgba(168, 255, 90, 0.35);
}

/* (scroll hint removed) */

/* Screen 2 (quote) */
.screen--quote {
  background:
    radial-gradient(1200px 900px at 50% 50%, rgba(168, 255, 90, 0.06), rgba(5, 6, 8, 0) 55%),
    linear-gradient(to bottom, rgba(255, 59, 107, 0.06), rgba(5, 6, 8, 0) 45%),
    var(--bg);
}

.quoteWrap {
  width: min(980px, calc(100vw - 48px));
  padding: 64px 0;
}

.quoteLabel,
.addressLabel {
  margin: 0 0 10px 0;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.quote {
  margin: 0;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.18;
  letter-spacing: 0.06em;
  font-size: clamp(28px, 4vw, 52px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45em 0.85em;
  text-align: center; /* harmless fallback */
}

.quoteWordWrap {
  display: inline-block;
  transform: translate(var(--dx, 0px), var(--dy, 0px));
}

/* Deterministic "unaligned" layout (repeats in a fixed pattern) */
.quoteWordWrap:nth-child(6n + 1) {
  --dx: -14px;
  --dy: 6px;
}
.quoteWordWrap:nth-child(6n + 2) {
  --dx: 18px;
  --dy: -3px;
}
.quoteWordWrap:nth-child(6n + 3) {
  --dx: -6px;
  --dy: -9px;
}
.quoteWordWrap:nth-child(6n + 4) {
  --dx: 26px;
  --dy: 8px;
}
.quoteWordWrap:nth-child(6n + 5) {
  --dx: -18px;
  --dy: 2px;
}
.quoteWordWrap:nth-child(6n + 6) {
  --dx: 8px;
  --dy: -6px;
}

.quoteWord {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  will-change: transform, opacity, filter;
}

.quoteWord.is-on {
  opacity: 1;
  transform: translateY(0);
  animation: flickerIn 620ms steps(2, end) both;
}

.quoteWord.is-on::before,
.quoteWord.is-on::after {
  content: attr(data-w);
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0.0;
  pointer-events: none;
}

.quoteWord.is-on {
  position: relative;
}

.quoteWord.is-on::before {
  color: var(--acid);
  transform: translate(-1px, 0);
  animation: ghostA 620ms linear both;
}

.quoteWord.is-on::after {
  color: var(--danger);
  transform: translate(1px, 0);
  animation: ghostB 620ms linear both;
}

@keyframes flickerIn {
  0% {
    opacity: 0;
    filter: blur(6px) contrast(1.2);
    transform: translateY(12px) skewX(6deg);
  }
  24% {
    opacity: 0.85;
    filter: blur(0px) contrast(1.2);
    transform: translateY(0) skewX(-10deg);
  }
  40% {
    opacity: 0.2;
    transform: translateY(0) skewX(18deg);
  }
  55% {
    opacity: 1;
    transform: translateY(0) skewX(0deg);
  }
  100% {
    opacity: 1;
    filter: none;
    transform: translateY(0) skewX(0deg);
  }
}

@keyframes ghostA {
  0% {
    opacity: 0;
  }
  18% {
    opacity: 0.55;
  }
  60% {
    opacity: 0.1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes ghostB {
  0% {
    opacity: 0;
  }
  26% {
    opacity: 0.45;
  }
  52% {
    opacity: 0.12;
  }
  100% {
    opacity: 0;
  }
}

.divider {
  margin: 28px 0 18px;
  height: 1px;
  width: min(520px, 100%);
  background: linear-gradient(to right, rgba(233, 238, 245, 0.12), rgba(233, 238, 245, 0.35), rgba(233, 238, 245, 0.12));
}

.address {
  margin: 0;
  text-align: center;
}

.addressMono {
  display: inline-block;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: rgba(233, 238, 245, 0.86);
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
  margin-top: 3em;
}

@media screen and (min-width: 640px) {
  .streamPlayerWrap {
    margin-top: 6em;
  }
}

@media (prefers-reduced-motion: reduce) {
  main {
    scroll-snap-type: none;
  }
  .quoteWord {
    opacity: 1;
    transform: none;
  }
  .quoteWord.is-on {
    animation: none;
  }
  .quoteWord.is-on::before,
  .quoteWord.is-on::after {
    display: none;
  }
}


