/* =====================================================
   WEDDING INVITATION — ROYAL INDIAN THEME
   CSS Variables · Typography · Layout · Animation
   ===================================================== */

:root {
  /* Palette */
  --gold:          #C9A84C;
  --gold-light:    #E8C97D;
  --gold-bright:   #FFD700;
  --gold-dark:     #8B6914;
  --ivory:         #FAF6EE;
  --ivory-warm:    #F5EDDB;
  --champagne:     #F0DCA8;
  --maroon:        #6B1A2A;
  --maroon-deep:   #3D0B14;
  --maroon-mid:    #8B2230;
  --curtain-red:   #7A1020;
  --curtain-deep:  #4A0010;
  --curtain-light: #9B2535;
  --text-dark:     #2C1810;
  --text-mid:      #5C3D2E;
  --text-light:    #F5EDDB;
  --white:         #FFFFFF;

  /* Typography scale */
  --font-script:   'Great Vibes', cursive;
  --font-serif:    'Playfair Display', Georgia, serif;
  --font-body:     'Poppins', system-ui, sans-serif;

  /* Spacing */
  --section-pad:   clamp(4rem, 8vw, 8rem);
  --radius:        12px;
  --radius-lg:     20px;

  /* Transitions */
  --ease-silk:     cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-bounce:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--maroon-deep);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.7;
}

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

button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ─── UTILITIES ──────────────────────────────────── */
.hidden { display: none !important; }
.great-vibes { font-family: var(--font-script); }

.btn-gold {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold));
  background-size: 200% 200%;
  color: var(--maroon-deep);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  text-decoration: none;
  transition: background-position 0.4s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(201,168,76,0.35);
  animation: goldShimmer 3s infinite alternate;
}
.btn-gold:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,76,0.55);
}
.btn-gold.full-width { width: 100%; text-align: center; }

@keyframes goldShimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

/* ─── CURTAIN STAGE ──────────────────────────────── */
#curtain-stage {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--maroon-deep);
  cursor: pointer;
}

#sparkle-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.curtain-panel {
  position: relative;
  width: 50%;
  overflow: hidden;
  transition: transform 2.4s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 3;
}

#curtain-left  { transform-origin: left center; }
#curtain-right { transform-origin: right center; }

#curtain-stage.open #curtain-left  { transform: translateX(-105%); }
#curtain-stage.open #curtain-right { transform: translateX(105%);  }

.curtain-fabric {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      92deg,
      var(--curtain-deep)   0%,
      var(--curtain-red)   18%,
      var(--curtain-light)  32%,
      var(--curtain-red)   45%,
      var(--curtain-deep)  55%,
      var(--curtain-light)  68%,
      var(--curtain-red)   82%,
      var(--curtain-deep) 100%
    );
  box-shadow: inset 0 0 80px rgba(0,0,0,0.4);
}

/* Curtain folds */
.curtain-fold {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(90deg,
    rgba(0,0,0,0.18) 0%,
    rgba(255,255,255,0.06) 40%,
    rgba(0,0,0,0.12) 100%
  );
  border-radius: 50%;
}
.f1 { left: 12%; }
.f2 { left: 27%; }
.f3 { left: 46%; }
.f4 { left: 65%; }
.f5 { left: 82%; }

#curtain-right .f1 { left: auto; right: 12%; }
#curtain-right .f2 { left: auto; right: 27%; }
#curtain-right .f3 { left: auto; right: 46%; }
#curtain-right .f4 { left: auto; right: 65%; }
#curtain-right .f5 { left: auto; right: 82%; }

.curtain-inner-shadow {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 80px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,0.45));
}
.curtain-inner-shadow.right {
  left: 0; right: auto;
  background: linear-gradient(to left, transparent, rgba(0,0,0,0.45));
}

