/* =========================================================
   Namwar & Kirti — "Raat ki Roshni"
   night indigo · rani pink · marigold · gold foil
   ========================================================= */
@property --hole { syntax: "<percentage>"; inherits: false; initial-value: -2%; }
:root {
  --night: #140a2a;
  --night-2: #241046;
  --plum: #3a0d3f;
  --rani: #d81b60;
  --rani-2: #ff4f8b;
  --mari: #ffa51f;
  --mari-2: #ffcd4a;
  --gold: #e8c372;
  --gold-2: #fff0c2;
  --ivory: #fff7ea;
  --ivory-2: #f6ead4;
  --ink: #2a0f2f;
  --muted: #7a5c74;
  --foil: linear-gradient(120deg, #b8862b, #fff0c2 28%, #d9a845 50%, #fff3cf 70%, #a87923);
  --display: "Rozha One", serif;
  --script: "Pinyon Script", cursive;
  --caps: "Cinzel", Georgia, serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  --spring: cubic-bezier(.3, 1.25, .4, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; overflow-x: hidden;
  font-family: var(--serif); font-size: 18px; color: var(--ivory);
  background: radial-gradient(120% 80% at 50% 0%, #3b1360 0%, var(--night-2) 35%, var(--night) 75%) fixed, var(--night);
}
body.locked { overflow: hidden; height: 100svh; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
a { color: inherit; }
.center { text-align: center; }
.ic { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#sky, #petals { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#sky { z-index: 0; }
#petals { z-index: 60; }
main { position: relative; z-index: 1; }

/* film grain + scroll progress + cursor */
.grain { position: fixed; inset: -100px; z-index: 55; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 90; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--rani), var(--mari), var(--gold-2)); transform-origin: left; transform: scaleX(0); }
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; position: fixed; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid rgba(255, 205, 74, .75); border-radius: 50%;
    pointer-events: none; z-index: 200; opacity: 0; transition: opacity .3s, width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s; }
  .cursor.on { opacity: 1; }
  .cursor.big { width: 66px; height: 66px; margin: -33px 0 0 -33px; background: rgba(255, 205, 74, .12); border-color: transparent; }
  .grain { animation: grain 1.2s steps(6) infinite; }
}

/* ---------------- LOADER ---------------- */
#loader { position: fixed; inset: 0; z-index: 150; display: grid; place-content: center; justify-items: center; gap: 16px; background: var(--night); transition: transform 1s var(--ease-io); }
body.loaded #loader { transform: translateY(-100%); }
.ld { position: relative; width: 124px; height: 124px; display: grid; place-items: center; }
.ld svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ld circle { fill: none; stroke-width: 1.4; }
.ld-bg { stroke: rgba(232, 195, 114, .18); }
.ld-fg { stroke: var(--gold); stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.ld-mono { font-family: var(--caps); font-weight: 700; font-size: 24px; color: var(--gold-2); display: flex; align-items: center; }
.ld-mono b { font-size: 12px; margin: 0 4px; color: var(--rani-2); }
.ld-txt { margin: 0; font-family: var(--caps); font-size: 12px; letter-spacing: .3em; color: var(--gold); }

/* ---------------- ENVELOPE GATE ---------------- */
#gate {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 28px; padding: 24px;
  background: radial-gradient(70% 50% at 50% 45%, rgba(216, 27, 96, .38), transparent 70%), rgba(20, 10, 42, .97);
  -webkit-mask: radial-gradient(circle at 50% 52%, transparent var(--hole), #000 calc(var(--hole) + .6%));
  mask: radial-gradient(circle at 50% 52%, transparent var(--hole), #000 calc(var(--hole) + .6%));
  transition: --hole 1.6s var(--ease-io), opacity .9s ease;
}
#gate.fade { --hole: 112%; pointer-events: none; }
#gate.nofx { -webkit-mask: none; mask: none; }
#gate.nofx.fade { opacity: 0; }
#gate.gone { display: none; }
.gate-for { margin: 0; font-family: var(--caps); letter-spacing: .5em; text-transform: uppercase; font-size: 13px; color: var(--gold); text-align: center; opacity: 0; transition: opacity 1s .5s, letter-spacing 1.6s .5s var(--ease); }
.gate-hint { margin: 0; font-size: 15px; color: rgba(255, 247, 234, .7); font-style: italic; text-align: center; opacity: 0; transition: opacity 1s 1.3s; }
.gate-hint span { white-space: nowrap; }
body.loaded .gate-for { opacity: 1; letter-spacing: .25em; }
body.loaded .gate-hint { opacity: 1; }
#gate.open .gate-for, #gate.open .gate-hint { opacity: 0; transition: opacity .4s; }
.envelope { position: relative; width: min(86vw, 400px); aspect-ratio: 4 / 3; perspective: 1200px; opacity: 0; transform: translateY(70px) rotateX(35deg) scale(.84); }
body.loaded .envelope { animation: envIn 1.2s .35s var(--ease) forwards, hover 4s 1.7s ease-in-out infinite; }
.env-back, .env-pocket, .env-flap, .env-shine { position: absolute; inset: 0; border-radius: 10px; }
.env-back { background: linear-gradient(160deg, #a3124a, #6d0b34); box-shadow: 0 30px 60px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(232, 195, 114, .5); }
.letter {
  position: absolute; left: 6%; right: 6%; top: 6%; height: 88%; z-index: 2; border-radius: 6px;
  background: linear-gradient(170deg, #fffaf0, var(--ivory-2)); color: var(--ink);
  display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center;
  box-shadow: inset 0 0 0 1.5px rgba(184, 134, 43, .6), inset 0 0 0 6px var(--ivory), inset 0 0 0 7px rgba(184, 134, 43, .4);
  transition: transform 1.1s .65s var(--ease);
}
.l-small { font-family: var(--caps); font-size: 11.5px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.l-names { font-family: var(--script); font-size: clamp(34px, 10vw, 46px); color: var(--rani); line-height: 1.1; }
.l-names i { font-family: var(--serif); font-size: .6em; color: #b8862b; }
.l-date { font-family: var(--caps); font-size: 12px; letter-spacing: .2em; color: var(--ink); }
.env-pocket { z-index: 3; background: linear-gradient(200deg, #c2185b, #8a0e40); clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%); }
.env-pocket::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255, 240, 194, .06) 0 2px, transparent 2px 10px); }
.env-flap { z-index: 4; transform-origin: top center; background: linear-gradient(180deg, #e0256c, #a3124a); clip-path: polygon(0 0, 100% 0, 50% 60%);
  transition: transform .9s var(--ease-io), z-index 0s .45s; }
.env-shine { z-index: 4; overflow: hidden; pointer-events: none; transition: opacity .3s; }
.env-shine::after { content: ""; position: absolute; top: -40%; bottom: -40%; left: -70%; width: 38%; transform: rotate(14deg);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .3), transparent); animation: shine 3.8s 1.8s ease-in-out infinite; }
.seal { position: absolute; z-index: 5; left: 50%; top: 58%; transform: translate(-50%, -50%); width: 86px; height: 86px; border: 0; border-radius: 50%; padding: 0;
  background: radial-gradient(circle at 35% 30%, #ffd77a, #c8932c 55%, #8a5d12); box-shadow: 0 8px 20px rgba(0, 0, 0, .45), 0 0 0 4px rgba(255, 240, 194, .25);
  transition: transform .5s ease, opacity .5s ease; }
.seal::before, .seal::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(255, 205, 74, .7); animation: ripple 2.4s ease-out infinite; pointer-events: none; }
.seal::after { animation-delay: 1.2s; }
.seal-in { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; font-family: var(--caps); font-weight: 700; font-size: 22px; color: #5a3a06;
  box-shadow: inset 0 0 0 5px rgba(90, 58, 6, .25); }
.seal-in b { font-size: 12px; margin: 0 3px; color: #7a1030; }
#gate.open .seal { transform: translate(-50%, -50%) scale(1.6) rotate(25deg); opacity: 0; }
#gate.open .env-shine { opacity: 0; }
#gate.open .env-flap { transform: rotateX(180deg); z-index: 1; }
#gate.open .letter { transform: translateY(-58%); }
#gate.open .envelope { animation: none; opacity: 1; transform: none; }

/* ---------------- REVEALS ---------------- */
.rv { opacity: 0; transform: translateY(34px); transition: opacity 1.1s var(--ease) var(--d, 0s), transform 1.2s var(--ease) var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
.rv-wipe { -webkit-mask: linear-gradient(90deg, #000 46%, transparent 54%) 100% 0 / 220% 100% no-repeat; mask: linear-gradient(90deg, #000 46%, transparent 54%) 100% 0 / 220% 100% no-repeat;
  transition: -webkit-mask-position 1.8s var(--ease-io) var(--d, 0s), mask-position 1.8s var(--ease-io) var(--d, 0s); }
.rv-wipe.in { -webkit-mask-position: 0 0; mask-position: 0 0; }
.rv-spin { opacity: 0; transform: scale(.5) rotate(-70deg); transition: opacity 1.6s ease var(--d, 0s), transform 2.4s var(--ease) var(--d, 0s); }
.rv-spin.in { opacity: 1; transform: none; }
.rv-photo { opacity: 0; transform: translateY(70px) scale(.95); filter: blur(12px); transition: opacity 1.3s ease var(--d, 0s), transform 1.6s var(--ease) var(--d, 0s), filter 1.3s ease var(--d, 0s); }
.rv-photo.in { opacity: 1; transform: none; filter: none; }
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .14em .05em .22em; margin: -.14em -.05em -.22em; }
[data-split] .wi { display: inline-block; transform: translateY(118%) rotate(6deg); transform-origin: left bottom; transition: transform 1.15s var(--ease); transition-delay: calc(var(--d, 0s) + var(--i) * 80ms); }
[data-split].in .wi { transform: none; }
[data-split="rise"] .w { overflow: visible; }
[data-split="rise"] .wi { opacity: 0; transform: translateY(36px) scale(.94); filter: blur(10px); transition: opacity 1.2s ease, transform 1.4s var(--ease), filter 1.2s ease; transition-delay: calc(var(--d, 0s) + var(--i) * 160ms); }
[data-split="rise"].in .wi { opacity: 1; transform: none; filter: none; }
.orn { display: block; width: 200px; height: 20px; margin: 14px auto 0; fill: none; stroke: var(--gold); stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease-io) .25s; }
.orn.in { stroke-dashoffset: 0; }
.orn.dark { stroke: #b8862b; margin: 16px auto; }

/* ---------------- HERO ---------------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: min(74vw, 38svh) 20px calc(108px + var(--safe-b)); overflow: hidden; }
/* engagement film: fills the top of the first screen and melts into the night sky behind the words */
.hero-media { position: absolute; inset: 0 0 auto 0; aspect-ratio: 4 / 5; max-height: 74svh; z-index: 0; pointer-events: none; background: var(--night);
  -webkit-mask-image: linear-gradient(#000 48%, transparent 99%); mask-image: linear-gradient(#000 48%, transparent 99%);
  opacity: 0; transform: scale(1.07); transition: opacity 1.8s ease .15s, transform 3.2s var(--ease) .15s; }
body.entered .hero-media { opacity: 1; transform: none; }
.hero-video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.hero-media::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 10, 42, .6), rgba(20, 10, 42, .04) 24%, rgba(36, 16, 70, .1) 50%, rgba(20, 10, 42, .8)); }
.vid-toggle { position: absolute; z-index: 4; right: 12px; top: 136px; width: 36px; height: 36px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 240, 194, .5); background: rgba(20, 10, 42, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--gold-2);
  opacity: 0; transition: opacity .8s ease 1.6s, background .3s, transform .2s; }
body.entered .vid-toggle { opacity: 1; }
.vid-toggle::after { content: ""; position: absolute; inset: -8px; }
.vid-toggle:active { transform: scale(.92); }
.vid-toggle .ic { width: 15px; height: 15px; stroke-width: 2; }
.vid-toggle .i-play { display: none; fill: currentColor; stroke: none; margin-left: 2px; }
.vid-toggle.paused .i-pause { display: none; } .vid-toggle.paused .i-play { display: block; }
.toran { position: absolute; top: 0; left: 0; right: 0; height: 160px; display: flex; justify-content: space-between; padding: 0 2%; z-index: 3; pointer-events: none; }
.toran::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 10px; background: linear-gradient(90deg, #0f7a5f, #2fa37f, #0f7a5f); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); transform: scaleX(0); transition: transform 1.2s var(--ease-io); }
body.entered .toran::before { transform: none; }
.strand { display: flex; flex-direction: column; align-items: center; transform-origin: top center; animation: sway 4s ease-in-out infinite; clip-path: inset(0 -30% 100% -30%); transition: clip-path 1.3s var(--ease) var(--sd, 0s); }
body.entered .strand { clip-path: inset(0 -30% -30% -30%); }
.strand i { width: 18px; height: 18px; margin-top: -5px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 40% 35%, var(--mari-2), var(--mari) 45%, #e06d00 80%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15), 0 2px 3px rgba(0, 0, 0, .35); }
.strand i:nth-child(3n) { background: radial-gradient(circle at 40% 35%, #fff3b0, #ffd23a 45%, #e0a000 80%); }
.strand i:nth-child(5n) { width: 14px; height: 14px; background: radial-gradient(circle at 40% 35%, #ff8db7, var(--rani) 60%); }
.strand em { width: 12px; height: 16px; margin-top: -2px; background: #1f9c5a; border-radius: 0 50% 50% 50%; transform: rotate(45deg); }

.hero-text { position: relative; z-index: 2; display: grid; gap: 4px; justify-items: center; text-align: center; text-shadow: 0 2px 16px rgba(20, 10, 42, .75); }
/* Lord Ganesha: gold line drawing that draws itself in */
.ganesha { width: 76px; height: auto; margin-bottom: 2px; overflow: visible; fill: none; stroke: var(--gold-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(255, 165, 31, .6)) drop-shadow(0 2px 6px rgba(20, 10, 42, .7)); }
.ganesha path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2s var(--ease-io) .2s; }
.ganesha path:nth-child(n + 6) { transition-delay: .5s; } .ganesha path:nth-child(n + 15) { transition-delay: .9s; } .ganesha path:nth-child(n + 21) { transition-delay: 1.3s; }
.ganesha.in path { stroke-dashoffset: 0; }
.g-halo { transform-origin: 60px 56px; opacity: 0; transition: opacity 1.6s ease 1.2s; animation: spin 80s linear infinite; }
.ganesha.in .g-halo { opacity: 1; }
.g-halo circle { stroke: var(--gold); stroke-width: .5; opacity: .55; }
.g-halo circle + circle { stroke-width: 1.1; stroke-dasharray: .1 4.45; opacity: .9; }
.shri { font-family: var(--display); color: var(--gold-2); font-size: 18px; letter-spacing: .06em; margin: 0; }
.shubh { font-family: var(--display); font-weight: 400; margin: 0; font-size: clamp(60px, 19vw, 112px); line-height: 1.15; text-shadow: none;
  background: var(--foil); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 14px rgba(20, 10, 42, .8)); animation: foil 6s linear infinite; }
.names-script { font-family: var(--script); font-size: clamp(42px, 12vw, 70px); margin: 0; line-height: 1.15; color: var(--ivory); }
.names-script i { font-family: var(--serif); font-style: italic; font-size: .7em; color: var(--rani-2); }
.hero-date { display: grid; justify-items: inherit; gap: 3px; font-family: var(--caps); font-size: 12.5px; letter-spacing: .18em; line-height: 1.35; text-transform: uppercase; color: var(--gold-2); margin: 6px 0 0; }
.hero-date b { font-weight: 700; }
.hero-date em { font-style: normal; font-weight: 500; color: rgba(255, 247, 234, .82); }
.hero-date i { display: none; font-style: normal; color: var(--mari); font-size: 10px; }
.hero-cta { display: flex; gap: 10px; justify-content: center; align-items: stretch; margin-top: 16px; width: 100%; max-width: 360px; }
.hero-cta .btn { min-height: 48px; flex: 1 1 0; padding-left: 12px; padding-right: 12px; letter-spacing: .08em; }
/* short phones: tighten the first screen so the buttons stay above the bottom bar */
@media (max-height: 700px) and (max-width: 959px) {
  .hero { padding-top: min(60vw, 30svh); }
  .ganesha { width: 60px; }
  .shubh { font-size: clamp(52px, 16vw, 96px); }
  .names-script { font-size: clamp(38px, 10.5vw, 60px); }
}
.scroll-cue { position: absolute; left: max(6vw, calc((100vw - 1240px) / 2)); bottom: 48px; width: 26px; height: 42px; border: 1.5px solid rgba(255, 240, 194, .6); border-radius: 14px; z-index: 3; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: wheel 1.6s infinite; }

/* marquee band */
.band-clip { position: relative; z-index: 2; overflow: hidden; padding: 16px 0; margin: -16px 0; }
.band { position: relative; padding: 13px 0; overflow: hidden; transform: rotate(-1.6deg) scale(1.05); border-block: 1px solid rgba(232, 195, 114, .3); background: rgba(20, 10, 42, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.band-track { display: flex; width: max-content; will-change: transform; font-family: var(--display); font-size: 21px; color: var(--gold-2); white-space: nowrap; }
.band-track span { display: flex; align-items: center; gap: 26px; padding-left: 26px; }
.band-track span::after { content: "✦"; color: var(--mari); font-size: 11px; }
.band-track span.s { font-family: var(--script); font-size: 30px; color: var(--ivory); }

/* ---------------- SECTIONS ---------------- */
.sec { padding: 84px 16px 70px; position: relative; overflow-x: hidden; overflow-x: clip; }
.sec > :not(.bgword) { position: relative; z-index: 1; }
.bgword { position: absolute; left: 0; right: 0; top: 18px; height: 0; display: flex; justify-content: center; pointer-events: none; user-select: none; z-index: 0; }
.bgword span { font-family: var(--display); font-size: clamp(120px, 34vw, 330px); line-height: 1.2; white-space: nowrap; color: rgba(232, 195, 114, .055); will-change: transform; }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto; }
.eyebrow { font-family: var(--caps); font-weight: 700; letter-spacing: .28em; text-transform: uppercase; font-size: 12px; color: var(--mari); margin: 0 0 10px; }
.title { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 10vw, 62px); line-height: 1.12; margin: 0; color: #f6dfa4; }
.sec-sub { margin: 12px 0 0; font-style: italic; color: rgba(255, 247, 234, .75); font-size: 18px; }
.tiny { font-size: 14px; color: rgba(255, 247, 234, .65); margin: 8px 0 0; }

/* segmented control (events days, travel modes) */
.seg-wrap { display: flex; justify-content: center; margin-top: 26px; }
.seg { position: relative; display: inline-flex; padding: 5px; border-radius: 999px; border: 1px solid rgba(232, 195, 114, .3); background: rgba(255, 255, 255, .04); max-width: 100%; }
.seg button { position: relative; z-index: 1; border: 0; background: none; border-radius: 999px; padding: 8px 13px; color: var(--gold-2); transition: color .35s; display: grid; justify-items: center; line-height: 1; gap: 3px; }
.seg button b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.seg button small { font-family: var(--caps); font-size: 11px; letter-spacing: .16em; font-weight: 700; text-transform: uppercase; }
.seg button.on { color: var(--ink); }
.seg .pill { position: absolute; z-index: 0; left: 0; top: 5px; bottom: 5px; width: 0; border-radius: 999px; background: var(--foil); box-shadow: 0 6px 18px rgba(255, 165, 31, .3);
  transition: transform .55s var(--spring), width .55s var(--spring); }
.seg.lg button { display: flex; align-items: center; gap: 8px; padding: 11px 17px; font-family: var(--caps); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

/* ---------------- INVITATION CARD ---------------- */
.invite-wrap { max-width: 620px; margin: 0 auto; perspective: 1400px; }
.card-ivory {
  position: relative; padding: 46px 22px 34px; text-align: center; color: var(--ink); border-radius: 26px; transition: transform .25s ease-out;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 205, 74, .18), transparent 50%),
    repeating-linear-gradient(135deg, rgba(184, 134, 43, .04) 0 2px, transparent 2px 12px),
    linear-gradient(175deg, #fffbf3, var(--ivory-2));
  box-shadow: 0 40px 80px rgba(0, 0, 0, .5), inset 0 0 0 1.5px rgba(184, 134, 43, .55), inset 0 0 0 8px #fffaf0, inset 0 0 0 9px rgba(184, 134, 43, .35);
}
.corner { position: absolute; width: 46px; height: 46px; border: 3px solid #c9973a; }
.corner.tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.corner.tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.corner.bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.corner.br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.mantra { font-family: var(--display); font-size: clamp(14px, 3.9vw, 18px); line-height: 1.8; color: #8a1240; margin: 0; }
.blessing { font-size: 19px; line-height: 1.5; font-weight: 600; color: var(--ink); margin: 0 0 14px; }
.blessing b { font-family: var(--script); font-weight: 400; font-size: 1.5em; color: var(--rani); }
.name { font-family: var(--script); font-weight: 400; font-size: clamp(48px, 13vw, 72px); line-height: 1.1; margin: 0; color: #7a1030; }
.parents { font-style: italic; color: var(--muted); margin: 2px 0 0; font-size: 16px; }
.amp { font-family: var(--display); font-size: 40px; margin: 6px 0; color: #c9973a; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 30px auto 26px; max-width: 400px; }
.countdown div { border-radius: 16px; padding: 12px 0 9px; color: var(--ivory); background: linear-gradient(160deg, var(--night-2), var(--plum)); box-shadow: inset 0 0 0 1px rgba(232, 195, 114, .5), 0 8px 18px rgba(36, 16, 70, .3); overflow: hidden; }
.countdown b { display: block; font-family: var(--caps); font-size: 26px; font-weight: 700; color: var(--gold-2); }
.countdown span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.card-ivory .eyebrow { color: #a3124a; }
.scratch { position: relative; width: min(100%, 330px); height: 132px; margin: 0 auto; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 26px rgba(122, 16, 48, .25); touch-action: none; }
.scratch-under { position: absolute; inset: 0; display: grid; place-content: center; gap: 2px; background: radial-gradient(circle at 50% 30%, #fff, #ffe4ee); }
.sd-day { font-family: var(--caps); letter-spacing: .25em; text-transform: uppercase; font-size: 12px; color: var(--muted); }
.sd-date { font-family: var(--display); font-size: clamp(24px, 7.2vw, 30px); color: var(--rani); line-height: 1.15; white-space: nowrap; }
.sd-sub { font-style: italic; color: #7a1030; font-size: 15px; }
#scratchCanvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; transition: opacity .8s; }
.scratch.done #scratchCanvas { opacity: 0; pointer-events: none; }

/* ---------------- EVENTS ---------------- */
.events-sec { padding-left: 0; padding-right: 0; transition: background 1s; }
.carousel-wrap { position: relative; }
.carousel { position: relative; display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 74px calc(50% - min(39vw, 160px)) 30px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.nav-arrow { display: none; }
.card { flex: 0 0 min(78vw, 320px); height: min(130vw, 540px); scroll-snap-align: center; perspective: 1400px; cursor: pointer; will-change: transform; }
.card-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3, .7, .2, 1); }
.card.flipped .card-inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 200px 200px 28px 28px; }
.face.front {
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .28), transparent 55%),
    radial-gradient(rgba(255, 240, 194, .18) 1.2px, transparent 1.6px) 0 0 / 14px 14px,
    linear-gradient(170deg, var(--c), var(--c2, #12051f));
  box-shadow: 0 24px 50px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(255, 240, 194, .35);
}
.face.front::before { content: ""; position: absolute; inset: 12px; border-radius: 190px 190px 18px 18px; border: 1.5px solid rgba(255, 240, 194, .6); pointer-events: none; }
.face.front::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 32%; height: 28px; border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .5), transparent 70%); }
.art { position: absolute; left: 50%; bottom: 33%; height: 76%; width: auto; max-width: none; transform: translateX(calc(-50% + var(--ax, 0px))); z-index: 2;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35)); transition: transform .6s var(--ease); pointer-events: none; }
.art.wide { height: 62%; }
.card.current .art { transform: translateX(calc(-50% + var(--ax, 0px))) translateY(-6px) scale(1.04); }
.info { position: absolute; left: 0; right: 0; bottom: 0; height: 38%; z-index: 3; border-radius: 0 0 28px 28px; padding: 14px 16px 18px; text-align: center;
  background: linear-gradient(180deg, rgba(18, 5, 31, 0), rgba(18, 5, 31, .82) 24%, rgba(18, 5, 31, .94)); display: grid; align-content: end; gap: 5px; }
.info h3 { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 7vw, 29px); line-height: 1.1; margin: 0; color: var(--gold-2); }
.chips { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.chip { font-family: var(--caps); font-size: 12px; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; background: rgba(255, 240, 194, .12); border: 1px solid rgba(255, 240, 194, .3); color: var(--ivory); }
.chip.date { background: var(--foil); color: var(--ink); border: 0; font-weight: 700; }
.venue-line { font-size: 15px; color: rgba(255, 247, 234, .85); }
.venue-line .ic { width: 14px; height: 14px; vertical-align: -2px; color: var(--mari-2); }
.flip-hint { font-family: var(--caps); font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mari-2); display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.flip-hint .ic { width: 13px; height: 13px; }
.face.back { transform: rotateY(180deg); background: linear-gradient(175deg, #fffbf3, var(--ivory-2)); color: var(--ink); display: flex; flex-direction: column; padding: 44px 22px 22px; box-shadow: 0 24px 50px rgba(0, 0, 0, .5), inset 0 0 0 3px var(--c); }
.back-no { font-family: var(--display); font-size: 40px; line-height: 1; text-align: center; color: var(--c); opacity: .3; }
.back h3 { font-family: var(--display); font-weight: 400; font-size: 27px; margin: 2px 0 10px; text-align: center; color: var(--c); line-height: 1.1; }
.back .row { display: flex; gap: 10px; align-items: flex-start; margin: 5px 0; font-size: 16.5px; }
.back .row .ic { margin-top: 3px; color: var(--c); }
.back .btns { margin-top: auto; display: grid; gap: 9px; }
.mini-map { margin: 8px 0; border-radius: 16px; height: 84px; display: grid; place-items: center; text-decoration: none; position: relative; overflow: hidden;
  background: linear-gradient(90deg, rgba(0, 0, 0, .05) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(rgba(0, 0, 0, .05) 1px, transparent 1px) 0 0 / 18px 18px, #f3e6cf; }
.mini-map::before { content: ""; position: absolute; left: -10%; right: -10%; top: 55%; height: 10px; background: #fff; transform: rotate(-8deg); box-shadow: 0 0 0 2px #e8d6b6; }
.mini-map .pin { position: relative; animation: bobPin 1.6s infinite; color: var(--rani); }
.mini-map .pin .ic { width: 30px; height: 30px; fill: #fff; stroke-width: 1.8; }
.mini-map .lbl { position: absolute; bottom: 5px; font-family: var(--caps); font-weight: 700; font-size: 11px; letter-spacing: .12em; color: var(--ink); }
.dots { display: flex; justify-content: center; gap: 14px; padding: 8px 0; }
.dots button { position: relative; width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 240, 194, .5); transition: .4s var(--ease); }
.dots button::after { content: ""; position: absolute; inset: -17px -7px; }
.dots button.on { width: 28px; border-radius: 6px; background: var(--mari); }

/* ---------------- BUTTONS ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 22px; text-decoration: none; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--rani), #a3124a); color: #fff; font-family: var(--caps); font-weight: 700; letter-spacing: .1em; font-size: 12.5px; text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(216, 27, 96, .35); transition: transform .3s var(--ease), box-shadow .3s; }
.btn .ic { width: 16px; height: 16px; }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transition: left .7s var(--ease); }
.btn:hover::after { left: 130%; }
.btn:active { transform: scale(.97); }
.btn.gold { background: var(--foil); background-size: 200% 100%; color: var(--ink); box-shadow: 0 8px 24px rgba(255, 165, 31, .35); }
.btn.gold:hover { animation: foil 3s linear infinite; }
.btn.ghost { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 240, 194, .5); color: var(--gold-2); box-shadow: none; }
.btn.line { background: transparent; color: var(--ink); border: 1.5px solid currentColor; box-shadow: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------------- MOMENTS (engagement + family photos) ---------------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 1080px; margin: 34px auto 0; }
.shot { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 22px; overflow: hidden; isolation: isolate; aspect-ratio: 2 / 3; cursor: zoom-in;
  background: var(--night-2); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
/* one frame for every photo: a thin gold line inset from the edge, over a soft warm vignette */
.shot::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 90% at 50% 38%, transparent 55%, rgba(58, 13, 63, .38)), linear-gradient(180deg, rgba(255, 205, 74, .07), transparent 40%); mix-blend-mode: multiply; }
.shot::after { content: ""; position: absolute; inset: 8px; z-index: 2; border-radius: inherit; pointer-events: none; border: 1.25px solid rgba(255, 240, 194, .78);
  box-shadow: 0 0 0 1px rgba(184, 134, 43, .35), inset 0 0 0 1px rgba(184, 134, 43, .25); }
.shot { outline: 1.5px solid rgba(232, 195, 114, .55); outline-offset: -1.5px; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 30%); transition: transform 1.4s var(--ease); }
.shot .cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 36px 14px 16px; text-align: center; font-family: var(--caps); font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2);
  background: linear-gradient(rgba(20, 10, 42, 0), rgba(20, 10, 42, .88)); }
.shot:not(.wide) { border-radius: 999px 999px 22px 22px; }
.shot:not(.wide)::after { border-radius: 999px 999px 15px 15px; }
.shot.wide { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.shot.wide::after { border-radius: 15px; }
.shot.lead { order: -1; grid-column: 1 / -1; aspect-ratio: 4 / 5; border-radius: 999px 999px 22px 22px; }
.shot.lead .cap { text-align: center; font-size: 12px; padding-bottom: 16px; }
.shot:active img { transform: scale(1.03); }
.gallery-hint { margin-top: 18px; }
@media (hover: hover) and (pointer: fine) { .shot:hover img { transform: scale(1.06); } }
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .shot.lead, .shot.wide { grid-column: auto; }
  .shot.lead { order: 0; aspect-ratio: 2 / 3; border-radius: 999px 999px 22px 22px; }
}
/* photo viewer */
.lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; color: var(--ivory); background: rgba(12, 5, 26, .95); }
.lightbox::backdrop { background: rgba(12, 5, 26, .6); }
.lightbox[open] { display: grid; place-items: center; animation: lbIn .35s var(--ease); }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 14px; padding: 64px 12px calc(22px + var(--safe-b)); }
.lightbox img { max-width: min(100%, 1100px); max-height: calc(100dvh - 160px); width: auto; height: auto; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1.5px rgba(232, 195, 114, .55);
  touch-action: pan-y pinch-zoom; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.lightbox img.swap { animation: lbSwap .4s var(--ease); }
.lightbox figcaption { display: flex; align-items: baseline; gap: 14px; font-family: var(--caps); font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-2); }
.lightbox figcaption small { font-size: 11px; color: rgba(255, 247, 234, .6); letter-spacing: .12em; }
.lb-btn { position: absolute; width: 46px; height: 46px; padding: 0; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(232, 195, 114, .5); background: rgba(20, 10, 42, .72); color: var(--gold-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .3s, transform .2s; }
.lb-btn:active { transform: scale(.92); }
.lb-btn .ic { width: 20px; height: 20px; }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.lb-prev, .lb-next { top: 50%; margin-top: -23px; }
.lb-prev { left: 10px; } .lb-prev .ic { transform: rotate(180deg); } .lb-next { right: 10px; }
@media (hover: hover) and (pointer: fine) { .lb-btn:hover { background: var(--rani); } }
html.lb-open { overflow: hidden; }

/* ---------------- BLESSINGS ---------------- */
.bless { max-width: 560px; margin: 30px auto 0; padding: 24px 18px 20px; border-radius: 26px; color: var(--ink); color-scheme: light;
  background: radial-gradient(circle at 50% 0%, rgba(255, 205, 74, .16), transparent 55%), linear-gradient(175deg, #fffbf3, var(--ivory-2));
  box-shadow: 0 30px 60px rgba(0, 0, 0, .45), inset 0 0 0 1.5px rgba(184, 134, 43, .55); }
.bless :focus-visible { outline-color: var(--rani); }
.field { display: grid; gap: 6px; margin: 0 0 14px; }
.field label { font-family: var(--caps); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input { width: 100%; border: 1.5px solid #e3d0ae; background: #fff; border-radius: 14px; padding: 13px 14px; font: inherit; font-size: 17px; color: var(--ink); outline: none; transition: border .2s, box-shadow .2s; }
.field input:focus { border-color: var(--rani); box-shadow: 0 0 0 4px rgba(216, 27, 96, .14); }
.field input[aria-invalid="true"], .rte.bad { border-color: var(--error); box-shadow: 0 0 0 4px rgba(179, 38, 30, .12); }
.help { margin: 0; text-align: right; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.help.over { color: var(--error); font-weight: 700; }
.ferr { margin: 2px 0 0; color: var(--error); font-size: 15px; font-weight: 600; line-height: 1.35; }
.ferr:empty { display: none; }
.bless .btn { width: 100%; margin-top: 6px; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .8s linear infinite; }
/* the little editor */
.rte { border: 1.5px solid #e3d0ae; border-radius: 14px; background: #fff; overflow: hidden; transition: border .2s, box-shadow .2s; }
.rte:focus-within { border-color: var(--rani); box-shadow: 0 0 0 4px rgba(216, 27, 96, .14); }
.rte-bar { display: flex; align-items: center; gap: 0; padding: 5px 4px; border-bottom: 1px solid #efe1c8; background: #fbf5ea; }
.rte-bar button { flex: 1 1 0; min-width: 0; max-width: 46px; height: 42px; padding: 0; border: 0; border-radius: 10px; background: none; color: var(--ink); font-family: var(--serif); font-size: 19px; line-height: 1; transition: background .2s, color .2s; }
.rte-bar button[aria-pressed="true"] { background: var(--rani); color: #fff; }
.rte-bar button:active { transform: scale(.92); }
.rte-emoji { display: flex; flex: 5 1 0; min-width: 0; justify-content: flex-end; }
.rte-emoji button { font-size: 18px; }
.rte-sep { flex: none; width: 1px; height: 24px; margin: 0 3px; background: #e3d0ae; }
.rte-area { min-height: 112px; max-height: 260px; overflow-y: auto; padding: 12px 14px; font-size: 17.5px; line-height: 1.5; color: var(--ink); outline: none; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.rte-area:empty::before { content: attr(data-placeholder); color: #a8919f; font-style: italic; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .rte-bar button:hover { background: #f2e4cb; } .rte-bar button[aria-pressed="true"]:hover { background: var(--rani-deep); } }
/* the wall */
.wishes { max-width: 1100px; margin: 38px auto 0; columns: 1; column-gap: 16px; }
.wish { break-inside: avoid; position: relative; margin: 0 0 16px; padding: 22px 20px 16px; border-radius: 20px; color: var(--ink);
  background: linear-gradient(175deg, #fffbf3, var(--ivory-2)); box-shadow: 0 16px 34px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(184, 134, 43, .45); animation: wishIn .8s var(--ease) both; }
.wish::before { content: "\201C"; position: absolute; top: -6px; left: 14px; font-family: var(--display); font-size: 58px; line-height: 1; color: var(--gold-deep); opacity: .5; }
.wish .msg { margin: 0; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.wish .msg b { font-weight: 700; color: var(--wine); }
.wish .from { display: block; margin-top: 10px; font-family: var(--script); font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--rani); text-align: right; }
.wish.new { box-shadow: 0 16px 34px rgba(0, 0, 0, .35), inset 0 0 0 2px var(--rani); }
.wishes.empty { columns: auto; }
.wish-empty { max-width: 420px; margin: 0 auto; padding: 22px 20px; text-align: center; border-radius: 24px; border: 1px dashed rgba(232, 195, 114, .4); color: rgba(255, 247, 234, .8); }
.wish-more { display: flex; justify-content: center; margin-top: 8px; }
@media (min-width: 640px) { .wishes { columns: 2; } .bless { padding: 28px 30px 26px; } }
@media (min-width: 1000px) { .wishes { columns: 3; column-gap: 20px; } }
@keyframes wishIn { from { opacity: 0; transform: translateY(24px); } }

/* ---------------- PARADE ---------------- */
.parade-band { position: relative; z-index: 1; overflow: hidden; padding-top: 24px; }
.parade { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.parade-track { display: flex; align-items: flex-end; gap: 26px; width: max-content; animation: march 38s linear infinite; padding: 12px 0 18px; }
.parade-track img { height: 260px; width: auto; max-width: none; filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .45)); animation: bounce 2.4s ease-in-out infinite; }
.parade-track img:nth-child(even) { animation-delay: 1.2s; }

/* ---------------- FOOTER ---------------- */
.footer { text-align: center; padding: 70px 20px calc(120px + var(--safe-b)); position: relative; z-index: 1; overflow: hidden; }
.foot-names { font-family: var(--script); font-size: 46px; margin: 0; color: var(--ivory); }
.foot-names i { font-family: var(--serif); font-style: italic; font-size: .7em; color: var(--rani-2); }
.foot-date { font-family: var(--caps); letter-spacing: .2em; font-size: 13px; text-transform: uppercase; color: var(--gold); }
.hashtag { font-size: 20px; color: var(--mari-2); }
.foot-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 24px 0 18px; }

/* ---------------- DOCK ---------------- */
.dock { position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translate(-50%, 170%); z-index: 50; display: flex; gap: 1px; padding: 6px; border-radius: 24px;
  background: rgba(20, 10, 42, .78); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(232, 195, 114, .25); transition: transform .9s var(--spring) .8s; }
body.opened .dock { transform: translate(-50%, 0); }
.dock a, .dock button { display: grid; justify-items: center; gap: 3px; min-width: 52px; padding: 7px 5px 6px; border: 0; background: none; color: rgba(255, 240, 194, .75); font-family: var(--caps); font-size: 8.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border-radius: 18px; transition: color .3s, background .3s; }
.dock .ic { width: 19px; height: 19px; }
.dock a.active { color: var(--mari-2); background: rgba(255, 205, 74, .13); box-shadow: inset 0 0 0 1px rgba(255, 205, 74, .28); }

.toast { position: fixed; left: 50%; top: 18px; transform: translate(-50%, -150%); opacity: 0; z-index: 120; background: var(--rani); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .5s var(--spring), opacity .4s; max-width: 90vw; text-align: center; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }


/* =========================================================
   UX layer: tokens, focus, touch targets, type, new components
   ========================================================= */
:root {
  --wine: #7a1030; --rani-deep: #a3124a; --gold-deep: #b8862b;
  --surface: var(--ivory); --on-surface: var(--ink);
  --error: #b3261e; --success: #1f7a3d; --focus: #ffcd4a;
}
html { color-scheme: dark; scroll-padding-top: 20px; scroll-padding-bottom: 110px; }
body { line-height: 1.5; }
[hidden] { display: none !important; }
a, button, [role="button"], input, textarea, select, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
::selection { background: var(--rani); color: #fff; }
.title, .info h3, .back h3 { text-wrap: balance; }
.sec-sub, .blessing { text-wrap: pretty; }
.countdown b { font-variant-numeric: tabular-nums; }

/* keyboard focus: always visible, never hidden behind the dock */
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; }
.card-ivory :focus-visible, .face.back :focus-visible, .letter :focus-visible { outline-color: var(--rani); }
section:focus-visible, h1:focus-visible, h3[tabindex="-1"]:focus-visible { outline: none; }
.shot:focus-visible { outline-offset: 4px; }
.card:focus-visible { outline-offset: 6px; border-radius: 200px 200px 28px 28px; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 300; transform: translateY(-250%); background: var(--ivory); color: var(--ink); padding: 12px 18px; border-radius: 12px;
  font-family: var(--caps); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-decoration: none; transition: transform .2s; }
.skip:focus { transform: none; }
body:not(.entered) .skip { display: none; }

/* returning guests skip the loader and envelope */
html.quick #loader, html.quick #gate { display: none !important; }

/* touch targets: 44px minimum, with press feedback */
.seg button { min-height: 44px; min-width: 46px; }
.scroll-cue::after { content: ""; position: absolute; inset: -10px -14px; }
.dock a:active, .nav-arrow:active, .dock-music:active { transform: scale(.94); }
.card:active .face.front { filter: brightness(1.06); }

/* bottom bar: four destinations and the music toggle */
.dock { gap: 2px; }
.dock a { min-width: min(62px, 17vw); min-height: 50px; align-content: center; font-size: 11px; letter-spacing: .06em; }


.band-track span.s em { font-style: normal; }
.band-track span.s i { font-family: var(--serif); font-style: italic; font-size: .6em; color: var(--rani-2); }
@media (max-width: 959px) { .scroll-cue { display: none; } }

/* buttons: one height, labels never wrap; narrow rows stack instead */
.btn { min-height: 48px; border: 1.5px solid transparent; white-space: nowrap; }
.btn.ghost { border: 1.5px solid rgba(255, 240, 194, .5); }
/* keep the card's corner ornaments clear of the scratch panel */
.card-ivory { padding-bottom: 62px; }

/* =========================================================
   Phone layout pass
   ========================================================= */
/* tabs: equal columns, highlight placed by index (no measuring, so nothing can overlap) */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.seg button { min-width: 0; white-space: nowrap; }
.seg .pill { left: 5px; width: calc((100% - 10px) / var(--n, 1)); transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .55s var(--spring); }

/* event card: picture area on top, text block below it */
.face.front { display: flex; flex-direction: column; }
.face.front::after { display: none; }
.art-box { position: relative; flex: 1 1 0; min-height: 0; }
.art-box::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -8px; height: 26px; border-radius: 50%; background: radial-gradient(rgba(0, 0, 0, .5), transparent 70%); }
.art { bottom: -2px; height: calc(100% + 56px); }
.art.wide { height: 100%; }
.info { position: relative; height: auto; margin-top: -18px; padding: 30px 14px 16px; gap: 6px; align-content: start;
  background: linear-gradient(180deg, rgba(18, 5, 31, 0), rgba(18, 5, 31, .88) 26px, rgba(18, 5, 31, .95)); }
.chip { white-space: nowrap; }

/* music toggle sits at the end of the bottom bar */
.dock .dock-music { position: relative; flex: none; align-self: center; width: 44px; min-width: 0; height: 44px; margin-left: 6px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(232, 195, 114, .45); background: rgba(255, 255, 255, .06); color: var(--gold-2); display: grid; place-items: center; transition: background .3s, color .3s; }
.dock-music .ic { width: 19px; height: 19px; }
.dock-music .eq { display: none; gap: 3px; align-items: flex-end; height: 15px; }
.dock-music .eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--mari-2); transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.dock-music .eq i:nth-child(2) { animation-delay: -.35s; } .dock-music .eq i:nth-child(3) { animation-delay: -.7s; }
.dock-music.playing { background: rgba(255, 165, 31, .14); }
.dock-music.playing .ic { display: none; } .dock-music.playing .eq { display: flex; }
.dock-music.hint::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1.5px solid var(--mari-2); animation: ripple 2.2s ease-out 3; }

@media (max-width: 479px) {
  /* bottom bar spans the screen so every item gets an equal share */
  .dock { left: 10px; right: 10px; transform: translateY(170%); }
  body.opened .dock { transform: none; }
  .dock a { flex: 1 1 0; min-width: 0; padding-left: 2px; padding-right: 2px; letter-spacing: .03em; }
  /* stacked buttons are the same width */
  .foot-actions { flex-direction: column; align-items: stretch; max-width: 300px; margin-left: auto; margin-right: auto; }
  .back .btn { padding-left: 10px; padding-right: 10px; letter-spacing: .06em; }
  .back { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 345px) {
  .dock { left: 6px; right: 6px; gap: 0; }
  .dock a { font-size: 10px; letter-spacing: 0; padding-left: 2px; padding-right: 2px; }
  .dock .dock-music { margin-left: 2px; }
  /* the two first-screen buttons don't fit side by side here, so they stack at one width */
  .hero-cta .btn { padding-left: 8px; padding-right: 8px; letter-spacing: .04em; font-size: 12px; }
}

.foot-link { margin: 14px 0 6px; }
.foot-link a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--gold); font-weight: 600; text-underline-offset: 4px; }
.cal-all { text-align: center; margin-top: 22px; padding: 0 16px; }
.cal-all .btn { min-width: min(100%, 260px); }

/* iPhone Safari hardening */
/* flipped cards: the hidden side is really hidden, not just turned away. WebKit (every iPhone browser) showed the
   front mirrored on top of the directions side; reproduced and verified with tests/webkit-shot.swift */
.card.flipped .face.front, .card:not(.flipped) .face.back { visibility: hidden; transition: visibility 0s .42s; }
.card.flipped .face.back, .card:not(.flipped) .face.front { visibility: visible; transition: visibility 0s .42s; }
.build { margin: 14px 0 0; font-family: var(--caps); font-size: 11px; letter-spacing: .2em; color: rgba(255, 247, 234, .35); }

/* ---------------- TABLET ---------------- */
@media (min-width: 640px) {
  .card-ivory { padding: 56px 48px 40px; }
  .parade-track img { height: 320px; }
  .band-track { font-size: 26px; }
}

/* ---------------- DESKTOP ---------------- */
@media (min-width: 960px) {
  body { font-size: 19px; }
  .hero { padding: 170px 6vw 130px; justify-content: center; }
  /* wide screens: the film sits to the right and fades out towards the words */
  .hero-media { inset: 0 0 0 auto; width: 72%; aspect-ratio: auto; max-height: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 46%), linear-gradient(#000 70%, transparent); mask-image: linear-gradient(90deg, transparent, #000 46%), linear-gradient(#000 70%, transparent);
    -webkit-mask-composite: source-in; mask-composite: intersect; }
  .hero-media::after { background: linear-gradient(180deg, rgba(20, 10, 42, .6), rgba(20, 10, 42, 0) 32%), linear-gradient(90deg, rgba(20, 10, 42, .55), rgba(20, 10, 42, 0) 55%); }
  .hero-video { object-position: 50% 35%; }
  .hero-text { justify-items: start; text-align: left; width: 100%; max-width: 1240px; margin: 0 auto; }
  .hero-cta { justify-content: flex-start; max-width: 420px; }
  .hero-date { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
  .hero-date i { display: inline; }
  .ganesha { width: 104px; margin-left: 6px; }
  .vid-toggle { top: auto; bottom: 128px; right: 30px; width: 46px; height: 46px; }
  .shubh { font-size: clamp(96px, 9vw, 150px); }
  .names-script { font-size: clamp(64px, 5.5vw, 88px); }
  .toran { height: 200px; }
  .sec { padding: 120px 40px 100px; }
  .events-sec { padding-left: 0; padding-right: 0; }
  .carousel { padding: 84px max(70px, calc(50% - 560px)) 40px; gap: 28px; }
  .card { flex-basis: 300px; height: 520px; transition: transform .6s var(--ease); }
  .card:hover { transform: translateY(-12px); }
  .card:hover .art { transform: translateX(-50%) translateY(-14px) scale(1.07); }
  .nav-arrow { display: grid; place-items: center; position: absolute; top: 55%; z-index: 5; width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(232, 195, 114, .5); background: rgba(20, 10, 42, .7); color: var(--gold-2); backdrop-filter: blur(8px); transition: transform .3s var(--spring), background .3s; }
  .nav-arrow:hover { background: var(--rani); transform: scale(1.1); }
  .nav-arrow.prev { left: 18px; } .nav-arrow.prev .ic { transform: rotate(180deg); } .nav-arrow.next { right: 18px; }
  .dock { bottom: 22px; }
  .dock a { min-width: 76px; font-size: 11px; }
  .btn:hover { box-shadow: 0 14px 34px rgba(216, 27, 96, .45); }
}
@media (min-width: 1700px) { .carousel { justify-content: center; } .nav-arrow { display: none; } }

/* short landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .envelope { width: min(75vh, 360px); }
  .hero { padding-top: 130px; }
  .hero-media { aspect-ratio: auto; max-height: none; height: 100%; }
}

/* ---------------- KEYFRAMES ---------------- */
@keyframes envIn { to { opacity: 1; transform: none; } }
@keyframes hover { 50% { transform: translateY(-10px) rotate(-.6deg); } }
@keyframes shine { 0%, 55% { left: -70%; } 100% { left: 140%; } }
@keyframes ripple { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sway { 0%, 100% { transform: rotate(2.5deg); } 50% { transform: rotate(-2.5deg); } }
@keyframes foil { to { background-position: -200% 0; } }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes bobPin { 50% { transform: translateY(-6px); } }
@keyframes march { to { transform: translateX(-50%); } }
@keyframes bounce { 50% { transform: translateY(-8px); } }
@keyframes lbIn { from { opacity: 0; } }
@keyframes lbSwap { from { opacity: 0; transform: scale(.97); } }
@keyframes pop { from { transform: scale(0); } }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-30px, 20px); } 40% { transform: translate(20px, -40px); } 60% { transform: translate(-40px, -10px); } 80% { transform: translate(30px, 30px); } 100% { transform: translate(0, 0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* Kirti and Namwar: edition links and four original invitation cards. */
.edition-links { display:flex; gap:12px; flex-wrap:wrap; justify-content:center; margin:24px auto; max-width:920px; }
.edition-links .btn { font-size:14px; }
.persons .name { overflow-wrap:anywhere; }
