/* =====================================================================
   WEDDING INVITATION · STYLES
   Sections are in the same order as the page. Colours & fonts live in
   :root so the whole palette can be tuned in one place.
   ===================================================================== */

/* ---------- 0. Tokens ---------- */
:root {
  --ivory: #FBF8F3;
  --ivory-2: #F4ECE0;
  --white: #FFFFFF;
  --maroon: #8B1A2B;
  --maroon-dark: #5E0F1C;
  --red-1: #B0122B;
  --red-2: #8B0F22;
  --gold-1: #C9A24A;
  --gold-2: #E8CF8A;
  --gold-deep: #A8822F;
  --blush: #F4D9DC;
  --pink: #D6457A;
  --brown: #4A2E22;
  --muted: #7C5E50;

  --gold-gradient: linear-gradient(100deg, #94691E 0%, #C49A45 26%, #DDBE72 46%, #B48A33 64%, #D2B062 82%, #9A7224 100%);
  --gold-gradient-light: linear-gradient(100deg, #C9A24A 0%, #E8CF8A 30%, #FFF0C2 48%, #D9B762 66%, #F3DFA2 84%, #C9A24A 100%);
  --red-gradient: linear-gradient(170deg, var(--red-1) 0%, #9C1027 55%, var(--red-2) 100%);

  --font-script: "Pinyon Script", "Great Vibes", cursive;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-caps: "Cinzel", "Times New Roman", serif;

  --radius: 20px;
  --shadow-soft: 0 10px 30px -12px rgba(94, 15, 28, 0.22), 0 2px 8px rgba(94, 15, 28, 0.06);
  --shadow-lift: 0 22px 44px -18px rgba(94, 15, 28, 0.35);
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --content: 720px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- 1. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--brown);
  background-color: var(--ivory);
  background-image:
    radial-gradient(60rem 40rem at 0% 0%, rgba(244, 217, 220, 0.45), transparent 60%),
    radial-gradient(50rem 40rem at 100% 100%, rgba(232, 207, 138, 0.18), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
html:has(body.is-locked), body.is-locked { overflow: hidden; height: 100%; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Photos sit above their themed placeholder and fade in once loaded;
   if a file is missing, main.js removes the <img> and the placeholder shows. */
img[data-fallback] { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 0.7s var(--ease); }
img[data-fallback].is-loaded { opacity: 1; }

/* Shared type helpers */
.eyebrow {
  font-family: var(--font-caps);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--maroon);
  margin: 0;
}
.script { font-family: var(--font-script); font-weight: 400; line-height: 1.25; }
.gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.diamond {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--maroon);
  transform: rotate(45deg);
  flex: none;
}

/* ---------- 2. Section shell & headings ---------- */
.section { position: relative; padding: 84px 20px; }
.wrap { position: relative; max-width: var(--content); margin: 0 auto; z-index: 1; }

.sh { text-align: center; margin: 0 auto 2.4rem; max-width: 560px; }
.sh__title {
  font-size: clamp(2.7rem, 11vw, 3.9rem);
  margin: 0.15em 0 0;
  padding: 0 0.2em;
}
.sh__divider { width: 150px; height: 16px; margin: 0.35rem auto 0; display: block; }
.sh__sub { font-style: italic; color: var(--muted); margin: 0.9rem auto 0; font-size: 1.12rem; line-height: 1.5; }

.section--red {
  color: var(--ivory);
  background: var(--red-gradient);
  overflow: hidden;
}
.section--red .eyebrow { color: var(--gold-2); }
.section--red .gold-text { background-image: var(--gold-gradient-light); }
.section--red .sh__sub { color: rgba(251, 248, 243, 0.82); }
/* soft red bokeh glow */
.section--red::before {
  content: "";
  position: absolute; inset: -20%;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 120, 120, 0.28), transparent 18%),
    radial-gradient(circle at 82% 30%, rgba(255, 190, 120, 0.22), transparent 16%),
    radial-gradient(circle at 30% 78%, rgba(255, 90, 110, 0.22), transparent 20%),
    radial-gradient(circle at 75% 85%, rgba(232, 207, 138, 0.2), transparent 18%),
    radial-gradient(circle at 50% 50%, rgba(255, 210, 150, 0.12), transparent 40%);
  animation: bokeh 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes bokeh {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

/* Floating petals & sparkles inside red sections */
.floaters { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute; top: -20px;
  width: 12px; height: 9px;
  border-radius: 80% 0 80% 0;
  background: linear-gradient(135deg, #F7B7C3, #E26D87);
  opacity: 0.75;
  animation: petal-fall var(--dur, 14s) linear var(--delay, 0s) infinite;
}
.petal--gold { background: linear-gradient(135deg, #F3DFA2, #C9A24A); }
@keyframes petal-fall {
  0%   { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.7; }
  100% { transform: translate3d(var(--drift, 40px), 110vh, 0) rotate(540deg); opacity: 0; }
}
.twinkle {
  position: absolute;
  width: 4px; height: 4px; border-radius: 50%;
  background: #FFE9A8;
  box-shadow: 0 0 8px 2px rgba(255, 220, 140, 0.7);
  animation: twinkle var(--dur, 3s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.1; transform: scale(0.6); }
  50%      { opacity: 1;   transform: scale(1.2); }
}
.float-heart {
  position: absolute; bottom: -30px;
  color: var(--gold-2);
  font-size: var(--size, 14px);
  opacity: 0;
  animation: heart-rise var(--dur, 10s) ease-in var(--delay, 0s) infinite;
}
@keyframes heart-rise {
  0%   { transform: translate3d(0, 0, 0) scale(0.8); opacity: 0; }
  15%  { opacity: 0.7; }
  100% { transform: translate3d(var(--drift, 20px), -110vh, 0) scale(1.1); opacity: 0; }
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translate3d(-44px, 0, 0); }
[data-reveal="right"] { transform: translate3d(44px, 0, 0); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Generic card */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(201, 162, 74, 0.18);
}

/* ---------- 3. Ambient: sparkles, diyas, music ---------- */
.sparkles {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 52;
  opacity: 0.9;
}

/* Diyas: clay lamps that gently float near the screen edges.
   Hidden until the envelope opens, then they drift in one by one.
   Placement is deliberately uneven so it feels hand-placed. */
.diyas {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 70;
  visibility: hidden;
}
body.is-open .diyas { visibility: visible; }
.diya {
  position: absolute;
  width: 64px; height: 62px;
  opacity: 0;
}
body.is-open .diya { animation: diya-in 1.8s var(--ease) var(--in, 1s) forwards; }
@keyframes diya-in {
  from { opacity: 0; transform: translate3d(0, 40px, 0); }
  to   { opacity: var(--o, 0.95); transform: none; }
}
/* phones: two lamps, different heights and sizes */
.diya--1 { left: 12px; bottom: calc(8px + var(--safe-bottom)); --s: 0.9; }
.diya--2 { right: 4px; bottom: calc(92px + var(--safe-bottom)); --s: 0.66; --flip: -1; --o: 0.85; }
.diya--3, .diya--4, .diya--5 { display: none; }
@media (min-width: 900px) {
  .diya--1 { left: 3.5%; bottom: 4%; --s: 1.1; }
  .diya--2 { right: 4.5%; bottom: 17%; --s: 0.85; }
  .diya--3 { display: block; left: 2.2%; top: 41%; --s: 0.66; --o: 0.85; --flip: -1; }
  .diya--4 { display: block; right: 2.4%; top: 23%; --s: 0.58; --o: 0.8; }
  .diya--5 { display: block; left: 7.5%; top: 13%; --s: 0.48; --o: 0.7; }
}
.diya__float {
  position: absolute; inset: 0;
  transform-origin: 50% 80%;
  animation: diya-float var(--fd, 6s) ease-in-out var(--fdel, 0s) infinite;
}
@keyframes diya-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-2.5deg); }
  25%      { transform: translate3d(3px, -6px, 0) rotate(0deg); }
  50%      { transform: translate3d(0, -11px, 0) rotate(2.5deg); }
  75%      { transform: translate3d(-3px, -5px, 0) rotate(0.5deg); }
}
.diya__body {
  position: absolute; inset: 0;
  transform: scale(var(--s, 1)) scaleX(var(--flip, 1));
  transform-origin: 50% 100%;
}
.diya__bowl { position: absolute; left: 0; bottom: 0; width: 64px; height: 36px; overflow: visible; }
.diya__glow {
  position: absolute;
  left: 58px; top: 20px;
  width: 130px; height: 130px;
  margin: -65px 0 0 -65px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 186, 80, 0.6) 0%, rgba(255, 140, 40, 0.2) 36%, transparent 68%);
  animation: glow 2.8s ease-in-out infinite;
}
.diya__flame {
  position: absolute;
  left: 52.5px; top: 9px;
  width: 11px; height: 25px;
  border-radius: 50% 50% 50% 50% / 64% 64% 36% 36%;
  background: radial-gradient(ellipse at 50% 80%, #FFFFFF 0 14%, #FFF1A8 26%, #FFC53D 48%, #FF8A1F 72%, rgba(255, 90, 20, 0.6) 88%, transparent 100%);
  box-shadow: 0 0 12px 4px rgba(255, 170, 60, 0.55), 0 -4px 18px 2px rgba(255, 120, 30, 0.25);
  transform-origin: 50% 92%;
  animation: flicker var(--fl, 1.3s) ease-in-out var(--fldel, 0s) infinite alternate;
}
.diya__flame::after { /* blue root of the flame */
  content: "";
  position: absolute; left: 3px; right: 3px; bottom: 1px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(120, 170, 255, 0.55), transparent 70%);
}
.diya__ember {
  position: absolute;
  left: 57px; top: 10px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #FFD27A;
  box-shadow: 0 0 6px 2px rgba(255, 170, 60, 0.7);
  opacity: 0;
  animation: ember var(--ed, 3s) ease-out var(--edel, 0s) infinite;
}
@keyframes ember {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) scale(1); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--ex, 6px), -34px, 0) scale(0.4); }
}
.diya__shadow { /* soft warm pool of light under the lamp, breathes with the float */
  position: absolute;
  left: 8px; right: 8px; bottom: -8px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 160, 70, 0.35), rgba(94, 15, 28, 0.12) 50%, transparent 72%);
  transform: scale(var(--s, 1));
  animation: diya-shadow var(--fd, 6s) ease-in-out var(--fdel, 0s) infinite;
}
@keyframes diya-shadow {
  0%, 100% { opacity: 0.9; }
  50%      { opacity: 0.45; }
}
@keyframes flicker {
  0%   { transform: scale(1, 1) skewX(0deg) rotate(-2deg); opacity: 0.95; }
  20%  { transform: scale(0.93, 1.08) skewX(3deg) rotate(1deg); }
  45%  { transform: scale(1.05, 0.94) skewX(-2deg) rotate(-1deg); opacity: 1; }
  70%  { transform: scale(0.96, 1.1) skewX(2deg) rotate(2deg); }
  100% { transform: scale(1.02, 0.97) skewX(-3deg) rotate(-1.5deg); opacity: 0.9; }
}
@keyframes glow {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.08); }
}
body.diyas-bright .diya__glow { animation-name: glow-bright; }
@keyframes glow-bright {
  0%, 100% { opacity: 1; transform: scale(1.35); }
  50%      { opacity: 1; transform: scale(1.55); }
}

