:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  color: #f5f0e8;
  background: #070708;
  font-synthesis: none;
  --ink: #070708;
  --paper: #eee9df;
  --acid: #dcff37;
  --blue: #4d6bff;
  --coral: #ff5c42;
  --line: rgba(245, 240, 232, 0.34);
  --pad: clamp(1.15rem, 3vw, 3rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
}

body,
button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

button {
  font: inherit;
}

.ambient {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-head {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem var(--pad);
  color: #fff;
  background: linear-gradient(to bottom, rgba(7, 7, 8, 0.68), rgba(7, 7, 8, 0));
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.72);
}

.identity,
.site-head nav {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 2vw, 2rem);
}

.identity,
.site-head a,
.eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-head a {
  position: relative;
}

.site-head nav a::after,
.text-link::after {
  position: absolute;
  right: 0;
  bottom: -0.3rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 280ms ease;
}

.site-head nav a:hover::after,
.site-head nav a:focus-visible::after,
.text-link:hover::after,
.text-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
}

.hero::after {
  position: absolute;
  z-index: -1;
  right: -18vw;
  bottom: -30vw;
  width: 70vw;
  height: 70vw;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  content: "";
}

.hero-copy {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: flex-end;
  padding: 7rem var(--pad) var(--pad);
}

.hero .eyebrow {
  position: absolute;
  top: clamp(6rem, 17vh, 9rem);
  left: var(--pad);
}

.hero h1 {
  max-width: 10ch;
  margin: 0 0 clamp(2rem, 5vh, 4rem);
  font-size: clamp(5rem, 15.5vw, 14rem);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 0.69;
  text-transform: uppercase;
}

.hero h1 span {
  display: block;
  transform: translateX(-0.065em);
}

.hero h1 span:last-child {
  margin-left: 0.54em;
  color: var(--acid);
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(14rem, 26rem) auto;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  padding-left: 9vw;
}

.hero-foot p {
  max-width: 28rem;
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  line-height: 1.35;
}

