.festive-decor {
  position: fixed;
  z-index: 4;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.festive-decor *,
.festive-toggle,
.festive-preview-banner {
  pointer-events: none;
}

.festive-greeting {
  display: inline-block;
  max-width: min(100%, 760px);
  margin: 0 0 clamp(18px, 3vw, 34px);
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--festive-accent) 28%, transparent);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 4px 14px rgba(38, 31, 18, .08);
  color: var(--ink);
  font: 500 .9rem/1.35 var(--body);
  letter-spacing: .01em;
}

.festive-greeting[lang="bn"] {
  font-family: "Hind Siliguri", "Noto Serif Bengali", var(--body);
  font-size: 1rem;
}

.festive-lights {
  position: absolute;
  inset: 0 0 auto;
  height: 48px;
  opacity: .72;
  background:
    radial-gradient(circle, #ffdf9b 0 2px, rgba(251, 191, 90, .4) 3px, transparent 9px) 12px 17px / 76px 28px repeat-x,
    radial-gradient(ellipse at 50% 0, rgba(184, 123, 45, .65) 0 1px, transparent 2px) 0 0 / 152px 20px repeat-x;
  filter: drop-shadow(0 0 5px rgba(255, 195, 107, .72));
  animation: festive-light-warm 4.5s ease-in-out infinite alternate;
}

.festive-border {
  position: absolute;
  inset: 0;
  opacity: .52;
  background:
    linear-gradient(90deg, var(--festive-accent) 0 2px, rgba(255, 255, 255, .78) 2px 4px, transparent 4px calc(100% - 4px), rgba(255, 255, 255, .78) calc(100% - 4px) calc(100% - 2px), var(--festive-accent) calc(100% - 2px)),
    linear-gradient(0deg, var(--festive-accent) 0 2px, rgba(255, 255, 255, .78) 2px 4px, transparent 4px calc(100% - 4px), rgba(255, 255, 255, .78) calc(100% - 4px) calc(100% - 2px), var(--festive-accent) calc(100% - 2px));
  mask: linear-gradient(#000, #000) top / 100% 5px no-repeat, linear-gradient(#000, #000) bottom / 100% 5px no-repeat, linear-gradient(#000, #000) left / 5px 100% no-repeat, linear-gradient(#000, #000) right / 5px 100% no-repeat;
}

.festive-alpana {
  position: absolute;
  top: 18px;
  width: 116px;
  height: 116px;
  opacity: .22;
  background:
    radial-gradient(ellipse at center, transparent 0 22%, rgba(255, 255, 255, .92) 23% 24%, transparent 25% 36%, rgba(255, 255, 255, .78) 37% 38%, transparent 39%),
    radial-gradient(ellipse at center, transparent 0 48%, rgba(255, 255, 255, .78) 49% 50%, transparent 51%);
  border-radius: 50%;
}

.festive-alpana:after {
  position: absolute;
  inset: 27%;
  content: "";
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, transparent 0deg 12deg, rgba(255, 255, 255, .82) 13deg 14deg, transparent 15deg 30deg);
  mask: radial-gradient(circle, transparent 0 46%, #000 48% 100%);
}

.festive-alpana-left { left: 12px; }
.festive-alpana-right { right: 12px; transform: rotate(24deg); }

.festive-ambient i {
  position: absolute;
  top: -50px;
  left: 12%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  opacity: .44;
  background: radial-gradient(circle at 50% 54%, #e88a43 0 10%, transparent 12%), radial-gradient(ellipse at 50% 25%, white 0 34%, transparent 38%), radial-gradient(ellipse at 76% 50%, white 0 32%, transparent 36%), radial-gradient(ellipse at 50% 76%, white 0 32%, transparent 36%), radial-gradient(ellipse at 24% 50%, white 0 32%, transparent 36%);
  animation: festive-drift 19s linear infinite;
}

.festive-ambient i:nth-child(2) { left: 38%; animation-delay: -7s; animation-duration: 23s; transform: scale(.72); }
.festive-ambient i:nth-child(3) { left: 68%; animation-delay: -13s; animation-duration: 21s; transform: scale(.86); }
.festive-ambient i:nth-child(4) { left: 87%; animation-delay: -4s; animation-duration: 26s; transform: scale(.62); }

.festive-kash {
  position: absolute;
  inset: auto 0 0;
  height: 90px;
  opacity: .3;
  background: repeating-linear-gradient(79deg, transparent 0 44px, rgba(255,255,255,.8) 45px 46px, transparent 47px 68px);
  transform-origin: center bottom;
  animation: festive-grass-sway 8s ease-in-out infinite alternate;
}

.festive-welcome {
  position: relative;
  z-index: 5;
  width: fit-content;
  max-width: calc(100% - 40px);
  margin: 10px auto 0;
  padding: 10px 18px;
  border: 1px solid color-mix(in srgb, var(--festive-accent) 24%, var(--paper));
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 12px 35px rgba(38, 31, 18, .1);
  color: var(--ink);
  text-align: center;
}

.festive-welcome:not([hidden]) {
  animation: festive-welcome-in .45s ease-out both;
}

.festive-toggle {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--festive-accent) 24%, var(--paper));
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 4px 14px rgba(38, 31, 18, .08);
  color: var(--ink);
  cursor: pointer;
  font: 600 .72rem/1.2 var(--body);
  pointer-events: auto;
  white-space: nowrap;
}

.festive-toggle:hover,
.festive-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--festive-accent) 35%, white);
  outline-offset: 2px;
}