.music-btn {
  position: fixed;
  top: calc(14px + var(--safe-top)); right: 14px;
  z-index: 75;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(232, 207, 138, 0.8);
  background: radial-gradient(circle at 35% 30%, #A8253A, var(--maroon) 60%, var(--maroon-dark));
  color: var(--gold-2);
  box-shadow: 0 8px 20px -6px rgba(94, 15, 28, 0.5);
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.music-btn[hidden] { display: none; }
body.is-open .music-btn { opacity: 1; transform: none; }
.music-btn svg { width: 20px; height: 20px; }
.music-btn::after { /* rotating halo while playing */
  content: "";
  position: absolute; inset: -5px;
  border-radius: 50%;
  border: 1px dashed rgba(201, 162, 74, 0.7);
  opacity: 0;
  transition: opacity 0.4s;
}
.music-btn.is-playing::after { opacity: 1; animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 4. Envelope intro ---------- */
.intro {
  position: fixed; inset: 0;
  z-index: 50;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 34px;
  padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom));
  background:
    radial-gradient(circle at 50% 45%, #FFFDF8 0%, var(--ivory) 45%, var(--ivory-2) 100%);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.intro__caption { position: absolute; top: calc(70px + var(--safe-top)); z-index: 2; left: 0; right: 0; text-align: center; animation: fade-in 1.4s var(--ease) both; }
.intro.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }

/* --- lively touches on the envelope screen --- */
.intro > .floaters { z-index: 0; }
.intro__mandala {
  position: absolute; left: 50%; top: 50%;
  width: min(150vw, 780px); aspect-ratio: 1;
  margin: calc(min(150vw, 780px) / -2) 0 0 calc(min(150vw, 780px) / -2);
  opacity: 0.32;
  pointer-events: none;
  animation: mandala-in 2.4s var(--ease) both;
}
@keyframes mandala-in { from { opacity: 0; } to { opacity: 0.32; } }
.intro__mandala svg { width: 100%; height: 100%; animation: spin 160s linear infinite; }
.intro__toran { position: absolute; left: 0; right: 0; top: var(--safe-top); height: 40px; z-index: 2; pointer-events: none; animation: toran-in 1.4s var(--ease) both; }
.intro__toran-swags { display: block; width: 100%; height: 34px; filter: drop-shadow(0 2px 2px rgba(120, 60, 0, 0.25)); }
@keyframes toran-in { from { opacity: 0; transform: translate3d(0, -20px, 0); } to { opacity: 1; transform: none; } }
.strand {
  position: absolute; top: 4px;
  width: 12px; margin-left: -6px;
  display: flex; flex-direction: column; align-items: center;
  transform-origin: 50% 0;
  animation: sway var(--dur, 3.4s) ease-in-out var(--delay, 0s) infinite alternate;
}
.strand__bead {
  width: 11px; height: 11px; margin-top: -2px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #FFB347, #E5700A 70%);
  box-shadow: inset 0 -1px 2px rgba(130, 50, 0, 0.35);
}
.strand__bead--y { background: radial-gradient(circle at 38% 32%, #FFE27A, #F2B705 70%); }
.strand__bell {
  width: 8px; height: 11px; margin-top: 1px;
  border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, #F3DFA2, #B08A35);
}
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }

.envelope-wrap {
  position: relative;
  z-index: 1;
  animation: env-float 6.5s ease-in-out 1.2s infinite;
}
@keyframes env-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.8deg); }
  50%      { transform: translate3d(0, -12px, 0) rotate(0.8deg); }
}
.intro.is-opening .envelope-wrap { animation-play-state: paused; }
.envelope-halo {
  position: absolute; inset: -22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 207, 138, 0.45) 0%, rgba(244, 217, 220, 0.35) 35%, transparent 68%);
  animation: glow 4s ease-in-out infinite;
  pointer-events: none;
}
.envelope__sheen {
  position: absolute; inset: 0;
  z-index: 2;
  border-radius: 10px;
  overflow: hidden;
  pointer-events: none;
}
.envelope__sheen::before {
  content: "";
  position: absolute; top: -20%; bottom: -20%; left: 0;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 240, 220, 0.28) 45%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 240, 220, 0.28) 55%, transparent);
  transform: translate3d(-150%, 0, 0) skewX(-14deg);
  animation: sheen 5.5s ease-in-out 2s infinite;
}
@keyframes sheen {
  0%   { transform: translate3d(-150%, 0, 0) skewX(-14deg); }
  35%  { transform: translate3d(330%, 0, 0) skewX(-14deg); }
  100% { transform: translate3d(330%, 0, 0) skewX(-14deg); }
}
.seal-ripple {
  position: absolute; left: 50%; top: 54%;
  width: 39%; aspect-ratio: 1;
  margin: -19.5% 0 0 -19.5%;
  border-radius: 50%;
  border: 1.5px solid rgba(243, 223, 162, 0.85);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  animation: ripple 2.8s ease-out 1.6s infinite;
}
.seal-ripple--late { animation-delay: 3s; }
@keyframes ripple {
  0%   { opacity: 0.85; transform: scale(1); }
  100% { opacity: 0;    transform: scale(1.9); }
}
.envelope.is-open .seal-ripple, .envelope.is-open .envelope__sheen { display: none; }

