/* GJMS festival layer (18 public pages): ribbon + its festival "toran" strip, drifting decor shapes, greeting overlay.
   Behaviour: assets/js/festive.js + festive-data.js (generated from lib/festivals-data.js). One html.fx-<theme> rule
   of tokens per look: --rb/--ri ribbon background/ink, --c1..--c4 shapes + fireworks, --s1/--s2 strip, --ob overlay.
   CSS shapes only, no deity imagery. Campaign sections (index, admissions): assets/css/campaign.css. */

/* ------------------------------ Themes -------------------------------- */
html.fx-diwali { --rb:linear-gradient(90deg,#ffb703 0%,#ff8a00 38%,#ff4d8d 100%);--ri:#2a0a3a;--c1:#ff9f1c;--c2:#ff7a00;--c3:#e0115f;--c4:#ff4d8d;--s1:#fff6c2;--s2:#e0115f;--ob:radial-gradient(ellipse at 50% 55%,rgba(122,18,84,.93),rgba(28,10,56,.96) 55%,rgba(8,10,30,.98)); }
html.fx-chhath { --rb:linear-gradient(90deg,#1e3a8a,#9a3412 55%,#d97706);--ri:#fff;--c1:#f59e0b;--c2:#fb923c;--c3:#fde68a;--c4:#fbbf24;--s1:#fde68a;--s2:#1e40af;--ob:radial-gradient(ellipse at 50% 72%,rgba(194,65,12,.92),rgba(30,27,75,.96) 60%,rgba(8,10,30,.98)); }
html.fx-national { --ri:#fff;--c1:#ff9933;--c2:#138808;--c3:#2563eb;--c4:#ff9933; }
html.fx-halloween { --rb:linear-gradient(90deg,#3b0764,#6b21a8 50%,#c2410c);--ri:#fff;--c1:#f97316;--c2:#a855f7;--c3:#84cc16;--c4:#facc15;--s1:#fb923c;--s2:#a3e635; }
html.fx-christmas { --rb:linear-gradient(90deg,#14532d,#166534 50%,#b91c1c);--ri:#fff;--c1:#facc15;--c2:#ef4444;--c3:#16a34a;--c4:#93c5fd;--s1:#fde047;--s2:#f87171;--ob:radial-gradient(ellipse at 50% 55%,rgba(21,128,61,.92),rgba(20,40,30,.96) 55%,rgba(8,15,12,.98)); }
html.fx-newyear { --rb:linear-gradient(90deg,#0b2545,#312e81 55%,#6d28d9);--ri:#fff;--c1:#facc15;--c2:#f472b6;--c3:#38bdf8;--c4:#a78bfa;--s1:#fde68a;--s2:#f9a8d4; }
html.fx-holi { --rb:linear-gradient(90deg,#fbcfe8,#fde68a 35%,#bbf7d0 68%,#bfdbfe);--ri:#4a044e;--c1:#ec4899;--c2:#facc15;--c3:#22c55e;--c4:#3b82f6;--s1:#db2777;--s2:#16a34a;--ob:radial-gradient(ellipse at 50% 55%,rgba(157,23,77,.92),rgba(59,7,100,.96) 55%,rgba(15,10,40,.98)); }
html.fx-eid { --rb:linear-gradient(90deg,#064e3b,#047857 60%,#0f766e);--ri:#fff;--c1:#fbbf24;--c2:#fde68a;--c3:#34d399;--c4:#fbbf24;--s1:#fcd34d;--s2:#ecfdf5;--ob:radial-gradient(ellipse at 50% 55%,rgba(4,120,87,.92),rgba(6,46,40,.96) 55%,rgba(4,20,18,.98)); }
html.fx-gurpurab { --rb:linear-gradient(90deg,#c2410c,#b45309 45%,#1e3a8a);--ri:#fff;--c1:#f59e0b;--c2:#fde68a;--c3:#fb923c;--c4:#fbbf24;--s1:#fde68a;--s2:#fb923c; }
html.fx-raksha { --rb:linear-gradient(90deg,#9f1239,#be123c 55%,#b45309);--ri:#fff;--c1:#f59e0b;--c2:#e11d48;--c3:#fde68a;--c4:#f472b6;--s1:#dc2626;--s2:#fbbf24;--ob:radial-gradient(ellipse at 50% 55%,rgba(159,18,57,.92),rgba(60,10,30,.96) 55%,rgba(20,6,12,.98)); }
html.fx-janmashtami { --rb:linear-gradient(90deg,#1e3a8a,#0e7490 50%,#15803d);--ri:#fff;--c1:#14b8a6;--c2:#facc15;--c3:#2563eb;--c4:#22c55e;--s1:#facc15;--s2:#5eead4; }
html.fx-ganesh, html.fx-navratri { --rb:linear-gradient(90deg,#9f1239,#c2410c 55%,#b45309);--ri:#fff;--c1:#f59e0b;--c2:#f97316;--c3:#16a34a;--c4:#e11d48;--s1:#fde047;--s2:#22c55e;--ob:radial-gradient(ellipse at 50% 55%,rgba(159,18,57,.92),rgba(67,20,7,.96) 55%,rgba(20,8,4,.98)); }
html.fx-ganesh { --rb:linear-gradient(90deg,#b91c1c,#c2410c 50%,#b45309);--c4:#facc15; }
html.fx-sankranti { --rb:linear-gradient(90deg,#fde047,#fef08a 45%,#7dd3fc);--ri:#1e3a8a;--c1:#f43f5e;--c2:#2563eb;--c3:#f97316;--c4:#16a34a; }
html.fx-teachers { --rb:linear-gradient(90deg,#1f3d2b,#2d5a3d);--ri:#f8fafc;--c1:#facc15;--c2:#0b2545;--c3:#15803d;--c4:#c2410c; }
html.fx-children { --rb:linear-gradient(90deg,#0284c7,#6366f1 50%,#db2777);--ri:#fff;--c1:#f43f5e;--c2:#facc15;--c3:#22c55e;--c4:#3b82f6; }
html.fx-nature { --rb:linear-gradient(90deg,#14532d,#15803d 55%,#4d7c0f);--ri:#fff;--c1:#16a34a;--c2:#65a30d;--c3:#84cc16;--c4:#15803d;--s1:#86efac;--s2:#bef264; }
html.fx-flowers { --rb:linear-gradient(90deg,#831843,#be185d 55%,#db2777);--ri:#fff;--c1:#f472b6;--c2:#fb7185;--c3:#f9a8d4;--c4:#facc15;--s1:#fbcfe8;--s2:#fde047; }
html.fx-hindi { --rb:linear-gradient(90deg,#ffedd5,#fef3c7);--ri:#0b2545;--c1:#0b2545;--c2:#c2410c;--c3:#1d4079;--c4:#b45309;--s1:#0b2545; }
html.fx-generic { --ri:#fff;--c1:#e0b341;--c2:#ebcf73;--c3:#3d6ba8;--c4:#e0b341;--s1:#e0b341;--s2:rgba(255,255,255,.7); }

/* ------------------------------ Ribbon -------------------------------- */
.fx-rib { position: relative; z-index: 210; background: var(--rb, linear-gradient(90deg, #0b2545, #1d4079)); color: var(--ri, #fff); font-family: var(--font-head), var(--deva), system-ui, sans-serif; font-size: .92rem; font-weight: 700; line-height: 1.35; }
.fx-rib__in { max-width: var(--container); margin: 0 auto; padding: 8px 48px 8px 16px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.fx-rib__msgs { display: grid; min-width: 0; text-align: center; }
.fx-rib__m { grid-area: 1 / 1; color: inherit; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s ease; }
.fx-rib__m.on { opacity: 1; visibility: visible; }
a.fx-rib__m:hover { color: inherit; text-decoration: underline; }
.fx-rib__en { font-weight: 600; opacity: .88; }
.fx-rib .fx-diya { width: 26px; height: 26px; flex: none; }
.fx-rib .fx-s { flex: none; --k: var(--c1); }
.fx-rib__x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.3); color: inherit; font-size: 1.35rem; line-height: 1; display: grid; place-items: center; padding: 0; }
.fx-rib__x:hover { background: rgba(255,255,255,.5); }
@media (max-width: 560px) {
  .fx-rib { font-size: .8rem; }
  .fx-rib__in { padding: 7px 42px 7px 10px; gap: 8px; }
  .fx-rib .fx-diya { width: 22px; height: 22px; }
  .fx-rib .fx-diya:last-of-type, .fx-rib .fx-s:last-of-type { display: none; }
}

/* The strip under the ribbon: the look's toran (class set by festive.js). */
.fx-rib::after { content: ""; display: block; height: 7px; }
.fx-st-none::after { content: none; }
.fx-st-bulbs::after { height: 6px; background-image: radial-gradient(circle, var(--s1) 1.6px, #0000 2.6px), radial-gradient(circle, var(--s2) 1.6px, #0000 2.6px); background-size: 28px 6px, 28px 6px; background-position: 0 0, 14px 0; animation: fxTwinkle 1.4s steps(2) infinite alternate; }
.fx-st-toran::after { height: 10px; background: radial-gradient(circle at 50% 5px, var(--s1) 3.6px, #0000 4.2px) 0 0 / 18px 10px, radial-gradient(circle at 50% 5px, var(--s2) 3.6px, #0000 4.2px) 9px 0 / 18px 10px, linear-gradient(#0003 0 1px, #0000 0); }
.fx-st-bunting::after { height: 10px; background: conic-gradient(from -30deg at 50% 100%, var(--c1) 0 60deg, #0000 0) 0 0 / 48px 10px, conic-gradient(from -30deg at 50% 100%, var(--c2) 0 60deg, #0000 0) 12px 0 / 48px 10px, conic-gradient(from -30deg at 50% 100%, var(--c3) 0 60deg, #0000 0) 24px 0 / 48px 10px, conic-gradient(from -30deg at 50% 100%, var(--c4) 0 60deg, #0000 0) 36px 0 / 48px 10px; transform: scaleY(-1); }
.fx-st-tri::after { height: 6px; background: linear-gradient(#ff9933 0 33.3%, #fff 0 66.6%, #138808 0); }
.fx-st-wave::after { height: 7px; background: radial-gradient(circle at 50% 100%, #0000 4px, var(--s1) 4.5px 5.8px, #0000 6.3px) 0 0 / 14px 7px, var(--s2); }
.fx-st-thread::after { height: 5px; background: repeating-linear-gradient(-55deg, var(--s1) 0 3px, var(--s2) 3px 6px); }
.fx-st-dots::after { background: radial-gradient(circle, var(--s1) 2px, #0000 2.6px) 0 0 / 16px 7px, radial-gradient(circle, var(--s2) 2px, #0000 2.6px) 8px 0 / 16px 7px; }
.fx-st-leaves::after { height: 8px; background: radial-gradient(34% 40% at 50% 50%, var(--s1) 95%, #0000) 0 0 / 14px 8px, radial-gradient(34% 40% at 50% 50%, var(--s2) 95%, #0000) 7px 0 / 14px 8px; }
.fx-st-chalk::after { height: 6px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.8) 0 12px, #0000 12px 20px) 0 50% / 100% 2px no-repeat; }
.fx-st-line::after { height: 8px; background: linear-gradient(var(--s1) 0 3px, #0000 0), repeating-linear-gradient(90deg, var(--s1) 0 2px, #0000 2px 16px); }
@keyframes fxTwinkle { from { opacity: .45; } to { opacity: 1; } }
.fx-diya path:nth-child(1), .fx-diya path:nth-child(2) { transform-origin: 24px 22px; animation: fxFlame .8s ease-in-out infinite alternate; }
@keyframes fxFlame { from { transform: scale(1) rotate(-3deg); } to { transform: scale(1.08, .94) rotate(3deg); } }

/* ------------------------ Shapes (icons, decor) ------------------------ */
.fx-s { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--k, var(--c1, #e0b341)); }
.fx-s-glow { width: 10px; height: 10px; box-shadow: 0 0 10px 4px var(--k, var(--c1)); }
.fx-s-puff { width: 28px; height: 28px; filter: blur(3px); opacity: .75; }
.fx-s-conf { width: 7px; height: 13px; border-radius: 2px; }
.fx-s-star { border-radius: 0; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.fx-s-leaf { width: 13px; height: 20px; border-radius: 0 100%; }
.fx-s-flower { width: 20px; height: 20px; background: radial-gradient(circle, #9a3412 0 18%, #0000 21%), repeating-conic-gradient(var(--k, var(--c1)) 0 14deg, #0000 0 24deg), radial-gradient(circle, var(--k, var(--c1)) 0 60%, #0000 62%); }
.fx-s-balloon { position: relative; width: 20px; height: 25px; border-radius: 50% 50% 46% 46% / 56% 56% 44% 44%; background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.75) 0 10%, #0000 13%), var(--k, var(--c1)); }
.fx-s-balloon::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 18px; background: rgba(15,23,42,.35); }
.fx-s-kite { position: relative; width: 18px; height: 18px; border-radius: 2px; transform: rotate(45deg); background: conic-gradient(var(--k, var(--c1)) 0 25%, #fff 0 50%, var(--k, var(--c1)) 0 75%, rgba(255,255,255,.55) 0); }
.fx-s-kite::after { content: ""; position: absolute; right: -12px; bottom: 4px; width: 14px; height: 2px; transform: rotate(45deg); background: var(--k, var(--c1)); }
.fx-s-moon { background: transparent; box-shadow: 5px 3px 0 0 var(--k, var(--c1)); }
.fx-s-pumpkin { position: relative; width: 24px; height: 19px; border-radius: 48%; background: radial-gradient(circle at 32% 44%, #3b0764 0 8%, #0000 10%), radial-gradient(circle at 68% 44%, #3b0764 0 8%, #0000 10%), radial-gradient(ellipse 14% 10% at 50% 72%, #3b0764 0 80%, #0000 95%), repeating-linear-gradient(90deg, #f97316 0 5px, #ea580c 5px 6px); }
.fx-s-pumpkin::before { content: ""; position: absolute; left: 10px; top: -4px; width: 4px; height: 6px; border-radius: 2px; background: #4d7c0f; }
.fx-s-ghost { width: 19px; height: 23px; border-radius: 50% 50% 30% 30% / 62% 62% 26% 26%; background: radial-gradient(circle at 36% 38%, #3b0764 0 8%, #0000 10%), radial-gradient(circle at 64% 38%, #3b0764 0 8%, #0000 10%), #f5f3ff; box-shadow: 0 0 0 1.5px rgba(107,33,168,.35); }
.fx-s-bat { width: 26px; height: 12px; border-radius: 0; background: #3b0764; clip-path: polygon(0 25%, 17% 0, 30% 45%, 43% 25%, 50% 40%, 57% 25%, 70% 45%, 83% 0, 100% 25%, 82% 100%, 64% 70%, 50% 92%, 36% 70%, 18% 100%); }
.fx-s-feather { width: 11px; height: 26px; border-radius: 50%; background: radial-gradient(ellipse at 50% 32%, #1e3a8a 0 13%, #0d9488 15% 28%, #facc15 30% 36%, #15803d 38% 60%, #0000 62%); }
.fx-s-rakhi { width: 34px; height: 16px; border-radius: 0; background: radial-gradient(circle, #facc15 0 3px, var(--k, var(--c2)) 3.5px 7.5px, #0000 8px), linear-gradient(#0000 45%, #dc2626 45% 58%, #0000 58%); }
.fx-s-sun { width: 20px; height: 20px; background: radial-gradient(circle, #fde68a 0 32%, #f59e0b 35% 52%, #0000 55%), repeating-conic-gradient(#f59e0b 0 9deg, #0000 0 30deg); }
.fx-s-badge { width: 18px; height: 18px; background: radial-gradient(circle, #1e3a8a 0 16%, #fff 19% 38%, #138808 41% 62%, #ff9933 65%); }
.fx-s-txt { width: auto; height: auto; border-radius: 0; background: none; color: var(--k, var(--c1)); font: 800 1.35rem/1 var(--font-head), var(--deva), system-ui, sans-serif; }
.fx-s-txt::before { content: attr(data-g); }

/* Decor: a dozen shapes drift across once; festive.js then removes the layer. */
.fx-deco { position: fixed; inset: 0; z-index: 150; overflow: hidden; pointer-events: none; }
.fx-deco .fx-s { position: absolute; top: -34px; opacity: .88; animation: fxFall 12s linear both; }
.fx-deco .fx-up { top: auto; bottom: -46px; animation-name: fxRise; }
.fx-deco .fx-s:nth-child(4n+2) { --k: var(--c2); }
.fx-deco .fx-s:nth-child(4n+3) { --k: var(--c3); }
.fx-deco .fx-s:nth-child(4n) { --k: var(--c4); }
@keyframes fxFall { from { translate: 0 0; rotate: 0deg; } to { translate: var(--dx, 40px) calc(100vh + 70px); rotate: 300deg; } }
@keyframes fxRise { 0% { translate: 0 0; rotate: -6deg; } 50% { rotate: 6deg; } 100% { translate: var(--dx, 40px) calc(-100vh - 90px); rotate: -4deg; } }

/* ------------------------- Greeting overlay ---------------------------- */
html.fx-lock { overflow:hidden; }
#gjms-fx { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; cursor: pointer;
  background: var(--ob, radial-gradient(ellipse at 50% 55%, rgba(29,64,121,.94), rgba(11,37,69,.97) 55%, rgba(8,27,52,.98)));
  transition: opacity .7s ease; animation: fxIn .3s ease-out; }
#gjms-fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#gjms-fx.fx-out { opacity: 0; pointer-events: none; }
.fx-card { position: relative; width: 100%; max-width: 440px; text-align: center; padding: 34px 22px 26px; border-radius: 26px; cursor: default;
  background: rgba(24,8,44,.62); border: 1.5px solid rgba(255,201,51,.75);
  box-shadow: 0 0 48px rgba(255,122,0,.35), inset 0 0 30px rgba(224,17,95,.2); color: #fff;
  animation: fxPop .6s .15s cubic-bezier(.2,.9,.3,1.2) both; }
.fx-card h2 { color: #ffd43b; font-family: var(--font-head), var(--deva), system-ui, sans-serif; font-size: clamp(2rem, 9vw, 2.9rem); line-height: 1.15; text-shadow: 0 2px 18px rgba(255,122,0,.55); }
.fx-card h2.fx-long { font-size: clamp(1.45rem, 6.2vw, 2.05rem); }
.fx-card h2 .fx-diya { display: inline-block; width: .9em; height: .9em; vertical-align: -.08em; margin-left: 2px; }
.fx-card h2 .fx-s { vertical-align: middle; margin-left: 6px; scale: 1.4; }
.fx-card .fx-en { display: block; color: #fff; font-size: .62em; letter-spacing: .08em; margin-top: 4px; }
.fx-card h2.fx-long .fx-en { font-size: .78em; }
.fx-sub { margin: 12px 0 0; color: #ffe8b0; font-size: 1.02rem; font-family: var(--font-head), var(--deva), system-ui, sans-serif; font-weight: 600; }
.fx-btn { display: inline-block; margin-top: 20px; padding: 14px 22px; border-radius: 999px; font-family: var(--font-head), var(--deva), system-ui, sans-serif; font-weight: 800; font-size: 1rem; line-height: 1.3; color: #fff;
  background: linear-gradient(90deg, #d9480f, #c2185b); border: 1.5px solid rgba(255,255,255,.55); box-shadow: 0 8px 24px rgba(224,17,95,.5); animation: fxPulse 1.8s ease-in-out infinite; }
.fx-btn:hover { color: #fff; filter: brightness(1.1); }
.fx-adm { display: block; margin-top: 14px; color: #ffe8b0; font: 700 .95rem/1.35 var(--font-head), var(--deva), system-ui, sans-serif; text-decoration: underline; text-underline-offset: 3px; }
.fx-adm:hover { color: #fff; }
.fx-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 1.6rem; line-height: 1; padding: 0; display: grid; place-items: center; }
.fx-x:hover { background: rgba(255,255,255,.3); }
@keyframes fxIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fxPop { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes fxPulse { 0%, 100% { box-shadow: 0 8px 24px rgba(224,17,95,.5); } 50% { box-shadow: 0 8px 34px rgba(255,138,0,.85); } }

@media (prefers-reduced-motion: reduce) {
  .fx-rib__m { grid-area: auto; opacity: 1; visibility: visible; transition: none; }
  .fx-rib::after, .fx-diya path, .fx-btn, .fx-card, #gjms-fx { animation: none !important; }
  #gjms-fx { transition-duration: .01s; }
  .fx-deco { display: none; }
}

@media print { .fx-rib, .fx-deco, #gjms-fx { display: none !important; } }
