/* Bhoomi: an earthy griha pravesh or bhoomi pujan on a mud-plastered wall, in terracotta, khadiya white, haldi,
   kumkum and mango leaf. Gate (press your palm -> kumkum thapa -> leaves, mandana, the name) -> the sun's place at the
   muhurat -> the family's words -> rituals on clay tablets -> the family -> the plot -> ring the bell, reply. */

:root {
  --terra: #b5532e;
  --clay: #d9875a;
  --mud: #8a4b2a;
  --mud-dk: #5a2e18;
  --soil: #3b2416;
  --khadiya: #f7efe2;
  --khadiya-2: #efe2cc;
  --haldi: #e8a317;
  --kumkum: #c2271d;
  --leaf: #4e7a2c;
  --leaf-dk: #2f5420;
  --ink: #3b2416;
  --ink-soft: #6e4a34;
  --line: rgba(90, 46, 24, .25);

  --f-hand: "Kalam", "Noto Sans Devanagari", cursive;
  --f-body: "Alegreya", Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --fx-music-bg: var(--mud-dk);
  --fx-music-ring: var(--haldi);
  --fx-music-ink: var(--khadiya);
  --fx-bg: var(--khadiya);
}

html { scroll-behavior: smooth; }
html.shut { overflow: hidden; }
body {
  background:
    radial-gradient(circle at 20% 20%, rgba(181, 83, 46, .06) 0 2px, transparent 3px) 0 0 / 22px 22px,
    radial-gradient(circle at 60% 70%, rgba(78, 122, 44, .05) 0 1.5px, transparent 2.5px) 0 0 / 30px 30px,
    var(--khadiya);
  color: var(--ink); font: 400 19px/1.6 var(--f-body);
}
a { color: inherit; }
[lang="hi"] { font-family: var(--f-hand); }

/* =================================================================== GATE */

