/* =====================================================================
   Springfield Academy — Website Stylesheet
   Brand palette:  Blue #242E49  |  Grey-Gold #AB9874  |  White #FFFFFF
   Design inspired by the Epsom College layout (hero, image sections,
   card grids, refined footer).
   ===================================================================== */

/* ------------------------------ Tokens ------------------------------ */
:root {
  --blue:        #242E49;
  --blue-dark:   #1a2338;
  --blue-deep:   #141b2c;
  --gold:        #AB9874;
  --gold-light:  #c4b393;
  --gold-dark:   #8f7c5c;
  --white:       #ffffff;
  --paper:       #f6f4ef;
  --ink:         #2b2b2b;
  --grey:        #6b6f76;
  --line:        #e5e1d8;

  --maxw: 1240px;
  --nav-h: 84px;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --shadow-sm: 0 4px 14px rgba(20,27,44,.10);
  --shadow-md: 0 14px 40px rgba(20,27,44,.16);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ------------------------------ Reset ------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--blue);
  margin: 0 0 .5em;
}

p { margin: 0 0 1.1em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* Accent overline used above section headings */
.overline {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: .74rem;
  color: var(--gold-dark);
  display: inline-block;
  margin-bottom: .9rem;
}
.overline::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: .6rem;
  transform: translateY(-3px);
}

/* ------------------------------ Buttons ----------------------------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 15px 32px;
  border: 2px solid var(--gold);
  background: var(--gold);
  color: var(--white);
  cursor: pointer;
  transition: all .3s var(--ease);
}
.btn:hover { background: transparent; color: var(--gold); }

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--blue); }

.btn-blue {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.btn-blue:hover { background: transparent; color: var(--blue); }

/* ============================== HEADER =============================== */
/* Utility bar */
.utility-bar {
  background: var(--blue-deep);
  color: rgba(255,255,255,.82);
  font-size: .78rem;
  letter-spacing: .04em;
}
.utility-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
}
.utility-bar a { color: rgba(255,255,255,.82); transition: color .2s; }
.utility-bar a:hover { color: var(--gold-light); }
.utility-left span { margin-right: 20px; }
.utility-right a { margin-left: 20px; font-weight: 600; }

