/* Tutari: a Marathi munj in navari-Paithani and kesari-pheta colours.
   Gate (jambhli silk between Paithani borders; hold the tutari to blow, the breath gauge fills, the fanfare
   rings, the pallu parts down the middle) -> the patrika -> nimantran -> muhurt and countdown on parrot green ->
   the vidhi under pheta-saffron bands -> the family -> the pangat: set out leaves, reply -> footer. */

:root {
  --jambhli: #3b1247;
  --jambhli-deep: #230a2b;
  --jambhli-hi: #5c2470;
  --kesari: #f08a1c;
  --kesari-deep: #c4600a;
  --raghu: #2f7d32;
  --raghu-deep: #1c5420;
  --rani: #c2185b;
  --zari: #e2b23c;
  --zari-hi: #fbe39a;
  --zari-lo: #8a5c12;
  --ivory: #fff8ec;
  --ink: #2a1030;
  --ink-soft: #5e4466;

  --f-display: "Yatra One", Georgia, serif;
  --f-body: "Martel", Georgia, serif;
  --f-label: "Martel Sans", system-ui, sans-serif;
  --f-mr: "Tiro Devanagari Marathi", serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --col: min(100% - 32px, 560px);

  --fx-bg: var(--ivory);
  --fx-music-bg: var(--jambhli);
  --fx-music-ring: var(--zari);
  --fx-music-ink: var(--zari-hi);

  /* the Paithani border: gold zari, a rani-pink lotus on a green vine, parrot-green narali teeth */
  --paithani: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 40'%3E%3Crect width='48' height='40' fill='%23e2b23c'/%3E%3Crect width='48' height='4' fill='%23c2185b'/%3E%3Crect y='4' width='48' height='1.2' fill='%238a5c12'/%3E%3Cpath d='M0 22Q12 14 24 22T48 22' fill='none' stroke='%232f7d32' stroke-width='2'/%3E%3Cpath d='M24 9C28 13 28 20 24 24 20 20 20 13 24 9Z' fill='%23c2185b'/%3E%3Cpath d='M24 24C18 23 14 19 12 14 18 14 22 18 24 24ZM24 24C30 23 34 19 36 14 30 14 26 18 24 24Z' fill='%23e0457b'/%3E%3Ccircle cx='6' cy='16' r='2' fill='%232f7d32'/%3E%3Ccircle cx='42' cy='16' r='2' fill='%232f7d32'/%3E%3Crect y='30' width='48' height='1.4' fill='%238a5c12'/%3E%3Cpath d='M0 40L6 32 12 40 18 32 24 40 30 32 36 40 42 32 48 40Z' fill='%232f7d32'/%3E%3C/svg%3E");
  /* jambhli silk: shot with green, a fine weave, small gold buttis */
  --butti: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg fill='%23e2b23c' opacity='.35'%3E%3Cpath d='M11 6l2.4 5 5 2.4-5 2.4L11 21l-2.4-5.2L3.6 13.4l5-2.4z'/%3E%3Ccircle cx='33' cy='33' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
  --silk: var(--butti) 0 0 / 44px 44px, repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px),
    linear-gradient(120deg, rgba(60, 160, 90, 0) 35%, rgba(60, 160, 90, .16) 50%, rgba(60, 160, 90, 0) 65%),
    radial-gradient(120% 80% at 50% 35%, var(--jambhli-hi), var(--jambhli) 55%, var(--jambhli-deep));
}

html { scroll-behavior: smooth; }
html.shut { overflow: hidden; }
body { background: var(--ivory); color: var(--ink); font: 400 17px/1.75 var(--f-body); }
a { color: inherit; }
[lang="mr"] { font-family: var(--f-mr); }
.border { display: block; height: 40px; background: var(--paithani) 0 0 / 48px 40px repeat-x; pointer-events: none; }
.border--bottom { transform: scaleY(-1); }