/* Curtain valance */
.curtain-valance {
  position: absolute;
  top: 0;
  left: 0; right: 0;
  height: clamp(70px, 14vw, 130px);
  background: linear-gradient(180deg,
    var(--curtain-deep) 0%,
    var(--curtain-red)  55%,
    rgba(74,0,16,0.6) 100%
  );
  z-index: 10;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.curtain-valance::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 24px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold-dark) 0px, var(--gold) 4px, var(--gold-light) 6px,
    var(--gold) 8px, var(--gold-dark) 12px, transparent 12px, transparent 16px
  );
  opacity: 0.8;
}
.curtain-valance::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 0; right: 0;
  height: 30px;
  background:
    radial-gradient(ellipse 36px 30px at 18px 0px, var(--curtain-red) 70%, transparent 71%),
    radial-gradient(ellipse 36px 30px at 54px 0px, var(--curtain-red) 70%, transparent 71%),
    radial-gradient(ellipse 36px 30px at 90px 0px, var(--curtain-red) 70%, transparent 71%);
  background-size: 72px 30px;
  background-repeat: repeat-x;
}

/* Tassel rope */
.tassel-rope {
  position: absolute;
  top: 0;
  width: 4px;
  height: clamp(120px, 22vw, 200px);
  background: linear-gradient(180deg,
    var(--gold-dark), var(--gold), var(--gold-light), var(--gold), var(--gold-dark)
  );
  z-index: 12;
  box-shadow: 0 0 8px rgba(201,168,76,0.5);
  border-radius: 2px;
}
.left-rope  { right: 10%; }
.right-rope { left: 10%; }

/* Tassel */
.tassel {
  position: absolute;
  top: clamp(120px, 22vw, 200px);
  z-index: 12;
  animation: tassleSwing 3s ease-in-out infinite alternate;
  transform-origin: top center;
}
.left-tassel  { right: calc(10% - 14px); }
.right-tassel { left: calc(10% - 14px); }

@keyframes tassleSwing {
  from { transform: rotate(-3deg); }
  to   { transform: rotate(3deg); }
}

.tassel-knot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--gold-light), var(--gold), var(--gold-dark));
  box-shadow: 0 4px 10px rgba(0,0,0,0.4), 0 0 14px rgba(201,168,76,0.6);
  margin: 0 auto;
}

.tassel-threads {
  display: flex;
  justify-content: center;
  gap: 3px;
  padding-top: 2px;
}
.tassel-threads span {
  width: 3px;
  height: clamp(40px, 7vw, 60px);
  background: linear-gradient(180deg, var(--gold), var(--gold-light) 40%, var(--gold) 70%, transparent);
  border-radius: 2px;
}
.tassel-threads span:nth-child(odd)  { height: clamp(34px, 6vw, 52px); }
.tassel-threads span:nth-child(even) { height: clamp(40px, 7vw, 60px); }

/* Curtain center ornament */
.curtain-center-ornament {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  pointer-events: none;
}
.ornament-diamond {
  width: 60px; height: 60px;
  background: radial-gradient(circle at 40% 35%, var(--gold-light), var(--gold), var(--gold-dark));
  transform: rotate(45deg);
  box-shadow: 0 0 20px rgba(201,168,76,0.6), 0 0 60px rgba(201,168,76,0.2);
}
.ornament-diamond::before {
  content: '✦';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) rotate(-45deg);
  color: var(--maroon-deep);
  font-size: 1.8rem;
}

/* Curtain CTA */
#curtain-cta {
  position: absolute;
  bottom: 8vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  animation: pulseFade 2.5s ease-in-out infinite;
}
.curtain-label {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 2vw, 1rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  text-shadow: 0 0 20px rgba(201,168,76,0.8);
}
@keyframes pulseFade {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ─── AUDIO BUTTON ───────────────────────────────── */
#audio-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--maroon-deep);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  transition: transform 0.2s;
}
#audio-btn:hover { transform: scale(1.1); }

/* ─── PETAL CANVAS ───────────────────────────────── */
#petal-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ─── MAIN INVITATION ────────────────────────────── */
#invitation {
  position: relative;
}

