/* ============================================================
   XEP - Entrance Prep  |  LIGHT THEME
   Apple-style blur header + full home page
   ============================================================ */

:root {
    --xep-ink: #0e1424;          /* headings */
    --xep-body: #444c5e;         /* paragraph text */
    --xep-muted: #6b7384;        /* small / meta */
    --xep-bg: #ffffff;
    --xep-soft: #f5f6fa;         /* alt section bg */
    --xep-cream: #faf8f4;        /* hero bg */
    --xep-line: rgba(14, 20, 36, 0.10);
    --xep-line-soft: rgba(14, 20, 36, 0.06);
    --xep-accent: #ff5a3c;       /* coral */
    --xep-accent-ink: #e2452b;
    --xep-navy: #0e1424;
    --xep-header-h: 64px;
    --xep-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.xep-body { margin: 0; background: var(--xep-bg); color: var(--xep-body); }
.xep-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px; }

/* ============================================================
   Font Awesome -> inline SVG (rendered in "nest" mode site-wide).
   Hide the duplicate webfont glyph once the SVG has been injected,
   and make the SVG inherit size (font-size) and colour (currentColor).
   ============================================================ */
i:has(> svg.svg-inline--fa)::before { content: none !important; }
svg.svg-inline--fa { height: 1em; width: auto; vertical-align: -0.125em; }
.fa-spin { animation: fa-spin 1s linear infinite; }
@keyframes fa-spin { to { transform: rotate(360deg); } }

/* ============================================================
   HEADER  (Apple-style, light, blur on scroll)
   ============================================================ */
.xep-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9000;
    height: var(--xep-header-h);
    display: flex;
    align-items: center;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background 0.4s var(--xep-ease), backdrop-filter 0.4s var(--xep-ease),
                border-color 0.4s var(--xep-ease), box-shadow 0.4s var(--xep-ease);
}
.xep-header-inner {
    width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

/* Logo */
.xep-logo { display: flex; flex-direction: column; line-height: 1; text-decoration: none; flex-shrink: 0; }
.xep-logo-img { height: 42px; width: auto; display: block; }
body.xep-home .xep-header:not(.is-scrolled) .xep-logo-img { filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35)); }
@media (max-width: 560px) { .xep-logo-img { height: 34px; } }
.xep-logo-mark {
    font-family: 'Google Sans', sans-serif;
    font-weight: 600; font-size: 26px; letter-spacing: 1px;
    color: var(--xep-ink);
}
.xep-logo-sub {
    font-family: 'Google Sans', sans-serif; font-size: 9.5px; font-weight: 600;
    letter-spacing: 2.6px; text-transform: uppercase; color: var(--xep-muted); margin-top: 3px;
}

/* Nav */
.xep-nav { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.xep-nav-item { position: relative; }
.xep-nav-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'Google Sans', sans-serif; font-size: 14px; font-weight: 500;
    color: var(--xep-ink); text-decoration: none; padding: 9px 14px; border-radius: 8px;
    transition: color 0.25s var(--xep-ease), background 0.25s var(--xep-ease); white-space: nowrap;
}
.xep-nav-link:hover { background: rgba(14, 20, 36, 0.06); color: var(--xep-accent-ink); }
.xep-caret { font-size: 9px; opacity: 0.6; transition: transform 0.25s var(--xep-ease); }
.xep-nav-item.has-drop:hover .xep-caret { transform: rotate(180deg); }

/* Dropdown */
.xep-drop {
    position: absolute; top: calc(100% + 10px); left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 290px; background: #ffffff;
    -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid var(--xep-line); border-radius: 16px;
    box-shadow: 0 20px 50px rgba(14, 20, 36, 0.14); padding: 10px;
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s var(--xep-ease), transform 0.25s var(--xep-ease), visibility 0.25s;
}
.xep-nav-item.has-drop:hover .xep-drop { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.xep-drop-link { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 11px; text-decoration: none; transition: background 0.2s var(--xep-ease); }
.xep-drop-link:hover { background: rgba(14, 20, 36, 0.05); }
.xep-drop-link i { font-size: 15px; color: var(--xep-accent); margin-top: 2px; width: 18px; text-align: center; }
.xep-drop-link b { display: block; font-family: 'Google Sans', sans-serif; font-size: 14px; font-weight: 600; color: var(--xep-ink); }
.xep-drop-link small { display: block; font-size: 12px; color: var(--xep-muted); margin-top: 2px; }

/* Actions */
.xep-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.xep-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border: none; background: transparent;
    color: var(--xep-ink); font-size: 15px; border-radius: 50%; cursor: pointer;
    transition: color 0.25s, background 0.25s;
}
.xep-icon-btn:hover { background: rgba(14, 20, 36, 0.06); color: var(--xep-accent-ink); }
.xep-login {
    font-family: 'Google Sans', sans-serif; font-size: 14px; font-weight: 500;
    color: var(--xep-ink); text-decoration: none; padding: 9px 12px; border-radius: 8px;
    transition: color 0.25s, background 0.25s; white-space: nowrap;
}
.xep-login:hover { background: rgba(14, 20, 36, 0.06); color: var(--xep-accent-ink); }
.xep-cta {
    font-family: 'Google Sans', sans-serif; font-size: 14px; font-weight: 600;
    color: #fff; background: var(--xep-navy); text-decoration: none;
    padding: 9px 18px; border-radius: 999px; border: none; cursor: pointer;
    transition: transform 0.2s var(--xep-ease), box-shadow 0.2s var(--xep-ease), background 0.2s; white-space: nowrap;
}
.xep-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(14, 20, 36, 0.22); background: #000; color: #fff; }
.xep-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; background: var(--xep-accent);
    color: #fff; font-weight: 700; font-size: 14px; font-family: 'Google Sans', sans-serif; text-decoration: none;
}

/* Burger */
.xep-burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; border: none; background: transparent; cursor: pointer; padding: 0; }
.xep-burger span { display: block; height: 2px; width: 22px; margin: 0 auto; background: var(--xep-ink); border-radius: 2px; transition: transform 0.3s var(--xep-ease), opacity 0.2s var(--xep-ease); }
.xep-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.xep-burger.open span:nth-child(2) { opacity: 0; }
.xep-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Scrolled + inner-page: frosted white */
.xep-header.is-scrolled,
body.xep-inner .xep-header {
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom-color: var(--xep-line); box-shadow: 0 1px 0 rgba(14, 20, 36, 0.04);
}
body.xep-inner #outer-wrapper { padding-top: var(--xep-header-h); }

/* ============================================================
   HEADER BANNER STRIP  (Admin > Header Banners)
   Fixed directly under the header. --xep-hb-h is published by the
   strip's own script once its images have sized themselves.
   ============================================================ */
:root {
    /* Safety ceiling only. A correctly proportioned banner (1920x160, i.e. 12:1) never reaches
       it; a wrongly shaped upload gets cropped here instead of pushing the whole page down. */
    --xep-hb-max: 260px;
}
/* In normal flow, not fixed: only the header bar stays pinned, the banner scrolls away
   under it. The wrapper's padding-top (below) is what keeps it clear of the fixed header. */
.xep-hb {
    position: relative;
    background: #fff; border-bottom: 1px solid var(--xep-line);
    overflow: hidden;
}
/* Full-bleed: the strip is not held to the 1240px content width */
.xep-hb-viewport { width: 100%; overflow: hidden; }
.xep-hb-track { display: flex; transition: transform 0.5s var(--xep-ease); }
.xep-hb-slide { flex: 0 0 100%; display: block; line-height: 0; }
/* The image spans the full window width and keeps its own proportions, so a wide banner is
   never letterboxed. object-fit only bites if an upload is so tall it hits the ceiling above. */