.festive-preview-banner {
  position: relative;
  z-index: 55;
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 9px 18px;
  background: var(--ink);
  color: white;
  font: 600 .75rem/1.4 var(--body);
  pointer-events: auto;
}

.festive-preview-banner a { color: white; text-decoration: underline; }

.festive-page[data-festive-decorations~="border"].festive-durga-puja .festive-border {
  inset: 6px;
  opacity: .72;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='16' viewBox='0 0 48 16'%3E%3Cpath d='M-1 9 11 2 24 9 37 2 49 9' fill='none' stroke='%23b72c3b' stroke-width='5' stroke-linejoin='round'/%3E%3Cpath d='M-1 9 11 2 24 9 37 2 49 9' fill='none' stroke='%23e4a33b' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M-1 9 11 2 24 9 37 2 49 9' fill='none' stroke='%23fff3d7' stroke-width='.8' stroke-dasharray='1 3'/%3E%3C/svg%3E") top left / 48px 16px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='16' viewBox='0 0 48 16'%3E%3Cpath d='M-1 7 11 14 24 7 37 14 49 7' fill='none' stroke='%23b72c3b' stroke-width='5' stroke-linejoin='round'/%3E%3Cpath d='M-1 7 11 14 24 7 37 14 49 7' fill='none' stroke='%23e4a33b' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M-1 7 11 14 24 7 37 14 49 7' fill='none' stroke='%23fff3d7' stroke-width='.8' stroke-dasharray='1 3'/%3E%3C/svg%3E") bottom left / 48px 16px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='48' viewBox='0 0 16 48'%3E%3Cpath d='M9 -1 2 11 9 24 2 37 9 49' fill='none' stroke='%23b72c3b' stroke-width='5' stroke-linejoin='round'/%3E%3Cpath d='M9 -1 2 11 9 24 2 37 9 49' fill='none' stroke='%23e4a33b' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M9 -1 2 11 9 24 2 37 9 49' fill='none' stroke='%23fff3d7' stroke-width='.8' stroke-dasharray='1 3'/%3E%3C/svg%3E") left top / 16px 48px repeat-y,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='48' viewBox='0 0 16 48'%3E%3Cpath d='M7 -1 14 11 7 24 14 37 7 49' fill='none' stroke='%23b72c3b' stroke-width='5' stroke-linejoin='round'/%3E%3Cpath d='M7 -1 14 11 7 24 14 37 7 49' fill='none' stroke='%23e4a33b' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='M7 -1 14 11 7 24 14 37 7 49' fill='none' stroke='%23fff3d7' stroke-width='.8' stroke-dasharray='1 3'/%3E%3C/svg%3E") right top / 16px 48px repeat-y;
  background-size: 48px 16px, 48px 16px, 16px 48px, 16px 48px;
}

