/* =========================================================
   MASTER CARE INTERNATIONAL SCHOOL
   PRELOADER + HERO
   ========================================================= */


/* =========================================================
   PRELOADER
   ========================================================= */

.preloader {
    position: fixed;
    inset: 0;

    z-index: var(--z-preloader);

    display: grid;
    place-items: center;

    background:
        radial-gradient(
            circle at center,
            rgba(11, 107, 58, 0.35),
            transparent 40%
        ),
        var(--green-950);

    transition:
        opacity 800ms var(--ease-main),
        visibility 800ms var(--ease-main);
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    width: min(320px, 80%);

    text-align: center;
}

.preloader-logo {
    position: relative;

    min-height: 70px;

    display: grid;
    place-items: center;
}

.preloader-logo img {
    width: 190px;
    max-height: 70px;
    object-fit: contain;
}

.preloader-logo-fallback {
    display: flex;
    flex-direction: column;

    color: var(--white);

    line-height: 1;
}

.preloader-logo-fallback strong {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    letter-spacing: 0.1em;
}

.preloader-logo-fallback span {
    margin-top: 7px;

    color: var(--green-400);

    font-size: 0.89rem;
    font-weight: 600;

    letter-spacing: 0.25em;
}

.preloader-line {
    position: relative;

    width: 100%;
    height: 1px;

    margin-top: 2.5rem;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.12);
}

.preloader-line span {
    position: absolute;

    inset: 0;

    width: 0;

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--green-400),
            var(--white),
            var(--green-400),
            transparent
        );

    animation:
        preloader-progress 1.8s var(--ease-main) forwards;
}

.preloader-content p {
    margin-top: 1rem;

    color: var(--platinum-600);

    font-size: 0.68rem;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@keyframes preloader-progress {

    from {
        width: 0;
    }

    to {
        width: 100%;
    }

}


/* =========================================================
   HERO
   ========================================================= */

.hero h1,
.inner-page-hero h1,
.academic-level-hero h1,
.article-hero h1 {
    color: transparent;
    background: var(--gradient-metallic);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    animation: metallic-shift 7s linear infinite;
    filter: drop-shadow(0 0 13px rgba(52, 214, 122, 0.2));
}

.hero h1 span,
.inner-page-hero h1 span,
.academic-level-hero h1 span,
.article-hero h1 span {
    color: transparent;
    background: var(--gradient-metallic);
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: metallic-shift 7s linear infinite;
}

.hero {
    position: relative;

    min-height: 100svh;

    height: 100svh;

    overflow: hidden;

    isolation: isolate;

    background: var(--green-950);

    color: var(--white);
}


/* =========================================================
   HERO SLIDES
   ========================================================= */

.hero-slides {
    position: absolute;
    inset: 0;

    z-index: -5;
}

.hero-slide {
    position: absolute;
    inset: 0;

    opacity: 0;

    visibility: hidden;

    transition:
        opacity 1200ms var(--ease-main),
        visibility 1200ms;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}


/* Image */

.hero-slide-image {
    position: absolute;
    inset: -4%;

    width: 108%;
    height: 108%;

    object-fit: cover;

    transform: scale(1);

    transition:
        transform 8s linear;
}

.hero-slide.active .hero-slide-image {
    transform: scale(1.08);
}


/* =========================================================
   GREEN IMAGE OVERLAY
   ADJUST THIS BLOCK TO CHANGE HOW DARK THE HERO IMAGE LOOKS
   ========================================================= */

.hero-slide-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(3, 23, 13, 0.62) 0%,
            rgba(6, 43, 24, 0.46) 50%,
            rgba(11, 107, 58, 0.24) 100%
        );

    z-index: 1;
}


/* Additional bottom darkness - make this lighter too */

.hero-slide-overlay::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            0deg,
            rgba(3, 23, 13, 0.12),
            transparent 55%
        );
}


/* =========================================================
   MESH GLOW
   ========================================================= */

.hero-mesh {
    position: absolute;

    width: 55vw;
    height: 55vw;

    top: -25%;
    right: -10%;

    z-index: -1;

    background:
        radial-gradient(
            circle,
            rgba(52, 214, 122, 0.18),
            rgba(11, 107, 58, 0.08) 35%,
            transparent 70%
        );

    filter: blur(30px);

    animation:
        hero-mesh-move 10s ease-in-out infinite alternate;

    pointer-events: none;
}

