/* ============================================================
   Wedding Invitation — Lavanya ♥ Prasanna Kumar
   Palette: kumkum maroon · gold · ivory · mango-leaf green
   Fonts: Cormorant Garamond + Great Vibes
   ============================================================ */

:root {
  --maroon: #5c0a14;
  --maroon-2: #7a1220;
  --maroon-3: #8f1d2c;
  --gold: #c9a227;
  --gold-2: #e8c96a;
  --gold-3: #f6e4b3;
  --cream: #fdf6e7;
  --ivory: #fffaf0;
  --green: #2e5d3a;
  --green-2: #467a52;
  --ink: #3d1a12;

  --font-en: 'Cormorant Garamond', serif;
  --font-script: 'Great Vibes', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-en);
  color: var(--ink);
  background:
    repeating-linear-gradient(-45deg, rgba(201,162,39,.035) 0 2px, transparent 2px 9px),
    radial-gradient(ellipse at 50% 0%, #fffdf4 0%, var(--cream) 55%, #f7ecd4 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; height: 100dvh; }

/* thin double gold frame around the whole viewport */
.page-frame {
  position: fixed; inset: 7px; z-index: 60;
  pointer-events: none;
  border: 1px solid var(--gold);
  outline: 3px double var(--gold);
  outline-offset: 3px;
  opacity: 0; transition: opacity 1.2s ease .6s;
}
body.opened .page-frame { opacity: .85; }

/* ============================================================
   STAGE 1 — SEALED COVER (temple doors)
   ============================================================ */
#cover {
  position: fixed; inset: 0; z-index: 100;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  perspective: 1600px;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  /* whole cover melts away after the doors open, with a gentle push-in */
  transition: opacity .9s ease 2.2s, transform 3.4s cubic-bezier(.3,0,.2,1);
}
#cover.opening { opacity: 0; transform: scale(1.1); pointer-events: none; }
.cover-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 45%, #ffe9a8 0%, #eab94d 30%, var(--maroon-2) 75%);
  opacity: 0; transition: opacity 2.2s ease;
}
#cover.opening .cover-glow { opacity: 1; }

