:root {
    --bg: #faf6ee;
    --surface: #fffdf8;
    --surface-2: #f2e9d9;
    --ink: #142942;
    --muted: #565d64;
    --line: #e6dbc9;
    --brand: #142942;
    --brand-2: #2e4e72;
    --accent: #c69644;
    --soft: #f3eadb;
    --radius-lg: 24px;
    --shadow: 0 12px 32px rgb(34 43 53 / 7%);
}

body { background: var(--bg); color: var(--ink); }
.school-home { isolation: isolate; }
.learning-background {
    position: fixed;
    inset: 0 0 -56px;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(rgb(250 246 238 / 20%), rgb(250 246 238 / 45%)),
        url("../images/learning-bird.webp") left bottom / cover no-repeat;
    transform-origin: left bottom;
}
.school-home :is(.schools, .why-us, .staff, .achievements-section, .enrollment-section) {
    background: rgb(242 233 217 / 76%) !important;
}
@media (prefers-reduced-motion: reduce) {
    .learning-background { transform: none !important; }
}
:where(a, button, input, select, textarea):focus-visible {
    outline: 2px solid #9b6925;
    outline-offset: 3px;
}

.school-home .site-header {
    position: sticky;
    inset: 0 0 auto;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    background: rgb(250 246 238 / 96%);
    backdrop-filter: blur(12px);
}
.school-home .nav-wrap {
    position: relative;
    padding: 4px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}
.school-home .announcement-bar { position: static; }
.school-home .nav-links.open { background: var(--surface); }
.school-home section[id] { scroll-margin-top: 86px; }
.school-home .hero {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(24px, 5vw, 76px);
    align-items: center;
    padding-block: clamp(30px, 6vw, 76px);
    background: transparent;
}
.hero-school-name {
    display: inline-block;
    margin: 0 0 18px;
    padding-block-end: 8px;
    border-bottom: 2px solid var(--accent);
    color: #76521e;
    font-weight: 800;
}
.school-home .hero-content { color: var(--ink); }
.school-home .hero h1 {
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1.16;
    font-weight: 900;
}
.school-home .hero-subtitle { color: var(--brand-2); }
.school-home .hero-desc { color: var(--muted); }
.school-home .hero-media {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface-2);
    box-shadow: var(--shadow);
}
.school-home .hero-media img { width: 100%; height: auto; }
img[src$="/school-celebration.webp"] { filter: brightness(1.06) saturate(.92); }
img[src$="/school-orientation.webp"] { filter: brightness(1.04) saturate(.91); }
img[src$="/school-celebration-portrait.webp"] { filter: brightness(1.05) saturate(.9); }
:is(.school-media, .detail-media) img[src$="/school-orientation.webp"],
:is(.gallery-preview, .item) img[src$="/school-celebration-portrait.webp"] {
    scale: 1.18;
}
.school-home .btn-primary { color: var(--ink); background: #e7bb70; }
.school-home .hero .btn-ghost { color: var(--ink); background: transparent; border-color: #beaf9a; }
.school-home .hero .btn-ghost:hover { background: var(--soft); }
.school-home :is(.schools, .why-us, .staff, .achievements-section, .enrollment-section) { background: var(--surface-2); }
.school-home :is(.school-card, .activity-card, .staff-card, .gallery-copy, .surface) { box-shadow: var(--shadow); }
.school-home :is(.activity-card, .staff-card, .contact-row) { background: var(--surface); }
.school-home :is(.gallery-copy, footer, .announcement-bar, .school-stats li) { background: var(--brand); }
.school-home .school-stats { background: #544b41; }
.school-home .school-stat-count { color: #f5cb83; }
.school-home :is(.school-media, .achievement-media, .gallery-preview a) { background: var(--surface-2); }
.school-home :is(.field input, .field textarea, .enrollment-form select) { background: var(--surface); }

@media (max-width: 900px) {
    .school-home .hero { grid-template-columns: 1fr; gap: 24px; }
    .school-home .hero h1 { font-size: clamp(32px, 8vw, 48px); }
    .school-home section[id] { scroll-margin-top: 68px; }
}

.school-home .why-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 230px;
    background-color: var(--brand);
    background-image: linear-gradient(to top, #101f33 0%, rgb(16 31 51 / 94%) 24%, rgb(16 31 51 / 15%) 100%), var(--why-photo);
    background-position: center;
    background-size: cover;
    color: #fff;
}
.school-home .why-card h3 { font-size: 18px; }
.school-home .why-card p { color: #fff; font-size: 13px; }
.why-card--teaching { --why-photo: url("../images/why-teaching.webp"); }
.why-card--courtyard { --why-photo: url("../images/why-courtyard.webp"); }
.why-card--art { --why-photo: url("../images/why-art.webp"); }
.why-card--family { --why-photo: url("../images/why-family.webp"); }
.why-card--science { --why-photo: url("../images/why-science.webp"); }
.why-card--garden { --why-photo: url("../images/why-garden.webp"); }
