/* Homepage entry — cinematic sunrise reveal (distinct from letter-chip style) */

body.ms-entry-active {
  overflow: hidden;
}

.ms-entry {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background: #041610;
  color: #fff;
  font-family: var(--sans, "Pretendard", "Noto Sans KR", sans-serif);
  cursor: pointer;
  isolation: isolate;
  opacity: 1;
  transition: opacity 0.65s ease;
}

.ms-entry.is-closing {
  opacity: 0;
  pointer-events: none;
}

.ms-entry__horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58%;
  background:
    linear-gradient(180deg, transparent 0%, rgba(18, 57, 47, 0.35) 38%, rgba(9, 40, 31, 0.92) 100%),
    radial-gradient(ellipse 120% 70% at 50% 100%, rgba(244, 182, 76, 0.42) 0%, transparent 58%);
  transform: translateY(100%);
  animation: msHorizonRise 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.ms-entry__sun {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: min(72vw, 420px);
  height: min(72vw, 420px);
  margin-left: calc(min(72vw, 420px) / -2);
  border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, #fff6d0 0%, #ffd980 28%, #f4b64c 52%, rgba(244, 182, 76, 0.15) 68%, transparent 72%);
  filter: blur(0.5px);
  transform: translateY(120%) scale(0.55);
  opacity: 0;
  animation: msSunRise 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

.ms-entry__sun::after {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 217, 128, 0.35) 0%, transparent 68%);
  animation: msSunPulse 2.8s ease-in-out 1.2s infinite;
}

.ms-entry__rays {
  position: absolute;
  left: 50%;
  bottom: calc(18% - 8px);
  width: min(95vw, 560px);
  height: min(95vw, 560px);
  margin-left: calc(min(95vw, 560px) / -2);
  transform: translateY(120%) rotate(0deg);
  opacity: 0;
  animation: msRaysRise 1.55s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards,
    msRaysSpin 28s linear 1.8s infinite;
  pointer-events: none;
}

.ms-entry__rays line {
  stroke: rgba(255, 217, 128, 0.55);
  stroke-width: 2;
  stroke-linecap: round;
  transform-origin: 280px 280px;
}

.ms-entry__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 72%, rgba(255, 217, 128, 0.14) 0%, transparent 42%),
    linear-gradient(180deg, rgba(4, 22, 16, 0.72) 0%, transparent 36%, rgba(4, 22, 16, 0.55) 100%);
  opacity: 0;
  animation: msVeilIn 1s ease 0.9s forwards;
}

.ms-entry__spores {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ms-entry__spore {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 217, 128, 0.75);
  box-shadow: 0 0 10px rgba(255, 217, 128, 0.55);
  opacity: 0;
  animation: msSporeDrift var(--dur, 4.5s) ease-in-out var(--delay, 0s) infinite;
}

.ms-entry__stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.5vw, 22px);
  padding: 24px;
  text-align: center;
  max-width: min(94vw, 920px);
}

.ms-entry__logo {
  width: clamp(72px, 14vw, 108px);
  height: clamp(72px, 14vw, 108px);
  color: #eaf4e8;
  opacity: 0;
  transform: translateY(24px) scale(0.82);
  animation: msLogoIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) 1.05s forwards;
  filter: drop-shadow(0 0 22px rgba(255, 217, 128, 0.35));
}

.ms-entry__logo .brand-mark {
  width: 100%;
  height: 100%;
}

.ms-entry__logo .logo-sun {
  fill: #ffd980;
}

.ms-entry__title {
  margin: 0;
  font-family: var(--serif, "Iowan Old Style", "Noto Serif KR", serif);
  font-size: clamp(1.65rem, 5.8vw, 3.35rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.04em;
  word-break: keep-all;
  opacity: 0;
  transform: translateY(18px);
  animation: msTitleIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1.35s forwards;
}

.ms-entry__title-shine {
  display: inline-block;
  background: linear-gradient(105deg, #fff8e8 0%, #ffd980 32%, #fff6d8 48%, #f4b64c 62%, #ffe9b0 78%, #fff8e8 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: msTitleShimmer 2.4s ease-in-out 1.7s infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 28px rgba(255, 217, 128, 0.28));
}

.ms-entry__sub {
  margin: 0;
  font-size: clamp(0.68rem, 1.8vw, 0.82rem);
  font-weight: 800;
  letter-spacing: 0.28em;
  color: rgba(186, 219, 194, 0.82);
  opacity: 0;
  transform: translateY(10px);
  animation: msSubIn 0.75s ease 1.85s forwards;
}

.ms-entry__tag {
  margin: 0;
  padding: 7px 14px;
  border: 1px solid rgba(255, 217, 128, 0.28);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: rgba(255, 232, 180, 0.88);
  background: rgba(18, 57, 47, 0.45);
  opacity: 0;
  animation: msSubIn 0.75s ease 2.05s forwards;
}

.ms-entry__skip {
  position: absolute;
  right: clamp(16px, 4vw, 28px);
  bottom: clamp(16px, 4vw, 28px);
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(7, 28, 20, 0.55);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0;
  animation: msSubIn 0.5s ease 0.8s forwards;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ms-entry__skip:hover,
.ms-entry__skip:focus-visible {
  color: #fff;
  border-color: rgba(255, 217, 128, 0.45);
  background: rgba(18, 57, 47, 0.75);
  outline: none;
}

@keyframes msHorizonRise {
  to { transform: translateY(0); }
}

@keyframes msSunRise {
  0% { opacity: 0; transform: translateY(120%) scale(0.55); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes msSunPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

@keyframes msRaysRise {
  0% { opacity: 0; transform: translateY(120%) rotate(0deg); }
  100% { opacity: 1; transform: translateY(0) rotate(0deg); }
}

@keyframes msRaysSpin {
  to { transform: translateY(0) rotate(360deg); }
}

@keyframes msVeilIn {
  to { opacity: 1; }
}

@keyframes msLogoIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes msTitleIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes msSubIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes msTitleShimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

@keyframes msSporeDrift {
  0% { opacity: 0; transform: translateY(20px) scale(0.6); }
  20% { opacity: 0.85; }
  80% { opacity: 0.35; }
  100% { opacity: 0; transform: translateY(-120px) scale(1.1); }
}

@media (max-width: 520px) {
  .ms-entry__sun {
    bottom: 12%;
    width: 88vw;
    height: 88vw;
    margin-left: -44vw;
  }

  .ms-entry__rays {
    bottom: calc(12% - 6px);
    width: 105vw;
    height: 105vw;
    margin-left: -52.5vw;
  }

  .ms-entry__title {
    font-size: clamp(1.45rem, 7.2vw, 2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-entry,
  .ms-entry * {
    animation: none !important;
    transition: none !important;
  }

  .ms-entry__horizon,
  .ms-entry__sun,
  .ms-entry__rays,
  .ms-entry__veil,
  .ms-entry__logo,
  .ms-entry__title,
  .ms-entry__sub,
  .ms-entry__tag,
  .ms-entry__skip {
    opacity: 1 !important;
    transform: none !important;
  }
}
