/* ==========================================================================
   SFS Academy — homepage
   Hero · Facts · Intro · Academics · Values · Campus · Student life
   Events · School day · Admissions
   ========================================================================== */

/* Shared two-column section header: heading left, supporting text right. */

.academics__head,
.campus__head {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 2rem clamp(2.5rem, 6vw, 6rem);
    align-items: end;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.academics__head > p,
.campus__head > p {
    padding-bottom: 0.375rem;
}

/* Photographs: every framed image fills its figure. */

.intro__photo img,
.academics__photo img,
.values__photo img,
.campus__tile img,
.events__feature img,
.events__row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero ------------------------------------------------------------------- */

.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: clamp(640px, 90vh, 800px);
    padding-top: calc(var(--header-height) + var(--topbar-height) + 1.5rem);
    padding-bottom: 6.5rem;
    background: var(--navy-900);
    color: var(--white);
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 64% 50%;
}

/* A left-weighted wash keeps the text legible and leaves the building,
   on the right of the frame, clear. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(7, 20, 47, 0.6) 0%, rgba(7, 20, 47, 0) 32%),
        linear-gradient(90deg, rgba(7, 20, 47, 0.95) 0%, rgba(7, 20, 47, 0.88) 34%, rgba(7, 20, 47, 0.5) 60%, rgba(7, 20, 47, 0.1) 88%);
}

.hero__inner {
    width: 100%;
}

.hero__content {
    max-width: 41rem;
}

.hero__title {
    font-size: clamp(2.5rem, 1rem + 4.2vw, 4.75rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    color: var(--white);
}

.hero__lead {
    max-width: 34rem;
    margin-top: 1.75rem;
    font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.86);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    margin-top: 2.5rem;
}

/* Facts ------------------------------------------------------------------ */

.facts {
    position: relative;
    z-index: 2;
    margin-top: -3.25rem;
}

.facts__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 3px solid var(--cyan-400);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
}

.facts__item {
    padding: 1.5rem clamp(1.25rem, 2.4vw, 2.25rem) 1.625rem;
}

.facts__item + .facts__item {
    border-left: 1px solid var(--line);
}

.facts__item dt {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.facts__item dd {
    margin-top: 0.375rem;
    font-size: clamp(1.125rem, 0.55rem + 0.9vw, 1.375rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ink);
}

/* Intro ------------------------------------------------------------------ */

.intro {
    padding-top: var(--section);
}

.intro__top {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: center;
}

.intro__body .lead {
    margin-top: 1.75rem;
}

.intro__body .lead + p {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.intro__media {
    position: relative;
    padding-bottom: 3.5rem;
}

/* One large curve on the lower-left corner softens the photograph. */
.intro__photo--main {
    aspect-ratio: 4 / 3.1;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) var(--radius) 9rem;
}

.intro__photo--inset {
    position: absolute;
    right: 1.5rem;
    bottom: 0;
    width: 36%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 6px solid var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transform: rotate(-3deg);
}

.intro__facts {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 2rem clamp(2rem, 5vw, 4rem);
    align-items: stretch;
    padding-block: clamp(2.5rem, 5vw, 4rem);
}

.intro-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.intro-stats__item + .intro-stats__item {
    padding-left: 1.75rem;
    border-left: 1px solid var(--line);
}

.intro-stats__item > *,
.intro-stats__item a,
.intro-stats__item a > * {
    display: block;
}

.intro-stats__item a {
    text-decoration: none;
}

.intro-stats__icon {
    display: grid !important;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border: 1.5px solid var(--indigo-700);
    border-radius: 50%;
    color: var(--indigo-700);
}

.intro-stats__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.intro-stats__year,
.intro-stats__name {
    margin-top: 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.intro-stats__year {
    font-size: 2rem;
    line-height: 1.15;
}

.intro-stats__note {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--muted);
}

.intro-stats a:hover .intro-stats__name {
    color: var(--indigo-700);
}

.intro__quote {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.75rem 2rem;
    border-left: 3px solid var(--orange-500);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    background: var(--cream);
}

.intro__quote blockquote p {
    font-family: var(--font-sans);
    font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.625rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.25;
    color: var(--ink);
}

.intro__quote figcaption {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Heritage band: full-width navy strip closing the section. */
.heritage-band {
    background: var(--navy-900);
    color: var(--white);
}

.heritage-band__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 3rem;
    padding-block: 2rem;
}

.heritage-band__title {
    max-width: 16rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--orange-500);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.7;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.heritage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2.5rem;
}

