/* ── 예원 로그인 · Forward Horizon + Dynamic ── */

.auth-page {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #030712;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.auth-gate {
  position: fixed;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: #fff;
}

/* ── 배경 ── */

.auth-gate__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.auth-gate--no-image .auth-gate__backdrop {
  background: linear-gradient(165deg, #030712 0%, #0f172a 45%, #1e1b4b 100%);
}

.auth-gate__photo {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.24;
  filter: saturate(0.75) contrast(1.08);
  animation: authKenBurns 22s ease-in-out infinite alternate;
}

@keyframes authKenBurns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.08) translate(-1.5%, -0.8%); }
}

.auth-gate__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    118deg,
    rgba(3, 7, 18, 0.96) 0%,
    rgba(3, 7, 18, 0.78) 40%,
    rgba(3, 7, 18, 0.52) 65%,
    rgba(3, 7, 18, 0.9) 100%
  );
}

.auth-gate__horizon {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
  animation: authHorizonPulse 8s ease-in-out infinite;
}

@keyframes authHorizonPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

.auth-gate__beams {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.auth-beam {
  position: absolute;
  bottom: -10%;
  width: 2px;
  height: 70%;
  background: linear-gradient(0deg, transparent, rgba(96, 165, 250, 0.55), transparent);
  transform-origin: bottom center;
  animation: authBeamRise 5s ease-in-out infinite;
}

.auth-beam--1 { left: 20%; transform: rotate(-10deg); animation-delay: 0s; }
.auth-beam--2 {
  left: 46%;
  height: 80%;
  opacity: 0.8;
  animation-delay: -1.6s;
  background: linear-gradient(0deg, transparent, rgba(147, 197, 253, 0.7), rgba(59, 130, 246, 0.25), transparent);
}
.auth-beam--3 { right: 22%; transform: rotate(8deg); animation-delay: -3.2s; }

@keyframes authBeamRise {
  0%, 100% { opacity: 0.15; transform: scaleY(0.88) rotate(var(--beam-r, 0deg)); }
  50%       { opacity: 0.75; transform: scaleY(1.05) rotate(var(--beam-r, 0deg)); }
}

.auth-beam--1 { --beam-r: -10deg; }
.auth-beam--3 { --beam-r: 8deg; }

.auth-gate__particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(147, 197, 253, 0.7);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.8);
  animation: authParticleFloat 12s ease-in-out infinite;
}

.auth-gate__particles span:nth-child(1) { left: 12%; top: 25%; animation-delay: 0s; }
.auth-gate__particles span:nth-child(2) { left: 28%; top: 60%; animation-delay: -2s; width: 3px; height: 3px; }
.auth-gate__particles span:nth-child(3) { left: 55%; top: 18%; animation-delay: -4s; }
.auth-gate__particles span:nth-child(4) { left: 72%; top: 45%; animation-delay: -1s; width: 5px; height: 5px; }
.auth-gate__particles span:nth-child(5) { left: 85%; top: 70%; animation-delay: -3s; }
.auth-gate__particles span:nth-child(6) { left: 38%; top: 35%; animation-delay: -5s; width: 2px; height: 2px; }

@keyframes authParticleFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  25%       { transform: translate(8px, -20px) scale(1.2); opacity: 0.9; }
  50%       { transform: translate(-6px, -38px) scale(0.9); opacity: 0.5; }
  75%       { transform: translate(12px, -18px) scale(1.1); opacity: 0.8; }
}

.auth-gate__sweep {
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transform: skewX(-12deg);
  animation: authLightSweep 9s ease-in-out infinite;
}

@keyframes authLightSweep {
  0%, 100% { left: -60%; opacity: 0; }
  45%       { opacity: 1; }
  55%       { left: 120%; opacity: 0; }
}

.auth-gate__grid {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.55) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

/* ── 레이아웃 ── */

.auth-gate__content {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 5vw, 3.5rem);
}

