:root {
  color-scheme: dark;
  --bg: #08090b;
  --paper: #e9e7df;
  --ink: #0b0b0c;
  --ash: #8d8b87;
  --red: #c61b17;
  --line: rgba(235, 232, 222, 0.22);
  --serif: Didot, "Bodoni MT", "Times New Roman", serif;
  --sans: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --heavy: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  font-family: var(--sans);
  color: var(--paper);
  cursor: default;
}

button,
a {
  color: inherit;
}

.app {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 980px;
  min-height: 620px;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 45%, rgba(53, 61, 70, 0.22), transparent 32%),
    linear-gradient(115deg, #0c0d10 0%, #07080a 58%, #0d1116 100%);
}

.paper-noise {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.018) 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
}

.red-rule {
  position: absolute;
  z-index: 5;
  height: 9px;
  width: 22vw;
  background: var(--red);
  transform: skewX(-18deg) scaleX(0.2);
  opacity: 0;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), opacity 350ms ease;
}

.red-rule--top {
  top: 18%;
  left: -2vw;
}

.red-rule--bottom {
  right: -3vw;
  bottom: 15%;
}

.app[data-station="1"] .red-rule,
.app[data-station="4"] .red-rule {
  opacity: 0.92;
  transform: skewX(-18deg) scaleX(1);
}

.masthead {
  position: absolute;
  inset: 28px 34px auto;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  pointer-events: auto;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--paper);
  color: var(--ink);
  font: 900 15px/1 var(--sans);
  letter-spacing: -0.08em;
}

.brand__name,
.edition,
.hud,
.copy-panel__index,
.copy-panel__footer,
.film-shell__label,
.rail__meta {
  font-size: 10px;
  line-height: 1.1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.edition {
  display: flex;
  gap: 38px;
  color: rgba(235, 232, 222, 0.52);
}

.header-tools {
  display: flex;
  gap: 28px;
  align-items: center;
  pointer-events: auto;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  color: rgba(235, 232, 222, 0.58);
  background: transparent;
  font: 700 9px/1 var(--sans);
  letter-spacing: 0.18em;
  cursor: pointer;
}

.sound-toggle__bars {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 15px;
  height: 12px;
}

.sound-toggle__bars i {
  display: block;
  width: 2px;
  height: 3px;
  background: currentColor;
  transition: height 240ms ease, color 240ms ease;
}

.sound-toggle[aria-pressed="true"] {
  color: var(--paper);
}

.sound-toggle[aria-pressed="true"] .sound-toggle__bars i:nth-child(1) {
  animation: sound-bar 620ms ease-in-out infinite alternate;
}

.sound-toggle[aria-pressed="true"] .sound-toggle__bars i:nth-child(2) {
  animation: sound-bar 510ms 80ms ease-in-out infinite alternate-reverse;
}

.sound-toggle[aria-pressed="true"] .sound-toggle__bars i:nth-child(3) {
  animation: sound-bar 720ms 160ms ease-in-out infinite alternate;
}

.spread {
  position: absolute;
  inset: 78px 36px 62px;
  display: grid;
  grid-template-columns: minmax(430px, 1fr) minmax(360px, 0.56fr) 88px;
  gap: clamp(18px, 2.4vw, 48px);
  align-items: stretch;
}

.copy-panel {
  --panel-bg: transparent;
  --panel-ink: var(--paper);
  position: relative;
  min-width: 0;
  padding: clamp(52px, 7vh, 96px) clamp(34px, 5vw, 88px) 38px;
  overflow: hidden;
  color: var(--panel-ink);
  background: var(--panel-bg);
  border: 1px solid var(--line);
  transition: color 650ms ease, background-color 650ms ease, border-color 650ms ease;
}

.app[data-station="1"] .copy-panel {
  --panel-bg: var(--paper);
  --panel-ink: var(--ink);
  border-color: rgba(235, 232, 222, 0.78);
}

.copy-panel::before {
  content: "";
  position: absolute;
  width: 34%;
  height: 130%;
  left: 64%;
  top: -15%;
  opacity: 0.06;
  background: currentColor;
  transform: skewX(-9deg);
  pointer-events: none;
}

.copy-panel__index {
  position: absolute;
  top: 26px;
  left: 30px;
  color: currentColor;
  opacity: 0.55;
}

.copy-panel__content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  animation: copy-in 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.copy-panel__content.is-changing {
  animation: copy-out 220ms ease both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-size: clamp(10px, 0.72vw, 13px);
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 42px;
  height: 2px;
  background: var(--red);
}

.display {
  margin: 0;
  max-width: 100%;
  font-size: clamp(74px, 8.3vw, 164px);
  line-height: 0.76;
  letter-spacing: -0.065em;
  text-transform: uppercase;
  text-wrap: balance;
}

.display--serif {
  font-family: var(--serif);
  font-weight: 400;
}

.display--heavy {
  font-family: var(--heavy);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.chapter-cn {
  margin: 30px 0 0;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: clamp(20px, 1.8vw, 34px);
  font-weight: 300;
  letter-spacing: 0.32em;
}

.chapter-note {
  max-width: 32em;
  margin: 16px 0 0;
  color: currentColor;
  opacity: 0.58;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: clamp(12px, 0.9vw, 16px);
  line-height: 1.8;
  letter-spacing: 0.12em;
}

.brush-block {
  position: absolute;
  z-index: 1;
  right: -4%;
  top: 47%;
  width: 40%;
  height: 15%;
  opacity: 0.14;
  background:
    linear-gradient(91deg, transparent 0 4%, currentColor 7% 88%, transparent 94%),
    repeating-linear-gradient(2deg, transparent 0 3px, currentColor 4px 7px);
  filter: blur(0.2px);
  transform: rotate(-4deg) scaleX(0.72);
  transform-origin: right center;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1), opacity 500ms ease;
}

.app[data-station="3"] .brush-block,
.app[data-station="4"] .brush-block {
  opacity: 0.3;
  transform: rotate(-4deg) scaleX(1.12);
}

.copy-panel__footer {
  position: absolute;
  right: 26px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: right;
  opacity: 0.42;
}

.film-column {
  display: grid;
  min-width: 0;
  place-items: center;
}

.film-shell {
  position: relative;
  height: min(100%, 88vh);
  max-width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #030405;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.62);
  transform: translateZ(0);
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.02) saturate(0.9);
}