/* static marigold toranam garland hanging over the doorway */
.cover-toranam {
  position: absolute; top: 0; left: 0; right: 0; height: 104px;
  z-index: 4; pointer-events: none;
  background-image:
    linear-gradient(180deg, #9a7a17, #e8c96a 45%, #9a7a17),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='96' viewBox='0 0 64 96'%3E%3Cpath d='M0 8 Q32 22 64 8' fill='none' stroke='%23c9a227' stroke-width='2.5'/%3E%3Cline x1='16' y1='14' x2='16' y2='80' stroke='%239a7a17' stroke-width='1.4'/%3E%3Cline x1='48' y1='12' x2='48' y2='56' stroke='%239a7a17' stroke-width='1.4'/%3E%3Cellipse cx='8' cy='26' rx='5' ry='2.4' fill='%232e5d3a' transform='rotate(-32 8 26)'/%3E%3Cellipse cx='24' cy='50' rx='5' ry='2.4' fill='%232e5d3a' transform='rotate(28 24 50)'/%3E%3Cellipse cx='8' cy='68' rx='5' ry='2.4' fill='%232e5d3a' transform='rotate(-24 8 68)'/%3E%3Cellipse cx='56' cy='24' rx='5' ry='2.4' fill='%232e5d3a' transform='rotate(30 56 24)'/%3E%3Cellipse cx='40' cy='44' rx='5' ry='2.4' fill='%232e5d3a' transform='rotate(-28 40 44)'/%3E%3Ccircle cx='16' cy='18' r='7' fill='%23e07b12'/%3E%3Ccircle cx='16' cy='18' r='4' fill='%23f79824'/%3E%3Ccircle cx='16' cy='18' r='1.6' fill='%23ffd166'/%3E%3Ccircle cx='16' cy='31' r='6.5' fill='%23e07b12'/%3E%3Ccircle cx='16' cy='31' r='3.7' fill='%23f79824'/%3E%3Ccircle cx='16' cy='31' r='1.5' fill='%23ffd166'/%3E%3Ccircle cx='16' cy='43' r='6' fill='%23e07b12'/%3E%3Ccircle cx='16' cy='43' r='3.4' fill='%23f79824'/%3E%3Ccircle cx='16' cy='43' r='1.4' fill='%23ffd166'/%3E%3Ccircle cx='16' cy='55' r='5.5' fill='%23e07b12'/%3E%3Ccircle cx='16' cy='55' r='3.1' fill='%23f79824'/%3E%3Ccircle cx='16' cy='55' r='1.3' fill='%23ffd166'/%3E%3Ccircle cx='16' cy='66' r='5' fill='%23e07b12'/%3E%3Ccircle cx='16' cy='66' r='2.8' fill='%23f79824'/%3E%3Ccircle cx='16' cy='66' r='1.2' fill='%23ffd166'/%3E%3Ccircle cx='16' cy='76' r='4.4' fill='%23e07b12'/%3E%3Ccircle cx='16' cy='76' r='2.4' fill='%23f79824'/%3E%3Ccircle cx='16' cy='84' r='3' fill='%23c9622c'/%3E%3Ccircle cx='48' cy='16' r='7' fill='%23e07b12'/%3E%3Ccircle cx='48' cy='16' r='4' fill='%23f79824'/%3E%3Ccircle cx='48' cy='16' r='1.6' fill='%23ffd166'/%3E%3Ccircle cx='48' cy='29' r='6.3' fill='%23e07b12'/%3E%3Ccircle cx='48' cy='29' r='3.6' fill='%23f79824'/%3E%3Ccircle cx='48' cy='29' r='1.5' fill='%23ffd166'/%3E%3Ccircle cx='48' cy='41' r='5.6' fill='%23e07b12'/%3E%3Ccircle cx='48' cy='41' r='3.2' fill='%23f79824'/%3E%3Ccircle cx='48' cy='41' r='1.4' fill='%23ffd166'/%3E%3Ccircle cx='48' cy='52' r='5' fill='%23e07b12'/%3E%3Ccircle cx='48' cy='52' r='2.8' fill='%23f79824'/%3E%3Ccircle cx='48' cy='60' r='3' fill='%23c9622c'/%3E%3C/svg%3E");
  background-repeat: no-repeat, repeat-x;
  background-size: 100% 9px, 64px 96px;
  background-position: top center, 0 7px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.35));
}