/* ─── SECTIONS ───────────────────────────────────── */
.section {
  position: relative;
  padding: var(--section-pad) clamp(1.5rem, 5vw, 5rem);
  overflow: hidden;
}
.section-dark {
  background: var(--maroon-deep);
  color: var(--text-light);
}
.section:not(.section-dark) {
  background: var(--ivory);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.section-eyebrow.light { color: var(--gold-light); }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--maroon);
  font-weight: 700;
}
.section-title.light { color: var(--champagne); }

.section-subtitle {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.75;
}
.section-subtitle.light { color: var(--text-light); }

/* ─── SCROLL REVEAL ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s var(--ease-silk), transform 0.75s var(--ease-silk);
  transition-delay: var(--delay, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── HERO ───────────────────────────────────────── */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg,
    var(--ivory-warm) 0%,
    var(--ivory) 35%,
    var(--champagne) 70%,
    var(--ivory-warm) 100%
  );
  padding-top: clamp(6rem, 12vw, 10rem);
  padding-bottom: clamp(6rem, 12vw, 10rem);
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(201,168,76,0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(107,26,42,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.hero-bg-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A84C' fill-opacity='0.04'%3E%3Cpath d='M30 0 L31 28 L60 30 L31 32 L30 60 L29 32 L0 30 L29 28Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.hero-names {
  font-family: var(--font-script);
  font-size: clamp(3.5rem, 12vw, 8rem);
  line-height: 1;
  color: var(--maroon);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
  flex-wrap: wrap;
}

.name-bride, .name-groom {
  display: inline-block;
  text-shadow: 2px 3px 8px rgba(107,26,42,0.15);
}

.name-ampersand {
  font-family: var(--font-serif);
  font-size: 0.35em;
  color: var(--gold);
  margin-top: 0.5em;
  font-style: italic;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  color: var(--text-mid);
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dark);
  border: 1px solid rgba(201,168,76,0.35);
  padding: 0.7rem 1.6rem;
  border-radius: 4px;
  background: rgba(201,168,76,0.06);
}
.hero-date-divider { color: var(--gold); }

.scroll-hint {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}
.scroll-hint span {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50%       { opacity: 0.4; transform: scaleY(0.6); }
}

/* ─── COUPLE SECTION ─────────────────────────────── */
#couple .section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.couple-photo-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.frame-outer {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  max-width: 340px;
  border: 3px solid var(--gold);
  box-shadow:
    0 0 0 10px var(--ivory-warm),
    0 0 0 13px var(--gold),
    0 20px 60px rgba(107,26,42,0.2),
    inset 0 0 40px rgba(201,168,76,0.1);
  overflow: hidden;
}

.frame-corner {
  position: absolute;
  width: 28px; height: 28px;
  border-color: var(--gold-dark);
  border-style: solid;
  z-index: 2;
}
.frame-corner.tl { top: -1px; left: -1px; border-width: 3px 0 0 3px; }
.frame-corner.tr { top: -1px; right: -1px; border-width: 3px 3px 0 0; }
.frame-corner.bl { bottom: -1px; left: -1px; border-width: 0 0 3px 3px; }
.frame-corner.br { bottom: -1px; right: -1px; border-width: 0 3px 3px 0; }

.couple-photo-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--champagne), var(--ivory-warm));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.couple-initials {
  font-family: var(--font-script);
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--gold);
  opacity: 0.6;
}
.placeholder-note {
  font-size: 0.8rem;
  color: var(--text-mid);
  opacity: 0.7;
  font-style: italic;
}

.frame-caption {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--gold-dark);
  text-align: center;
}

.couple-text .section-eyebrow { text-align: left; }
.couple-desc {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.9;
  margin-top: 0.75rem;
}

