/* =========================================================
   PHASE 15A — HOMEPAGE VISUAL REFINEMENT + LIGHTWEIGHT UX
   Keeps CMS content intact while reducing visual density.
   Loaded after resources/css/app.css so these rules override
   the original Phase 04 homepage/navigation presentation.
   ========================================================= */

/* Header: slightly tighter, calmer and easier to scan */
.nav-wrap{
    min-height:76px;
    padding:8px 0;
    gap:20px;
}
.site-logo{
    max-height:54px;
}
.brand{
    min-width:220px;
    gap:11px;
}
.brand strong{
    max-width:250px;
    font-size:.92rem;
    line-height:1.12;
    letter-spacing:-.01em;
}
.brand small{
    margin-top:3px;
    font-size:.68rem;
}
.site-header nav{
    gap:15px;
    font-size:.87rem;
}

/* Hero: retain impact without allowing the heading to dominate the page */
.home-hero,
.home-hero-inner{
    min-height:560px;
}
.home-hero-copy{
    max-width:800px;
    padding:54px 0 82px;
}
.home-hero h1{
    max-width:960px;
    font-size:clamp(2.7rem,4.9vw,5.1rem);
    line-height:.98;
    letter-spacing:-.045em;
    margin:.18em 0 .22em;
    text-wrap:balance;
}
.home-hero-copy>p{
    max-width:610px;
    font-size:clamp(1rem,1.22vw,1.14rem);
    line-height:1.55;
}
.home-hero-actions{
    margin-top:24px;
}
.home-hero-controls{
    bottom:48px;
}

/* Quick links: useful but visually lighter */
.home-quicklinks{
    margin-top:-28px;
}
.home-quicklink{
    min-height:78px;
    padding:14px 17px;
    gap:11px;
}
.home-icon{
    width:38px;
    height:38px;
    border-radius:11px;
}
.home-quicklink strong{
    font-size:.91rem;
}
.home-quicklink small{
    font-size:.63rem;
}

/* Global homepage rhythm */
.home-section{
    padding:76px 0;
}
.home-section-heading{
    margin-bottom:30px;
}
.home-section-heading.centered{
    margin:0 auto 36px;
}
.home-section-heading h2,
.home-welcome-copy h2,
.home-final-cta h2{
    font-size:clamp(2.05rem,3.65vw,3.55rem);
    line-height:1.07;
    letter-spacing:-.035em;
    margin:.22em 0 .26em;
}
.home-section-heading>p,
.split-heading>p{
    font-size:1rem;
    line-height:1.6;
}
.split-heading{
    gap:46px;
}

/* Welcome: more breathing room, less oversized imagery */
.home-welcome{
    padding-top:86px;
}
.home-welcome-grid{
    gap:58px;
}
.home-welcome-visual{
    min-height:455px;
}
.home-photo-main{
    inset:0 30px 0 0;
}
.home-visual-note{
    bottom:28px;
    width:min(290px,74%);
    padding:15px;
}
.home-visual-note-mark{
    width:42px;
    height:42px;
}
.home-welcome-points{
    gap:12px;
}
.home-inline-actions{
    margin-top:24px;
}

/* Learning cards: compact enough to scan at a glance */
.home-learning-grid{
    gap:18px;
}
.home-learning-card{
    min-height:330px;
    padding:27px 25px;
}
.home-learning-symbol{
    width:48px;
    height:48px;
    margin-bottom:26px;
    border-radius:14px;
}
.home-learning-card h3{
    font-size:1.5rem;
    margin:7px 0 10px;
}
.home-learning-card p{
    margin-bottom:20px;
    line-height:1.58;
}

/* Experience strip */
.home-experience-grid article{
    padding:27px 23px 29px;
}
.home-experience-grid h3{
    margin:13px 0 8px;
}

/* News cards */
.home-news-media{
    height:158px;
}
.home-news-copy{
    padding:17px;
}
.home-news-card h3{
    line-height:1.3;
}
.home-news-card p{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    overflow:hidden;
}

/* Gallery + testimonials: keep visual interest without excessive height */
.home-gallery-section{
    padding:76px 0;
}
.home-gallery-grid{
    grid-template-rows:180px 180px;
    gap:14px;
}
.home-testimonial-card{
    padding:24px;
}
.home-testimonial-card>p{
    margin:14px 0 20px;
    line-height:1.62;
}

/* Final CTA */
.home-final-cta{
    padding:60px 0;
}

/* Tablet */
@media (max-width:1100px){
    .brand{
        min-width:190px;
    }
    .brand strong{
        max-width:205px;
        font-size:.86rem;
    }
    .site-header nav{
        gap:12px;
        font-size:.82rem;
    }
    .home-hero,
    .home-hero-inner{
        min-height:525px;
    }
    .home-hero h1{
        font-size:clamp(2.6rem,5.4vw,4.5rem);
        max-width:840px;
    }
    .home-welcome-grid{
        gap:42px;
    }
}

/* Existing mobile menu breakpoint */
@media (max-width:980px){
    .nav-wrap{
        min-height:72px;
    }
    .brand{
        min-width:0;
    }
    .brand strong{
        max-width:250px;
    }
    .site-header nav{
        top:108px;
        font-size:.92rem;
        gap:10px;
    }
    .home-hero,
    .home-hero-inner{
        min-height:515px;
    }
    .home-hero-copy{
        padding:48px 0 74px;
    }
    .home-hero h1{
        max-width:760px;
        font-size:clamp(2.5rem,7vw,4rem);
    }
    .home-section{
        padding:66px 0;
    }
    .home-welcome{
        padding-top:76px;
    }
    .home-welcome-visual{
        min-height:410px;
    }
    .home-gallery-grid{
        grid-template-rows:165px 165px;
    }
}

