/* =========================================================
   Premium Indian Wedding Invitation — Royal Maroon & Gold
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,500&family=Cinzel:wght@500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Noto+Sans+Devanagari:wght@400;600&display=swap');

:root{
  --maroon-deep:#3a0810;
  --maroon:#5e0f1c;
  --maroon-light:#7a1626;
  --gold:#c9a227;
  --gold-light:#e7c577;
  --gold-pale:#f3e1b5;
  --cream:#fbf2e1;
  --ivory:#fffbf3;
  --ink:#3a2416;
  --muted:#7a6a55;
  --shadow:0 10px 30px rgba(58,8,16,0.25);
  --radius:14px;
}

*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
html,body{
  background:var(--maroon-deep);
  font-family:'EB Garamond', serif;
  color:var(--ink);
  overflow-x:hidden;
  -webkit-tap-highlight-color:transparent;
}
img{max-width:100%; display:block;}
button{font-family:inherit; border:none; background:none; cursor:pointer;}

.stage{
  max-width:520px;
  margin:0 auto;
  position:relative;
  min-height:100vh;
  background:var(--cream);
  box-shadow:0 0 60px rgba(0,0,0,0.35);
}

/* ---------------------------------------------------------
   OPENING SEQUENCE — photoreal temple doors + wax seal
--------------------------------------------------------- */
.opening{
  position:fixed;
  inset:0;
  max-width:520px;
  margin:0 auto;
  z-index:100;
  background:var(--maroon-deep);
  overflow:hidden;
  cursor:pointer;
}
.door-leaf{ display:none; } /* legacy, unused */
.cover-image, .cover-video{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; object-position:center;
}
.cover-video{
  opacity:0;
  z-index:1;
}
.cover-image{ z-index:0; }
.opening.opening-hidden{ display:none; }

.opening-guest{
  position:absolute; left:0; right:0; bottom:7%;
  text-align:center; z-index:5; padding:0 1.4rem;
  transition:opacity .4s ease;
}
.opening.opening-active .opening-guest{ opacity:0; }
.opening-guest-line{
  font-family:'Cormorant Garamond', serif;
  font-style:italic;
  font-size:1.12rem;
  color:var(--ivory);
  line-height:1.5;
  text-shadow:0 2px 10px rgba(0,0,0,0.7), 0 0 24px rgba(0,0,0,0.5);
  background:rgba(20,4,8,0.38);
  backdrop-filter:blur(2px);
  display:inline-block;
  padding:.6rem 1.1rem;
  border-radius:12px;
}
.opening-guest-line .gname{ color:var(--gold-light); font-weight:600; font-style:normal; }
.opening-tap{
  margin-top:.7rem;
  font-size:.8rem;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--gold-light);
  text-shadow:0 2px 8px rgba(0,0,0,0.7);
  animation:tapPulse 1.8s ease-in-out infinite;
}
@keyframes tapPulse{ 0%,100%{opacity:.55;} 50%{opacity:1;} }

/* full-bleed image sections (Ganesh panel, hero panel) */
.full-bleed{ padding:0 !important; }
.ganesh-img, .hero-img, .family-intro-img{ width:100%; height:auto; display:block; }

/* ---------------------------------------------------------
   MAIN CONTENT
--------------------------------------------------------- */
.card-body{
  background:
    linear-gradient(var(--cream), var(--cream)),
    repeating-linear-gradient(45deg, rgba(199,148,44,0.045) 0 2px, transparent 2px 26px);
  min-height:100vh;
}
section{
  position:relative;
  padding:3.4rem 1.8rem;
  text-align:center;
  opacity:0;
  transform:translateY(22px);
  transition:opacity .9s cubic-bezier(.2,.65,.3,1), transform .9s cubic-bezier(.2,.65,.3,1);
  will-change:opacity, transform;
}
section.visible{ opacity:1; transform:translateY(0); }

.rule{
  width:70px; height:2px; margin:1.2rem auto;
  background:linear-gradient(90deg, transparent, var(--gold), transparent);
}
.eyebrow{
  font-family:'Noto Sans Devanagari', serif;
  font-size:1.1rem;
  color:var(--maroon);
  letter-spacing:.5px;
}
.section-title{
  font-family:'Cinzel', serif;
  font-size:1.25rem;
  font-weight:600;
  color:var(--maroon);
  letter-spacing:1.5px;
  text-transform:uppercase;
}