.heritage li + li {
    padding-left: 2.5rem;
    border-left: 1px solid var(--line-dark);
}

.heritage__link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.heritage__link img {
    width: 64px;
    height: 64px;
    border: 2px solid var(--saffron-400);
    border-radius: 50%;
}

.heritage__role {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.heritage__name {
    display: block;
    font-weight: 700;
    line-height: 1.35;
    color: var(--white);
    transition: color 0.2s var(--ease);
}

.heritage__link:hover .heritage__name {
    color: var(--saffron-400);
}

.heritage__go {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

/* Academics -------------------------------------------------------------- */

.academics__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: start;
}

.academics__photo {
    position: relative;
    aspect-ratio: 1 / 1.1;
    overflow: hidden;
    border-radius: var(--radius);
}

/* Numbered steps: tinted cards alternating warm and cool, each with a
   numbered badge that straddles the left edge and an icon. */
.steps {
    display: grid;
    gap: 1.125rem;
    padding-left: 1.5rem;
}

.steps__item {
    --step-badge: var(--amber-500);
    --step-tint: #fbe2b3;
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem 1.5rem 1.25rem 3rem;
    border-radius: 18px;
    background: linear-gradient(90deg, #fdeccd 0%, #fff9ee 100%);
}

.steps__item:nth-child(even) {
    --step-badge: var(--indigo-700);
    --step-tint: #cfe3fb;
    background: linear-gradient(90deg, #dcecfd 0%, #f1f6ff 100%);
}

.steps__number {
    position: absolute;
    top: 50%;
    left: -1.5rem;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--step-badge);
    /* A ring in the section colour makes the badge read as cut into the card. */
    box-shadow: 0 0 0 5px var(--cream);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--white);
    transform: translateY(-50%);
}

.steps__icon {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--step-tint);
    color: var(--indigo-700);
}

.steps__title {
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
    color: var(--navy-800);
}

.steps__body p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

.academics__body {
    position: relative;
}

/* Dot grid tucked into the corner beside the links. */
.academics__body::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0.25rem;
    width: 4.5rem;
    height: 2.25rem;
    background: radial-gradient(circle, rgba(31, 79, 216, 0.22) 1.5px, transparent 1.75px) 0 0 / 0.75rem 0.75rem;
    pointer-events: none;
}

.academics__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.75rem;
    margin-top: 2rem;
    padding-left: 1.5rem;
}

.academics__links-divider {
    width: 1px;
    height: 1.75rem;
    background: rgba(11, 27, 63, 0.22);
}

/* Underlined label with a round arrow button. */
.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--indigo-700);
    text-decoration: none;
}

.cta-link__label {
    padding-block: 0.375rem;
    background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
}

.cta-link__arrow {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--indigo-700);
    color: var(--white);
    transition: background-color 0.2s var(--ease), transform 0.25s var(--ease);
}

.cta-link:hover .cta-link__arrow {
    background: var(--orange-500);
    color: var(--navy-950);
    transform: translateX(4px);
}

/* Values ----------------------------------------------------------------- */

.values__top {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.values__lead > p {
    max-width: 31rem;
    margin-top: 1.75rem;
}

.values__vision {
    margin-top: 1.75rem;
}

/* Photo with a single large curve on its lower-left corner. */
.values__photo {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) var(--radius) 9rem;
}

.values__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

.values__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.75rem;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
}

.values__icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 1.5px solid var(--saffron-400);
    border-radius: 50%;
    color: var(--saffron-400);
}