.xep-hb-slide img { display: block; width: 100%; height: auto; max-height: var(--xep-hb-max); object-fit: cover; }
.xep-hb-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 30px; height: 30px; border: none; border-radius: 50%;
    background: rgba(255,255,255,0.86); color: var(--xep-ink); font-size: 12px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(14,20,36,0.16); opacity: 0; transition: opacity 0.25s var(--xep-ease);
}
.xep-hb:hover .xep-hb-arrow { opacity: 1; }
.xep-hb-arrow.prev { left: 10px; }
.xep-hb-arrow.next { right: 10px; }
.xep-hb-dots { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); z-index: 2; display: flex; gap: 6px; }
.xep-hb-dot { width: 6px; height: 6px; padding: 0; border: none; border-radius: 50%; background: rgba(14,20,36,0.28); cursor: pointer; transition: width 0.2s, background 0.2s; }
.xep-hb-dot.is-active { width: 16px; border-radius: 999px; background: var(--xep-accent); }
/* With a banner present every page reserves the header's height, so the strip starts
   directly below the header instead of underneath it — including the homepage, whose hero
   would otherwise sit under the fixed header. */
body.has-hb #outer-wrapper { padding-top: var(--xep-header-h); }
/* On the homepage the header no longer floats over the hero, so its script pins the
   .is-scrolled (frosted) state permanently — see includes/header.php. */
@media (max-width: 620px) {
    .xep-hb-arrow { display: none; }
    .xep-hb-dots { bottom: 4px; }
}

/* Body banner variant (Admin > Body Banner) — homepage only, between Our Programmes and
   Life at XEP. Held to the content width instead of running edge to edge. */
.xep-hb--body {
    /* Taller ceiling than the header strip: this one can take a deep creative, up to 700px. */
    --xep-hb-max: 700px;
    width: 100%; max-width: 1240px; margin: 0 auto;
    padding: 0 28px; box-sizing: border-box;
    background: transparent; border-bottom: none;
    overflow: visible;
}
.xep-hb--body .xep-hb-viewport { border-radius: 16px; overflow: hidden; }
.xep-hb--body .xep-hb-arrow.prev { left: 38px; }
.xep-hb--body .xep-hb-arrow.next { right: 38px; }
@media (max-width: 620px) {
    .xep-hb--body { padding: 0 18px; }
    .xep-hb--body .xep-hb-viewport { border-radius: 12px; }
}

/* Mobile off-canvas backdrop */
.xep-mobile-backdrop {
    position: fixed; inset: 0; z-index: 9050;
    background: rgba(8, 12, 24, 0.60);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s var(--xep-ease), visibility 0.35s;
}
.xep-mobile-backdrop.open { opacity: 1; visibility: visible; }

/* Mobile off-canvas drawer (slides in from the right) */
.xep-mobile {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 9100;
    width: min(340px, 88vw);
    background: rgba(14, 18, 32, 0.97);
    -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.10);
    padding: 0 0 40px;
    display: flex; flex-direction: column; gap: 0;
    visibility: hidden; transform: translateX(100%);
    transition: transform 0.38s var(--xep-ease), visibility 0.38s;
    overflow-y: auto;
}
.xep-mobile.open { visibility: visible; transform: translateX(0); }

/* Drawer header row (logo area + close button) */
.xep-mobile-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 22px;
    height: var(--xep-header-h);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.xep-mobile-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.80);
    font-size: 15px; cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.xep-mobile-close:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* Drawer body (scrollable content) */
.xep-mobile-body {
    flex: 1; overflow-y: auto; padding: 16px 22px 24px;
    display: flex; flex-direction: column; gap: 2px;
}

.xep-mobile a {
    font-family: 'Google Sans', sans-serif; font-size: 17px; font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none; padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: color 0.2s, padding-left 0.2s;
    display: block;
}
.xep-mobile a:last-child { border-bottom: none; }
.xep-mobile a:hover { color: #fff; padding-left: 6px; }
.xep-mobile a.xep-mobile-cta {
    margin-top: 18px; border: none;
    background: var(--xep-accent); color: #fff; text-align: center;
    border-radius: 999px; padding: 14px 18px; font-size: 15px; font-weight: 600;
}
.xep-mobile a.xep-mobile-cta:hover { padding-left: 0; opacity: 0.92; }
.xep-mobile .xep-mobile-label {
    font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35); padding: 20px 0 6px; border: none;
    pointer-events: none;
}

/* Collapsible "Programmes" accordion in the mobile drawer */
.xep-mobile-acc {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; background: none; border: none; cursor: pointer;
    font-family: 'Google Sans', sans-serif; font-size: 17px; font-weight: 500;
    color: rgba(255, 255, 255, 0.88); text-align: left;
    padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: color 0.2s var(--xep-ease);
}
.xep-mobile-acc:hover { color: #fff; }
.xep-mobile-acc i { font-size: 12px; opacity: 0.65; transition: transform 0.3s var(--xep-ease); }
.xep-mobile-acc.open i { transform: rotate(180deg); }
/* Collapsed by default; expands when JS adds .open */
.xep-mobile-sub { overflow: hidden; max-height: 0; transition: max-height 0.35s var(--xep-ease); }
.xep-mobile-sub.open { max-height: 60vh; }
.xep-mobile-sub a { padding-left: 16px; color: rgba(255, 255, 255, 0.70); }
.xep-mobile-sub a:hover { color: #fff; padding-left: 22px; }

/* ============================================================
   HERO  (light, full-bleed centre-photo, text overlay)
   ============================================================ */
.xep-hero {
    position: relative; min-height: 120vh; display: flex; align-items: center; overflow: hidden;
    background: linear-gradient(120deg, #0b1020 0%, #141d3b 60%, #0b1020 100%);
}
.xep-hero-slides { position: absolute; inset: 0; z-index: 0; }
.xep-hero-slide {
    position: absolute; inset: 0; background-size: cover; background-position: 64% center;
    /* Crisp, vibrant photo under a dark overlay (Master's Union style) */
    filter: saturate(1.05) contrast(1.04) brightness(0.96);
    opacity: 0; transition: opacity 1.4s ease;
}
.xep-hero-slide.active { opacity: 1; }
.xep-hero-scrim {
    position: absolute; inset: 0; z-index: 1;
    /* Dark overlay: heavier on the LEFT (text) + BOTTOM, lighter on the RIGHT so the photo shows */
    background:
        linear-gradient(95deg,
            rgba(8, 12, 24, 0.86) 0%,
            rgba(8, 12, 24, 0.74) 32%,
            rgba(8, 12, 24, 0.52) 54%,
            rgba(8, 12, 24, 0.28) 78%,
            rgba(8, 12, 24, 0.18) 100%),
        linear-gradient(180deg,
            rgba(8, 12, 24, 0.55) 0%,
            rgba(8, 12, 24, 0.10) 30%,
            rgba(8, 12, 24, 0.10) 58%,
            rgba(8, 12, 24, 0.80) 100%);
}
.xep-hero-inner { position: relative; z-index: 2; width: 100%; max-width: 1240px; margin: 0 auto; padding: calc(var(--xep-header-h) + 40px) 28px 60px; }
.xep-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: 'Google Sans', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
    color: var(--xep-ink); padding: 8px 16px; background: #fff; border: 1px solid var(--xep-line); border-radius: 999px;
    box-shadow: 0 4px 18px rgba(14, 20, 36, 0.06); margin-bottom: 26px;
}
.xep-hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--xep-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--xep-accent) 18%, transparent); }
.xep-hero h1 {
    font-family: 'Google Sans', sans-serif; font-weight: 600; color: #fff;
    font-size: clamp(48px, 6.35vw, 106px); line-height: 1.22; letter-spacing: -1px; margin: 0 0 2px; max-width: 16ch;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}