.door {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 6 54 30 30 54 6 30Z' fill='none' stroke='%23e8c96a' stroke-opacity='.10' stroke-width='1.2'/%3E%3Ccircle cx='30' cy='30' r='2' fill='%23e8c96a' fill-opacity='.12'/%3E%3C/svg%3E"),
    linear-gradient(90deg, rgba(0,0,0,.35), transparent 24%, rgba(255,225,150,.06) 50%, transparent 76%, rgba(0,0,0,.35)),
    linear-gradient(180deg, transparent 72%, rgba(0,0,0,.32)),
    linear-gradient(160deg, var(--maroon-2), var(--maroon) 55%, #3f050d);
  background-size: 60px 60px, auto, auto, auto;
  transition: transform 2.6s cubic-bezier(.77,0,.18,1) .3s;
  z-index: 2;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
  overflow: hidden;
}
/* gold edge where the two door leaves meet — literal door trim */
.door-left  { left: 0;  transform-origin: left center;  border-right: 5px solid var(--gold); }
.door-right { right: 0; transform-origin: right center; border-left: 5px solid var(--gold); }

/* royal studded panel, filling the full door leaf */
.door-motif {
  position: absolute; inset: 112px 14px 16px;
  border: 1.5px solid rgba(232,201,106,.6);
  outline: 1px solid rgba(201,162,39,.4);
  outline-offset: 4px;
  border-radius: 14px 14px 10px 10px;
  background-image:
    radial-gradient(circle at 50% 7%, rgba(232,201,106,.15), transparent 38%),
    linear-gradient(rgba(232,201,106,.45), rgba(232,201,106,.45)),
    linear-gradient(rgba(232,201,106,.45), rgba(232,201,106,.45));
  background-repeat: no-repeat;
  background-size: auto, 100% 1.5px, 100% 1.5px;
  background-position: 0 0, 0 26%, 0 72%;
}
/* middle band of brass bosses, like temple doors */
.door-motif::after {
  content: ""; position: absolute; left: 8%; right: 8%; top: 30%; bottom: 32%;
  border: 1px solid rgba(232,201,106,.35);
  border-radius: 8px;
  background-image:
    radial-gradient(circle at 13px 15px, rgba(246,228,179,.9) 0 1.9px, rgba(154,122,23,.9) 2.3px, rgba(60,6,12,.5) 2.8px, transparent 3.4px);
  background-size: 26px 30px;
}
/* diamond rosette in the bottom section */
.door-gem {
  position: absolute; bottom: 12%; left: 50%; width: 58px; height: 58px;
  transform: translateX(-50%) rotate(45deg);
  border: 1.5px solid rgba(232,201,106,.55);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 50%, var(--gold-2) 0 5px, rgba(232,201,106,.3) 6px, transparent 7px);
  box-shadow: inset 0 0 0 5px rgba(92,10,20,.45), inset 0 0 0 6px rgba(232,201,106,.35);
}

/* warm light washing over the leaves as they swing open */
.door::before {
  content: ""; position: absolute; inset: 0; z-index: 2;
  opacity: 0; transition: opacity 2.2s ease .5s;
  pointer-events: none;
}
.door-left::before  { background: linear-gradient(270deg, rgba(255,235,170,.4), rgba(255,235,170,0) 55%); }
.door-right::before { background: linear-gradient(90deg, rgba(255,235,170,.4), rgba(255,235,170,0) 55%); }
#cover.opening .door::before { opacity: 1; }

/* shaft of light escaping through the opening seam */
.light-beam {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 8px; margin-left: -4px;
  background: linear-gradient(180deg, rgba(255,240,200,0), rgba(255,238,190,.95) 30%, rgba(255,238,190,.95) 70%, rgba(255,240,200,0));
  filter: blur(10px);
  opacity: 0; transform: scaleX(.2);
  z-index: 2; pointer-events: none;
  will-change: transform, opacity;
}
#cover.opening .light-beam { animation: beam 2.8s ease .4s forwards; }
@keyframes beam {
  0%   { opacity: 0; transform: scaleX(.2); }
  30%  { opacity: 1; transform: scaleX(8); }
  100% { opacity: 0; transform: scaleX(70); }
}

#cover.opening .door-left  { transform: rotateY(-108deg); }
#cover.opening .door-right { transform: rotateY(108deg); }
#cover.gone { display: none; }