.values__word {
    margin-top: 1.25rem;
    padding-bottom: 0.875rem;
    font-size: clamp(1.75rem, 1.4rem + 1vw, 2.125rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--white);
    background: linear-gradient(var(--saffron-400), var(--saffron-400)) 0 100% / 2rem 2px no-repeat;
}

.values__card p {
    margin-top: 1rem;
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* Campus ----------------------------------------------------------------- */

/* Full-width carousel. Without JavaScript the cards scroll sideways; with it,
   they are positioned around the active card and loop endlessly. */
.campus__carousel {
    --card-w: 15rem;
    --card-active-w: 42rem;
    --card-gap: 1.25rem;
    --card-h: 27rem;
    position: relative;
    width: 100%;
}

.campus__viewport {
    overflow: hidden;
    padding-block: 0.25rem;
    touch-action: pan-y;
}

.campus__track {
    display: flex;
    gap: var(--card-gap);
    height: var(--card-h);
    padding-inline: var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
}

.campus__track::-webkit-scrollbar {
    display: none;
}

.campus__card {
    position: relative;
    flex: none;
    width: var(--card-w);
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--navy-800);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.campus__card.is-active {
    width: var(--card-active-w);
}

.campus__card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.campus__card:first-child img {
    object-position: 38% 50%;
}

.js .campus__track {
    display: block;
    position: relative;
    padding: 0;
    overflow: visible;
}

.js .campus__card {
    position: absolute;
    top: 0;
    left: 0;
    visibility: hidden;
    transition: transform 0.6s var(--ease), width 0.6s var(--ease);
    will-change: transform, width;
}

.js .campus__card.is-ready {
    visibility: visible;
}

.campus__caption-wrap {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 6rem 1.25rem 1.25rem;
    background: linear-gradient(rgba(7, 20, 47, 0), rgba(11, 31, 77, 0.94) 60%);
    line-height: 1.35;
    color: var(--white);
}

.campus__caption strong {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
}

.campus__caption span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0.125rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.86);
}

.campus__badge {
    flex: none;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    color: var(--white);
}