.xep-hero h1 .accent {
    font-family: 'Google Sans', sans-serif; font-style: normal; font-weight: 700;
    color: var(--xep-accent);
}
.xep-hero-sub { font-family: 'Google Sans', sans-serif; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.65; color: var(--xep-body); max-width: 54ch; margin: 0 0 30px; }

.xep-exam-row { border-top: 1px solid var(--xep-line); padding-top: 2px; margin-top: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; max-width: 620px; }
.xep-exam-pill {
    display: inline-flex; align-items: center; gap: 16px; margin-top: 15px; white-space: nowrap; max-width: 100%;
    font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: clamp(15px, 4.2vw, 24px); letter-spacing: 0.3px;
    color: var(--xep-ink); padding: 13px 30px; border: 1px solid var(--xep-line); border-radius: 999px; background: #fff;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--xep-ink) 5%, transparent);
}
.xep-exam-pill .sep { color: var(--xep-line); font-weight: 400; }
.xep-exam-chip {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: 18px; letter-spacing: 0.3px;
    color: var(--xep-ink); padding: 11px 26px; border: 1px solid var(--xep-line); border-radius: 999px; background: #fff;
    box-shadow: 0 4px 14px rgba(14, 20, 36, 0.05);
}
.xep-exam-chip i { color: var(--xep-accent); font-size: 14px; }
.xep-exam-sep { color: var(--xep-line); font-size: 18px; }