/* =================================================================== GATE */
.gate { position: fixed; inset: 0; z-index: 50; color: var(--ivory); overflow: hidden; }
html:not(.shut) .gate:not(.leaving) { display: none; }
.gate__half {
  position: absolute; top: 0; bottom: 0; width: 50.5%; background: var(--silk);
  transition: transform 1.3s cubic-bezier(.7, 0, .2, 1);
}
.gate__half--l { left: 0; }
.gate__half--r { right: 0; }
.gate.leaving .gate__half--l { box-shadow: inset -14px 0 0 -6px var(--zari), inset -16px 0 0 -6px var(--zari-lo); }   /* the pallu's zari edge shows as it parts */
.gate.leaving .gate__half--r { box-shadow: inset 14px 0 0 -6px var(--zari), inset 16px 0 0 -6px var(--zari-lo); }
.gate.leaving .gate__half--l { transform: translateX(-102%); }
.gate.leaving .gate__half--r { transform: translateX(102%); }
.gate.leaving { pointer-events: none; }
.gate__in { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; transition: opacity .4s ease; }
.gate.leaving .gate__in { opacity: 0; }
.gate__in > .border--top { margin-top: env(safe-area-inset-top); flex: none; }
.gate__in > .border--bottom { margin-bottom: env(safe-area-inset-bottom); flex: none; }
.gate__head { flex: none; text-align: center; padding: 18px 16px 0; }
.gate__to { font: 700 14px/1.4 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--zari-hi); }
.gate__shri { font-size: 18px; color: var(--zari); }
.gate__title { margin-top: 6px; font: 400 clamp(44px, 13vw, 64px)/1.05 var(--f-display); color: var(--kesari); text-shadow: 0 3px 0 var(--jambhli-deep); }
.gate__sub { font: 400 22px/1.3 var(--f-display); color: var(--ivory); }
.gate__stage { position: relative; flex: 1 1 auto; min-height: 0; display: grid; place-items: center; padding: 6px 16px; }
.horn { width: auto; height: 100%; max-height: 360px; max-width: 100%; overflow: visible; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .4)); }
.horn__body { transform-box: fill-box; transform-origin: 20% 90%; }
.gate__blow {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: none;
  cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
}
.gate__blow:focus-visible { outline: 2px dashed var(--zari); outline-offset: -16px; border-radius: 22px; }
.wave { opacity: 0; transform-box: fill-box; transform-origin: 0 50%; }
.gate[data-phase="blowing"] .wave { animation: wave 1s ease-out calc(var(--w) * .25s) infinite; }
.gate[data-phase="blown"] .wave { animation: wave .7s ease-out calc(var(--w) * .12s) 4; }
@keyframes wave { from { opacity: .95; transform: translateX(-30px) scale(.6); } to { opacity: 0; transform: translateX(40px) scale(1.5); } }
.gate[data-phase="blowing"] .horn__body { animation: hum .09s linear infinite alternate; }
.gate[data-phase="blown"] .horn__body { animation: raise 1.2s var(--ease) both; }
@keyframes hum { to { translate: .8px -.6px; } }
@keyframes raise { 40% { rotate: -8deg; scale: 1.06; } 100% { rotate: -4deg; scale: 1.03; } }
.horn__flag { transform-box: fill-box; transform-origin: 30% 0; animation: flutter 2.4s ease-in-out infinite alternate; }
@keyframes flutter { to { rotate: 5deg; } }

.breath { flex: none; width: min(60%, 240px); height: 8px; margin: 4px auto 0; border-radius: 4px; background: rgba(0, 0, 0, .35); box-shadow: 0 0 0 1px rgba(226, 178, 60, .5); overflow: hidden; }
.breath i { display: block; height: 100%; width: calc(var(--b, 0) * 100%); background: linear-gradient(90deg, var(--kesari), var(--zari-hi)); }
.gate__hint { flex: none; min-height: 58px; display: grid; place-items: center; padding: 8px 24px 12px; text-align: center; font: 600 18px/1.4 var(--f-body); }
.gate__hint > span { grid-area: 1 / 1; transition: opacity .3s; opacity: 0; }
.gate[data-phase="idle"]:not(.short) .gate__hint-idle, .gate[data-phase="blowing"] .gate__hint-busy, .gate.short[data-phase="idle"] .gate__hint-short { opacity: 1; }
.gate__hint-short { color: var(--zari-hi); }
.gate__skip {
  position: absolute; right: 12px; top: calc(env(safe-area-inset-top) + 52px); z-index: 3; min-height: 44px; padding: 0 16px;
  border-radius: 999px; border: 1px solid rgba(251, 227, 154, .5); background: rgba(35, 10, 43, .55); color: var(--ivory);
  font: 700 13px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
}
.gate__skip:focus-visible { outline: 2px solid var(--zari-hi); outline-offset: 3px; }

