/*
 * GEMS HIGH SCHOOL - HERO & RESPONSIVE OVERRIDES
 * Replacement for assets/css/hero-optimization.css
 *
 * Load AFTER style.css (as it currently does in index.html).
 * This file intentionally avoids changing the global page width.
 */

/* ---------- Safe responsive defaults ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
svg {
    max-width: 100%;
}

.site-header {
    width: 100%;
    min-width: 0;
}

/* ---------- Homepage hero: desktop ---------- */
body.home-page .hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 540px;
    height: auto;
    overflow: hidden;
    background-color: #eaf2e5;
    background-image: url("../images/block1-home.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

body.home-page .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(244, 248, 238, .82) 0%,
        rgba(244, 248, 238, .62) 42%,
        rgba(244, 248, 238, .08) 78%,
        rgba(244, 248, 238, 0) 100%
    );
}

body.home-page .hero .hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 58px clamp(24px, 5vw, 64px);
    text-align: left;
}

body.home-page .hero .hero-content > * {
    max-width: 610px;
}

body.home-page .hero .eyebrow {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: 3px;
}

body.home-page .hero h1 {
    max-width: 610px;
    margin: 0 0 18px;
    font-size: clamp(36px, 4.6vw, 58px);
    line-height: 1.12;
    overflow-wrap: normal;
}

body.home-page .hero .hero-copy {
    max-width: 58ch;
    margin: 0 0 22px;
    font-size: 18px;
    line-height: 1.65;
}

body.home-page .hero .actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

body.home-page .hero .actions > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    max-width: 100%;
    padding: 12px 20px;
    white-space: normal;
    text-align: center;
}

body.home-page .hero .social-links {
    display: flex;
    flex: 0 0 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 22px;
}

body.home-page .hero .social-link {
    display: inline-flex;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
}

/* ---------- Tablets: 768px to 1024px ---------- */
@media (min-width: 768px) and (max-width: 1024px) {
    body.home-page .hero {
        min-height: 590px;
        background-position: 61% center;
    }

    body.home-page .hero::before {
        background: linear-gradient(
            90deg,
            rgba(244, 248, 238, .88) 0%,
            rgba(244, 248, 238, .70) 48%,
            rgba(244, 248, 238, .12) 100%
        );
    }

    body.home-page .hero .hero-content {
        padding: 48px 32px;
    }

    body.home-page .hero h1 {
        max-width: 540px;
        font-size: clamp(38px, 5vw, 48px);
    }

    body.home-page .hero .hero-copy {
        max-width: 500px;
        font-size: 17px;
    }
}

/* ---------- Phones: up to 767px ---------- */
@media (max-width: 767px) {
    body.home-page .hero {
        min-height: 650px;
        align-items: flex-start;
        background-size: cover;
        background-position: 62% center;
    }

    body.home-page .hero::before {
        background: linear-gradient(
            180deg,
            rgba(244, 248, 238, .94) 0%,
            rgba(244, 248, 238, .88) 35%,
            rgba(244, 248, 238, .38) 68%,
            rgba(244, 248, 238, .05) 100%
        );
    }

    body.home-page .hero .hero-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 34px 20px 28px;
    }

    body.home-page .hero .hero-content > * {
        max-width: 100%;
    }

    body.home-page .hero .eyebrow {
        margin-bottom: 12px;
        font-size: 12px;
        letter-spacing: 2.5px;
    }

    body.home-page .hero h1 {
        max-width: 100%;
        margin-bottom: 14px;
        font-size: clamp(30px, 6.8vw, 42px);
        line-height: 1.14;
        letter-spacing: -.4px;
    }

    body.home-page .hero .hero-copy {
        max-width: 100%;
        margin-bottom: 18px;
        font-size: 15px;
        line-height: 1.55;
    }

    body.home-page .hero .actions {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px;
    }

    body.home-page .hero .actions > .btn {
        min-height: 46px;
        padding: 10px 14px;
        font-size: 13px;
    }

    body.home-page .hero .social-links {
        flex: 0 0 100%;
        gap: 10px;
        margin-top: 16px;
    }

    body.home-page .hero .social-link {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
    }

    body.home-page .hero .social-icon {
        width: 22px;
        height: 22px;
    }

    body.home-page .ticker-strip {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    body.home-page .stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
    }

    body.home-page .stats > div {
        min-width: 0;
        text-align: center;
    }

    .container,
    .wrapper {
        max-width: 100%;
    }
}

/* ---------- Narrow phones: 480px and below ---------- */
@media (max-width: 480px) {
    body.home-page .hero {
        min-height: 630px;
        background-position: 64% center;
    }

    body.home-page .hero .hero-content {
        padding: 28px 16px 24px;
    }

    body.home-page .hero h1 {
        font-size: clamp(28px, 8vw, 35px);
    }

    body.home-page .hero .hero-copy {
        font-size: 14px;
        line-height: 1.5;
    }

    body.home-page .hero .actions {
        flex-direction: column;
        align-items: flex-start;
    }

    body.home-page .hero .actions > .btn {
        width: auto;
        min-width: 205px;
        max-width: 100%;
    }

    body.home-page .hero .social-links {
        margin-top: 14px;
    }

    body.home-page .hero .social-link {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }
}

/* ---------- Reduced-motion accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
