/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --primary:        #5B1E3E;
  --primary-dark:   #2E1232;
  --secondary:      #9B7FA6;
  --secondary-light:#C9A84C;
  --gold:           #C9A84C;
  --charcoal:       #3D3D3D;
  --blush:          #F5EDE8;
  --cream:          #faf5f1;
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
}

/* ── Reset & Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', sans-serif;
  color: var(--gray-700);
  background: var(--cream);
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; background: none; border: none; }

/* ── Utility ────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Gold Dividers ──────────────────────────────────────────────────────────── */
.gold-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.gold-divider-light {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,168,76,0.6), transparent);
}

/* ── Fade-up scroll animation ───────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }


/* ══════════════════════════════════════════════════════════════════════════════
   INVITATION SCREEN
══════════════════════════════════════════════════════════════════════════════ */
body.invitation-mode { overflow: hidden; }

#invitationScreen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(0.77,0,0.175,1), opacity 0.2s ease 0.85s;
}
#invitationScreen.flip-out {
  transform: perspective(1600px) rotateY(-180deg);
  opacity: 0;
  pointer-events: none;
}

/* Flipbook page-shadow while turning */
#invitationScreen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.18) 40%, rgba(0,0,0,0.38) 60%, rgba(0,0,0,0) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1;
}
#invitationScreen.flip-out::after { opacity: 1; }

.inv-bg { position: absolute; inset: 0; }
.inv-bg img { width: 100%; height: 100%; object-fit: cover; }
.inv-overlay-dark     { position: absolute; inset: 0; background: rgba(46, 18, 50, 0.1); }
.inv-overlay-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%); }
.inv-overlay-bottom   { position: absolute; bottom: 0; left: 0; right: 0; height: 50%; background: linear-gradient(to top, rgba(10,3,6,0.2), transparent); }

/* Particles */
@keyframes float-up {
  0%   { transform: translateY(0)     rotate(0deg);  opacity: 0.6; }
  100% { transform: translateY(-80px) rotate(20deg); opacity: 0; }
}
.particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.particle { animation: float-up 4s ease-in-out infinite; position: absolute; border-radius: 50%; }
.particle-1 { top:70%; left:15%; width:6px; height:6px; background:rgba(155,127,166,0.5); animation-duration:5s; }
.particle-2 { top:80%; left:35%; width:4px; height:4px; background:rgba(155,127,166,0.4); animation-delay:1.2s; animation-duration:4.5s; }
.particle-3 { top:75%; left:60%; width:6px; height:6px; background:rgba(255,255,255,0.3); animation-delay:0.6s; animation-duration:6s; }
.particle-4 { top:85%; left:80%; width:4px; height:4px; background:rgba(155,127,166,0.3); animation-delay:2s; animation-duration:5.5s; }

/* Invitation content */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.invite-content {
  position: relative;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 55rem;
  margin: 0 auto;
}
.invite-content > * { opacity: 0; animation: fadeInUp 0.9s ease forwards; }
.invite-content > *:nth-child(1) { animation-delay: 0.2s; }
.invite-content > *:nth-child(2) { animation-delay: 0.4s; }
.invite-content > *:nth-child(3) { animation-delay: 0.6s; }
.invite-content > *:nth-child(4) { animation-delay: 0.8s; }
.invite-content > *:nth-child(5) { animation-delay: 1.0s; }
.invite-content > *:nth-child(6) { animation-delay: 1.2s; }
.invite-content > *:nth-child(7) { animation-delay: 1.4s; }

.inv-tagline {
  color: var(--secondary);
  letter-spacing: 0.6em;
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: 500;
}
.inv-divider { max-width: 110px; margin: 1.5rem auto 2rem; }
.inv-divider-2 { max-width: 110px; margin: 2rem auto; }