.campus__badge--amber { background: var(--amber-500); color: var(--navy-950); }
.campus__badge--indigo { background: var(--indigo-600); }
.campus__badge--violet { background: #2a9df4; }
.campus__badge--teal { background: #0891b2; }
.campus__badge--rose { background: #e5283d; }
.campus__badge--sky { background: #3a6df0; }
.campus__badge--orange { background: #f97316; }
.campus__badge--green { background: #0891b2; }
.campus__badge--cyan { background: #0e7490; }
.campus__badge--pink { background: #c81e33; }
.campus__badge--gold { background: #e0a100; }
.campus__badge--navy { background: var(--indigo-700); }

/* Hidden on inactive cards; sits on the right of the card. */
.campus__more {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.4rem 1rem;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(12px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s, background-color 0.2s var(--ease), color 0.2s var(--ease);
}

/* Shown on the active card by default, and on any card that is hovered or focused. */
.campus__card.is-active .campus__more,
.campus__card:hover .campus__more,
.campus__card:focus-within .campus__more {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0.15s, 0.15s, 0s, 0s, 0s;
}

.campus__more:hover {
    background: var(--white);
    color: var(--navy-900);
}

.campus__dots {
    display: none;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
}

.js .campus__dots {
    display: flex;
}

/* Each dot keeps a 24px touch target around the visible bar. */
.campus__dot {
    position: relative;
    width: 1.75rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.campus__dot::before {
    content: "";
    position: absolute;
    inset: 50% 0.25rem auto;
    height: 0.375rem;
    border-radius: 999px;
    background: var(--line);
    transform: translateY(-50%);
    transition: background-color 0.3s var(--ease), inset 0.3s var(--ease);
}

.campus__dot.is-active::before {
    inset-inline: 0;
    background: var(--indigo-700);
}

/* Principal's message ---------------------------------------------------- */

.principal__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
}

.principal__portrait {
    position: relative;
    max-width: 28rem;
    aspect-ratio: 1 / 1.08;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) var(--radius) 4rem;
    background: var(--sand);
}

.principal__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
}

.principal__portrait figcaption {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    padding: 4rem 1.5rem 1.5rem;
    background: linear-gradient(rgba(7, 20, 47, 0), rgba(11, 31, 77, 0.92) 65%);
    line-height: 1.35;
    color: var(--white);
}

.principal__portrait figcaption strong {
    font-size: 1.0625rem;
}

.principal__portrait figcaption span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--saffron-400);
}

.principal__message {
    position: relative;
    margin-top: 2rem;
    padding-left: 1.75rem;
    border-left: 3px solid var(--orange-500);
}

.principal__message p + p {
    margin-top: 1rem;
}

.principal__lead {
    font-size: 1.1875rem;
    line-height: 1.65;
    color: var(--ink);
}

.principal__signature {
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
    line-height: 1.4;
}

.principal__signature strong {
    font-size: 1.125rem;
    color: var(--ink);
}

.principal__signature span {
    font-size: 0.875rem;
    color: var(--muted);
}

.principal__button {
    margin-top: 2rem;
}

/* Events ----------------------------------------------------------------- */

.events__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 3rem;
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.events__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 2.5rem clamp(2.5rem, 5vw, 4.5rem);
    align-items: stretch;
}

.events__feature {
    position: relative;
    display: block;
    min-height: 26rem;
    overflow: hidden;
    border-radius: var(--radius);
    color: var(--white);
    text-decoration: none;
}

.events__feature img {
    position: absolute;
    inset: 0;
    transition: transform 0.8s var(--ease);
}

.events__feature:hover img {
    transform: scale(1.03);
}

.events__feature-body {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 6rem 1.75rem 1.75rem;
    background: linear-gradient(rgba(7, 20, 47, 0), rgba(7, 20, 47, 0.9) 70%);
}

.events__when {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--orange-600);
}

.events__feature .events__when {
    color: var(--saffron-400);
}

.events__feature-title {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.events__feature .events__summary {
    color: rgba(255, 255, 255, 0.86);
}

.events__list {
    display: flex;
    flex-direction: column;
}

.events__list li {
    display: flex;
    flex: 1;
    border-top: 1px solid var(--line);
}

.events__list li:last-child {
    border-bottom: 1px solid var(--line);
}

.events__row {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
    padding-block: 1.25rem;
    text-decoration: none;
}

.events__row img {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
}

.events__row-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.events__row-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--ink);
    transition: color 0.2s var(--ease);
}

.events__summary {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--muted);
}

.events__row-arrow {
    color: var(--indigo-700);
    transition: transform 0.25s var(--ease), color 0.2s var(--ease);
}

.events__row:hover .events__row-title {
    color: var(--indigo-700);
}

.events__row:hover .events__row-arrow {
    color: var(--orange-600);
    transform: translate(3px, -3px);
}

/* Admissions ------------------------------------------------------------- */

.admissions {
    --admissions-gap: 0px;
    display: flow-root;
    position: relative;
    isolation: isolate;
    padding-top: clamp(4rem, 8vw, 6.5rem);
    padding-bottom: clamp(4rem, 8vw, 6.5rem);
    background: var(--cream);
}

.admissions__media {
    position: absolute;
    inset: 0 0 var(--admissions-gap);
    z-index: -2;
}

.admissions__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 30%;
}

/* Light wash on the left carries the dark text and fades into the photo. */
.admissions::before {
    content: "";
    position: absolute;
    inset: 0 0 var(--admissions-gap);
    z-index: -1;
    background: linear-gradient(90deg, rgba(244, 248, 255, 0.97) 0%, rgba(244, 248, 255, 0.93) 34%, rgba(244, 248, 255, 0.55) 52%, rgba(244, 248, 255, 0) 72%);
}

.admissions__content {
    max-width: 36rem;
}

.admissions__content > p {
    margin-top: 1.5rem;
    font-size: 1.0625rem;
}

.admissions__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    margin-top: 2rem;
}

.btn--pill {
    border-radius: 999px;
}

.btn--outline {
    border-color: var(--indigo-700);
    color: var(--indigo-700);
}