@keyframes hero-mesh-move {

    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(-8%, 12%, 0) scale(1.15);
    }

}


/* =========================================================
   PARTICLES
   ========================================================= */

.hero-particles {
    position: absolute;
    inset: 0;

    z-index: 1;

    overflow: hidden;

    pointer-events: none;
}

.hero-particles span {
    position: absolute;

    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: var(--green-400);

    box-shadow:
        0 0 12px rgba(52, 214, 122, 0.7);

    opacity: 0;

    animation:
        particle-float 8s linear infinite;
}

.hero-particles span:nth-child(1) {
    left: 8%;
    bottom: 10%;
    animation-delay: 0s;
}

.hero-particles span:nth-child(2) {
    left: 18%;
    bottom: 30%;
    animation-delay: 1.5s;
}

.hero-particles span:nth-child(3) {
    left: 32%;
    bottom: 15%;
    animation-delay: 3s;
}

.hero-particles span:nth-child(4) {
    left: 55%;
    bottom: 25%;
    animation-delay: 2s;
}

.hero-particles span:nth-child(5) {
    left: 68%;
    bottom: 12%;
    animation-delay: 4s;
}

.hero-particles span:nth-child(6) {
    left: 78%;
    bottom: 38%;
    animation-delay: 1s;
}

.hero-particles span:nth-child(7) {
    left: 88%;
    bottom: 18%;
    animation-delay: 5s;
}

.hero-particles span:nth-child(8) {
    left: 45%;
    bottom: 45%;
    animation-delay: 3.5s;
}

@keyframes particle-float {

    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    20% {
        opacity: 0.8;
    }

    80% {
        opacity: 0.35;
    }

    100% {
        opacity: 0;
        transform: translateY(-180px);
    }

}


/* =========================================================
   HERO CONTENT
   ========================================================= */

.hero-content {
    position: relative;

    z-index: 3;

    height: 100%;

    display: flex;
    align-items: center;
}

.hero-content-inner {
    width: min(800px, 100%);

    padding-top: 5rem;
}


/* Eyebrow */

.hero-eyebrow {
    display: inline-flex;
    align-items: center;

    gap: 0.7rem;

    margin-bottom: 1.5rem;

    color: var(--green-400);

    font-size: 0.68rem;
    font-weight: 700;

    letter-spacing: 0.2em;
    text-transform: uppercase;

    opacity: 0;
    transform: translateY(20px);
}

.hero-eyebrow::before {
    content: "";

    width: 32px;
    height: 1px;

    background: var(--green-400);
}


/* Title */

.hero-title {
    max-width: 850px;

    color: var(--white);

    font-family: var(--font-heading);

    font-size:
        clamp(
            3rem,
            6.2vw,
            6.5rem
        );

    font-weight: 600;

    letter-spacing: -0.055em;

    line-height: 0.98;
}


/* Word animation */

.hero-title .hero-word {
    display: inline-block;

    margin-right: 0.18em;

    opacity: 0;

    transform: translateY(35px);

    transition:
        opacity 700ms var(--ease-main),
        transform 700ms var(--ease-main);
}

.hero-title.reveal .hero-word {
    opacity: 1;
    transform: translateY(0);
}


/* Description */

.hero-description {
    width: min(580px, 100%);

    margin-top: 1.7rem;

    color: rgba(255, 255, 255, 0.76);

    font-size: clamp(0.9rem, 1.2vw, 1.05rem);

    line-height: 1.8;

    opacity: 0;

    transform: translateY(20px);

    transition:
        opacity 700ms 350ms var(--ease-main),
        transform 700ms 350ms var(--ease-main);
}

.hero-description.show {
    opacity: 1;
    transform: translateY(0);
}


/* Buttons */

.hero-buttons {
    display: flex;
    flex-wrap: wrap;

    gap: 0.8rem;

    margin-top: 2rem;

    opacity: 0;

    transform: translateY(20px);

    transition:
        opacity 700ms 500ms var(--ease-main),
        transform 700ms 500ms var(--ease-main);
}

.hero-buttons.show {
    opacity: 1;
    transform: translateY(0);
}

.hero-buttons .btn {
    min-width: 145px;
}


/* =========================================================
   HERO CONTROLS
   ========================================================= */