.inv-title {
  font-family: 'Monotype Corsiva', cursive;
  color: white;
  line-height: 1.25;
  font-size: clamp(3.6rem, 11vw, 7rem);
  text-shadow: 0 2px 24px rgba(0,0,0,0.85), 0 0 60px rgba(0,0,0,0.5);
}
.inv-names {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(3rem, 8.5vw, 5.5rem);
  color: #2E1232;
  margin-top: 1rem;
  text-shadow: 0 0 22px rgba(255,255,255,0.95), 0 2px 10px rgba(255,255,255,0.7), 0 0 40px rgba(255,255,255,0.35);
}
.inv-date {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: white;
  font-size: 1.55rem;
  margin-bottom: 0.25rem;
  text-shadow: 0 1px 12px rgba(0,0,0,0.9);
}
.inv-venue {
  color: var(--secondary);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.65rem;
  margin-bottom: 2rem;
  text-shadow: 0 1px 12px rgba(0,0,0,0.9);
}
.ven-label {
  color: var(--gray-300);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.65rem;
  margin-bottom: 0.1rem;
  text-shadow: 0 1px 12px rgba(0,0,0,1);
}
.inv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(201,168,76,0.7);
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  transition: all 0.4s;
  text-shadow: 0 1px 12px rgba(0,0,0,0.9);
  background: none;
}
.inv-btn:hover {
  background: rgba(201,168,76,0.85);
  color: #2E1232;
  border-color: transparent;
  box-shadow: 0 10px 25px rgba(201,168,76,0.25);
}
.inv-btn svg { width: 14px; height: 14px; transition: transform 0.3s; flex-shrink: 0; }
.inv-btn:hover svg { transform: translateX(4px); }
.inv-deadline {
  margin-top: 1.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 12px rgba(0,0,0,0.9);
}

/* ══════════════════════════════════════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
  background: transparent;
}
#navbar.scrolled {
  background: rgba(250,245,241,0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 12px rgba(46,18,50,0.08);
  border-bottom: 1px solid rgba(201,168,76,0.2);
}
.nav-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#navBrand {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.3s;
  letter-spacing: 0.05em;
}
#navBrand.visible { opacity: 1; }

.nav-links {
  display: none;
  list-style: none;
  gap: 1.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }
.nav-links .nav-rsvp {
  color: var(--primary);
  font-weight: 600;
  border: 1px solid rgba(201,168,76,0.5);
  padding: 0.375rem 1.25rem;
  border-radius: 9999px;
}
.nav-links .nav-rsvp:hover {
  background: var(--blush);
  border-color: var(--gold);
  box-shadow: 0 2px 12px rgba(201,168,76,0.18);
}

#menuBtn { color: var(--gray-500); transition: color 0.2s; }
#menuBtn:hover { color: var(--primary); }
#menuBtn svg { width: 20px; height: 20px; display: block; }

#mobileMenu {
  display: none;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--gray-100);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
#mobileMenu.open { display: block; }
#mobileMenu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  gap: 1.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-500);
}
#mobileMenu a { display: block; transition: color 0.2s; }
#mobileMenu a:hover { color: var(--primary); }
#mobileMenu .nav-rsvp-mobile { color: var(--primary); font-weight: 600; }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  #menuBtn { display: none; }
}


/* ══════════════════════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════════════════════ */
#home {
  background:
    radial-gradient(ellipse at 25% 25%, rgba(155,127,166,0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(201,168,76,0.09) 0%, transparent 45%),
    radial-gradient(ellipse at 55% 40%, #F5EDE8 0%, var(--cream) 55%, #e8dbd2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}
.hero-blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-blob  { position: absolute; border-radius: 50%; }
.blob-1 { top:12%; left:5%;   width:12rem; height:12rem; background:rgba(245,237,232,0.5); filter:blur(64px); }
.blob-2 { bottom:15%; right:8%; width:14rem; height:14rem; background:rgba(245,237,232,0.4); filter:blur(64px); }
.blob-3 { top:45%; right:3%; width:8rem;  height:8rem;  background:rgba(155,127,166,0.18); filter:blur(40px); }
.blob-4 { top:30%; left:2%;  width:6rem;  height:6rem;  background:rgba(201,168,76,0.12);  filter:blur(40px); }

.hero-inner { position: relative; max-width: 48rem; margin: 0 auto; }

.hero-tagline {
  color: var(--secondary);
  letter-spacing: 0.55em;
  text-transform: uppercase;
  font-size: 0.65rem;
  margin-bottom: 1.5rem;
  font-weight: 300;
}
.hero-divider { max-width: 100px; margin: 0 auto 2rem; }
.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--gray-400);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 300;
}
.hero-name {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  line-height: 1;
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  margin-bottom: 0.5rem;
}
.hero-name-last { margin-bottom: 2rem; }
.hero-ampersand {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--secondary);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.5rem;
}
.hero-date {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--gray-500);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.hero-venue {
  color: var(--secondary);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  font-size: 0.65rem;
  margin-bottom: 3.5rem;
}

