/* ── Variables ── */
:root {
  --cream: #FAF7F2;
  --rose: #E8C4C4;
  --gold: #C9A962;
  --gold-light: #E8D5A8;
  --brown: #3D2B1F;
  --brown-light: #6B5344;
  --white: #FFFFFF;
  --shadow: rgba(61, 43, 31, 0.12);
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Montserrat', system-ui, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--brown);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

.body--locked {
  overflow: hidden;
}

/* ── Opening overlay ── */
.open-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(61, 43, 31, 0.92);
  backdrop-filter: blur(8px);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.open-overlay--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.open-overlay__card {
  text-align: center;
  padding: 3rem 2.5rem;
  max-width: 420px;
}

.open-overlay__pretitle {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 1rem;
}

.open-overlay__names {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 600;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.open-overlay__hint {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 2.5rem;
  letter-spacing: 0.03em;
}

.open-overlay__btn {
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brown);
  background: var(--gold);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: borderGlow 3s ease-in-out infinite;
}

.open-overlay__btn:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(201, 169, 98, 0.4);
}

/* ── Music toggle ── */
.music-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(201, 169, 98, 0.5);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--brown);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--shadow);
  transition: background 0.2s ease;
}

.music-toggle:hover {
  background: var(--gold);
  color: var(--white);
}

.music-toggle__icon--off { display: none; }
.music-toggle:not(.music-toggle--playing) .music-toggle__icon--on { display: none; }
.music-toggle:not(.music-toggle--playing) .music-toggle__icon--off { display: block; }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ── Shared typography ── */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 600;
  text-align: center;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--brown-light);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  margin-bottom: 3rem;
}

/* ── Paw decoration ── */
.paw {
  position: absolute;
  width: 64px;
  height: 64px;
  color: var(--gold);
  opacity: 0.15;
  pointer-events: none;
}

.paw--tl { top: 2rem; left: 2rem; animation: float 6s ease-in-out infinite; }
.paw--br { bottom: 2rem; right: 2rem; animation: float 6s ease-in-out 3s infinite; }
.paw--center {
  position: relative;
  margin: 2rem auto 0;
  opacity: 0.2;
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@supports (animation-timeline: view()) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: revealAnim linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
    transition: none;
  }

  @keyframes revealAnim {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ── 1. Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1.05); }
  to { transform: scale(1.12); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(61, 43, 31, 0.45) 0%,
    rgba(61, 43, 31, 0.25) 50%,
    rgba(250, 247, 242, 0.6) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
}

.hero__tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--rose);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  animation: fadeUp 1s ease 0.2s both;
}

.hero__names {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 600;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 40%, var(--gold-light) 80%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 1s ease 0.5s both;
}

.hero__names .amp {
  font-style: italic;
  font-weight: 400;
  -webkit-text-fill-color: var(--rose);
  background: none;
}

.hero__date {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--white);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 1.5rem;
  animation: fadeUp 1s ease 0.8s both;
}

.hero__venue {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.5rem;
  animation: fadeUp 1s ease 1s both;
}

.hero__address {
  font-size: clamp(0.75rem, 1.8vw, 0.95rem);
  color: rgba(255, 255, 255, 0.7);
  margin: 0.4rem auto 0;
  max-width: 480px;
  line-height: 1.5;
  text-align: center;
  animation: fadeUp 1s ease 1.1s both;
}

.hero__scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 3rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: fadeUp 1s ease 1.3s both, bounce 2s ease 2s infinite;
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── 2. Scroll-video ── */
.scroll-video {
  position: relative;
  height: 300vh;
}

.scroll-video__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brown);
}

.scroll-video__player {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.scroll-video__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 3rem 2rem;
  background: linear-gradient(
    to top,
    rgba(61, 43, 31, 0.7) 0%,
    rgba(61, 43, 31, 0.1) 50%,
    transparent 100%
  );
  pointer-events: none;
}

.scroll-video__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--white);
  font-weight: 600;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.scroll-video__subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
}

.scroll-video__progress {
  width: min(400px, 80vw);
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  margin-top: 1.5rem;
  overflow: hidden;
}

.scroll-video__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 0.05s linear;
}

/* ── 3. Gallery vertical scroll ── */
.gallery {
  padding: 5rem 2rem 6rem;
  background: var(--cream);
}

.gallery__header {
  max-width: 600px;
  margin: 0 auto 3rem;
}

.gallery__stack {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.gallery__photo {
  background: var(--white);
  padding: 1.25rem;
  box-shadow: 0 12px 40px var(--shadow), 0 4px 12px rgba(0, 0, 0, 0.06);
  border-radius: 4px;
}

.gallery__photo img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 2px;
}

/* ── 4. Details ── */
.details {
  padding: 6rem 2rem;
  background: linear-gradient(180deg, var(--cream) 0%, var(--rose) 40%, var(--cream) 100%);
}

.details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 3rem auto 0;
}

.glass-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(201, 169, 98, 0.4);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
}

.glass-card__icon {
  width: 48px;
  height: 48px;
  color: var(--gold);
  margin: 0 auto 1rem;
}

.glass-card h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.glass-card__time {
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.glass-card p:last-child {
  font-size: 0.9rem;
  color: var(--brown-light);
  line-height: 1.7;
}

/* ── 5. RSVP ── */
.rsvp {
  padding: 6rem 2rem 4rem;
  background: var(--cream);
  text-align: center;
}

.rsvp__inner {
  max-width: 550px;
  margin: 0 auto;
}

.rsvp__text {
  color: var(--brown-light);
  font-size: 0.95rem;
  line-height: 1.8;
  margin: 1.5rem 0 2.5rem;
}

.rsvp__btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brown);
  background: transparent;
  border: 2px solid var(--gold);
  border-radius: 50px;
  position: relative;
  transition: color 0.3s ease, background 0.3s ease;
  animation: borderGlow 3s ease-in-out infinite;
}

.rsvp__btn:hover {
  background: var(--gold);
  color: var(--white);
  animation: none;
}

@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 98, 0.4); }
  50% { box-shadow: 0 0 20px 4px rgba(201, 169, 98, 0.3); }
}

.rsvp__footer {
  margin-top: 2rem;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--brown-light);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__bg { animation: none; }
  .scroll-video { height: auto; }
  .scroll-video__sticky { position: relative; height: auto; min-height: 60vh; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .scroll-video { height: 200vh; }

  .gallery__stack { gap: 3rem; }

  .paw { width: 40px; height: 40px; }
  .paw--tl { top: 1rem; left: 1rem; }
  .paw--br { bottom: 1rem; right: 1rem; }
}