/* =================================================================== HERO */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; background: var(--silk); color: var(--ivory); text-align: center; }
.hero__in { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.hero__shri { font-size: 18px; color: var(--zari); }
.lotus { display: block; width: 60px; height: 40px; margin: 14px auto 0; }
.hero__local { margin-top: 4px; font-size: clamp(52px, 16vw, 76px); line-height: 1.25; color: var(--zari); text-shadow: 0 3px 0 var(--jambhli-deep); }
.hero__cer { font: 400 clamp(30px, 9vw, 40px)/1.1 var(--f-display); color: var(--kesari); }
.hero__line { margin-top: 4px; font: 700 13px/1.5 var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--zari-hi); }
.hero__of { margin-top: 14px; font-style: italic; color: rgba(255, 248, 236, .8); }
.hero__name { margin: 0 0 10px; font: 400 clamp(34px, 10vw, 50px)/1.15 var(--f-display); color: var(--ivory); overflow-wrap: anywhere; }
.hero__when { display: grid; justify-items: center; padding: 14px 26px; border-top: 2px solid var(--zari); border-bottom: 2px solid var(--zari); font: 700 14px/1.5 var(--f-label); letter-spacing: .16em; text-transform: uppercase; }
.hero__date { display: flex; align-items: baseline; gap: 10px; font: 400 24px/1.2 var(--f-display); letter-spacing: 0; text-transform: none; }
.hero__date b { font-weight: 400; font-size: 54px; line-height: 1; color: var(--kesari); }
.hero__muhurt { margin-top: 6px; padding: 2px 16px; border-radius: 999px; background: var(--raghu); color: var(--zari-hi); }
.hero__venue { margin-top: 16px; font-size: 16px; color: rgba(255, 248, 236, .85); }
.hero__venue b { display: block; font: 600 19px/1.4 var(--f-body); color: var(--ivory); }

/* =================================================================== SECTIONS */
.sec { position: relative; padding: 64px 0; }
.sec > :not(.border) { width: var(--col); margin-left: auto; margin-right: auto; }
.kicker { font: 700 13px/1.5 var(--f-label); letter-spacing: .16em; text-transform: uppercase; text-align: center; color: var(--rani); }
.kicker [lang="mr"] { font-size: 17px; letter-spacing: 0; text-transform: none; }
.sec__title { margin: 6px auto 22px; font: 400 clamp(30px, 8.5vw, 42px)/1.15 var(--f-display); text-align: center; color: var(--jambhli); }

