:root {
  --ivory: #f8f2e8;
  --cream: #efe3ca;
  --gold: #c79b4f;
  --sage: #8fa58b;
  --white: #ffffff;
  --soft-brown: #5f4938;
  --text: #3d2f23;
  --shadow: 0 20px 50px rgba(44, 34, 18, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--ivory), #fffdf9 90%, var(--cream));
  overflow-x: hidden;
}
body:not(.is-open) {
  overflow-y: hidden;
  height: 100vh;
}
main {
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease .15s;
}
body.is-open main {
  opacity: 1;
  pointer-events: auto;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.background-orbs span, .background-orbs::before, .background-orbs::after {
  position: fixed; inset: auto; border-radius: 50%; filter: blur(80px); opacity: .28; z-index: -2; pointer-events: none;
}
.background-orbs span:nth-child(1) { width: 280px; height: 280px; background: var(--gold); top: 3%; left: -8%; }
.background-orbs span:nth-child(2) { width: 220px; height: 220px; background: var(--sage); bottom: 12%; right: -5%; }
.background-orbs span:nth-child(3) { width: 260px; height: 260px; background: var(--cream); top: 45%; left: 45%; }

.opening-screen {
  min-height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  color: white;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.55));
  z-index: 30;
}
.opening-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1519225421980-715cb0215aed?auto=format&fit=crop&w=1800&q=80');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
}
.opening-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .45s ease, visibility .45s ease .45s;
}
.opening-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.65));
  z-index: 1;
}
.opening-content { position: relative; z-index: 2; max-width: 720px; }
.eyebrow { text-transform: uppercase; letter-spacing: .5em; font-size: .8rem; color: var(--gold); font-weight: 600; }
.opening-screen .eyebrow { color: var(--cream); }
.opening-content h1, .hero-copy h2, .section-heading h3, .profile-body h4, .timeline-card h4, .event-card h4, .gift-card h4, .location-details h4, .rsvp-preview h4, .footer h4 { font-family: 'Playfair Display', serif; }
.opening-content h1 { font-size: clamp(2.4rem, 5vw, 4.3rem); margin: 0.5rem 0; }
.opening-date { font-family: 'Cormorant Garamond', serif; font-size: 1.35rem; }
.opening-card { margin-top: 2rem; padding: 2rem; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,0.12); backdrop-filter: blur(18px); border-radius: 28px; box-shadow: var(--shadow); }
.to-label { font-size: .9rem; text-transform: uppercase; letter-spacing: .2em; color: var(--cream); }
.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--cream);
  font-size: .95rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  animation: bounceHint 1.8s infinite;
}
.scroll-hint .scroll-arrow { display: block; margin-top: .35rem; font-size: 1.2rem; }
.primary-btn, .ghost-btn {
  border: none; border-radius: 999px; padding: .95rem 1.4rem; transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.primary-btn {
  background: linear-gradient(135deg, var(--gold), #e7c979);
  color: var(--soft-brown);
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(199,155,79,.25);
}
.ghost-btn {
  background: rgba(255,255,255,.14); color: var(--white);
  border: 1px solid rgba(255,255,255,.25);
}
.primary-btn:hover, .ghost-btn:hover { transform: translateY(-2px); }

.site-header {
  position: sticky; top: 0; z-index: 20; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center;
  background: rgba(248, 242, 232, .8); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(95,73,56,.08);
}
.brand { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; font-weight: 700; color: var(--soft-brown); }
.desktop-nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.desktop-nav a { color: var(--soft-brown); padding: .35rem .65rem; border-radius: 999px; }
.desktop-nav a:hover { background: rgba(199,155,79,.15); }

.section { padding: 6rem 2rem; max-width: 1200px; margin: 0 auto; }
.hero {
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3rem;
  align-items: center;
}
.hero-visual {
  width: 100%;
  height: min(70vh, 540px);
  overflow: hidden;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 32px;
  box-shadow: var(--shadow);
}
.hero-copy h2 { font-size: clamp(2rem, 3.7vw, 3rem); margin: .5rem 0 1rem; }
.quran { font-family: 'Cormorant Garamond', serif; font-size: 1.35rem; line-height: 1.7; }
.verse { font-weight: 700; color: var(--gold); }
.hero-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.hero-meta > div { padding: 1rem; border-radius: 20px; background: rgba(255,255,255,.65); box-shadow: var(--shadow); }
.hero-meta span { display: block; color: var(--sage); font-size: .8rem; text-transform: uppercase; letter-spacing: .2em; }

.couple-grid, .event-grid, .gift-grid, .rsvp-grid, .location-grid { display: grid; gap: 1.6rem; }
.couple-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-card, .gift-card, .rsvp-form, .rsvp-preview, .guestbook-card, .map-card, .location-details, .music-card { background: rgba(255,255,255,.75); border: 1px solid rgba(95,73,56,.09); border-radius: 28px; padding: 1.4rem; box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.event-card {
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(239,227,202,.78));
  border: 1px solid rgba(95,73,56,.12);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.event-card h4 {
  margin: 0 0 .75rem;
  font-size: 1.35rem;
  color: var(--soft-brown);
}
.event-card p {
  margin: .35rem 0;
  line-height: 1.6;
}
.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1rem;
}
.event-actions .ghost-btn {
  background: rgba(95,73,56,.08);
  color: var(--soft-brown);
  border-color: rgba(95,73,56,.14);
}
.profile-card img { border-radius: 24px; height: 320px; object-fit: cover; margin-bottom: 1rem; }
.social-links { display: flex; gap: .8rem; margin-top: 1rem; }
.social-links a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); }