.hero-controls {
    position: absolute;

    left: 50%;
    bottom: 3rem;

    z-index: 5;

    transform: translateX(-50%);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 2rem;
}


/* Progress */

.hero-progress {
    display: flex;
    align-items: center;

    gap: 0.55rem;

    width: min(450px, 50vw);
}

.hero-progress-item {
    position: relative;

    height: 2px;

    flex: 1;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.25);

    cursor: pointer;
}

.hero-progress-item span {
    position: absolute;

    inset: 0;

    width: 0;

    background: var(--green-400);
}

.hero-progress-item.active span {
    animation:
        hero-progress 6s linear forwards;
}

@keyframes hero-progress {

    from {
        width: 0;
    }

    to {
        width: 100%;
    }

}


/* Navigation */

.hero-navigation {
    display: flex;

    gap: 0.55rem;
}

.hero-arrow {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    color: var(--white);

    background: rgba(255, 255, 255, 0.06);

    border: 1px solid rgba(255, 255, 255, 0.2);

    border-radius: 50%;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transition:
        background var(--duration-fast) ease,
        border-color var(--duration-fast) ease,
        transform var(--duration-fast) ease;
}

.hero-arrow:hover {
    background: rgba(52, 214, 122, 0.15);

    border-color: var(--green-400);

    transform: translateY(-2px);
}


/* =========================================================
   SCROLL INDICATOR
   ========================================================= */

.hero-scroll {
    position: absolute;

    right: 3rem;
    bottom: 3rem;

    z-index: 5;

    display: flex;
    align-items: center;

    gap: 0.8rem;

    color: rgba(255, 255, 255, 0.6);

    font-size: 0.62rem;
    font-weight: 600;

    letter-spacing: 0.16em;
    text-transform: uppercase;

    writing-mode: vertical-rl;

    transition:
        color var(--duration-fast) ease;
}

.hero-scroll:hover {
    color: var(--green-400);
}

.hero-scroll-line {
    width: 1px;
    height: 48px;

    background:
        linear-gradient(
            to bottom,
            var(--green-400),
            transparent
        );
}


/* =========================================================
   PHILOSOPHY TEMPORARY
   ========================================================= */

.philosophy-placeholder {
    min-height: 500px;

    display: grid;
    place-items: center;

    background: var(--white);
}

.philosophy-placeholder .section-label {
    display: block;

    margin-bottom: 1rem;

    color: var(--green-700);

    font-size: 0.7rem;
    font-weight: 700;

    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.philosophy-placeholder h2 {
    max-width: 700px;

    font-size:
        clamp(
            2.5rem,
            5vw,
            5rem
        );

    letter-spacing: -0.05em;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {

    .hero-content-inner {
        padding-top: 3rem;
    }

    .hero-title {
        font-size:
            clamp(
                2.7rem,
                12vw,
                4.5rem
            );
    }

    .hero-description {
        max-width: 500px;
    }

    .hero-controls {
        bottom: 1.5rem;

        gap: 1rem;
    }

    .hero-progress {
        width: 55vw;
    }

    .hero-arrow {
        width: 42px;
        height: 42px;
    }

    .hero-scroll {
        display: none;
    }

}


@media (max-width: 500px) {

    .hero-slide-overlay {
        background:
            linear-gradient(
                90deg,
                rgba(3, 23, 13, 0.88),
                rgba(6, 43, 24, 0.68)
            );
    }

    .hero-content-inner {
        padding-top: 2rem;
    }

    .hero-eyebrow {
        font-size: 0.58rem;
    }

    .hero-title {
        font-size: clamp(2.6rem, 13vw, 4rem);
    }

    .hero-description {
        font-size: 0.85rem;
    }

    .hero-buttons {
        margin-top: 1.5rem;
    }

    .hero-buttons .btn {
        min-height: 48px;
        padding-inline: 1rem;
    }

    .hero-controls {
        width: calc(100% - 10%);

        justify-content: center;
    }

    .hero-progress {
        width: 100%;
    }

    .hero-navigation {
        display: none;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .hero-slide-image {
        transform: none !important;
    }

    .hero-mesh,
    .hero-particles span {
        animation: none !important;
    }

    .hero-title .hero-word,
    .hero-description,
    .hero-buttons,
    .hero-eyebrow {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

}