/* ==========================================================================
   Home page sections - the layout shared by every theme.

   The markup comes from application/views/themes/_home_sections.php and is the
   same whichever design is on, so the layout lives here once instead of being
   copied into eight stylesheets. Nothing here names a colour or a typeface:
   every one comes from a --hs- token that the theme sets from its own palette,
   so the same structure reads as that theme rather than as a ninth design.

   Loaded before the theme's own stylesheet, so a theme can still override any
   of it.
   ========================================================================== */

.hs {
    /* Sensible ground, in case a theme maps only part of the set. */
    --hs-ink:      #1b2230;
    --hs-soft:     #5d6878;
    --hs-line:     #e4e7ee;
    --hs-wash:     #f5f7fa;
    --hs-paper:    #ffffff;
    --hs-brand:    #1f5f8b;
    --hs-brand-dk: #164a6d;
    --hs-r:        12px;
    --hs-shadow:   0 16px 40px rgba(20, 26, 38, .12);
    --hs-display:  inherit;
    --hs-text:     inherit;

    --hs-pad:  clamp(52px, 6.5vw, 100px);
    --hs-gut:  clamp(18px, 4vw, 40px);
    --hs-gap:  clamp(18px, 2vw, 28px);
}

/* --------------------------------------------------------------- the band */

.hs-sec {
    padding: var(--hs-pad) 0;
    background: var(--hs-paper);
    color: var(--hs-ink);
    font-family: var(--hs-text);
}
.hs-band-wash { background: var(--hs-wash); }

/* A band the school gave a background photograph. The scrim is what keeps the
   text legible whichever picture gets uploaded. */
.hs-band-shot {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hs-band-shot::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 14, 22, .78), rgba(10, 14, 22, .86));
}
.hs-band-shot > .hs-wrap { position: relative; }
.hs-band-shot .hs-head h2,
.hs-band-shot .hs-body { color: #fff; }
.hs-band-shot .hs-head h2::after { background: #fff; }

.hs-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--hs-gut);
}

/* Bootstrap 3 is still loaded for the CMS page bodies, so its element defaults
   are undone here rather than fought with later. */
.hs h2, .hs h3 { margin: 0; font-family: var(--hs-display); font-weight: 600; }
.hs p:last-child { margin-bottom: 0; }
.hs figure { margin: 0; }
.hs img { max-width: 100%; }
.hs blockquote {
    margin: 0; padding: 0; border: 0; font-size: inherit; quotes: none;
}
.hs cite { font-style: normal; }

/* ------------------------------------------------------- heading and body */

.hs-head {
    max-width: 50rem;
    margin: 0 auto calc(var(--hs-gap) + 14px);
    text-align: center;
}
.hs-head h2 {
    font-size: clamp(26px, 2.6vw, 36px);
    line-height: 1.18;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.hs-head h2::after {
    content: "";
    display: block;
    width: 52px;
    height: 3px;
    margin: 16px auto 0;
    background: var(--hs-brand);
}
.hs-head .hs-body { margin-top: 14px; }

.hs-body {
    color: var(--hs-soft);
    font-size: 16px;
    line-height: 1.72;
}
.hs-band-shot .hs-body { color: rgba(255, 255, 255, .88); }
.hs-body > p { margin: 0 0 .85em; }
.hs-body > p:last-child { margin-bottom: 0; }
.hs-measure { max-width: 68ch; margin-left: auto; margin-right: auto; }

.hs-link {
    display: inline-block;
    align-self: flex-start;
    margin-top: 20px;
    padding: 12px 26px;
    background: var(--hs-brand);
    color: #fff !important;
    font-family: var(--hs-display);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    border-radius: var(--hs-r);
    text-decoration: none !important;
    transition: background .18s ease;
}
.hs-link:hover, .hs-link:focus { background: var(--hs-brand-dk); color: #fff !important; }

/* ---------------------------------------------- 1: pillars, then a banner */

.hs-pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: calc(var(--hs-gap) + 8px);
}
.hs-cols-1 { grid-template-columns: minmax(0, 1fr); }
.hs-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.hs-pillar { display: flex; flex-direction: column; }
.hs-pillar h3 {
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.3;
    text-wrap: balance;
}
.hs-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    background: var(--hs-wash);
    border-radius: var(--hs-r);
}
.hs-band-wash .hs-ico { background: var(--hs-paper); }
.hs-ico img { width: 32px; height: 32px; object-fit: contain; }

