/* Home prologue / hero scene — 仅首页 index.php 引入；依赖 www.css 主题变量 */

.home-hero-slot {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: #020712;
}

.home-scene-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #020712;
}

.home-scene-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.home-prologue-enter {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: max(60px, env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  padding: 8px 16px;
  border: solid 1px rgba(220, 229, 235, 0.5);
  border-radius: 6px;
  color: rgba(220, 229, 235, 0.5);
  background: transparent;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.12em;
  transition: opacity 1.4s ease, transform 1.4s ease, color 0.5s ease;
}

.home-prologue-enter.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.home-prologue-enter:hover,
.home-prologue-enter:focus-visible {
  color: rgba(237, 242, 245, 0.82);
  outline: none;
}

.home-scene-wrap.is-prologue-fixed {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  will-change: transform;
}

.home-scene-wrap.is-transitioning {
  right: auto;
  bottom: auto;
  will-change: top, left, width, height;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.home-scene-wrap.is-transitioning iframe {
  max-width: none;
  max-height: none;
}

.home-scene-wrap.is-scene-expanded {
  position: fixed;
  inset: 0;
  z-index: 210;
  width: 100vw;
  height: 100vh;
}

.home-scene-wrap:fullscreen,
.home-scene-wrap:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #020712;
}

.home-scene-wrap:fullscreen iframe,
.home-scene-wrap:-webkit-full-screen iframe {
  width: 100%;
  height: 100%;
}

body.home-prologue-lock,
body.home-scene-expanded-lock {
  overflow: hidden;
}

body[data-home-state="prologue"] .home-shell > .nav,
body[data-home-state="prologue"] .home-shell > .home-main,
body[data-home-state="prologue"] .home-shell > .footer {
  visibility: hidden;
  pointer-events: none;
}

body[data-home-state="transition"] .home-shell > .nav {
  visibility: visible;
  pointer-events: auto;
  opacity: 0;
  animation: homeNavFadeIn 1.4s ease forwards;
  animation-delay: 0.35s;
}

body[data-home-state="transition"] .home-shell > .home-main,
body[data-home-state="transition"] .home-shell > .footer {
  visibility: visible;
  pointer-events: none;
}

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

.home-main .hero,
.home-main > section:not(.hero) {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

body[data-home-state="homepage"] .home-main .hero.is-revealed,
body[data-home-state="homepage"] .home-main > section.is-revealed,
body[data-home-state="transition"] .home-main .hero.is-revealed,
body[data-home-state="transition"] .home-main > section.is-revealed {
  opacity: 1;
  transform: none;
}

body[data-home-state="homepage"] .home-shell > .footer {
  opacity: 0;
  animation: homeNavFadeIn 0.8s ease forwards;
  animation-delay: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
  .home-scene-wrap.is-prologue-fixed {
    will-change: auto;
  }

  .home-main .hero,
  .home-main > section:not(.hero) {
    transition: none;
  }
}

.home-banner-slot {
  margin: 24px 0 8px;
}

.home-banner-slot-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
}

.home-banner-slot-image {
  display: block;
  width: 100%;
  height: auto;
}
