/* ==========================================================
   Varsha Sahakari - animations & transitions
   Loaded after home.css. Everything that hides content on load
   is scoped under .js-anim, so the site stays fully visible
   if JavaScript is off. Respects "reduce motion" at the bottom.
   ========================================================== */

:root {
    --ease-out: cubic-bezier(.2,.7,.2,1);
    --ease-spring: cubic-bezier(.34,1.56,.64,1)
}

html {
    scroll-behavior: smooth
}

/* ---------- keyframes ---------- */
@keyframes fadeIn {
    from { opacity: 0 }
    to { opacity: 1 }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(26px) }
    to { opacity: 1; transform: none }
}

@keyframes logoPop {
    0% { opacity: 0; transform: scale(.4) rotate(-14deg) }
    70% { opacity: 1; transform: scale(1.08) rotate(3deg) }
    100% { opacity: 1; transform: none }
}

@keyframes floaty {
    0%, 100% { transform: translateY(0) }
    50% { transform: translateY(-9px) }
}

@keyframes drift {
    0%, 100% { transform: translate(0,0) scale(1) }
    50% { transform: translate(24px,-30px) scale(1.12) }
}

@keyframes gradientShift {
    0% { background-position: 0% 50% }
    100% { background-position: 100% 50% }
}

@keyframes arrowKick {
    0%, 100% { transform: translate(0,0) }
    50% { transform: translate(3px,-3px) }
}

/* ---------- page entrance ---------- */
main {
    animation: fadeIn .55s ease backwards
}

.rail {
    animation: fadeIn .6s ease backwards
}

.rail-logo img {
    animation: logoPop .9s var(--ease-spring) .1s both
}

/* ---------- scroll progress bar (created by animations.js) ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    z-index: 60;
    background: linear-gradient(90deg, var(--brand), var(--accent), var(--navy));
    transform-origin: left center;
    transform: scaleX(0);
    pointer-events: none
}

/* ---------- rail / menu button ---------- */
.rail-logo img {
    transition: transform .5s var(--ease-spring), filter .3s ease
}

.rail-logo:hover img {
    transform: scale(1.14) rotate(-6deg);
    filter: drop-shadow(0 4px 8px rgba(230,0,69,.35))
}

.menu-btn i {
    transition: width .3s ease, transform .3s ease, background .3s ease
}

    .menu-btn i:nth-child(2) {
        width: 16px;
        margin-left: auto
    }

.menu-btn:hover i {
    background: var(--accent)
}

    .menu-btn:hover i:nth-child(2) {
        width: 24px
    }

.rail-name {
    transition: color .3s ease, letter-spacing .3s ease
}

    .rail-name:hover {
        color: var(--brand);
        letter-spacing: .06em
    }

/* ---------- full-screen menu: slide / fade instead of pop ---------- */
.menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px) scale(.985);
    transition: opacity .35s ease, transform .45s var(--ease-out), visibility 0s linear .45s
}

    .menu.open {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: opacity .35s ease, transform .45s var(--ease-out), visibility 0s
    }

    .menu .cols > div {
        opacity: 0;
        transform: translateY(22px);
        transition: opacity .3s ease, transform .3s ease
    }

    .menu.open .cols > div {
        opacity: 1;
        transform: none;
        transition: opacity .5s ease, transform .6s var(--ease-out)
    }

        .menu.open .cols > div:nth-child(1) { transition-delay: .08s }
        .menu.open .cols > div:nth-child(2) { transition-delay: .16s }
        .menu.open .cols > div:nth-child(3) { transition-delay: .24s }
        .menu.open .cols > div:nth-child(4) { transition-delay: .32s }

    .menu a {
        position: relative;
        transition: color .25s ease, padding-left .3s var(--ease-out)
    }

        .menu a:hover {
            color: var(--brand);
            padding-left: .6rem;
            text-decoration: none
        }

    .menu h4 {
        color: var(--navy)
    }

    .menu .close {
        transition: transform .4s var(--ease-spring), color .25s ease
    }

        .menu .close:hover {
            transform: rotate(90deg) scale(1.1);
            color: var(--brand)
        }

/* ---------- hero ---------- */
.hero-text {
    z-index: 1
}

.hero {
    background-size: 200% 200%;
    animation: gradientShift 14s ease-in-out infinite alternate
}

    /* soft floating colour blobs from the logo palette */
    .hero::before, .hero::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
        filter: blur(6px)
    }

    .hero::before {
        width: 360px;
        height: 360px;
        right: 8%;
        top: -90px;
        background: radial-gradient(circle at 30% 30%, rgba(230,0,69,.22), rgba(230,0,69,0) 70%);
        animation: drift 11s ease-in-out infinite
    }

    .hero::after {
        width: 300px;
        height: 300px;
        right: 22%;
        bottom: -80px;
        background: radial-gradient(circle at 60% 40%, rgba(253,113,2,.25), rgba(253,113,2,0) 70%);
        animation: drift 14s ease-in-out -4s infinite reverse
    }

