/* Kheer: an annaprashan with a Bengali "mukhe bhaat" heart. White handloom with a laal-paar red border,
   kantha running-stitch lotuses in alta red and indigo, a banana leaf, a silver bati of payesh. Opening: stir
   the payesh twice round, and the spoon lifts the first bite. Then: a note -> the little one -> the choosing
   tray -> the date under rice paste -> the day -> the family -> reply. */

:root {
  --white: #fbfaf6;
  --cloth: #f5f0e4;
  --laal: #b5121b;
  --laal-2: #7f0c14;
  --indigo: #2b3a7a;
  --leaf: #3c8034;
  --kansa: #c9973e;
  --payesh: #f1dcae;
  --ink: #2a1d1a;
  --ink-2: #5e4c46;

  --f-display: "Tiro Bangla", "Tiro Devanagari Hindi", Georgia, serif;
  --f-body: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --f-script: "Tiro Bangla", "Tiro Devanagari Hindi", "Tiro Telugu", serif;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --weave: repeating-linear-gradient(0deg, rgba(120, 90, 60, .045) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, rgba(120, 90, 60, .04) 0 1px, transparent 1px 5px);

  --fx-music-bg: #b5121b;
  --fx-music-ring: #c9973e;
  --fx-music-ink: #fbfaf6;
  --fx-bg: #fbfaf6;
}

html { scroll-behavior: smooth; }
html.shut, html.shut body { overflow: hidden; }
body { background: var(--weave), var(--white); color: var(--ink); font: 400 18px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
::selection { background: var(--laal); color: var(--white); }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 4px; }
.script { font-family: var(--f-script); font-style: normal; text-transform: none; letter-spacing: 0; }
.fit { display: inline-block; white-space: nowrap; }

/* the laal paar: a red border with a row of temple triangles between gold lines */
.paar {
  height: 46px;
  background:
    linear-gradient(180deg, transparent 0 7px, var(--kansa) 7px 9px, transparent 9px 37px, var(--kansa) 37px 39px, transparent 39px),
    conic-gradient(from -45deg at 50% 100%, var(--white) 0 90deg, transparent 0) 0 13px / 22px 11px repeat-x,
    conic-gradient(from 135deg at 50% 0, var(--white) 0 90deg, transparent 0) 11px 23px / 22px 11px repeat-x,
    var(--laal);
}

.wrap { width: min(100% - 40px, 580px); margin: 0 auto; text-align: center; }
.sec { position: relative; padding: clamp(72px, 14vw, 120px) 0; }
.kicker { font: 600 12px/1.4 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--laal); }
.kicker .script { font-size: 17px; }
.sec__title { margin: 12px 0 0; font: italic 400 clamp(38px, 10.5vw, 62px)/1.08 var(--f-display); color: var(--laal-2); text-wrap: balance; }
.sec__title--sm { font-size: clamp(32px, 8.6vw, 48px); }
.lede { margin-top: 18px; font-size: 19px; line-height: 1.65; text-wrap: pretty; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--laal); border-radius: 4px; background: transparent; color: var(--laal);
  font: 600 14px/1 var(--f-body); letter-spacing: .04em; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: rgba(181, 18, 27, .07); }
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--laal); color: var(--white); }
.btn--solid:hover { background: var(--laal-2); }
.btn--big { min-height: 56px; padding: 0 26px; font-size: 16px; }

/* =================================================================== OPENING */
.gate { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; background: var(--weave), var(--cloth); }
.gate > .paar { position: absolute; left: 0; right: 0; z-index: 1; }
.paar--top { top: 0; }
.paar--bottom { bottom: 0; transform: scaleY(-1); }
.motif { position: absolute; z-index: -1; width: 170px; height: 170px; opacity: .5; }
.motif--a { left: -60px; top: 70px; }
.motif--b { right: -56px; top: 38%; width: 140px; height: 140px; }
.motif--c { left: -30px; bottom: 54px; width: 120px; height: 120px; }
@media (min-width: 720px) { .motif { opacity: .75; } .motif--a { left: 6%; } .motif--b { right: 6%; } .motif--c { left: 12%; } }

