:root {
  --text: #ffffff;
  --soft: rgba(255, 245, 232, 0.95);
  --line: rgba(245, 203, 142, 0.3);
  --card: rgba(63, 12, 24, 0.5);
  --glow: 0 24px 90px rgba(28, 4, 10, 0.6);
  --gold: linear-gradient(135deg, #f3c876 0%, #ffebc2 50%, #f3c876 100%);
  --gold-static: #f3c876;
  --gold-soft: rgba(248, 216, 155, 0.9);
  --accent-blue: #83d2ff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  -webkit-font-smoothing: antialiased;
  background: #0a1029;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

/* 动态背景层修正 */
.bg-layers {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #0a1029; /* 底色 */
}

.bg-main {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(253, 198, 110, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(58, 9, 24, 0.3) 0%, rgba(24, 21, 58, 0.2) 45%, #0a1029 100%);
  z-index: 1;
}

.bg-texture {
  position: absolute;
  inset: 0;
  background: url("./bg.png") center top / cover no-repeat;
  opacity: 1; /* 还原背景图完整清晰度 */
  z-index: 0;
}

.bg-particles {
  position: absolute;
  inset: 0;
  background: radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
              radial-gradient(1.5px 1.5px at 50px 160px, #f3c876, rgba(0,0,0,0)),
              radial-gradient(1px 1px at 90px 40px, #fff, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 250px 250px;
  opacity: 0.3;
  animation: bgFloating 50s linear infinite;
  z-index: 2;
}

@keyframes bgFloating {
  from { transform: translateY(0); }
  to { transform: translateY(-250px); }
}

.invite {
  width: 100%;
}

/* 页面指示器优化 */
.page-indicator {
  position: fixed;
  top: 50%;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px;
  border: 1px solid rgba(243, 200, 118, 0.25);
  border-radius: 99px;
  background: rgba(5, 18, 56, 0.4);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

#currentPage {
  font-size: 20px;
  font-weight: 700;
  background: var(--gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 金属光泽标题 */
.metallic-gold {
  background: var(--gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.metallic-gold::after {
  content: "";
  position: absolute;
  top: -12%;
  left: -90%;
  width: 34%;
  height: 124%;
  opacity: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.12) 24%,
    rgba(255, 255, 255, 0.78) 50%,
    rgba(255, 255, 255, 0.12) 76%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-22deg) translateX(0);
  pointer-events: none;
  will-change: transform, opacity;
}

.active .metallic-gold::after {
  animation: shine 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes shine {
  0% {
    transform: skewX(-22deg) translateX(0);
    opacity: 0;
  }
  18% {
    opacity: 0.96;
  }
  100% {
    transform: skewX(-22deg) translateX(520%);
    opacity: 0;
  }
}

.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(36px, 6vw, 72px) 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
}

/* 入场动画基类 */
.reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.52s ease,
    transform 0.68s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.active .reveal {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

.hero {
  align-items: center;
  text-align: center;
}

.brand-fixed {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 90;
  width: min(35vw, 180px);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  transition: transform 0.4s ease, opacity 0.35s ease;
  will-change: transform, opacity;
}

.hero-copy {
  margin-top: clamp(64px, 10vw, 128px);
  width: min(95vw, 600px); /* 允许在移动端占用更多宽度 */
  padding: 40px 24px;
  border: 1px solid rgba(243, 200, 118, 0.25);
  border-radius: 32px;
  background: rgba(123, 18, 34, 0.1);
  backdrop-filter: blur(6px);
  box-shadow: var(--glow);
}

.hero-sub {
  margin: 12px 0;
  font-size: clamp(16px, 4.5vw, 22px); /* 响应式字号 */
  letter-spacing: 0.05em;
  color: var(--soft);
  white-space: nowrap; /* 强制不换行 */
}

.hero-sub:first-child {
  font-size: clamp(18px, 5.5vw, 24px); /* 公司名字字号 */
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-name {
  margin-top: 40px;
  width: min(92vw, 720px);
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(243, 200, 118, 0.2), rgba(243, 200, 118, 0.05));
  border: 1px solid rgba(243, 200, 118, 0.4);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-name > span,
.hero-name strong {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.hero-name strong {
  font-size: clamp(28px, 5vw, 36px);
  margin: 0;
  line-height: 1.35;
  word-break: break-word;
  color: #fff;
  text-shadow: 0 0 20px rgba(243, 200, 118, 0.5);
}

.guest-suffix,
.guest-suffix-inline {
  color: rgba(255, 245, 232, 0.92);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.guest-suffix {
  font-size: clamp(16px, 3vw, 20px);
  opacity: 0.88;
}

.guest-suffix-inline {
  margin-left: 0.35em;
  font-size: 1em;
  color: inherit;
  opacity: 1;
}

.guest-suffix:empty,
.guest-suffix-inline:empty {
  display: none;
}

.scroll-tip {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);}
  40% {transform: translateY(-10px) translateX(-50%);}
  60% {transform: translateY(-5px) translateX(-50%);}
}

.glass-card {
  width: min(100%, 600px);
  margin: 0 auto;
  padding: 40px 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
  backdrop-filter: blur(10px); /* 适度模糊，保证文字可读性的同时透出背景 */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.hero-copy,
.hero-name,
.glass-card {
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  isolation: isolate;
}

.section-title {
  display: block;
  width: fit-content;
  max-width: 100%;
  font-size: 32px;
  font-weight: 700;
  margin: 0 auto 30px;
  text-align: center;
}

.closing-title {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 26px;
  text-align: center;
}

.info .section-title,
.agenda .section-title,
.closing-title {
  position: relative;
  left: -10px;
}

.map-link {
  display: inline-block;
  margin-left: 8px;
  color: var(--gold-static);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-static);
  font-size: 14px;
  transition: opacity 0.3s;
}

.map-link:hover {
  opacity: 0.7;
}

.map-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.3s ease;
}

.map-modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.map-modal__backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(3, 8, 22, 0.18) 0%,
    rgba(3, 8, 22, 0.28) 36%,
    rgba(3, 8, 22, 0.5) 100%
  );
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
  will-change: opacity;
}

.map-modal__sheet {
  position: relative;
  width: min(100%, 640px);
  margin: 0 16px 20px;
  padding: 28px 22px 22px;
  border: 1px solid rgba(243, 200, 118, 0.24);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(80, 15, 31, 0.94) 0%, rgba(18, 24, 58, 0.96) 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
  will-change: transform, opacity;
}

.map-modal.is-open .map-modal__backdrop {
  opacity: 1;
}

.map-modal.is-open .map-modal__sheet {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.map-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--soft);
  font: inherit;
}

.map-modal__eyebrow {
  margin: 0 0 8px;
  color: rgba(255, 232, 194, 0.78);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.map-modal__title {
  margin: 0;
  font-size: clamp(24px, 6vw, 30px);
}

.map-modal__address {
  margin: 14px 0 0;
  color: rgba(255, 245, 232, 0.82);
  line-height: 1.7;
  font-size: 15px;
}

.map-modal__actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.map-option {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(243, 200, 118, 0.28);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(243, 200, 118, 0.18), rgba(255, 255, 255, 0.04));
  color: var(--text);
  font: inherit;
  font-size: 17px;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.map-option:active,
.map-option:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 235, 194, 0.56);
  background: linear-gradient(135deg, rgba(243, 200, 118, 0.26), rgba(255, 255, 255, 0.08));
}

.timeline-item {
  position: relative;
  padding: 16px 20px; /* 减小内边距 */
  margin-bottom: 12px;
  border-left: 2px solid var(--gold-static);
  background: linear-gradient(90deg, rgba(243, 200, 118, 0.1), transparent);
  border-radius: 0 16px 16px 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px; top: 22px; /* 调整圆点位置 */
  width: 12px; height: 12px;
  background: var(--gold-static);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--gold-static);
}

.event {
  font-size: 22px; /* 略微减小字号确保不折行 */
  font-weight: 600;
}

@media (max-width: 480px) {
  .hero-copy { padding: 30px 15px; width: 92vw; }
  /* hero-sub 已使用 clamp，无需在此重复设置 */
  .hero-name strong { font-size: 28px; }
  .section-title { font-size: 26px; }
  .event { font-size: 20px; }
  .screen { padding: 28px 16px; }
  .map-modal__sheet { margin: 0 10px 10px; padding: 24px 18px 18px; }
  .map-option { padding: 15px 16px; }
}
