/* ==========================================================================
   Siyoro — Opening Splash ("Namaste Bharat")
   Plays once on every fresh load of the site / installed PWA.
   Uses the same cream + burnt-orange pairing as manifest.json
   (background_color #FAF9F6, theme_color #C84A3A) so it feels like
   part of the brand, not a bolted-on loader.
   ========================================================================== */

body.siyoro-splash-lock {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
}

.siyoro-splash {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAF9F6;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.siyoro-splash__grain {
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(circle at 18% 20%, rgba(200, 74, 58, 0.10), transparent 45%),
        radial-gradient(circle at 85% 82%, rgba(200, 74, 58, 0.08), transparent 42%);
    pointer-events: none;
}

.siyoro-splash__mark {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1.5rem;
}

.siyoro-splash__namaste {
    font-family: 'Caveat', 'Permanent Marker', cursive;
    font-weight: 700;
    font-size: clamp(3.2rem, 15vw, 6.5rem);
    line-height: 1;
    color: #1a1a1a;
    opacity: 0;
    transform: scale(0.82) rotate(-4deg);
    animation: siyoroNamasteIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s forwards;
    will-change: transform, opacity;
}

.siyoro-splash__route {
    width: clamp(140px, 32vw, 220px);
    height: 34px;
    margin-top: -0.4rem;
    display: block;
    overflow: visible;
}

.siyoro-splash__route-path {
    fill: none;
    stroke: #C84A3A;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: siyoroDrawRoute 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.75s forwards;
}

.siyoro-splash__route-dot {
    fill: #C84A3A;
    opacity: 0;
    animation: siyoroDotPop 0.4s ease 1.35s forwards;
}

.siyoro-splash__bharat {
    margin-top: 0.6rem;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-weight: 600;
    font-size: clamp(0.8rem, 2.6vw, 1rem);
    text-transform: uppercase;
    color: #6B6157;
    opacity: 0;
    letter-spacing: 0.8em;
    animation: siyoroBharatIn 0.7s ease 1.15s forwards;
}

@keyframes siyoroNamasteIn {
    0% { opacity: 0; transform: scale(0.82) rotate(-4deg); }
    60% { opacity: 1; transform: scale(1.05) rotate(1.5deg); }
    100% { opacity: 1; transform: scale(1) rotate(-1deg); }
}

@keyframes siyoroDrawRoute {
    to { stroke-dashoffset: 0; }
}

@keyframes siyoroDotPop {
    0% { opacity: 0; transform: scale(0.3); }
    60% { opacity: 1; transform: scale(1.4); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes siyoroBharatIn {
    to { opacity: 1; letter-spacing: 0.35em; }
}

.siyoro-splash--exit {
    animation: siyoroSplashExit 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

@keyframes siyoroSplashExit {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.07); }
}

/* Respect users who've asked for less motion — keep the brand moment,
   drop the movement. */
@media (prefers-reduced-motion: reduce) {
    .siyoro-splash__namaste,
    .siyoro-splash__bharat,
    .siyoro-splash__route-path,
    .siyoro-splash__route-dot {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        letter-spacing: 0.35em;
        stroke-dashoffset: 0;
    }
    .siyoro-splash--exit {
        animation-duration: 0.25s !important;
    }
}

@media (max-width: 420px) {
    .siyoro-splash__bharat { letter-spacing: 0.6em; }
    @keyframes siyoroBharatIn { to { opacity: 1; letter-spacing: 0.3em; } }
}