.festive-page.festive-durga-puja .festive-alpana { opacity: .36; }
.festive-page.festive-durga-puja[data-festive-decorations~="ambient"] .festive-ambient i {
  top: -28px;
  width: 20px;
  height: 20px;
  opacity: .94;
  filter: drop-shadow(0 1px 3px rgba(183, 44, 59, .22));
  animation-name: festive-shiuli-fall;
  animation-duration: 34s;
}
.festive-page.festive-durga-puja[data-festive-decorations~="ambient"] .festive-ambient i:nth-child(2) { animation-delay: -19s; animation-duration: 39s; }
.festive-page.festive-durga-puja[data-festive-decorations~="ambient"] .festive-ambient i:nth-child(3) { animation-delay: -8s; animation-duration: 36s; }
.festive-page.festive-durga-puja[data-festive-decorations~="ambient"] .festive-ambient i:nth-child(4) { animation-delay: -27s; animation-duration: 42s; }
.festive-page.festive-durga-puja[data-festive-decorations~="ambient"] .festive-ambient i:nth-child(1) { left: 1%; }
.festive-page.festive-durga-puja[data-festive-decorations~="ambient"] .festive-ambient i:nth-child(2) { left: 95%; }
.festive-page.festive-durga-puja[data-festive-decorations~="ambient"] .festive-ambient i:nth-child(3) { left: 3%; }
.festive-page.festive-durga-puja[data-festive-decorations~="ambient"] .festive-ambient i:nth-child(4) { left: 97%; }
.festive-page.festive-lakshmi-puja .festive-alpana { opacity: .24; filter: sepia(.35); }
.festive-page.festive-lakshmi-puja .festive-footprints {
  position: absolute;
  top: 32px;
  right: 32px;
  width: 62px;
  height: 48px;
  opacity: .58;
  background:
    radial-gradient(ellipse 3px 4px at 17% 45%, #ba9852 96%, transparent),
    radial-gradient(ellipse 3px 4px at 27% 29%, #ba9852 96%, transparent),
    radial-gradient(ellipse 3px 4px at 39% 39%, #ba9852 96%, transparent),
    radial-gradient(ellipse 3px 4px at 29% 56%, #ba9852 96%, transparent),
    radial-gradient(ellipse 3px 4px at 61% 64%, #ba9852 96%, transparent),
    radial-gradient(ellipse 3px 4px at 72% 48%, #ba9852 96%, transparent),
    radial-gradient(ellipse 3px 4px at 84% 59%, #ba9852 96%, transparent),
    radial-gradient(ellipse 3px 4px at 73% 75%, #ba9852 96%, transparent);
}
.festive-page.festive-kali-diwali .festive-ambient i { top: 24%; left: 3%; width: 18px; height: 24px; border-radius: 55% 45% 50% 50%; background: radial-gradient(ellipse at 50% 78%, #e8b455 0 30%, #fff1be 32% 43%, transparent 47%); animation-name: festive-diya-glow; }
.festive-page.festive-kali-diwali .festive-ambient i:nth-child(2) { top: 68%; left: 3%; }
.festive-page.festive-kali-diwali .festive-ambient i:nth-child(3) { top: 24%; right: 3%; left: auto; }
.festive-page.festive-kali-diwali .festive-ambient i:nth-child(4) { top: 68%; right: 3%; left: auto; }
.festive-page.festive-christmas .festive-lights { opacity: .86; background-size: 64px 28px, 128px 20px; }
.festive-page.festive-christmas .festive-ambient i { width: 5px; height: 5px; border: 1px solid rgba(255,255,255,.85); background: rgba(255,255,255,.55); animation-name: festive-snow; }
.festive-page.festive-new-year .festive-welcome { position: relative; overflow: visible; }
.festive-welcome-message { position: relative; z-index: 1; }
.festive-confetti { position: absolute; z-index: 0; inset: 0; pointer-events: none; }
.festive-confetti i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 9px;
  border-radius: 1px;
  opacity: 0;
  background: #d6a143;
  animation: festive-confetti-burst 1.8s ease-out var(--confetti-delay, 0ms) forwards;
}
.festive-confetti i:nth-child(3n+1) { background: #b72c3b; }
.festive-confetti i:nth-child(3n+2) { background: #718668; }
.festive-confetti i:nth-child(even) { width: 4px; height: 4px; border-radius: 50%; }
.festive-page.festive-poila-baisakh .festive-toran {
  position: absolute;
  inset: 0 0 auto;
  height: 28px;
  opacity: .52;
  background:
    linear-gradient(180deg, transparent 9px, #94754a 10px 11px, transparent 12px),
    radial-gradient(ellipse 9px 13px at 50% 30%, #718364 0 65%, transparent 70%) 0 0 / 30px 24px repeat-x;
}
.festive-page.festive-eid .festive-crescent {
  position: absolute;
  top: 34px;
  right: 40px;
  width: 28px;
  height: 28px;
  opacity: .62;
  background: radial-gradient(circle at 69% 29%, transparent 0 43%, #d7bf81 46% 68%, transparent 71%);
}
.festive-page.festive-eid .festive-ambient i { top: 24%; left: 3%; }
.festive-page.festive-eid .festive-ambient i:nth-child(2) { top: 68%; left: 3%; }
.festive-page.festive-eid .festive-ambient i:nth-child(3) { top: 24%; right: 3%; left: auto; }
.festive-page.festive-eid .festive-ambient i:nth-child(4) { top: 68%; right: 3%; left: auto; }
.festive-page.festive-saraswati-puja .festive-ambient i { background: radial-gradient(ellipse at center, #e7bb39 0 9%, transparent 11%), radial-gradient(ellipse at 50% 20%, #d96640 0 36%, transparent 40%), radial-gradient(ellipse at 75% 50%, #d96640 0 34%, transparent 38%), radial-gradient(ellipse at 50% 78%, #d96640 0 34%, transparent 38%), radial-gradient(ellipse at 25% 50%, #d96640 0 34%, transparent 38%); animation-name: festive-petal-drift; }
.festive-page.festive-holi[data-festive-decorations~="hover"] .button:hover,
.festive-page.festive-holi[data-festive-decorations~="hover"] .nav-cta:hover { box-shadow: 0 0 0 4px rgba(191, 106, 128, .18), 0 10px 28px rgba(38, 31, 18, .15); }
.festive-page.festive-eid .festive-ambient i { width: 22px; height: 28px; border-radius: 50% 50% 40% 40%; border: 1px solid rgba(203, 177, 112, .5); background: radial-gradient(ellipse at center, rgba(255,236,176,.62), rgba(255,236,176,.05) 65%, transparent 70%); animation-name: festive-lantern-drift; }
.festive-page.festive-rabindra-jayanti .festive-greeting { border-radius: 4px; font-family: "Noto Serif Bengali", Georgia, serif; letter-spacing: .04em; }
.festive-page.festive-halloween .festive-alpana { opacity: .16; filter: sepia(.5); }
.festive-cobweb {
  position: absolute;
  top: 0;
  left: 0;
  width: 112px;
  height: 112px;
  opacity: .3;
  background:
    repeating-conic-gradient(from 0deg at 0 0, transparent 0deg 11deg, rgba(105, 91, 72, .7) 11.5deg 12deg, transparent 12.5deg 30deg),
    radial-gradient(circle at 0 0, transparent 0 25%, rgba(105, 91, 72, .7) 26% 27%, transparent 28% 45%, rgba(105, 91, 72, .65) 46% 47%, transparent 48% 66%, rgba(105, 91, 72, .6) 67% 68%, transparent 69%);
  mask: linear-gradient(135deg, #000 0 58%, transparent 78%);
}
.festive-bats { position: absolute; top: 11%; left: 6%; width: 88%; height: 45px; }
.festive-bats i {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 14px;
  opacity: 0;
  background: #51463f;
  clip-path: polygon(50% 30%, 37% 0, 34% 44%, 0 5%, 15% 76%, 36% 54%, 50% 100%, 64% 54%, 85% 76%, 100% 5%, 66% 44%, 63% 0);
  animation: festive-bat-drift 4.5s ease-out 1 forwards;
}
.festive-bats i:nth-child(2) { top: 14px; left: 46%; width: 18px; animation-delay: .6s; }
.festive-bats i:nth-child(3) { top: 2px; left: 88%; width: 20px; animation-delay: 1.2s; }
.festive-page.festive-national-days .festive-border { opacity: .62; background: linear-gradient(90deg,#e9a360 0 33%,rgba(255,255,255,.85) 33% 66%,#7f9c78 66%) top/100% 4px no-repeat,linear-gradient(90deg,#e9a360 0 33%,rgba(255,255,255,.85) 33% 66%,#7f9c78 66%) bottom/100% 4px no-repeat; }

.festive-page:not([data-festive-off="1"]) {
  --yellow: var(--festive-accent-on-light);
  background:
    radial-gradient(ellipse at 82% 16%, color-mix(in srgb, var(--festive-accent) 14%, transparent), transparent 30rem),
    radial-gradient(ellipse at 8% 62%, rgba(255, 255, 255, .7), transparent 34rem),
    var(--paper);
  background-attachment: fixed;
}

.festive-page:not([data-festive-off="1"]) .dark-section { --yellow: var(--festive-accent-on-dark); }
.festive-page:not([data-festive-off="1"]) .nav-cta,
.festive-page:not([data-festive-off="1"]) .button-yellow {
  background: var(--festive-accent);
  color: var(--festive-contrast);
}

.festive-page:not([data-festive-off="1"]) .hero-shape.shape-one,
.festive-page:not([data-festive-off="1"]) .orbit-core {
  background:
    radial-gradient(ellipse at 28% 20%, rgba(255, 255, 255, .88), transparent 34%),
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--festive-accent) 72%, white),
      color-mix(in srgb, var(--festive-accent) 82%, black)
    );
}

.festive-page:not([data-festive-off="1"]) .orbit-core {
  background: var(--festive-accent);
  color: var(--festive-contrast);
}
.festive-page:not([data-festive-off="1"]) .orbit-ring-two:after { background: var(--festive-accent); }

.festive-page[data-festive-decorations~="greeting"]:not(.page-home) .festive-welcome:not([hidden]) { margin-bottom: 8px; }
.festive-page[data-festive-decorations~="border"]:after {
  position: fixed;
  z-index: 3;
  inset: 8px;
  border: 1px solid color-mix(in srgb, var(--festive-accent) 22%, transparent);
  content: "";
  pointer-events: none;
}
.festive-page[data-festive-off="1"] .festive-decor,
.festive-page[data-festive-off="1"] .festive-greeting,
.festive-page[data-festive-off="1"] .festive-welcome,
.festive-page[data-festive-off="1"]:after { display: none !important; }
.festive-page[data-festive-off="1"] { --yellow: var(--brand-accent); }
.festive-paused .festive-decor *,
.festive-paused .festive-decor:before,
.festive-paused .festive-decor:after,
.festive-paused .festive-welcome,
.festive-paused .festive-welcome * { animation-play-state: paused !important; }

@keyframes festive-light-warm { to { opacity: .46; filter: drop-shadow(0 0 2px rgba(255, 195, 107, .4)); } }
@keyframes festive-drift { to { transform: translate3d(10px, 105vh, 0) rotate(160deg); } }
@keyframes festive-shiuli-fall { to { transform: translate3d(-22px, 105vh, 0) rotate(220deg); } }
@keyframes festive-grass-sway { to { transform: skewX(2deg) translateY(4px); } }
@keyframes festive-diya-glow { 50% { opacity: .7; filter: drop-shadow(0 0 12px rgba(247, 191, 95, .75)); } }
@keyframes festive-snow { to { transform: translate3d(20px, 105vh, 0); } }
@keyframes festive-confetti-fall { to { transform: translate3d(36px, 105vh, 0) rotate(280deg); } }
@keyframes festive-confetti-burst {
  0% { opacity: .75; transform: translate(-50%, -50%) rotate(0); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--confetti-x)), calc(-50% + var(--confetti-y))) rotate(220deg); }
}
@keyframes festive-bat-drift {
  15% { opacity: .42; }
  100% { opacity: 0; transform: translate3d(90px, 22px, 0) scale(.82); }
}
@keyframes festive-petal-drift { to { transform: translate3d(-16px, 105vh, 0) rotate(180deg); } }
@keyframes festive-lantern-drift { 50% { transform: translateY(12px); opacity: .65; } }
@keyframes festive-welcome-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 700px) {
  .festive-alpana { top: 10px; width: 70px; height: 70px; }
  .festive-alpana-left { left: 4px; }
  .festive-alpana-right { right: 4px; }
  .festive-border { opacity: .4; }
  .festive-page[data-festive-decorations~="border"].festive-durga-puja .festive-border {
    background-size: 66px 24px, 66px 24px, 18px 64px, 18px 64px;
  }
  .festive-ambient i:nth-child(n+3) { display: none; }
  .festive-page.festive-durga-puja[data-festive-decorations~="ambient"] .festive-ambient i { width: 17px; height: 17px; }
  .festive-kash { height: 48px; opacity: .2; }
  .festive-footprints { top: 20px; right: 18px; transform: scale(.78); transform-origin: top right; }
  .festive-crescent { top: 24px; right: 22px; transform: scale(.8); }
  .festive-cobweb { width: 72px; height: 72px; }
  .festive-bats { left: 4%; width: 82%; }
  .festive-page.festive-kali-diwali .festive-ambient i:nth-child(2),
  .festive-page.festive-eid .festive-ambient i:nth-child(2) { right: 3%; left: auto; }
  .festive-page[data-festive-decorations~="border"].festive-durga-puja .festive-border {
    background-size: 38px 13px, 38px 13px, 13px 38px, 13px 38px;
  }
  .festive-page.festive-durga-puja[data-festive-decorations~="ambient"] .festive-ambient i:nth-child(1) { left: 1%; }
  .festive-page.festive-durga-puja[data-festive-decorations~="ambient"] .festive-ambient i:nth-child(2) { left: 95%; }
  .festive-toggle { min-height: 36px; padding: 8px 11px; font-size: .67rem; }
  .festive-preview-banner { flex-wrap: wrap; gap: 4px 12px; text-align: center; }
  .festive-greeting { max-width: calc(100% - 8px); font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .festive-decor *,
  .festive-decor:before,
  .festive-decor:after,
  .festive-welcome:not([hidden]) {
    animation: none !important;
    transition: none !important;
  }
}
