:root {
  --ink: #070706;
  --ivory: #f3efe5;
  --blue-light: #8bd8ff;
  --pointer-x: 50%;
  --pointer-y: 50%;
  --shift-x: 0px;
  --shift-y: 0px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--ink);
  color: var(--ivory);
  overflow: hidden;
}

.stage {
  isolation: isolate;
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgb(112 199 244 / 10%), transparent 21rem),
    radial-gradient(circle at 50% 44%, #142733 0%, #090f14 31%, var(--ink) 67%);
}

.stage::before {
  position: absolute;
  z-index: 5;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.19;
  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='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.stage::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  content: "";
  pointer-events: none;
  box-shadow: inset 0 0 13rem 3rem #000;
}

.ambient {
  position: absolute;
  inset: 0;
  transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translate(var(--shift-x), var(--shift-y));
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  animation: orb-arrive 2.8s 0.2s ease-out forwards, breathe 9s 3s ease-in-out infinite alternate;
}

.orb--daylight {
  top: 20%;
  left: 24%;
  width: min(34rem, 60vw);
  aspect-ratio: 1;
  background: rgb(65 160 211 / 25%);
}

.orb--blue {
  right: 22%;
  bottom: 13%;
  width: min(24rem, 50vw);
  aspect-ratio: 1;
  background: rgb(36 73 93 / 20%);
  animation-delay: 0.55s, 3.35s;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgb(177 224 248 / 14%);
  border-radius: 50%;
  opacity: 0;
}

.orbit::after {
  position: absolute;
  top: 50%;
  left: -3px;
  width: 5px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--blue-light);
  box-shadow: 0 0 18px 5px rgb(129 207 247 / 55%);
  content: "";
}

.orbit--outer {
  width: min(72vw, 65rem);
  aspect-ratio: 1.9 / 1;
  animation: orbit-arrive 2.3s 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards, orbit-turn 40s 3s linear infinite;
}

.orbit--inner {
  width: min(49vw, 43rem);
  aspect-ratio: 1.6 / 1;
  border-color: rgb(177 224 248 / 8%);
  animation: orbit-arrive 2.3s 0.95s cubic-bezier(0.2, 0.7, 0.2, 1) forwards, orbit-turn-reverse 32s 3.25s linear infinite;
}

.horizon {
  position: absolute;
  top: 62%;
  left: 50%;
  width: min(92vw, 90rem);
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgb(128 205 245 / 34%), transparent);
  filter: blur(0.2px);
  transform: translateX(-50%) scaleX(0);
  animation: horizon-arrive 2.8s 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.spark {
  position: absolute;
  width: 2px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #d9f3ff;
  box-shadow: 0 0 12px 2px rgb(119 205 248 / 48%);
  opacity: 0;
  animation: flicker 4.5s ease-in-out infinite;
}

.spark--one { top: 23%; left: 19%; animation-delay: 1.2s; }
.spark--two { top: 34%; right: 17%; animation-delay: 2.1s; }
.spark--three { right: 28%; bottom: 18%; animation-delay: 3.2s; }

.identity {
  position: relative;
  z-index: 2;
  width: min(90vw, 82rem);
  padding: 4rem 1rem;
  text-align: center;
  transform: translateY(-1vh);
}

.identity__halo {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(47rem, 90vw);
  height: 13rem;
  border-radius: 50%;
  opacity: 0;
  background: rgb(92 187 235 / 14%);
  filter: blur(62px);
  transform: translate(-50%, -50%) scale(0.7);
  animation: halo-arrive 3.2s 0.7s ease-out forwards;
}

h1 {
  display: flex;
  justify-content: center;
  gap: 0.22em;
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(3.8rem, 10.5vw, 9.5rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.065em;
  text-wrap: balance;
  filter: drop-shadow(0 1.5rem 2.5rem rgb(0 0 0 / 35%));
}

h1 span {
  display: inline-block;
  color: transparent;
  background: linear-gradient(108deg, #759db5 0%, #f2fbff 28%, #b9d7e6 53%, #fff 73%, #79a8c1 100%);
  background-clip: text;
  -webkit-background-clip: text;
  opacity: 0;
  transform: translateY(0.55em);
  animation: title-arrive 1.5s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

h1 span:last-child {
  animation-delay: 0.36s;
}

.identity p {
  position: relative;
  width: fit-content;
  margin: clamp(1.5rem, 4vw, 2.6rem) auto 0;
  color: rgb(220 240 249 / 69%);
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.72rem, 1.4vw, 0.96rem);
  font-weight: 300;
  letter-spacing: 0.5em;
  line-height: 1.6;
  opacity: 0;
  text-transform: uppercase;
  transform: translateY(1rem);
  animation: subtitle-arrive 1.5s 1.05s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.identity p::before,
.identity p::after {
  position: absolute;
  top: 50%;
  width: clamp(1.4rem, 6vw, 5rem);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgb(111 199 243 / 56%));
}

.identity p::before {
  right: calc(100% + clamp(0.8rem, 2.8vw, 2.2rem));
}

.identity p::after {
  left: calc(100% + clamp(0.8rem, 2.8vw, 2.2rem));
  transform: rotate(180deg);
}

@keyframes title-arrive {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes subtitle-arrive {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes orb-arrive {
  to { opacity: 1; }
}

@keyframes breathe {
  to { opacity: 0.65; transform: scale(1.14) translate3d(3%, -2%, 0); }
}

@keyframes orbit-arrive {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-17deg) scale(0.72); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
}

@keyframes orbit-turn {
  from { transform: translate(-50%, -50%) rotate(-12deg); }
  to { transform: translate(-50%, -50%) rotate(348deg); }
}

@keyframes orbit-turn-reverse {
  from { transform: translate(-50%, -50%) rotate(15deg); }
  to { transform: translate(-50%, -50%) rotate(-345deg); }
}

@keyframes horizon-arrive {
  to { opacity: 1; transform: translateX(-50%) scaleX(1); }
}

@keyframes halo-arrive {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes flicker {
  0%, 100% { opacity: 0.15; transform: scale(0.7); }
  45% { opacity: 0.8; transform: scale(1); }
  55% { opacity: 0.35; transform: scale(0.8); }
}

@media (max-width: 600px) {
  h1 {
    flex-direction: column;
    gap: 0.04em;
    font-size: clamp(4rem, 20vw, 6.8rem);
    line-height: 0.84;
  }

  .identity p {
    margin-top: 2.4rem;
    letter-spacing: 0.3em;
  }

  .orbit--outer { width: 130vw; }
  .orbit--inner { width: 85vw; }
}

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

  .ambient {
    transform: none;
    transition: none;
  }
}