.gate {
  position: relative; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  padding: 96px 16px 64px; text-align: center; color: var(--khadiya);
  background:
    radial-gradient(60% 40% at 50% 38%, rgba(255, 220, 170, .22), transparent 70%),
    radial-gradient(30% 18% at 18% 76%, rgba(60, 25, 10, .16), transparent 70%),
    radial-gradient(26% 14% at 84% 58%, rgba(255, 220, 170, .1), transparent 70%),
    radial-gradient(40% 20% at 70% 92%, rgba(60, 25, 10, .14), transparent 70%),
    repeating-linear-gradient(97deg, rgba(60, 25, 10, .05) 0 3px, transparent 3px 14px),
    repeating-linear-gradient(8deg, rgba(255, 230, 200, .03) 0 2px, transparent 2px 23px),
    linear-gradient(180deg, #a84b28, var(--terra) 40%, #9c4524);
}
.gate__bandan { position: absolute; top: -2px; left: 50%; translate: -50% 0; width: min(760px, 116vw); z-index: 2; }
.bandan { display: block; width: 100%; height: auto; overflow: visible; }
.bandan__leaf > g { transform-box: fill-box; }
html.js .gate:not(.is-done) .bandan__leaf { opacity: 0; translate: 0 -30px; }
.bandan__leaf { transition: opacity .4s ease calc(var(--i) * 70ms), translate .6s cubic-bezier(.3, 1.6, .5, 1) calc(var(--i) * 70ms); }
.mandana { position: absolute; left: 0; width: 100%; height: 30px; }
.mandana--top { top: 74px; }
.mandana--bottom { bottom: 18px; }
.mandana__ln { fill: none; stroke: var(--khadiya); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; vector-effect: non-scaling-stroke; }
.mandana__dots circle { fill: var(--haldi); }
html.js .gate:not(.is-done) .gate > .mandana .mandana__ln, html.js .gate:not(.is-done) .mandana .mandana__ln { stroke-dashoffset: 1; }
.gate .mandana__ln { transition: stroke-dashoffset 2.4s cubic-bezier(.6, .1, .3, 1) .3s; }
html.js .gate:not(.is-done) .mandana__dots { opacity: 0; }
.gate .mandana__dots { transition: opacity 1s ease 2s; }

.gate__body { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; transition: translate 1.4s var(--ease) .2s; }
html.js .gate:not(.is-done) .gate__body { translate: 0 min(20svh, 190px); }
.palm__ink { fill: #d81e14; }
.palm--two .palm__ink, .palm--og2 .palm__ink { fill: var(--haldi); }
.gate__kicker { font-size: clamp(20px, 5.6vw, 26px); line-height: 1.3; color: #ffe0b8; }
.prints { position: relative; width: clamp(130px, 38vw, 170px); margin-top: 14px; }
.palmbtn {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; touch-action: none;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  border-radius: 40px; transition: transform .2s;
}
.palmbtn:focus-visible { outline: 3px dashed var(--haldi); outline-offset: 8px; }
.palmbtn.pressing { transform: scale(.97); }
.palm { display: block; width: 100%; height: auto; overflow: visible; }
.palm__dot { animation: dot 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes dot { 50% { scale: 1.8; opacity: .5; } }
.gate:not([data-phase="bare"]) .palm__dot, .ogcard .palm__dot { display: none; }
.gate.is-done .palm__chalk, .ogcard .palm__chalk { opacity: 0; transition: opacity .6s; }
.palm--two { position: absolute; left: 62%; top: 34%; width: 72%; rotate: 16deg; opacity: 0; scale: .9; transition: opacity .6s ease .35s, scale .5s cubic-bezier(.3, 1.6, .5, 1) .35s; }
.palm--two .palm__chalk, .palm--two .palm__dot { display: none; }
.gate.is-done .palm--two { opacity: 1; scale: 1; }
.gate__hint {
  position: absolute; left: 50%; top: calc(100% + 18px); translate: -50% 0; width: min(88vw, 22em);
  display: flex; flex-direction: column; align-items: center; transition: opacity .5s;
}
.gate__hint b { font: 700 clamp(28px, 8vw, 36px)/1.2 var(--f-hand); color: #fff3e0; }
.gate__hint span { font-size: 17px; font-style: italic; color: #ffe0b8; }
.gate:not([data-phase="bare"]) .gate__hint { opacity: 0; pointer-events: none; }

.hero { margin-top: 26px; display: flex; flex-direction: column; align-items: center; }
html.js .gate:not(.is-done) .hero > * { opacity: 0; translate: 0 14px; }
.hero > * { transition: opacity 1s var(--ease), translate 1s var(--ease); }
.gate.is-done .hero > :nth-child(2) { transition-delay: .25s; }
.gate.is-done .hero > :nth-child(n+3) { transition-delay: .5s; }
.hero__lead { max-width: 22em; font-style: italic; font-size: 18px; line-height: 1.45; color: #ffe8cc; text-wrap: balance; }
.hero__lead span { display: block; font-style: normal; font-weight: 700; color: #fff; }
.hero__home { margin: 6px 0 0; font: 700 clamp(46px, 13vw, 82px)/1.05 var(--f-hand); color: #fff8ec; text-shadow: 0 3px 0 rgba(90, 46, 24, .35); text-wrap: balance; }
.hero__hi { font-size: clamp(24px, 6.4vw, 32px); line-height: 1.2; color: var(--haldi); }
.tablet {
  margin-top: 20px; padding: 14px 22px 16px; border-radius: 10px;
  background: linear-gradient(180deg, #e8b48a, var(--clay)); color: var(--soil);
  box-shadow: inset 0 2px 0 rgba(255, 240, 220, .5), inset 0 -3px 0 rgba(90, 46, 24, .3), 0 14px 24px -12px rgba(40, 15, 5, .7);
}
.tablet__date { font-weight: 700; font-size: 17px; letter-spacing: .04em; }
.tablet__time { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-top: 4px; font: 700 clamp(30px, 8.6vw, 40px)/1.1 var(--f-hand); color: var(--kumkum); }
.tablet__time span { font-size: .6em; color: var(--mud-dk); }
.tablet__place { margin-top: 2px; font-size: 16px; color: var(--mud-dk); }
.hero__down { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; margin-top: 18px; font-size: 15px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: #ffe0b8; }
.hero__down::after { content: ""; width: 10px; height: 10px; border-right: 2px solid; border-bottom: 2px solid; rotate: 45deg; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 5px; } }

.gate__skip {
  position: absolute; right: 12px; top: max(12px, env(safe-area-inset-top)); z-index: 8;
  min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: 500 15px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--khadiya); background: rgba(59, 36, 22, .45); border: 1px solid rgba(247, 239, 226, .5);
}
.gate:not([data-phase="bare"]) .gate__skip { opacity: 0; pointer-events: none; transition: opacity .3s; }
.gate.is-done .gate__skip, html:not(.js) .gate__skip, html:not(.js) .gate__hint { display: none; }

/* =================================================================== SECTIONS */

.sec { position: relative; max-width: 640px; margin: 0 auto; padding: 84px 16px; text-align: center; }
.deva-k { font: 700 clamp(26px, 7vw, 34px)/1.3 var(--f-hand); color: var(--terra); }
.sec__title { margin: 2px 0 26px; font: 700 clamp(30px, 8.4vw, 42px)/1.15 var(--f-body); color: var(--mud-dk); text-wrap: balance; }

/* ---------- the sun over the plot ---------- */
.sky { position: relative; width: min(84vw, 340px); aspect-ratio: 2 / 1.12; margin: 0 auto; overflow: hidden; }
.sky__arc { position: absolute; left: 6%; right: 6%; top: 8%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(181, 83, 46, .45); }
.sky__arm { position: absolute; left: 50%; bottom: 8%; width: 0; height: 80%; transform-origin: 50% 100%; rotate: -90deg; transition: rotate 2.6s cubic-bezier(.5, 0, .2, 1) .3s; }
.sky.in .sky__arm, html:not(.js) .sky__arm { rotate: calc(var(--f) * 180deg - 90deg); }
.sky__sun {
  position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle, #fff3c4, var(--haldi) 60%, #e07b1a);
  box-shadow: 0 0 0 8px rgba(232, 163, 23, .25), 0 0 40px 14px rgba(232, 163, 23, .45);
}
.sky__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 9%; background: linear-gradient(180deg, var(--mud), var(--soil)); border-radius: 50% 50% 0 0 / 40% 40% 0 0; }
.sky__l, .sky__r { position: absolute; bottom: 12%; font: 700 14px var(--f-hand); color: var(--ink-soft); }
.sky__l { left: 2%; } .sky__r { right: 2%; }
.muhurat__time { margin-top: 10px; font: 700 clamp(60px, 18vw, 92px)/1 var(--f-hand); color: var(--kumkum); }
.muhurat__when { margin-top: 8px; font-weight: 700; font-size: 20px; color: var(--mud-dk); }
.muhurat__note { margin: 10px auto 0; max-width: 26em; font-style: italic; color: var(--ink-soft); }
.count { display: flex; justify-content: center; gap: clamp(8px, 3vw, 16px); margin-top: 28px; }
.count span {
  display: flex; flex-direction: column; align-items: center; width: 72px; padding: 12px 0 10px; border-radius: 8px;
  background: linear-gradient(180deg, #e8b48a, var(--clay)); color: var(--mud-dk);
  box-shadow: inset 0 2px 0 rgba(255, 240, 220, .5), inset 0 -3px 0 rgba(90, 46, 24, .3), 0 10px 18px -10px rgba(40, 15, 5, .7);
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
}
.count b { font: 700 30px/1.1 var(--f-hand); color: var(--soil); }
.count__done { margin-top: 22px; font: 700 26px var(--f-hand); color: var(--terra); }

/* ---------- the family's words on a leaf ---------- */
.leaf {
  position: relative; padding: 42px clamp(22px, 7vw, 54px); color: var(--khadiya);
  background: radial-gradient(70% 60% at 40% 40%, #6a9a3e, var(--leaf) 60%, var(--leaf-dk));
  border-radius: 6px 120px 6px 120px;
  box-shadow: 0 26px 40px -24px rgba(30, 50, 20, .9), inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.leaf::before { content: ""; position: absolute; left: 12%; right: 12%; top: 50%; height: 1.5px; background: rgba(255, 255, 255, .15); rotate: -18deg; }
.leaf .deva-k { color: #ffe9a8; position: relative; }
.leaf__msg { position: relative; margin-top: 10px; font: italic 500 clamp(22px, 6vw, 27px)/1.45 var(--f-body); }
.leaf__body { position: relative; margin-top: 16px; font-size: 18px; color: #e6f0da; }
.leaf__body strong { color: #fff3c4; }

/* ---------- rituals on clay tablets ---------- */
.tabs { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.clay {
  position: relative; padding: 24px 18px 22px; border-radius: 14px; color: var(--soil);
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .12) 0 4px, transparent 5px) 0 0 / 37px 41px,
    linear-gradient(180deg, #e8b48a, var(--clay));
  box-shadow: inset 0 3px 0 rgba(255, 240, 220, .5), inset 0 -4px 0 rgba(90, 46, 24, .3), 0 16px 26px -16px rgba(40, 15, 5, .8);
}
.clay::before, .clay::after { content: ""; position: absolute; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--mud-dk); box-shadow: inset 0 2px 2px rgba(0, 0, 0, .4); }
.clay::before { left: 14px; } .clay::after { right: 14px; }
.clay__time { font: 700 clamp(30px, 8vw, 38px)/1.05 var(--f-hand); color: var(--kumkum); }
.clay__time small { font-size: .55em; color: var(--mud-dk); }
.clay__hi { margin-top: 6px; font-size: clamp(21px, 5.6vw, 25px); font-weight: 700; color: var(--mud-dk); line-height: 1.3; }
.clay__name { margin: 0; font: 700 21px/1.3 var(--f-body); }
.clay__when { margin-top: 4px; font-size: 16px; color: var(--mud-dk); }
.clay__note { margin-top: 8px; font-style: italic; font-size: 17px; color: #5a1e10; }
.clay__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px;
  border: 1.5px solid var(--mud-dk); border-radius: 999px; background: rgba(255, 245, 230, .35); color: var(--mud-dk);
  font: 700 15px/1 var(--f-body); text-decoration: none; transition: background .2s, transform .2s;
}
.btn:hover { background: rgba(255, 245, 230, .6); }
.btn:active { transform: scale(.96); }
.btn--solid { background: var(--mud-dk); color: var(--khadiya); }
.btn--solid:hover { background: var(--soil); }
.btn--wide { min-height: 52px; padding: 0 28px; margin-top: 22px; font-size: 17px; }

/* ---------- family panel ---------- */
.panel {
  position: relative; padding: 52px clamp(18px, 6vw, 40px); border-radius: 12px; color: var(--khadiya);
  background: linear-gradient(180deg, #a84b28, var(--terra) 50%, #9c4524);
  box-shadow: 0 26px 40px -24px rgba(40, 15, 5, .9);
}
.panel .mandana--panel { position: absolute; left: 0; height: 22px; }
.panel .mandana--panel:first-child { top: 12px; }
.panel .mandana--panel:last-child { bottom: 12px; }
.panel .deva-k { color: #ffe0b8; }
.panel__k { margin-top: 16px; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: #ffd6aa; }
.panel__elders { font-weight: 700; font-size: 20px; line-height: 1.4; }
.panel__hosts { font: 700 clamp(30px, 8vw, 38px)/1.15 var(--f-hand); color: #fff8ec; }
.panel__kids { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1.5px dashed rgba(247, 239, 226, .5); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; }
.panel__kids span { display: block; font-weight: 700; font-size: 19px; }
.panel__kids small { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #ffd6aa; }
.panel__sign { margin-top: 18px; font: 700 24px var(--f-hand); color: var(--haldi); }

/* ---------- the plot ---------- */
.plot {
  position: relative; width: min(80vw, 300px); height: 180px; margin: 0 auto 18px;
  border: 2.5px dashed var(--terra); border-radius: 6px;
  background: radial-gradient(circle at 30% 60%, rgba(138, 75, 42, .12) 0 30%, transparent 31%), linear-gradient(180deg, #e9d3b4, #d9b88f);
}
.plot__stake { position: absolute; width: 10px; height: 10px; background: var(--mud-dk); border-radius: 2px; }
.plot__stake--a { left: -6px; top: -6px; } .plot__stake--b { right: -6px; top: -6px; } .plot__stake--c { left: -6px; bottom: -6px; } .plot__stake--d { right: -6px; bottom: -6px; }
.plot__tree { position: absolute; right: 16%; top: 18%; width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #6a9a3e, var(--leaf-dk)); box-shadow: 0 30px 0 -24px var(--mud-dk); }
.plot__kalash { position: absolute; left: 28%; top: 44%; width: 34px; height: 40px; border-radius: 40% 40% 46% 46% / 30% 30% 60% 60%; background: linear-gradient(90deg, #8a5a18, #f6dc95 40%, #c9922e); }
.plot__kalash::before { content: ""; position: absolute; left: 50%; bottom: 88%; width: 26px; height: 22px; translate: -50% 0; border-radius: 50% 50% 40% 40%; background: radial-gradient(circle at 40% 30%, #a0763a, #5a3a14); }
.plot__kalash::after { content: ""; position: absolute; left: -10px; right: -10px; bottom: 96%; height: 14px; background: radial-gradient(ellipse at 20% 100%, var(--leaf) 0 40%, transparent 42%), radial-gradient(ellipse at 80% 100%, var(--leaf) 0 40%, transparent 42%); }
.plot__line { font-weight: 700; color: var(--mud-dk); }
.plot__addr { color: var(--ink-soft); }

.gallery { columns: 2 160px; column-gap: 10px; }
.gallery img { display: block; width: 100%; margin-bottom: 10px; border-radius: 10px; break-inside: avoid; }

/* ---------- the bell ---------- */
.ghanti { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0 auto; padding: 0 20px 10px; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transform-origin: 50% 0; }
.ghanti__chain { width: 4px; height: 50px; background: repeating-linear-gradient(180deg, #c9922e 0 6px, #7a4f12 6px 8px); }
.ghanti__bell { width: 96px; height: auto; filter: drop-shadow(0 10px 10px rgba(40, 15, 5, .4)); }
.ghanti__clap { transform-box: fill-box; transform-origin: 50% -400%; }
.ghanti.rung { animation: ring 1.4s cubic-bezier(.3, 1.4, .4, 1); }
.ghanti.rung .ghanti__clap { animation: clap 1.4s ease-out; }
@keyframes ring { 12% { rotate: 16deg; } 32% { rotate: -12deg; } 52% { rotate: 7deg; } 72% { rotate: -3deg; } 100% { rotate: 0; } }
@keyframes clap { 12% { rotate: -14deg; } 32% { rotate: 12deg; } 60% { rotate: -5deg; } 100% { rotate: 0; } }
.ghanti:focus-visible { outline: 3px dashed var(--terra); outline-offset: 6px; border-radius: 12px; }
.bell__count { min-height: 1.6em; margin-top: 10px; font-style: italic; color: var(--ink-soft); }
.bell__done { font: 700 clamp(30px, 8vw, 38px)/1.2 var(--f-hand); color: var(--kumkum); animation: rise .9s var(--ease); }
.bell__done small { display: block; font: italic 400 18px/1.4 var(--f-body); color: var(--ink-soft); }
@keyframes rise { from { opacity: 0; translate: 0 14px; } }
.bell__tag { margin-top: 14px; font: 700 22px var(--f-hand); color: var(--terra); }

/* =================================================================== FOOTER */

.foot { position: relative; padding: 66px 16px calc(44px + env(safe-area-inset-bottom)); text-align: center; background: linear-gradient(180deg, var(--mud-dk), var(--soil)); color: #f1dcc4; }
.foot .mandana--foot { top: 14px; height: 24px; }
.foot__home { font: 700 clamp(32px, 9vw, 44px)/1.1 var(--f-hand); color: #fff3e0; }
.foot__date { margin-top: 6px; letter-spacing: .2em; color: var(--haldi); }
.foot__cal { margin-top: 16px; }
.foot__music { margin-top: 18px; font-size: 15px; font-style: italic; color: rgba(241, 220, 196, .7); }
.foot__credit { margin-top: 8px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: rgba(241, 220, 196, .7); }
.foot a { color: inherit; text-underline-offset: 3px; }
.foot__up { display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px; font-size: 14px; letter-spacing: .18em; text-transform: uppercase; }

@media (min-width: 900px) { .sec { padding: 110px 16px; } }

/* =================================================================== OG CARD */

html.og .ogcard {
  align-items: center; gap: 40px; padding: 120px 70px 30px 80px; color: var(--khadiya);
  background:
    radial-gradient(50% 60% at 30% 60%, rgba(255, 220, 170, .2), transparent 70%),
    repeating-linear-gradient(97deg, rgba(60, 25, 10, .05) 0 3px, transparent 3px 14px),
    linear-gradient(180deg, #a84b28, var(--terra) 40%, #9c4524);
}
.og__bandan { position: absolute; top: -4px; left: 0; right: 0; }
.og__prints { position: relative; flex: 0 0 360px; height: 420px; }
.palm--og { position: absolute; left: 10px; top: 0; width: 220px; }
.palm--og2 { left: 150px; top: 120px; width: 170px; rotate: 16deg; }
.og__text { flex: 1; text-align: center; }
.og__kicker { font-size: 34px; color: #ffe0b8; }
.og__home { margin-top: 2px; font: 700 110px/1 var(--f-hand); color: #fff8ec; text-shadow: 0 4px 0 rgba(90, 46, 24, .35); }
.og__fam { margin-top: 8px; font: italic 500 32px var(--f-body); color: #ffe8cc; }
.og__date { margin-top: 14px; font-size: 30px; font-weight: 700; }
.og__time { margin: 16px auto 0; width: fit-content; padding: 8px 26px; border-radius: 10px; background: linear-gradient(180deg, #e8b48a, var(--clay)); color: var(--kumkum); font: 700 42px/1.1 var(--f-hand); }
.og__time span { font-size: .6em; color: var(--mud-dk); }

@media (prefers-reduced-motion: reduce) {
  .gate .hero > * { opacity: 1 !important; translate: none !important; }
  .bandan__leaf { opacity: 1 !important; translate: none !important; }
}
.ogcard .palm__ink { r: 80px; }
