:root {
  /* DESIGN FONT TOKENS: IBM Plex Mono** timestamps Space Grotesk** labels */
  --frost-white: #F4FCFF;
  --ice-blue: #BFEFFF;
  --crystal-violet: #9F8CFF;
  --signal-coral: #FF6F61;
  --broadcast-cyan: #00C8E8;
  --lemon-accord: #FFE76A;
  --deep-navy: #17213A;
  --glass: rgba(244,252,255,.62);
  --glass-strong: rgba(244,252,255,.78);
  --chapter-accent: #00C8E8;
  --prism-width: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--deep-navy);
  background: var(--frost-white);
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

body.chapter-translation { --chapter-accent: #9F8CFF; }
body.chapter-exchange { --chapter-accent: #FF6F61; }
body.chapter-accord { --chapter-accent: #FFE76A; }

.broadcast-frame {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.scanlines {
  position: absolute;
  inset: 0;
  opacity: .17;
  background: repeating-linear-gradient(0deg, transparent 0 7px, rgba(0,200,232,.35) 8px, transparent 10px);
}

.static-snow {
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image:
    radial-gradient(circle at 12% 19%, rgba(255,255,255,.85) 0 1px, transparent 1.8px),
    radial-gradient(circle at 61% 43%, rgba(23,33,58,.28) 0 1px, transparent 1.6px),
    radial-gradient(circle at 82% 72%, rgba(0,200,232,.44) 0 1px, transparent 1.7px),
    radial-gradient(circle at 35% 84%, rgba(159,140,255,.35) 0 1px, transparent 1.7px);
  background-size: 94px 94px, 133px 133px, 111px 111px, 77px 77px;
  animation: snowDrift 7s steps(5) infinite;
}

.calibration-bars {
  position: fixed;
  top: 24px;
  right: 28px;
  display: flex;
  width: 150px;
  height: 16px;
  border: 1px solid rgba(244,252,255,.82);
  box-shadow: 0 0 24px rgba(191,239,255,.6);
}

.calibration-bars span { flex: 1; }
.calibration-bars span:nth-child(1) { background: #BFEFFF; }
.calibration-bars span:nth-child(2) { background: #9F8CFF; }
.calibration-bars span:nth-child(3) { background: #FFE76A; }
.calibration-bars span:nth-child(4) { background: #FF6F61; }
.calibration-bars span:nth-child(5) { background: #00C8E8; }

.ticker-shell {
  position: fixed;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(180px, 310px) 1fr;
  border: 1px solid rgba(244,252,255,.8);
  background: rgba(244,252,255,.54);
  backdrop-filter: blur(17px);
  box-shadow: 0 16px 52px rgba(23,33,58,.12), inset 0 0 28px rgba(191,239,255,.42);
  overflow: hidden;
}

.ticker-label,
.ticker-copy,
.mono-stamp {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
}

.ticker-label {
  padding: 12px 14px;
  font-size: 11px;
  color: var(--frost-white);
  background: var(--deep-navy);
}

.ticker-track {
  overflow: hidden;
  border-left: 1px solid rgba(23,33,58,.18);
  white-space: nowrap;
}

.ticker-copy {
  display: inline-block;
  padding: 12px 0;
  min-width: 100%;
  color: var(--deep-navy);
  font-size: 12px;
  animation: tickerMove 20s linear infinite;
  text-shadow: 1px 0 #00C8E8, -1px 0 #FF6F61;
}

.negotiation-stage {
  position: relative;
  min-height: 400vh;
  isolation: isolate;
}

.hemisphere {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 50vw;
  z-index: 0;
  transition: filter .8s ease, transform .8s ease, background .8s ease;
}

.left-field {
  left: 0;
  background:
    linear-gradient(135deg, rgba(244,252,255,.55), rgba(191,239,255,.72), rgba(255,231,106,.18)),
    repeating-linear-gradient(90deg, rgba(244,252,255,.25) 0 2px, transparent 2px 34px);
}

.right-field {
  right: 0;
  background:
    linear-gradient(225deg, rgba(244,252,255,.55), rgba(159,140,255,.48), rgba(255,111,97,.14)),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(244,252,255,.24) 26px 28px);
}

body.chapter-translation .left-field { transform: translateX(-1.2vw); filter: hue-rotate(8deg) saturate(1.05); }
body.chapter-translation .right-field { transform: translateX(1.2vw); }
body.chapter-exchange .left-field { background: linear-gradient(135deg, rgba(191,239,255,.62), rgba(255,111,97,.18), rgba(244,252,255,.58)); }
body.chapter-exchange .right-field { background: linear-gradient(225deg, rgba(159,140,255,.45), rgba(255,111,97,.2), rgba(244,252,255,.6)); }
body.chapter-accord .left-field,
body.chapter-accord .right-field { filter: saturate(1.18) brightness(1.03); }

.center-prism {
  position: fixed;
  top: 0;
  left: 50%;
  width: var(--prism-width);
  height: 100vh;
  transform: translateX(-50%);
  z-index: 15;
  display: grid;
  place-items: center;
  transition: width .9s cubic-bezier(.2,.8,.2,1), filter .8s ease;
}

.prism-core {
  position: absolute;
  inset: 0 10px;
  background:
    linear-gradient(135deg, rgba(244,252,255,.92), rgba(191,239,255,.72), rgba(159,140,255,.34), rgba(255,231,106,.25)),
    repeating-linear-gradient(180deg, rgba(255,255,255,.32) 0 18px, transparent 18px 39px);
  clip-path: polygon(50% 0, 100% 11%, 74% 50%, 100% 89%, 50% 100%, 0 89%, 26% 50%, 0 11%);
  border-left: 1px solid rgba(244,252,255,.86);
  border-right: 1px solid rgba(244,252,255,.86);
  box-shadow: 0 0 34px rgba(191,239,255,.9), 0 0 80px rgba(159,140,255,.34);
}

.prism-shard {
  position: absolute;
  border: 1px solid rgba(244,252,255,.86);
  background: linear-gradient(135deg, rgba(191,239,255,.42), rgba(159,140,255,.34), rgba(255,231,106,.22));
  backdrop-filter: blur(8px);
  clip-path: polygon(50% 0, 100% 100%, 0 78%);
  transition: transform .9s cubic-bezier(.2,.8,.2,1), opacity .8s ease;
}

.shard-one { width: 94px; height: 170px; top: 13%; transform: rotate(-17deg) translateX(-28px); }
.shard-two { width: 76px; height: 132px; top: 45%; transform: rotate(18deg) translateX(30px); }
.shard-three { width: 86px; height: 150px; bottom: 10%; transform: rotate(-7deg) translateX(-20px); }

.domain-dot {
  position: relative;
  z-index: 3;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #FFE76A;
  color: #17213A;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 24px;
  letter-spacing: .03em;
  box-shadow: 0 0 0 10px rgba(255,231,106,.18), 0 0 45px rgba(255,231,106,.8);
  transition: transform .8s ease, background .8s ease;
}

body.chapter-translation .center-prism { width: 116px; }
body.chapter-exchange .center-prism { width: 92px; filter: drop-shadow(0 0 22px rgba(255,111,97,.5)); }
body.chapter-accord .center-prism { width: 148px; filter: drop-shadow(0 0 46px rgba(255,231,106,.85)); }
body.chapter-translation .shard-one { transform: rotate(5deg) translateX(-45px); }
body.chapter-translation .shard-two { transform: rotate(-4deg) translateX(42px); }
body.chapter-exchange .shard-one { transform: rotate(22deg) translateX(-18px); }
body.chapter-exchange .shard-two { transform: rotate(-18deg) translateX(25px); }
body.chapter-accord .shard-one,
body.chapter-accord .shard-two,
body.chapter-accord .shard-three { transform: rotate(0deg) translateX(0); opacity: .72; }
body.chapter-accord .domain-dot { transform: scale(1.2); }

.chapter-panel {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 8vh 6vw 12vh;
}

.split-content {
  position: relative;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  transition: transform .9s cubic-bezier(.2,.8,.2,1), opacity .7s ease, filter .8s ease;
}

.left-copy { padding-right: calc(var(--prism-width) + 3vw); align-items: flex-start; }
.right-copy { padding-left: calc(var(--prism-width) + 3vw); align-items: flex-end; text-align: right; }
.chapter-panel:not(.is-active) .split-content { opacity: .42; filter: blur(1px); }
.chapter-panel.is-active .left-copy { transform: translateX(0); }
.chapter-panel.is-active .right-copy { transform: translateX(0); }
.chapter-panel:not(.is-active) .left-copy { transform: translateX(-4vw); }
.chapter-panel:not(.is-active) .right-copy { transform: translateX(4vw); }
.chapter-panel.is-active .delayed { transition-delay: .16s; }

.eyebrow {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(23,33,58,.72);
  padding: 8px 12px;
  border: 1px solid rgba(244,252,255,.82);
  background: rgba(244,252,255,.45);
  backdrop-filter: blur(9px);
}

.split-title,
.chapter-title {
  margin: 0;
  font-family: "Bebas Neue", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-weight: 400;
  line-height: .78;
  letter-spacing: -.035em;
  color: #17213A;
  text-transform: uppercase;
}

.split-title {
  font-size: clamp(7rem, 20vw, 24rem);
  text-shadow: 4px 0 #00C8E8, -5px 0 #FF6F61, 0 18px 44px rgba(23,33,58,.12);
  max-width: 46vw;
  overflow: hidden;
}

.chapter-title {
  font-size: clamp(5.5rem, 13vw, 17rem);
  text-shadow: 3px 0 rgba(0,200,232,.7), -4px 0 rgba(255,111,97,.64);
}

.mirror { color: rgba(23,33,58,.92); }

.glitch-word.is-glitching {
  animation: brightGlitch .54s steps(2) both;
}

.frost-dossier,
.poster-block,
.summit-note,
.open-channel {
  border: 1px solid rgba(244,252,255,.86);
  background: linear-gradient(135deg, rgba(244,252,255,.7), rgba(191,239,255,.32), rgba(159,140,255,.18));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 58px rgba(23,33,58,.12), inset 0 0 38px rgba(244,252,255,.35);
}

.frost-dossier {
  width: min(430px, 38vw);
  padding: 24px;
  clip-path: polygon(0 0, 88% 0, 100% 18%, 100% 100%, 8% 100%, 0 88%);
}

.frost-dossier p,
.poster-block p,
.summit-note {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.48;
}

.mono-stamp {
  display: block;
  margin-bottom: 16px;
  font-size: 11px;
  color: #00C8E8;
}

.tilted-left { transform: rotate(-2deg); }
.tilted-right { transform: rotate(2deg); }

.accord-lockup {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 20;
  transform: translate(-50%, -50%) scale(.82);
  display: flex;
  align-items: baseline;
  gap: .04em;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(4rem, 12vw, 15rem);
  line-height: .8;
  letter-spacing: -.03em;
  color: #17213A;
  opacity: 0;
  text-shadow: 4px 0 #00C8E8, -4px 0 #FF6F61;
  pointer-events: none;
  transition: opacity .65s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}

.accord-lockup i {
  width: .26em;
  height: .26em;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #FFE76A;
  color: transparent;
  box-shadow: 0 0 56px rgba(255,231,106,.9);
}

.hero.locked .accord-lockup { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.hero.locked .split-title { opacity: .18; }

.poster-block {
  position: relative;
  width: min(520px, 39vw);
  padding: 30px;
  min-height: 280px;
  overflow: hidden;
}

.poster-block::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(23,33,58,.16);
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 80%);
}

.poster-a { clip-path: polygon(0 0, 92% 0, 100% 100%, 9% 100%); }
.poster-b { clip-path: polygon(8% 0, 100% 0, 91% 100%, 0 100%); }
.receiver-icon { font-size: 72px; color: var(--chapter-accent); }
.phrase { font-family: "IBM Plex Mono", monospace; color: #17213A; text-transform: uppercase; letter-spacing: .08em; }

.cable-ribbon {
  width: min(550px, 42vw);
  padding: 13px 16px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: .12em;
  background: #17213A;
  color: #F4FCFF;
  box-shadow: 0 0 0 1px rgba(244,252,255,.7), 0 18px 40px rgba(23,33,58,.18);
}

.ribbon-left { transform: rotate(-2deg); }
.ribbon-right { transform: rotate(2deg); }

.glass-handshake,
.summit-seal {
  width: min(360px, 30vw);
  aspect-ratio: 1;
  position: relative;
  border: 1px solid rgba(244,252,255,.85);
  background: radial-gradient(circle, rgba(255,231,106,.4), rgba(191,239,255,.4), rgba(244,252,255,.32));
  backdrop-filter: blur(15px);
  box-shadow: inset 0 0 70px rgba(244,252,255,.42), 0 22px 60px rgba(23,33,58,.13);
}

.glass-handshake { clip-path: polygon(50% 0, 100% 32%, 80% 100%, 18% 100%, 0 34%); }
.glass-handshake span {
  position: absolute;
  background: rgba(23,33,58,.72);
  height: 26%;
  width: 42%;
  top: 38%;
  clip-path: polygon(0 20%, 80% 0, 100% 54%, 22% 100%);
}
.glass-handshake span:nth-child(1) { left: 12%; transform: rotate(16deg); background: rgba(0,200,232,.72); }
.glass-handshake span:nth-child(2) { right: 12%; transform: scaleX(-1) rotate(16deg); background: rgba(159,140,255,.72); }
.glass-handshake span:nth-child(3) { left: 31%; top: 52%; width: 22%; height: 18%; background: rgba(255,231,106,.82); }
.glass-handshake span:nth-child(4) { right: 31%; top: 31%; width: 20%; height: 18%; background: rgba(255,111,97,.72); }

.summit-seal { border-radius: 50%; }
.summit-seal span {
  position: absolute;
  border: 2px solid rgba(23,33,58,.36);
  border-radius: 50%;
  inset: calc(var(--ring) * 1px);
}
.summit-seal span:nth-child(1) { --ring: 25; border-color: #00C8E8; }
.summit-seal span:nth-child(2) { --ring: 66; border-color: #FF6F61; }
.summit-seal span:nth-child(3) { --ring: 108; border-color: #FFE76A; background: rgba(244,252,255,.36); }

.summit-note {
  width: min(500px, 38vw);
  padding: 22px;
}

.final .chapter-title { color: #17213A; text-shadow: 4px 0 #FFE76A, -4px 0 #00C8E8; }
.treaty-page { background: linear-gradient(135deg, rgba(244,252,255,.82), rgba(255,231,106,.22), rgba(191,239,255,.38)); }

.open-channel {
  display: inline-block;
  padding: 24px 34px;
  color: #17213A;
  text-decoration: none;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: .18em;
  background: linear-gradient(135deg, rgba(255,231,106,.72), rgba(244,252,255,.64));
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
}

.final-seal {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 19;
  width: min(34vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(244,252,255,.9);
  background: radial-gradient(circle, rgba(255,231,106,.82), rgba(191,239,255,.45), rgba(159,140,255,.18));
  box-shadow: 0 0 90px rgba(255,231,106,.7), inset 0 0 60px rgba(244,252,255,.55);
  opacity: 0;
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}

.final.is-active .final-seal { opacity: 1; transform: translate(-50%, -50%) rotate(-4deg); }
.final-seal span { font-family: "Bebas Neue", Impact, sans-serif; font-size: clamp(2rem, 5vw, 5.4rem); }

@keyframes tickerMove {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

@keyframes snowDrift {
  0%, 100% { transform: translate(0,0); }
  20% { transform: translate(2px,-3px); }
  40% { transform: translate(-4px,2px); }
  60% { transform: translate(3px,4px); }
  80% { transform: translate(-2px,-1px); }
}

@keyframes brightGlitch {
  0% { transform: translate(0); text-shadow: 7px 0 #00C8E8, -7px 0 #FF6F61; }
  20% { transform: translate(-9px, 3px) skewX(3deg); clip-path: inset(0 0 18% 0); }
  42% { transform: translate(8px, -2px) skewX(-4deg); clip-path: inset(20% 0 0 0); }
  66% { transform: translate(-4px, 1px); clip-path: inset(6% 0 10% 0); }
  100% { transform: translate(0); clip-path: inset(0); text-shadow: 4px 0 #00C8E8, -5px 0 #FF6F61; }
}

@media (max-width: 840px) {
  :root { --prism-width: 46px; }
  .ticker-shell { grid-template-columns: 1fr; left: 12px; right: 12px; bottom: 12px; }
  .ticker-label { display: none; }
  .chapter-panel { padding: 8vh 5vw 16vh; }
  .split-title { font-size: clamp(4.8rem, 22vw, 9rem); }
  .chapter-title { font-size: clamp(4rem, 18vw, 8rem); }
  .frost-dossier, .poster-block, .summit-note, .cable-ribbon { width: 42vw; }
  .glass-handshake, .summit-seal { width: 34vw; }
  .accord-lockup { font-size: clamp(3.2rem, 14vw, 7rem); }
  .final-seal { width: 44vw; }
}