.timeline { position: relative; margin-top: 2rem; padding-left: 1rem; }
.timeline::before { content: ''; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--gold), var(--sage)); }
.timeline-item { position: relative; padding-left: 2.4rem; margin-bottom: 1.5rem; }
.timeline-marker { position: absolute; left: 4px; top: 18px; width: 16px; height: 16px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(199,155,79,.15); }
.timeline-card { padding: 1.2rem 1.4rem; border-radius: 20px; background: rgba(255,255,255,.72); box-shadow: var(--shadow); }

.countdown-card { display: grid; place-items: center; padding: 2rem; border-radius: 32px; background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(239,227,202,.75)); box-shadow: var(--shadow); }
.countdown-circle { width: min(100%, 520px); aspect-ratio: 1; border-radius: 50%; padding: 1rem; background: conic-gradient(var(--gold) 0deg, var(--cream) 0deg); display: grid; place-items: center; }
.circle-inner { width: 100%; height: 100%; border-radius: 50%; padding: 2rem; display: grid; place-items: center; background: rgba(248,242,232,.92); text-align: center; }
.countdown-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; width: 100%; }
.countdown-values strong { display: block; font-size: 2rem; color: var(--gold); }
.countdown-values span { color: var(--sage); }

.gallery-carousel { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 1rem; }
.gallery-stage { overflow: hidden; border-radius: 28px; }
.gallery-track { display: flex; transition: transform .45s ease; will-change: transform; }
.gallery-slide { min-width: 100%; position: relative; }
.gallery-slide img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; border-radius: 28px; cursor: zoom-in; }
.carousel-nav {
  width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(95,73,56,.9); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow);
}
.gallery-dots { display: flex; justify-content: center; gap: .55rem; margin-top: 1rem; }
.gallery-dots button {
  width: 12px; height: 12px; border: 0; border-radius: 50%; background: rgba(95,73,56,.28); padding: 0;
}
.gallery-dots button.active { background: var(--gold); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.84); display: none; place-items: center; z-index: 100; padding: 1rem; }
.lightbox.active { display: grid; }
.lightbox img { max-width: min(100%, 980px); max-height: 88vh; border-radius: 18px; }
.lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; }

.gift-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.gift-card img { margin: 1rem 0; border-radius: 20px; }

.rsvp-grid { grid-template-columns: 1.15fr .85fr; }
.rsvp-form label, .guestbook-form input, .guestbook-form textarea, .rsvp-form input, .rsvp-form textarea { display: block; width: 100%; margin-top: .5rem; margin-bottom: 1rem; }
.rsvp-form input, .rsvp-form textarea, .guestbook-form input, .guestbook-form textarea { border: 1px solid rgba(95,73,56,.16); border-radius: 14px; padding: .95rem 1rem; background: rgba(255,255,255,.85); }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 700; margin-bottom: .5rem; }
#rsvpList, #guestbookEntries { padding: 0; list-style: none; display: grid; gap: 1rem; }
#rsvpList li, #guestbookEntries li { padding: 1rem; border-radius: 18px; background: rgba(255,255,255,.8); }

.location-grid { grid-template-columns: 1.25fr .75fr; }
.map-card iframe { width: 100%; min-height: 380px; border: 0; border-radius: 24px; }
.music-card { text-align: center; }
.playlist { list-style: none; padding: 0; display: grid; gap: .7rem; margin-top: 1rem; }
.playlist li { padding: .85rem 1rem; border-radius: 999px; background: rgba(143,165,139,.12); }
.playlist li.active { background: rgba(199,155,79,.2); color: var(--soft-brown); font-weight: 700; }

.share-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.share-actions .ghost-btn { color: var(--soft-brown); border-color: rgba(95,73,56,.14); }

.footer { text-align: center; padding: 3rem 2rem 5rem; background: rgba(255,255,255,.4); }
.floating-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 1rem; z-index: 30; display: none; gap: .7rem; padding: .7rem; border-radius: 999px; background: rgba(255,255,255,.88); backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.floating-nav a { display: flex; flex-direction: column; align-items: center; padding: .45rem .55rem; border-radius: 999px; font-size: .72rem; }
.floating-nav a:hover { background: rgba(199,155,79,.16); }
.reveal {
  opacity: 0;
  transform: translateY(80px) scale(0.75);
  filter: blur(8px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.22,1,.36,1), filter .9s ease;
  will-change: transform, opacity, filter;
}
.reveal.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

body.is-open .site-header { background: rgba(248,242,232,.96); }
body.is-open .opening-screen { display: none; }
