/* =========================================================
   Heena & Savan — Shubh Vivah
   A painted storybook: Parvati’s foot meets Mahadev’s palm → dusk scene with lanterns
   → textile sections (teal · rose · haldi · kumkum)
   ========================================================= */
:root {
  --cream: #f7e9c6;
  --cream-l: #fff6e0;
  --cream-d: #e6cf9c;
  --gold: #d6ad5a;
  --gold-l: #f3d999;
  --teal: #2c6f68;
  --teal-d: #163f3c;
  --rose: #b9668f;
  --rose-d: #7d2f5a;
  --haldi: #d6a83a;
  --haldi-ink: #5a3608;
  --kumkum: #5c1420;
  --kumkum-d: #36080f;
  --sky: #1d3550;

  --f-caps: "Cinzel", "Times New Roman", serif;
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-gu: "Noto Serif Gujarati", serif;

  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--sky); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--f-serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--cream);
  background: var(--sky);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; height: 100svh; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.gu { font-family: var(--f-gu); }

/* split-text pieces */
.w { display: inline-block; white-space: nowrap; }
.nb { display: inline-block; } /* keep each person's name on one line */
.ch { display: inline-block; will-change: transform, opacity, filter; }

/* ---------------- LOADER ---------------- */
#loader {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  background: #170b06;
  transition: opacity .9s var(--ease), visibility .9s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-logo { width: 96px; animation: breathe 2.4s ease-in-out infinite; }
.loader-bar { width: 140px; height: 2px; background: rgba(243,217,153,.18); border-radius: 2px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--gold-l); transition: width .5s var(--ease); }
@keyframes breathe { 50% { transform: scale(1.06); opacity: .75; } }

/* ---------------- GATE : foot meets palm ---------------- */
#gate {
  position: fixed; inset: 0; z-index: 300; overflow: hidden;
  cursor: pointer; outline: none; background: var(--sky);
}
.gate-sky {
  position: absolute; inset: -4%;
  background: url("../assets/img/v2/sky.webp") center 35% / cover no-repeat;
  will-change: transform;
}
.lanterns-gate { z-index: 1; }
.gate-intro {
  position: absolute; left: 0; right: 0; top: 16svh; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-shadow: 0 2px 14px rgba(12, 22, 44, .6);
}
.gate-logo { width: clamp(110px, 30vw, 150px); filter: drop-shadow(0 4px 18px rgba(12, 22, 44, .55)); }
.gate-gu { margin: 0; font-size: 20px; color: var(--cream-l); }

/* the meeting: design box 1016 × 806 (both cut-outs share one scale; sole rests in the palm) */
.meet {
  position: absolute; left: 50%; top: 54%; z-index: 2;
  width: clamp(420px, 114vw, 940px); aspect-ratio: 1016 / 806;
  transform: translate(-55.5%, -83%); /* puts the contact point at (50%, 54%) of the screen */
  pointer-events: none;
}
.meet-foot { /* the painting is cropped at its top & left edge: fade those edges into the sky */
  -webkit-mask: linear-gradient(to bottom, transparent 0, #000 26%), linear-gradient(to right, transparent 0, #000 14%);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(to bottom, transparent 0, #000 26%), linear-gradient(to right, transparent 0, #000 14%);
  mask-composite: intersect;
  position: absolute; left: 0; top: 0; width: 68.3%; z-index: 2; filter: drop-shadow(0 18px 18px rgba(40, 10, 30, .35)); will-change: transform; }
.meet-hand {
  -webkit-mask: linear-gradient(to left, transparent 0, #000 14%); mask: linear-gradient(to left, transparent 0, #000 14%);
  position: absolute; left: 32.9%; top: 52.6%; width: 67.1%; z-index: 1; filter: drop-shadow(0 18px 22px rgba(10, 20, 50, .35)); will-change: transform; }
.meet-glow {
  position: absolute; left: 55.5%; top: 83%; width: 46%; aspect-ratio: 1; z-index: 3;
  transform: translate(-50%, -50%) scale(.2); opacity: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 180, .95) 0%, rgba(255, 196, 92, .45) 30%, transparent 68%);
  mix-blend-mode: screen;
}
.gate-lines {
  position: absolute; left: 0; right: 0; bottom: calc(max(7svh, 40px) + 64px); z-index: 3;
  text-align: center; font-style: italic; font-size: clamp(22px, 5.6vw, 30px); line-height: 1.3; color: var(--cream-l);
  text-shadow: 0 2px 14px rgba(60, 20, 10, .55);
}
.gate-lines p { margin: 0; opacity: 0; }
.gate-tap {
  position: absolute; left: 50%; bottom: max(7svh, 40px); z-index: 3; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; margin: 0; white-space: nowrap;
  padding: 10px 22px; border-radius: 99px; color: var(--cream-l);
  font-family: var(--f-caps); font-size: 13px; letter-spacing: .28em; text-transform: uppercase;
  background: rgba(29, 53, 80, .45); border: 1px solid rgba(255, 246, 224, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tap-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-l); box-shadow: 0 0 0 0 rgba(243,217,153,.7); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 12px rgba(243,217,153,0); } 100% { box-shadow: 0 0 0 0 rgba(243,217,153,0); } }