/* Countdown */
#countdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3.5rem;
}
.countdown-unit { text-align: center; }
.countdown-num {
  font-family: 'Playfair Display', serif;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
}
.countdown-label {
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-top: 0.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  transition: all 0.3s;
  box-shadow: 0 10px 25px rgba(91,30,62,0.25), 0 0 0 1px rgba(201,168,76,0.25);
  position: relative;
  overflow: hidden;
}
.hero-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(201,168,76,0.18) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}
.hero-cta:hover::after { transform: translateX(100%); }
.hero-cta:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1a0828 100%);
  box-shadow: 0 20px 35px rgba(91,30,62,0.35), 0 0 0 1px rgba(201,168,76,0.4);
  transform: translateY(-2px);
}
.hero-cta svg { width: 14px; height: 14px; flex-shrink: 0; }
.hero-deadline { margin-top: 1.25rem; font-size: 0.65rem; color: var(--gray-400); letter-spacing: 0.1em; }

/* Scroll cue */
@keyframes bounce {
  0%, 100% { transform: translateY(0) translateX(-50%); }
  50%       { transform: translateY(8px) translateX(-50%); }
}
.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  animation: bounce 1.8s ease-in-out infinite;
}
.scroll-cue svg { width: 20px; height: 20px; color: rgba(155,127,166,0.6); }

@media (min-width: 640px) {
  #countdown { gap: 3.5rem; }
}
@media (min-width: 768px) {
  .hero-subtitle { font-size: 1.5rem; }
  .hero-date     { font-size: 1.875rem; }
}


/* ══════════════════════════════════════════════════════════════════════════════
   SECTION SHARED
══════════════════════════════════════════════════════════════════════════════ */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  color: var(--secondary);
  letter-spacing: 0.45em;
  text-transform: uppercase;
  font-size: 0.65rem;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  color: var(--primary);
}
.section-divider { max-width: 70px; margin: 1.25rem auto 0; }
@media (min-width: 768px) {
  .section-title { font-size: 3rem; }
}


/* ══════════════════════════════════════════════════════════════════════════════
   DETAILS
══════════════════════════════════════════════════════════════════════════════ */
#details { padding: 7rem 1.5rem; background: white; }
.details-inner { max-width: 56rem; margin: 0 auto; }

.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .details-grid { grid-template-columns: repeat(3, 1fr); }
}

.detail-card {
  text-align: center;
  padding: 2.25rem;
  border-radius: 1rem;
  border: 1px solid var(--gray-100);
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.detail-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(91,30,62,0.10);
  border-color: rgba(155,127,166,0.2);
}
.detail-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--blush) 0%, rgba(155,127,166,0.2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 0 0 1px rgba(201,168,76,0.15);
}
.detail-icon svg { width: 20px; height: 20px; color: var(--primary); }
.detail-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.detail-card p { color: var(--gray-600); line-height: 1.6; font-size: 0.875rem; }
.detail-sub { color: var(--secondary); font-size: 0.75rem; margin-top: 0.5rem; letter-spacing: 0.05em; }


/* ══════════════════════════════════════════════════════════════════════════════
   SCHEDULE
══════════════════════════════════════════════════════════════════════════════ */
#schedule { padding: 7rem 1.5rem; background: linear-gradient(160deg, var(--cream) 0%, rgba(155,127,166,0.07) 100%); }
.schedule-inner { max-width: 36rem; margin: 0 auto; }

.timeline {
  position: relative;
  padding-left: 2.5rem;
  border-left: 1px solid rgba(155,127,166,0.25);
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -1.2rem;
  top: 0.375rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(155,127,166,0.2);
}
.timeline-dot-inner { width: 6px; height: 6px; border-radius: 50%; background: var(--secondary); }

.timeline-row { display: flex; flex-direction: column; gap: 0.25rem; }
@media (min-width: 640px) {
  .timeline-row { flex-direction: row; align-items: flex-start; gap: 1.75rem; }
}

.timeline-time {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  white-space: nowrap;
  width: 5rem;
  flex-shrink: 0;
  padding-top: 0.125rem;
}
.timeline-event h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  color: var(--primary);
  line-height: 1.3;
}
.timeline-event p { color: var(--gray-400); font-size: 0.875rem; margin-top: 0.125rem; font-weight: 300; }


/* ══════════════════════════════════════════════════════════════════════════════
   RSVP FORM
══════════════════════════════════════════════════════════════════════════════ */
#rsvp { padding: 7rem 1.5rem; background: linear-gradient(180deg, white 0%, rgba(245,237,232,0.35) 100%); }
.rsvp-inner { max-width: 32rem; margin: 0 auto; }

.rsvp-subtitle {
  color: var(--gray-400);
  margin-top: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  font-weight: 300;
  text-align: center;
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}
.alert-success-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #15803d;
  margin-bottom: 0.5rem;
}
.alert-success p { font-size: 0.875rem; color: rgba(22,101,52,0.8); }

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  text-align: center;
}