/* Main navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 58px; width: auto; }
.brand-text { line-height: 1.05; }
.brand-name {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--blue);
  letter-spacing: .01em;
}
.brand-sub {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: .52rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  padding: 6px 0;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width .3s var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--gold-dark); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 2px;
  background: var(--blue);
  margin: 5px 0;
  transition: transform .3s var(--ease), opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================== HERO =============================== */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h) - 40px);
  display: flex;
  align-items: center;
  color: var(--white);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,27,44,.35) 0%, rgba(20,27,44,.55) 55%, rgba(20,27,44,.78) 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero-overline {
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 30px rgba(0,0,0,.3);
}
.hero p.lead {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  max-width: 640px;
  color: rgba(255,255,255,.92);
  font-weight: 300;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--white);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: center;
  opacity: .85;
}
.scroll-cue span {
  display: block;
  width: 1px; height: 40px;
  background: var(--gold-light);
  margin: 10px auto 0;
  animation: cue 1.8s infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Page banner (interior pages) */
.page-banner {
  position: relative;
  color: var(--white);
  background-size: cover;
  background-position: center;
  padding: 120px 0 90px;
  text-align: center;
}
.page-banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,27,44,.55), rgba(20,27,44,.75));
}
.page-banner .container { position: relative; z-index: 2; }
.page-banner h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: .4rem;
}
.breadcrumb {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.breadcrumb a:hover { color: var(--white); }

/* ============================= SECTIONS ============================= */
.section { padding: 96px 0; }
.section.tight { padding: 70px 0; }
.section.paper { background: var(--paper); }
.section.blue {
  background: var(--blue);
  color: rgba(255,255,255,.9);
}
.section.blue h2, .section.blue h3 { color: var(--white); }
.section.blue .overline { color: var(--gold-light); }

.section-head { max-width: 760px; margin-bottom: 54px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.section-head p { color: var(--grey); font-size: 1.05rem; }
.section.blue .section-head p { color: rgba(255,255,255,.8); }

/* Split feature (image + text) */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.feature + .feature { margin-top: 90px; }
.feature.reverse .feature-media { order: 2; }
.feature-media {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.feature-media img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.feature-media:hover img { transform: scale(1.05); }
.feature-media::before {
  content: "";
  position: absolute;
  left: -14px; top: -14px;
  width: 90px; height: 90px;
  border-top: 3px solid var(--gold);
  border-left: 3px solid var(--gold);
  z-index: 2;
}
.feature-body h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
.feature-body p { color: var(--grey); }
.section.blue .feature-body p { color: rgba(255,255,255,.82); }

/* Stat band */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stat .num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  color: var(--gold-light);
  line-height: 1;
}
.stat .label {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
  margin-top: .6rem;
}

/* Card grid (admissions / links) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.card {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-sm);
}
.card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,27,44,0) 30%, rgba(20,27,44,.85) 100%);
  transition: background .4s;
}
.card:hover::after { background: linear-gradient(180deg, rgba(36,46,73,.25) 0%, rgba(20,27,44,.9) 100%); }
.card-inner { position: relative; z-index: 2; padding: 28px; }
.card .overline { color: var(--gold-light); margin-bottom: .5rem; }
.card h3 { color: var(--white); font-size: 1.4rem; margin-bottom: .4rem; }
.card .more {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 600;
}
.card .more::after { content: " →"; }

/* Subjects grid */
.subjects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.subject {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 26px 22px;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.subject:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.subject .icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  border-radius: 50%;
  margin-bottom: 14px;
  font-size: 1.3rem;
}
.subject h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .3rem;
}
.subject p { font-size: .88rem; color: var(--grey); margin: 0; }

/* Quote / values */
.quote {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.quote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-style: italic;
  color: var(--white);
  line-height: 1.4;
  margin: 0 0 1.4rem;
}
.quote cite {
  font-style: normal;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-light);
}

/* Values / info tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.tile {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 38px 32px;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.tile .tile-icon { font-size: 1.8rem; margin-bottom: 14px; }
.tile h3 { font-size: 1.3rem; }
.tile p { color: var(--grey); margin: 0; }

/* CTA strip */
.cta {
  background:
    linear-gradient(rgba(20,27,44,.82), rgba(20,27,44,.86)),
    var(--cta-img, none) center/cover;
  color: var(--white);
  text-align: center;
  padding: 90px 0;
}
.cta h2 { color: var(--white); font-size: clamp(1.9rem, 4vw, 2.8rem); }
.cta p { max-width: 620px; margin: 0 auto 1.8rem; color: rgba(255,255,255,.88); }

/* ============================= CONTACT ============================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.info-line { display: flex; gap: 14px; margin-bottom: 22px; }
.info-line .ic {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue);
  color: var(--gold-light);
  border-radius: 50%;
  font-size: 1.05rem;
}
.info-line h4 { font-family: var(--sans); font-size: .95rem; margin: 0 0 2px; color: var(--blue); }
.info-line p { margin: 0; color: var(--grey); font-size: .95rem; }

.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--ink);
  transition: border-color .2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: none; border-color: var(--gold); }
.form-note { font-size: .82rem; color: var(--grey); }

.map-embed {
  width: 100%; height: 100%;
  min-height: 340px;
  border: 0;
  filter: grayscale(.2);
}

/* ============================== FOOTER ============================= */
.site-footer {
  background: var(--blue-deep);
  color: rgba(255,255,255,.72);
  padding: 70px 0 0;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 50px;
}
.site-footer img.crest { height: 92px; margin-bottom: 18px; }
.site-footer h4 {
  font-family: var(--sans);
  color: var(--white);
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { transition: color .2s, padding .2s; }
.footer-links a:hover { color: var(--gold-light); padding-left: 5px; }
.site-footer p { color: rgba(255,255,255,.72); }

.socials { display: flex; gap: 12px; margin-top: 16px; }
.socials a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  transition: all .3s;
}
.socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--white); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
}
.footer-bottom a:hover { color: var(--gold-light); }

