/* Diwali theme (temporary). To retire, see the note at the top of diwali.php. */

/* ---- Fairy lights across the top of the header ---- */
.diwali-fairy-lights {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.diwali-fairy-lights img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    /* The light string sits ~30% down the image; % margins are relative to width, so this tracks any screen size. */
    margin-top: -9.6%;
    animation: diwaliLightsGlow 2.6s ease-in-out infinite;
}
.header > .container {
    position: relative;
    z-index: 1;
}
/* Room for the lights above the nav, and a bigger logo because the diyas take up part of its width. */
.header {
    padding-top: 44px !important;
}
.header .logo img {
    width: 210px;
}
@media screen and (max-width: 991px) {
    .header .logo img { width: 180px; }
}
@media screen and (max-width: 767px) {
    .header { padding-top: 34px !important; }
    .header .logo img { width: 160px; }
    .diwali-fairy-lights img {
        width: 180%;
        margin-top: -17.4%;
    }
}
@keyframes diwaliLightsGlow {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.85; filter: brightness(1.25); }
}

/* ---- Rangoli + diyas in the homepage hero, bottom-left ---- */
.diwali-rangoli {
    position: absolute;
    left: 0;
    bottom: 0;
    width: clamp(170px, 24vw, 380px);
    height: auto;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}
@media screen and (max-width: 767px) {
    .diwali-rangoli {
        opacity: 0.55;
    }
}

/* ---- Rocket button (same look as vtracking), sits just above the back-to-top button ---- */
.diwali-rocket-btn {
    position: fixed;
    right: 80px;
    bottom: 252px;
    z-index: 11;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 8px 22px rgba(60, 25, 0, 0.45), 0 0 0 3px rgba(255, 181, 46, 0.85);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    animation: diwaliRocketBob 1.8s ease-in-out infinite;
}
.diwali-rocket-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255, 181, 46, 0.6);
    animation: diwaliRocketPulse 1.8s ease-out infinite;
    pointer-events: none;
}
.diwali-rocket-btn:focus-visible {
    outline: 2px solid #ffb52e;
    outline-offset: 4px;
}
.diwali-rocket-btn:active {
    animation: none;
    transform: scale(0.88);
}
.diwali-rocket-btn img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}
.diwali-rocket-btn__label {
    position: absolute;
    left: 50%;
    bottom: -9px;
    transform: translateX(-50%);
    padding: 1px 7px;
    border-radius: 999px;
    background: #ffb52e;
    color: #3b1d00;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    white-space: nowrap;
}

@keyframes diwaliRocketBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes diwaliRocketPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 181, 46, 0.6); }
    100% { box-shadow: 0 0 0 16px rgba(255, 181, 46, 0); }
}

/* Breakpoints mirror #button (back-to-top) in responsive.css: same right edge and width, stacked above it. */
@media screen and (max-width: 1440px) {
    .diwali-rocket-btn { right: 30px; }
}
@media screen and (max-width: 1199px) {
    .diwali-rocket-btn { width: 60px; height: 60px; bottom: 207px; }
}
@media screen and (max-width: 991px) {
    .diwali-rocket-btn { width: 55px; height: 55px; right: 20px; bottom: 191px; }
}
@media screen and (max-width: 767px) {
    .diwali-rocket-btn { width: 50px; height: 50px; right: 15px; bottom: 210px; }
}
@media screen and (max-width: 575px) {
    .diwali-rocket-btn { width: 50px; height: 50px; right: 33px; bottom: 189px; }
}

@media (prefers-reduced-motion: reduce) {
    .diwali-fairy-lights img,
    .diwali-rocket-btn,
    .diwali-rocket-btn::after { animation: none; }
}

/* ---- Fireworks canvas over the whole page ---- */
#diwaliFireworks {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    pointer-events: none;
    z-index: 9999;
}