.btn--outline:hover {
    background: var(--indigo-700);
    color: var(--white);
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 999.98px) {
    .academics__head,
    .campus__head,
    .principal__grid,
    .intro__top,
    .intro__facts,
    .academics__grid,
    .values__top,
    .values__cards,
    .events__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .intro__media {
        max-width: 38rem;
    }

    .heritage-band__title {
        max-width: none;
    }

    .academics__photo {
        max-width: 30rem;
        aspect-ratio: 1 / 1;
    }


    .facts__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .facts__item:nth-child(3) {
        border-left: 0;
    }

    .facts__item:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .events__feature {
        min-height: 0;
        aspect-ratio: 3 / 2;
    }

    /* Narrower screens put the text over more of the building, so the wash
       stays stronger for longer. */
    .hero::before {
        background:
            linear-gradient(180deg, rgba(7, 20, 47, 0.6) 0%, rgba(7, 20, 47, 0) 32%),
            linear-gradient(90deg, rgba(7, 20, 47, 0.95) 0%, rgba(7, 20, 47, 0.88) 50%, rgba(7, 20, 47, 0.45) 100%);
    }
}

@media (max-width: 899.98px) {
    /* The campus gallery and mosaic become simple stacked grids with their
       own proportions rather than a scaled-down desktop layout. */
    .campus__carousel {
        --card-w: 13rem;
        --card-active-w: 26rem;
        --card-gap: 1rem;
        --card-h: 25rem;
    }

    .principal__portrait {
        max-width: 24rem;
        border-bottom-left-radius: 4rem;
    }
}

@media (max-width: 640px) {
    .campus__more {
        top: 0.875rem;
        right: 0.875rem;
        bottom: auto;
    }

    .campus__carousel {
        --card-w: 44vw;
        --card-active-w: 74vw;
        --card-gap: 0.75rem;
        --card-h: 23rem;
    }

    .campus__caption-wrap {
        padding: 4rem 0.875rem 0.875rem;
    }

    /* On phones the photograph, cropped to the entrance, sits across the top
       and fades into the navy panel that carries the text. */
    .hero {
        display: block;
        min-height: 0;
        padding-top: 15rem;
        padding-bottom: 5.25rem;
    }

    .hero__media {
        top: 3.5rem;
    }

    .hero__media img {
        height: 21rem;
        object-position: 50% 0%;
    }

    .hero::before {
        background: linear-gradient(180deg, rgba(7, 20, 47, 0.55) 0, rgba(7, 20, 47, 0.08) 6rem, rgba(11, 31, 77, 0.82) 14rem, var(--navy-900) 20rem);
    }

    .hero__actions .btn {
        flex: 1 1 100%;
    }

    .steps__item {
        gap: 0.875rem;
        padding: 1rem 1rem 1rem 2.25rem;
    }

    .steps__icon {
        width: 3rem;
        height: 3rem;
    }

    .academics__body::after,
    .academics__links-divider {
        display: none;
    }

    .facts {
        margin-top: -2.75rem;
    }

    .facts__item {
        padding: 1.125rem 1.125rem 1.25rem;
    }

    .intro__photo--main {
        border-bottom-left-radius: 4rem;
    }

    .intro__photo--inset {
        right: 0.75rem;
        width: 46%;
    }

    .intro-stats {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.75rem;
    }

    .intro-stats__item + .intro-stats__item {
        padding: 1.75rem 0 0;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .heritage li + li {
        padding: 1rem 0 0;
        border-left: 0;
        border-top: 1px solid var(--line-dark);
    }

    .heritage,
    .heritage li {
        width: 100%;
    }

    .values__photo {
        border-bottom-left-radius: 4rem;
    }

    .events__row {
        grid-template-columns: 5.5rem minmax(0, 1fr);
        gap: 1rem;
    }

    .events__row-arrow {
        display: none;
    }

    .events__row-title {
        font-size: 1.125rem;
    }

    .events__feature {
        aspect-ratio: 4 / 4.2;
    }

    .events__feature-body {
        padding: 5rem 1.25rem 1.25rem;
    }

    .admissions__actions .btn {
        flex: 1 1 100%;
    }

    .admissions::before {
        background: linear-gradient(180deg, rgba(244, 248, 255, 0.97) 0%, rgba(244, 248, 255, 0.94) 70%, rgba(244, 248, 255, 0.7) 100%);
    }
}

/* Entrance animations ----------------------------------------------------- */

/* Elements start slightly low and transparent, then rise into place when
   site.js marks them .is-in. Only home page elements are tagged, and none
   of this applies when reduced motion is requested. */
@media (prefers-reduced-motion: no-preference) {
    .js .page-home [data-anim]:not(.is-in),
    .js .page-home .hero__content > *:not(.is-in),
    .js .page-home .facts__item:not(.is-in) {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    .js .page-home [data-anim].is-in,
    .js .page-home .hero__content > .is-in,
    .js .page-home .facts__item.is-in {
        animation: home-rise 0.85s var(--ease) var(--d, 0ms) backwards;
    }

    @keyframes home-rise {
        from {
            opacity: 0;
            transform: translate3d(0, 20px, 0);
        }
    }
}

/* Academic stages --------------------------------------------------------- */

.stages__layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: center;
}

.stages__head > .section-heading__title {
    font-size: clamp(2rem, 1.2rem + 2vw, 2.75rem);
    color: #0b1f4d;
}

.stages__head > p:not(.eyebrow) {
    margin-top: 1.5rem;
}

.stages__head .btn {
    margin-top: 2rem;
}

/* Eyebrow with a yellow rule on each side. */
.eyebrow--flanked::before,
.eyebrow--flanked::after {
    content: "";
    flex: none;
    width: 2rem;
    height: 2px;
    background: var(--saffron-400);
}

/* Bento grid: photos and tinted cards alternate like a checkerboard. */
.stages__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(19rem, auto));
    gap: 1.25rem;
}