.envelope {
  position: relative;
  width: min(84vw, 372px, 56vh);
  aspect-ratio: 1;
  perspective: 1200px;
  filter: drop-shadow(0 26px 30px rgba(94, 15, 28, 0.32));
  animation: env-in 1.2s var(--ease) backwards;
  transition: transform 1s var(--ease), opacity 0.9s var(--ease);
}
@keyframes env-in {
  from { opacity: 0; transform: translate3d(0, 24px, 0) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.envelope__body { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 10px; }
.envelope__flap {
  position: absolute; left: 0; top: 0;
  width: 100%; height: 56.67%;
  transform-origin: 50% 0;
  transform: rotateX(0deg);
  transition: transform 1s cubic-bezier(0.55, 0.05, 0.25, 1);
  filter: drop-shadow(0 6px 6px rgba(60, 8, 18, 0.35));
  z-index: 2;
}
.envelope.is-open .envelope__flap { transform: rotateX(180deg); }
.envelope.is-leaving { transform: translate3d(0, 10px, 0) scale(1.12); opacity: 0; }

.seal {
  position: absolute; left: 50%; top: 54%;
  width: 39%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 3;
  border: 0; padding: 0;
  cursor: pointer;
  background: radial-gradient(circle at 38% 32%, #FFFDF5 0%, #F5EBD6 45%, #E3D0AE 80%, #CDB58A 100%);
  /* irregular wax edge */
  border-radius: 47% 53% 51% 49% / 52% 47% 53% 48%;
  box-shadow:
    inset -4px -6px 10px rgba(150, 115, 60, 0.35),
    inset 4px 5px 8px rgba(255, 255, 255, 0.9),
    0 6px 14px rgba(60, 8, 18, 0.45),
    0 0 0 3px rgba(240, 228, 205, 0.55);
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
  animation: seal-breathe 3.2s ease-in-out 1.2s infinite;
}
.seal::before { /* drips around the edge */
  content: "";
  position: absolute; inset: -6%;
  border-radius: 55% 45% 52% 48% / 46% 54% 46% 54%;
  background: radial-gradient(circle at 40% 35%, #F6EEDD, #DCC69C);
  z-index: -1;
  box-shadow: 0 3px 6px rgba(60, 8, 18, 0.25);
}
.seal__inner {
  position: absolute; inset: 10%;
  border-radius: 50%;
  border: 1.5px solid rgba(168, 130, 47, 0.55);
  box-shadow: inset 0 2px 4px rgba(150, 115, 60, 0.35), 0 1px 0 rgba(255, 255, 255, 0.9);
  display: grid; place-items: center;
  container-type: inline-size;
}
.seal__initials {
  display: flex; align-items: center; justify-content: center;
  gap: 0.1em;
  font-size: clamp(1.5rem, 7.2vw, 2.1rem);   /* fallback for older browsers */
  font-size: 28cqw;                          /* 28% of the ring's width: same fit on every screen */
  color: var(--maroon);
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 -1px 1px rgba(94, 15, 28, 0.35);
}
.seal__letter {
  font-family: var(--font-script);
  /* script capitals lean right and sit high in their box: nudge ink to the optical centre */
  transform: translate(-0.04em, 0.08em);
}
.seal__amp {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.62em;
  color: var(--gold-deep);
  text-shadow: none;
}
/* Seal carrying the couple's emblem: a cream wax rim around the logo */
.seal--logo { width: 44%; }
.seal--logo .seal__inner {
  inset: 7%;
  overflow: hidden;
  background: #fff;
  border: 2px solid rgba(201, 162, 74, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 252, 240, 0.8), 0 2px 5px rgba(94, 15, 28, 0.35), inset 0 0 6px rgba(150, 115, 60, 0.25);
}
.seal__logo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; -webkit-user-drag: none; }
.envelope--logo .seal-ripple { width: 44%; margin: -22% 0 0 -22%; }
.seal:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 6px; }
@keyframes seal-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.045); }
}
.envelope.is-open .seal { animation: seal-pop 0.55s var(--ease) forwards; }
@keyframes seal-pop {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  40%  { transform: translate(-50%, -50%) scale(1.18); opacity: 1; }
  100% { transform: translate(-50%, -62%) scale(0.6); opacity: 0; }
}

