/* Motion layer: states and decorations driven by js/motion.js (GSAP). */

/* Hide hero until the intro timeline takes over (class is removed by JS or a 3s fallback). */
html.js-motion .hero-text,
html.js-motion .hero-image {
    visibility: hidden;
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1100;
    background: linear-gradient(90deg, var(--gold), var(--gold-2));
    transform: scaleX(0);
    transform-origin: 0 50%;
    pointer-events: none;
}

/* Header gets denser after scrolling */
.header {
    transition: box-shadow 0.35s ease, background-color 0.35s ease;
}

.header.is-scrolled {
    background: rgba(28, 20, 36, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Hero decorative orbs */
.hero {
    position: relative;
    overflow: hidden;
}

.hero > .container {
    position: relative;
    z-index: 1;
}

.hero-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    will-change: transform;
}

.hero-orb--purple {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -140px;
    background: radial-gradient(circle, rgba(74, 60, 124, 0.35), transparent 70%);
}

.hero-orb--gold {
    width: 360px;
    height: 360px;
    bottom: -100px;
    right: 8%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.35), transparent 70%);
}

.hero-orb--small {
    width: 180px;
    height: 180px;
    top: 30%;
    left: 45%;
    background: radial-gradient(circle, rgba(244, 225, 137, 0.45), transparent 70%);
}

/* SplitText line masks */
.split-line {
    overflow: hidden;
    padding-bottom: 0.08em;
}

/* Gradient text must stay on the word elements after splitting */
.hero-text h1 .highlight .split-word,
.hero-text h1 .highlight .split-char {
    background: linear-gradient(135deg, var(--dark-purple), var(--sandy-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Section title underline is scaled by JS through a custom property */
.section-title::after {
    transform: translateX(-50%) scaleX(var(--line-scale, 1));
}

/* Cards: smoother hover lift */
.report-card,
.fundraising-card,
.project-card,
.stat-item,
.org-card {
    will-change: transform;
}

.btn.is-magnetic {
    will-change: transform;
}

@media (max-width: 768px) {
    .hero-orb {
        filter: blur(40px);
        opacity: 0.4;
    }

    .hero-orb--purple {
        width: 260px;
        height: 260px;
    }

    .hero-orb--gold {
        width: 220px;
        height: 220px;
    }

    .hero-orb--small {
        display: none;
    }
}

/* The closed mobile menu is moved above the screen, but its white panel and last item used to
   cover the logo in the header; hide it completely while closed. */
@media (max-width: 960px) {
    /* backdrop-filter makes the header the containing block of the fixed menu: the open menu was
       squeezed to the header's height and its items were cut off. The mobile header is opaque instead. */
    .header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(28, 20, 36, 0.97);
    }

    .nav-menu:not(.active) {
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s linear 0.3s;
    }

    .nav-menu.active {
        visibility: visible;
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-logo,
    .logo-glow {
        animation: none !important;
    }
}
