/* ===== Intro: заставка → имена (в потоке страницы) → скролл ===== */

html.intro-active {
  overflow: hidden;
  height: 100%;
}

body.intro-active {
  overscroll-behavior: none;
}

.site-intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5c534c;
  cursor: pointer;
  background: transparent;
  transition: opacity 0.85s ease, visibility 0.85s ease;
}

.site-intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Фон — общий fixed-слой .site-bg, без дублирования */
.site-intro__fabric,
.intro-cover__fabric {
  display: none;
}

/* —— Splash overlay —— */
.intro-splash {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  cursor: pointer;
}

.intro-splash__inner {
  text-align: center;
  max-width: 340px;
}

.intro-splash__received {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: #4a433d;
  margin-bottom: 0.15rem;
  opacity: 0;
  animation: introFadeUp 1s ease 0.2s forwards;
}

.intro-splash__title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.5rem, 14vw, 5.5rem);
  font-weight: 400;
  line-height: 1;
  color: #3d3834;
  margin: 0 0 1.75rem;
  opacity: 0;
  animation: introFadeUp 1.1s ease 0.45s forwards;
}

.intro-heart {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.75rem;
  color: rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.06));
  opacity: 0;
  animation: introHeartIn 1.2s ease 0.7s forwards;
}

.intro-heart svg {
  width: 100%;
  height: 100%;
}

.intro-splash__tap {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #7a726a;
  opacity: 0;
  animation: introFadeUp 1s ease 1s forwards, introPulse 2.4s ease-in-out 1.8s infinite;
}

/* —— Names block (first screen of scrollable site) —— */
.intro-cover--page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5c534c;
  padding: 2rem 1.5rem 3rem;
  background: transparent;
}

.intro-cover__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  width: min(360px, 88vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 70vh;
  justify-content: center;
}

.intro-cover__label {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  color: #6b635c;
  margin-bottom: 2.5rem;
  opacity: 0;
}

.intro-cover__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin-bottom: auto;
}

.intro-cover__name {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  color: #3a3530;
  line-height: 1.15;
  opacity: 0;
  transform: translateY(24px);
}

.intro-cover__amp {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 300;
  color: #5c534c;
  opacity: 0;
  transform: scale(0.6);
}

.intro-cover__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  padding-bottom: clamp(3rem, 10vh, 4.5rem);
  opacity: 0;
}

.intro-cover__month {
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 3vw, 0.9rem);
  font-weight: 400;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  color: #4a433d;
  margin-bottom: 0.5rem;
}

.intro-cover__day {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 22vw, 6.5rem);
  font-weight: 400;
  line-height: 1;
  color: #2c2824;
  letter-spacing: 0.04em;
}

.intro-cover__year {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6.5vw, 2.15rem);
  font-weight: 400;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: #3a3530;
  margin-top: 0.4rem;
}

.intro-cover__scroll {
  position: absolute;
  bottom: clamp(0.75rem, 3vh, 1.75rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  opacity: 0;
}

.intro-cover__scroll-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 8vw, 2.75rem);
  font-weight: 400;
  line-height: 0.5;
  color: #3d3834;
  transform: rotate(90deg);
}

.intro-cover__scroll-line + .intro-cover__scroll-line {
  margin-top: -0.45em;
}

.intro-cover--page.is-revealed .intro-cover__label {
  animation: introFadeUp 0.9s ease 0.1s forwards;
}

.intro-cover--page.is-revealed #intro-groom {
  animation: introNameIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

.intro-cover--page.is-revealed #intro-bride {
  animation: introNameIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}

.intro-cover--page.is-revealed .intro-cover__amp {
  animation: introAmpIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.38s forwards;
}

.intro-cover--page.is-revealed .intro-cover__date {
  animation: introFadeUp 0.9s ease 0.7s forwards;
}

.intro-cover--page.is-revealed .intro-cover__scroll {
  animation: introFadeUp 0.8s ease 1s forwards, introBounce 2s ease-in-out 1.6s infinite;
}

@keyframes introFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introNameIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introAmpIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes introHeartIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes introPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes introBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  .intro-splash__received,
  .intro-splash__title,
  .intro-heart,
  .intro-splash__tap,
  .intro-cover__label,
  .intro-cover__name,
  .intro-cover__amp,
  .intro-cover__date,
  .intro-cover__scroll {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