.intro__hint {
  display: flex; align-items: center; gap: 14px;
  margin: 0;
  color: var(--maroon);
  font-size: 1.2rem;
  animation: fade-in 1.6s var(--ease) 0.4s both;
}
.intro__hint em, .intro__hint .diamond { animation: hint-pulse 2.4s ease-in-out infinite; }
@keyframes hint-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Lace transition */
.lace {
  position: fixed; inset: 0;
  z-index: 60;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #FFF4F5 0%, #F9DDE2 70%, #F2C6CF 100%);
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.8s var(--ease), transform 1.4s var(--ease);
}
.lace svg { display: block; }
.lace.is-on { opacity: 1; transform: scale(1); }

/* Main invitation hidden until opened */
.invite { opacity: 0; transition: opacity 1.2s var(--ease); }
body.is-open .invite { opacity: 1; }

/* ---------- 5. Hero ---------- */
.hero { text-align: center; }
/* tight top (Ganesh ji sits near the top) and a short hand-off to Save the Date */
.section.hero { padding-top: calc(34px + var(--safe-top)); padding-bottom: 30px; }
.hero + .section { padding-top: 44px; }
.hero .wrap { width: 100%; }
/* Ganesh ji: round photo in a gold ring with a soft diya-like glow */
.hero__ganesh {
  position: relative;
  width: 128px; aspect-ratio: 1;
  margin: 0 auto 1.1rem;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, #F6E3A6, var(--gold-1) 45%, #A87C2A 80%, #E8CF8A);
  box-shadow: 0 0 0 6px rgba(201, 162, 74, 0.12), 0 0 34px 6px rgba(240, 180, 80, 0.35), 0 10px 24px -10px rgba(94, 15, 28, 0.45);
}
.hero__ganesh::before { /* fine outer ring */
  content: "";
  position: absolute; inset: -11px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 74, 0.55);
}
.hero__ganesh img {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid var(--ivory, #FBF8F3);
  object-fit: cover; object-position: 50% 42%;
}
.hero__invocation {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--maroon);
}
.hero__eyebrow { display: flex; align-items: center; justify-content: center; gap: 12px; }
.star { width: 12px; height: 12px; color: var(--gold-1); flex: none; }
.hero__name {
  font-size: clamp(3.6rem, 17vw, 6rem);
  margin: 0.25em 0 0;
  padding: 0 0.25em;
  line-height: 1.15;
}
.hero__shlok {
  max-width: 520px;
  margin: 0 auto 1.7rem;
  padding: 12px 8px 14px;
  border-top: 1px solid rgba(201, 162, 74, 0.45);
  border-bottom: 1px solid rgba(201, 162, 74, 0.45);
}
.hero__shlok-line { margin: 0; font-style: italic; color: var(--maroon); font-size: clamp(1.05rem, 4.4vw, 1.2rem); line-height: 1.5; }
.hero__shlok-meaning { margin: 0.55rem auto 0; max-width: 460px; color: var(--muted); font-size: 0.98rem; line-height: 1.45; }
/* grandparents + parents under each name */
.hero__family { max-width: 460px; margin: 0.15rem auto 0; }
.hero__family p { margin: 0.12rem 0 0; font-style: italic; color: var(--muted); font-size: 1.04rem; line-height: 1.4; }
.hero__with { font-size: clamp(2rem, 8vw, 2.6rem); color: var(--maroon); margin: 0.6rem 0 -0.2rem; }
.hero__quote {
  font-style: italic;
  color: var(--maroon);
  font-size: 1.22rem;
  max-width: 460px;
  margin: 2rem auto 0;
  line-height: 1.55;
}
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 2rem; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(201, 162, 74, 0.55);
  box-shadow: 0 6px 16px -10px rgba(94, 15, 28, 0.35);
  font-family: var(--font-caps);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--maroon);
}
.chip svg { width: 15px; height: 15px; flex: none; }
.scroll-cue { margin: 2rem auto 0; width: 22px; height: 36px; border: 1.5px solid rgba(139, 26, 43, 0.4); border-radius: 12px; position: relative; }
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 7px;
  width: 4px; height: 7px; margin-left: -2px; border-radius: 2px;
  background: var(--maroon);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* Hero entrance (runs once the envelope opens) */
