/**
 * 进入页 Landing — 浅色质感 + 水波纹/气泡 + 打字机与淡入淡出
 * 由 landing.js 控制 body.landing-dismissed 切换主应用
 */

body:not(.landing-dismissed) {
  overflow: hidden;
}

.main-app {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
  min-height: 100vh;
}

body.landing-dismissed .main-app {
  opacity: 1;
  pointer-events: auto;
}

.landing {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #e8e6e0 0%, #dfdbd4 45%, #e5e2dc 100%);
  transition: opacity 0.65s ease, visibility 0.65s ease;
  opacity: 1;
  visibility: visible;
}

.landing--leave {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 背景动效层 */
.landing__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 水波纹：同心扩散 */
.landing__ripple {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  opacity: 0;
  animation: landing-ripple 7s ease-out infinite;
}

.landing__ripple--1 {
  width: 120%;
  aspect-ratio: 1;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  animation-delay: 0s;
}

.landing__ripple--2 {
  width: 95%;
  aspect-ratio: 1;
  left: 24%;
  top: 56%;
  transform: translate(-50%, -50%);
  border-color: rgba(90, 70, 55, 0.09);
  animation-duration: 8.5s;
  animation-delay: 1.2s;
}

.landing__ripple--3 {
  width: 65%;
  aspect-ratio: 1;
  left: 82%;
  top: 38%;
  transform: translate(-50%, -50%);
  border-color: rgba(255, 255, 255, 0.38);
  animation-duration: 6.5s;
  animation-delay: 2.4s;
}

@keyframes landing-ripple {
  0% {
    transform: translate(-50%, -50%) scale(0.68);
    opacity: 0;
  }
  14% {
    opacity: 0.32;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.18);
    opacity: 0;
  }
}

/* 气泡漂浮 */
.landing__bubbles {
  position: absolute;
  inset: 0;
}

.landing__bubble {
  position: absolute;
  bottom: -12%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0.08) 45%,
    rgba(255, 255, 255, 0.03) 70%
  );
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
  animation: landing-float linear infinite;
  opacity: 0.85;
}

@keyframes landing-float {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  8% {
    opacity: 0.75;
  }
  92% {
    opacity: 0.55;
  }
  100% {
    transform: translateY(-110vh) translateX(var(--drift, 0px)) scale(0.92);
    opacity: 0;
  }
}

/* 中央内容 */
.landing__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem min(1.5rem, 4vw) 3rem;
  max-width: min(96vw, 52rem);
  width: 100%;
}

/* 英文欢迎语：更大占比（约 40% 视口高 + 大号字号） */
.landing__typewrap {
  margin: 0 0 2rem;
  min-height: 42vh;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2.35rem, 10vmin, 6.25rem);
  letter-spacing: 0.025em;
  color: #141210;
  line-height: 1.08;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.landing__caret {
  display: inline-block;
  margin-left: 0.12em;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 500;
  color: #4a3428;
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.landing__caret.is-loaded {
  width: auto;
  opacity: 1;
}

.landing__caret--blink {
  animation: landing-caret-blink 0.95s step-end infinite;
}

@keyframes landing-caret-blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.landing__cta {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.65rem 2rem;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #faf8f5;
  background: #4a3428;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 4px 18px rgba(45, 35, 28, 0.18);
}

.landing__cta:hover {
  transform: translateY(-2px);
  background: #3d2b22;
  box-shadow: 0 8px 26px rgba(45, 35, 28, 0.22);
}

.landing__cta:focus-visible {
  outline: 2px solid #ba7e3a;
  outline-offset: 3px;
}

.landing__hint {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 0.8rem;
  color: #6c6560;
  letter-spacing: 0.06em;
}

.landing__hint-en {
  display: block;
  margin-top: 0.35rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a847c;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
