:root {
  --paper: #f3f0e9;
  --ink: #071016;
  --muted: rgba(243, 240, 233, 0.62);
  --line: rgba(243, 240, 233, 0.24);
  --accent: #e4b06a;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--ink);
  color: var(--paper);
}

html {
  overflow: hidden;
}

body {
  font-family: "Helvetica Neue", "Neue Haas Grotesk", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

.experience {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  isolation: isolate;
  background: #081117;
  --mx: 0;
  --my: 0;
}

.scene-layer,
.scene-wash,
.grain,
.scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-layer {
  z-index: -5;
  background-position: center;
  background-size: cover;
  transform: scale(1.04) translate(calc(var(--mx) * -0.35%), calc(var(--my) * -0.35%));
  transition:
    opacity 1.35s var(--ease),
    transform 8s ease-out,
    filter 1.35s ease;
  will-change: opacity, transform;
}

.scene-layer--a {
  opacity: 1;
}

.scene-layer--b {
  opacity: 0;
}

.scene-layer.is-entering {
  transform: scale(1.11) translate(calc(var(--mx) * -0.2%), calc(var(--my) * -0.2%));
  filter: blur(7px);
}

.scene-wash {
  z-index: -4;
  background:
    linear-gradient(90deg, rgba(2, 8, 12, 0.82) 0%, rgba(3, 9, 13, 0.57) 36%, rgba(3, 8, 10, 0.08) 70%),
    linear-gradient(0deg, rgba(2, 7, 10, 0.76) 0%, transparent 42%, rgba(1, 5, 8, 0.22) 100%);
  transition: background 1s ease;
}

.experience[data-tone="light"] .scene-wash {
  background:
    linear-gradient(90deg, rgba(21, 17, 11, 0.7) 0%, rgba(37, 29, 18, 0.36) 42%, rgba(40, 29, 18, 0.03) 72%),
    linear-gradient(0deg, rgba(23, 16, 9, 0.56) 0%, transparent 50%, rgba(23, 16, 9, 0.1) 100%);
}

.grain {
  z-index: 20;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.62'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  animation: grain 0.32s steps(2) infinite;
}

.scanline {
  z-index: 19;
  height: 22%;
  top: -25%;
  opacity: 0.08;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: scan 9s linear infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 2%); }
  50% { transform: translate(2%, -1%); }
  75% { transform: translate(1%, 2%); }
  100% { transform: translate(-1%, -2%); }
}

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

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  padding: 28px 34px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wordmark {
  justify-self: start;
  color: var(--paper);
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: none;
}

.wordmark span {
  display: block;
}

.wordmark span:last-child {
  font-style: italic;
}