.hero [data-hero] { opacity: 0; }
body.is-open .hero [data-hero] { animation: hero-rise 1.1s var(--ease) var(--d, 0s) forwards; }
body.is-open .hero [data-hero="name"] { animation: hero-write 1.8s var(--ease) var(--d, 0s) forwards; }
@keyframes hero-rise {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to   { opacity: 1; transform: none; }
}
/* soft "handwriting" wipe, left to right */
@keyframes hero-write {
  from { opacity: 0.3; clip-path: inset(-30% 100% -30% -10%); transform: translate3d(0, 6px, 0); }
  to   { opacity: 1;   clip-path: inset(-30% -10% -30% -10%); transform: none; }
}

/* ---------- 6. Scratch cards (shared) ---------- */
.scratch {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  isolation: isolate;
}
.scratch__content {
  position: relative;
  min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 22px 16px;
  text-align: center;
}
.scratch__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 2;
  touch-action: none;
  cursor: grab;
  transition: opacity 0.9s var(--ease);
}
.scratch.is-revealed .scratch__canvas { opacity: 0; pointer-events: none; }
.scratch__hint { margin: 0.9rem 0 0; font-style: italic; color: var(--muted); font-size: 1.02rem; text-align: center; }

/* ---------- 7. Save the Date ---------- */
.std-card { padding: 30px 22px 26px; text-align: center; max-width: 440px; margin: 0 auto; }
.std-card__icon {
  width: 46px; height: 46px; margin: 0 auto 10px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(139, 26, 43, 0.07);
  color: var(--maroon);
}
.std-card__icon svg { width: 22px; height: 22px; }
.std-card .eyebrow { margin-bottom: 18px; }
.std-card .scratch__content { background: linear-gradient(160deg, #FFFDF8, #FBF1E6); border: 1px solid rgba(201, 162, 74, 0.35); border-radius: 16px; }
.std-reveal__date { font-size: clamp(2rem, 9vw, 2.6rem); color: var(--maroon); margin: 0; }
.std-reveal__city { margin: 0.4rem 0 0; }

/* ---------- 8. Love Story timeline ---------- */
.timeline { position: relative; padding: 10px 0; }
.timeline::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px;
  background: linear-gradient(180deg, transparent, var(--maroon) 6%, var(--maroon) 94%, transparent);
  opacity: 0.7;
}
.tl-hearts { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; pointer-events: none; overflow: visible; }
.tl-heart {
  position: absolute; left: 0;
  color: var(--pink);
  font-size: var(--size, 12px);
  opacity: 0;
  animation: tl-heart var(--dur, 7s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes tl-heart {
  0%   { transform: translate3d(var(--x, 8px), 0, 0) scale(0.6); opacity: 0; }
  20%  { opacity: 0.7; }
  100% { transform: translate3d(calc(var(--x, 8px) * -1.5), -140px, 0) scale(1.1); opacity: 0; }
}
.tl-item { position: relative; width: 50%; padding-right: 38px; margin-bottom: 30px; }
.tl-item:nth-of-type(even) { margin-left: 50%; padding-right: 0; padding-left: 38px; }
.tl-item:last-of-type { margin-bottom: 0; }
.tl-dot {
  position: absolute; top: 26px; right: -12px;
  width: 24px; height: 24px;
  border-radius: 48% 52% 50% 50% / 52% 48% 53% 47%;
  background: radial-gradient(circle at 35% 30%, #B42A40, var(--maroon) 55%, var(--maroon-dark));
  box-shadow: 0 0 0 4px var(--ivory), 0 3px 8px rgba(94, 15, 28, 0.4);
  z-index: 1;
}
.tl-dot::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid rgba(232, 207, 138, 0.8); }
.tl-item:nth-of-type(even) .tl-dot { right: auto; left: -12px; }
.tl-card { padding: 20px 20px 22px; }
.tl-card .eyebrow { font-size: 0.66rem; }
.tl-card h3 { font-size: 2rem; color: var(--maroon); margin: 0.15rem 0 0.35rem; }
.tl-card p { margin: 0; font-size: 1.05rem; line-height: 1.55; }
@media (max-width: 639px) {
  .timeline::before, .tl-hearts { left: 14px; }
  .tl-item, .tl-item:nth-of-type(even) { width: 100%; margin-left: 0; padding: 0 0 0 44px; }
  .tl-dot, .tl-item:nth-of-type(even) .tl-dot { left: 2px; right: auto; }
  .tl-item[data-reveal] { transform: translate3d(36px, 0, 0); }
  .tl-item[data-reveal].is-visible { transform: none; }
}

/* ---------- 9. Countdown ---------- */
.countdown .sh__title { filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.18)); }
.countdown .scratch { max-width: 420px; border: 1px solid rgba(232, 207, 138, 0.45); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5); }
.countdown .scratch__content { background: rgba(70, 5, 15, 0.35); min-height: 140px; }
.countdown .scratch__hint { color: rgba(251, 248, 243, 0.8); }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.cd-box {
  padding: 14px 4px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(232, 207, 138, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.cd-box__num {
  display: block;
  font-family: var(--font-caps);
  font-size: clamp(1.6rem, 7vw, 2.2rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
}
.cd-box__label { display: block; margin-top: 4px; font-family: var(--font-caps); font-size: 0.58rem; letter-spacing: 0.22em; color: rgba(251, 248, 243, 0.8); }
.cd-married { font-size: clamp(2.4rem, 10vw, 3.2rem); margin: 0; }
.cd-forever { text-align: center; margin-top: 2rem; }
.cd-forever__line { font-size: clamp(2rem, 8vw, 2.6rem); margin: 0; display: inline-flex; align-items: center; gap: 10px; }
.cd-forever__line svg { width: 20px; height: 20px; color: var(--gold-2); }
.cd-forever__date { margin: 0.3rem 0 0; }

/* ---------- 10. Wedding Events ---------- */
.events-grid { display: grid; gap: 22px; }
@media (min-width: 640px) { .events-grid { grid-template-columns: 1fr 1fr; } }
.event-card { overflow: hidden; display: flex; flex-direction: column; }
.event-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--ivory-2); }
.event-card__media img { width: 100%; height: 100%; object-fit: cover; }
.event-card__body { padding: 18px 20px 22px; }
.event-card__title { display: flex; align-items: center; gap: 10px; }
.event-card__emoji { font-size: 1.5rem; line-height: 1; }
.event-card h3 { font-size: 2.2rem; color: var(--maroon); margin: 0; }
.event-card__sub { margin: 2px 0 0; font-style: italic; color: var(--muted); font-size: 1.02rem; }
.meta-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.meta-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 1.04rem; line-height: 1.4; }
.meta-list svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--gold-deep); }

