/* ================================================
   [Group E] Top Page Animation B
   ================================================ */

.is-home .hero__logo {
  opacity: 0;
  transform: scale(0.95);
  transform-origin: center;
  will-change: opacity, transform;
}

.is-home .hero {
  isolation: isolate;
}

.is-home .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 1;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  will-change: opacity, backdrop-filter;
}

.is-home .hero__body {
  z-index: 2;
}

.is-home .hero.is-animating::before {
  animation: heroFogClear 1.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.is-home .hero.is-animating .hero__logo {
  animation: heroFogLogoReveal 1s cubic-bezier(0.25, 1, 0.5, 1) 0.2s forwards;
}

.curtain {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(240, 245, 248, 0) 70%
  );
}

.curtain__glow,
.curtain__flash,
.curtain__seam {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.curtain__glow {
  z-index: 1;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.74) 22%,
    rgba(255, 255, 255, 0.2) 52%,
    rgba(255, 255, 255, 0) 82%
  );
  filter: blur(26px);
  transform: scale(1.08);
}

.curtain__flash {
  z-index: 3;
  opacity: 1;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.98) 45%,
    rgba(255, 255, 255, 0.92) 100%
  );
}

.curtain__seam {
  z-index: 5;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) calc(50% - 10px),
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0) calc(50% + 10px)
  );
  filter: blur(6px);
}

.curtain__panel {
  position: absolute;
  top: 0;
  width: 50.5%;
  height: 100%;
  z-index: 4;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7f9 52%, #ebeff3 100%);
  box-shadow:
    inset 0 0 42px rgba(255, 255, 255, 0.72),
    inset 0 0 132px rgba(255, 255, 255, 0.25);
  will-change: transform;
  transition: transform 1.55s cubic-bezier(0.7, 0, 0.2, 1) 0.42s;
}

.curtain__panel--left {
  left: 0;
  transform: translateX(0);
}

.curtain__panel--right {
  right: 0;
  transform: translateX(0);
}

.curtain__panel::after {
  content: '';
  position: absolute;
  top: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 48%,
    rgba(255, 255, 255, 0) 100%
  );
  filter: blur(8px);
  opacity: 0.48;
}

.curtain__panel--left::after {
  right: -6px;
}

.curtain__panel--right::after {
  left: -6px;
}

.curtain.is-opened .curtain__glow {
  animation: curtainGlowBurst 1.05s ease-out forwards;
}

.curtain.is-opened .curtain__flash {
  animation: curtainWhiteFadeLift 0.34s cubic-bezier(0.25, 1, 0.5, 1) 1s
    forwards;
}

.curtain.is-opened .curtain__seam {
  animation: curtainSeamGlow 1.15s ease-out forwards;
}

.curtain.is-opened .curtain__panel--left {
  transform: translateX(-102%);
}

.curtain.is-opened .curtain__panel--right {
  transform: translateX(102%);
}

@keyframes curtainGlowBurst {
  0% {
    opacity: 0;
    transform: scale(1.12);
  }

  18% {
    opacity: 0.95;
  }

  56% {
    opacity: 0.54;
  }

  100% {
    opacity: 0;
    transform: scale(1.01);
  }
}

@keyframes curtainWhiteFadeLift {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes curtainSeamGlow {
  0% {
    opacity: 0;
  }

  16% {
    opacity: 0.8;
  }

  58% {
    opacity: 0.45;
  }

  100% {
    opacity: 0;
  }
}

@keyframes heroFogClear {
  0% {
    opacity: 1;
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
  }

  100% {
    opacity: 0;
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
  }
}

@keyframes heroFogLogoReveal {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-home .hero::before,
  .is-home .hero__logo {
    animation: none !important;
    transition: none !important;
  }

  .is-home .hero::before {
    opacity: 0;
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
  }

  .is-home .hero__logo {
    opacity: 1;
    transform: scale(1);
  }
}