.hs-banner {
    margin-top: calc(var(--hs-pad) * .55);
    text-align: center;
}
.hs-banner > a:first-child { display: block; }
.hs-banner img {
    width: 100%;
    height: auto;
    border-radius: var(--hs-r);
    display: block;
}
.hs-banner .hs-link { align-self: center; }

/* ---------------------------------------- 2 and 3: words beside a picture */

.hs-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}
.hs-split-top { align-items: start; }
.hs-split-solo { grid-template-columns: minmax(0, 1fr); }

.hs-said { display: flex; flex-direction: column; align-items: flex-start; }
.hs-said h2 {
    margin-bottom: 16px;
    font-size: clamp(25px, 2.4vw, 33px);
    line-height: 1.2;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.hs-said .hs-body { max-width: 62ch; }

.hs-shot img {
    width: 100%;
    height: auto;
    border-radius: var(--hs-r);
    display: block;
}
.hs-shot-wide img { max-height: 440px; object-fit: cover; }

/* The picture stays in view while the three statements beside it scroll. */
.hs-shot-stick { position: sticky; top: 96px; }

.hs-trio { display: grid; gap: var(--hs-gap); }
.hs-one {
    padding: 22px 24px;
    background: var(--hs-paper);
    border: 1px solid var(--hs-line);
    border-left: 4px solid var(--hs-brand);
    border-radius: var(--hs-r);
}
.hs-band-wash .hs-one { background: var(--hs-paper); }
.hs-one h3 {
    margin-bottom: 8px;
    font-size: 19px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

/* ----------------------------------------------------------- 5: the figures */

.hs-figures {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--hs-gap);
}
.hs-figure {
    padding: 26px 16px;
    text-align: center;
    background: var(--hs-paper);
    border: 1px solid var(--hs-line);
    border-radius: var(--hs-r);
}
.hs-band-shot .hs-figure {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .18);
    backdrop-filter: blur(2px);
}
.hs-figure img {
    height: 40px;
    width: auto;
    margin-bottom: 12px;
    object-fit: contain;
}
.hs-band-shot .hs-figure img { filter: brightness(0) invert(1); }
.hs-figure strong {
    display: block;
    font-family: var(--hs-display);
    font-weight: 700;
    font-size: 32px;
    line-height: 1.08;
    color: var(--hs-brand);
    font-variant-numeric: tabular-nums;
}
.hs-band-shot .hs-figure strong { color: #fff; }
.hs-figure span {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    letter-spacing: .02em;
    color: var(--hs-soft);
}
.hs-band-shot .hs-figure span { color: rgba(255, 255, 255, .82); }

/* --------------------------------------- 4, 6 and later: a grid of cards */

.hs-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--hs-gap);
}
.hs-cards.hs-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.hs-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--hs-paper);
    border: 1px solid var(--hs-line);
    border-radius: var(--hs-r);
    transition: transform .18s ease, box-shadow .18s ease;
}
.hs-card:hover { transform: translateY(-3px); box-shadow: var(--hs-shadow); }

.hs-card-pic {
    aspect-ratio: 16 / 10;
    background: var(--hs-wash);
    overflow: hidden;
}
.hs-band-wash .hs-card-pic { background: var(--hs-line); }
.hs-card-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hs-card-say { padding: 18px 20px 20px; }
.hs-card-say h3 {
    margin-bottom: 7px;
    font-size: 17px;
    line-height: 1.32;
    text-wrap: balance;
}
.hs-card-say .hs-body { font-size: 14.5px; line-height: 1.62; }

/* A section whose pictures are mostly missing reads better as plain cards
   than as a grid of empty frames. */
.hs-cards-text .hs-card { border-top: 3px solid var(--hs-brand); }
.hs-cards-text .hs-card-say { padding: 20px; }

/* -------------------------------------------------------- 7: what parents say */