.sec--nimantran { text-align: center; background: radial-gradient(90% 60% at 50% 0, #fff, var(--ivory)); }
.msg { font: 400 19px/1.8 var(--f-body); }
.hosts { margin-top: 26px; padding: 22px 16px; border: 2px solid var(--zari); border-radius: 4px; box-shadow: inset 0 0 0 4px var(--ivory), inset 0 0 0 5px var(--zari); }
.hosts__role { font: 700 12px/1.6 var(--f-label); letter-spacing: .18em; text-transform: uppercase; color: var(--raghu); }
.hosts__names { font: 800 20px/1.5 var(--f-body); color: var(--jambhli); margin-bottom: 10px; }
.hosts__names--elders { font-weight: 600; margin-bottom: 0; }

.sec--muhurt { padding: 0; text-align: center; color: var(--ivory); background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px), radial-gradient(100% 80% at 50% 30%, #3f9a42, var(--raghu) 55%, var(--raghu-deep)); }
.sec--muhurt > .kicker { padding-top: 48px; color: var(--zari-hi); }
.muhurt__time { font: 400 clamp(64px, 20vw, 96px)/1.1 var(--f-display); color: var(--zari); text-shadow: 0 4px 0 var(--raghu-deep); }
.muhurt__day { font: 600 18px/1.5 var(--f-body); }
.sec--muhurt .count { margin-bottom: 48px; }
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 22px; }
.count span {
  padding: 12px 2px 8px; border-radius: 6px; background: var(--jambhli); color: var(--zari-hi);
  box-shadow: inset 0 0 0 2px var(--zari), 0 5px 0 var(--raghu-deep); font: 700 12px/1.3 var(--f-label); letter-spacing: .08em; text-transform: uppercase;
}
.count b { font: 400 clamp(28px, 8.5vw, 40px)/1.15 var(--f-display); color: var(--kesari); letter-spacing: 0; }
.count__done { margin: 18px 0 48px; font: 400 26px/1.3 var(--f-display); color: var(--zari); }

.sec--vidhi { background: var(--ivory); }
.vidhi { display: grid; gap: 18px; }
.ev { border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(138, 92, 18, .35), 0 14px 26px -16px rgba(42, 16, 48, .55); }
.ev__band {   /* a strip of pheta: saffron with a gold-dotted edge */
  display: flex; justify-content: space-between; gap: 10px; padding: 8px 16px 10px; color: #fff;
  background: radial-gradient(circle, var(--zari-hi) 0 1.4px, transparent 1.8px) 0 100% / 10px 6px repeat-x, linear-gradient(100deg, var(--kesari), var(--kesari-deep));
  font: 700 13px/1.4 var(--f-label); letter-spacing: .14em; text-transform: uppercase;
}
.ev--main .ev__band { background: radial-gradient(circle, var(--zari-hi) 0 1.4px, transparent 1.8px) 0 100% / 10px 6px repeat-x, linear-gradient(100deg, var(--rani), #8e0f45); }
.ev__body { padding: 14px 16px 18px; }
.ev__name { margin: 0; font: 400 28px/1.2 var(--f-display); color: var(--jambhli); }
.ev__when { font-weight: 600; font-size: 16px; }
.ev__where { font-size: 16px; color: var(--ink-soft); }
.ev__note { margin-top: 4px; font-style: italic; font-size: 16px; color: var(--raghu-deep); }
.ev__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 4px; border: 1.5px solid var(--jambhli); color: var(--jambhli);
  text-decoration: none; font: 700 13px/1 var(--f-label); letter-spacing: .06em; background: var(--ivory);
}
.btn--solid { background: var(--jambhli); color: var(--zari-hi); }
.btn:focus-visible, .reply:focus-visible, .pangat__btn:focus-visible, .up:focus-visible { outline: 2px solid var(--kesari); outline-offset: 3px; }

.sec--family { background: var(--silk); color: var(--ivory); }
.sec--family .sec__title { color: var(--zari); }
.sec--family .kicker { color: var(--zari-hi); }
.fam { display: grid; gap: 2px; text-align: center; }
.fam__row { padding: 14px 0; font: 600 19px/1.5 var(--f-body); border-bottom: 1px dashed rgba(226, 178, 60, .45); }
.fam__row:last-child { border-bottom: 0; }
.fam__row span { display: block; font: 700 12px/1.6 var(--f-label); letter-spacing: .18em; text-transform: uppercase; color: var(--kesari); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }

/* ---------- the pangat ---------- */
.sec--pangat { text-align: center; background: linear-gradient(180deg, var(--ivory), #f6ead2); }
.pangat__ask { margin-top: -8px; }
.pangat { margin-top: 22px; padding: 18px 12px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px rgba(138, 92, 18, .3), 0 16px 30px -18px rgba(42, 16, 48, .5); }
.pangat__row { min-height: 92px; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 6px; }
.pangat__row:empty::before { content: "No leaves yet"; align-self: center; font-style: italic; color: var(--ink-soft); }
.pangat__leaf { width: 52px; height: 84px; animation: leafIn .5s var(--ease) both; }
.pangat__leaf.out { animation: leafOut .3s ease both; }
@keyframes leafIn { from { opacity: 0; transform: translateY(-20px) rotate(-14deg) scale(.6); } }
@keyframes leafOut { to { opacity: 0; transform: translateY(10px) scale(.7); } }
.pangat__ctl { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 12px; }
.pangat__btn {
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--jambhli); color: var(--zari-hi); cursor: pointer;
  font: 400 30px/1 var(--f-body); box-shadow: 0 4px 0 var(--jambhli-deep); display: grid; place-items: center;
}
.pangat__btn:active { translate: 0 2px; box-shadow: 0 2px 0 var(--jambhli-deep); }
.pangat__btn:disabled { opacity: .35; cursor: default; }
.pangat__n { min-width: 80px; font: 700 12px/1.3 var(--f-label); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.pangat__n b { display: block; font: 400 40px/1.1 var(--f-display); letter-spacing: 0; color: var(--kesari-deep); }
.reply {
  display: flex; width: fit-content; align-items: center; min-height: 54px; margin: 26px auto 0; padding: 0 28px; border-radius: 999px;
  background: var(--raghu); color: #fff; text-decoration: none; font: 700 16px/1 var(--f-label); letter-spacing: .06em;
  box-shadow: 0 5px 0 var(--raghu-deep), 0 16px 24px -10px rgba(28, 84, 32, .6);
}
.reply:active { translate: 0 3px; box-shadow: 0 2px 0 var(--raghu-deep); }
.pangat__who { margin-top: 12px; font-size: 15px; color: var(--ink-soft); }
.tag { margin-top: 14px; font: 400 22px/1.3 var(--f-display); color: var(--jambhli); }

/* =================================================================== FOOTER */
.foot { text-align: center; padding: 0 16px max(92px, calc(env(safe-area-inset-bottom) + 92px)); background: var(--jambhli-deep); color: var(--ivory); }
.foot .border { margin: 0 -16px 22px; }
.foot__local { font-size: 30px; color: var(--zari); }
.foot__name { font: 400 34px/1.2 var(--f-display); color: var(--kesari); }
.foot__date { font: 700 14px/1.6 var(--f-label); letter-spacing: .3em; }
.foot__cal { margin-top: 10px; font-size: 15px; }
.foot__cal a { display: inline-block; padding: 10px 2px; }
.foot__music, .foot__credit { margin-top: 6px; font-size: 13px; color: rgba(255, 248, 236, .7); }
.up { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font: 700 12px/1 var(--f-label); letter-spacing: .16em; text-transform: uppercase; }

@media (min-width: 900px) {
  .vidhi { grid-template-columns: 1fr 1fr; width: min(100% - 64px, 900px); }
  .hero__local { font-size: 84px; }
}

/* =================================================================== LINK PREVIEW */
.ogcard { flex-direction: column; justify-content: space-between; background: var(--silk); color: var(--ivory); }
.og__horn { position: absolute; left: 10px; top: 60px; width: 540px; height: 520px; }
.og__horn .horn { width: 100%; height: 100%; max-height: none; }
.og__text { position: absolute; left: 460px; right: 50px; top: 60px; bottom: 60px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.og__shri { font-size: 24px; color: var(--zari); }
.og__local { font-size: 86px; line-height: 1.2; color: var(--zari); text-shadow: 0 4px 0 var(--jambhli-deep); }
.og__cer { font: 400 36px/1.2 var(--f-display); color: var(--kesari); }
.og__name { font: 400 92px/1.05 var(--f-display); }
.og__date { margin-top: 12px; font: 600 27px/1.3 var(--f-body); }
.og__venue { font-size: 21px; color: rgba(255, 248, 236, .85); }
.sec--pangat > .reply { width: fit-content; }

/* keep the hint clear of the fixed music button (48px, bottom-right) */
.gate__hint { padding-inline: 64px; }