#rsvpForm { display: flex; flex-direction: column; gap: 1.75rem; }

.form-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.625rem;
}
.form-label-note { color: var(--gray-300); font-size: 0.65rem; text-transform: none; letter-spacing: normal; margin-left: 0.25rem; }
.form-required { color: var(--primary); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--gray-700);
  background: white;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--gray-300); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,30,62,0.10);
}
.form-select { color: var(--gray-600); }
.form-textarea { resize: none; }

/* Attendance cards */
.attend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.attend-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 480px) { .attend-grid-3 { grid-template-columns: 1fr; } }
.attend-card input[type="radio"] { display: none; }
.attend-card label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  border: 1.5px solid var(--gray-200);
  border-radius: 1rem;
  padding: 1.25rem;
  transition: all 0.25s;
  background: white;
  text-align: center;
}
.attend-card label:hover {
  border-color: var(--secondary);
  box-shadow: 0 4px 16px rgba(91,30,62,0.08);
}
.attend-card input[type="radio"]:checked + label {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--blush) 0%, rgba(155,127,166,0.08) 100%);
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(91,30,62,0.12), 0 0 0 1px rgba(201,168,76,0.15);
}
.attend-emoji { font-size: 1.5rem; }
.attend-title { font-weight: 600; font-size: 0.875rem; }
.attend-sub { font-size: 0.7rem; color: var(--gray-400); }
.attend-card input[type="radio"]:checked + label .attend-sub { color: rgba(91,30,62,0.6); }

/* Virtual meeting credentials box */
.virtual-creds {
  border: 1px solid rgba(155,127,166,0.35);
  background: linear-gradient(135deg, rgba(245,237,232,0.85) 0%, rgba(155,127,166,0.08) 100%);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 2px 12px rgba(91,30,62,0.06);
}
.virtual-creds-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--primary);
}
.virtual-creds-header svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.virtual-cred-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.virtual-cred-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--secondary);
  min-width: 6rem;
}
.virtual-cred-val { color: var(--primary-dark); font-weight: 600; }
.virtual-cred-link { color: var(--primary); font-weight: 600; word-break: break-all; }
.virtual-cred-link:hover { text-decoration: underline; color: var(--primary-dark); }
.virtual-creds-note { font-size: 0.75rem; color: var(--gray-400); margin: 0; }

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 1rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(91,30,62,0.2), 0 0 0 1px rgba(201,168,76,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}
.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(201,168,76,0.2) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}
.submit-btn:hover::after { transform: translateX(100%); }
.submit-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1a0828 100%);
  box-shadow: 0 8px 25px rgba(91,30,62,0.35), 0 0 0 1px rgba(201,168,76,0.35);
  transform: translateY(-2px);
}
.submit-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
#submitSpinner { width: 1rem; height: 1rem; animation: spin 0.75s linear infinite; }
#submitSpinner circle { opacity: 0.25; }
#submitSpinner path   { opacity: 0.75; }


/* ══════════════════════════════════════════════════════════════════════════════
   DRESS CODE & MOTIF
══════════════════════════════════════════════════════════════════════════════ */
#motif { padding: 7rem 1.5rem; background: linear-gradient(160deg, rgba(155,127,166,0.07) 0%, var(--cream) 50%, rgba(201,168,76,0.05) 100%); }
.motif-inner { max-width: 52rem; margin: 0 auto; }

.motif-theme-pill {
  display: inline-block;
  background: linear-gradient(135deg, var(--blush) 0%, rgba(201,168,76,0.1) 100%);
  border: 1px solid rgba(201,168,76,0.45);
  box-shadow: 0 2px 16px rgba(201,168,76,0.15);
  color: var(--primary);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.25rem;
  padding: 0.5rem 2rem;
  border-radius: 9999px;
  margin-bottom: 3rem;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.color-palette {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}
.color-swatch { text-align: center; flex: 0 0 auto; }
.swatch-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  transition: transform 0.3s;
}
.color-swatch:hover .swatch-circle { transform: scale(1.1); }
.swatch-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 0.2rem;
}
.swatch-hex { font-size: 0.65rem; color: var(--gray-400); letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.swatch-role { font-size: 0.6rem; color: var(--secondary); letter-spacing: 0.1em; text-transform: uppercase; }

.dress-code-note {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  background: white;
  border-radius: 1.25rem;
  border: 1px solid var(--gray-100);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.dress-code-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blush) 0%, rgba(155,127,166,0.2) 100%);
  border: 1px solid rgba(201,168,76,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.dress-code-icon svg { width: 20px; height: 20px; color: var(--primary); }
.dress-code-note h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.dress-code-note p { color: var(--gray-500); font-size: 0.875rem; line-height: 1.7; font-weight: 300; }

@media (min-width: 640px) {
  .swatch-circle { width: 88px; height: 88px; }
  .color-palette { gap: 2.5rem; }
}


/* ══════════════════════════════════════════════════════════════════════════════
   MAP & DIRECTIONS
══════════════════════════════════════════════════════════════════════════════ */
#map { padding: 7rem 1.5rem; background: white; }
.map-inner { max-width: 60rem; margin: 0 auto; }

.map-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 768px) {
  .map-layout { grid-template-columns: 1fr 1.6fr; align-items: stretch; }
}