/* HERO */
.hero{ padding-top:3.6rem; }
.hero-photo{
  width:150px; height:190px; margin:0 auto 1.2rem;
  border-radius:75px 75px 8px 8px;
  border:3px solid var(--gold);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.hero-photo img{ width:100%; height:100%; object-fit:cover; }
.hero-monogram{
  width:96px; height:96px; margin:0 auto 1rem;
  border-radius:50%;
  border:2px solid var(--gold);
  box-shadow:0 0 0 6px var(--cream), 0 0 0 8px var(--gold-light);
  display:flex; align-items:center; justify-content:center;
  font-family:'Cinzel', serif;
  font-size:1.4rem;
  color:var(--maroon);
  background:var(--ivory);
}
.hero-greeting{
  font-family:'Cormorant Garamond', serif;
  font-style:italic;
  font-size:1.15rem;
  color:var(--muted);
  margin-top:1.1rem;
}
.hero-greeting .gname{
  color:var(--maroon);
  font-weight:600;
  font-style:normal;
}
.hero-names{
  font-family:'Cinzel', serif;
  font-size:2.1rem;
  color:var(--maroon);
  margin-top:.6rem;
  line-height:1.35;
}
.hero-names small{
  display:block;
  font-family:'Noto Sans Devanagari', serif;
  font-size:1.1rem;
  color:var(--gold);
  font-weight:400;
  margin-top:.15rem;
}
.hero-amp{
  display:block;
  font-family:'Cormorant Garamond', serif;
  font-style:italic;
  font-size:1.2rem;
  color:var(--gold);
  margin:.35rem 0;
}
.hero-date{
  margin-top:1.4rem;
  font-family:'Cinzel', serif;
  font-size:1.05rem;
  letter-spacing:2px;
  color:var(--ink);
}

.hero-greeting-under{ margin-top:1.1rem; padding:0 1.2rem; }
.countdown-label{
  font-family:'Cinzel', serif; font-size:.85rem; letter-spacing:2px; text-transform:uppercase;
  color:var(--maroon); text-align:center; margin-top:1.8rem;
}

/* FAMILY INTRODUCTION */
#sec-family{ background:var(--ivory); position:relative; overflow:hidden; padding-top:6.8rem; }
.corner-arch{
  position:absolute; top:0; width:105px; height:auto; opacity:0.92; pointer-events:none;
}
.corner-arch-left{ left:0; }
.corner-arch-right{ right:0; transform:scaleX(-1); }
.family-sub{
  font-family:'Cormorant Garamond', serif; font-style:italic; color:var(--muted);
  font-size:1.02rem; margin-top:.4rem;
}
.family-names{ margin-top:1.2rem; font-family:'Cinzel', serif; font-size:1.55rem; color:var(--maroon); }
.family-names .famp{ color:var(--gold); font-family:'Cormorant Garamond', serif; font-style:italic; margin:0 .4rem; }
.family-roles{
  display:flex; justify-content:space-between; max-width:280px; margin:.4rem auto 0;
  font-size:.72rem; letter-spacing:2px; color:var(--muted);
}
.family-columns{ display:flex; align-items:flex-start; justify-content:center; gap:.4rem; margin-top:1rem; }
.family-col{ flex:1; text-align:center; }
.family-badge{ width:100%; max-width:150px; margin:0 auto; }
.family-side-label{
  font-family:'Cinzel', serif; font-size:.68rem; letter-spacing:1.5px; text-transform:uppercase;
  color:var(--gold); margin:.3rem 0 .5rem;
}
.family-divider{ width:26px; height:auto; align-self:stretch; object-fit:contain; margin:0 auto; }
.family-parent{ font-size:.88rem; color:var(--ink); margin-top:.5rem; line-height:1.4; }
.family-parent span{ font-size:.72rem; color:var(--muted); font-style:italic; }
.shubh-vivah{ font-family:'Noto Sans Devanagari', serif; font-size:1.4rem; color:var(--maroon); margin-top:.3rem; }

/* SCRATCH TO REVEAL — heart shaped */
.scratch-heart-wrap{
  position:relative; width:280px; height:244px; margin:1.6rem auto 0;
  -webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 90"><path d="M50,20 C42,2 10,2 3,28 C-4,54 30,78 50,88 C70,78 104,54 97,28 C90,2 58,2 50,20 Z"/></svg>');
  mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 90"><path d="M50,20 C42,2 10,2 3,28 C-4,54 30,78 50,88 C70,78 104,54 97,28 C90,2 58,2 50,20 Z"/></svg>');
  -webkit-mask-size:100% 100%; mask-size:100% 100%;
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
}
.scratch-date-reveal{
  position:absolute; inset:0;
  background:radial-gradient(ellipse at center, var(--ivory) 0%, var(--gold-pale) 100%);
  display:flex; align-items:center; justify-content:center; text-align:center;
}
.scratch-date{
  font-family:'Cormorant Garamond', serif; font-style:italic; font-weight:600;
  font-size:1.7rem; color:var(--maroon); line-height:1.2; padding:0 1.5rem;
  transition:transform .5s cubic-bezier(.34,1.56,.64,1);
}
.scratch-date.revealed-pop{ animation:datePop .6s cubic-bezier(.34,1.56,.64,1); }
@keyframes datePop{
  0%{ transform:scale(.7); }
  60%{ transform:scale(1.12); }
  100%{ transform:scale(1); }
}
.scratch-canvas{ position:absolute; inset:0; width:100%; height:100%; cursor:pointer; touch-action:none; }
.scratch-hint{
  margin-top:1.1rem; font-family:'Cormorant Garamond', serif; font-style:italic; color:var(--maroon); font-size:1rem;
}

/* COUNTDOWN */
.countdown{ display:flex; justify-content:center; gap:.65rem; margin-top:1.8rem; flex-wrap:wrap; }
.cd-box{
  background:radial-gradient(circle at 35% 30%, var(--ivory) 0%, var(--cream) 75%);
  border:3px solid var(--gold);
  border-radius:50%;
  width:78px; height:78px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  box-shadow:0 0 0 2px var(--gold-light), 0 10px 22px rgba(94,15,28,0.22), inset 0 2px 4px rgba(255,255,255,0.6);
  position:relative;
}
.cd-box::after{
  content:"";
  position:absolute; inset:6px;
  border:1px dashed rgba(94,15,28,0.18);
  border-radius:50%;
  pointer-events:none;
}
.cd-num{
  font-family:'Cinzel', serif; font-size:1.45rem; color:var(--maroon); font-weight:600;
  transition:transform .25s ease;
}
.cd-num.tick{ animation:cdTick .5s ease; }
@keyframes cdTick{
  0%{ transform:scale(1); }
  30%{ transform:scale(1.22); color:var(--gold); }
  100%{ transform:scale(1); }
}
.cd-label{ font-size:.66rem; letter-spacing:1.5px; text-transform:uppercase; color:var(--muted); margin-top:.15rem; }

/* STORY */
.story-text{
  font-family:'Cormorant Garamond', serif;
  font-size:1.12rem;
  line-height:1.75;
  color:var(--ink);
  max-width:420px;
  margin:1rem auto 0;
}
.blessing-line{
  font-family:'Cormorant Garamond', serif;
  font-style:italic;
  color:var(--muted);
  margin-top:1rem;
}
.story-section{
  background:
    radial-gradient(circle at 30% 20%, rgba(199,148,44,0.10), transparent 55%),
    linear-gradient(160deg, var(--maroon-deep), var(--maroon) 60%, var(--maroon-deep));
}
.story-section .eyebrow{ color:var(--gold-light); }
.section-title.light{ color:var(--gold-light); }
.rule.light{ background:linear-gradient(90deg, transparent, var(--gold-light), transparent); }
.story-text.light{ color:var(--cream); }
.blessing-line.light{ color:var(--gold-pale); }
.info-chips{ display:flex; gap:.7rem; justify-content:center; flex-wrap:wrap; margin-top:1.3rem; }
.info-chip{
  background:var(--ivory); border:1px solid var(--gold-light); border-radius:10px;
  padding:.7rem 1rem; font-size:.88rem; color:var(--ink); max-width:200px; box-shadow:var(--shadow);
}
.info-chip-label{
  display:block; font-family:'Cinzel', serif; font-size:.68rem; letter-spacing:1px;
  text-transform:uppercase; color:var(--gold); margin-bottom:.25rem;
}

/* EVENTS TIMELINE */
.events-list{ margin-top:1.6rem; display:flex; flex-direction:column; gap:1.1rem; text-align:left; }
.event-card{
  background:var(--ivory);
  border:1px solid var(--gold-light);
  border-radius:var(--radius);
  padding:1rem;
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
  display:flex;
  gap:1rem;
  align-items:flex-start;
}
.event-card::before{
  content:"";
  position:absolute; left:0; top:0; bottom:0; width:5px;
  background:linear-gradient(180deg, var(--gold), var(--maroon));
}
.event-icon{
  height:72px; width:auto; max-width:92px; object-fit:contain; flex-shrink:0;
  filter:drop-shadow(0 3px 6px rgba(94,15,28,0.18));
}
.event-body{ flex:1; min-width:0; }
.event-name{ font-family:'Cinzel', serif; font-size:1rem; color:var(--maroon); letter-spacing:.5px; }
.event-tagline{ font-family:'Cormorant Garamond', serif; font-style:italic; font-size:.85rem; color:var(--muted); margin-top:.1rem; }
.event-when{ font-family:'Cormorant Garamond', serif; font-size:1.02rem; color:var(--ink); margin-top:.4rem; }
.event-venue{ font-size:.88rem; color:var(--muted); margin-top:.2rem; }
.event-map{
  display:inline-block; margin-top:.5rem;
  font-size:.8rem; color:var(--maroon);
  border-bottom:1px solid var(--gold);
}

/* GUEST WISHES */
.wish-form{
  margin-top:1.4rem; display:flex; flex-direction:column; gap:.7rem; text-align:left;
}
.wish-form input, .wish-form textarea{
  width:100%; padding:.7rem .8rem; border:1px solid var(--gold-light); border-radius:8px;
  background:var(--ivory); font-family:'EB Garamond', serif; font-size:1rem; color:var(--ink);
}
.wishes-list{ margin-top:1.6rem; display:flex; flex-direction:column; gap:.9rem; text-align:left; }
.wishes-empty{ margin-top:1.4rem; font-family:'Cormorant Garamond', serif; font-style:italic; color:var(--muted); font-size:.98rem; }
.wish-card{
  display:flex; gap:.8rem; align-items:flex-start;
  background:var(--ivory); border:1px solid var(--gold-light); border-radius:var(--radius);
  padding:.9rem 1rem; box-shadow:var(--shadow);
}
.wish-initial{
  width:38px; height:38px; border-radius:50%; flex-shrink:0;
  background:radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold));
  color:var(--maroon-deep); font-family:'Cinzel', serif; font-weight:700;
  display:flex; align-items:center; justify-content:center; font-size:.95rem;
}
.wish-text{ font-family:'Cormorant Garamond', serif; font-style:italic; font-size:1rem; color:var(--ink); line-height:1.5; }
.wish-from{ font-size:.78rem; color:var(--muted); margin-top:.3rem; }