.gate__col {
  position: relative; z-index: 2; width: min(100%, 460px); min-height: 100svh; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: calc(104px + env(safe-area-inset-top)) 18px calc(56px + env(safe-area-inset-bottom));
}
.gate__head { width: 100%; min-height: 176px; display: flex; flex-direction: column; align-items: center; }
.gate__to { margin-bottom: 4px; font: italic 400 15px/1.3 var(--f-body); color: var(--ink-2); }
.gate__kicker { font: 600 12px/1.4 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--laal); }
.gate__kicker .script { font-size: 17px; }
.swap { display: grid; width: 100%; flex: 1; }
.swap > * { grid-area: 1 / 1; align-self: center; transition: opacity .7s var(--ease), translate .8s var(--ease), visibility 0s; }
.gate__line { font: italic 400 clamp(36px, 10vw, 46px)/1.05 var(--f-display); color: var(--laal-2); }
.gate__sub { margin: 8px auto 0; max-width: 30ch; font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.gate[data-phase="open"] .say, .gate:not([data-phase="open"]) .hero { opacity: 0; translate: 0 10px; visibility: hidden; transition: opacity .5s, translate .5s, visibility 0s .5s; }
.hero__name { margin: 0; width: 100%; font: italic 400 clamp(60px, 18vw, 92px)/1 var(--f-display); color: var(--laal); }
.hero__hi { font-size: clamp(28px, 8vw, 38px); line-height: 1.3; color: var(--laal-2); }
.hero__line { margin-top: 2px; font: italic 400 18px/1.35 var(--f-display); color: var(--ink-2); }
.hero__when { margin-top: 4px; font: 600 14px/1.3 var(--f-body); letter-spacing: .06em; color: var(--indigo); }

.scene { position: relative; width: min(92vw, 400px, calc((100svh - 390px) * .9)); min-width: 260px; aspect-ratio: 360 / 400; margin-top: 6px; }
.leaf { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 14px 16px rgba(40, 30, 10, .22)); }
.payesh { transition: none; }
.spoon { transition: none; }
.stir__ring { transition: stroke-dasharray .2s; }
.gate[data-phase="open"] .stir__ring { opacity: 0; transition: opacity .6s; }
.stir {
  position: absolute; left: 21%; top: 32%; width: 58%; height: 52%; padding: 0; border: 0; border-radius: 50%;
  background: none; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent;
}
.stir:active { cursor: grabbing; }
.stir::after {
  content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 2px dashed rgba(181, 18, 27, .55);
  opacity: 0; pointer-events: none;
}
.gate[data-phase="idle"] .stir::after { animation: swirl 3s ease-in-out 1.2s infinite; }
@keyframes swirl { 0% { opacity: 0; rotate: 0deg; scale: .9; } 30% { opacity: 1; } 70% { opacity: .8; } 100% { opacity: 0; rotate: 300deg; scale: 1.05; } }
.gate:not([data-phase="idle"]):not([data-phase="stirring"]) .stir { pointer-events: none; }

.gate__foot { align-self: stretch; margin-top: auto; padding: 8px 72px 0; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gate__hint { font: italic 400 19px/1.3 var(--f-display); color: var(--laal-2); min-height: 1.3em; }
.gate__down { display: none; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; padding: 6px 16px; color: var(--laal); font: 600 12px/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; text-decoration: none; }
.gate__down span { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 0 5px; } }
.gate[data-phase="open"] .gate__down { display: flex; }
.gate[data-phase="open"] .gate__hint { display: none; }
.gate__skip {
  position: absolute; z-index: 5; right: 10px; top: calc(54px + env(safe-area-inset-top));
  min-width: 64px; min-height: 44px; padding: 0 14px; border-radius: 4px; cursor: pointer;
  border: 1.5px solid var(--laal); background: var(--white); color: var(--laal); font: 600 12px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase;
}
html:not(.shut) .gate__skip { display: none; }

/* =================================================================== NOTE */
.sec--hello { background: var(--weave), var(--white); }
.motif--inline { position: static; display: block; width: 84px; height: 84px; margin: 0 auto 16px; opacity: 1; }
.hello__sign { margin-top: 20px; font: italic 400 24px/1.3 var(--f-display); color: var(--laal); }