.stages__photo--a { grid-area: 1 / 1; }
.stage--mint { grid-area: 1 / 2; }
.stages__photo--b { grid-area: 1 / 3; }
.stage--lavender { grid-area: 2 / 1; }
.stages__photo--c { grid-area: 2 / 2; }
.stage--peach { grid-area: 2 / 3; }

.stages__photo {
    position: relative;
    min-height: 15rem;
    overflow: hidden;
    border-radius: 14px;
    background: var(--sand);
}

.stages__photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stage {
    --tone: #38a8f0;
    --bg: #e3f3fe;
    --circle: #c6e6fb;
    position: relative;
    overflow: hidden;
    padding: 1.75rem 1.5rem;
    border-radius: 14px;
    background: var(--bg);
}

.stage--lavender { --tone: #38a8f0; --bg: #e3f3fe; --circle: #c6e6fb; }
.stage--mint { --tone: #00b8d9; --bg: #dbf7fc; --circle: #bdeff8; }
.stage--peach { --tone: #f97316; --bg: #fdebd6; --circle: #fbdab5; }

/* Soft circles in the corners. */
.stage::before,
.stage::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: var(--circle);
    pointer-events: none;
}

.stage::before {
    top: -2.75rem;
    right: -2.75rem;
    width: 8rem;
    height: 8rem;
}

.stage--lavender::after {
    right: -3rem;
    bottom: -3rem;
    width: 8.5rem;
    height: 8.5rem;
}

.stage--peach::after {
    right: -2.5rem;
    bottom: -2.5rem;
    width: 7rem;
    height: 7rem;
}

.stage > * {
    position: relative;
    z-index: 1;
}

.stage__badge {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--tone);
    color: var(--white);
}

.stage__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #0b1f4d;
}

.stage__title {
    margin-top: 0.5rem;
    padding-bottom: 0.875rem;
    font-size: clamp(1.5rem, 1.2rem + 0.7vw, 1.875rem);
    letter-spacing: -0.03em;
    color: #0b1f4d;
    background: linear-gradient(var(--tone), var(--tone)) 0 100% / 3rem 4px no-repeat;
    border-radius: 2px;
}

.stage__text {
    margin-top: 1.125rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #4d5470;
}

