:root {
  --ivory: #efecdf;
  --olive: #7d8660;
  --burgundy: #651321;
  --ink: #31352a;
  --header-h: 66px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 18px); }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px clamp(18px, 4vw, 52px);
  z-index: 100;
  background: rgba(239,236,223,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(90,88,67,.12);
}
.brand img { width: 54px; height: auto; }
.menu-toggle {
  width: 44px; height: 44px; border: 0; padding: 10px;
  background: transparent; cursor: pointer; display: grid; align-content: center; gap: 5px;
}
.menu-toggle span { height: 1px; width: 100%; background: #626754; transition: .35s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
.menu-backdrop {
  position: fixed; inset: var(--header-h) 0 0; z-index: 98;
  background: rgba(26, 29, 20, .18);
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
  backdrop-filter: blur(1px);
}
.menu-backdrop.open { opacity: 1; pointer-events: auto; }
.menu {
  position: fixed; top: var(--header-h); right: 0; width: min(82vw, 360px); height: calc(100vh - var(--header-h));
  z-index: 99; background: rgba(239,236,223,.97); padding: 38px 32px; display: flex; flex-direction: column; gap: 22px;
  transform: translateX(105%); transition: transform .45s cubic-bezier(.22,.61,.36,1); box-shadow: -12px 0 40px rgba(38,38,28,.12);
}
.menu.open { transform: translateX(0); }
.menu a { text-decoration: none; text-transform: uppercase; letter-spacing: .18em; font-size: 13px; }

.music-toggle {
  position: fixed; right: 16px; bottom: 18px; z-index: 110;
  border: 1px solid rgba(255,255,255,.45); border-radius: 999px;
  background: rgba(74,79,56,.86); color: white; min-width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px;
  box-shadow: 0 8px 24px rgba(35,39,25,.22); cursor: pointer; backdrop-filter: blur(10px);
}
.music-icon { font-size: 20px; line-height: 1; }
.music-label { font: 11px/1.1 Arial, sans-serif; text-transform: uppercase; letter-spacing: .12em; }
.music-toggle.playing .music-icon { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.15); opacity: .72; } }

.scene { position: relative; overflow: hidden; scroll-margin-top: calc(var(--header-h) + 18px); }
.hero {
  min-height: 980px;
  padding: calc(var(--header-h) + 54px) 4vw 80px;
  background: url('assets/hero-bg.jpg') center/cover no-repeat;
}
.hero-wash { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(247,244,228,.1), rgba(224,222,190,.05)); }
.hero-stage { position: relative; max-width: 1240px; margin: 0 auto; min-height: 850px; }
.banner { width: min(92%, 1030px); max-height: 430px; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 16px 15px rgba(42,42,27,.2)); }
.stationery-stack { position: relative; max-width: 1120px; margin: 20px auto 0; min-height: min(1030px, calc(120px + 74vw)); }
.envelope { position: absolute; width: 54%; left: 4%; top: 110px; filter: drop-shadow(0 18px 18px rgba(35,35,20,.22)); }
.location-wrap { position: absolute; width: 45%; right: 5%; top: 175px; filter: drop-shadow(0 18px 18px rgba(35,35,20,.24)); }
.location-wrap img, .rsvp-wrap img { width: 100%; }

.hotspot { position: absolute; display: block; z-index: 10; border-radius: 10px; }
.hotspot:focus-visible { outline: 3px solid white; box-shadow: 0 0 0 5px var(--burgundy); }
.hotspot-waze { left: 15%; top: 65.7%; width: 34%; height: 8.2%; }
.hotspot-maps { left: 53.5%; top: 65.7%; width: 34%; height: 8.2%; }

.paper-section { background: var(--ivory); }
.dress { min-height: 640px; display: grid; place-items: center; padding: 80px 5vw; background: url('assets/dress-bg.jpg') center/cover; }
.dress-card { width: min(1100px, 94vw); }

.cards { min-height: 1500px; padding: 80px 4vw 120px; background: url('assets/cards-bg.jpg') center/cover no-repeat; }
.cards::before { content:''; position:absolute; inset:0; background: linear-gradient(to bottom, rgba(10,43,53,.02), rgba(25,40,33,.08)); }
.cards-stage { position: relative; max-width: 1180px; margin: 0 auto; }
.gifts-heading { width: min(640px, 78vw); margin: 0 3% 24px auto; }
.cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.card-piece { width: 100%; filter: drop-shadow(0 20px 18px rgba(20,29,20,.25)); }
.rsvp-wrap { position: relative; width: min(620px, 82vw); margin: 70px auto 0; filter: drop-shadow(0 20px 18px rgba(20,29,20,.25)); }
.hotspot-rsvp { left: 39.8%; top: 52.3%; width: 21.2%; height: 7%; }

.adults { min-height: 490px; display: grid; place-items: center; padding: 70px 3vw; background: url('assets/kids-bg.jpg') center/cover; }
.adults-card { width: min(1450px, 96vw); }

.photos { min-height: 900px; display: grid; place-items: center; padding: 100px 4vw 130px; background: url('assets/photos-bg.jpg') center/cover no-repeat; }
.photos::before { content:''; position:absolute; inset:0; background: linear-gradient(to top, rgba(53,47,31,.22), rgba(255,255,255,.03)); }
.photos-piece { position: relative; width: min(1380px, 96vw); filter: drop-shadow(0 24px 18px rgba(26,23,17,.32)); }

footer { padding: 38px 20px 46px; text-align: center; background: var(--ivory); }
footer img { width: 50px; margin: 0 auto 12px; }
footer p { margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }

.reveal { opacity: 0; transition: opacity 1s ease, transform 1.15s cubic-bezier(.22,.61,.36,1); will-change: transform, opacity; }
.reveal.visible { opacity: 1; transform: none !important; }
.drop { transform: translateY(-45px); }
.rise { transform: translateY(50px); }
.slide-left { transform: translateX(-55px) rotate(-1.2deg); }
.slide-right { transform: translateX(55px) rotate(1.2deg); }
.photos-enter { transform: translateY(60px) scale(.965); }

@media (max-width: 760px) {
  :root { --header-h: 58px; }
  .site-header { padding: 8px 14px; }
  .brand img { width: 46px; }
  .music-label { display: none; }
  .music-toggle { width: 46px; padding: 0; }
  .hero { min-height: 820px; padding: calc(var(--header-h) + 34px) 12px 55px; background-position: 52% center; }
  .hero-stage { min-height: 720px; }
  .banner { width: 100%; }
  .stationery-stack { min-height: calc(190px + 106vw); margin-top: 5px; }
  .envelope { width: 77%; left: -7%; top: 95px; }
  .location-wrap { width: 69%; right: -4%; top: 205px; }
  .dress { min-height: 420px; padding: 54px 10px; }
  .dress-card { width: 110%; max-width: none; }
  .cards { min-height: 1450px; padding: 58px 12px 80px; background-position: 53% center; }
  .gifts-heading { width: 84%; margin-right: -2%; }
  .cards-grid { grid-template-columns: 1fr; gap: 28px; }
  .card-piece { width: 82%; }
  .card-piece:first-child { margin-left: 0; }
  .card-piece:last-child { margin-left: auto; }
  .rsvp-wrap { width: 96%; margin-top: 46px; }
  .adults { min-height: 310px; padding: 36px 6px; }
  .adults-card { width: 112%; max-width: none; }
  .photos { min-height: 560px; padding: 70px 4px 95px; background-position: center; }
  .photos-piece { width: 112%; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

body.menu-open { overflow: hidden; }
