/* 로그인 전 화면 — 오로라 바탕 위의 'Under test'.
   보라 → 초록 → 노랑 → 은색으로 흘러가는 네 겹의 빛을 각각 다른 주기로 돌린다.
   한 겹만 쓰면 색이 순서대로 지나갈 뿐이고, 겹쳐야 경계가 녹아 오로라처럼 보인다. */

.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  overflow: hidden;
  background: #070a0f;
}
.gate[hidden] { display: none; }

/* 빛 네 겹. filter: blur가 가장 무거우므로 겹 수를 늘리지 않고 크기를 키워 덮는다. */
.gate-aurora {
  position: absolute;
  inset: -12%;
  pointer-events: none;
  filter: blur(64px) saturate(150%);
  will-change: transform;
}
.gate-aurora span {
  position: absolute;
  display: block;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  opacity: 0.85;
  mix-blend-mode: screen;
  transform-origin: 50% 50%;
}
/* 보라 — 가장 느리고 크다. 바탕의 기조색. */
.gate-aurora .a1 {
  top: -14%; left: -4%;
  background: radial-gradient(circle at 50% 50%, #7b3fe4 0%, rgba(123, 63, 228, 0) 62%);
  animation: gate-drift-1 26s ease-in-out infinite alternate;
}
/* 초록 */
.gate-aurora .a2 {
  top: -6%; right: -2%;
  background: radial-gradient(circle at 50% 50%, #2fd08a 0%, rgba(47, 208, 138, 0) 60%);
  animation: gate-drift-2 19s ease-in-out infinite alternate;
}
/* 노랑 — 가장 작고 빠르다. 다른 겹 위에서 밝은 심지 역할. */
.gate-aurora .a3 {
  bottom: -18%; left: 10%;
  width: 58vmax; height: 58vmax;
  background: radial-gradient(circle at 50% 50%, #f2c14e 0%, rgba(242, 193, 78, 0) 58%);
  animation: gate-drift-3 15s ease-in-out infinite alternate;
}
/* 은색 — 채도가 낮아 다른 색을 씻어내며 지나간다. */
.gate-aurora .a4 {
  bottom: -10%; right: 2%;
  width: 64vmax; height: 64vmax;
  background: radial-gradient(circle at 50% 50%, #c8d2dc 0%, rgba(200, 210, 220, 0) 55%);
  opacity: 0.5;
  animation: gate-drift-4 22s ease-in-out infinite alternate;
}

@keyframes gate-drift-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(14vw, 10vh, 0) scale(1.22); }
}
@keyframes gate-drift-2 {
  from { transform: translate3d(0, 4vh, 0) scale(1.1); }
  to   { transform: translate3d(-16vw, -8vh, 0) scale(0.92); }
}
@keyframes gate-drift-3 {
  from { transform: translate3d(-6vw, 0, 0) scale(0.9); }
  to   { transform: translate3d(12vw, -14vh, 0) scale(1.3); }
}
@keyframes gate-drift-4 {
  from { transform: translate3d(4vw, 0, 0) scale(1.15); }
  to   { transform: translate3d(-12vw, 8vh, 0) scale(0.95); }
}

/* 입자감 — 큰 그라디언트만 쓰면 넓은 화면에서 색 띠(밴딩)가 보인다. 아주 옅은 노이즈가 그걸 깬다. */
.gate-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 가운데 글자가 빛에 묻히지 않게 아래로 갈수록 어두워지는 막을 한 겹 깐다. */
.gate-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 46% 34% at 50% 47%, rgba(7, 10, 15, 0.58) 0%, rgba(7, 10, 15, 0.22) 55%, rgba(7, 10, 15, 0) 78%);
}

.gate-body {
  position: relative;
  text-align: center;
  color: #eef2f6;
}
.gate-title {
  margin: 0;
  font-size: clamp(2.2rem, 9vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-indent: 0.22em; /* letter-spacing이 마지막 글자 뒤에도 붙어 생기는 쏠림 보정 */
  line-height: 1.1;
  text-transform: uppercase;
}
.gate-sub {
  margin: 18px auto 0;
  max-width: 30rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(238, 242, 246, 0.66);
}
.gate-actions { margin-top: 30px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gate-btn {
  padding: 10px 22px;
  border: 1px solid rgba(238, 242, 246, 0.28);
  border-radius: 999px;
  background: rgba(238, 242, 246, 0.07);
  color: #eef2f6;
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color 0.2s, background 0.2s;
}
.gate-btn:hover { border-color: rgba(238, 242, 246, 0.6); background: rgba(238, 242, 246, 0.14); }

/* 움직임을 원치 않는 사람에게는 같은 색을 멈춘 채로 보여 준다 — 화면이 비지는 않는다. */
@media (prefers-reduced-motion: reduce) {
  .gate-aurora span { animation: none; }
}