#petals { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 250; pointer-events: none; }

/* ---------------- MUSIC ---------------- */
.music-btn {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 260;
  width: 46px; height: 46px; border-radius: 50%;
  display: none; align-items: flex-end; justify-content: center; gap: 3px; padding: 14px 12px;
  background: rgba(54, 8, 15, .7); border: 1px solid rgba(243,217,153,.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.music-btn.show { display: flex; }
.music-btn span { width: 3px; height: 100%; background: var(--gold-l); border-radius: 2px; transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.music-btn span:nth-child(2) { animation-delay: -.3s; } .music-btn span:nth-child(3) { animation-delay: -.6s; } .music-btn span:nth-child(4) { animation-delay: -.15s; }
.music-btn[aria-pressed="false"] span { animation: none; transform: scaleY(.25); }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ---------------- SCENE (pinned camera pan) ---------------- */
#scene { position: relative; height: 260svh; background: var(--sky); }
.scene-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.scene-blur {
  position: absolute; inset: -40px;
  background: url("../assets/img/v2/hero.webp") center 30% / cover no-repeat;
  filter: blur(28px) saturate(1.1) brightness(.75);
  transform: scale(1.1);
}
/* the "camera": painting width chosen in JS (--sw), translated by scroll */
.scene-cam {
  position: absolute; top: 0; left: 50%;
  width: var(--sw, 100vw); margin-left: calc(var(--sw, 100vw) / -2);
  will-change: transform; transform-origin: 50% 0;
  box-shadow: 0 0 80px 30px rgba(10, 18, 34, .55);
}
.scene-img { width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.scene-glow { /* warm breathing light in the jharokha & diyas */
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background:
    radial-gradient(18% 9% at 50% 55%, rgba(255, 180, 90, .35), transparent 70%),
    radial-gradient(60% 10% at 50% 92%, rgba(255, 170, 70, .3), transparent 70%);
  animation: glow 4s ease-in-out infinite;
}
@keyframes glow { 50% { opacity: .45; } }

.lanterns { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.lantern {
  position: absolute; left: 0; top: 0; width: var(--s, 40px);
  filter: drop-shadow(0 0 14px rgba(255, 168, 60, .75)) drop-shadow(0 0 40px rgba(255, 140, 40, .35));
  will-change: transform;
}
.lantern.far { filter: blur(1.6px) drop-shadow(0 0 10px rgba(255, 168, 60, .6)); opacity: .75; }

.names {
  position: absolute; left: 0; right: 0; top: 13svh; z-index: 3; margin: 0;
  display: flex; flex-direction: column; align-items: center;
  font-weight: 400; text-align: center; color: var(--cream-l);
  text-shadow: 0 2px 24px rgba(12, 22, 44, .55);
}
.names .nm { font-family: var(--f-caps); font-size: clamp(46px, 13.5vw, 112px); letter-spacing: .06em; line-height: 1; }
.names .weds { font-family: var(--f-caps); font-size: clamp(15px, 3.6vw, 24px); letter-spacing: .6em; margin: 10px 0 8px .6em; opacity: .9; }
.scene-date {
  position: absolute; left: 0; right: 0; top: calc(13svh + clamp(46px, 13.5vw, 112px) * 2 + 70px); z-index: 3; margin: 0;
  text-align: center; font-style: italic; font-size: clamp(18px, 4.6vw, 26px); color: var(--cream);
  text-shadow: 0 2px 14px rgba(12, 22, 44, .6);
}
.scroll-cue {
  position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 3; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--f-caps); font-size: 11px; letter-spacing: .35em; color: var(--cream-l);
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.scroll-cue span { width: 1px; height: 38px; background: linear-gradient(var(--cream-l), transparent); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 80% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------------- TEXTILE SECTIONS ---------------- */
.sec { position: relative; z-index: 2; padding: 90px 22px; text-align: center; background-size: 520px 520px; background-repeat: repeat; }
.tex-teal   { background-color: var(--teal);   background-image: url("../assets/img/v2/tex/teal.webp"); }
.tex-rose   { background-color: var(--rose);   background-image: url("../assets/img/v2/tex/rose.webp"); }
.tex-haldi  { background-color: var(--haldi);  background-image: url("../assets/img/v2/tex/haldi.webp"); color: var(--haldi-ink); }
.tex-kumkum { background-color: var(--kumkum); background-image: url("../assets/img/v2/tex/kumkum.webp"); }
.wrap { max-width: 620px; margin: 0 auto; position: relative; }
.wrap.wide { max-width: 1080px; }

/* the fabric diffuses up over the bottom of the painting instead of a hard edge */
.invitation { --fade: clamp(160px, 34svh, 320px); padding-top: 70px; }
.fade-top {
  position: absolute; left: 0; right: 0; top: calc(var(--fade) * -1); height: calc(var(--fade) + 1px);
  pointer-events: none;
  background: inherit; background-position: 0 var(--fade);
  -webkit-mask: linear-gradient(to bottom, transparent, rgba(0,0,0,.08) 25%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.75) 75%, #000);
          mask: linear-gradient(to bottom, transparent, rgba(0,0,0,.08) 25%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.75) 75%, #000);
}

.tiny { font-size: 15px; letter-spacing: .04em; margin: 0 0 18px; opacity: .9; }
.soft { font-style: italic; font-size: 21px; margin: 6px 0; opacity: .92; }
.soft-gu { font-size: 16px; margin: 10px 0 0; opacity: .85; }
.bless { font-size: 25px; font-weight: 500; margin: 4px 0; line-height: 1.3; }
.ganesha { width: min(190px, 48vw); margin: 0 auto 26px; }
.rule { display: block; width: 80px; height: 1px; margin: 34px auto; background: linear-gradient(90deg, transparent, var(--cream), transparent); }

.caps-xl {
  font-family: var(--f-caps); font-weight: 400;
  font-size: clamp(40px, 11vw, 84px); line-height: 1.08; letter-spacing: .04em;
  margin: 14px 0 18px;
}
.caps-sm { font-family: var(--f-caps); font-size: clamp(15px, 4vw, 20px); letter-spacing: .3em; margin: 0; text-transform: uppercase; opacity: .9; }

.couple-names { margin: 44px 0 10px; }
.script { font-family: var(--f-serif); font-weight: 300; font-size: clamp(76px, 22vw, 150px); line-height: .95; margin: 0; letter-spacing: .01em; }
.amp { font-family: var(--f-serif); font-style: italic; font-weight: 300; font-size: clamp(54px, 14vw, 96px); line-height: 1; margin: 18px 0 6px; color: var(--gold-l); }
.parents { font-size: 20px; margin: 14px 0 0; line-height: 1.45; }
.parents em { font-size: 17px; opacity: .8; }
.follow { margin-top: 56px; }

/* ---------------- EVENTS ---------------- */
.events { padding-top: 10px; padding-bottom: calc(min(620px, 92vw) * .48 + 70px); }
.day { margin: 40px 0 34px; }
.day-k { font-family: var(--f-caps); font-size: clamp(30px, 8vw, 46px); letter-spacing: .08em; margin: 0; }
.day-v { font-style: italic; font-size: 20px; margin: 2px 0 0; opacity: .9; }
.ev-grid { display: grid; gap: 64px 40px; grid-template-columns: 1fr; justify-items: center; margin-bottom: 40px; }
@media (min-width: 720px) {
  .ev-grid.two { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; }
  .ev-grid.three { grid-template-columns: repeat(3, minmax(0, 300px)); justify-content: center; }
}
.ev { position: relative; width: min(300px, 78vw); }
.oval {
  position: relative; aspect-ratio: 3 / 4; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 3px var(--gold-l), 0 0 0 9px rgba(22, 63, 60, .55), 0 0 0 10px rgba(243,217,153,.55), 0 24px 50px rgba(6, 24, 24, .5);
  transform: translateZ(0);
}
.oval img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); will-change: transform; }
.fl { position: absolute; width: 46%; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.3)); }
.fl-a { top: -6%; right: -14%; transform: rotate(8deg); }
.fl-b { bottom: 22%; left: -16%; transform: scaleX(-1) rotate(-160deg); width: 38%; }
.ev-gu { margin: 26px 0 0; font-size: 18px; opacity: .85; }
.ev h3 { font-family: var(--f-caps); font-weight: 400; font-size: 34px; letter-spacing: .08em; margin: 2px 0 4px; }
.ev-meta { margin: 0; font-size: 20px; font-style: italic; }
.route { display: inline-block; margin-top: 8px; font-size: 17px; font-weight: 600; text-underline-offset: 4px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 30px;
  padding: 14px 26px; border-radius: 99px; cursor: pointer; text-decoration: none;
  font-family: var(--f-caps); font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--cream-l); background: rgba(0, 0, 0, .18); border: 1px solid rgba(247,233,198,.6);
  transition: background .3s, transform .3s var(--ease);
}
.btn:hover { background: rgba(0, 0, 0, .3); transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }

/* ---------------- HAND-OFF OBJECTS ---------------- */
.handoff { position: relative; z-index: 5; height: 0; display: flex; justify-content: center; }
.car { position: absolute; width: min(620px, 92vw); top: 0; filter: drop-shadow(0 26px 22px rgba(30, 10, 20, .45)); will-change: transform; }

/* ---------------- COUPLE ---------------- */
.couple { padding-top: calc(min(620px, 92vw) * .3 + 70px); }
.jharokha { position: relative; width: min(400px, 86vw); margin: 34px auto 10px; aspect-ratio: 760 / 1091; }
.jh-photo { position: absolute; left: 21%; right: 21%; top: 19%; bottom: 14.8%; overflow: hidden; background: #6a2a48; }
.jh-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.15); will-change: transform; }
.jh-frame { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 20px 30px rgba(60, 10, 40, .45)); }
.pun { font-style: italic; font-size: clamp(23px, 6vw, 30px); line-height: 1.35; margin: 40px auto 18px; max-width: 520px; }
.pun em { color: var(--cream-l); font-weight: 500; }
.note { font-size: 20px; opacity: .92; margin: 0 auto; max-width: 520px; }