.map-info { display: flex; flex-direction: column; gap: 1.5rem; }

.map-venue-block {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--blush) 0%, rgba(155,127,166,0.06) 100%);
  border-radius: 1rem;
  border: 1px solid rgba(201,168,76,0.2);
}
.map-venue-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--blush), white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-venue-icon svg { width: 18px; height: 18px; color: var(--primary); }
.map-venue-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}
.map-venue-name { font-size: 0.925rem; color: var(--gray-700); font-weight: 400; line-height: 1.4; }
.map-venue-address { font-size: 0.8rem; color: var(--gray-400); margin-top: 0.2rem; }

.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  transition: all 0.3s;
  box-shadow: 0 6px 18px rgba(91,30,62,0.2), 0 0 0 1px rgba(201,168,76,0.2);
  align-self: flex-start;
  position: relative;
  overflow: hidden;
}
.map-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.18), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.map-btn:hover::after { transform: translateX(100%); }
.map-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1a0828 100%);
  box-shadow: 0 12px 28px rgba(91,30,62,0.32), 0 0 0 1px rgba(201,168,76,0.35);
  transform: translateY(-2px);
}
.map-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.map-embed-wrap {
  border-radius: 1.25rem;
  overflow: hidden;
  min-height: 320px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  border: 1px solid var(--gray-100);
}
.map-embed-wrap iframe { display: block; width: 100%; height: 100%; min-height: 320px; }

.map-placeholder {
  min-height: 320px;
  background: linear-gradient(135deg, var(--blush) 0%, #f5ede8 50%, #faf5f1 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 2rem;
}
.map-placeholder svg { width: 56px; height: 56px; color: rgba(91,30,62,0.25); margin-bottom: 0.5rem; }
.map-ph-name { font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--primary); }
.map-ph-addr { font-size: 0.8rem; color: var(--gray-400); }
.map-ph-hint { font-size: 0.7rem; color: var(--gray-300); margin-top: 1rem; max-width: 22rem; line-height: 1.5; }
.map-ph-hint code { background: rgba(0,0,0,0.04); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.65rem; }


/* ══════════════════════════════════════════════════════════════════════════════
   ENTOURAGE LIST
══════════════════════════════════════════════════════════════════════════════ */
#entourage { padding: 7rem 1.5rem; background: linear-gradient(160deg, var(--cream) 0%, rgba(155,127,166,0.06) 100%); }
.entourage-inner { max-width: 56rem; margin: 0 auto; }

.entourage-list { display: flex; flex-direction: column; gap: 1.25rem; }

.entourage-group {
  background: white;
  border-radius: 1.25rem;
  border: 1px solid var(--gray-100);
  padding: 1.75rem 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s, border-color 0.3s;
}
.entourage-group:hover {
  box-shadow: 0 8px 28px rgba(91,30,62,0.08);
  border-color: rgba(155,127,166,0.2);
}

.entourage-group-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}
.entourage-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, var(--blush) 0%, rgba(155,127,166,0.18) 100%);
  border: 1px solid rgba(201,168,76,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.entourage-icon svg { width: 16px; height: 16px; color: var(--primary); }
.entourage-group-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--primary);
}

.entourage-columns {
  display: grid;
  grid-template-columns: repeat(var(--col-count, 1), 1fr);
  gap: 1rem 2rem;
}
@media (max-width: 480px) {
  .entourage-columns { grid-template-columns: 1fr !important; }
}