.auth-gate__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: clamp(1.25rem, 2.5vw, 2rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-gate__logo-link {
  display: inline-block;
  transition: transform 0.3s, filter 0.3s;
}

.auth-gate__logo-link:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.4));
}

.auth-gate__logo {
  width: min(200px, 48vw);
  height: auto;
  max-height: 42px;
  object-fit: contain;
}

.auth-gate__top-end {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.auth-gate__sys {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.auth-gate__pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: authPulseDot 2s ease-out infinite;
}

@keyframes authPulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.auth-gate__year {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #60a5fa;
}

.auth-gate__main {
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr min(380px, 100%);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 0;
}

/* ── 히어로 ── */

.auth-gate__hero {
  position: relative;
}

.auth-hero__index {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  animation: authFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-hero__index-num {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #60a5fa;
}

.auth-hero__index-line {
  width: 2.5rem;
  height: 1px;
  background: rgba(96, 165, 250, 0.45);
  animation: authLineGrow 1.2s ease 0.3s both;
}

@keyframes authLineGrow {
  from { width: 0; opacity: 0; }
  to   { width: 2.5rem; opacity: 1; }
}

.auth-hero__index-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.auth-hero__slogan-en {
  margin: 0 0 1.75rem;
  line-height: 0.88;
  animation: authFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.auth-hero__yes {
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.1);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.55);
  text-stroke: 1px rgba(255, 255, 255, 0.55);
  animation: authYesPulse 4s ease-in-out infinite;
}

@keyframes authYesPulse {
  0%, 100% { opacity: 0.85; -webkit-text-stroke-color: rgba(255, 255, 255, 0.45); }
  50%       { opacity: 1; -webkit-text-stroke-color: rgba(255, 255, 255, 0.75); }
}

.auth-hero__can {
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #fff 0%, #93c5fd 35%, #fff 50%, #fde68a 65%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: authShimmer 4s linear infinite;
}

@keyframes authShimmer {
  to { background-position: 200% center; }
}

.auth-hero__bang {
  display: inline-block;
  color: #60a5fa;
  -webkit-text-fill-color: #60a5fa;
  animation: authBangPop 2s ease-in-out infinite;
}

@keyframes authBangPop {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
  50%       { transform: scale(1.08); filter: drop-shadow(0 0 16px rgba(96, 165, 250, 0.8)); }
}

.auth-hero__tagline {
  margin: 0 0 0.5rem;
  animation: authFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

.auth-hero__line {
  display: block;
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.55);
}

.auth-hero__line--accent {
  font-size: clamp(1.75rem, 4vw, 2.85rem);
  font-weight: 800;
  color: #fff;
}

.auth-hero__line--accent strong {
  font-weight: 900;
  background: linear-gradient(120deg, #93c5fd, #60a5fa, #c4b5fd, #93c5fd);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: authShimmer 5s linear infinite;
}

.auth-hero__school {
  margin: 0 0 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.32);
  animation: authFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.auth-hero__quote {
  margin: 0 0 2.25rem;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid rgba(96, 165, 250, 0.45);
  animation: authFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.auth-hero__verse {
  margin: 0 0 0.5rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.auth-hero__desc {
  margin: 0;
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.42);
}

.auth-hero__track {
  position: relative;
  animation: authFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.34s both;
}

.auth-hero__track-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, #3b82f6, rgba(96, 165, 250, 0.15));
  transform: translateY(-50%);
  animation: authTrackGrow 2.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

@keyframes authTrackGrow {
  from { width: 0; opacity: 0; }
  to   { width: 42%; opacity: 1; }
}

.auth-hero__pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-hero__pillars li {
  animation: authPillarIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-hero__pillars li:nth-child(1) { animation-delay: 0.55s; }
.auth-hero__pillars li:nth-child(2) { animation-delay: 0.65s; }
.auth-hero__pillars li:nth-child(3) { animation-delay: 0.75s; }
.auth-hero__pillars li:nth-child(4) { animation-delay: 0.85s; }

@keyframes authPillarIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-hero__pillars span {
  display: block;
  padding: 0.5rem 1.1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.auth-hero__pillars li:hover span {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(59, 130, 246, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 로그인 패널 ── */

.auth-gate__panel {
  position: relative;
  padding: clamp(1.75rem, 3vw, 2.1rem);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 40px 80px rgba(0, 0, 0, 0.45);
  animation: authPanelIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both, authPanelFloat 6s ease-in-out 1.2s infinite;
}

@keyframes authPanelIn {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes authPanelFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.auth-panel__glow {
  position: absolute;
  top: -40%;
  right: -30%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 70%);
  pointer-events: none;
  animation: authGlowPulse 5s ease-in-out infinite;
}

@keyframes authGlowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.08); }
}

.auth-panel__shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.auth-panel__head {
  position: relative;
  margin-bottom: 1.75rem;
}

.auth-panel__eyebrow {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #60a5fa;
}

.auth-panel__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 2.2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-panel__desc {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.42);
}

.auth-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.auth-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.auth-form__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
}

.auth-form__input {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  padding: 0.75rem 0;
  font-size: 0.92rem;
  background: transparent;
  color: #fff;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.auth-form__input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.auth-form__input:focus {
  outline: none;
  border-bottom-color: #60a5fa;
  box-shadow: 0 4px 12px -4px rgba(96, 165, 250, 0.4);
}

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(59, 130, 246, 0.8) 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.auth-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: authBtnShine 3s ease-in-out infinite;
}

@keyframes authBtnShine {
  0%, 100% { left: -100%; }
  50%       { left: 140%; }
}

.auth-submit:hover {
  transform: translateY(-2px);
  border-color: rgba(147, 197, 253, 0.6);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.45);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-submit__icon {
  display: flex;
  transition: transform 0.25s;
}

.auth-submit:hover .auth-submit__icon {
  transform: translateX(5px);
}

.auth-message {
  min-height: 1.1rem;
  font-size: 0.75rem;
  color: #f87171;
  font-weight: 600;
}

.auth-message--success {
  color: #4ade80;
}

.auth-panel__divider {
  height: 1px;
  margin: 1.5rem 0 1.1rem;
  background: rgba(255, 255, 255, 0.06);
}

.auth-panel__features {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-panel__features li {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.auth-gate__hint {
  margin: 1.25rem 0 0;
  font-size: 0.68rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.25);
}

.auth-gate__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.2);
}