/* ─── EVENTS ─────────────────────────────────────── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.event-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  color: var(--champagne);
}
.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35), 0 0 0 1px rgba(201,168,76,0.4);
  border-color: rgba(201,168,76,0.5);
}
.event-card.highlight-card {
  background: linear-gradient(135deg,
    rgba(201,168,76,0.12) 0%,
    rgba(240,220,168,0.08) 100%
  );
  border-color: rgba(201,168,76,0.45);
}

.event-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.event-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.event-detail {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.5;
}
.event-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.1rem;
}

/* ─── COUNTDOWN ──────────────────────────────────── */
#countdown {
  background: linear-gradient(135deg, var(--ivory-warm), var(--ivory));
  text-align: center;
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  flex-wrap: wrap;
  margin-top: 1rem;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 90px;
}
.countdown-num {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  color: var(--maroon);
  line-height: 1;
  background: linear-gradient(135deg, var(--maroon), var(--maroon-mid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s var(--ease-bounce);
}
.countdown-num.tick { transform: scale(1.15); }
.countdown-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.countdown-sep {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--gold);
  opacity: 0.5;
}

/* ─── TIMELINE ───────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--gold) 10%, var(--gold) 90%, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item.right {
  flex-direction: row-reverse;
  text-align: right;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 20px rgba(201,168,76,0.4);
  z-index: 2;
  flex-shrink: 0;
}

.timeline-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  width: calc(50% - 3rem);
  transition: transform 0.3s;
}
.timeline-card:hover { transform: scale(1.02); }

.timeline-year {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.timeline-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--champagne);
  margin-bottom: 0.5rem;
}
.timeline-card p {
  font-size: 0.9rem;
  color: rgba(245,237,219,0.75);
  line-height: 1.7;
}

/* ─── FAMILY ─────────────────────────────────────── */
.family-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: start;
}

.family-card {
  background: var(--ivory-warm);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(107,26,42,0.08);
}

.family-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.family-icon { font-size: 1.8rem; }
.family-header h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--maroon);
}

.family-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.family-list li {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}
.family-list li:last-child { border-bottom: none; }
.family-list strong { color: var(--maroon); font-weight: 600; }
.family-list span { color: var(--text-mid); font-size: 0.78rem; }

.family-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 3rem;
}
.divider-line {
  width: 2px;
  flex: 1;
  max-height: 80px;
  background: linear-gradient(to bottom, transparent, var(--gold));
}
.divider-line:last-child {
  background: linear-gradient(to top, transparent, var(--gold));
}
.family-divider-text {
  font-size: 1.5rem;
  color: var(--gold);
}

/* ─── GALLERY ────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
  position: relative;
}
.gallery-item::after {
  content: attr(data-caption);
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(61,11,20,0.8), transparent);
  color: var(--champagne);
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item:hover::after { opacity: 1; }

.gallery-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(
    135deg,
    hsl(var(--hue), 35%, 25%) 0%,
    hsl(var(--hue), 25%, 15%) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.6;
  transition: transform 0.4s;
}
.gallery-item:hover .gallery-placeholder { transform: scale(1.08); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: var(--gold);
  font-size: 1.5rem;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.15); }

.lightbox-content {
  max-width: 500px;
  width: 90%;
}
.lightbox-placeholder {
  background: linear-gradient(135deg, var(--maroon-deep), var(--maroon-mid));
  border: 2px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
}
.lightbox-placeholder span { font-size: 5rem; display: block; margin-bottom: 1rem; }
.lightbox-placeholder p { color: var(--champagne); font-style: italic; }

/* ─── VENUE ──────────────────────────────────────── */
.venue-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.venue-name {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}
.venue-address {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.venue-details-row {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}
.venue-detail-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.vd-icon { font-size: 1.2rem; flex-shrink: 0; }
.venue-detail-item strong {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.venue-detail-item p {
  font-size: 0.9rem;
  color: var(--text-mid);
}

.venue-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(107,26,42,0.2);
  border: 2px solid rgba(201,168,76,0.25);
}

/* ─── RSVP ───────────────────────────────────────── */
.rsvp-card {
  max-width: 580px;
  margin: 0 auto;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 6px;
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
  -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(245,237,219,0.35); }
.form-group input:focus,
.form-group select,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
.form-group select {
  color: var(--text-light);
  cursor: pointer;
  background: rgba(61,11,20,0.8);
}
.form-group select option { background: var(--maroon-deep); }

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-light);
}
.checkbox-item input[type="checkbox"] {
  width: auto;
  width: 16px; height: 16px;
  accent-color: var(--gold);
  margin: 0;
}

