/* Pichwai: a Nathdwara cloth painting. Deep pond teal, lotus pink, gold dots, cream.
   Sections are "hung cloths": a maroon band of gold dots (border-image) on a gold rod. */
:root {
  --pond: #12343b; --deep: #0a2126; --water: #0c2a31; --cream: #f4ead2; --gold: #d9b44a; --pink: #e58aa5;
  --maroon: #6e1f2f; --leaf: #2f6b4f; --ink: #17323a; --rose: #8a2a3c;
  --f-display: "Fraunces", Georgia, serif; --f-text: "Mukta", system-ui, sans-serif; --f-deva: "Yatra One", "Mukta", serif;
  --waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='28'%3E%3Cpath d='M0 8c10-7 18-7 28 0s18 7 28 0 18-7 28 0M-14 22c10-7 18-7 28 0s18 7 28 0 18-7 28 0 18 7 28 0' fill='none' stroke='%2386b88a' stroke-opacity='.11'/%3E%3C/svg%3E");
  --dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Crect width='36' height='36' fill='%236e1f2f'/%3E%3Cpath d='M0 .5h36M0 35.5h36M.5 0v36M35.5 0v36' stroke='%23d9b44a' stroke-opacity='.7'/%3E%3Cg fill='%23d9b44a'%3E%3Ccircle cx='6' cy='6' r='2.1'/%3E%3Ccircle cx='18' cy='6' r='2.1'/%3E%3Ccircle cx='30' cy='6' r='2.1'/%3E%3Ccircle cx='6' cy='18' r='2.1'/%3E%3Ccircle cx='30' cy='18' r='2.1'/%3E%3Ccircle cx='6' cy='30' r='2.1'/%3E%3Ccircle cx='18' cy='30' r='2.1'/%3E%3Ccircle cx='30' cy='30' r='2.1'/%3E%3C/g%3E%3C/svg%3E");
  --fx-music-bg: #6e1f2f; --fx-music-ring: #d9b44a; --fx-music-ink: #f4ead2; --fx-bg: #f4ead2;
}
html { background: var(--deep); scroll-behavior: smooth; }
html.shut, html.shut body { overflow: hidden; height: 100%; }
body {
  background: var(--waves), linear-gradient(#0a2126, #0d2a31 40%, #0a2126); color: var(--cream);
  font: 400 17px/1.55 var(--f-text); -webkit-font-smoothing: antialiased;
}
.pw-defs { position: absolute; }
[lang="hi"] { font-family: var(--f-deva); }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- the gate: a dark pond of buds ---------- */
.gate {
  display: none; position: fixed; inset: 0; z-index: 60; flex-direction: column; align-items: center; overflow: hidden;
  padding: calc(58px + env(safe-area-inset-top)) 0 calc(18px + env(safe-area-inset-bottom));
  background: var(--waves), radial-gradient(120% 70% at 50% 0, #1d4d55, #12343b 46%, #0a2126);
  text-align: center; transition: opacity .9s ease, transform 1.1s ease;
}
html.shut .gate, .gate.leaving { display: flex; }
.gate.leaving { opacity: 0; transform: scale(1.07); pointer-events: none; }
.gate::before {   /* the gold-dotted edge of the cloth */
  content: ""; position: absolute; inset: 0; border: 12px solid var(--maroon); border-image: var(--dots) 12 round; pointer-events: none; z-index: 3;
}
.gate::after { content: ""; position: absolute; inset: 0; border: 12px solid var(--maroon); pointer-events: none; z-index: 2; }
.gate__moon {
  flex: none; width: 62px; height: 62px; border-radius: 50%; background: radial-gradient(circle at 40% 36%, #fffaf0, #f4ead2 60%, #e3d3ae);
  box-shadow: 0 0 0 7px rgba(244, 234, 210, .08), 0 0 46px rgba(244, 234, 210, .4); outline: 2px dotted rgba(217, 180, 74, .7); outline-offset: 12px;
  transition: box-shadow 1.2s ease;
}
.gate.bloom .gate__moon { box-shadow: 0 0 0 10px rgba(244, 234, 210, .14), 0 0 90px 20px rgba(244, 234, 210, .55); }
.gate__head { flex: none; margin-top: 26px; padding: 0 30px; }
.gate__to { font-size: 19px; color: var(--pink); margin-bottom: 2px; }
.gate__deva { font-size: 30px; line-height: 1.3; color: var(--gold); }
.gate__line { font: italic 400 19px/1.3 var(--f-display); margin-top: 2px; }
.gate__count { margin-top: 8px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: rgba(244, 234, 210, .72); }
.gate__skip {
  position: absolute; z-index: 4; top: calc(22px + env(safe-area-inset-top)); right: 22px; min-width: 64px; min-height: 44px; padding: 0 16px;
  border: 1px solid rgba(217, 180, 74, .6); border-radius: 999px; background: rgba(10, 33, 38, .6); color: var(--cream);
  font-size: 14px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
}
.gate.bloom .gate__skip { opacity: 0; pointer-events: none; transition: opacity .4s; }
.pond { position: relative; flex: 1; width: 100%; max-width: 520px; margin-top: 10px; }
.pond__decor { position: absolute; inset: 0; }
.pad { position: absolute; left: var(--x); top: var(--y); width: calc(46px * var(--s)); translate: -50% -50%; opacity: .5; transform: scaleY(.62); }
.bud { position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; display: block; }
.bud--decor { width: 54px; opacity: .72; transition: opacity .8s ease var(--d, 0ms); }
.gate.bloom .bud--decor { opacity: 1; }
.bud--tap {
  width: 104px; padding: 12px 4px 4px; border: 0; background: none; cursor: pointer; border-radius: 50%;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; animation: pwBob 4.6s ease-in-out infinite;
}
.bud--tap:nth-of-type(2n) { animation-delay: -1.7s; }
.bud--tap:nth-of-type(3n) { animation-delay: -3.1s; }
.bl { display: block; width: 100%; overflow: visible; }
.bl .pt { fill: var(--pink); stroke: #8e2f52; stroke-width: .9; transform: rotate(calc(var(--a) * .1)) scale(.66, .86); transition: transform .95s cubic-bezier(.3, 1.35, .5, 1); }
.bl .pt--b { fill: #c9668a; transition-delay: .08s; }
.bl--w .pt { fill: #fbf3e6; stroke: #a8707f; }
.bl--w .pt--b { fill: #ead9c4; }
.bud.open .pt, .gate.bloom .bud--decor .pt { transform: rotate(var(--a)); }
.gate.bloom .bud--decor .pt { transition-delay: var(--d, 0ms); }
.bud__ring {
  position: absolute; left: 50%; top: 46%; width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 50%;
  border: 2px dotted rgba(217, 180, 74, .85); animation: pwRing 2.4s ease-in-out infinite; transition: opacity .4s;
}
.bud.open .bud__ring { opacity: 0; animation: none; }
.bud__rip, .bud__rip::after {
  position: absolute; left: 50%; bottom: 6px; width: 92px; height: 26px; margin-left: -46px; border-radius: 50%;
  border: 1.5px solid rgba(244, 234, 210, .7); opacity: 0; pointer-events: none;
}
.bud__rip::after { content: ""; inset: 0; left: 0; bottom: 0; margin: -1.5px; width: auto; height: auto; }
.bud.open .bud__rip { animation: pwRip 1.5s ease-out both; }
.bud.open .bud__rip::after { animation: pwRip 1.5s ease-out .28s both; }
@keyframes pwRip { 0% { opacity: .9; transform: scale(.35); } 100% { opacity: 0; transform: scale(2.3); } }
@keyframes pwRing { 0%, 100% { transform: scale(.9); opacity: .45; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes pwBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ---------- hung cloths ---------- */
main { padding: 0 14px; }
.cloth {
  position: relative; max-width: 560px; margin: 64px auto 0; border: 12px solid var(--maroon); border-image: var(--dots) 12 round; background: var(--maroon);
  box-shadow: 0 22px 40px -18px rgba(0, 0, 0, .7);
}
.cloth::before {   /* the rod */
  content: ""; position: absolute; left: -18px; right: -18px; top: -34px; height: 8px; border-radius: 4px;
  background: linear-gradient(#f3d98a, #d9b44a 45%, #8f6d1e); box-shadow: 0 3px 6px rgba(0, 0, 0, .45);
}
.cloth::after {   /* its two cords */
  content: ""; position: absolute; left: 16%; right: 16%; top: -27px; height: 15px; border: solid var(--gold); border-width: 0 2px; opacity: .85;
}
.cloth__in { position: relative; overflow: hidden; padding: 34px 20px 36px; background: var(--pond); border: 1px solid rgba(217, 180, 74, .8); text-align: center; }
.cloth--cream .cloth__in { background: var(--cream); color: var(--ink); }
.cloth--hero { margin-top: 48px; }

.deva { font-size: 22px; line-height: 1.4; color: var(--gold); }
.cloth--cream .deva { color: var(--rose); }
.title { font: 500 30px/1.15 var(--f-display); letter-spacing: -.01em; margin-top: 2px; }
.label { font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.crest { display: block; width: 104px; margin: -6px auto 8px; }
.lrow { display: block; }
.lrow--foot { width: calc(100% + 40px); height: 54px; margin: 30px -20px -36px; background: var(--water); border-top: 2px dotted rgba(217, 180, 74, .8); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid currentColor; color: var(--gold); font: 600 14px/1 var(--f-text); letter-spacing: .04em; text-decoration: none;
}
.btn--solid { background: var(--gold); border-color: var(--gold); color: var(--deep); }
.cloth--cream .btn { color: var(--rose); }
.cloth--cream .btn--solid { background: var(--rose); border-color: var(--rose); color: var(--cream); }
.btn--big { min-height: 52px; padding: 0 28px; font-size: 16px; }

/* ---------- hero ---------- */
.hero {
  padding: 30px 16px 0; background: radial-gradient(110% 60% at 50% 0, #1d4d55, #12343b 60%);
}
.hero::before, .date::before {   /* stars, only up beside the moon */
  content: ""; position: absolute; inset: 0 0 auto; height: 150px; pointer-events: none;
  background:
    radial-gradient(circle, #d9b44a 1px, transparent 1.6px) 14px 12px / 74px 52px,
    radial-gradient(circle, rgba(244, 234, 210, .8) .8px, transparent 1.4px) 48px 34px / 92px 44px;
  -webkit-mask: radial-gradient(circle at 50% 56px, transparent 60px, #000 61px), linear-gradient(#000 60%, transparent); -webkit-mask-composite: source-in;
  mask: radial-gradient(circle at 50% 56px, transparent 60px, #000 61px), linear-gradient(#000 60%, transparent); mask-composite: intersect;
}
.date::before { -webkit-mask: linear-gradient(#000 20%, transparent); mask: linear-gradient(#000 20%, transparent); height: 110px; }
.hero > *, .date > * { position: relative; }
.hero__moon {
  width: 54px; height: 54px; margin: 0 auto 22px; border-radius: 50%; background: radial-gradient(circle at 40% 36%, #fffaf0, #f4ead2 60%, #e3d3ae);
  box-shadow: 0 0 0 6px rgba(244, 234, 210, .08), 0 0 40px rgba(244, 234, 210, .4); outline: 2px dotted rgba(217, 180, 74, .7); outline-offset: 10px;
}
.hero__om { font-size: 21px; color: var(--gold); }
.hero__to { font-size: 19px; color: var(--pink); margin-top: 6px; }
.hero__lead { margin-top: 8px; font: italic 400 17px/1.4 var(--f-display); color: rgba(244, 234, 210, .9); }
.hero__names { margin-top: 14px; font: 500 clamp(33px, 10.4vw, 52px)/1.04 var(--f-display); letter-spacing: -.015em; overflow-wrap: break-word; }
.hero__names span { display: block; }
.hero__names em { display: block; font-size: .62em; line-height: 1.25; color: var(--pink); font-weight: 400; }
.hero__hi { margin-top: 10px; font-size: 25px; line-height: 1.4; color: var(--gold); }
.hero__date { margin-top: 12px; font-size: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.hero__venue { margin-top: 2px; font-size: 16px; color: rgba(244, 234, 210, .82); }
.scene { display: block; width: calc(100% + 32px); margin: 14px -16px 0; }
html.js:not(.shut) .hero > :not(.scene) { animation: pwUp 1s cubic-bezier(.22, 1, .36, 1) both; }
html.js:not(.shut) .hero > :nth-child(n+4) { animation-delay: .15s; }
html.js:not(.shut) .hero > :nth-child(n+6) { animation-delay: .3s; }
@keyframes pwUp { from { opacity: 0; translate: 0 18px; } }

/* ---------- date ---------- */
.moon {
  display: flex; flex-direction: column; align-items: center; justify-content: center; width: 212px; height: 212px; margin: 34px auto 34px;
  border-radius: 50%; background: radial-gradient(circle at 38% 32%, #fffaf0, #f4ead2 58%, #e0cfa6); color: var(--ink);
  box-shadow: 0 0 0 8px rgba(244, 234, 210, .08), 0 0 70px rgba(244, 234, 210, .32); outline: 2px dotted rgba(217, 180, 74, .8); outline-offset: 14px;
}
.moon__wd { font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--rose); }
.moon__day { font: 500 84px/.95 var(--f-display); letter-spacing: -.03em; }
.moon__my { font: italic 400 19px/1.2 var(--f-display); }
.moon__time { margin-top: 4px; font-size: 14px; font-weight: 600; letter-spacing: .1em; }
.count { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.count span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; width: 66px; height: 66px; border-radius: 50%;
  background: repeating-conic-gradient(from 8deg, #1d4f45 0 22.5deg, #225a4e 22.5deg 45deg); border: 1px solid #86b88a;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(244, 234, 210, .85); line-height: 1.2;
}
.count b { font: 500 25px/1 var(--f-display); color: var(--cream); letter-spacing: 0; }
.count__done { margin-top: 12px; font: italic 400 20px var(--f-display); color: var(--pink); }

/* ---------- the invitation + cow bells ---------- */
.letter p { max-width: 30em; margin: 14px auto 0; }
.letter .deva { margin-top: 0; }
.letter__msg { font: italic 400 20px/1.5 var(--f-display); white-space: pre-line; }
.bells {
  display: flex; justify-content: center; align-items: flex-end; gap: 4%; margin: 28px -20px 0; padding: 18px 12px 8px;
  background: var(--waves), var(--pond); border: dotted rgba(217, 180, 74, .9); border-width: 2px 0;
}
.cow { width: 44%; max-width: 190px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.cow svg { display: block; width: 100%; transform-origin: 30% 100%; }
.cow--flip { transform: scaleX(-1); }
.cow.ring svg { animation: pwNod .8s ease-in-out; }
.cow.rung { filter: drop-shadow(0 0 10px rgba(217, 180, 74, .55)); }
@keyframes pwNod { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(3.5deg); } 55% { transform: rotate(-2deg); } 80% { transform: rotate(1.2deg); } }
.letter .bells__hint { margin-top: 12px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--rose); }
.letter .bells__done { margin-top: 12px; font-size: 24px; line-height: 1.3; color: var(--rose); }
.bells__done small { display: block; font: italic 400 17px/1.4 var(--f-display); color: var(--ink); }

/* ---------- families ---------- */
.fams__grid { display: grid; gap: 0; margin-top: 10px; }
.fam { padding: 22px 0 24px; }
.fam + .fam { border-top: 2px dotted rgba(217, 180, 74, .55); }
.fam__lotus { display: block; width: 62px; margin: 0 auto 6px; }
.fam__side { font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.fam__side span { font-size: 17px; letter-spacing: 0; }
.fam__name { font: 500 29px/1.15 var(--f-display); margin-top: 4px; overflow-wrap: break-word; }
.fam__rel { margin-top: 12px; font: italic 400 16px/1.2 var(--f-display); color: var(--pink); }
.fam__parents { font-size: 18px; line-height: 1.4; }
.fam__kin { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.fam__kin li { line-height: 1.3; }
.fam__kin small { display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: rgba(244, 234, 210, .66); }
.fams__note { margin-top: 6px; padding-top: 16px; border-top: 2px dotted rgba(217, 180, 74, .55); font: italic 400 17px/1.4 var(--f-display); color: rgba(244, 234, 210, .9); }
.fams__note span { font-style: normal; color: var(--gold); font-size: 19px; }

/* ---------- functions ---------- */
.events { margin-top: 60px; }
.events__head { text-align: center; }
.events__grid { display: grid; gap: 0; }
.events .cloth { width: 100%; margin-top: 58px; }
.ev .cloth__in { padding: 26px 18px 26px; height: 100%; }
.ev__lotus { display: block; width: 70px; margin: 0 auto 4px; }
.ev__hi { font-size: 30px; line-height: 1.35; color: var(--rose); }
.ev__name { font: 500 27px/1.15 var(--f-display); }
.ev__hi + .ev__name { font: italic 400 21px/1.2 var(--f-display); }
.ev__when { margin-top: 14px; padding-top: 14px; border-top: 2px dotted rgba(138, 42, 60, .45); font-size: 17px; font-weight: 500; }
.ev__when b { display: block; font: 500 24px/1.2 var(--f-display); color: var(--rose); }
.ev__sched { list-style: none; margin: 8px 0 0; padding: 0; font-size: 16px; }
.ev__sched b { margin-left: 8px; font-weight: 600; }
.ev__where { margin-top: 10px; font-size: 16px; line-height: 1.4; }
.ev__where strong { display: block; font-size: 18px; font-weight: 600; }
.ev__note { margin-top: 12px; font: italic 400 18px/1.45 var(--f-display); }
.ev__dress { margin-top: 10px; font-size: 16px; }
.ev__dress span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--rose); }
.ev__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }

/* ---------- venue, gallery, hashtag, reply ---------- */
.venue__name { margin-top: 16px; font: 500 30px/1.15 var(--f-display); color: var(--cream); overflow-wrap: break-word; }
.venue__addr { margin: 6px 0 20px; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.gallery img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--rose); }
.gallery img:first-child:nth-last-child(odd) { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.tag { margin-top: 48px; text-align: center; }
.tag__text { font: italic 500 clamp(26px, 8vw, 38px)/1.2 var(--f-display); color: var(--pink); overflow-wrap: anywhere; }
.reply { padding: 34px 16px 0; }
.reply__line { max-width: 26em; margin: 14px auto 22px; }
.scene--foot { margin-top: 6px; }

.foot { padding: 46px 20px calc(92px + env(safe-area-inset-bottom)); text-align: center; font-size: 15px; color: rgba(244, 234, 210, .78); }
.foot__names { font: 500 30px/1.2 var(--f-display); color: var(--cream); }
.foot__names em { color: var(--pink); font-weight: 400; }
.foot__date { margin-top: 4px; }
.foot__cal { margin-top: 12px; }
.foot a { color: var(--gold); text-underline-offset: 3px; display: inline-block; padding: 8px 2px; }
.foot__music, .foot__credit { margin-top: 6px; font-size: 14px; }

/* ---------- wider screens: the cloths hang side by side ---------- */
@media (min-width: 720px) {
  .fams__grid { grid-template-columns: 1fr 1fr; }
  .fam + .fam { border-top: 0; border-left: 2px dotted rgba(217, 180, 74, .55); }
  .fam { padding: 22px 18px 24px; }
}
@media (min-width: 900px) {
  .events__grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 44px; max-width: 1080px; margin: 0 auto; }
  .events__grid--one { max-width: 584px; }
  .events .cloth { max-width: none; }
  .cloth--hero { max-width: 600px; }
  .bud--tap { width: 120px; }
  .bud--decor { width: 64px; }
}

/* ---------- link-preview card ---------- */
html.og .ogcard { background: var(--maroon); }
.pwog {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding-top: 34px; text-align: center; color: var(--cream);
  border: 24px solid var(--maroon); border-image: var(--dots) 12 round; background-clip: padding-box;
  background: radial-gradient(110% 80% at 50% 0, #1f525a, #12343b 55%, #0a2126);
}
.pwog__moon { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 40% 36%, #fffaf0, #f4ead2 60%, #e3d3ae); box-shadow: 0 0 60px rgba(244, 234, 210, .5); outline: 3px dotted rgba(217, 180, 74, .8); outline-offset: 10px; }
.pwog__om { margin-top: 20px; font-size: 34px; line-height: 1.3; color: var(--gold); }
.pwog__names { font: 500 120px/1.12 var(--f-display); letter-spacing: -.02em; white-space: nowrap; }
.pwog__names em { color: var(--pink); font-weight: 400; font-size: .7em; }
.pwog__date { margin-top: 2px; font: 600 38px/1.2 var(--f-text); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.pwog__venue { margin-top: 6px; max-width: 660px; font: italic 400 28px/1.2 var(--f-display); }
.pwog__cow { position: absolute; bottom: 74px; width: 236px; }
.pwog__cow--l { left: 26px; }
.pwog__cow--r { right: 26px; transform: scaleX(-1); }
.pwog__row { position: absolute; left: 0; bottom: 0; width: 100%; height: 86px; background: var(--water); border-top: 3px dotted rgba(217, 180, 74, .85); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