.entourage-col { display: flex; flex-direction: column; gap: 0.3rem; }
.entourage-col-label {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.entourage-name {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.5;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(155,127,166,0.25);
}


/* ══════════════════════════════════════════════════════════════════════════════
   GIFT NOTE
══════════════════════════════════════════════════════════════════════════════ */
#gift { padding: 7rem 1.5rem; background: white; }
.gift-inner { max-width: 36rem; margin: 0 auto; }

.gift-card {
  text-align: center;
  background: linear-gradient(160deg, var(--blush) 0%, rgba(155,127,166,0.06) 50%, rgba(201,168,76,0.06) 100%);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 1.5rem;
  padding: 3rem 2.5rem;
  box-shadow: 0 4px 24px rgba(91,30,62,0.06), 0 0 0 1px rgba(201,168,76,0.08) inset;
}
.gift-envelope-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blush), white);
  border: 1px solid rgba(155,127,166,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 16px rgba(91,30,62,0.08);
}
.gift-envelope-icon svg { width: 26px; height: 26px; color: var(--primary); }

.gift-quote {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}
.gift-note-text {
  color: var(--gray-500);
  font-size: 0.875rem;
  line-height: 1.8;
  font-weight: 300;
}

.gift-details {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.gift-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
}
.gift-detail-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
}
.gift-detail-value { font-size: 0.875rem; color: var(--gray-700); font-weight: 400; }


/* ══════════════════════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════════════════════ */
footer {
  padding: 5rem 1.5rem;
  background: var(--primary-dark);
  text-align: center;
}
.footer-divider-top { max-width: 180px; margin: 0 auto 2.5rem; }
.footer-names {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.75rem;
  color: white;
  margin-bottom: 0.35rem;
}
.footer-date {
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.65rem;
  margin-bottom: 1rem;
}
.footer-hashtag { color: rgba(255,255,255,0.35); font-size: 0.875rem; }
.footer-divider-mid { max-width: 180px; margin: 2.5rem auto 1.5rem; }
.footer-made { color: rgba(255,255,255,0.25); font-size: 0.75rem; letter-spacing: 0.05em; }


/* ══════════════════════════════════════════════════════════════════════════════
   ADMIN — LOGIN
══════════════════════════════════════════════════════════════════════════════ */
.admin-body {
  font-family: 'Lato', sans-serif;
  color: var(--gray-700);
  background: linear-gradient(160deg, rgba(245,237,232,0.6) 0%, var(--gray-50) 50%, rgba(155,127,166,0.05) 100%);
  min-height: 100vh;
}
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 32px rgba(46,18,50,0.12), 0 0 0 1px rgba(201,168,76,0.15);
  width: 100%;
  max-width: 24rem;
  padding: 2.5rem;
}
.login-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.875rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 0.5rem;
}
.login-subtitle {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-400);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}
.login-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}
.login-input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
  font-family: inherit;
  color: var(--gray-700);
}
.login-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,30,62,0.12);
}
.login-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s;
  font-family: inherit;
}
.login-btn:hover { background: var(--primary-dark); }


/* ══════════════════════════════════════════════════════════════════════════════
   ADMIN — DASHBOARD
══════════════════════════════════════════════════════════════════════════════ */
.admin-header {
  background: white;
  border-bottom: 2px solid rgba(201,168,76,0.3);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(46,18,50,0.06);
}
.admin-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--primary);
  line-height: 1;
}
.admin-brand-sub {
  font-size: 0.65rem;
  color: var(--gray-400);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}
.admin-logout { font-size: 0.875rem; color: var(--gray-500); transition: color 0.2s; }
.admin-logout:hover { color: var(--primary); }