.auth-gate__foot-sep {
  opacity: 0.4;
}

/* ── 반응형 ── */

@media (max-width: 960px) {
  .auth-gate__main {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
  }

  .auth-gate__panel {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
    animation-name: authFadeUp, authPanelFloat;
  }

  .auth-hero__quote {
    padding-left: 1rem;
  }
}

@media (max-width: 600px) {
  .auth-gate__content {
    padding: 1rem 1.15rem;
  }

  .auth-gate__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .auth-hero__yes,
  .auth-hero__can {
    font-size: clamp(2.4rem, 13vw, 3.5rem);
  }

  .auth-panel__features {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-gate__photo,
  .auth-gate__horizon,
  .auth-beam,
  .auth-gate__particles span,
  .auth-gate__sweep,
  .auth-gate__pulse-dot,
  .auth-hero__yes,
  .auth-hero__can,
  .auth-hero__bang,
  .auth-hero__line--accent strong,
  .auth-hero__track-fill,
  .auth-hero__pillars li,
  .auth-hero__index,
  .auth-hero__slogan-en,
  .auth-hero__tagline,
  .auth-hero__school,
  .auth-hero__quote,
  .auth-hero__track,
  .auth-gate__panel,
  .auth-panel__glow,
  .auth-submit::after,
  .auth-hero__index-line {
    animation: none !important;
  }

  .auth-gate__panel {
    animation: authPanelIn 0.01s both;
  }
}