.hs-quotes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--hs-gap);
}
.hs-quote {
    display: flex;
    flex-direction: column;
    padding: 28px 30px;
    background: var(--hs-paper);
    border: 1px solid var(--hs-line);
    border-radius: var(--hs-r);
}
.hs-quote blockquote { flex: 1 1 auto; font-size: 15.5px; }
.hs-quote blockquote::before {
    content: "\201C";
    display: block;
    margin-bottom: -6px;
    font-family: var(--hs-display);
    font-size: 46px;
    line-height: 1;
    color: var(--hs-brand);
    opacity: .35;
}
.hs-quote figcaption {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--hs-line);
}
.hs-face {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
}
.hs-face-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hs-brand);
    color: #fff;
    font-family: var(--hs-display);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .02em;
}
.hs-who { display: flex; flex-direction: column; line-height: 1.35; }
.hs-who cite { font-family: var(--hs-display); font-weight: 600; color: var(--hs-ink); }
.hs-who small { font-size: 13px; color: var(--hs-soft); }

/* ------------------------------------------------------------- narrower */

@media (max-width: 1199px) {
    .hs-figures, .hs-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .hs-pillars, .hs-split { grid-template-columns: minmax(0, 1fr); }
    .hs-shot-stick { position: static; }
    .hs-figures, .hs-cards, .hs-cards.hs-cols-3, .hs-quotes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .hs-figures, .hs-cards, .hs-cards.hs-cols-3, .hs-quotes {
        grid-template-columns: minmax(0, 1fr);
    }
    .hs-quote { padding: 24px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .hs-card { transition: none; }
    .hs-card:hover { transform: none; }
}

/* ------------------------------------------------- the latest-news band */

.hs-newsrow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--hs-gap);
}
.hs-newsitem {
    display: flex;
    flex-direction: column;
    padding: 22px 24px;
    background: var(--hs-paper);
    border: 1px solid var(--hs-line);
    border-radius: var(--hs-r);
    color: var(--hs-ink) !important;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease;
}
.hs-newsitem:hover, .hs-newsitem:focus {
    transform: translateY(-3px);
    box-shadow: var(--hs-shadow);
}
.hs-newsitem time {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--hs-brand);
}
.hs-newsitem h3 {
    flex: 1 1 auto;
    margin: 10px 0 14px;
    font-size: 16.5px;
    line-height: 1.38;
    text-wrap: balance;
}
.hs-more {
    font-family: var(--hs-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--hs-brand);
}

/* The sectioned home page owns the full width: the wrapper, the Bootstrap row
   it still sits in, and the column all stop insetting it, and <main> drops the
   padding it adds around ordinary page bodies, so the first band meets the
   header rather than floating below it. */
.hs-host { padding-top: 0 !important; padding-bottom: 0 !important; }
.hs-host > div { padding-left: 0; padding-right: 0; max-width: none; }
.hs-host .row { margin-left: 0; margin-right: 0; }
.hs-host [class*="col-"] { padding-left: 0; padding-right: 0; float: none; width: 100%; }

@media (max-width: 991px) {
    .hs-newsrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .hs-newsrow { grid-template-columns: minmax(0, 1fr); }
}

/* -------------------------- the opening band, when there is no banner yet */

.hs-hero {
    padding: clamp(56px, 8vw, 110px) 0;
    background: var(--hs-brand);
    color: #fff;
    text-align: center;
}
.hs-hero h1 {
    margin: 0;
    font-family: var(--hs-display);
    font-weight: 700;
    font-size: clamp(30px, 4.4vw, 54px);
    line-height: 1.1;
    letter-spacing: -.015em;
    text-wrap: balance;
    color: #fff;
}
.hs-hero-where {
    max-width: 48ch;
    margin: 16px auto 0;
    font-size: 16.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .86);
}
.hs-hero-acts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}
.hs-hero .hs-link {
    margin-top: 0;
    background: #fff;
    color: var(--hs-ink) !important;
}
.hs-hero .hs-link:hover, .hs-hero .hs-link:focus {
    background: rgba(255, 255, 255, .88);
    color: var(--hs-ink) !important;
}
.hs-link-ghost {
    background: transparent !important;
    color: #fff !important;
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7);
}
.hs-link-ghost:hover, .hs-link-ghost:focus {
    background: rgba(255, 255, 255, .14) !important;
    color: #fff !important;
}

/* The school's name, when the logo file is gone. */
.hs-wordmark {
    font-family: var(--hs-display, inherit);
    font-weight: 700;
    font-size: 19px;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: var(--hs-ink, #1b2230);
}

/* In the footer the wordmark sits on the theme's dark ground, so it takes the
   colour already set there rather than the body ink. */
.hs-wordmark-inherit { color: inherit; display: inline-block; }