/* wax-seal emblem */
.seal {
  position: relative; z-index: 5;
  filter: drop-shadow(0 10px 26px rgba(0,0,0,.5));
  animation: seal-breathe 3.2s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes seal-breathe { 50% { transform: scale(1.035); } }
/* on tap: the seal swells for a beat, then dissolves — doors follow */
#cover.opening .seal { animation: seal-pop .9s cubic-bezier(.6,0,.4,1) forwards; }
@keyframes seal-pop {
  0%   { transform: scale(1); opacity: 1; }
  35%  { transform: scale(1.14); opacity: 1; }
  100% { transform: scale(.3) rotate(6deg); opacity: 0; }
}

.seal-ring {
  width: clamp(140px, 40vw, 184px); height: clamp(140px, 40vw, 184px);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #f3d98b, var(--gold) 45%, #9a7a17 100%);
  border: 3px solid #fff3cf;
  outline: 2px solid var(--gold);
  outline-offset: 5px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: var(--maroon);
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* slow light sweep across the seal */
.seal-ring::after {
  content: ""; position: absolute; inset: -20%;
  background: linear-gradient(115deg, transparent 38%, rgba(255,252,235,.45) 50%, transparent 62%);
  transform: translateX(-130%);
  animation: seal-shimmer 4.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes seal-shimmer {
  0%, 55% { transform: translateX(-130%); }
  85%, 100% { transform: translateX(130%); }
}
.seal-om { font-family: serif; font-size: clamp(30px, 9vw, 40px); font-weight: 700; line-height: 1.15; }
.seal-initials {
  font-family: var(--font-en);
  font-size: clamp(30px, 9vw, 42px); font-weight: 600; letter-spacing: .06em;
}
.seal-initials i { font-style: normal; font-size: .55em; vertical-align: middle; color: var(--maroon-3); }
.seal-sub { font-family: var(--font-en); font-size: 11px; letter-spacing: .18em; opacity: .8; }

.tap-hint {
  position: absolute; bottom: max(34px, env(safe-area-inset-bottom, 0px) + 30px);
  z-index: 5; text-align: center; color: #fdf3d9;
  font-size: 15px; line-height: 1.7; letter-spacing: .14em;
  padding: 0 20px;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
}
.tap-pill {
  display: inline-block;
  padding: 13px 28px;
  border: 1px solid var(--gold-2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(40,3,9,.9), rgba(60,7,14,.9));
  box-shadow: 0 0 0 3px rgba(92,10,20,.35), 0 4px 14px rgba(0,0,0,.45);
  animation: tap-pulse 2.6s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes tap-pulse {
  50% { opacity: .82; transform: scale(.975); }
}
#cover.opening .tap-hint { opacity: 0; transition: opacity .4s; }

/* ============================================================
   FLOATING MUSIC TOGGLE
   ============================================================ */
.music-btn {
  position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); right: 16px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--gold-2);
  background: radial-gradient(circle at 35% 30%, var(--maroon-3), var(--maroon));
  color: var(--gold-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 16px rgba(61,26,18,.4);
}
.music-btn svg { display: block; }
.music-btn .ic-off { display: none; }
.music-btn.muted .ic-on { display: none; }
.music-btn.muted .ic-off { display: block; }
.music-btn:not(.muted) { animation: music-pulse 3s ease-in-out infinite; }
@keyframes music-pulse { 50% { transform: scale(1.06); } }

/* ============================================================
   STAGE 2 — PAGE STRUCTURE
   ============================================================ */
#invite {
  opacity: 0; transform: translateY(18px);
  transition: opacity 1.3s ease .4s, transform 1.3s cubic-bezier(.22,.61,.36,1) .4s;
}
body.opened #invite { opacity: 1; transform: none; }

.section { padding: 56px 20px; max-width: 680px; margin: 0 auto; text-align: center; }

.section-title {
  font-size: clamp(24px, 6.4vw, 32px);
  color: var(--maroon);
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 28px;
  position: relative; display: inline-block;
}
.section-title::after {
  content: ""; display: block; margin: 10px auto 0;
  width: 72px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* mango-leaf toranam garland (SVG tile, repeated) */
.toranam {
  height: 56px; width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='56' viewBox='0 0 72 56'%3E%3Cpath d='M0 6 Q18 12 36 6 T72 6' fill='none' stroke='%23c9a227' stroke-width='2.5'/%3E%3Cpath d='M18 9 q-7 14 0 26 q9-11 0-26z' fill='%232e5d3a'/%3E%3Cpath d='M36 7 q-7 15 0 28 q9-12 0-28z' fill='%23467a52'/%3E%3Cpath d='M54 9 q-7 14 0 26 q9-11 0-26z' fill='%232e5d3a'/%3E%3Ccircle cx='18' cy='40' r='3' fill='%23e8a33d'/%3E%3Ccircle cx='36' cy='42' r='3' fill='%23e8a33d'/%3E%3Ccircle cx='54' cy='40' r='3' fill='%23e8a33d'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 72px 56px;
}

/* ornate divider between sections */
.divider {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  max-width: 420px; margin: 0 auto; padding: 0 32px;
  color: var(--gold);
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.divider::after { background: linear-gradient(90deg, var(--gold), transparent); }
.divider span { font-size: 15px; }

/* scroll-reveal */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 1s cubic-bezier(.22,.61,.36,1), transform 1s cubic-bezier(.22,.61,.36,1);
}
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-top: 34px; padding-bottom: 64px; overflow: hidden; }

.sri { color: var(--maroon); font-weight: 700; font-size: 17px; letter-spacing: .1em; }

.shloka {
  margin-top: 14px;
  color: var(--green);
  font-size: clamp(13px, 3.6vw, 15px);
  line-height: 2;
  white-space: pre-line;
  font-style: italic;
}

.shubhalekha-badge { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 26px; }
.shubhalekha-badge .line { flex: 0 0 44px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--gold)); }
.shubhalekha-badge .line:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.shubhalekha-badge h1 {
  font-family: var(--font-script);
  font-size: clamp(34px, 9.5vw, 48px);
  color: var(--maroon);
  font-weight: 400;
}