.rsvp-success {
  text-align: center;
  padding: 2rem;
}
.success-icon { font-size: 3rem; margin-bottom: 1rem; }
.rsvp-success h3 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}
.rsvp-success p { color: var(--champagne); }

/* ─── BLESSINGS ──────────────────────────────────── */
.blessings-form {
  max-width: 700px;
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-row {
  display: flex;
  gap: 1rem;
}
.blessing-input {
  padding: 0.85rem 1rem;
  background: var(--ivory-warm);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 6px;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s;
}
.blessing-input:focus { border-color: var(--gold); }
.blessing-input::placeholder { color: var(--text-mid); opacity: 0.6; }
.blessing-input.full-width-input { width: 100%; resize: vertical; }
#blessing-name { flex: 1; }

.blessings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.blessing-note {
  background: var(--ivory-warm);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 6px;
  padding: 1.5rem;
  transform: rotate(var(--rotate, 0deg));
  box-shadow: 4px 6px 20px rgba(107,26,42,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}
.blessing-note:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 8px 12px 30px rgba(107,26,42,0.15);
}
.blessing-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.93rem;
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.blessing-author {
  font-size: 0.8rem;
  color: var(--gold-dark);
  font-weight: 500;
}

/* ─── FOOTER ─────────────────────────────────────── */
#footer {
  text-align: center;
  padding: clamp(4rem, 8vw, 7rem) 2rem;
}
.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}
.footer-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-signature {
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--gold-light);
  margin-bottom: 1rem;
  animation: signaturePulse 4s ease-in-out infinite;
}
@keyframes signaturePulse {
  0%, 100% { text-shadow: 0 0 20px rgba(201,168,76,0.3); }
  50%       { text-shadow: 0 0 40px rgba(201,168,76,0.7), 0 0 80px rgba(201,168,76,0.2); }
}
.footer-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--champagne);
  font-style: italic;
  margin-bottom: 0.5rem;
}
.footer-thankyou {
  font-size: 0.88rem;
  color: rgba(245,237,219,0.6);
  margin-bottom: 2rem;
}
.footer-divider {
  color: var(--gold);
  letter-spacing: 0.5em;
  margin-bottom: 1rem;
  opacity: 0.5;
}
.footer-date {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.6);
}

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 900px) {
  #couple .section-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .couple-text .section-eyebrow { text-align: center; }
  .couple-photo-frame { align-items: center; }
  .frame-outer { max-width: 280px; }

  .timeline::before { left: 24px; }
  .timeline-item, .timeline-item.right {
    flex-direction: row;
    text-align: left;
    padding-left: 64px;
  }
  .timeline-dot { left: 0; }
  .timeline-card { width: 100%; }

  .family-grid {
    grid-template-columns: 1fr;
  }
  .family-divider { flex-direction: row; padding-top: 0; }
  .divider-line { flex: 1; max-height: 2px; height: 2px; }
  .divider-line {
    background: linear-gradient(to right, transparent, var(--gold)) !important;
  }
  .divider-line:last-child {
    background: linear-gradient(to left, transparent, var(--gold)) !important;
  }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .venue-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }

  .countdown-grid { gap: 0.75rem; }
  .countdown-sep { font-size: 1rem; }

  .form-row { flex-direction: column; }

  .checkbox-group { grid-template-columns: 1fr; }
}

/* ─── REDUCED MOTION ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  #curtain-stage.open #curtain-left  { transform: translateX(-100%); }
  #curtain-stage.open #curtain-right { transform: translateX(100%); }
}