.admin-main { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1.5rem; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  border-radius: 1rem;
  border: 1px solid var(--gray-100);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  text-align: center;
}
.stat-card.bg-white { background: white; }
.stat-card.bg-green { background: #f0fdf4; }
.stat-card.bg-red   { background: #fef2f2; }
.stat-card.bg-blush { background: var(--blush); }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--primary);
}
.stat-label {
  font-size: 0.65rem;
  color: var(--gray-500);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* Filter bar */
.filter-bar { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
@media (min-width: 640px) { .filter-bar { flex-direction: row; } }

.filter-input,
.filter-select {
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  background: white;
  color: var(--gray-700);
}
.filter-input { flex: 1; }
.filter-input:focus,
.filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(91,30,62,0.10);
}
.filter-btn {
  background: var(--primary);
  color: white;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.filter-btn:hover { background: var(--primary-dark); }
.filter-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  transition: color 0.2s;
  white-space: nowrap;
}
.filter-clear:hover { color: var(--primary); }

/* Empty state */
.empty-state { text-align: center; padding: 5rem 0; color: var(--gray-400); }

/* Table */
.table-wrap {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
  border: 1px solid var(--gray-100);
}
.table-scroll { overflow-x: auto; }
.rsvp-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.rsvp-table thead tr { background: var(--gray-50); text-align: left; }
.rsvp-table th {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
}
.rsvp-table td { padding: 1rem 1.25rem; border-top: 1px solid var(--gray-50); }
.rsvp-table tbody tr { transition: background 0.15s; }
.rsvp-table tbody tr:hover { background: rgba(249,250,251,0.5); }

.td-id    { color: var(--gray-400); }
.td-name  { font-weight: 500; color: var(--gray-800); }
.td-email { color: var(--gray-500); }
.td-center { text-align: center; }
.td-truncate      { color: var(--gray-500); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-truncate-wide { color: var(--gray-500); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-date  { color: var(--gray-400); white-space: nowrap; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
  font-weight: 500;
}
.badge-yes { background: #dcfce7; color: #15803d; }
.badge-no  { background: #fee2e2; color: #dc2626; }

.delete-btn {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f87171;
  transition: color 0.2s;
  font-family: inherit;
}
.delete-btn:hover { color: #dc2626; }

.table-footer {
  padding: 0.75rem 1.25rem;
  background: var(--gray-50);
  font-size: 0.65rem;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-100);
}


/* ══════════════════════════════════════════════════════════════════════════════
   GALLERY
══════════════════════════════════════════════════════════════════════════════ */
#gallery { background: linear-gradient(160deg, rgba(201,168,76,0.06) 0%, var(--cream) 40%, rgba(155,127,166,0.07) 100%); }

.gallery-inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

/* Masonry grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 0.75rem;
  margin-top: 3rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: zoom-in;
  background: var(--gray-100);
}
.gallery-item:nth-child(3n+1) { grid-row: span 2; }   /* tall */
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.25,0.46,0.45,0.94);
  display: block;
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(46,18,50,0);
  transition: background 0.35s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item:hover .gallery-item-overlay {
  background: rgba(46,18,50,0.25);
}
.gallery-zoom-icon {
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s, transform 0.3s;
  color: white;
  width: 2.2rem; height: 2.2rem;
}
.gallery-item:hover .gallery-zoom-icon {
  opacity: 1;
  transform: scale(1);
}

/* Lightbox */
#galleryLightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10,3,6,0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#galleryLightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lb-img-wrap {
  position: relative;
  max-width: 88vw;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lbImage {
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  transition: opacity 0.22s;
}
#lbImage.fading { opacity: 0; }

.lb-close {
  position: fixed;
  top: 1.25rem; right: 1.5rem;
  color: rgba(255,255,255,0.8);
  font-size: 2rem;
  line-height: 1;
  background: none; border: none;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  z-index: 101;
}
.lb-close:hover { color: white; transform: rotate(90deg); }

.lb-prev, .lb-next {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  width: 2.8rem; height: 2.8rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 101;
}
.lb-prev { left: 1.25rem; }
.lb-next { right: 1.25rem; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.25); }
.lb-prev svg, .lb-next svg { width: 1.1rem; height: 1.1rem; }

.lb-counter {
  position: fixed;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
  .gallery-item:nth-child(3n+1) { grid-row: span 1; }
  .gallery-item:nth-child(4n+1) { grid-row: span 2; }
}
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }
  .gallery-item:nth-child(n) { grid-row: span 1; }
}


/* ══════════════════════════════════════════════════════════════════════════════
   PETAL RAIN
══════════════════════════════════════════════════════════════════════════════ */
#petalCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

@keyframes petal-fall {
  0% {
    opacity: 0;
    transform: translateY(-30px) translateX(0px) rotate(0deg) scale(1);
  }
  7%  { opacity: 0.82; }
  93% { opacity: 0.45; }
  100% {
    opacity: 0;
    transform: translateY(108vh) translateX(var(--petal-sway)) rotate(var(--petal-spin)) scale(0.78);
  }
}

.petal {
  position: absolute;
  top: 0;
  animation: petal-fall linear infinite;
  will-change: transform, opacity;
}


/* ══════════════════════════════════════════════════════════════════════════════
   FLIPBOOK GALLERY
══════════════════════════════════════════════════════════════════════════════ */
.flipbook-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 3.5rem;
}

/* ── Book container ── */
.flipbook {
  position: relative;
  width: 580px;
  max-width: calc(100vw - 3rem);
  aspect-ratio: 3 / 2;
  perspective: 1800px;
  cursor: default;
}

/* ── Spine ── */
.fb-spine {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 16px;
  background: linear-gradient(
    to right,
    #1a0828 0%,
    #5B1E3E 30%,
    #7a3a6a 55%,
    #5B1E3E 75%,
    #1a0828 100%
  );
  border-radius: 3px 0 0 3px;
  z-index: 10;
  box-shadow: 3px 0 10px rgba(0,0,0,0.4);
}

