:root {
  color-scheme: dark;
  --navy-950: #010a14;
  --navy-900: #031426;
  --navy-850: #05203a;
  --navy-800: #06304f;
  --cyan: #00d7d2;
  --cyan-bright: #5ffff8;
  --cyan-soft: rgba(0, 215, 210, 0.18);
  --white: #f7fbff;
  --muted: #a8bed0;
  --door-duration: 1.85s;
  --content-delay: 1.05s;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--navy-950);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--white);
}

button,
img {
  -webkit-user-select: none;
  user-select: none;
}

button {
  font: inherit;
}

.experience {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 42%, rgba(0, 215, 210, 0.10), transparent 28%),
    linear-gradient(145deg, #020d19, #041c31 54%, #020b15);
}

.experience::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle, black 20%, transparent 78%);
}

.reveal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(0, 215, 210, 0.18), transparent 26%),
    radial-gradient(circle at 50% 50%, #073554, #031426 58%, #010913 100%);
}

.reveal::before {
  content: "";
  position: absolute;
  width: min(78vw, 880px);
  aspect-ratio: 1;
  border: 1px solid rgba(0, 215, 210, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 64px rgba(0, 215, 210, 0.025),
    0 0 0 132px rgba(0, 215, 210, 0.018);
  opacity: 0.8;
}

.reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.025), transparent);
  transform: translateX(-100%);
}

.is-open .reveal::after {
  animation: scan-light 4s 1.65s ease-in-out infinite;
}

.reveal-content {
  position: relative;
  z-index: 4;
  width: min(92vw, 1100px);
  padding: 32px;
  text-align: center;
  opacity: 0;
  transform: translateY(26px) scale(0.98);
  filter: blur(8px);
}

.is-open .reveal-content {
  animation: reveal-content 1.15s var(--content-delay) cubic-bezier(.2,.8,.2,1) forwards;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--cyan-bright);
  font-size: clamp(0.72rem, 1.2vw, 0.95rem);
  font-weight: 750;
  letter-spacing: 0.42em;
}

.reveal h1 {
  margin: 0;
  font-size: clamp(2.55rem, 7.4vw, 7.25rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.reveal h1 span {
  display: block;
  margin-top: 0.12em;
  color: transparent;
  background:
    linear-gradient(90deg, #ffffff 5%, #99ffff 48%, #ffffff 95%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 36px rgba(0, 215, 210, 0.15);
}

.tagline {
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.7vw, 1.12rem);
  font-weight: 650;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.brand-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: min(320px, 70vw);
  margin: 28px auto 0;
}

.brand-line span {
  display: block;
  width: 110px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 215, 210, 0.75));
}

.brand-line span:last-child {
  transform: scaleX(-1);
}

.brand-line i {
  display: block;
  width: 8px;
  height: 8px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--cyan);
}

.origin {
  margin: 18px 0 0;
  color: rgba(218, 239, 250, 0.76);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.ambient-map {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.08);
}

.is-open .ambient-map {
  animation: ambient-enter 2.2s 1.15s ease forwards;
}

.route {
  position: absolute;
  display: block;
  width: 42vw;
  height: 26vw;
  min-width: 280px;
  min-height: 170px;
  border: 2px dashed rgba(75, 255, 248, 0.32);
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(0, 215, 210, 0.25));
}

.route-one {
  top: 15%;
  left: 9%;
  transform: rotate(12deg);
}

.route-two {
  right: 5%;
  bottom: 5%;
  transform: rotate(205deg);
}

.place-dot {
  position: absolute;
  width: 9px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #eaffff;
  box-shadow:
    0 0 0 7px rgba(0, 215, 210, 0.12),
    0 0 25px 8px rgba(0, 215, 210, 0.45);
}

.is-open .place-dot {
  animation: point-pulse 2.4s ease-in-out infinite;
}

.dot-one { top: 23%; left: 19%; animation-delay: 1.35s !important; }
.dot-two { top: 31%; right: 22%; animation-delay: 1.7s !important; }
.dot-three { bottom: 24%; left: 28%; animation-delay: 2.05s !important; }
.dot-four { bottom: 18%; right: 19%; animation-delay: 2.4s !important; }
.dot-five { top: 54%; left: 49%; animation-delay: 2.75s !important; }

.doorway {
  position: absolute;
  inset: 0;
  z-index: 10;
  perspective: 1800px;
  perspective-origin: center;
  pointer-events: auto;
}

.door-frame {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  border: clamp(10px, 1.4vw, 22px) solid #020b15;
  box-shadow:
    inset 0 0 0 2px rgba(0, 215, 210, 0.22),
    inset 0 0 90px rgba(0, 215, 210, 0.12);
}

.door {
  position: absolute;
  top: 0;
  width: 50.16%;
  height: 100%;
  overflow: hidden;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
  transition:
    transform var(--door-duration) cubic-bezier(.72,.03,.19,1),
    filter 1.2s ease;
}

.door-left {
  left: 0;
  transform-origin: left center;
}

.door-right {
  right: 0;
  transform-origin: right center;
}

.is-open .door-left {
  transform: rotateY(104deg);
  filter: brightness(0.66);
}

.is-open .door-right {
  transform: rotateY(-104deg);
  filter: brightness(0.66);
}

.door-surface {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(0, 215, 210, 0.10), transparent 24%),
    linear-gradient(145deg, #082e4b, #04182b 44%, #020b15 100%);
  box-shadow:
    inset 0 0 65px rgba(0, 0, 0, 0.65),
    inset 0 0 0 1px rgba(122, 248, 246, 0.14);
}