/* Mobile */
@media (max-width:720px){
    .nav-wrap{
        min-height:68px;
        padding:7px 0;
    }
    .site-logo{
        max-height:46px;
    }
    .brand strong{
        max-width:190px;
        font-size:.78rem;
        line-height:1.1;
    }
    .site-header nav{
        top:68px;
    }

    .home-hero,
    .home-hero-inner{
        min-height:480px;
    }
    .home-hero-copy{
        padding:42px 0 70px;
    }
    .home-kicker{
        font-size:.66rem;
        letter-spacing:.12em;
    }
    .home-hero h1{
        max-width:100%;
        font-size:clamp(2.15rem,10vw,2.75rem);
        line-height:1.01;
        letter-spacing:-.035em;
    }
    .home-hero-copy>p{
        font-size:.96rem;
        line-height:1.5;
        display:-webkit-box;
        -webkit-box-orient:vertical;
        -webkit-line-clamp:3;
        overflow:hidden;
    }
    .home-hero-actions{
        margin-top:20px;
    }
    .home-hero-controls{
        bottom:34px;
    }

    .home-quicklinks{
        margin-top:-18px;
    }
    .home-quicklinks-grid{
        grid-template-columns:1fr 1fr;
    }
    .home-quicklink{
        min-height:72px;
        padding:12px;
    }
    .home-quicklink>b{
        display:none;
    }

    .home-section{
        padding:56px 0;
    }
    .home-section-heading.centered{
        margin-bottom:28px;
    }
    .home-section-heading h2,
    .home-welcome-copy h2,
    .home-final-cta h2{
        font-size:clamp(1.85rem,8vw,2.45rem);
        line-height:1.08;
    }

    .home-welcome{
        padding-top:62px;
    }
    .home-welcome-grid{
        gap:34px;
    }
    .home-welcome-visual{
        min-height:340px;
    }
    .home-photo-main{
        inset:0 18px 0 0;
    }
    .home-visual-note{
        width:min(255px,82%);
        bottom:18px;
    }

    .home-learning-grid{
        gap:14px;
    }
    .home-learning-card{
        min-height:0;
        padding:23px 21px;
    }
    .home-learning-symbol{
        margin-bottom:20px;
    }

    .home-experience-grid article{
        padding:22px 18px;
    }

    .home-gallery-section{
        padding:56px 0;
    }
    .home-gallery-grid{
        grid-template-rows:150px 150px;
    }

    .home-final-cta{
        padding:50px 0;
    }
}

@media (max-width:520px){
    .home-quicklinks-grid{
        grid-template-columns:1fr;
    }
    .home-quicklink{
        border-right:0;
        border-bottom:1px solid #e8eee9;
    }
    .home-quicklink:last-child{
        border-bottom:0;
    }
    .home-gallery-grid{
        grid-template-columns:1fr;
        grid-template-rows:auto;
    }
    .home-gallery-card,
    .home-gallery-card.featured{
        grid-row:auto;
        min-height:210px;
    }
}


/* Phase 15B: concise dynamic sections and below-the-fold rendering */
.home-team-grid{
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    max-width:920px;
    margin-inline:auto;
}
.home-testimonial-grid{
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}
.home-learning-section,
.home-experience,
.home-updates,
.home-events-standalone,
.home-community-section,
.home-gallery-section,
.home-testimonials,
.home-final-cta{
    content-visibility:auto;
    contain-intrinsic-size:700px;
}


/* Phase 17 — CMS-controlled hero motion */
.home-hero-slide.is-active{
    animation:heroSlideReveal .7s ease both;
}
.home-hero-slide.hero-motion-ready[data-hero-effect="slow_zoom_in"] .home-hero-image{
    animation:heroSlowZoomIn var(--hero-effect-duration,7s) ease-out both;
}
.home-hero-slide.hero-motion-ready[data-hero-effect="slow_zoom_out"] .home-hero-image{
    animation:heroSlowZoomOut var(--hero-effect-duration,7s) ease-out both;
}
.home-hero-slide.hero-motion-ready[data-hero-effect="pan_left"] .home-hero-image{
    animation:heroPanLeft var(--hero-effect-duration,7s) ease-in-out both;
}
.home-hero-slide.hero-motion-ready[data-hero-effect="pan_right"] .home-hero-image{
    animation:heroPanRight var(--hero-effect-duration,7s) ease-in-out both;
}
.home-hero-slide.hero-motion-ready[data-hero-effect="drift_up"] .home-hero-image{
    animation:heroDriftUp var(--hero-effect-duration,7s) ease-in-out both;
}
.home-hero-slide[data-hero-effect="none"] .home-hero-image{
    animation:none;
    transform:scale(1.01);
}

@keyframes heroSlideReveal{
    from{opacity:.25}
    to{opacity:1}
}
@keyframes heroSlowZoomIn{
    from{transform:scale(1.01)}
    to{transform:scale(1.115)}
}
@keyframes heroSlowZoomOut{
    from{transform:scale(1.115)}
    to{transform:scale(1.01)}
}
@keyframes heroPanLeft{
    from{transform:scale(1.09) translateX(2.4%)}
    to{transform:scale(1.09) translateX(-2.4%)}
}
@keyframes heroPanRight{
    from{transform:scale(1.09) translateX(-2.4%)}
    to{transform:scale(1.09) translateX(2.4%)}
}
@keyframes heroDriftUp{
    from{transform:scale(1.08) translateY(2.2%)}
    to{transform:scale(1.08) translateY(-2.2%)}
}

@media (prefers-reduced-motion: reduce){
    .home-hero-slide,
    .home-hero-slide .home-hero-image{
        animation:none !important;
        transform:none !important;
    }
}