.film-shell__frame {
  position: absolute;
  inset: 3.2%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
  transition: inset 800ms cubic-bezier(0.16, 1, 0.3, 1), border-color 600ms ease;
}

.app[data-station="4"] .film-shell__frame {
  inset: 8% 7%;
  border-color: rgba(255, 255, 255, 0.68);
}

.film-shell__scan {
  position: absolute;
  inset: -25% 0 auto;
  height: 22%;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.app.is-playing .film-shell__scan {
  opacity: 0.55;
  animation: scan 1.2s linear infinite;
}

.film-shell__label {
  position: absolute;
  top: 50%;
  color: rgba(255, 255, 255, 0.42);
  writing-mode: vertical-rl;
  pointer-events: none;
}

.film-shell__label--left {
  left: 8px;
  transform: translateY(-50%) rotate(180deg);
}

.film-shell__label--right {
  right: 8px;
  transform: translateY(-50%);
}

.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 12px;
  border-left: 1px solid var(--line);
}

.rail__word {
  font: 400 clamp(42px, 4.3vw, 78px) / 0.8 var(--serif);
  color: rgba(235, 232, 222, 0.13);
  writing-mode: vertical-rl;
}

.progress {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.progress__dot {
  width: 5px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(235, 232, 222, 0.28);
  transition: transform 350ms ease, background-color 350ms ease, box-shadow 350ms ease;
}

.progress__dot.is-active {
  background: var(--red);
  box-shadow: 0 0 14px rgba(198, 27, 23, 0.7);
  transform: scale(2.1);
}

.progress__dot.is-past {
  background: rgba(235, 232, 222, 0.74);
}

.rail__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  color: rgba(235, 232, 222, 0.5);
}

.hud {
  position: absolute;
  z-index: 10;
  inset: auto 34px 22px;
  display: flex;
  justify-content: space-between;
  color: rgba(235, 232, 222, 0.5);
}

.hud__status {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px rgba(198, 27, 23, 0.65);
}

.app.is-playing .status-dot {
  animation: pulse 700ms ease-in-out infinite alternate;
}

.gate {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: start;
  padding-left: 16vw;
  color: var(--ink);
  background: var(--paper);
  transition: clip-path 900ms cubic-bezier(0.76, 0, 0.24, 1), visibility 0s 900ms;
  clip-path: inset(0 0 0 0);
}

.gate.is-hidden {
  visibility: hidden;
  clip-path: inset(0 0 0 100%);
}

.gate__rule {
  width: min(52vw, 760px);
  height: 12px;
  margin-bottom: 22px;
  background: var(--red);
  transform: skewX(-14deg);
}

.gate p {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.42em;
}

.gate h2 {
  margin: 0 0 38px;
  font: 400 clamp(76px, 10vw, 176px) / 0.85 var(--serif);
  letter-spacing: -0.05em;
}

.gate button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 220px;
  padding: 15px 18px;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.24em;
  cursor: pointer;
  transition: color 250ms ease, background-color 250ms ease;
}

.gate button:not(:disabled):hover,
.gate button:not(:disabled):focus-visible {
  color: var(--paper);
  background: var(--ink);
}

.gate button:disabled {
  cursor: wait;
  opacity: 0.42;
}

@keyframes copy-in {
  from { opacity: 0; transform: translateY(28px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes copy-out {
  to { opacity: 0; transform: translateY(-16px); filter: blur(3px); }
}

@keyframes scan {
  to { transform: translateY(620%); }
}

@keyframes pulse {
  to { opacity: 0.3; transform: scale(0.72); }
}

@keyframes sound-bar {
  from { height: 3px; }
  to { height: 11px; }
}

@media (max-width: 1180px) {
  .spread {
    grid-template-columns: minmax(390px, 1fr) minmax(330px, 0.62fr) 58px;
    gap: 18px;
  }

  .copy-panel {
    padding-inline: 38px;
  }

  .display {
    font-size: clamp(68px, 8vw, 108px);
  }
}

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