.xep-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.xep-btn {
    display: inline-flex; align-items: center; gap: 10px; font-family: 'Google Sans', sans-serif; font-size: 15px; font-weight: 600;
    text-decoration: none; padding: 15px 28px; border-radius: 999px;
    transition: transform 0.2s var(--xep-ease), box-shadow 0.2s var(--xep-ease), background 0.2s, color 0.2s; cursor: pointer; border: none;
}
.xep-btn-primary { background: var(--xep-navy); color: #fff; }
.xep-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(14, 20, 36, 0.25); background: #000; color: #fff; }
.xep-btn-primary i { transition: transform 0.25s var(--xep-ease); }
.xep-btn-primary:hover i { transform: translateX(4px); }
.xep-btn-ghost { background: #fff; color: var(--xep-ink); border: 1px solid var(--xep-line); }
.xep-btn-ghost:hover { background: var(--xep-soft); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(14, 20, 36, 0.08); color: var(--xep-ink); }
.xep-btn-accent { background: var(--xep-accent); color: #fff; }
.xep-btn-accent:hover { transform: translateY(-2px); box-shadow: 0 14px 34px color-mix(in srgb, var(--xep-accent) 32%, transparent); background: var(--xep-accent-ink); color: #fff; }

.xep-hero-trust { display: flex; flex-wrap: wrap; gap: 38px; margin-top: 48px; }
.xep-hero-trust div { display: flex; flex-direction: column; }
.xep-hero-trust strong { font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: 28px; color: var(--xep-ink); line-height: 1; }
.xep-hero-trust span { font-family: 'Google Sans', sans-serif; font-size: 13px; color: var(--xep-muted); margin-top: 7px; }

/* ---- Dark hero (Master's Union style): white text + glassy controls ---- */
.xep-hero .xep-exam-row { border-top-color: rgba(255, 255, 255, 0.22); }
.xep-hero .xep-exam-chip { color: #fff; background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.28); box-shadow: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.xep-hero .xep-exam-pill { color: #fff; background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.30); box-shadow: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.xep-hero .xep-exam-pill .sep { color: rgba(255, 255, 255, 0.38); }
.xep-hero .xep-exam-sep { color: rgba(255, 255, 255, 0.30); }
.xep-hero .xep-hero-trust strong { color: #fff; }
.xep-hero .xep-hero-trust span { color: rgba(255, 255, 255, 0.72); }
.xep-hero .xep-btn-primary, .xep-hero .xep-btn-primary:hover { background: #fff; color: var(--xep-ink); }
.xep-hero .xep-btn-ghost { background: rgba(255, 255, 255, 0.10); color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.xep-hero .xep-btn-ghost:hover { background: rgba(255, 255, 255, 0.20); color: #fff; }

/* Header sits over the dark hero (home, before scroll) -> light text */
body.xep-home .xep-header:not(.is-scrolled) .xep-logo-mark { color: #fff; }
body.xep-home .xep-header:not(.is-scrolled) .xep-logo-sub { color: rgba(255, 255, 255, 0.70); }
body.xep-home .xep-header:not(.is-scrolled) .xep-nav-link { color: rgba(255, 255, 255, 0.90); }
body.xep-home .xep-header:not(.is-scrolled) .xep-nav-link:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
body.xep-home .xep-header:not(.is-scrolled) .xep-icon-btn { color: rgba(255, 255, 255, 0.90); }
body.xep-home .xep-header:not(.is-scrolled) .xep-icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
body.xep-home .xep-header:not(.is-scrolled) .xep-login { color: rgba(255, 255, 255, 0.90); }
body.xep-home .xep-header:not(.is-scrolled) .xep-login:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
body.xep-home .xep-header:not(.is-scrolled) .xep-cta { background: #fff; color: var(--xep-ink); }
body.xep-home .xep-header:not(.is-scrolled) .xep-burger span { background: #fff; }

/* ============================================================
   SHARED SECTION SCAFFOLD
   ============================================================ */
.xep-section { padding: 96px 0; }
.xep-section.alt { background: var(--xep-soft); }
.xep-sec-head { max-width: 680px; margin: 0 0 48px; }
.xep-sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.xep-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; font-family: 'Google Sans', sans-serif; font-size: 12px;
    font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--xep-accent-ink); margin-bottom: 16px;
}
.xep-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--xep-accent); border-radius: 2px; }
.xep-sec-head.center .xep-eyebrow { justify-content: center; }
.xep-sec-head h2 { font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.6px; color: var(--xep-ink); margin: 0 0 16px; }
.xep-sec-head p { font-family: 'Google Sans', sans-serif; font-size: 17px; line-height: 1.65; color: var(--xep-body); margin: 0; }
/* Keep these three section headlines on a single line, extending into the free space on the right.
   Only on wide screens — narrower viewports wrap normally so nothing overflows. */
@media (min-width: 992px) {
    #students .xep-sec-head,
    #pedagogy .xep-sec-head,
    #xperiences .xep-sec-head { max-width: none; }
    #students .xep-sec-head h2,
    #pedagogy .xep-sec-head h2,
    #xperiences .xep-sec-head h2 { white-space: nowrap; }
}

/* ============================================================
   SECTION 2 - OUR PROGRAMMES
   ============================================================ */
/* Tighten the gap between the "Our Programmes" heading and the tabs
   (all screen sizes). */
#programmes .xep-sec-head { margin-bottom: 20px; }
/* Tabs + carousel controls */
.xep-prog-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.xep-prog-tabs { display: inline-flex; background: var(--xep-soft); border: 1px solid var(--xep-line); border-radius: 999px; padding: 6px; gap: 4px; }
.xep-prog-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: none; background: transparent; cursor: pointer; padding: 8px 22px; border-radius: 999px; font-family: 'Google Sans', sans-serif; color: var(--xep-muted); transition: background .25s var(--xep-ease), color .25s var(--xep-ease), box-shadow .25s; text-align: left; }
.xep-prog-tab b { font-size: 15px; font-weight: 600; color: inherit; line-height: 1.15; }
.xep-prog-tab span { font-size: 11px; color: inherit; opacity: .85; }
.xep-prog-tab.active { background: #fff; color: var(--xep-ink); box-shadow: 0 4px 14px rgba(14, 20, 36, .08); }
.xep-prog-tab.active span { color: var(--xep-accent-ink); }
.xep-prog-arrows { display: flex; gap: 10px; }

/* Carousel rails (one per tab) */
.xep-prog-rail { display: none; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 20px; scrollbar-width: none; }
.xep-prog-rail::-webkit-scrollbar { display: none; }
.xep-prog-rail.active { display: flex; }

/* Programme card: image + 2x2 attribute grid */
.xep-prog-card2 {
    flex: 0 0 min(82%, 880px); scroll-snap-align: start;
    display: grid; grid-template-columns: 300px 1fr;
    background: #fff; border: 1px solid var(--xep-line); border-radius: 24px; overflow: hidden;
    box-shadow: 0 12px 32px rgba(14, 20, 36, 0.06);
}
.xep-prog-media {
    position: relative; min-height: 330px; background-size: cover; background-position: center;
    background-image: linear-gradient(165deg, #fff1ec, #ffd9cd);
    display: flex; align-items: flex-end; padding: 22px;
}
.xep-prog-media-ph { font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: 22px; color: var(--xep-accent-ink); opacity: .5; }
.xep-prog-badge2 { position: absolute; top: 18px; left: 18px; font-style: normal; font-family: 'Google Sans', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #fff; background: var(--xep-badge-bg, var(--xep-accent)); padding: 6px 13px; border-radius: 999px; box-shadow: 0 6px 16px color-mix(in srgb, var(--xep-badge-bg, var(--xep-accent)) 35%, transparent); }
.xep-prog-body2 { padding: 34px 36px; display: flex; flex-direction: column; }
.xep-prog-name { font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: 28px; color: var(--xep-ink); margin: 0 0 22px; padding-bottom: 3px; border-bottom: 2px solid var(--xep-line); }
.xep-prog-attrs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 28px; }
.xep-prog-attr { display: flex; align-items: flex-start; gap: 13px; }
.xep-prog-ico { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--xep-accent) 10%, transparent); color: var(--xep-accent); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.xep-prog-attr-txt { display: flex; flex-direction: column; }
.xep-prog-attr .k { font-family: 'Google Sans', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--xep-muted); }
.xep-prog-attr .v { font-family: 'Google Sans', sans-serif; font-size: 15px; font-weight: 500; color: var(--xep-ink); margin-top: 3px; }
.xep-prog-body2 .xep-btn { align-self: flex-start; margin-top: auto; }

@media (max-width: 900px) {
    .xep-prog-card2 { grid-template-columns: 1fr; flex-basis: 90%; }
    .xep-prog-media { min-height: 190px; }
    .xep-prog-attrs2 { grid-template-columns: 1fr 1fr; }
}

/* ── Mobile programme tabs optimisation ── */
@media (max-width: 600px) {
    /* Controls: stack vertically, tabs on top, arrows below */
    .xep-prog-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 20px;
    }

    /* Tab strip: full-width, horizontally scrollable — same pill shape as desktop.
       Paged 2-up view: scroll-snap ensures tabs always land on whole-tab
       boundaries, so exactly two are visible and no third ever peeks. */
    .xep-prog-tabs {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-radius: 999px;
        padding: 6px;           /* slightly more than 5px — breathing room at left edge */
        gap: 6px;
        flex-wrap: nowrap;
        position: relative;     /* ensures layout measurements stay consistent */
        scroll-snap-type: x mandatory;
        scroll-padding-left: 6px;   /* matches container padding so snap sits flush */
    }
    .xep-prog-tabs::-webkit-scrollbar { display: none; }

    /* Each tab: exactly half the strip so two fit with no sliver of a third.
       calc(50% - 9px) accounts for the 6px gap + 12px total side padding. */
    .xep-prog-tab {
        flex: 0 0 calc(50% - 9px);
        min-width: 0;
        align-items: flex-start;
        text-align: left;
        padding: 7px 16px;
        border-radius: 999px;
        min-height: 44px;
        scroll-snap-align: start;
    }

    /* Keep each label on one line inside the fixed-width tab */
    .xep-prog-tab b,
    .xep-prog-tab span {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Slightly smaller label on mobile */
    .xep-prog-tab b { font-size: 13px; }

    /* Subtitle: keep visible, slightly smaller */
    .xep-prog-tab span { font-size: 10px; display: block; }

    /* Active: same white card + shadow as desktop, NO accent fill */
    .xep-prog-tab.active {
        background: #fff;
        color: var(--xep-ink);
        box-shadow: 0 4px 14px rgba(14, 20, 36, .08);
    }
    .xep-prog-tab.active span { color: var(--xep-accent-ink); }

    /* Arrows row: left-aligned */
    .xep-prog-arrows { justify-content: flex-start; }

    /* Cards */
    .xep-prog-card2 { flex-basis: 92%; }
    .xep-prog-attrs2 { grid-template-columns: 1fr; gap: 16px; }
    .xep-prog-body2 { padding: 22px 20px; }
}

/* ============================================================
   SECTION 3 - STUDENTS (reels carousel)
   ============================================================ */
/* Master's Union style coverflow reels + content panel */
.xep-stu-section { padding: 90px 0; background: var(--xep-soft); }
/* Pages where the preceding section is already grey (e.g. /about) render this one on white
   so the light/grey alternation carries on. Set via $lifeSectionModifier on the include. */
.xep-stu-section.on-white { background: var(--xep-bg); }
.xep-stu-band {
    position: relative; background: #0b0d12; border-radius: 28px; overflow: hidden;
    min-height: 520px; display: flex; align-items: center; gap: 0; padding: 50px 44px;
}
.xep-stu-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(680px 380px at 82% 8%, rgba(255,255,255,0.045), transparent 60%); pointer-events: none; }

/* Left: coverflow stage */
.xep-stu-stage { position: relative; flex: 0 0 320px; height: 470px; z-index: 4; }
.xep-stu-reel {
    position: absolute; left: 50%; top: 50%; width: 248px; height: 440px; padding: 0; border: none; cursor: pointer;
    border-radius: 22px; overflow: hidden; background-size: cover; background-position: center;
    background-color: #1a2238; background-image: linear-gradient(165deg, #1a2238, #0e1424);
    transform: translate(-50%, -50%) scale(0.6); opacity: 0; pointer-events: none; z-index: 1;
    transition: transform 0.55s var(--xep-ease), opacity 0.55s var(--xep-ease);
}
.xep-stu-reel.is-active { transform: translate(-50%, -50%) scale(1); opacity: 1; z-index: 5; pointer-events: auto; box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 0 6px #fff; }
.xep-stu-reel.is-prev  { transform: translate(calc(-50% - 60px), -50%) scale(0.82); opacity: 0.5; z-index: 3; pointer-events: auto; }
.xep-stu-reel.is-next  { transform: translate(calc(-50% + 60px), -50%) scale(0.82); opacity: 0.5; z-index: 3; pointer-events: auto; }
.xep-stu-reel.is-prev2 { transform: translate(calc(-50% - 105px), -50%) scale(0.66); opacity: 0.22; z-index: 2; }
.xep-stu-reel.is-next2 { transform: translate(calc(-50% + 105px), -50%) scale(0.66); opacity: 0.22; z-index: 2; }
.xep-stu-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.92); display: flex; align-items: center; justify-content: center; color: var(--xep-navy); font-size: 16px; transition: opacity 0.3s; }
.xep-stu-reel:not(.is-active) .xep-stu-play { opacity: 0; }
.xep-stu-dots { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 6; }
.xep-stu-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,0.3); cursor: pointer; padding: 0; transition: background 0.2s, width 0.2s; }
.xep-stu-dot.is-active { background: #fff; width: 22px; border-radius: 999px; }

/* Right: white content panel */
.xep-stu-panel { flex: 1; background: #fff; border-radius: 20px; padding: 56px 56px 56px 200px; margin-left: -110px; z-index: 2; }
.xep-stu-kicker { display: block; font-family: 'Google Sans', sans-serif; font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--xep-accent-ink); margin-bottom: 12px; }
.xep-stu-title { font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.12; color: var(--xep-ink); margin: 0 0 16px; }
.xep-stu-desc { font-family: 'Google Sans', sans-serif; font-size: 16.5px; line-height: 1.6; color: var(--xep-muted); margin: 0; max-width: 44ch; }

@media (max-width: 900px) {
    .xep-stu-band { flex-direction: column; padding: 36px 16px 48px; min-height: 0; }
    .xep-stu-stage { flex: none; margin: 0 auto 40px; }
    .xep-stu-panel { width: 100%; box-sizing: border-box; margin-left: 0; padding: 34px 26px; }
    .xep-stu-desc { max-width: none; }
}
/* play button shows only on reels that have a video */
.xep-stu-reel:not(.has-video) .xep-stu-play { display: none; }

/* Inline reel player (plays inside the card, no footprint) */
.xep-stu-player { position: absolute; inset: 0; z-index: 6; border-radius: inherit; overflow: hidden; }
video.xep-stu-player { width: 100%; height: 100%; object-fit: cover; background: #000; }
.xep-stu-reel.is-playing .xep-stu-play { display: none; }
/* IG embed mounted and painted -> hide ours, so only Instagram's own play button is on screen
   (one click plays). Ours stays up while the embed is still loading in. */
.xep-stu-reel.is-embed-ready .xep-stu-play { display: none; }

/* ── Footprint-free reel player modal ── */
.xep-reel-modal { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; padding: 24px; }
.xep-reel-modal.open { display: flex; }
.xep-reel-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.xep-reel-modal-frame { position: relative; z-index: 2; width: min(94vw, 400px); aspect-ratio: 9 / 16; max-height: 92vh; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 90px rgba(0,0,0,0.6); }
.xep-reel-modal-frame video { width: 100%; height: 100%; object-fit: cover; background: #000; display: block; }
.xep-reel-yt { position: absolute; inset: 0; overflow: hidden; background: #000; }
/* 9:16 fill; oversize crops out YouTube Shorts chrome (channel/title top, "Shorts" logo
   bottom) with no dark masks — the extra height alone pushes the chrome outside the frame. */
.xep-reel-yt .ratio { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); height: calc(100% + 210px); aspect-ratio: 9 / 16; }
.xep-reel-yt .ratio iframe { width: 100%; height: 100%; display: block; border: 0; }
.xep-reel-tap { position: absolute; inset: 0; z-index: 3; cursor: pointer; }
/* Instagram reel embed. IG's /embed/ page is a fixed layout: a 54px header, then a 4:5 media
   box with the 9:16 reel letterboxed inside it, then the likes/caption footer. igFit() in
   index.php sizes and offsets the iframe so that inner 9:16 video rect lands exactly on the
   card — the header, the footer (the white strip) and the black letterbox bars all fall
   outside the crop, so the reel itself is shown whole rather than zoomed in. */
.xep-reel-ig { position: absolute; inset: 0; overflow: hidden; background: transparent; }
.xep-reel-ig iframe { position: absolute; top: 0; left: 0; display: block; border: 0; transform-origin: 0 0; background: #000; opacity: 0; transition: opacity 0.3s ease; }
.xep-reel-ig.is-ready iframe { opacity: 1; }
/* Shield the entire bottom 30% — blocks the hover that triggers IG's account/follow card
   (both corners). Center play button (~50% height) stays above the shield and clickable.
   (For a fully clean reel, upload the MP4 native <video> instead.) */
.xep-reel-ig::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; z-index: 5; pointer-events: auto; background: transparent; }
.xep-reel-modal-close { position: absolute; z-index: 4; top: 22px; right: 22px; width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,0.16); color: #fff; font-size: 19px; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background 0.2s; }
.xep-reel-modal-close:hover { background: rgba(255,255,255,0.28); }

.xep-arrow { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--xep-line); background: #fff; color: var(--xep-ink); font-size: 15px; cursor: pointer; transition: background 0.2s, transform 0.2s, color 0.2s; display: inline-flex; align-items: center; justify-content: center; }
.xep-arrow:hover { background: var(--xep-navy); color: #fff; transform: translateY(-2px); }

/* ============================================================
   SECTION 4 - PEDAGOGY (pillars)
   ============================================================ */
.xep-peda-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.xep-peda-card { background: #fff; border: 1px solid var(--xep-line); border-radius: 20px; padding: 30px 26px; transition: transform 0.3s var(--xep-ease), box-shadow 0.3s var(--xep-ease); }
.xep-peda-card:hover { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(14, 20, 36, 0.09); }
.xep-peda-ico { width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--xep-accent) 10%, transparent); color: var(--xep-accent); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 20px; }
.xep-peda-card h4 { font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: 19px; color: var(--xep-ink); margin: 0 0 10px; }
.xep-peda-card p { font-family: 'Google Sans', sans-serif; font-size: 14.5px; line-height: 1.6; color: var(--xep-body); margin: 0; }

/* ============================================================
   SECTION 5 - PARENT PARTNERSHIP (split)
   ============================================================ */
.xep-parent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.xep-parent-list { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 4px; }
.xep-parent-list li { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--xep-line-soft); }
.xep-parent-list li:last-child { border-bottom: none; }
.xep-parent-list i { width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--xep-accent) 10%, transparent); color: var(--xep-accent); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.xep-parent-list b { font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: 17px; color: var(--xep-ink); display: block; }
.xep-parent-list small { font-family: 'Google Sans', sans-serif; font-size: 14px; color: var(--xep-muted); }
.xep-parent-visual { position: relative; border-radius: 24px; min-height: 420px; overflow: hidden; background: linear-gradient(165deg, #111a33, #0e1424); display: flex; align-items: flex-end; padding: 34px; box-shadow: 0 30px 60px rgba(14, 20, 36, 0.18); }
.xep-parent-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.xep-parent-visual::after { content: none; }
.xep-parent-visual .q { position: relative; z-index: 2; color: #fff; }
.xep-parent-visual .q p { font-family: 'Google Sans', sans-serif; font-style: italic; font-size: 22px; line-height: 1.4; margin: 0 0 14px; }
.xep-parent-visual .q span { font-family: 'Google Sans', sans-serif; font-size: 13px; color: rgba(255, 255, 255, 0.7); }

/* ============================================================
   SECTION 6 - XPERIENCES (bento grid)
   ============================================================ */
.xep-xp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.xep-xp-card { background: #fff; border: 1px solid var(--xep-line); border-radius: 20px; padding: 30px; transition: transform 0.3s var(--xep-ease), box-shadow 0.3s var(--xep-ease), border-color 0.3s; }
.xep-xp-card.span2 { grid-column: span 2; background: linear-gradient(135deg, var(--xep-navy), #1a2444); border-color: transparent; color: #fff; }
.xep-xp-card.span2 h4, .xep-xp-card.span2 p { color: #fff; }
.xep-xp-card:hover { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(14, 20, 36, 0.10); }
.xep-xp-ico { width: 50px; height: 50px; border-radius: 14px; background: color-mix(in srgb, var(--xep-accent) 12%, transparent); color: var(--xep-accent); display: flex; align-items: center; justify-content: center; font-size: 19px; margin-bottom: 18px; }
.xep-xp-card.span2 .xep-xp-ico { background: rgba(255, 255, 255, 0.12); color: #fff; }
.xep-xp-card h4 { font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: 20px; color: var(--xep-ink); margin: 0 0 10px; }
.xep-xp-card p { font-family: 'Google Sans', sans-serif; font-size: 14.5px; line-height: 1.6; color: var(--xep-body); margin: 0; }

/* ============================================================
   FINAL CTA BAND
   ============================================================ */
.xep-cta-band { padding: 0 0 96px; }
.xep-cta-inner {
    position: relative; overflow: hidden; border-radius: 28px; padding: 70px 56px; text-align: center;
    background: radial-gradient(900px 400px at 50% -40%, color-mix(in srgb, var(--xep-accent) 30%, transparent), transparent 60%), linear-gradient(135deg, var(--xep-navy), #161f3c);
}
.xep-cta-inner h2 { font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: clamp(28px, 4vw, 46px); line-height: 1.08; color: #fff; margin: 0 0 16px; }
.xep-cta-inner h2 .accent { font-family: 'Google Sans', sans-serif; color: var(--xep-accent); }
.xep-cta-inner p { font-family: 'Google Sans', sans-serif; font-size: 18px; color: rgba(255, 255, 255, 0.78); max-width: 800px; margin: 0 auto 32px; }
.xep-cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.xep-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--xep-ease), transform 0.7s var(--xep-ease); }
.xep-reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
    .xep-nav { display: none; }
    .xep-actions .xep-login, .xep-actions .xep-cta, .xep-actions .xep-avatar { display: none; }
    .xep-burger { display: flex; }
    .xep-hero-scrim { background: linear-gradient(180deg, rgba(8,12,24,0.78) 0%, rgba(8,12,24,0.60) 55%, rgba(8,12,24,0.84) 100%); }
    .xep-hero { min-height: 100vh; }
    .xep-hero-inner { padding: calc(var(--xep-header-h) + 18px) 28px 32px; }
    .xep-section { padding: 70px 0; }
    .xep-prog-grid { grid-template-columns: 1fr; }
    .xep-peda-grid { grid-template-columns: repeat(2, 1fr); }
    .xep-xp-grid { grid-template-columns: 1fr 1fr; }
    .xep-xp-card.span2 { grid-column: span 2; }
    .xep-parent-grid { grid-template-columns: 1fr; gap: 34px; }
    .xep-parent-visual { min-height: 320px; }
    .xep-hero-trust { gap: 24px; }
    .xep-hero-trust strong { font-size: 23px; }
}
@media (max-width: 620px) {
    /* Shrink the whole site proportionally on phones (scales all px/clamp text) */
    .xep-body { zoom: 0.96; }
    .xep-wrap, .xep-header-inner, .xep-hero-inner { padding-left: 18px; padding-right: 18px; }
    .xep-peda-grid, .xep-xp-grid { grid-template-columns: 1fr; }
    .xep-xp-card.span2 { grid-column: span 1; }
    .xep-exam-chip { font-size: 14px; padding: 7px 14px; }
    .xep-cta-inner { padding: 48px 24px; }
    .xep-reel { flex-basis: 220px; }
}
@media (prefers-reduced-motion: reduce) {
    .xep-header, .xep-drop, .xep-mobile, .xep-btn, .xep-cta, .xep-reveal { transition: none; }
    .xep-reveal { opacity: 1; transform: none; }
}

/* ============================================================
   Header: PERMANENT dark-glass sticky bar with white text
   (one consistent look across home-top / scrolled / inner pages)
   ============================================================ */
.xep-header {
    background: rgba(101, 98, 98, 0.59) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06) !important;
}
.xep-header .xep-logo-mark { color: #fff !important; }
.xep-header .xep-logo-sub { color: rgba(255, 255, 255, 0.72) !important; }
.xep-header .xep-logo-img { filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.40)); }
.xep-header .xep-nav-link { color: rgba(255, 255, 255, 0.92) !important; }
.xep-header .xep-nav-link:hover { background: rgba(255, 255, 255, 0.14) !important; color: #fff !important; }
.xep-header .xep-icon-btn { color: rgba(255, 255, 255, 0.92) !important; }
.xep-header .xep-icon-btn:hover { background: rgba(255, 255, 255, 0.14) !important; color: #fff !important; }
.xep-header .xep-login { color: rgba(255, 255, 255, 0.92) !important; }
.xep-header .xep-login:hover { background: rgba(255, 255, 255, 0.14) !important; color: #fff !important; }
.xep-header .xep-cta { background: #fff !important; color: var(--xep-ink) !important; }
.xep-header .xep-burger span { background: #fff !important; }

/* ============================================================
   SPEAK WITH A MENTOR — POPUP
   ============================================================ */
.xep-mentor-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(8, 12, 24, 0.55); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center; padding: 20px;
}
.xep-mentor-overlay.open { display: flex; }
.xep-mentor-box {
    background: #fff; border-radius: 18px; width: 100%; max-width: 460px;
    padding: 34px 32px 30px; position: relative;
    box-shadow: 0 30px 80px rgba(8, 12, 24, 0.35);
    max-height: calc(100vh - 40px); overflow-y: auto;
}
.xep-mentor-close {
    position: absolute; top: 14px; right: 14px;
    width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
    background: #f1f3f7; color: var(--xep-ink); font-size: 14px;
    display: flex; align-items: center; justify-content: center; transition: background 0.15s;
}
.xep-mentor-close:hover { background: #e3e7ee; }
.xep-mentor-box h3 {
    font-family: 'Google Sans', sans-serif; font-size: 24px; font-weight: 600;
    color: var(--xep-ink); margin: 0 0 6px; letter-spacing: -0.3px;
}
.xep-mentor-box .xm-sub {
    font-family: 'Google Sans', sans-serif; font-size: 14px; color: var(--xep-body);
    margin: 0 0 22px; line-height: 1.55;
}
.xep-mentor-form { display: flex; flex-direction: column; gap: 14px; }
.xep-mentor-form label {
    font-family: 'Google Sans', sans-serif; font-size: 13px; font-weight: 600;
    color: var(--xep-ink); display: block; margin-bottom: 6px;
}
.xep-mentor-form input, .xep-mentor-form textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--xep-line);
    border-radius: 10px; font-family: 'Google Sans', sans-serif; font-size: 14.5px;
    color: var(--xep-ink); background: #fff; box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.xep-mentor-form input:focus, .xep-mentor-form textarea:focus {
    outline: none; border-color: var(--xep-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--xep-accent) 16%, transparent);
}
.xep-mentor-form textarea { resize: vertical; min-height: 90px; }
.xep-mentor-submit {
    font-family: 'Google Sans', sans-serif; font-size: 15px; font-weight: 600;
    color: #fff; background: var(--xep-navy); border: none; cursor: pointer;
    padding: 13px 20px; border-radius: 999px; margin-top: 4px;
    transition: background 0.2s, transform 0.15s;
}
.xep-mentor-submit:hover { background: #000; transform: translateY(-1px); }
.xep-mentor-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }
.xm-error {
    display: none; font-family: 'Google Sans', sans-serif; font-size: 13px;
    color: #dc2626; background: #fef2f2; border: 1px solid #fecaca;
    border-radius: 8px; padding: 9px 12px;
}
.xep-mentor-success { display: none; text-align: center; padding: 26px 6px 12px; }
.xep-mentor-success .xm-check {
    width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 16px;
    background: #ecfdf5; color: #10b981; font-size: 24px;
    display: flex; align-items: center; justify-content: center;
}
.xep-mentor-success h4 {
    font-family: 'Google Sans', sans-serif; font-size: 20px; font-weight: 600;
    color: var(--xep-ink); margin: 0 0 8px;
}
.xep-mentor-success p {
    font-family: 'Google Sans', sans-serif; font-size: 14px; color: var(--xep-body);
    margin: 0; line-height: 1.6;
}

/* ============================================================
   XPERIENCES AT XEP — IMAGE BENTO GRID
   Title visible by default; full description reveals on hover.
   ============================================================ */
.xep-xp-bento {
    display: grid;
    grid-template-columns: 1fr 1fr 1.15fr;
    grid-template-rows: 300px 300px;
    gap: 22px;
}
.xep-xp-tile {
    position: relative; overflow: hidden; border-radius: 20px;
    background: linear-gradient(150deg, #16203c 0%, var(--xep-navy) 70%);
    background-size: cover; background-position: center;
    display: flex; align-items: flex-end;
    box-shadow: 0 6px 24px rgba(14, 20, 36, 0.10);
    transition: transform 0.3s var(--xep-ease), box-shadow 0.3s var(--xep-ease);
}
.xep-xp-tile:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(14, 20, 36, 0.20); }
.xep-xp-tile.xp-a { grid-column: 1; grid-row: 1; }
.xep-xp-tile.xp-b { grid-column: 2; grid-row: 1; }
.xep-xp-tile.xp-c { grid-column: 1 / 3; grid-row: 2; }
.xep-xp-tile.xp-d { grid-column: 3; grid-row: 1 / 3; }

.xep-xp-shade {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(8, 12, 24, 0) 40%, rgba(8, 12, 24, 0.72) 100%);
    transition: background 0.35s var(--xep-ease), opacity 0.35s var(--xep-ease);
}
.xep-xp-tile:hover .xep-xp-shade {
    background: linear-gradient(180deg, rgba(8, 12, 24, 0.18) 0%, rgba(8, 12, 24, 0.88) 100%);
}
.xep-xp-info { position: relative; z-index: 2; padding: 24px 26px; width: 100%; box-sizing: border-box; }
.xep-xp-info h4 {
    font-family: 'Google Sans', sans-serif; font-size: 21px; font-weight: 600;
    color: #fff; margin: 0; letter-spacing: -0.2px;
    display: flex; align-items: center; gap: 10px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.xep-xp-info h4 i {
    font-size: 14px; transform: rotate(-45deg);
    transition: transform 0.3s var(--xep-ease);
}
.xep-xp-tile:hover .xep-xp-info h4 i { transform: rotate(-45deg) translateX(4px); }
.xep-xp-info p {
    font-family: 'Google Sans', sans-serif; font-size: 14.5px; line-height: 1.6;
    color: rgba(255, 255, 255, 0.88); margin: 0; max-width: 46ch;
    max-height: 0; opacity: 0; overflow: hidden; transform: translateY(8px);
    transition: max-height 0.4s var(--xep-ease), opacity 0.35s var(--xep-ease),
                transform 0.35s var(--xep-ease), margin-top 0.35s var(--xep-ease);
}
.xep-xp-tile:hover .xep-xp-info p { max-height: 200px; opacity: 1; transform: translateY(0); margin-top: 10px; }

@media (max-width: 980px) {
    .xep-xp-bento { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
    .xep-xp-tile { min-height: 250px; }
    .xep-xp-tile.xp-a { grid-column: 1; grid-row: auto; }
    .xep-xp-tile.xp-b { grid-column: 2; grid-row: auto; }
    .xep-xp-tile.xp-c { grid-column: 1 / 3; grid-row: auto; }
    .xep-xp-tile.xp-d { grid-column: 1 / 3; grid-row: auto; min-height: 320px; }
}
@media (max-width: 620px) {
    .xep-xp-bento { grid-template-columns: 1fr; }
    .xep-xp-tile.xp-a, .xep-xp-tile.xp-b, .xep-xp-tile.xp-c, .xep-xp-tile.xp-d { grid-column: 1; }
    /* Touch screens have no hover - keep descriptions visible */
    .xep-xp-info p { max-height: none; opacity: 1; transform: none; margin-top: 10px; }
    .xep-xp-shade { background: linear-gradient(180deg, rgba(8, 12, 24, 0.15) 0%, rgba(8, 12, 24, 0.85) 100%); }
}

/* ============================================================
   OUR PEDAGOGY — PICTURE + NUMBERED POINT CARDS
   ============================================================ */
.xep-peda-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 44px;
    align-items: stretch;
}
.xep-peda-visual {
    position: relative; overflow: hidden; border-radius: 20px;
    background: var(--xep-soft); border: 1px solid var(--xep-line-soft);
    min-height: 380px;
}
.xep-peda-visual img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.xep-peda-visual-ph {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #cdd2dd; font-size: 44px;
}
.xep-peda-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-content: center;
}
.xep-peda-point {
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid var(--xep-line);
    border-radius: 18px; padding: 24px 26px 26px;
    box-shadow: 0 2px 10px rgba(14, 20, 36, 0.04);
    transition: transform 0.3s var(--xep-ease), box-shadow 0.3s var(--xep-ease), border-color 0.3s;
}
.xep-peda-point::after {
    content: ""; position: absolute; left: 26px; right: 26px; top: 0; height: 3px;
    border-radius: 0 0 3px 3px; background: var(--xep-accent);
    transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--xep-ease);
}
.xep-peda-point:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--xep-accent) 35%, var(--xep-line));
    box-shadow: 0 16px 36px rgba(14, 20, 36, 0.10);
}
.xep-peda-point:hover::after { transform: scaleX(1); }
.xep-peda-point .n {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 34px; padding: 0 8px; margin-bottom: 14px;
    border-radius: 10px; background: color-mix(in srgb, var(--xep-accent) 10%, #fff);
    color: var(--xep-accent-ink); font-family: 'Google Sans', sans-serif;
    font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
}
.xep-peda-point h4 {
    font-family: 'Google Sans', sans-serif; font-size: 17px; font-weight: 700;
    color: var(--xep-ink); margin: 0 0 8px; line-height: 1.3; letter-spacing: -0.1px;
}
.xep-peda-point p {
    font-family: 'Google Sans', sans-serif; font-size: 14px; line-height: 1.65;
    color: var(--xep-muted); margin: 0;
}
@media (max-width: 980px) {
    .xep-peda-split { grid-template-columns: 1fr; gap: 28px; }
    .xep-peda-visual { min-height: 280px; }
}
@media (max-width: 620px) {
    .xep-peda-points { grid-template-columns: 1fr; }
}

/* ============================================================
   BREADCRUMBS — shared accent style
   ============================================================ */
.xep-crumb { display: flex; align-items: center; gap: 6px; font-family: 'Google Sans', sans-serif; font-size: 13px; color: var(--xep-muted); margin-bottom: 16px; }
.xep-crumb a { color: var(--xep-accent-ink); text-decoration: none; }
.xep-crumb a:hover { color: var(--xep-accent); text-decoration: underline; }
.xep-crumb i { font-size: 10px; opacity: .5; }
.xep-crumb span { color: var(--xep-muted); }

/* ============================================================
   MOBILE-ONLY TYPE SCALE (phones ≤ 620px)
   Two-tier scale so the size hierarchy survives on phones:
     • Larger-on-laptop content (paragraphs, list/table text,
       primary buttons, lead copy, form fields) → 15px.
     • Smaller-on-laptop meta (links, spans, captions, kickers,
       badges, labels) → 13px.
   Real headings (h1–h6) are left untouched and stay large, so the
   heading↔body contrast is preserved. `strong/b/em/i` are not sized
   here so bold/italic and icons follow their surrounding text.
   The home hero keeps its own display sizing (restored below).
   Desktop/tablet are unaffected.
   ============================================================ */
@media (max-width: 620px) {
    /* Tier A — larger body / primary controls → 15px */
    p, li, td, th, blockquote,
    input, select, textarea,
    .xep-btn, .xep-cta, .xep-login, .xep-mentor-submit,
    .xep-stu-desc, .xep-prog-attr .v, .xep-prog-tab b {
        font-size: 15px !important;
    }

    /* Tier B — smaller meta / secondary text → 13px */
    a, span, small, label, .xep-mobile-acc,
    .xep-peda-point .n,
    .xep-mentor-form label, .xm-error {
        font-size: 13px !important;
    }

    /* Parent-partnership list: title (b) → 20px, description (small) → 15px. */
    .xep-parent-list b { font-size: 17px !important; }
    .xep-parent-list small { font-size: 15px !important; }

    /* Section eyebrow, programme attribute label (.k), tab subtitle
       and student kicker → 12px. */
    .xep-eyebrow,
    .xep-prog-attr .k,
    .xep-prog-tab span,
    .xep-stu-kicker { font-size: 12px !important; }

    /* Programme card badge (e.g. "CLASSROOM LEARNING") → 10px. */
    .xep-prog-badge2 { font-size: 10px !important; }

    /* Keep accent words inside a heading the same size as the heading. */
    :is(h1, h2, h3, h4, h5, h6) .accent { font-size: inherit !important; }

    /* Programme card title (e.g. "Cohort Delta 2026-27") → 25px. */
    .xep-prog-name { font-size: 25px !important; }

    /* Student story title (e.g. "Track Gamma") → 25px. */
    .xep-stu-title { font-size: 25px !important; }

    /* Pedagogy point title (e.g. "Structured Accountability") → 17px;
       its description stays 15px via the generic p (Tier A) rule. */
    .xep-peda-point h4 { font-size: 17px !important; }

    /* Xperiences bento tiles: title → 17px, description line-height → 16px. */
    .xep-xp-info h4 { font-size: 20px !important; }
    .xep-xp-info p { line-height: 20px !important; font-size: 13px !important; }

    /* Home hero excluded — restore its display sizing. */
    .xep-hero h1 { font-size: 65px !important; }
    .xep-hero-sub { font-size: clamp(16px, 1.4vw, 19px) !important; }
    .xep-hero .xep-exam-pill { font-size: clamp(15px, 4.2vw, 24px) !important; }
    .xep-hero .xep-exam-chip { font-size: 14px !important; }
    .xep-hero .xep-exam-sep { font-size: 18px !important; }
    .xep-hero-trust span { font-size: 13px !important; }
}

/* ============================================================
   ABOUT US PAGE  (/about → about.php)
   ============================================================ */
.xab-page { display: block; }

/* 1 - Hero: full-bleed photo, heading bottom-left, subheading bottom-right */
.xab-hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; overflow: hidden; background: #0b0d12; }
.xab-hero-media { position: absolute; inset: 0; background: #0b0d12 center/cover no-repeat; transform: scale(1.02); }
.xab-hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,11,20,0.30) 0%, rgba(8,11,20,0.35) 40%, rgba(8,11,20,0.86) 100%); }
.xab-hero-inner {
    position: relative; z-index: 2; width: 100%;
    display: grid; grid-template-columns: 1.15fr 1fr; align-items: end; gap: 40px;
    padding-top: 140px; padding-bottom: 64px;
}
.xab-hero-title {
    font-family: 'Google Sans', sans-serif; font-weight: 500;
    font-size: clamp(32px, 4.4vw, 55px); line-height: 1.08; letter-spacing: -0.8px;
    color: #fff; margin: 0;
}
.xab-hero-title em { display: inline-block; font-style: italic; font-weight: 400; color: #fff; }
.xab-hero-sub {
    font-family: 'Google Sans', sans-serif; font-size: 15px; line-height: 1.4;
    color: rgba(255,255,255,0.86); margin: 0 0 8px; max-width: 52ch;
}

/* 2 - Why XEP exists: sticky heading left, editorial column right */
.xab-split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.xab-split-head { margin-bottom: 0; position: sticky; top: calc(var(--xep-header-h) + 34px); }
.xab-split-body p {
    font-family: 'Google Sans', sans-serif; font-size: 16px; line-height: 1.75;
    color: var(--xep-body); margin: 0 0 22px;
}
.xab-split-body p:last-child { margin-bottom: 0; }
.xab-belief {
    margin: 0 0 24px; padding: 22px 26px; border-left: 3px solid var(--xep-accent);
    background: var(--xep-cream); border-radius: 0 14px 14px 0;
    font-family: 'Google Sans', sans-serif; font-weight: 500; font-size: clamp(19px, 1.9vw, 24px);
    line-height: 1.4; letter-spacing: -0.3px; color: var(--xep-ink);
}

/* 3 - Our philosophy: three cards */
.xab-phil-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.xab-phil-card {
    position: relative; background: #fff; border: 1px solid var(--xep-line); border-radius: 20px;
    padding: 32px 28px 30px; transition: transform 0.3s var(--xep-ease), box-shadow 0.3s var(--xep-ease);
}
.xab-phil-card:hover { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(14, 20, 36, 0.09); }
.xab-phil-ico {
    width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--xep-accent) 10%, transparent); color: var(--xep-accent);
    font-size: 20px; margin-bottom: 22px;
}
.xab-phil-n {
    position: absolute; top: 30px; right: 28px;
    font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 1px;
    color: var(--xep-muted); opacity: 0.55;
}
.xab-phil-card h3 { font-family: 'Google Sans', sans-serif; font-weight: 600; font-size: 17px; color: var(--xep-ink); margin: 0 0 10px; }
.xab-phil-card p { font-family: 'Google Sans', sans-serif; font-size: 14px; line-height: 1.6; color: var(--xep-muted); margin: 0; }

/* 5 - The institution we aspire to build */
.xab-aspire { padding: 96px 0; background: var(--xep-soft); }
.xab-aspire-inner {
    background: #0b0d12; border-radius: 28px; padding: 76px 34px 80px; position: relative; overflow: hidden;
    text-align: left;
}
.xab-aspire-inner::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(680px 380px at 82% 8%, rgba(255,255,255,0.05), transparent 60%);
}
/* Copy runs the full width of the panel — no measure cap. */
.xab-aspire-inner p {
    position: relative; font-family: 'Google Sans', sans-serif; font-size: 17px; line-height: 1.75;
    color: rgba(255,255,255,0.74); margin: 0 0 6px; max-width: none;   /* lines sit close together */
}
.xab-aspire-lead {
    font-size: clamp(23px, 2.6vw, 34px) !important; line-height: 1.28 !important; letter-spacing: -0.5px;
    font-weight: 500; color: #fff !important; margin-bottom: 26px !important;
}
.xab-aspire-inner p:last-child { margin-bottom: 0; }

@media (max-width: 980px) {
    .xab-hero-inner { grid-template-columns: 1fr; gap: 22px; padding-top: 110px; padding-bottom: 48px; }
    .xab-split { grid-template-columns: 1fr; gap: 26px; }
    .xab-split-head { position: static; }
    .xab-phil-grid { grid-template-columns: 1fr; }
    .xab-aspire { padding: 70px 0; }
    .xab-aspire-inner { padding: 52px 26px 56px; border-radius: 22px; }
}
@media (max-width: 560px) {
    .xab-hero { min-height: 74vh; }
}