.hero-logo {
    animation: logoPop 1s var(--ease-spring) .2s both, floaty 5s ease-in-out 1.4s infinite;
    filter: drop-shadow(0 10px 18px rgba(230,0,69,.22))
}

.hero h1 {
    animation: rise .9s var(--ease-out) .45s both
}

.hero .tag {
    animation: rise .9s var(--ease-out) .65s both
}

.hero .ghost {
    animation: rise .9s var(--ease-out) .85s both
}

.script {
    animation: fadeIn 1.6s ease .3s both
}

/* ---------- buttons ---------- */
.ghost, .solid {
    position: relative;
    overflow: hidden;
    transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s var(--ease-out), box-shadow .3s ease
}

    .ghost:hover, .solid:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(230,0,69,.28)
    }

    .solid:hover {
        box-shadow: 0 10px 20px rgba(3,58,132,.3)
    }

    .ghost:active, .solid:active {
        transform: translateY(0) scale(.97);
        box-shadow: none
    }

    /* light sweep across the button on hover */
    .ghost::after, .solid::after {
        content: "";
        position: absolute;
        top: 0;
        left: -80%;
        width: 50%;
        height: 100%;
        background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
        transform: skewX(-20deg);
        transition: left .6s ease
    }

    .ghost:hover::after, .solid:hover::after {
        left: 130%
    }

/* ---------- scheme cards / why-us items ---------- */
.treat .three a, .why .three > div {
    transition: transform .4s var(--ease-out), opacity .7s ease
}

.treat .three a {
    transition: transform .4s var(--ease-out), opacity .7s ease, color .3s ease
}

    .treat .three a img.scheme-img {
        transition: transform .5s var(--ease-out), box-shadow .4s ease
    }

    .treat .three a:hover {
        transform: translateY(-8px)
    }

        .treat .three a:hover img.scheme-img {
            transform: scale(1.05);
            box-shadow: 0 16px 28px rgba(3,58,132,.22)
        }

        .treat .three a:hover h3 {
            color: var(--brand)
        }

    .treat .three a h3 {
        position: relative;
        display: inline-block;
        transition: color .3s ease
    }

        .treat .three a h3::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: -4px;
            height: 3px;
            background: var(--accent);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform .4s var(--ease-out)
        }

    .treat .three a:hover h3::after {
        transform: scaleX(1)
    }

.why .three > div:hover {
    transform: translateY(-6px)
}

.ico {
    transition: transform .5s var(--ease-spring), box-shadow .4s ease
}

.why .three > div:hover .ico {
    transform: scale(1.12) rotate(8deg);
    box-shadow: 0 8px 18px rgba(253,113,2,.35)
}

.photo {
    transition: transform .8s var(--ease-out), opacity .8s ease
}

/* ---------- inner pages ---------- */
.dg-card, .contact-card {
    transition: transform .35s var(--ease-out), box-shadow .35s ease, opacity .7s ease
}

    .contact-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 26px rgba(3,58,132,.12)
    }

.contact-ico {
    transition: transform .4s var(--ease-spring)
}

.contact-card:hover .contact-ico {
    transform: scale(1.2) rotate(-8deg)
}

tbody tr {
    transition: background .25s ease
}

    tbody tr:hover {
        background: var(--pink)
    }

.contact-form input, .contact-form textarea, .four input, .four textarea {
    transition: border-color .25s ease, box-shadow .25s ease
}

    .contact-form input:focus, .contact-form textarea:focus {
        outline: none;
        border-color: var(--brand);
        box-shadow: 0 0 0 3px rgba(230,0,69,.15)
    }

.copy a.priv, .foot a {
    transition: opacity .2s ease, color .2s ease
}

/* ---------- scroll reveal (enabled by animations.js) ----------
   After an element has revealed, animations.js removes data-anim so the
   normal hover transitions above take over again. */
html.js-anim [data-anim] {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity .8s ease, transform .9s var(--ease-out);
    transition-delay: var(--d, 0ms)
}

    html.js-anim [data-anim="left"] { transform: translateX(-60px) }
    html.js-anim [data-anim="right"] { transform: translateX(60px) }
    html.js-anim [data-anim="zoom"] { transform: scale(.88) }

    html.js-anim [data-anim].in {
        opacity: 1;
        transform: none
    }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto
    }

    *, *::before, *::after {
        animation: none !important;
        transition: none !important
    }

    html.js-anim [data-anim] {
        opacity: 1 !important;
        transform: none !important
    }

    .menu {
        transform: none
    }

    .scroll-progress {
        display: none
    }
}