@media (max-width: 1099.98px) {
    .stages__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .stages__head {
        max-width: 40rem;
    }
}

/* Tablet: two columns, still alternating photo and card. */
@media (max-width: 999.98px) {
    .stages__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .stages__photo--a, .stage--lavender, .stage--mint,
    .stages__photo--c, .stages__photo--b, .stage--peach {
        grid-area: auto;
    }

    /* Reading order: kindergarten, primary, middle, each beside a photo. */
    .stages__photo--a { order: 1; }
    .stage--lavender { order: 2; }
    .stages__photo--c { order: 4; }
    .stage--mint { order: 3; }
    .stages__photo--b { order: 5; }
    .stage--peach { order: 6; }
}

/* Phone: one column. */
@media (max-width: 640px) {
    .stages__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .stages__photo {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .stages__photo--a { order: 1; }
    .stage--lavender { order: 2; }
    .stages__photo--c { order: 3; }
    .stage--mint { order: 4; }
    .stages__photo--b { order: 5; }
    .stage--peach { order: 6; }

    .stages__head .btn {
        width: 100%;
    }
}


/* Section background patterns ---------------------------------------------
   One quiet, different pattern per plain-colour section. They are painted on
   the section background only, at very low contrast, so nothing moves and
   text stays fully readable. */

/* About: soft dot grid in the brand indigo. */
.intro {
    background-image: radial-gradient(circle at 1px 1px, rgba(31, 79, 216, 0.1) 1.25px, transparent 1.5px);
    background-size: 26px 26px;
}

/* Academics: fine diagonal hatching on cream. */
.section.academics {
    background-image: repeating-linear-gradient(45deg, rgba(31, 79, 216, 0.045) 0 1px, transparent 1px 14px);
}

/* Why choose: faint blueprint grid on navy. */
.section.values {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
}

/* Events and celebrations has its own light blue background, so it no longer needs to share
   spacing with the white Programmes section above it. */
.section.events {
    background: var(--indigo-100);
}

/* "Why choose" picture: the crest centred over a softened view of the school. */
.values__photo--crest {
    position: relative;
    display: grid;
    place-items: center;
    background: var(--indigo-100);
}

.values__photo--crest::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(244, 248, 255, 0.62);
}

.values__photo--crest > picture,
.values__photo--crest > img:not(.values__crest) {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.values__photo--crest .values__crest {
    position: relative;
    z-index: 2;
    width: auto;
    height: 88%;
    max-width: 70%;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(7, 20, 47, 0.18));
}

/* A button at the foot of each stage card, in the card's own colour. */
.stage__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    background: var(--tone);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.stage__btn:hover,
.stage__btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px -10px rgba(11, 31, 77, 0.6);
}

/* Home banner: a lighter wash so the photograph shows clearly. A soft shadow keeps the white text readable. */
.hero::before {
    background:
        linear-gradient(180deg, rgba(7, 20, 47, 0.45) 0%, rgba(7, 20, 47, 0) 26%),
        linear-gradient(90deg, rgba(7, 20, 47, 0.62) 0%, rgba(7, 20, 47, 0.45) 34%, rgba(7, 20, 47, 0.15) 62%, rgba(7, 20, 47, 0) 85%);
}

.hero__content { text-shadow: 0 2px 14px rgba(7, 20, 47, 0.55); }

@media (min-width: 900px) and (max-width: 999.98px) {
    .hero::before {
        background:
            linear-gradient(180deg, rgba(7, 20, 47, 0.45) 0%, rgba(7, 20, 47, 0) 26%),
            linear-gradient(90deg, rgba(7, 20, 47, 0.66) 0%, rgba(7, 20, 47, 0.5) 50%, rgba(7, 20, 47, 0.15) 100%);
    }
}

@media (max-width: 899.98px) {
    .hero::before {
        background: linear-gradient(180deg, rgba(7, 20, 47, 0.4) 0, rgba(7, 20, 47, 0) 6rem, rgba(11, 31, 77, 0.5) 14rem, var(--navy-900) 20rem);
    }
}