/* ========================= Reveal animation ======================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ============================ Responsive ========================== */
@media (max-width: 980px) {
  .feature, .feature.reverse .feature-media { grid-template-columns: 1fr; order: 0; }
  .feature-media { order: -1 !important; }
  .feature + .feature { margin-top: 56px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 40px 20px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .subjects { grid-template-columns: repeat(3, 1fr); }
  .tiles { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --nav-h: 72px; }
  .utility-left { display: none; }
  .brand img { height: 46px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); right: 0;
    height: calc(100vh - var(--nav-h));
    width: min(80vw, 320px);
    background: var(--blue);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 30px 28px;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    box-shadow: -10px 0 40px rgba(0,0,0,.25);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { color: var(--white); font-size: 1rem; padding: 12px 0; width: 100%; }
  .nav-links a::after { display: none; }
  .subjects { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

@media (max-width: 460px) {
  .subjects { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; }
}

/* =====================================================================
   EPSOM-STYLE HOMEPAGE ADDITIONS
   Minimal opening (crest + name only), header reveals on scroll,
   full-width video, full-bleed showcase, fade-up animations.
   ===================================================================== */

/* --- Header + utility bar hidden until the user scrolls (home only) --- */
body.home .utility-bar,
body.home .site-header {
  position: fixed;
  left: 0; right: 0;
  z-index: 120;
}
body.home .utility-bar {
  top: 0;
  transform: translateY(-100%);
  transition: transform .45s var(--ease);
}
body.home .site-header {
  top: 40px;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  transform: translateY(-140%);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .45s var(--ease), box-shadow .4s;
}
body.home.scrolled .utility-bar { transform: translateY(0); }
body.home.scrolled .site-header {
  transform: translateY(0);
  opacity: 1;
  box-shadow: var(--shadow-sm);
}

/* --- Centered, full-screen opening hero --- */
.hero.hero-center {
  min-height: 100vh;
  text-align: center;
  justify-content: center;
}
.hero.hero-center .container { text-align: center; }
.hero-crest {
  position: relative;
  top: -45px;
  height: 150px;
  width: auto;
  margin: 0 auto 26px;
  display: block;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.45));
  animation: heroFade 1.2s var(--ease) both;
}
.hero.hero-center h1 {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  margin-bottom: .5rem;
  animation: heroFade 1.2s .15s var(--ease) both;
}
.hero.hero-center .hero-tagline {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: rgba(255,255,255,.9);
  font-weight: 300;
  letter-spacing: .02em;
  max-width: 620px;
  margin: 0 auto;
  animation: heroFade 1.2s .3s var(--ease) both;
}
@keyframes heroFade {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* --- Full-width school video --- */
.video-section { padding: 96px 0; background: var(--blue-deep); }
.video-section .section-head h2,
.video-section .section-head { color: #fff; }
.video-section .section-head p { color: rgba(255,255,255,.8); }
.video-wrap {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.video-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-cover {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity .5s var(--ease);
}
.video-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(rgba(20,27,44,.25), rgba(20,27,44,.55));
}
.video-cover.hidden { opacity: 0; pointer-events: none; }
.play-btn {
  position: relative;
  z-index: 2;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s var(--ease), background .3s;
}
.video-cover:hover .play-btn { transform: scale(1.08); background: var(--gold); border-color: var(--gold); }
.play-btn svg { width: 30px; height: 30px; fill: #fff; margin-left: 4px; }

/* --- Full-bleed showcase (Creativity, Art & Culture) --- */
.showcase {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
  overflow: hidden;
}
.showcase::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,27,44,.85) 0%, rgba(20,27,44,.6) 45%, rgba(20,27,44,.15) 100%);
}
.showcase.right::after {
  background: linear-gradient(270deg, rgba(20,27,44,.85) 0%, rgba(20,27,44,.6) 45%, rgba(20,27,44,.15) 100%);
}
.showcase .container { position: relative; z-index: 2; }
.showcase.right .container { display: flex; justify-content: flex-end; }
.showcase-body { max-width: 560px; }
.showcase-body h2 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); }
.showcase-body p { color: rgba(255,255,255,.9); }
.showcase-body .overline { color: var(--gold-light); }
.showcase-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.showcase-links a {
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 12px 26px;
  border: 2px solid rgba(255,255,255,.6);
  color: #fff;
  transition: all .3s var(--ease);
}
.showcase-links a:hover { background: var(--gold); border-color: var(--gold); }