/* GALLERY — swipeable carousel */
.gallery-carousel{
  display:flex; gap:12px; margin-top:1.4rem;
  overflow-x:auto; scroll-snap-type:x mandatory;
  padding:.3rem 18% .6rem; /* peek of neighbouring slides */
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.gallery-carousel::-webkit-scrollbar{ display:none; }
.gallery-slide{
  flex:0 0 64%; scroll-snap-align:center;
  border-radius:var(--radius); overflow:hidden;
  border:1px solid var(--gold-light); box-shadow:var(--shadow);
  aspect-ratio:4/5; background:var(--ivory);
  transition:transform .3s ease, opacity .3s ease;
}
.gallery-slide img{ width:100%; height:100%; object-fit:cover; cursor:pointer; }
.gallery-dots{ display:flex; justify-content:center; gap:.4rem; margin-top:1rem; }
.gallery-dot{
  width:7px; height:7px; border-radius:50%; background:var(--gold-light);
  opacity:.5; transition:opacity .25s ease, transform .25s ease; cursor:pointer;
}
.gallery-dot.active{ opacity:1; transform:scale(1.3); background:var(--maroon); }
.gallery-empty{
  font-size:.9rem; color:var(--muted); font-style:italic; margin-top:1rem;
}

.lightbox{
  position:fixed; inset:0; background:rgba(20,4,8,0.94);
  display:none; align-items:center; justify-content:center; z-index:200; padding:1.2rem;
}
.lightbox.open{ display:flex; }
.lightbox img{
  max-height:78vh; max-width:100%; border-radius:8px;
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
  animation:lightboxFade .25s ease;
}
@keyframes lightboxFade{ from{ opacity:0; transform:scale(.97); } to{ opacity:1; transform:scale(1); } }
.lightbox-close{
  position:absolute; top:18px; right:22px; color:var(--gold-light);
  font-size:1.8rem; cursor:pointer; z-index:2; line-height:1;
}
.lightbox-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:42px; height:42px; border-radius:50%;
  background:rgba(255,255,255,0.08); border:1px solid rgba(231,197,119,0.4);
  color:var(--gold-light); font-size:1rem; display:flex; align-items:center; justify-content:center;
  cursor:pointer; z-index:2; transition:background .2s ease;
}
.lightbox-nav:active{ background:rgba(255,255,255,0.2); }
.lightbox-prev{ left:12px; }
.lightbox-next{ right:12px; }
.lightbox-counter{
  position:absolute; bottom:22px; left:0; right:0; text-align:center;
  color:var(--gold-pale); font-size:.8rem; letter-spacing:1px;
}