.text-link {
  position: relative;
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  gap: 2rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-orbit {
  position: absolute;
  z-index: -1;
  top: 10vh;
  right: -4vw;
  width: min(47vw, 46rem);
  aspect-ratio: 1;
  opacity: 0.74;
  pointer-events: none;
}

.orbit,
.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit {
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.orbit-a {
  width: 100%;
  height: 42%;
  transform: translate(-50%, -50%) rotate(22deg);
}

.orbit-b {
  width: 72%;
  height: 100%;
  transform: translate(-50%, -50%) rotate(-34deg);
}

.orbit-c {
  width: 58%;
  height: 58%;
  border-style: dashed;
}

.orbit-core {
  width: 11%;
  aspect-ratio: 1;
  background: var(--acid);
  box-shadow: 0 0 6rem 2rem rgba(220, 255, 55, 0.45);
}

.hero-mark {
  position: absolute;
  right: var(--pad);
  bottom: 34%;
  margin: 0;
  font-size: clamp(0.65rem, 1vw, 0.8rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.12em;
  text-align: right;
}

.manifesto {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 110svh;
  flex-direction: column;
  justify-content: center;
  padding: 12vh var(--pad);
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
}

.manifesto p {
  margin: 0;
  font-size: clamp(4rem, 14vw, 13rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.78;
  text-transform: uppercase;
}

.manifesto p:nth-child(2) {
  align-self: center;
  color: var(--blue);
}

.manifesto p:last-child {
  align-self: flex-end;
}

.story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
  color: var(--ink);
  background: var(--paper);
}

.story-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: var(--acid);
  transition: background-color 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.story[data-scene="1"] .story-stage {
  color: #fff;
  background: var(--blue);
}

.story[data-scene="2"] .story-stage {
  background: var(--coral);
}

.stage-grid {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image: linear-gradient(rgba(7, 7, 8, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 7, 8, 0.26) 1px, transparent 1px);
  background-size: 8.333% 8.333%;
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.story[data-scene="1"] .stage-grid {
  transform: rotate(7deg) scale(1.2);
}

.story[data-scene="2"] .stage-grid {
  transform: rotate(-7deg) scale(1.35);
}

.stage-signal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.stage-signal span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(var(--angle));
  transition: width 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.stage-signal span:nth-child(1) { --angle: 0deg; }
.stage-signal span:nth-child(2) { --angle: 60deg; }
.stage-signal span:nth-child(3) { --angle: 120deg; }

.story[data-scene="1"] .stage-signal span {
  width: 135%;
}

.story[data-scene="1"] .stage-signal span:nth-child(1) { --angle: 22deg; }
.story[data-scene="1"] .stage-signal span:nth-child(2) { --angle: 90deg; }
.story[data-scene="1"] .stage-signal span:nth-child(3) { --angle: 158deg; }

.story[data-scene="2"] .stage-signal span {
  width: 46%;
}

.story[data-scene="2"] .stage-signal span:nth-child(1) { --angle: 45deg; }
.story[data-scene="2"] .stage-signal span:nth-child(2) { --angle: 135deg; }
.story[data-scene="2"] .stage-signal span:nth-child(3) { --angle: 180deg; }

.stage-number,
.stage-word,
.stage-caption {
  position: absolute;
  z-index: 2;
  margin: 0;
}

.stage-number {
  top: var(--pad);
  left: var(--pad);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.stage-word {
  top: 50%;
  left: 50%;
  font-size: clamp(4.4rem, 10vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.8;
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(-90deg);
  transition: opacity 180ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.stage-word.is-changing {
  opacity: 0;
  transform: translate(-50%, -42%) rotate(-90deg);
}

.stage-caption {
  right: var(--pad);
  bottom: var(--pad);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: right;
  text-transform: uppercase;
}

.story-copy {
  padding: 18vh var(--pad) 30vh;
}

.story-intro {
  min-height: 76vh;
}

.story-intro h2 {
  max-width: 12ch;
  margin: 2rem 0 0;
  font-size: clamp(2.8rem, 5.3vw, 5.8rem);
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.story-step {
  min-height: 88vh;
  padding: 15vh 0;
  border-top: 1px solid rgba(7, 7, 8, 0.3);
  opacity: 0.25;
  transition: opacity 400ms ease;
}

.story-step.is-active {
  opacity: 1;
}

.story-step > p:first-child {
  margin: 0 0 22vh;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.story-step h3 {
  max-width: 9ch;
  margin: 0 0 1.5rem;
  font-size: clamp(2.8rem, 5vw, 5.4rem);
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.story-step > p:last-child {
  max-width: 30rem;
  margin: 0;
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.45;
}

.states {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  padding: 14vh var(--pad);
  color: var(--paper);
  background: var(--ink);
}

.states-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: 10vh;
}

.states-head h2 {
  margin: 0;
  font-size: clamp(4rem, 9vw, 9.5rem);
  letter-spacing: -0.08em;
  line-height: 0.78;
  text-transform: uppercase;
}

.state-browser {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
  min-height: 44rem;
  border: 1px solid var(--line);
}

.state-preview {
  position: relative;
  min-height: 44rem;
  overflow: hidden;
  color: var(--ink);
  background: var(--acid);
  transition: color 500ms ease, background-color 500ms ease;
}

.state-preview[data-state="compare"] {
  color: #fff;
  background: var(--blue);
}

.state-preview[data-state="resolve"] {
  background: var(--coral);
}

.preview-count,
.preview-note {
  position: absolute;
  z-index: 2;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preview-count {
  top: var(--pad);
  left: var(--pad);
}

.preview-note {
  right: var(--pad);
  bottom: var(--pad);
  max-width: 15rem;
  text-align: right;
}

.preview-word {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  font-size: clamp(4rem, 11vw, 11rem);
  font-weight: 900;
  letter-spacing: -0.09em;
  line-height: 0.75;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease, transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-word.is-changing {
  opacity: 0;
  transform: translate(-50%, -40%);
}

.preview-lines {
  position: absolute;
  inset: 0;
  transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-lines span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130%;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(var(--angle));
  transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-lines span:nth-child(1) { --angle: -18deg; }
.preview-lines span:nth-child(2) { --angle: 0deg; }
.preview-lines span:nth-child(3) { --angle: 18deg; }

.state-preview[data-state="compare"] .preview-lines {
  transform: rotate(90deg) scale(0.72);
}

.state-preview[data-state="resolve"] .preview-lines {
  transform: rotate(45deg) scale(0.46);
}

.state-list {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
}

.state-choice {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  grid-template-rows: auto auto;
  gap: 0.35rem 1rem;
  align-content: center;
  min-height: 9rem;
  padding: 2rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 250ms ease, background-color 250ms ease;
}

.state-choice:last-child {
  border-bottom: 0;
}

.state-choice:hover,
.state-choice:focus-visible,
.state-choice.is-active {
  color: var(--ink);
  background: var(--paper);
}

.state-choice:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: -5px;
}

.state-choice span {
  grid-row: 1 / 3;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.state-choice strong {
  font-size: clamp(1.4rem, 2vw, 2.2rem);
  letter-spacing: -0.04em;
}

.state-choice small {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.close {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: center;
  padding: 12vh var(--pad);
  overflow: hidden;
  color: var(--ink);
  background: var(--acid);
}

.close h2 {
  max-width: 9ch;
  margin: 1.5rem 0 8vh;
  font-size: clamp(4rem, 12vw, 12rem);
  letter-spacing: -0.085em;
  line-height: 0.78;
  text-transform: uppercase;
}

.close-link {
  display: flex;
  width: min(100%, 35rem);
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  font-size: clamp(1rem, 1.8vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.close-link span:last-child {
  font-size: 2rem;
  transition: transform 250ms ease;
}

.close-link:hover span:last-child,
.close-link:focus-visible span:last-child {
  transform: translateY(-0.3rem);
}

.close-link:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 5px;
}

.close-index {
  position: absolute;
  right: var(--pad);
  bottom: var(--pad);
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

@media (max-width: 60rem) {
  .hero-orbit {
    top: 15vh;
    right: -17vw;
    width: 70vw;
  }

  .story {
    grid-template-columns: 46% 54%;
  }

  .stage-word {
    font-size: clamp(3rem, 9vw, 6rem);
  }

  .state-browser {
    grid-template-columns: 1fr;
  }

  .state-list {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
  }

  .state-choice {
    min-height: 10rem;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .state-choice:last-child {
    border-right: 0;
  }
}

@media (max-width: 42rem) {
  .site-head nav a:not(:last-child) {
    display: none;
  }

  .hero-copy {
    justify-content: center;
    padding-top: 9rem;
  }

  .hero .eyebrow {
    top: 7rem;
  }

  .hero h1 {
    margin-top: auto;
    margin-bottom: auto;
    font-size: clamp(4.7rem, 24vw, 7.2rem);
    line-height: 0.74;
  }

  .hero h1 span:last-child {
    margin-left: 0;
  }

  .hero-foot {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-left: 0;
  }

  .hero-orbit {
    top: 26vh;
    right: -50vw;
    width: 120vw;
  }

  .hero-mark {
    display: none;
  }

  .manifesto {
    min-height: 85svh;
  }

  .manifesto p {
    font-size: clamp(3.5rem, 19vw, 6rem);
  }

  .story {
    display: block;
  }

  .story-stage {
    z-index: 3;
    top: 3.6rem;
    height: 42svh;
    min-height: 19rem;
  }

  .stage-number {
    font-size: 4rem;
  }

  .stage-word {
    font-size: clamp(3.2rem, 16vw, 5rem);
  }

  .stage-caption {
    font-size: 0.6rem;
  }

  .story-copy {
    padding: 10vh var(--pad) 12vh;
  }

  .story-intro {
    min-height: 58vh;
  }

  .story-step {
    min-height: 72vh;
    padding: 12vh 0;
  }

  .story-step > p:first-child {
    margin-bottom: 17vh;
  }

  .states {
    padding-top: 11vh;
  }

  .states-head {
    display: block;
  }

  .states-head h2 {
    margin-top: 1.5rem;
    font-size: clamp(3.5rem, 17vw, 5.6rem);
  }

  .state-browser,
  .state-preview {
    min-height: 30rem;
  }

  .state-list {
    display: block;
  }

  .state-choice {
    width: 100%;
    min-height: 7rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .state-choice:last-child {
    border-bottom: 0;
  }

  .close h2 {
    font-size: clamp(4.2rem, 20vw, 7rem);
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
