/* =========================================================
   MASTER CARE INTERNATIONAL SCHOOL
   GLOBAL ANIMATION SYSTEM
   ========================================================= */


/* =========================================================
   SCROLL REVEAL
   ========================================================= */

[data-reveal],
.reveal-up,
.philosophy-card,
.level-card,
.campus-feature,
.campus-small-card,
.news-card,
.facility-card {
    opacity: 0;
    transform: translateY(35px);
    transition:
        opacity 0.8s var(--ease-main),
        transform 0.8s var(--ease-main);
}

[data-reveal].is-visible,
.reveal-up.is-visible,
.philosophy-card.is-visible,
.level-card.is-visible,
.campus-feature.is-visible,
.campus-small-card.is-visible,
.news-card.is-visible,
.facility-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.news-card {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   STAGGERED CARD ANIMATION
   ========================================================= */

.philosophy-card:nth-child(2),
.level-card:nth-child(2),
.campus-small-card:nth-child(2),
.news-card:nth-child(2) {
    transition-delay: 100ms;
}

.philosophy-card:nth-child(3),
.level-card:nth-child(3),
.campus-small-card:nth-child(3),
.news-card:nth-child(3) {
    transition-delay: 200ms;
}

.philosophy-card:nth-child(4),
.campus-small-card:nth-child(4),
.news-card:nth-child(4) {
    transition-delay: 300ms;
}


/* =========================================================
   FADE UP
   ========================================================= */

.fade-up {
    opacity: 0;
    transform: translateY(45px);
    transition:
        opacity 0.9s var(--ease-main),
        transform 0.9s var(--ease-main);
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   FADE IN
   ========================================================= */

.fade-in {
    opacity: 0;
    transition:
        opacity 1s var(--ease-main);
}

.fade-in.is-visible {
    opacity: 1;
}


/* =========================================================
   SCALE REVEAL
   ========================================================= */

.scale-reveal {
    opacity: 0;
    transform: scale(0.94);
    transition:
        opacity 0.9s var(--ease-main),
        transform 0.9s var(--ease-main);
}

.scale-reveal.is-visible {
    opacity: 1;
    transform: scale(1);
}


/* =========================================================
   IMAGE REVEAL
   ========================================================= */

.image-reveal {
    overflow: hidden;
}

.image-reveal img {
    opacity: 0;
    transform: scale(1.08);
    transition:
        opacity 0.9s var(--ease-main),
        transform 1.2s var(--ease-main);
}

.image-reveal.is-visible img {
    opacity: 1;
    transform: scale(1);
}


/* =========================================================
   SECTION TITLE REVEAL
   ========================================================= */

.section-title-reveal {
    overflow: hidden;
}

.section-title-reveal > * {
    opacity: 0;
    transform: translateY(100%);
    transition:
        opacity 0.8s var(--ease-main),
        transform 0.8s var(--ease-main);
}

.section-title-reveal.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================================
   METALLIC TEXT
   ========================================================= */

@keyframes metallicShift {

    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }

}

.metallic-text {
    background-size: 250% auto;
    animation:
        metallicShift 7s ease-in-out infinite;
}


/* =========================================================
   FLOATING
   ========================================================= */

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

}

.float-animation {
    animation:
        floating 5s ease-in-out infinite;
}


/* =========================================================
   SOFT PULSE
   ========================================================= */

@keyframes softPulse {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.04);
    }

}

.soft-pulse {
    animation:
        softPulse 4s ease-in-out infinite;
}


/* =========================================================
   GREEN GLOW
   ========================================================= */

@keyframes greenGlow {

    0%,
    100% {
        box-shadow:
            0 0 0 rgba(52, 214, 122, 0);
    }

    50% {
        box-shadow:
            0 0 45px rgba(52, 214, 122, 0.18);
    }

}

.green-glow {
    animation:
        greenGlow 4s ease-in-out infinite;
}


/* =========================================================
   SHIMMER
   ========================================================= */

@keyframes shimmer {

    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(120%);
    }

}

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 35%;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.12),
            transparent
        );
    transform: translateX(-120%);
    pointer-events: none;
}

.shimmer:hover::after {
    animation:
        shimmer 1s ease;
}


/* =========================================================
   HORIZONTAL LINE REVEAL
   ========================================================= */

.line-reveal {
    position: relative;
    overflow: hidden;
}

.line-reveal::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--green-400);
    transform: scaleX(0);
    transform-origin: left;
    transition:
        transform 0.8s var(--ease-main);
}

.line-reveal.is-visible::after {
    transform: scaleX(1);
}


/* =========================================================
   MAGNETIC BUTTON TRANSITION
   ========================================================= */

.btn,
.header-apply-btn,
.mobile-apply-btn {
    will-change: transform;
}


/* =========================================================
   PAGE TRANSITION
   ========================================================= */

.page-transition {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--green-950);
    pointer-events: none;
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.5s var(--ease-main),
        transform 0.7s var(--ease-main);
}

.page-transition.loaded {
    opacity: 0;
    transform: translateY(-100%);
}


/* =========================================================
   HOVER IMAGE MOTION
   ========================================================= */

.hover-image-motion {
    overflow: hidden;
}

.hover-image-motion img {
    transition:
        transform 1.2s var(--ease-main);
}

.hover-image-motion:hover img {
    transform: scale(1.06);
}


/* =========================================================
   CARD HOVER LIFT
   ========================================================= */

.hover-lift {
    transition:
        transform 0.45s var(--ease-main),
        box-shadow 0.45s var(--ease-main);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}


/* =========================================================
   GROWTH LINE
   ========================================================= */

.growth-line-svg {
    overflow: visible;
}

.growth-line-progress {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition:
        stroke-dashoffset 1.8s var(--ease-main);
}

.growth-wrapper.is-visible
.growth-line-progress {
    stroke-dashoffset: 0;
}


/* =========================================================
   GROWTH NODES
   ========================================================= */

.growth-node {
    opacity: 0;
    transform: scale(0.7);
    transition:
        opacity 0.5s var(--ease-main),
        transform 0.5s var(--ease-main);
}

.growth-wrapper.is-visible .growth-node {
    opacity: 1;
    transform: scale(1);
}

.growth-wrapper.is-visible
.growth-node:nth-child(1) {
    transition-delay: 0.5s;
}

.growth-wrapper.is-visible
.growth-node:nth-child(2) {
    transition-delay: 0.9s;
}

.growth-wrapper.is-visible
.growth-node:nth-child(3) {
    transition-delay: 1.3s;
}


/* =========================================================
   HERO PARTICLE MOTION
   ========================================================= */

@keyframes particleFloat {

    0% {
        transform:
            translate3d(0, 0, 0);
        opacity: 0;
    }

    20% {
        opacity: 0.7;
    }

    80% {
        opacity: 0.7;
    }

    100% {
        transform:
            translate3d(0, -100px, 0);
        opacity: 0;
    }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }


    [data-reveal],
    .philosophy-card,
    .level-card,
    .campus-feature,
    .campus-small-card,
    .news-card,
    .facility-card,
    .fade-up,
    .fade-in,
    .scale-reveal {
        opacity: 1;
        transform: none;
    }


    .growth-line-progress {
        stroke-dashoffset: 0;
    }


    .growth-node {
        opacity: 1;
        transform: none;
    }

}

.reveal-up {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.8s var(--ease-main),
        transform 0.8s var(--ease-main);
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}