.door-left .door-surface {
  background:
    radial-gradient(circle at 100% 50%, rgba(0, 215, 210, 0.18), transparent 24%),
    linear-gradient(145deg, #082e4b, #04182b 44%, #020b15 100%);
}

.door-right .door-surface {
  background:
    radial-gradient(circle at 0% 50%, rgba(0, 215, 210, 0.18), transparent 24%),
    linear-gradient(215deg, #082e4b, #04182b 44%, #020b15 100%);
}

.door-grid {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 88px,
      rgba(0, 215, 210, 0.08) 89px,
      transparent 90px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 120px,
      rgba(0, 215, 210, 0.055) 121px,
      transparent 122px
    );
}

.door-grid::before {
  content: "";
  position: absolute;
  width: min(70vw, 900px);
  aspect-ratio: 1;
  top: 50%;
  border: 1px solid rgba(0, 215, 210, 0.14);
  border-radius: 50%;
  transform: translateY(-50%);
}

.door-left .door-grid::before {
  right: -46%;
}

.door-right .door-grid::before {
  left: -46%;
}

.door-panel {
  position: absolute;
  left: 8%;
  right: 8%;
  border: 1px solid rgba(0, 215, 210, 0.13);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), transparent);
  box-shadow:
    inset 0 0 35px rgba(0, 0, 0, 0.28),
    0 0 0 8px rgba(0, 0, 0, 0.045);
}

.door-panel-top {
  top: 8%;
  height: 36%;
}

.door-panel-bottom {
  bottom: 8%;
  height: 36%;
}

.door-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  background:
    linear-gradient(
      180deg,
      transparent,
      rgba(88, 255, 249, 0.72) 35%,
      #efffff 50%,
      rgba(88, 255, 249, 0.72) 65%,
      transparent
    );
  box-shadow: 0 0 18px rgba(0, 215, 210, 0.42);
}

.door-left .door-edge {
  right: 0;
}

.door-right .door-edge {
  left: 0;
}

.crest {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 14;
  width: clamp(155px, 22vw, 310px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition:
    opacity 0.55s ease,
    transform 0.72s cubic-bezier(.2,.8,.2,1),
    filter 0.55s ease;
}

.crest-halo {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 215, 210, 0.25), transparent 66%);
  filter: blur(16px);
  animation: crest-breathe 2.6s ease-in-out infinite;
}

.crest-ring {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 2px solid rgba(153, 255, 252, 0.42);
  border-radius: 50%;
  background: #02101e;
  box-shadow:
    0 0 0 11px rgba(1, 11, 21, 0.82),
    0 0 0 13px rgba(0, 215, 210, 0.28),
    0 0 55px rgba(0, 215, 210, 0.46);
}

.crest-ring img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.is-opening .crest {
  transform: translate(-50%, -50%) scale(1.11);
  filter: brightness(1.25);
}

.is-open .crest {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.58);
  pointer-events: none;
}

.entry-hint {
  position: absolute;
  left: 50%;
  bottom: max(34px, env(safe-area-inset-bottom));
  z-index: 13;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: rgba(225, 246, 255, 0.72);
  font-size: clamp(0.76rem, 1.2vw, 0.92rem);
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: opacity 0.45s ease, transform 0.45s ease;
  animation: hint-float 2s ease-in-out infinite;
}

.is-open .entry-hint {
  opacity: 0;
  transform: translate(-50%, 15px);
}

.mouse-icon {
  position: relative;
  width: 18px;
  height: 27px;
  border: 1px solid rgba(225, 246, 255, 0.7);
  border-radius: 12px;
}

.mouse-icon::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 3px;
  height: 6px;
  border-radius: 3px;
  background: var(--cyan);
  transform: translateX(-50%);
  animation: wheel 1.6s ease-in-out infinite;
}

.replay-button {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 7;
  padding: 11px 17px;
  border: 1px solid rgba(0, 215, 210, 0.38);
  border-radius: 999px;
  opacity: 0;
  background: rgba(2, 18, 32, 0.46);
  color: rgba(237, 255, 255, 0.84);
  cursor: pointer;
  pointer-events: none;
  backdrop-filter: blur(12px);
  transform: translateY(10px);
  transition:
    opacity 0.45s 2.25s ease,
    transform 0.45s 2.25s ease,
    background 0.25s ease;
}

.replay-button:hover {
  background: rgba(0, 215, 210, 0.13);
}

.is-open .replay-button {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.noscript-message {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-content: center;
  gap: 15px;
  padding: 30px;
  background: #031426;
  color: white;
  text-align: center;
}

@keyframes reveal-content {
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes ambient-enter {
  to {
    opacity: 0.7;
    transform: none;
  }
}

@keyframes crest-breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes hint-float {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -6px);
  }
}

@keyframes wheel {
  0% {
    opacity: 0;
    transform: translate(-50%, -1px);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 7px);
  }
}

@keyframes scan-light {
  0% {
    transform: translateX(-110%);
  }
  55%,
  100% {
    transform: translateX(110%);
  }
}

@keyframes point-pulse {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.4);
    opacity: 1;
  }
}

@media (max-width: 680px) {
  .reveal-content {
    padding: 24px;
  }

  .reveal h1 {
    line-height: 1.02;
  }

  .entry-hint {
    bottom: 26px;
  }

  .entry-hint .mouse-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
  }

  .entry-hint .mouse-icon::after {
    top: 50%;
    width: 6px;
    height: 6px;
    transform: translate(-50%, -50%);
    animation: touch-pulse 1.5s ease-in-out infinite;
  }

  .door-panel {
    left: 5%;
    right: 5%;
  }

  .replay-button {
    right: 50%;
    bottom: 18px;
    transform: translate(50%, 10px);
  }

  .is-open .replay-button {
    transform: translateX(50%);
  }
}

@keyframes touch-pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(0.7);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

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

  .door-left {
    transform-origin: left center;
  }

  .door-right {
    transform-origin: right center;
  }
}