@media (max-width: 760px) {
  .showcase { background-attachment: scroll; min-height: 70vh; }
  .showcase.right .container { justify-content: flex-start; }
  body.home .site-header { top: 0; }
}

/* --- Home tweaks: smaller crest, raised slightly, tuned reveal --- */
.hero.hero-center { padding-bottom: 12vh; }        /* nudges crest + name up */
.hero-crest { height: 98px; margin-bottom: 16px; } /* slightly smaller */

/* =====================================================================
   NAV DROPDOWN (Student Life), VALUES GRID, ANCHOR OFFSETS
   ===================================================================== */
.has-dropdown { position: relative; }
.nav-links .dropdown {
  position: absolute;
  top: 100%; left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  list-style: none;
  margin: 0; padding: 8px 0;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  z-index: 130;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: none; }
.nav-links .dropdown li { display: block; }
.nav-links .dropdown a {
  display: block;
  padding: 10px 22px;
  font-size: .76rem;
  letter-spacing: .08em;
  color: var(--blue);
}
.nav-links .dropdown a::after { display: none; }
.nav-links .dropdown a:hover { background: var(--paper); color: var(--gold-dark); }
.dropdown-toggle { display: none; }  /* desktop: hover handles it */

/* Core-values list */
.values {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px 40px;
}
.value {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.value-num {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  color: var(--gold);
  flex: 0 0 auto;
}
.value h3 { font-family: var(--sans); font-size: 1.1rem; font-weight: 700; color: var(--blue); margin: 0 0 .3rem; }
.value p { margin: 0; color: var(--grey); font-size: .95rem; }

/* Offset anchored sections so the sticky header doesn't overlap them */
section[id] { scroll-margin-top: 110px; }

@media (max-width: 980px) { .values { grid-template-columns: 1fr; } }

/* --- Mobile dropdown behaviour --- */
@media (max-width: 760px) {
  .has-dropdown { width: 100%; }
  .dropdown-toggle {
    display: block;
    position: absolute;
    right: 0; top: 6px;
    width: 48px; height: 44px;
    background: none; border: 0;
    color: #fff; cursor: pointer;
  }
  .dropdown-toggle::before { content: "+"; font-size: 1.5rem; line-height: 1; }
  .has-dropdown.open .dropdown-toggle::before { content: "\2212"; }
  .nav-links .dropdown {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    background: transparent; border: 0; box-shadow: none;
    padding: 0 0 6px 14px;
    max-height: 0; overflow: hidden;
    transition: max-height .3s var(--ease);
  }
  .has-dropdown.open .dropdown { max-height: 260px; }
  .nav-links .dropdown a { color: rgba(255,255,255,.85); padding: 10px 0; }
}

/* =====================================================================
   CLICK-DROPDOWN (Student Life) + NESTED SPORTS SUBMENU
   ===================================================================== */
/* Trigger buttons styled like nav links */
.nav-trigger {
  font-family: var(--sans);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  background: none; border: 0; cursor: pointer;
  padding: 6px 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-trigger::after { content: "\25BE"; font-size: .7em; transition: transform .25s var(--ease); }
.has-dropdown.open > .nav-trigger::after { transform: rotate(180deg); }

/* Show first-level dropdown on hover OR when opened by click */
.has-dropdown.open > .dropdown { opacity: 1; visibility: visible; transform: none; }

/* Nested Sports submenu (desktop flyout) */
.has-subdropdown { position: relative; }
.nav-links .subnav-trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 10px 22px;
  font-family: var(--sans); font-weight: 600;
  font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue); background: none; border: 0; cursor: pointer;
}
.nav-links .subnav-trigger::after { content: "\25B8"; margin-left: 12px; font-size: .9em; }
.nav-links .subnav-trigger:hover { background: var(--paper); color: var(--gold-dark); }
.nav-links .subdropdown {
  position: absolute; top: -8px; left: 100%;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  list-style: none; margin: 0; padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateX(8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  z-index: 140;
}
.has-subdropdown:hover > .subdropdown,
.has-subdropdown:focus-within > .subdropdown,
.has-subdropdown.open > .subdropdown { opacity: 1; visibility: visible; transform: none; }
.nav-links .subdropdown a { display: block; padding: 9px 20px; font-size: .74rem; letter-spacing: .06em; color: var(--blue); }
.nav-links .subdropdown a::after { display: none; }
.nav-links .subdropdown a:hover { background: var(--paper); color: var(--gold-dark); }

/* Anchor offset for any element targeted by hash */
[id] { scroll-margin-top: 110px; }

/* --- Mobile: accordion for both levels --- */
@media (max-width: 760px) {
  .nav-links .nav-trigger {
    color: #fff; width: 100%;
    justify-content: flex-start; gap: 10px;
    font-size: 1rem; padding: 12px 0;
  }
  .has-dropdown.open > .dropdown { max-height: 640px; }   /* room for nested submenu */
  .nav-links .subnav-trigger {
    color: rgba(255,255,255,.9);
    padding: 10px 0 10px 14px;
    font-size: .95rem; justify-content: flex-start; gap: 10px;
  }
  .nav-links .subnav-trigger:hover { background: transparent; }
  .nav-links .subdropdown {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    background: transparent; border: 0; box-shadow: none;
    padding: 0 0 6px 26px;
    max-height: 0; overflow: hidden;
    transition: max-height .3s var(--ease);
  }
  .has-subdropdown.open > .subdropdown { max-height: 300px; }
  .nav-links .subdropdown a { color: rgba(255,255,255,.8); padding: 9px 0; }
}

/* --- Sports subsections (within the Sports section) --- */
.sport-list { max-width: 860px; }
.sport-sub {
  padding: 6px 0 22px 24px;
  border-left: 3px solid var(--gold);
  margin-bottom: 26px;
}
.sport-sub:last-child { margin-bottom: 0; }
.sport-sub h3 {
  font-family: var(--serif);
  color: var(--blue);
  font-size: 1.5rem;
  margin: 0 0 .5rem;
}
.sport-sub p { color: var(--grey); margin: 0; }

/* --- Sports content sections (override earlier subsection look) --- */
.sport-sub { border-left: 0; padding-left: 0; }   /* legacy, no longer used */
.sport-block {
  max-width: 860px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.sport-block:first-of-type { border-top: 0; padding-top: 8px; }
.sport-block h3 {
  font-family: var(--serif);
  color: var(--blue);
  font-size: 1.6rem;
  margin: 0 0 .6rem;
}
.sport-block p { color: var(--grey); margin: 0 0 .8rem; }
.sport-block p:last-child { margin-bottom: 0; }


/* Contact map-style banner */
.page-banner.map-banner { padding: 40px 0 60px; background-position: center 57%; }
.page-banner.map-banner::after {
  background: linear-gradient(180deg, rgba(20,27,44,.80) 0%, rgba(20,27,44,.52) 22%, rgba(20,27,44,.18) 46%, rgba(20,27,44,.05) 100%);
}
.page-banner.map-banner h1,
.page-banner.map-banner .breadcrumb { text-shadow: 0 2px 16px rgba(0,0,0,.45); }
@media (max-width: 640px){ .page-banner.map-banner { padding: 30px 0 44px; } }