/* Themed placeholder with a marigold garland border */
.ph-event {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, var(--theme-light), var(--theme) 75%, var(--theme-dark));
  color: #fff;
}
.ph-event::before { /* marigold border on all four edges */
  content: "";
  position: absolute; inset: 0;
  --mg: radial-gradient(circle, #FFC933 0 3.5px, #F28C0F 4px 6px, transparent 6.5px);
  background:
    var(--mg) 0 0 / 14px 14px repeat-x,
    var(--mg) 0 100% / 14px 14px repeat-x,
    var(--mg) 0 0 / 14px 14px repeat-y,
    var(--mg) 100% 0 / 14px 14px repeat-y;
}
.ph-event__garland { position: absolute; left: 0; top: 6px; width: 100%; height: 46px; }
/* line-art illustrations (events) */
.art { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.art .f { fill: currentColor; fill-opacity: 0.16; }
.art .dot { fill: currentColor; stroke: none; }
.art .tip { fill: #FFD27A; }
.ph-event__art { display: block; width: 92px; height: 92px; margin-top: 22px; color: #FFF7EA; stroke-width: 2.3; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3)); }
.ph-event__art .art { width: 100%; height: 100%; }
.ph-event__art + .ph-event__name { margin-top: -2px; }
.event-card__art { width: 32px; height: 32px; flex: none; color: var(--maroon); stroke-width: 3; }
.event-card__art .tip { fill: var(--gold-2); }
.ph-event__icon { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25)); margin-top: 18px; }
.ph-event__name { font-family: var(--font-script); font-size: 2.4rem; line-height: 1.2; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }

/* ---------- 11. Venue ---------- */
.venue-photo { position: relative; aspect-ratio: 4 / 3; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lift); background: var(--maroon); }
.venue-photo img { width: 100%; height: 100%; object-fit: cover; }
.ph-venue {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 30%, #F7D9A0 0%, #E59A6A 30%, #A8253A 70%, #5E0F1C 100%);
}
.ph-venue svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 55%; }
.venue-info { position: relative; margin: -46px 14px 0; padding: 26px 22px 24px; text-align: center; z-index: 1; }
.venue-info__pin {
  width: 46px; height: 46px; margin: -48px auto 8px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--maroon); color: var(--gold-2);
  box-shadow: 0 0 0 5px var(--white), var(--shadow-soft);
}
.venue-info__pin svg { width: 20px; height: 20px; }
.venue-info h3 { font-size: 2.4rem; color: var(--maroon); margin: 0; }
.venue-info__desc { margin: 0.3rem 0 1rem; }
.venue-info .meta-list { text-align: left; max-width: 460px; margin: 0 auto; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  margin-top: 20px;
  padding: 15px 20px;
  border-radius: 14px;
  background: linear-gradient(180deg, #9E2034, var(--maroon) 60%, #741424);
  color: var(--ivory);
  text-decoration: none;
  font-family: var(--font-caps);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  box-shadow: 0 12px 24px -12px rgba(94, 15, 28, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn svg { width: 16px; height: 16px; color: var(--gold-2); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
/* extra venues (e.g. the groom's home venue) sit below the map as their own cards */
.venue-info--other { margin-top: 50px; }
.venue-info--other .eyebrow, .venue-info__label { margin: 0 0 0.2rem; }
/* ...or above the main venue's photo, when othersFirst is set */
.venue-info--first { margin-top: 26px; margin-bottom: 44px; }
.venue-map { margin-top: 20px; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-soft); background: var(--ivory-2); border: 1px solid rgba(201, 162, 74, 0.25); }
.venue-map iframe { display: block; width: 100%; height: 300px; border: 0; }

/* ---------- 12. Gallery deck ---------- */
.deck {
  position: relative;
  width: min(80vw, 340px);
  aspect-ratio: 3 / 4;
  margin: 10px auto 0;
  user-select: none;
  -webkit-user-select: none;
}
.deck__card {
  position: absolute; inset: 0;
  border-radius: 22px;
  overflow: hidden;
  background: var(--white);
  padding: 8px;
  box-shadow: 0 18px 36px -16px rgba(94, 15, 28, 0.4), 0 2px 6px rgba(94, 15, 28, 0.08);
  transition: transform 0.55s var(--ease), opacity 0.55s var(--ease);
  touch-action: pan-y;
  will-change: transform;
}
.deck__card.is-top { cursor: grab; }
.deck__card.is-dragging { transition: none; cursor: grabbing; }
.deck__photo { position: relative; width: 100%; height: 100%; border-radius: 16px; overflow: hidden; background: var(--ivory-2); }
.deck__photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.deck__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 50px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(60, 8, 18, 0.72));
  color: #FFF6E6;
  z-index: 2;
  font-family: var(--font-script);
  font-size: 1.9rem;
  text-align: center;
  line-height: 1.2;
}
.ph-photo {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: var(--ph-bg);
}
.ph-photo svg { width: 46%; opacity: 0.55; }
.deck__controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 46px; }
.round-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(139, 26, 43, 0.35);
  background: var(--white);
  color: var(--maroon);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.round-btn:active { transform: scale(0.94); }