.invite-line { margin-top: 12px; font-size: clamp(16px, 4.4vw, 19px); color: var(--maroon-3); letter-spacing: .04em; }

.couple-names { margin-top: 34px; }
.couple-names .name {
  font-family: var(--font-script);
  font-size: clamp(38px, 11vw, 58px);
  color: var(--maroon);
  font-weight: 400;
  line-height: 1.15;
  text-shadow: 0 2px 0 rgba(201,162,39,.25);
}
.weds { color: var(--gold); margin: 8px 0; font-size: 15px; letter-spacing: .2em; }
.weds em { font-style: normal; color: var(--maroon-3); font-size: 14px; }

.date-badge {
  margin: 36px auto 0; padding: 18px 26px;
  max-width: 340px;
  border: 1.5px solid var(--gold);
  border-radius: 14px;
  background: linear-gradient(160deg, #fffdf4, var(--gold-3));
  box-shadow: 0 8px 22px rgba(122,18,32,.12);
  position: relative;
}
.date-badge .mango-leaf { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 20px; filter: hue-rotate(60deg) saturate(.7); }
.date-main { font-size: clamp(18px, 5vw, 22px); font-weight: 700; color: var(--maroon); }
.date-sub { margin-top: 6px; font-size: 14px; color: var(--green); }

.scroll-cue { margin-top: 40px; color: var(--maroon-3); font-size: 13px; opacity: .75; letter-spacing: .12em; }
.scroll-cue i { display: block; font-style: normal; font-size: 18px; color: var(--gold); animation: cue-bob 1.6s ease-in-out infinite; }
@keyframes cue-bob { 50% { transform: translateY(6px); } }

/* kolam corner ornaments */
.kolam {
  position: absolute; width: 74px; height: 74px; opacity: .5;
  background-image: radial-gradient(circle, var(--maroon-3) 1.5px, transparent 2px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(circle at 0 0, #000 0 55%, transparent 72%);
          mask-image: radial-gradient(circle at 0 0, #000 0 55%, transparent 72%);
}
.kolam-tl { top: 10px; left: 10px; }
.kolam-tr { top: 10px; right: 10px; transform: scaleX(-1); }

/* falling marigold petals */
.petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute; top: -24px;
  width: 13px; height: 13px;
  background: radial-gradient(circle at 35% 30%, #ffd166, #f79824 60%, #e07b12);
  border-radius: 78% 12% 78% 12%;
  opacity: .85;
  animation: petal-fall linear infinite;
}
.petal:nth-child(even) { background: radial-gradient(circle at 35% 30%, #ffb84d, #ee8a1f 60%, #c96a10); }
@keyframes petal-fall {
  0%   { transform: translate(0, -4vh) rotate(0deg); opacity: 0; }
  8%   { opacity: .9; }
  100% { transform: translate(var(--drift, 30px), 108vh) rotate(var(--spin, 360deg)); opacity: .4; }
}
/* one-time celebratory burst on open (fixed to viewport) */
.petals.burst { position: fixed; inset: 0; z-index: 95; }

@media (prefers-reduced-motion: reduce) {
  .petal, .scroll-cue i, .seal, .seal-ring::after, .tap-pill, .music-btn, .light-beam { animation: none !important; }
  .reveal, #invite { transition: none; }
}

/* ============================================================
   COUNTDOWN
   ============================================================ */
.countdown-frame {
  position: relative;
  margin: 0 auto; max-width: 420px;
  padding: 30px 18px 26px;
  border: 1.5px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 4px;
  border-radius: 6px;
  background: linear-gradient(170deg, var(--maroon), var(--maroon-2) 60%, #4a070f);
  box-shadow: 0 14px 30px rgba(92,10,20,.28);
}
.corner {
  position: absolute; width: 16px; height: 16px;
  border: 2px solid var(--gold-2);
}
.c-tl { top: -9px; left: -9px; border-right: none; border-bottom: none; }
.c-tr { top: -9px; right: -9px; border-left: none; border-bottom: none; }
.c-bl { bottom: -9px; left: -9px; border-right: none; border-top: none; }
.c-br { bottom: -9px; right: -9px; border-left: none; border-top: none; }

.countdown { display: flex; align-items: flex-start; justify-content: center; gap: 6px; }
.cd-cell { display: flex; flex-direction: column; align-items: center; min-width: 58px; }
.cd-num {
  font-family: var(--font-en);
  font-size: clamp(30px, 8.5vw, 40px);
  font-weight: 600; color: var(--gold-2);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.cd-label { margin-top: 4px; font-size: 12px; color: var(--gold-3); opacity: .85; letter-spacing: .14em; text-transform: uppercase; }
.cd-colon { color: var(--gold); font-size: 26px; line-height: 1.4; font-family: var(--font-en); }
.cd-done { margin-top: 14px; color: var(--gold-2); font-size: 18px; }

/* ============================================================
   COUPLE
   ============================================================ */
.couple-grid { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.couple-kalash { color: var(--gold); opacity: .9; }
.motif-svg { color: var(--gold); }

.person { max-width: 320px; }
.portrait {
  position: relative;
  width: min(240px, 68vw); aspect-ratio: 4 / 5;
  margin: 0 auto 16px;
  border-radius: 130px 130px 10px 10px;
  border: 2px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 5px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, #fff8e2, var(--gold-3)),
    var(--cream);
  box-shadow: 0 12px 26px rgba(92,10,20,.18);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait img.missing { display: none; }
.ph-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--maroon-3); font-size: 15px; opacity: .75;
  z-index: -1; /* sits behind the img; shows only when img is missing */
}
.portrait:has(img.missing) .ph-label, .portrait img.missing + .ph-label { z-index: 0; }

.person-role { color: var(--green); font-size: 14px; letter-spacing: .18em; text-transform: uppercase; }
.person-name { margin-top: 6px; font-size: clamp(22px, 6vw, 27px); color: var(--maroon); font-weight: 700; }
.person-parent { margin-top: 8px; font-size: 15px; line-height: 1.8; color: var(--ink); opacity: .85; }

/* ============================================================
   EVENTS TIMELINE
   ============================================================ */
.timeline { position: relative; text-align: left; max-width: 460px; margin: 0 auto; padding-left: 6px; }
.timeline::before {
  content: ""; position: absolute; top: 8px; bottom: 8px; left: 27px;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold) 8%, var(--gold) 92%, transparent);
}
.tl-item { position: relative; display: flex; gap: 18px; padding: 0 0 34px 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-icon {
  flex: 0 0 44px; width: 44px; height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--maroon-3), var(--maroon));
  border: 1.5px solid var(--gold-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-2);
  z-index: 1;
  box-shadow: 0 4px 12px rgba(92,10,20,.3);
}
.tl-icon svg { width: 26px; height: 26px; }
.tl-body { padding-top: 2px; }
.tl-name { font-size: clamp(19px, 5vw, 22px); color: var(--maroon); font-weight: 700; }
.tl-meta { margin-top: 5px; font-size: 14.5px; line-height: 1.8; color: var(--ink); opacity: .88; }
.tl-meta .tl-lagnam { color: var(--green); font-weight: 600; }

/* ============================================================
   VENUE
   ============================================================ */
.venue-card {
  border: 1.5px solid var(--gold);
  border-radius: 16px;
  padding: 26px 18px;
  background: linear-gradient(170deg, #fffdf4, var(--cream));
  box-shadow: 0 10px 26px rgba(92,10,20,.1);
}
.venue-card h4 { font-size: clamp(20px, 5.6vw, 25px); color: var(--maroon); }
.venue-card > p { margin-top: 8px; font-size: 15px; line-height: 1.8; opacity: .85; }
.map-wrap {
  margin: 18px 0;
  border: 1.5px solid var(--gold);
  border-radius: 12px; overflow: hidden;
  aspect-ratio: 4 / 3;
}
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.gold-btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 999px;
  background: linear-gradient(160deg, var(--gold-2), var(--gold));
  color: var(--maroon); font-weight: 700; font-size: 16px;
  text-decoration: none;
  border: 1px solid #fff3cf;
  outline: 1.5px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 6px 16px rgba(201,162,39,.4);
  transition: transform .2s ease;
}
.gold-btn:active { transform: scale(.96); }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-hint { font-size: 13px; color: var(--maroon-3); opacity: .7; margin-bottom: 16px; font-style: italic; }
.gallery-track {
  display: flex; gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 18px;
  -webkit-overflow-scrolling: touch;
}
.gallery-track::-webkit-scrollbar { height: 5px; }
.gallery-track::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
.g-item {
  position: relative;
  flex: 0 0 min(240px, 70vw);
  aspect-ratio: 3 / 4;
  scroll-snap-align: center;
  border-radius: 12px;
  border: 1.5px solid var(--gold);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, #fff8e2, var(--gold-3));
  display: flex; align-items: center; justify-content: center;
}
.g-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-item img.missing { display: none; }
.g-ph { color: var(--maroon-3); opacity: .7; font-size: 14px; text-align: center; padding: 10px; }

/* ============================================================
   BLESSINGS + FOOTER
   ============================================================ */
.blessings-list { list-style: none; max-width: 620px; margin: 0 auto; }
.blessings-list li {
  font-size: clamp(13.5px, 3.9vw, 21px);   /* shrinks just enough to stay on one line on phones */
  line-height: 2;
  color: var(--ink);
  text-wrap: balance;
}
.blessings-list li::before { content: "\2741"; color: var(--gold); font-size: .8em; margin-right: .5em; }
.blessings-note { margin-top: 18px; color: var(--green); font-size: 15px; font-style: italic; }

.footer {
  margin-top: 20px;
  padding: 56px 20px calc(56px + env(safe-area-inset-bottom));
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(122,18,32,.06)),
              linear-gradient(0deg, var(--maroon), var(--maroon-2));
  color: var(--gold-3);
}
.footer-motif { color: var(--gold-2); margin-bottom: 14px; }
.footer-quote { font-size: clamp(20px, 5.6vw, 26px); color: var(--gold-2); font-weight: 700; }
.footer-names { margin-top: 22px; font-family: var(--font-script); font-size: 26px; letter-spacing: .06em; }

/* ============================================================
   WIDER SCREENS
   ============================================================ */
@media (min-width: 640px) {
  .couple-grid { flex-direction: row; justify-content: center; align-items: flex-start; }
  .couple-kalash { align-self: center; }
  .section { padding: 72px 24px; }
}