/* =================================================================== THE LITTLE ONE */
.sec--card { background: var(--laal); background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .09) 1.4px, transparent 1.8px); background-size: 16px 16px; }
.card {
  position: relative; padding: 48px 22px 34px; background: var(--weave), var(--white);
  box-shadow: 0 0 0 10px var(--white), 0 0 0 12px var(--kansa), 0 30px 50px -20px rgba(60, 0, 0, .55);
}
.card::before, .card::after { content: ""; position: absolute; left: 0; right: 0; height: 14px; background: conic-gradient(from -45deg at 50% 100%, var(--laal) 0 90deg, transparent 0) 0 0 / 18px 14px repeat-x; }
.card::before { top: 0; }
.card::after { bottom: 0; transform: scaleY(-1); }
.card__photo { display: block; width: 150px; height: 150px; margin: 0 auto 16px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--kansa); }
.card__name { margin-top: 6px; font: italic 400 clamp(60px, 18vw, 100px)/1.05 var(--f-display); color: var(--laal); }
.card__hi { font-size: clamp(34px, 9vw, 48px); line-height: 1.25; color: var(--laal-2); }
.card__meaning { margin-top: 8px; font: italic 400 22px/1.4 var(--f-display); color: var(--ink-2); }
.card__born { margin-top: 12px; font: 600 13px/1.3 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--indigo); }
.card__parents { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--laal); font-weight: 500; }

/* =================================================================== THE CHOOSING */
.sec--choose { background: var(--weave), var(--cloth); }
.choose__lede { margin: 14px auto 0; max-width: 34ch; color: var(--ink-2); }
.tray { position: relative; margin-top: 30px; }
.tray__things {
  list-style: none; margin: 0 auto; padding: 0; position: relative; width: min(100%, 340px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #f6dd8e 0 8%, #e2b65a 30%, #c9973e 58%, #a77722 66%, #f1d48a 69%, #c9973e 72%, #8a5f16 100%);
  box-shadow: 0 20px 40px -18px rgba(80, 50, 0, .6), inset 0 0 0 8px rgba(255, 240, 200, .35);
}
.thing { position: absolute; width: 38%; display: flex; flex-direction: column; align-items: center; gap: 4px; translate: -50% -50%; transition: transform .25s var(--ease), filter .25s; }
.thing--book { left: 50%; top: 24%; }
.thing--pen { left: 76%; top: 52%; }
.thing--earth { left: 50%; top: 78%; }
.thing--gold { left: 24%; top: 52%; }
.thing__art { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--white); box-shadow: 0 6px 12px -6px rgba(60, 30, 0, .6); transition: box-shadow .25s, transform .25s; }
.thing__art svg { width: 52px; height: 52px; }
.thing__name { position: relative; z-index: 1; padding: 2px 8px; border-radius: 4px; background: rgba(251, 250, 246, .92); font: 600 12px/1.3 var(--f-body); color: var(--laal-2); white-space: nowrap; }
.thing.glow .thing__art { box-shadow: 0 0 0 4px var(--laal), 0 0 22px 4px rgba(255, 240, 180, .9); transform: scale(1.08); }
.thing.picked .thing__art { box-shadow: 0 0 0 5px var(--laal), 0 0 30px 8px rgba(255, 240, 180, 1); transform: scale(1.18); }
.tray__go { margin-top: 24px; min-height: 52px; padding: 0 26px; border: 0; border-radius: 4px; background: var(--indigo); color: var(--white); font: 600 16px/1 var(--f-body); cursor: pointer; }
.tray__go:disabled { opacity: .6; cursor: default; }
.tray__fate { min-height: 3em; margin-top: 16px; font: italic 400 22px/1.4 var(--f-display); color: var(--laal-2); }

/* =================================================================== DATE */
.sec--date { background: var(--leaf); background-image: linear-gradient(100deg, rgba(0, 0, 0, .12), transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%, rgba(0, 0, 0, .14)); color: var(--white); }
.sec--date .kicker { color: #f6dd8e; }
.sec--date .scratch { width: min(100%, 320px); height: 170px; margin: 24px auto 0; color: var(--laal); }
.sd { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: inherit; background: var(--weave), var(--white); box-shadow: inset 0 0 0 3px var(--laal), inset 0 0 0 7px var(--white), inset 0 0 0 8px var(--kansa); }
.sd__wd { font: 600 12px/1.3 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--indigo); }
.sd__day { font: italic 400 46px/1.1 var(--f-display); }
.sd__yr { font: 500 16px/1.3 var(--f-body); color: var(--ink-2); }
.scratch__hint { margin-top: 24px; font: italic 400 18px/1.3 var(--f-display); color: rgba(251, 250, 246, .85); }
.sec--date.revealed .scratch__hint { visibility: hidden; }
.sec--date .count { display: flex; justify-content: center; gap: clamp(8px, 4vw, 22px); margin-top: 18px; }
.sec--date .count span { min-width: 64px; font: 600 11px/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: rgba(251, 250, 246, .8); }
.sec--date .count b { font: italic 400 40px/1.1 var(--f-display); color: var(--white); letter-spacing: 0; }
.count__done { margin-top: 22px; font: italic 400 24px/1.3 var(--f-display); }