/* ---------------- VENUE : envelope ---------------- */
.venue { padding-top: 40px; padding-bottom: 150px; }
.envelope { /* painted envelope in layers: body < card < pocket < flap (folds on its bottom edge) */
  --w: min(360px, 88vw);
  position: relative; display: block; width: var(--w); aspect-ratio: 820 / 554;
  margin: calc(var(--w) * .5) auto 28px; text-decoration: none; color: #4a1730;
  perspective: 1100px;
}
.env-body, .env-pocket { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.env-body { z-index: 1; filter: drop-shadow(0 26px 30px rgba(60, 8, 32, .45)); }
.env-pocket { z-index: 3; }
.env-card {
  position: absolute; left: 7%; right: 7%; top: 7%; height: 84%; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 16px 12px;
  background: #fffaf0 url("../assets/img/v2/tex/ivory.webp") center / 240px; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(176, 132, 60, .55), inset 0 0 0 5px #fffaf0, inset 0 0 0 6px rgba(176, 132, 60, .4), 0 4px 16px rgba(0,0,0,.18);
  will-change: transform;
}
.card-k { font-family: var(--f-caps); font-size: clamp(18px, 5.6vw, 24px); letter-spacing: .05em; line-height: 1.1; color: #6e1a3f; }
.card-v { font-size: clamp(15px, 4.3vw, 17px); line-height: 1.3; }
.card-cta { margin-top: 6px; font-family: var(--f-caps); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #8a2a52; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.env-flap {
  position: absolute; left: 0; width: 100%; top: -61.9%; height: 62.8%; z-index: 4;
  transform-origin: 50% 100%; transform-style: preserve-3d; pointer-events: none; will-change: transform;
}
.env-flap img { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.env-flap .flap-out { transform: rotateX(180deg); }
.env-seal {
  position: absolute; left: 50%; top: 56%; z-index: 5; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #a3283a, #6e1020 60%, #4a0812);
  box-shadow: 0 4px 12px rgba(0,0,0,.4), inset 0 0 0 2px rgba(243,217,153,.6);
}
.env-seal img { width: 32px; }
.map-note { font-style: italic; font-size: 18px; opacity: .9; margin: 0; }

/* ---------------- COUNTDOWN ---------------- */
.countdown { padding-top: calc(min(760px, 120vw) * .48 + 20px); padding-bottom: 110px; }
.toran { position: absolute; top: -8px; left: 50%; width: min(760px, 120vw); transform: translateX(-50%); transform-origin: top center; z-index: 3; pointer-events: none; filter: drop-shadow(0 12px 14px rgba(70, 30, 0, .35)); }
.countdown .caps-xl { color: #4a2a05; }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 460px; margin: 26px auto 0; }
.cd { padding: 16px 4px 12px; border-radius: 10px; background: rgba(255, 246, 220, .35); border: 1px solid rgba(90, 54, 8, .3); }
.cd b { display: block; font-family: var(--f-caps); font-weight: 500; font-size: clamp(28px, 8vw, 42px); line-height: 1; color: #4a2a05; }
.cd b.tick { animation: tick .5s var(--ease); }
.cd span { font-family: var(--f-caps); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
@keyframes tick { from { transform: translateY(-6px); opacity: .3; } }
.cd-note { font-style: italic; font-size: 19px; margin: 22px 0 0; }

/* ---------------- CLOSING ---------------- */
.closing { padding-top: 110px; padding-bottom: 80px; overflow: hidden; }
.closing .wrap { z-index: 3; }
.close-gu { font-size: 18px; margin: 0 0 8px; color: var(--gold-l); }
.families { margin: 36px auto 0; }
.fam-label { font-style: italic; font-size: 19px; margin: 0 0 10px; opacity: .85; }
.fam { font-size: 23px; margin: 0; line-height: 1.35; }
.fam-and { font-style: italic; font-size: 22px; margin: 6px 0; color: var(--gold-l); }
.close-logo { width: 110px; margin: 56px auto 12px; }
.hashtag { font-family: var(--f-caps); letter-spacing: .14em; font-size: 18px; margin: 0; color: var(--gold-l); }
.footer-gu { font-size: 16px; margin: 26px 0 0; opacity: .75; }

/* ---------------- REVEAL INITIAL STATE (only with JS) ---------------- */
.js [data-reveal] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
