.intro-stage {
  display: none;
}

.intro-ready .intro-stage {
  --intro-gold: #f6d477;
  --intro-ink: #050b18;
  --intro-duration: 4.8s;
  --page-width: clamp(132px, 40vw, 196px);
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  min-width: 320px;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  contain: layout paint;
  background:
    radial-gradient(circle at 76% 53%, rgba(42, 77, 143, 0.26), transparent 27%),
    radial-gradient(circle at 18% 17%, rgba(171, 24, 36, 0.11), transparent 31%),
    linear-gradient(145deg, #030813 0%, #07101f 54%, #02050d 100%);
  color: #fff7dc;
  opacity: 1;
  transition: opacity 320ms ease;
  animation: intro-stage-lifecycle var(--intro-duration) linear both;
}

.intro-ready.intro-is-active,
.intro-ready.intro-is-active body {
  overflow: hidden;
  overscroll-behavior: none;
}

.intro-stage.is-leaving {
  pointer-events: none;
  opacity: 0;
  animation: none;
}

.intro-stage::before,
.intro-stage::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
}

.intro-stage::before {
  opacity: 0.1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 42px 42px;
}

.intro-stage::after {
  background: linear-gradient(180deg, transparent 54%, rgba(129, 4, 21, 0.16));
}

.intro-stage__grain {
  display: none;
}

.intro-stage__glow {
  position: absolute;
  z-index: -1;
  top: 47%;
  left: 50%;
  width: min(88vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 217, 124, 0.16), transparent 66%);
  transform: translate(-50%, -50%) scale(0.94);
  will-change: transform, opacity;
  animation: intro-glow-bloom var(--intro-duration) ease both;
}

.intro-stage__glow::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  content: "60";
  color: rgba(246, 212, 119, 0.16);
  font-family: Georgia, "Times New Roman", serif;
  font-size: min(45vw, 260px);
  animation: intro-anniversary-pulse var(--intro-duration) ease both;
}

.intro-stage__currents {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.intro-stage__currents i {
  position: absolute;
  bottom: -12vh;
  width: 1px;
  height: 78vh;
  background: linear-gradient(0deg, transparent, rgba(246, 212, 119, 0.58), transparent);
  opacity: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  will-change: transform, opacity;
  animation: intro-current-draw 2.8s ease-out both;
}

.intro-stage__currents i:nth-child(1) { left: 22%; animation-delay: 620ms; }
.intro-stage__currents i:nth-child(2) { left: 50%; animation-delay: 810ms; }
.intro-stage__currents i:nth-child(3) { left: 78%; animation-delay: 1s; }

.intro-stage__skip {
  position: absolute;
  z-index: 40;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(246, 212, 119, 0.42);
  border-radius: 999px;
  background: rgba(2, 7, 16, 0.42);
  color: rgba(255, 241, 200, 0.82);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0;
  animation: intro-skip-in 600ms ease 700ms forwards;
}

.intro-stage__skip:hover,
.intro-stage__skip:focus-visible {
  outline: 0;
  border-color: var(--intro-gold);
  background: rgba(120, 15, 27, 0.58);
  color: #fff5d7;
}

.intro-stage__copy {
  position: absolute;
  z-index: 4;
  top: clamp(86px, 13vh, 150px);
  left: 50%;
  width: min(calc(100% - 48px), 520px);
  text-align: center;
  transform: translateX(-50%);
  will-change: transform, opacity;
  animation: intro-copy-lifecycle var(--intro-duration) cubic-bezier(0.22, 0.78, 0.26, 1) both;
}

.intro-stage__year {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 14px;
  color: rgba(246, 212, 119, 0.78);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  letter-spacing: 0.22em;
}

.intro-stage__year i {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--intro-gold), transparent);
}

.intro-stage__copy h1 {
  display: grid;
  gap: 4px;
  margin: 0;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(25px, 7vw, 42px);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.55);
}

.intro-stage__copy h1 strong {
  color: var(--intro-gold);
  font-weight: 600;
}