/* =================================================================== EVENTS */
.sec--events { background: var(--weave), var(--white); }
.ev {
  position: relative; margin-top: 30px; padding: 36px 22px 28px; background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(181, 18, 27, .25), 0 22px 40px -30px rgba(80, 10, 10, .7);
  transition-delay: calc(var(--i) * .08s);
}
.ev::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18px; background: linear-gradient(180deg, var(--laal) 0 10px, var(--white) 10px 12px, var(--kansa) 12px 14px, transparent 14px); }
.ev__hi { font-size: 24px; line-height: 1.3; color: var(--laal); }
.ev__name { margin: 0; font: italic 400 clamp(34px, 9vw, 44px)/1.1 var(--f-display); color: var(--laal-2); }
.ev__when { margin-top: 10px; font-weight: 600; }
.ev__where { margin-top: 6px; color: var(--ink-2); }
.ev__where strong { color: var(--ink); font-weight: 600; }
.ev__note { margin-top: 10px; font: italic 400 19px/1.45 var(--f-display); color: var(--ink-2); }
.ev__dress { margin-top: 8px; font-weight: 600; color: var(--indigo); }
.ev__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }

/* =================================================================== FAMILY */
.sec--family { background: var(--weave), var(--cloth); }
.family__elders { margin-top: 14px; font: italic 400 clamp(24px, 6.6vw, 32px)/1.35 var(--f-display); color: var(--laal-2); text-wrap: balance; }
.family__list { list-style: none; margin: 28px auto 0; padding: 0; max-width: 420px; }
.family__list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 2px; border-bottom: 1px dashed rgba(181, 18, 27, .4); text-align: right; }
.family__list span { font: 600 12px/1.3 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--laal); text-align: left; }
.family__list b { font-weight: 500; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* =================================================================== RSVP + FOOT */
.sec--rsvp { background: var(--weave), var(--white); }
.rsvp__btns { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 26px; }
.rsvp__tag { margin-top: 20px; font-weight: 600; color: var(--laal); }
.foot { position: relative; padding: 0 20px calc(96px + env(safe-area-inset-bottom)); text-align: center; background: var(--laal-2); color: rgba(251, 250, 246, .86); }
.foot .paar { margin: 0 -20px 46px; }
.foot__name { font: italic 400 clamp(52px, 15vw, 76px)/1.05 var(--f-display); color: var(--white); }
.foot__line { margin-top: 6px; }
.foot__cal { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.foot__music, .foot__credit { margin-top: 12px; font-size: 14px; color: rgba(251, 250, 246, .7); }
.foot__music { margin-top: 24px; }
.foot__up { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font: 600 12px/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: #f6dd8e; text-decoration: none; }

/* =================================================================== LINK-PREVIEW CARD */
.ogcard { background: var(--weave), var(--cloth); font-family: var(--f-body); }
.ogcard .paar { position: absolute; left: 0; right: 0; height: 56px; }
.og__text { position: absolute; left: 70px; top: 70px; bottom: 70px; width: 640px; display: flex; flex-direction: column; justify-content: center; }
.og__kicker { font: 600 24px/1.3 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--laal); }
.og__kicker .script { font-size: 32px; }
.og__name { width: 100%; font: italic 400 150px/1.05 var(--f-display); color: var(--laal); }
.og__line { font: italic 400 34px/1.2 var(--f-display); color: var(--ink-2); }
.og__date { margin-top: 20px; font: 600 32px/1.2 var(--f-body); color: var(--indigo); }
.og__venue { margin-top: 6px; font: 400 24px/1.3 var(--f-body); color: var(--ink-2); }
.og__art { position: absolute; right: 60px; top: 66px; width: 446px; height: 496px; }

@media (min-width: 720px) { .rsvp__btns { flex-direction: row; justify-content: center; } }