.now-clock {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.now-clock strong {
  color: var(--paper);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.live-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(228, 176, 106, 0.5);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(228, 176, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(228, 176, 106, 0); }
}

.branding-credit {
  justify-self: end;
  color: rgba(255, 253, 247, 0.94);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.branding-credit:hover,
.branding-credit:focus-visible {
  color: var(--paper);
}

.scene-copy {
  position: absolute;
  z-index: 4;
  left: clamp(28px, 7vw, 112px);
  top: 50%;
  width: min(760px, 63vw);
  transform: translateY(-49%);
}

.scene-kicker {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 24px;
  color: rgba(243, 240, 233, 0.72);
  font-size: 10px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.hairline {
  width: 44px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.scene-copy h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 6.5vw, 106px);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.065em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.22);
}

.scene-copy h1 span,
.scene-copy h1 em {
  display: block;
  will-change: transform, opacity;
}

.scene-copy h1 em {
  color: var(--accent);
  font-weight: 400;
  transition: color 0.9s ease;
}

.scene-copy.is-changing h1 span,
.scene-copy.is-changing h1 em,
.scene-copy.is-changing .scene-kicker,
.scene-copy.is-changing .scene-foot {
  opacity: 0;
  transform: translateY(28px);
}

.scene-copy h1 span,
.scene-copy h1 em,
.scene-kicker,
.scene-foot {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.scene-copy h1 span:nth-child(2) { transition-delay: 0.05s; }
.scene-copy h1 em { transition-delay: 0.1s; }

.scene-foot {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  gap: 44px;
  align-items: end;
  max-width: 720px;
  margin-top: 32px;
}

.scene-foot p {
  max-width: 320px;
  margin: 0;
  color: rgba(243, 240, 233, 0.75);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.5;
}

.coordinate {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.coordinate span:last-child {
  color: var(--paper);
}

.worldline {
  position: absolute;
  z-index: 6;
  top: 50%;
  right: 34px;
  width: 220px;
  transform: translateY(-50%);
}

.worldline-heading {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.scene-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.scene-list button {
  position: relative;
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: rgba(243, 240, 233, 0.48);
  text-align: left;
  cursor: pointer;
  transition: color 0.35s ease, padding 0.35s var(--ease);
}

.scene-list button::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 3px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  transform: scale(0);
  transition: transform 0.35s var(--ease), background 0.35s ease;
}

.scene-list button:hover,
.scene-list button.is-active {
  padding-left: 14px;
  color: var(--paper);
}

.scene-list button.is-active::before {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1);
}

.scene-list .list-time {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.scene-list .list-place {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}

.scene-list .list-place small {
  font-family: Arial, sans-serif;
  font-size: 7px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scene-list .list-phase {
  font-size: 10px;
}

.telemetry {
  position: absolute;
  z-index: 5;
  bottom: 30px;
  left: 34px;
  display: grid;
  grid-template-columns: repeat(3, auto) minmax(170px, 230px);
  align-items: end;
  gap: clamp(22px, 3vw, 52px);
}

.telemetry div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.telemetry span,
.telemetry p {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.telemetry strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 400;
}

.telemetry p {
  margin: 0 0 1px;
  line-height: 1.45;
}

.transport {
  position: absolute;
  z-index: 7;
  right: 34px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.round-button,
.pause-button {
  height: 38px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 14, 0.12);
  color: var(--paper);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border 0.25s ease;
}

.round-button:hover,
.pause-button:hover {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.round-button {
  width: 38px;
  border-radius: 50%;
}

.pause-button {
  min-width: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 17px;
  border-radius: 99px;
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.progress-track {
  position: absolute;
  z-index: 7;
  right: 34px;
  bottom: 15px;
  width: 220px;
  height: 1px;
  background: var(--line);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--paper);
}

.drag-cue {
  position: absolute;
  z-index: 5;
  bottom: 29px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.drag-cue i {
  width: 28px;
  height: 1px;
  overflow: hidden;
  background: var(--line);
}

.intro {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(37, 66, 76, 0.8), transparent 29%),
    radial-gradient(circle at 50% 53%, #162832 0%, #09151c 37%, #050a0e 75%);
  transition: opacity 1s var(--ease), visibility 1s;
}

.intro.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro::before {
  position: absolute;
  width: min(51vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(187, 213, 210, 0.18), transparent 4%),
    radial-gradient(circle at 62% 70%, rgba(188, 213, 203, 0.09), transparent 14%),
    linear-gradient(145deg, rgba(121, 153, 156, 0.18), rgba(5, 14, 20, 0.65));
  box-shadow:
    inset -60px -20px 100px rgba(0, 0, 0, 0.52),
    0 0 100px rgba(105, 155, 160, 0.14);
  content: "";
  filter: blur(0.2px);
  animation: planet 22s linear infinite;
}

@keyframes planet {
  to { transform: rotate(360deg); }
}

.intro-orbit {
  position: absolute;
  width: min(70vw, 930px);
  aspect-ratio: 1.65;
  border: 1px solid rgba(243, 240, 233, 0.11);
  border-radius: 50%;
  transform: rotate(-13deg);
}

.intro-orbit--two {
  width: min(84vw, 1140px);
  transform: rotate(19deg);
}

.intro-content {
  position: relative;
  width: min(740px, 78vw);
  text-align: center;
}

.intro-eyebrow {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.intro h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(68px, 10vw, 154px);
  font-weight: 400;
  line-height: 0.73;
  letter-spacing: -0.07em;
  text-shadow: 0 7px 40px rgba(0, 0, 0, 0.52);
}

.intro h2 em {
  color: var(--accent);
  font-weight: 400;
}

.intro-content > p:not(.intro-eyebrow) {
  max-width: 410px;
  margin: 38px auto 27px;
  color: rgba(243, 240, 233, 0.7);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.55;
}

.enter-button {
  width: 206px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0 18px;
  border: 1px solid #dc7440;
  border-radius: 999px;
  background: #dc7440;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.35s var(--ease),
    box-shadow 0.35s ease;
}

.enter-button:hover,
.enter-button:focus-visible {
  border-color: #f0915c;
  background: #f0915c;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
  color: #fff;
  transform: translateY(-2px);
}

.intro-time {
  position: absolute;
  right: 32px;
  bottom: 28px;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: 0.14em;
  text-align: right;
  text-transform: uppercase;
}

.transition-title {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 8, 11, 0.18);
  color: rgba(243, 240, 233, 0.88);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(70px, 15vw, 230px);
  font-style: italic;
  letter-spacing: -0.08em;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.93);
  transition: opacity 0.5s ease, transform 0.8s var(--ease);
}

.transition-title.is-visible {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 940px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 22px 22px;
  }

  .now-clock {
    display: none;
  }

  .scene-copy {
    left: 24px;
    top: 44%;
    width: calc(100vw - 48px);
  }

  .scene-copy h1 {
    max-width: 680px;
    font-size: clamp(50px, 10vw, 86px);
  }

  .worldline {
    top: auto;
    right: 22px;
    bottom: 93px;
    width: 210px;
    transform: none;
  }

  .worldline-heading {
    display: none;
  }

  .scene-list {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
  }

  .scene-list button {
    width: 9px;
    min-height: 9px;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(243, 240, 233, 0.6);
    border-radius: 50%;
    font-size: 0;
  }

  .scene-list button:hover,
  .scene-list button.is-active {
    width: 28px;
    padding: 0;
    border-radius: 99px;
    background: var(--paper);
  }

  .scene-list button::before {
    display: none;
  }

  .telemetry {
    right: 22px;
    bottom: 25px;
    left: 22px;
    grid-template-columns: repeat(3, auto);
  }

  .telemetry p,
  .drag-cue {
    display: none;
  }

  .transport {
    right: 22px;
    bottom: 43px;
  }

  .pause-button {
    display: none;
  }

  .progress-track {
    right: 22px;
    bottom: 25px;
    width: 86px;
  }
}

@media (max-width: 620px) {
  .experience {
    min-height: 540px;
  }

  .scene-layer {
    background-position: 61% center;
  }

  .scene-wash,
  .experience[data-tone="light"] .scene-wash {
    background:
      linear-gradient(0deg, rgba(2, 7, 10, 0.9) 0%, rgba(3, 8, 11, 0.38) 64%, rgba(2, 6, 9, 0.37) 100%),
      linear-gradient(90deg, rgba(2, 7, 10, 0.46), transparent);
  }

  .topbar {
    padding: 19px;
  }

  .scene-copy {
    left: 19px;
    top: 43%;
    width: calc(100vw - 38px);
    transform: translateY(-43%);
  }

  .scene-kicker {
    margin-bottom: 17px;
  }

  .scene-copy h1 {
    max-width: 94vw;
    font-size: clamp(48px, 15vw, 72px);
    line-height: 0.88;
  }

  .scene-foot {
    display: block;
    margin-top: 24px;
  }

  .coordinate {
    display: none;
  }

  .scene-foot p {
    max-width: 260px;
    font-size: 14px;
  }

  .worldline {
    right: 18px;
    bottom: 90px;
  }

  .telemetry {
    bottom: 23px;
    left: 19px;
    gap: 20px;
  }

  .telemetry div:nth-child(3) {
    display: none;
  }

  .telemetry strong {
    font-size: 13px;
  }

  .transport {
    right: 19px;
    bottom: 39px;
  }

  .progress-track {
    right: 19px;
    bottom: 22px;
  }

  .intro-content {
    width: 90vw;
  }

  .intro::before {
    width: 86vw;
  }

  .intro h2 {
    font-size: clamp(62px, 21vw, 100px);
    line-height: 0.78;
  }

  .intro-time {
    right: auto;
    bottom: 20px;
    left: 20px;
    text-align: left;
  }
}

@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;
  }
}