/* ── Page stack (depth) ── */
.fb-stack {
  position: absolute;
  left: 16px; top: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.fb-sp {
  position: absolute; inset: 0;
  background: #faf5f1;
  border-radius: 0 5px 5px 0;
}
.fb-sp1 { box-shadow: 3px 3px 8px rgba(0,0,0,0.14); transform: translate(5px, 4px); }
.fb-sp2 { box-shadow: 2px 2px 6px rgba(0,0,0,0.10); transform: translate(3px, 2px); }
.fb-sp3 { box-shadow: 1px 1px 4px rgba(0,0,0,0.07); transform: translate(1px, 1px); }

/* ── Active page ── */
.fb-page {
  position: absolute;
  left: 16px; top: 0; right: 0; bottom: 0;
  transform-origin: left center;
  border-radius: 0 6px 6px 0;
  overflow: hidden;
  box-shadow:
    5px 5px 28px rgba(0,0,0,0.28),
    1px 0  4px  rgba(0,0,0,0.10);
  z-index: 5;
  background: #111;
}
.fb-page img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Subtle gloss shine overlay */
.fb-page-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.08) 0%,
    rgba(255,255,255,0)    50%,
    rgba(0,0,0,0.06)       100%
  );
  pointer-events: none;
  z-index: 2;
}

/* Page number */
.fb-num {
  position: absolute;
  bottom: 0.55rem; right: 0.8rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 1px 5px rgba(0,0,0,0.75);
  z-index: 3;
}
.fb-sep { margin: 0 0.2em; }

/* ── Invisible click zones on the book ── */
.fb-zone {
  position: absolute;
  top: 16px; bottom: 16px;
  width: 35%;
  background: none;
  border: none;
  z-index: 8;
  cursor: pointer;
}
.fb-zone-prev { left: 16px;  cursor: w-resize; }
.fb-zone-next { right: 0;    cursor: e-resize; }

/* ── Flip keyframes ── */
@keyframes fb-next-out {
  from { transform: rotateY(0deg);   box-shadow: 5px 5px 28px rgba(0,0,0,0.28); }
  to   { transform: rotateY(-90deg); box-shadow: 0   5px  5px rgba(0,0,0,0.08); }
}
@keyframes fb-next-in {
  from { transform: rotateY(90deg);  box-shadow: 0   5px  5px rgba(0,0,0,0.08); }
  to   { transform: rotateY(0deg);   box-shadow: 5px 5px 28px rgba(0,0,0,0.28); }
}
@keyframes fb-prev-out {
  from { transform: rotateY(0deg);  box-shadow: 5px 5px 28px rgba(0,0,0,0.28); }
  to   { transform: rotateY(90deg); box-shadow: 0   5px  5px rgba(0,0,0,0.08); }
}
@keyframes fb-prev-in {
  from { transform: rotateY(-90deg); box-shadow: 0   5px  5px rgba(0,0,0,0.08); }
  to   { transform: rotateY(0deg);   box-shadow: 5px 5px 28px rgba(0,0,0,0.28); }
}

.fb-page.fb-flip-next-out { animation: fb-next-out 0.38s cubic-bezier(0.55,0,0.45,1) forwards; }
.fb-page.fb-flip-next-in  { animation: fb-next-in  0.38s cubic-bezier(0.55,0,0.45,1) forwards; }
.fb-page.fb-flip-prev-out { animation: fb-prev-out 0.38s cubic-bezier(0.55,0,0.45,1) forwards; }
.fb-page.fb-flip-prev-in  { animation: fb-prev-in  0.38s cubic-bezier(0.55,0,0.45,1) forwards; }

/* ── Navigation dots ── */
.fb-dots {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.fb-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gray-300);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}
.fb-dot.active          { background: var(--primary); transform: scale(1.35); }
.fb-dot:hover:not(.active) { background: var(--secondary-light); transform: scale(1.15); }

/* ── Prev / Next buttons ── */
.fb-controls {
  display: flex;
  gap: 1rem;
}
.fb-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.6rem;
  border: 1px solid rgba(91,30,62,0.35);
  border-radius: 9999px;
  color: var(--primary);
  font-size: 0.67rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s, opacity 0.2s;
}
.fb-ctrl svg { width: 13px; height: 13px; flex-shrink: 0; }
.fb-ctrl:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(91,30,62,0.22);
}
.fb-ctrl:disabled { opacity: 0.32; cursor: not-allowed; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .flipbook { max-width: calc(100vw - 2rem); }
  .fb-ctrl  { padding: 0.5rem 1.1rem; font-size: 0.62rem; }
}