.intro-stage__copy > p:last-child {
  margin: 15px 0 0;
  color: rgba(255, 244, 211, 0.58);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.intro-book-stage {
  position: absolute;
  z-index: 5;
  top: 62%;
  left: 50%;
  width: var(--page-width);
  aspect-ratio: 0.76;
  perspective: 1200px;
  transform-style: preserve-3d;
  transform-origin: 0 50%;
  will-change: transform, opacity;
  animation: intro-book-flight var(--intro-duration) linear both;
}

.intro-book {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
  animation: intro-book-warp var(--intro-duration) linear both;
}

.intro-book__back,
.intro-book__right-page,
.intro-book__cover {
  position: absolute;
  inset: 0;
  border-radius: 2px 7px 7px 2px;
}

.intro-book__back {
  z-index: 0;
  background: #1a1412;
  border: 1px solid rgba(237, 204, 120, 0.28);
  transform: translate3d(5px, 5px, -10px);
  box-shadow: 8px 10px 16px rgba(0, 0, 0, 0.45);
}

.intro-book__right-page {
  z-index: 1;
  overflow: hidden;
  padding: 7%;
  border: 1px solid rgba(217, 190, 131, 0.6);
  background: #efe4c9;
  transform: translateZ(-2px);
  box-shadow: inset 12px 0 24px rgba(59, 42, 24, 0.23);
}

.intro-book__right-page::after {
  position: absolute;
  inset: 3.5%;
  border: 1px solid rgba(117, 81, 35, 0.34);
  content: "";
}

.intro-book__photo {
  position: absolute;
  inset: 7%;
  background:
    linear-gradient(180deg, rgba(3, 12, 35, 0.05), rgba(15, 24, 53, 0.48)),
    url("./assets/intro/hydropower-river-intro.jpg?v=20260806T060500Z-68e2410f2f42") center / cover no-repeat;
}

.intro-book__page-glow {
  position: absolute;
  inset: 5%;
  background: radial-gradient(circle at 64% 42%, rgba(255, 222, 140, 0.32), transparent 35%);
}

.intro-book__right-page p {
  position: absolute;
  z-index: 2;
  right: 11%;
  bottom: 11%;
  display: grid;
  gap: 3px;
  margin: 0;
  color: #fff4d5;
  text-align: right;
  text-shadow: 0 2px 8px #081227;
}

.intro-book__right-page p span {
  font-size: clamp(6px, 1.7vw, 10px);
  letter-spacing: 0.08em;
}

.intro-book__right-page p strong {
  color: #f7d77c;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(11px, 3vw, 18px);
  letter-spacing: 0.12em;
}

.intro-book__cover {
  z-index: 4;
  transform-style: preserve-3d;
  transform-origin: left center;
  will-change: transform;
  animation: intro-cover-open var(--intro-duration) linear both;
}

.intro-book__cover-front,
.intro-book__cover-inside {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 2px 7px 7px 2px;
  backface-visibility: hidden;
}

.intro-book__cover-front {
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(246, 212, 119, 0.6);
  background:
    radial-gradient(circle at 64% 20%, rgba(133, 15, 28, 0.24), transparent 29%),
    linear-gradient(145deg, #1d1720 0%, #090d18 46%, #160e12 100%);
  box-shadow: inset 11px 0 19px rgba(0, 0, 0, 0.55), inset 0 0 28px rgba(246, 212, 119, 0.06);
}

.intro-book__cover-front::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 15%, rgba(255, 232, 169, 0.18) 48%, transparent 65%);
  content: "";
  transform: translateX(-120%);
  animation: intro-cover-shine 2.4s ease 1.1s both;
}

.intro-book__frame {
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(246, 212, 119, 0.48);
  box-shadow: inset 0 0 0 4px rgba(246, 212, 119, 0.035);
}

.intro-book__mark {
  position: relative;
  width: clamp(15px, 4.8vw, 27px);
  aspect-ratio: 1;
  margin-bottom: 7%;
  border: 1px solid var(--intro-gold);
  transform: rotate(45deg);
}

.intro-book__mark i {
  position: absolute;
  width: 32%;
  aspect-ratio: 1;
  background: var(--intro-gold);
}

.intro-book__mark i:first-child { top: 16%; left: 16%; }
.intro-book__mark i:last-child { right: 15%; bottom: 15%; }

.intro-book__cover-front p {
  margin: 0 0 8%;
  color: #f9e9b6;
  font-size: clamp(7px, 2vw, 11px);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.65;
  text-align: center;
}

.intro-book__cover-front strong {
  color: var(--intro-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 10vw, 62px);
  font-weight: 500;
  line-height: 0.82;
}

.intro-book__cover-front small {
  margin-top: 6%;
  color: rgba(246, 212, 119, 0.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(6px, 1.7vw, 9px);
  letter-spacing: 0.18em;
}

.intro-book__cover-inside {
  display: grid;
  align-content: center;
  gap: 7%;
  padding: 13%;
  border: 1px solid rgba(187, 149, 77, 0.62);
  background:
    linear-gradient(90deg, rgba(88, 52, 21, 0.24), transparent 18%),
    #e8d9b8;
  color: #5a351c;
  text-align: center;
  transform: rotateY(180deg);
  box-shadow: inset -14px 0 24px rgba(74, 49, 24, 0.22);
}

.intro-book__cover-inside span {
  font-size: clamp(8px, 2vw, 11px);
  letter-spacing: 0.26em;
}

.intro-book__cover-inside strong {
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(12px, 3.4vw, 20px);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.6;
}

.intro-book__cover-inside i {
  justify-self: center;
  width: 62%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #98632d, transparent);
}

.intro-book__spine {
  position: absolute;
  z-index: 7;
  top: 1%;
  bottom: 1%;
  left: 0;
  width: 5px;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(246, 212, 119, 0.36), rgba(0, 0, 0, 0.45));
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.55);
  transform: translateZ(9px);
}

.intro-stage__status {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 0;
  margin: 0;
  color: rgba(255, 239, 198, 0.48);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-align: center;
  animation: intro-status-lifecycle var(--intro-duration) ease both;
}

@media (min-width: 740px) {
  .intro-ready .intro-stage {
    --page-width: clamp(150px, 19vw, 196px);
  }

  .intro-stage__copy {
    top: clamp(76px, 11vh, 126px);
    left: 50%;
    width: min(74vw, 560px);
    text-align: center;
    transform: translateX(-50%);
  }

  .intro-stage__year {
    justify-content: center;
  }

  .intro-stage__copy h1 {
    font-size: clamp(30px, 3.5vw, 50px);
  }

  .intro-stage__copy > p:last-child {
    font-size: 11px;
  }

  .intro-book-stage {
    top: 59%;
  }
}

@media (max-height: 610px) and (max-width: 739px) {
  .intro-ready .intro-stage { --page-width: clamp(134px, 36vw, 178px); }
  .intro-stage__copy { top: 60px; }
  .intro-stage__copy h1 { font-size: clamp(22px, 6vw, 30px); }
  .intro-stage__copy > p:last-child { margin-top: 9px; }
  .intro-book-stage { top: 65%; }
}