.btn-gold{
  margin-top:.4rem;
  padding:.85rem 1rem;
  background:linear-gradient(135deg, var(--gold-light), var(--gold));
  color:var(--maroon-deep);
  font-family:'Cinzel', serif;
  font-size:.92rem;
  letter-spacing:1.5px;
  text-transform:uppercase;
  border-radius:8px;
  box-shadow:0 6px 16px rgba(199,148,44,0.35);
  transition:transform .12s ease, box-shadow .2s ease;
}
.btn-gold:active{ transform:scale(.97); box-shadow:0 3px 10px rgba(199,148,44,0.3); }

/* WHATSAPP CONFIRMATION BUTTON */
.whatsapp-confirm-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.6rem;
  margin-top:1.6rem; padding:1rem 1.6rem;
  background:linear-gradient(135deg, #2fbd5c, #1fa951);
  color:#ffffff; text-decoration:none;
  font-family:'Cinzel', serif; font-size:.95rem; letter-spacing:.5px;
  border-radius:50px;
  box-shadow:0 8px 20px rgba(31,169,81,0.35);
  transition:transform .15s ease, box-shadow .2s ease;
}
.whatsapp-confirm-btn:active{ transform:scale(.96); box-shadow:0 4px 12px rgba(31,169,81,0.3); }
.wa-icon{ width:22px; height:22px; flex-shrink:0; }
.rsvp-status{ margin-top:.9rem; font-size:.92rem; text-align:center; }
.rsvp-status.ok{ color:#2f5233; }
.rsvp-status.err{ color:#8a1c1c; }

/* LOCATION */
.map-frame{
  margin-top:1.2rem; border-radius:var(--radius); overflow:hidden;
  border:1px solid var(--gold-light); box-shadow:var(--shadow);
}
.map-frame iframe{ width:100%; height:220px; border:0; display:block; }
.venue-line{ margin-top:1rem; font-size:.98rem; color:var(--ink); }

/* FOOTER */
.final-photo{
  width:100%; max-width:300px; height:220px; margin:0 auto 1.2rem;
  border-radius:var(--radius); overflow:hidden;
  border:2px solid var(--gold);
  background:var(--ivory);
  display:flex; align-items:center; justify-content:center;
  color:var(--muted); font-size:.85rem;
}
.final-photo img{ width:100%; height:100%; object-fit:cover; }
.thankyou-hi{ font-family:'Noto Sans Devanagari', serif; font-size:1.6rem; color:var(--maroon); }
.diya-accent{ width:120px; height:auto; margin:0 auto 1rem; display:block; }
.thankyou-en{ font-family:'Cinzel', serif; font-size:.9rem; letter-spacing:3px; color:var(--gold); margin-top:.2rem; }
.hashtag-pill{
  display:inline-block; margin-top:1rem; padding:.45rem 1.1rem;
  border:1px solid var(--gold); border-radius:30px;
  font-family:'Cinzel', serif; font-size:.85rem; letter-spacing:1px; color:var(--maroon);
  background:var(--gold-pale);
}
footer.site-footer{
  margin-top:1.4rem; font-size:.85rem; color:var(--muted); padding-bottom:1rem;
}
.share-row{ display:flex; gap:.6rem; justify-content:center; margin-top:1.2rem; }
.share-btn{
  padding:.6rem 1.1rem; border-radius:30px; font-size:.85rem;
  border:1px solid var(--gold); color:var(--maroon); background:var(--ivory);
  transition:transform .12s ease;
}
.share-btn:active{ transform:scale(.96); }
.seal-btn{
  background:radial-gradient(circle at 35% 30%, var(--maroon-light), var(--maroon) 60%, var(--maroon-deep));
  color:var(--gold-pale); border:1px solid var(--gold);
  box-shadow:0 4px 12px rgba(58,8,16,0.3);
}

/* MUSIC TOGGLE */
.music-toggle{
  position:fixed; bottom:18px; right:18px;
  width:48px; height:48px; border-radius:50%;
  background:var(--maroon); color:var(--gold-light);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 6px 16px rgba(0,0,0,0.35);
  z-index:60; font-size:1.2rem;
}
.music-toggle.spinning{ animation:spin 3.5s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }

#confettiCanvas{
  position:fixed; inset:0; max-width:520px; margin:0 auto;
  width:100%; height:100%; pointer-events:none; z-index:150;
}

@media (max-width:360px){
  .hero-names{ font-size:1.75rem; }
  .cd-box{ min-width:56px; padding:.55rem .4rem; }
}
