:root {
  --ink: #4a2a35;
  --muted: #8c6f76;
  --paper: #fffcf8;
  --ivory: #fbf5ee;
  --champagne: #f1e4d2;
  --blush: #f2d6d4;
  --blush-soft: #f9ebe8;
  --rose: #b76e79;
  --rose-deep: #8a3a52;
  --gold: #b48a46;
  --gold-light: #e7cf98;
  --gold-foil: linear-gradient(120deg, #9c7330 0%, #d9b968 22%, #f4e2ad 38%, #b98d3d 55%, #e9d08f 75%, #a07633 100%);
  /* deeper foil for gold text on ivory, so the light streaks never fade into the paper */
  --gold-foil-text: linear-gradient(120deg, #8a5f1f 0%, #b88a3b 25%, #d7b46a 42%, #a97b2e 58%, #c9a057 78%, #8a5f1f 100%);
  --hairline: rgba(180, 138, 70, 0.45);

  --env-back: #dcadaf;
  --env-side: #ecc9c7;
  --env-side-2: #e8c1c0;
  --env-bottom: #f1d5d2;
  --env-flap: #e6bcbc;

  --radius: 6px;
  --shadow: 0 30px 60px -30px rgba(90, 40, 55, 0.35), 0 2px 8px rgba(90, 40, 55, 0.06);
  --script: 'Great Vibes', cursive;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: #f7ebe6;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: var(--rose-deep); }

/* ============================================================ SKY */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100; }
.sky {
  position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, #fdf6f2 0%, transparent 60%),
    radial-gradient(800px 500px at 100% 100%, #f1d9d3 0%, transparent 60%),
    linear-gradient(180deg, #f6e6e2 0%, #f8ede7 55%, #f4e6dc 100%);
}
.sky-defs { position: absolute; width: 0; height: 0; }
.cloud { position: absolute; width: 180px; height: 90px; fill: #fffaf6; opacity: 0.55; filter: blur(1px); animation: drift linear infinite; }
.c1 { top: 8%;  width: 220px; animation-duration: 90s; animation-delay: -10s; }
.c2 { top: 46%; width: 160px; animation-duration: 75s; animation-delay: -40s; opacity: 0.4; }
.c3 { top: 78%; width: 240px; animation-duration: 110s; animation-delay: -60s; opacity: 0.45; }
@keyframes drift { from { transform: translateX(-260px); } to { transform: translateX(calc(100vw + 260px)); } }

.balloon {
  position: absolute; top: 0; width: 40px; height: 50px;
  border-radius: 50% 50% 48% 52% / 58% 58% 42% 42%;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.85) 0 6%, rgba(255, 255, 255, 0.25) 14%, transparent 40%), var(--c);
  box-shadow: inset -5px -8px 10px rgba(110, 60, 60, 0.12);
  animation: rise linear infinite;
  opacity: 0.85;
}
.balloon::before { content: ''; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 7px; transform: translateX(-50%); background: var(--c); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.balloon::after { content: ''; position: absolute; left: 50%; top: calc(100% + 5px); width: 1px; height: 70px; background: linear-gradient(var(--gold-light), transparent); }
.b1 { --c: #ecc5c4; left: 6%;  animation-duration: 28s; animation-delay: -4s; }
.b2 { --c: #f3e6d3; left: 20%; animation-duration: 34s; animation-delay: -18s; }
.b3 { --c: #e2b9a7; left: 76%; animation-duration: 30s; animation-delay: -9s; }
.b4 { --c: #fbf4ec; left: 90%; animation-duration: 38s; animation-delay: -22s; }
.b5 { --c: #e6c7a0; left: 52%; animation-duration: 42s; animation-delay: -30s; }
@keyframes rise {
  0%   { transform: translate(0, 110vh) rotate(-5deg); }
  50%  { transform: translate(18px, 40vh) rotate(5deg); }
  100% { transform: translate(-10px, -25vh) rotate(-4deg); }
}
.twinkle { position: absolute; color: var(--gold-light); font-size: 16px; text-shadow: 0 0 10px rgba(231, 207, 152, 0.9); animation: twinkle 3.6s ease-in-out infinite; }
.t1 { top: 12%; left: 14%; }
.t2 { top: 30%; left: 84%; animation-delay: -1s; font-size: 20px; }
.t3 { top: 68%; left: 8%;  animation-delay: -2s; }
.t4 { top: 88%; left: 64%; animation-delay: -.5s; }
.t5 { top: 48%; left: 93%; animation-delay: -1.6s; font-size: 12px; }
.t6 { top: 20%; left: 46%; animation-delay: -2.6s; font-size: 12px; }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(20deg); } }

/* ============================================================ STAGE */
.stage {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px 40px; text-align: center;
  transition: opacity .7s ease, transform .7s ease;
}
.stage.exit { opacity: 0; transform: scale(1.06); pointer-events: none; }
.stage-eyebrow, .stage-name { transition: opacity .4s ease, transform .4s ease; }
.stage.opening .stage-eyebrow, .stage.opening .stage-name { opacity: 0; transform: translateY(-16px); }
.stage-eyebrow { margin: 0; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; font-size: 12px; color: var(--gold); }
.stage-name { margin: 4px 0 0; max-width: 100%; font-family: var(--script); font-weight: 400; font-size: clamp(46px, 11vw, 72px); line-height: 1.15; color: var(--rose-deep); word-break: break-word; overflow-wrap: anywhere; }
.stage-name.long { font-size: clamp(36px, 8.5vw, 56px); }
.stage-name.very-long { font-size: clamp(28px, 6.5vw, 42px); }

.envelope-wrap {
  position: relative;
  width: min(88vw, 440px);
  aspect-ratio: 3 / 2;
  margin: 72px auto 18px;
  animation: bob 4.5s ease-in-out infinite;
  cursor: pointer;
}
.envelope-wrap:hover { animation-play-state: paused; }
.envelope-wrap:hover .envelope:not(.open) { animation: wiggle .6s ease; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2.5deg); } 75% { transform: rotate(2.5deg); } }

.env-shadow { position: absolute; left: 10%; right: 10%; bottom: -26px; height: 18px; border-radius: 50%; background: radial-gradient(rgba(100, 45, 60, .25), transparent 70%); }
.envelope { position: absolute; inset: 0; perspective: 1400px; }
.env-back { position: absolute; inset: 0; border-radius: 8px; background: var(--env-back); box-shadow: var(--shadow); }

.letter {
  position: absolute; left: 6%; right: 6%; top: 5%; height: 90%; z-index: 2;
  border-radius: 4px;
  background: linear-gradient(180deg, #fffdf9, #fbf4ea);
  box-shadow: 0 2px 10px rgba(90, 40, 55, .15);
  transition: transform 1s cubic-bezier(.2, .9, .25, 1);
}
.letter-inner {
  position: absolute; inset: 9px; border: 1px solid var(--hairline); outline: 1px solid var(--hairline); outline-offset: -5px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 7%;
}
.letter-mini { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.letter-script { font-family: var(--script); font-size: clamp(32px, 8vw, 44px); color: var(--rose-deep); line-height: 1.25; }
.letter-names { color: var(--gold); }
.envelope.letter-out .letter { transform: translateY(-66%); }

.env-pocket { position: absolute; inset: 0; z-index: 3; border-radius: 8px; overflow: hidden; pointer-events: none; }
.pocket-side { position: absolute; inset: 0; background: var(--env-side); }
.pocket-side.left  { clip-path: polygon(0 0, 52% 52%, 0 100%); }
.pocket-side.right { clip-path: polygon(100% 0, 48% 52%, 100% 100%); background: var(--env-side-2); }
.pocket-bottom-wrap { position: absolute; inset: 0; filter: drop-shadow(0 -3px 3px rgba(110, 50, 65, .12)); }
.pocket-bottom { position: absolute; inset: 0; background: linear-gradient(180deg, var(--env-bottom), #f4dcd8); clip-path: polygon(0 100%, 50% 46%, 100% 100%); }

/* Address block: sits between the postmark and the stamp. Names wrap, and fitEnvelopeName()
   shrinks the type until the whole name fits — it is never cut off. */
.env-to {
  /* the band below the seal (seal bottom ≈ 70%), between the postmark and the stamp */
  position: absolute; left: 20%; right: 20%; top: 71%; bottom: 4%;
  display: flex; align-items: center; justify-content: center;
}
.env-to-inner { margin: 0; max-width: 100%; text-align: center; text-wrap: balance; word-break: break-word; overflow-wrap: anywhere; line-height: 1.12; }
.env-to-label { margin-right: .6em; font-weight: 500; font-size: 10px; letter-spacing: .3em; color: var(--gold); text-transform: uppercase; vertical-align: .35em; }
.env-to-name { font-family: var(--script); font-size: 30px; color: var(--rose-deep); }
.env-stamp {
  position: absolute; right: 5%; bottom: 8%; width: clamp(28px, 10%, 44px); aspect-ratio: 44 / 52;
  display: grid; place-items: center; transform: rotate(6deg);
  filter: drop-shadow(0 1px 1.5px rgba(90, 40, 55, .25));
}
/* perforated paper sits behind the swatch, so only its edge shows the holes */
.env-stamp::before {
  content: ''; position: absolute; inset: 0; background: #fffaf3;
  -webkit-mask: radial-gradient(circle 3px at 3px 3px, transparent 98%, #000) -3px -3px / 8px 8px;
          mask: radial-gradient(circle 3px at 3px 3px, transparent 98%, #000) -3px -3px / 8px 8px;
}
.env-stamp span { position: relative; }
/* the stamp is a tiny swatch of dhaka weave */
.env-stamp span {
  display: block; width: 78%; height: 80%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Crect width='12' height='8' fill='%23a3122b'/%3E%3Cpath d='M6 .8L10.2 4 6 7.2 1.8 4Z' fill='%231f1a1d'/%3E%3Cpath d='M6 2.6L7.8 4 6 5.4 4.2 4Z' fill='%23f3ece2'/%3E%3Ccircle cx='0' cy='4' r='.9' fill='%23e3c47e'/%3E%3Ccircle cx='12' cy='4' r='.9' fill='%23e3c47e'/%3E%3Ccircle cx='6' cy='0' r='.6' fill='%23e3c47e'/%3E%3Ccircle cx='6' cy='8' r='.6' fill='%23e3c47e'/%3E%3C/svg%3E") center / 9px 6px;
  box-shadow: inset 0 0 0 1px rgba(227, 196, 126, .9);
}
.env-postmark {
  position: absolute; left: 5%; bottom: 8%; width: 56px; height: 56px; border-radius: 50%;
  border: 1.5px solid rgba(180, 138, 70, .6); color: rgba(160, 118, 51, .8);
  font-size: 8px; font-weight: 600; line-height: 1.35; letter-spacing: .18em;
  display: grid; place-items: center; transform: rotate(-14deg);
}

.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 56%; z-index: 4;
  transform-origin: 50% 0; transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.4, .1, .3, 1), z-index 0s .4s;
}
.flap-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.flap-outer { background: linear-gradient(180deg, var(--env-flap), #dfb0b2); clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 8px 8px 0 0; }
.flap-inner {
  /* liner: Newari red with a fine gold lattice inspired by carved tikijhyā windows */
  transform: rotateX(180deg);
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cg fill='none' stroke='%23e3c47e' stroke-opacity='.75' stroke-width='.8'%3E%3Cpath d='M0 0L18 18M18 0L0 18'/%3E%3Cpath d='M9 4.5L13.5 9 9 13.5 4.5 9Z'/%3E%3C/g%3E%3Cg fill='%23e3c47e'%3E%3Ccircle cx='9' cy='9' r='1.3'/%3E%3Ccircle cx='0' cy='0' r='1.3'/%3E%3Ccircle cx='18' cy='0' r='1.3'/%3E%3Ccircle cx='0' cy='18' r='1.3'/%3E%3Ccircle cx='18' cy='18' r='1.3'/%3E%3C/g%3E%3C/svg%3E") center / 18px 18px,
    radial-gradient(circle at 50% 100%, #b8142d 0%, #8e0f25 70%, #6f0b1d 100%);
}
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 1; }

/* Dhaka trim: two strips laid along the flap's slanted edges, clipped to the flap.
   The envelope is always 3:2 and the flap 56% tall, so each edge sits at 36.75° and is 62.4% of the width. */
.flap-trim { clip-path: polygon(0 0, 100% 0, 50% 100%); pointer-events: none; }
.flap-trim span {
  position: absolute; top: 0; width: 63%; height: clamp(6px, 1.9%, 9px);
  background:
    linear-gradient(#e3c47e, #e3c47e) top / 100% 1px no-repeat,
    linear-gradient(#e3c47e, #e3c47e) bottom / 100% 1px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Crect width='12' height='8' fill='%23a3122b'/%3E%3Cpath d='M6 .8L10.2 4 6 7.2 1.8 4Z' fill='%231f1a1d'/%3E%3Cpath d='M6 2.6L7.8 4 6 5.4 4.2 4Z' fill='%23f3ece2'/%3E%3Ccircle cx='0' cy='4' r='.9' fill='%23e3c47e'/%3E%3Ccircle cx='12' cy='4' r='.9' fill='%23e3c47e'/%3E%3Ccircle cx='6' cy='0' r='.6' fill='%23e3c47e'/%3E%3Ccircle cx='6' cy='8' r='.6' fill='%23e3c47e'/%3E%3C/svg%3E") 0 50% / 9px 6px;
  box-shadow: 0 1px 2px rgba(90, 30, 45, .2);
}
.flap-trim .trim-l { left: 0; transform-origin: 0 0; transform: rotate(36.75deg) translateY(-100%); }
.flap-trim .trim-r { right: 0; transform-origin: 100% 0; transform: rotate(-36.75deg) translateY(-100%); }

.seal {
  position: absolute; left: 50%; top: 56%; z-index: 5;
  width: 18%; height: auto; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 5px 6px rgba(70, 15, 30, .4));
  -webkit-tap-highlight-color: transparent;
}
.seal::after {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 1.5px solid rgba(180, 138, 70, .7); animation: ping 2.2s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.seal:hover .seal-half, .seal:focus-visible .seal-half { transform: scale(1.05); }
.seal:focus-visible { outline: none; }
.seal:focus-visible::after { border-color: var(--ink); animation: none; }
.seal-half {
  position: absolute; inset: 0;
  border-radius: 48% 52% 50% 50% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 34% 28%, #c4677f 0%, #8f3150 45%, #5f1a30 100%);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .06), inset 0 0 0 10px rgba(50, 5, 20, .22), inset 0 -6px 12px rgba(40, 5, 15, .35);
  display: grid; place-items: center;
  transition: transform .6s cubic-bezier(.3, .7, .3, 1), opacity .6s ease;
}
.seal-half.left  { clip-path: polygon(0 0, 54% 0, 44% 30%, 58% 55%, 46% 78%, 52% 100%, 0 100%); }
.seal-half.right { clip-path: polygon(54% 0, 100% 0, 100% 100%, 52% 100%, 46% 78%, 58% 55%, 44% 30%); }
.seal-text {
  margin-top: -16%;
  font-family: var(--script); font-size: clamp(30px, 10vw, 44px); line-height: 1; padding: 6px 6px 0 0;
  background: var(--gold-foil); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(40, 5, 15, .5));
}
.seal-feet {
  position: absolute; left: 50%; bottom: 15%; width: 30%; height: auto; transform: translateX(-50%) rotate(-6deg);
  filter: drop-shadow(0 1px 0 rgba(40, 5, 15, .55));
}
.seal.broken { pointer-events: none; }
.seal.broken::after { display: none; }
.seal.broken .left  { transform: translate(-46px, 70px) rotate(-50deg); opacity: 0; }
.seal.broken .right { transform: translate(46px, 70px) rotate(50deg); opacity: 0; }

/* Canopy crib: rises out of the opened envelope; drapes sway, baby breathes */
.bassinet {
  position: absolute; left: 50%; bottom: 30%; z-index: 6; width: 60%;
  transform: translate(-50%, 55%) scale(.25); opacity: 0; pointer-events: none;
  transition: transform .9s cubic-bezier(.25, 1.5, .45, 1), opacity .4s ease;
}
.envelope-wrap.baby-in .bassinet { transform: translate(-50%, 0) scale(1); opacity: 1; }
.bassinet-svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 10px 12px rgba(90, 40, 55, .25)); }
.bassinet .drape { transform-box: fill-box; transform-origin: 50% 0; }
.bassinet .swaddle { transform-box: fill-box; transform-origin: 50% 100%; }
.envelope-wrap.baby-in .drape-l { animation: sway 3s ease-in-out .4s infinite; }
.envelope-wrap.baby-in .drape-r { animation: sway 3s ease-in-out .4s infinite reverse; }
.envelope-wrap.baby-in .swaddle { animation: swaddle 2.6s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: skewX(0); } 50% { transform: skewX(-3deg); } }
@keyframes swaddle { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.05); } }
.float { position: absolute; left: 36%; top: 30%; opacity: 0; font-size: 15px; color: var(--gold); pointer-events: none; text-shadow: 0 0 6px rgba(255, 236, 190, .9); }
.float.heart { color: #d58a9b; font-size: 13px; }
.float.z { color: #a97b2e; font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 26px; }
.envelope-wrap.baby-in .float { animation: floatUp 2.2s ease-out infinite; }
.f1 { --x: -40px; animation-delay: .6s !important; }
.f2 { --x: -18px; animation-delay: 1s !important; font-size: 16px; }
.f3 { --x: 10px;  animation-delay: 1.3s !important; font-size: 14px; }
.f4 { --x: -30px; animation-delay: 1.7s !important; font-size: 21px; }
.f5 { --x: 26px;  animation-delay: 2s !important; }
@keyframes floatUp {
  0%   { opacity: 0; transform: translate(0, 0) scale(.6); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), -64px) scale(1.2) rotate(-10deg); }
}

/* panas: brass oil lamps */
.panas { display: block; width: 30px; height: 75px; overflow: visible; filter: drop-shadow(0 3px 4px rgba(90, 50, 20, .2)); }
.crest { display: flex; justify-content: center; align-items: flex-end; gap: clamp(20px, 6vw, 40px); margin: 0 auto 16px; }
.crest .monogram { margin: 0; }
.hint-row { display: flex; align-items: flex-end; justify-content: center; gap: 18px; margin-top: 26px; transition: opacity .3s; }
.hint-row .panas { width: 22px; height: 55px; }
.stage.opening .hint-row { opacity: 0; }
.hint { margin: 0 0 6px; font-size: 12px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); transition: opacity .3s; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.stage.opening .hint { opacity: 0; animation: none; }

/* ============================================================ INVITATION */
.invite { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 28px 16px 60px; }
.invite.enter { animation: unfold .9s cubic-bezier(.2, .9, .25, 1); }
@keyframes unfold { from { opacity: 0; transform: translateY(40px) scale(.97); } to { opacity: 1; transform: none; } }

.card {
  position: relative; margin: 0 0 24px; padding: clamp(28px, 6vw, 52px);
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  text-align: center;
}
.card::before {
  content: ''; position: absolute; inset: 10px; pointer-events: none;
  border: 1px solid var(--hairline); outline: 1px solid var(--hairline); outline-offset: -5px;
}
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .9, .25, 1); }
.reveal.in { opacity: 1; transform: none; }

.section-title { position: relative; margin: 0 0 22px; font-family: var(--serif); font-size: clamp(28px, 6vw, 38px); font-weight: 600; letter-spacing: .02em; color: var(--rose-deep); }
.section-title::after {
  content: '✦'; display: block; margin: 6px auto 0; width: 140px; font-size: 11px; line-height: 1; color: var(--gold);
  background: linear-gradient(90deg, transparent, var(--gold-light) 30%, transparent 44%, transparent 56%, var(--gold-light) 70%, transparent) center / 100% 1px no-repeat;
}
.section-lede { margin: -6px auto 24px; max-width: 520px; color: var(--muted); line-height: 1.7; font-family: var(--serif); font-size: 19px; font-style: italic; }

/* Hero */
.hero { padding-top: 56px; background: var(--paper) radial-gradient(circle at 50% 0%, #fbeeea 0, transparent 65%); }
.monogram {
  width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 50%; position: relative;
  display: grid; place-items: center;
  background: var(--gold-foil); padding: 2px;
}
.monogram::before { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: var(--paper); }
.monogram::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; border: 1px solid var(--hairline); }
.monogram span {
  position: relative; z-index: 1; font-family: var(--script); font-size: 58px; line-height: 1; padding: 10px 8px 0 0;
  background: var(--gold-foil-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* Newari touches: haku patasi trim and a Jwajalapā greeting */
.haku-band {
  position: absolute; left: 0; right: 0; top: 0; height: 11px; border-radius: var(--radius) var(--radius) 0 0;
  background:
    linear-gradient(#d9b968, #d9b968) top / 100% 1.5px no-repeat,
    linear-gradient(#c0182f, #c0182f) 0 1.5px / 100% 2px no-repeat,
    linear-gradient(#d9b968, #d9b968) bottom / 100% 1.5px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='8'%3E%3Crect width='6' height='8' fill='%231f1a1d'/%3E%3Ccircle cx='1.5' cy='2' r='.7' fill='%23f3ece2'/%3E%3Ccircle cx='1.5' cy='6' r='.6' fill='%23d8394c'/%3E%3Ccircle cx='4.5' cy='4' r='.7' fill='%23f3ece2'/%3E%3C/svg%3E") 0 0 / 6px 8px;
}
.jwajalapa { margin: -4px 0 10px; font-family: 'Noto Serif Devanagari', var(--serif); font-weight: 500; font-size: 19px; letter-spacing: .06em; color: var(--gold); }
.eyebrow { margin: 0; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; font-size: 12px; color: var(--muted); }
.hero-title {
  /* Great Vibes swashes rise above the line box; the padding gives the foil room to paint them */
  margin: -.12em 0 0; padding: .3em .3em .12em; font-family: var(--script); font-weight: 400; font-size: clamp(64px, 16vw, 108px); line-height: 1.15;
  background: var(--gold-foil-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .6));
}
.honoring { margin: 4px 0 6px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--muted); }
.honoree { margin: 0; display: flex; flex-direction: column; align-items: center; }
.honoree-first { font-family: var(--serif); font-weight: 600; font-size: clamp(54px, 13vw, 84px); line-height: 1; color: var(--rose-deep); letter-spacing: .01em; }
.honoree-last { margin-top: 8px; font-size: 13px; font-weight: 500; letter-spacing: .5em; text-transform: uppercase; color: var(--ink); padding-left: .5em; }
.role {
  display: inline-block; margin-top: 16px; padding: 6px 18px;
  border: 1px solid var(--gold); border-radius: 99px;
  font-size: 11px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--gold);
}
.tagline { margin: 22px auto 0; max-width: 440px; font-family: var(--serif); font-style: italic; font-size: clamp(19px, 4.5vw, 23px); line-height: 1.45; color: var(--ink); }

.datebar { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 4vw, 24px); margin: 30px auto 0; max-width: 460px; }
.datebar-side { flex: 1; padding: 11px 0; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); font-weight: 500; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink); }
.datebar-mid { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.datebar-month, .datebar-year { font-size: 11px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.datebar-day { font-family: var(--serif); font-size: 62px; font-weight: 600; color: var(--rose-deep); margin: 2px 0; }
.hero-venue { margin: 18px 0 0; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 30px; font-size: 22px; }
.ornament::before, .ornament::after { content: ''; width: 80px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-light)); }
.ornament::after { transform: scaleX(-1); }
.ornament span { animation: sway 3.5s ease-in-out infinite; display: inline-block; }
@keyframes sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 30px; border-radius: 2px; border: 1px solid var(--gold);
  font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  background: transparent; color: var(--ink);
  transition: transform .15s ease, box-shadow .2s ease, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -12px rgba(90, 40, 55, .5); background: rgba(231, 207, 152, .15); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 3px; }
.btn.primary { background: linear-gradient(135deg, #9d4860, var(--rose-deep) 60%, #6f2a40); color: #fff8f0; border-color: #6f2a40; }
.btn.primary:hover { background: linear-gradient(135deg, #a8526a, #7c3249); }
.btn.ghost { color: var(--rose-deep); }
.btn.small { padding: 9px 14px; font-size: 11px; letter-spacing: .16em; }
.btn.big { width: 100%; padding: 17px 22px; font-size: 14px; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.link-btn { background: none; border: 0; padding: 6px; color: var(--muted); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; text-decoration: underline; text-decoration-color: var(--gold-light); text-underline-offset: 5px; }
.link-btn:hover { color: var(--rose-deep); }

/* Countdown */
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2vw, 16px); max-width: 520px; margin: 0 auto; }
.cd-tile { padding: 18px 4px 14px; background: var(--ivory); border: 1px solid var(--hairline); position: relative; }
.cd-tile::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(180, 138, 70, .18); pointer-events: none; }
.cd-num { display: block; font-family: var(--serif); font-size: clamp(32px, 8vw, 50px); font-weight: 600; line-height: 1.05; color: var(--rose-deep); font-variant-numeric: tabular-nums lining-nums; }
.cd-num.tick { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.1); } }
.cd-label { font-size: 10px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.cd-done { margin: 0; font-family: var(--script); font-size: 46px; color: var(--rose-deep); }

/* When & where */
.ww-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; text-align: left; }
.ww-item { display: flex; gap: 18px; align-items: flex-start; padding: 22px; background: var(--ivory); border: 1px solid rgba(180, 138, 70, .25); }
.cal-icon { flex: none; width: 64px; overflow: hidden; background: #fff; border: 1px solid var(--hairline); text-align: center; }
.cal-month { display: block; padding: 5px 0; background: var(--rose-deep); color: #fbeedd; font-size: 10px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; }
.cal-day { display: block; padding: 6px 0 8px; font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--ink); }
.pin-icon { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--hairline); color: var(--rose-deep); }
.ww-head { margin: 2px 0 4px; font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.2; }
.ww-sub { margin: 0; color: var(--muted); line-height: 1.6; }
.ww-note { margin: 6px 0 0; font-size: 14px; color: var(--muted); font-style: italic; }
.mini-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dresscode { margin: 24px 0 0; font-family: var(--serif); font-size: 19px; font-style: italic; }
.dresscode b { font-family: var(--sans); font-style: normal; font-weight: 500; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-right: 8px; }

/* Registry */
.registry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; max-width: 360px; margin: 0 auto; }
.gift {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 16px 22px; text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, #fff, var(--ivory)); border: 1px solid rgba(180, 138, 70, .35);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
a.gift:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 18px 28px -18px rgba(90, 40, 55, .5); }
a.gift:hover .gift-emoji { animation: shake .5s ease; }
@keyframes shake { 25% { transform: rotate(-10deg) scale(1.08); } 75% { transform: rotate(10deg) scale(1.08); } }
.gift-emoji { font-size: 34px; }
.gift-name { font-family: var(--serif); font-weight: 600; font-size: 20px; }
.gift-note { font-size: 14px; color: var(--muted); }
.gift-cta { margin-top: 8px; font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }

/* RSVP */
.rsvp { text-align: left; }
.rsvp .section-title, .rsvp .section-lede { text-align: center; }
#rsvpForm { max-width: 520px; margin: 0 auto; display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label, .choices legend, .stepper-label { font-weight: 500; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.field small { font-weight: 400; letter-spacing: .1em; text-transform: none; }
input, textarea {
  width: 100%; padding: 13px 14px; border-radius: 2px; border: 1px solid #e6d5c6; background: #fffdfa;
  font: inherit; font-size: 16px; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: #bba59f; }
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(231, 207, 152, .35); }
textarea { resize: vertical; min-height: 92px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.choices { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choices legend { padding: 0; margin-bottom: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%;
  padding: 18px 10px; border: 1px solid #e6d5c6; background: #fffdfa;
  text-align: center; font-family: var(--serif); font-size: 19px; font-weight: 600; transition: all .25s;
}
.choice span b { font-size: 16px; color: var(--gold); transition: transform .3s; }
.choice:hover span { border-color: var(--gold-light); }
.choice input:focus-visible + span { outline: 2px solid var(--rose-deep); outline-offset: 2px; }
.choice input:checked + span { border-color: var(--rose-deep); background: var(--blush-soft); box-shadow: inset 0 0 0 1px var(--rose-deep); color: var(--rose-deep); }
.choice input:checked + span b { transform: scale(1.4) rotate(45deg); }

.party { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; animation: unfold .4s ease; }
.stepper { display: grid; gap: 10px; padding: 14px 16px; background: var(--ivory); border: 1px solid rgba(180, 138, 70, .25); }
.stepper-ctl { display: flex; align-items: center; justify-content: space-between; }
.stepper-ctl button {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--gold); background: #fff;
  font-size: 20px; line-height: 1; color: var(--rose-deep); cursor: pointer; transition: background .2s;
}
.stepper-ctl button:hover { background: var(--blush-soft); }
.stepper-ctl output { font-family: var(--serif); font-size: 30px; font-weight: 600; min-width: 2ch; text-align: center; }

.form-msg { margin: 0; min-height: 1.4em; text-align: center; color: var(--rose-deep); font-family: var(--serif); font-style: italic; font-size: 18px; }

.rsvp-done { max-width: 460px; margin: 0 auto; text-align: center; animation: unfold .6s ease; }
.done-emoji { font-size: 54px; animation: bounce 1.6s ease infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } }
.done-title { margin: 6px 0 6px; font-family: var(--script); font-weight: 400; font-size: 48px; line-height: 1.2; color: var(--rose-deep); }
.rsvp-done p { color: var(--muted); line-height: 1.7; font-family: var(--serif); font-size: 19px; }

/* Sign-off */
.sign-off { text-align: center; padding: 22px 0 10px; }
.sign-with { margin: 0; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--muted); }
.sign-names { margin: 0; font-family: var(--script); font-size: 54px; line-height: 1.3; color: var(--rose-deep); }
.contact { color: var(--muted); }

@media (max-width: 520px) {
  .row2, .party { grid-template-columns: 1fr; }
  .choice span { font-size: 17px; }
  .datebar-side { font-size: 10px; letter-spacing: .14em; }
  .env-postmark { display: none; }
  .env-to { left: 17%; right: 17%; }
  .honoree-last { letter-spacing: .35em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .cloud, .balloon { display: none; }
}

/* Great Vibes sets words tightly — give script lines a little air */
.stage-name, .env-to-name, .letter-script, .hero-title, .done-title, .sign-names, .cd-done { word-spacing: .14em; }
.tagline, .section-lede, .stage-name { text-wrap: balance; }
