:root {
  color-scheme: dark;
  --white: #f7f9ff;
  --muted: rgba(226, 234, 247, 0.48);
  --line: rgba(225, 237, 255, 0.19);
  --surface: rgba(8, 12, 18, 0.76);
}

* { box-sizing: border-box; }

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

body {
  color: var(--white);
  font-family: "PingFang SC", "Heiti SC", "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
}

button,
input { font: inherit; }

.experience {
  isolation: isolate;
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: #010204;
}

#sky {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
}

#ambient-particles {
  position: absolute;
  z-index: -4;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .94;
}

.vignette {
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.18) 68%, rgba(0, 0, 0, 0.72) 115%);
}

.intro {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: min(720px, calc(100vw - 64px));
  text-align: center;
  transform: translate(-50%, -52%);
  transition: opacity 1s cubic-bezier(.22, 1, .36, 1), transform 1s cubic-bezier(.22, 1, .36, 1), filter 1s ease;
}

.intro.is-hidden {
  opacity: 0;
  filter: blur(10px);
  pointer-events: none;
  transform: translate(-50%, -58%) scale(.975);
}

h1 {
  margin: 0;
  width: 100%;
  line-height: 0;
}

.hero-title-image {
  display: block;
  width: min(860px, calc(100vw - 64px));
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 26px rgba(190, 224, 255, .12));
  user-select: none;
}

.hero-star {
  display: inline-block;
  position: relative;
}

.meteor-tail {
  position: absolute;
  top: 61%;
  left: 63%;
  width: clamp(118px, 15vw, 220px);
  height: auto;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(174, 218, 255, .55));
}

.meteor-glow,
.meteor-core {
  fill: none;
  stroke: url(#meteor-gradient);
  stroke-linecap: round;
}

.meteor-glow {
  stroke-width: 8;
  opacity: .2;
  animation: meteor-breathe 4.8s ease-in-out infinite;
}

.meteor-core {
  stroke-width: 2.2;
  stroke-dasharray: .82 .18;
  animation: meteor-flow 5.6s linear infinite;
}

.meteor-dust {
  fill: #dff1ff;
  opacity: .56;
  animation: dust-breathe 4.2s ease-in-out infinite;
}

@keyframes meteor-flow {
  to { stroke-dashoffset: -1; }
}

@keyframes meteor-breathe {
  0%, 100% { opacity: .13; }
  50% { opacity: .3; }
}

@keyframes dust-breathe {
  0%, 100% { opacity: .24; transform: translateX(0); }
  50% { opacity: .72; transform: translateX(4px); }
}

.name-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px;
  gap: 12px;
  width: min(550px, 100%);
  margin: 48px auto 0;
}

.complete-message {
  position: absolute;
  z-index: 2;
  top: var(--complete-message-top, calc(50% + 164px));
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 48px);
  margin: 0;
  color: #fff;
  font-family: "PingFang SC", "Heiti SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: .16em;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 12px rgba(255, 255, 255, .28), 0 0 24px rgba(166, 213, 255, .16);
  transform: translate(-50%, calc(-50% + 10px));
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, 1, .36, 1);
  white-space: nowrap;
}

.experience.is-complete .complete-message {
  opacity: 1;
  transform: translate(-50%, -50%);
  transition-delay: .2s;
}

.complete-message-line {
  width: 52px;
  height: 1px;
  opacity: .78;
  transform: scaleX(0);
  transition: transform .8s cubic-bezier(.22, 1, .36, 1);
}

.complete-message-line:first-child {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .84));
  transform-origin: right center;
}

.complete-message-line:last-child {
  background: linear-gradient(90deg, rgba(255, 255, 255, .84), transparent);
  transform-origin: left center;
}

.experience.is-complete .complete-message-line {
  transform: scaleX(1);
  transition-delay: .28s;
}

.complete-message-text {
  display: inline-block;
}

.name-field {
  display: flex;
  align-items: center;
  height: 58px;
  padding: 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 18px 56px rgba(0, 0, 0, .26);
  backdrop-filter: blur(18px);
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
}

.name-field:focus-within {
  border-color: rgba(212, 232, 255, .46);
  background: rgba(11, 17, 25, .86);
  box-shadow: 0 0 0 4px rgba(179, 217, 255, .055), inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 56px rgba(0, 0, 0, .34);
}

#nameInput {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: #f5f8fc;
  background: transparent;
  font-size: 15px;
  letter-spacing: 0;
}

#nameInput::placeholder { color: rgba(219, 230, 242, .34); }

.light-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  height: 58px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  color: #070a0e;
  background: linear-gradient(145deg, #ffffff 4%, #eaf4ff 62%, #cfe9ff 120%);
  box-shadow: 0 14px 40px rgba(162, 211, 255, .13), inset 0 -1px 0 rgba(0, 0, 0, .08);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .28s ease, background .28s ease;
}

.light-button:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 18px 46px rgba(180, 221, 255, .22), 0 0 28px rgba(193, 226, 255, .09);
}

.light-button:active { transform: translateY(0) scale(.985); }
.star-icon { font-size: 16px; }

.gathering-status {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 42px;
  margin: 0;
  color: rgba(219, 234, 250, .3);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: opacity .7s ease;
}

.gathering-status.is-visible { opacity: 1; }
.gathering-status.is-complete { opacity: 0; }

@media (max-width: 680px) {
  .intro { width: min(520px, calc(100vw - 36px)); }
  .hero-title-image { width: calc(100vw - 44px); }
  .complete-message { gap: 8px; font-size: 14px; letter-spacing: .12em; }
  .complete-message-line { width: 28px; }
  .name-form { grid-template-columns: 1fr; margin-top: 42px; }
  .light-button { width: 100%; }
}

@media (min-width: 681px) and (max-width: 900px) {
  .complete-message { font-size: 16px; }
  .complete-message-line { width: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro { transition-duration: .2s; }
  .complete-message,
  .complete-message-line { transition-duration: .2s; transition-delay: 0s; }
}
