:root {
  --ink: #05060a;
  --cream: #fff3c7;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--ink);
  color: var(--cream);
  font-family: "Courier New", monospace;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #07080d;
  transition:
    filter 900ms ease,
    transform 1100ms cubic-bezier(0.2, 0.9, 0.1, 1);
  transform-origin: 50% 50%;
}

body.intro-active #scene {
  filter: blur(6px) brightness(0.62) saturate(0.82);
  transform: scale(1.035);
}

body.intro-warp #scene {
  filter: blur(2px) brightness(1.08) saturate(1.3);
  transform: scale(1.012);
}

body.experience-ready #scene {
  filter: none;
  transform: none;
}

.crt-noise {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.18;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 50% 52%, transparent 0 48%, rgba(0, 0, 0, 0.56) 83%);
  mix-blend-mode: screen;
}

.brand {
  position: fixed;
  top: 22px;
  left: 24px;
  z-index: 5;
  width: 86px;
  height: 86px;
  padding: 7px;
  border: 1px solid rgba(109, 252, 255, 0.32);
  background: rgba(0, 0, 0, 0.34);
  box-shadow:
    inset 0 0 22px rgba(109, 252, 255, 0.06),
    0 0 24px rgba(0, 0, 0, 0.36);
}

.brand img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 243, 199, 0.32));
}

.launch-actions {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Courier New", monospace;
}

.x-button,
.ca-copy {
  min-height: 42px;
  border: 1px solid rgba(109, 252, 255, 0.48);
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 243, 199, 0.92);
  box-shadow:
    inset 0 0 18px rgba(109, 252, 255, 0.08),
    0 0 22px rgba(0, 0, 0, 0.36);
  text-shadow: 0 0 12px rgba(109, 252, 255, 0.35);
}

.x-button {
  display: grid;
  place-items: center;
  width: 46px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.ca-copy {
  display: grid;
  grid-template-columns: auto minmax(92px, auto) auto;
  align-items: center;
  gap: 10px;
  max-width: min(430px, calc(100vw - 130px));
  padding: 0 12px;
  font: inherit;
  cursor: pointer;
}

.ca-label,
.ca-state {
  color: #7dfcff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
}

.ca-state {
  color: rgba(255, 243, 199, 0.78);
}

.ca-copy code {
  overflow: hidden;
  color: rgba(255, 243, 199, 0.92);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-button:hover,
.ca-copy:hover,
.ca-copy.copied {
  border-color: rgba(112, 255, 130, 0.82);
  background: rgba(7, 30, 22, 0.66);
  color: #ffffff;
}

.zoom-hint {
  position: fixed;
  right: 30px;
  bottom: 18px;
  z-index: 6;
  padding: 9px 12px;
  border: 1px solid rgba(109, 252, 255, 0.52);
  background: rgba(5, 6, 10, 0.56);
  color: rgba(255, 243, 199, 0.82);
  font-size: 10px;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(109, 252, 255, 0.45);
  box-shadow:
    inset 0 0 18px rgba(109, 252, 255, 0.08),
    0 0 18px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

body.intro-active .brand,
body.intro-active .launch-actions,
body.intro-active .zoom-hint {
  opacity: 0.28;
  transition: opacity 500ms ease;
}

body.experience-ready .brand,
body.experience-ready .launch-actions,
body.experience-ready .zoom-hint {
  opacity: 1;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: auto;
  background:
    radial-gradient(circle at 50% 52%, rgba(109, 252, 255, 0.12), transparent 24%),
    radial-gradient(circle at 50% 50%, transparent 0 42%, rgba(0, 0, 0, 0.68) 84%);
  transition:
    opacity 900ms ease,
    transform 1200ms cubic-bezier(0.2, 0.9, 0.1, 1);
}

body.experience-ready .intro-overlay {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
}

.intro-panel {
  position: relative;
  width: min(560px, calc(100vw - 44px));
  padding: 30px 32px 28px;
  border: 1px solid rgba(109, 252, 255, 0.62);
  background:
    linear-gradient(180deg, rgba(4, 7, 12, 0.82), rgba(5, 6, 10, 0.64)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 5px);
  box-shadow:
    inset 0 0 34px rgba(109, 252, 255, 0.08),
    0 0 42px rgba(109, 252, 255, 0.14),
    0 0 80px rgba(255, 75, 216, 0.12);
  text-align: center;
  text-shadow: 0 0 14px rgba(255, 243, 199, 0.5);
  transform: translateY(0) scale(1);
  transition:
    opacity 500ms ease,
    transform 900ms cubic-bezier(0.2, 0.9, 0.1, 1),
    filter 600ms ease;
}

.intro-panel-minimal {
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.intro-warp .intro-panel {
  opacity: 0;
  filter: blur(9px);
  transform: translateY(18px) scale(0.86);
}

.intro-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: rgba(109, 252, 255, 0.9);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.intro-panel h1 {
  margin: 0;
  color: var(--cream);
  font-size: clamp(28px, 5vw, 54px);
  line-height: 0.98;
  letter-spacing: -1px;
}

.intro-panel p {
  max-width: 430px;
  margin: 18px auto 24px;
  color: rgba(255, 243, 199, 0.78);
  font-size: 13px;
  line-height: 1.6;
}

#start-experience {
  appearance: none;
  border: 1px solid rgba(255, 243, 199, 0.85);
  padding: 13px 34px;
  background: rgba(255, 243, 199, 0.92);
  color: #07080d;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow:
    0 0 18px rgba(255, 243, 199, 0.24),
    0 0 34px rgba(109, 252, 255, 0.18);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

#start-experience:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow:
    0 0 24px rgba(255, 243, 199, 0.36),
    0 0 48px rgba(109, 252, 255, 0.24);
}

#start-experience:disabled {
  cursor: wait;
}

.warp-lines {
  position: absolute;
  inset: -25%;
  opacity: 0;
  pointer-events: none;
  background:
    repeating-conic-gradient(
      from 0deg at 50% 50%,
      transparent 0deg 7deg,
      rgba(109, 252, 255, 0.22) 8deg 9deg,
      transparent 10deg 18deg,
      rgba(255, 75, 216, 0.18) 19deg 20deg,
      transparent 21deg 36deg
    );
  mask-image: radial-gradient(circle at 50% 50%, transparent 0 19%, #000 20% 68%, transparent 72%);
}

body.intro-warp .warp-lines {
  opacity: 0.75;
  animation: warpSpin 1050ms linear infinite;
}

@keyframes warpSpin {
  from {
    transform: scale(0.85) rotate(0deg);
  }

  to {
    transform: scale(1.35) rotate(34deg);
  }
}

@media (max-width: 680px) {
  .brand {
    top: 14px;
    left: 14px;
    width: 68px;
    height: 68px;
  }

  .launch-actions {
    top: 14px;
    right: 14px;
    gap: 8px;
  }

  .x-button {
    width: 40px;
    min-height: 38px;
  }

  .ca-copy {
    grid-template-columns: auto auto;
    max-width: calc(100vw - 86px);
    min-height: 38px;
    padding: 0 9px;
  }

  .ca-copy code {
    max-width: 106px;
  }

  .ca-state {
    display: none;
  }

  .zoom-hint {
    left: 18px;
    right: 18px;
    bottom: 14px;
    text-align: center;
  }

  .intro-panel {
    padding: 24px 20px 22px;
  }
}