.round-btn svg { width: 18px; height: 18px; }
.deck__count { font-family: var(--font-caps); font-size: 0.78rem; letter-spacing: 0.2em; color: var(--muted); min-width: 52px; text-align: center; }
.deck__tip { text-align: center; font-style: italic; color: var(--muted); margin: 10px 0 0; font-size: 0.98rem; }

/* ---------- 13. Wardrobe ---------- */
.wardrobe-grid { display: grid; gap: 18px; }
@media (min-width: 540px) { .wardrobe-grid { grid-template-columns: 1fr 1fr; } }
.wd-card { padding: 22px 20px; text-align: center; }
.wd-card__icon { font-size: 1.7rem; line-height: 1; }
.wd-card h3 { font-size: 2rem; color: var(--maroon); margin: 0.3rem 0 0.6rem; }
.wd-line { margin: 0.3rem 0 0; font-size: 1.04rem; line-height: 1.45; }
.wd-line b { font-family: var(--font-caps); font-weight: 500; font-size: 0.64rem; letter-spacing: 0.22em; color: var(--gold-deep); display: block; }
.swatches { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.swatch {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 3px rgba(201, 162, 74, 0.5), 0 3px 6px rgba(0, 0, 0, 0.12);
}

/* ---------- 15. Weather ---------- */
.weather-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 32px 18px 96px;
  text-align: center;
  background: linear-gradient(180deg, #EEF5FB 0%, #DCEAF6 60%, #CFE2F2 100%);
  border: 1px solid rgba(120, 160, 200, 0.3);
  box-shadow: 0 18px 40px -22px rgba(40, 80, 130, 0.45);
}
.weather-card .eyebrow { color: #4F6F8F; }
.weather-card__title { font-size: clamp(2.4rem, 10vw, 3.2rem); color: #2F4F6F; margin: 0.1rem 0 0; }
.weather-card__sub { font-style: italic; color: #4F6F8F; margin: 0.4rem auto 1.4rem; max-width: 440px; line-height: 1.5; }
.weather-row { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 8px; max-width: 560px; margin: 0 auto; }
.wx-tile {
  padding: 12px 2px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 14px -10px rgba(40, 80, 130, 0.5);
}
.wx-tile__day { font-family: var(--font-caps); font-size: 0.6rem; letter-spacing: 0.12em; color: #4F6F8F; display: block; }
.wx-tile__icon { font-size: 1.6rem; line-height: 1.5; display: block; }
.wx-tile__temp { font-size: 1rem; color: #2F4F6F; font-weight: 600; display: block; }
.wx-tile__temp small { font-weight: 400; color: #6E8AA6; }
.wx-tile__desc { font-size: 0.82rem; color: #4F6F8F; font-style: italic; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.weather-card__note { position: relative; z-index: 1; font-size: 0.85rem; color: #6E8AA6; margin: 1rem 0 0; font-style: italic; }
.weather-card__skyline { position: absolute; left: 0; bottom: 0; width: 100%; height: 90px; color: #5C82A8; opacity: 0.22; }

/* ---------- 15b. Our Families ---------- */
.fam-groups { display: grid; gap: 16px; margin-top: 18px; }
@media (min-width: 540px) { .fam-groups { grid-template-columns: 1fr 1fr; } }
.fam-group { padding: 20px 20px 22px; text-align: center; }
.fam-group h4 { font-size: 0.7rem; }
.fam-group__hindi { margin: 0.15rem 0 0; font-style: italic; color: var(--gold-deep); font-size: 0.98rem; }
.fam-group ul { list-style: none; padding: 0; margin: 0.7rem 0 0; }
.fam-group li { font-size: 1.04rem; line-height: 1.45; }
.fam-group li + li { margin-top: 4px; }
.fam-little {
  margin-top: 18px;
  padding: 24px 20px;
  text-align: center;
  background: linear-gradient(160deg, #FFF7F8, #FBE3E8);
}
.fam-little__quote { margin: 0.6rem auto 0; max-width: 420px; font-style: italic; color: var(--maroon); font-size: 1.3rem; line-height: 1.45; }
.fam-little__from { margin: 0.3rem 0 0; font-size: 2rem; color: var(--pink); }
.fam-contact { margin-top: 18px; padding: 24px 20px; text-align: center; }
.fam-contact h3 { font-size: 2.3rem; color: var(--maroon); margin: 0.1rem 0 0.3rem; }
.fam-contact__addr { margin: 0 auto; max-width: 320px; font-size: 1.04rem; line-height: 1.45; }
.fam-contact__addr svg { display: inline-block; width: 15px; height: 15px; margin: 0 6px -2px 0; color: var(--gold-deep); }
.fam-contact__phones { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.fam-contact__phones .chip { text-decoration: none; min-width: 200px; justify-content: center; }

/* ---------- 16. Thank You ---------- */
.thanks { text-align: center; padding-bottom: calc(110px + var(--safe-bottom)); }
.thanks::after { /* warm gold glow */
  content: "";
  position: absolute; left: 50%; top: 40%;
  width: 520px; height: 520px; margin: -260px 0 0 -260px;
  background: radial-gradient(circle, rgba(232, 207, 138, 0.28), transparent 65%);
  pointer-events: none;
  animation: glow 5s ease-in-out infinite;
}
.thanks__heart { width: 34px; height: 34px; color: var(--gold-2); margin: 0 auto 14px; display: block; animation: beat 1.8s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }
.thanks__title { font-size: clamp(3.4rem, 16vw, 5rem); margin: 0.1em 0 0; padding: 0 0.2em; }
.thanks__msg { font-style: italic; color: var(--gold-2); font-size: 1.22rem; max-width: 500px; margin: 1.2rem auto 0; line-height: 1.6; }
.thanks__sign { font-size: clamp(2.2rem, 9vw, 2.8rem); margin: 1.8rem 0 0; }
.thanks__made { margin-top: 3rem; font-size: 0.62rem; opacity: 0.8; }
.thanks__credit { /* licence credit for the background music */
  margin: 0.7rem auto 0; max-width: 440px;
  font-size: 0.78rem; font-style: italic; line-height: 1.45;
  color: var(--gold-2); opacity: 0.6;
}
.thanks__credit svg { width: 11px; height: 11px; vertical-align: -1px; margin-right: 5px; }

/* ---------- 17. Heart burst layer ---------- */
.heart-burst { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.burst-heart { position: absolute; left: 0; top: 0; line-height: 1; will-change: transform, opacity; }

/* ---------- 17b. Two-column grids: centre a lone last card ---------- */
@media (min-width: 540px) {
  .wardrobe-grid > :last-child:nth-child(odd),
  .fam-groups > :last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 9px); }
}
@media (min-width: 640px) {
  .events-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 11px); }
}

/* ---------- 18. Phones (most guests open this from WhatsApp) ---------- */
/* Balanced line breaks: no lonely last word on centred text */
.hero__family p, .hero__shlok-line, .hero__shlok-meaning, .hero__quote, .sh__sub, .wd-line, .fam-group li,
.venue-info__desc, .fam-little__quote, .fam-contact__addr,
.thanks__msg, .thanks__made, .weather-card__sub, .weather-card__note, .scratch__hint,
.std-reveal__date, .event-card__sub { text-wrap: balance; }

@media (max-width: 600px) {
  body { background-attachment: scroll; }       /* fixed backgrounds stutter on iOS */
  .section { padding-top: 62px; padding-bottom: 62px; }
  .section.hero { padding-top: calc(22px + var(--safe-top)); padding-bottom: 24px; }
  .hero + .section { padding-top: 36px; }
  .sh { margin-bottom: 1.9rem; }
  .thanks { padding-bottom: calc(120px + var(--safe-bottom)); }
  .wd-card { padding: 20px 18px; }
  .wd-card h3 { margin-bottom: 0.4rem; }
  .venue-info { margin-left: 8px; margin-right: 8px; }
}

@media (max-width: 380px) {
  body { font-size: 1.08rem; }
  .section { padding: 70px 16px; }
  .weather-row { gap: 5px; }
  .wx-tile__icon { font-size: 1.35rem; }
  .cd-grid { gap: 6px; }
  .hero__eyebrow { letter-spacing: 0.2em; gap: 8px; font-size: 0.66rem; }
}

/* ---------- 19. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal], .tl-item[data-reveal] { opacity: 1; transform: none; }
  .petal, .float-heart, .tl-heart, .twinkle { display: none; }
}
