:root {
  --navy: #0b3153;
  --navy-2: #164d78;
  --ink: #153449;
  --cream: #fff8e8;
  --cream-2: #f6e5bd;
  --gold: #d3a33f;
  --gold-light: #f0d27a;
  --green: #165940;
  --pink: #a43a67;
  --red: #a9332b;
  --blue: #d9edf9;
  --white: #fff;
  --shadow: 0 24px 70px rgba(5, 29, 49, 0.25);
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--navy); scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(160deg, #eef8ff 0%, #fff9eb 58%, #d8eefd 100%);
}

button, a { font: inherit; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  padding: .8rem 1rem;
  color: var(--white);
  background: var(--navy);
  border-radius: .5rem;
}
.skip-link:focus { top: 1rem; }

.experience { min-height: 100vh; }

.screen {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(160deg, #eef8ff 0%, #fff9eb 55%, #d8eefd 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  padding: .65rem clamp(1rem, 3vw, 2.75rem);
  color: var(--white);
  background: rgba(7, 40, 68, .96);
  border-bottom: 1px solid rgba(240, 210, 122, .55);
  box-shadow: 0 8px 30px rgba(7, 40, 68, .18);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  gap: .85rem;
  align-items: center;
  color: var(--white);
  border: 0;
  background: transparent;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: .04em;
}

.crest {
  display: grid;
  width: 2.55rem;
  height: 2.8rem;
  place-items: center;
  color: var(--gold-light);
  background: linear-gradient(150deg, #12446f, #092944);
  border: 2px solid var(--gold);
  border-radius: 46% 46% 54% 54% / 34% 34% 66% 66%;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12);
}

.crumbs { display: flex; gap: .45rem; align-items: center; }
.crumb {
  min-height: 2.75rem;
  padding: .55rem .85rem;
  color: var(--white);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: .9rem;
}
.crumb:hover, .crumb:focus-visible { border-color: var(--gold-light); background: rgba(255,255,255,.09); }

.hero-entry {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: linear-gradient(180deg, rgba(3,23,39,.08) 10%, rgba(3,23,39,.72) 100%), url("./assets/gates.webp") center/cover no-repeat;
}

.entry-card {
  width: min(52rem, 100%);
  overflow: hidden;
  text-align: center;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--gold);
  border-radius: 1.2rem;
  box-shadow: var(--shadow);
}
.entry-art { width: 100%; aspect-ratio: 1.65; object-fit: cover; object-position: top center; }
.entry-copy { padding: clamp(1.1rem, 3vw, 1.8rem); }
.entry-copy h1 { font-size: clamp(2rem, 5vw, 3rem); }

.eyebrow {
  margin: 0 0 .5rem;
  color: var(--green);
  font-family: Arial, sans-serif;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .65rem; color: var(--navy); font-size: clamp(2.15rem, 6vw, 4.4rem); line-height: .98; }
h2 { margin-bottom: .7rem; color: var(--navy); font-size: clamp(1.85rem, 4.5vw, 3rem); line-height: 1.05; }
h3 { margin-bottom: .45rem; color: var(--navy); font-size: 1.35rem; }
p { font-family: Arial, sans-serif; font-size: 1rem; line-height: 1.55; }

.entry-card .lead { max-width: 31rem; margin: 0 auto 1.35rem; font-size: clamp(1.03rem, 2vw, 1.2rem); }

.primary-button, .secondary-button, .text-button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .75rem 1.2rem;
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.primary-button {
  color: var(--white);
  background: linear-gradient(145deg, #247557, var(--green));
  border: 2px solid var(--gold-light);
  box-shadow: 0 8px 24px rgba(18, 80, 58, .3);
}
.primary-button.pink { background: linear-gradient(145deg, #bf4c7a, var(--pink)); }
.primary-button.red { background: linear-gradient(145deg, #c54a3f, var(--red)); }
.primary-button.blue { background: linear-gradient(145deg, #266499, #164875); }
.primary-button.green { background: linear-gradient(145deg, #258760, #135b3d); }
.secondary-button { color: var(--navy); background: var(--cream); border: 2px solid var(--gold); }
.text-button { color: var(--navy); background: var(--blue); border: 1px solid #98c5df; }
.primary-button:hover, .secondary-button:hover, .text-button:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(11,49,83,.18); }
.primary-button:focus-visible, .secondary-button:focus-visible, .text-button:focus-visible, .map-hotspot:focus-visible, .card-button:focus-visible, .close-button:focus-visible, .crumb:focus-visible, .brand:focus-visible { outline: 4px solid #ffdc62; outline-offset: 3px; }

.video-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  background: radial-gradient(circle at top, #1d5c8c, #061b2d 72%);
}

.video-shell { width: min(76rem, 100%); }
.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #031321;
  border: 2px solid var(--gold);
  border-radius: 1rem;
  box-shadow: 0 26px 80px rgba(0,0,0,.42);
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.video-tools { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-top: 1rem; color: var(--white); }
.video-tools p { margin: 0; font-size: .95rem; }

.content-shell { width: min(86rem, 100%); margin: 0 auto; padding: clamp(1.25rem, 4vw, 3rem); }
.page-heading { max-width: 52rem; margin: 0 auto 1.5rem; text-align: center; }
.page-heading p { color: #3d5b6e; font-size: 1.05rem; }

.campus-grid, .destination-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.image-card {
  overflow: hidden;
  background: var(--cream);
  border: 2px solid var(--gold);
  border-radius: 1rem;
  box-shadow: 0 12px 34px rgba(11,49,83,.14);
}
.image-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #dcecf7; }
.campus-choice { display: block; width: 100%; padding: 0; text-align: left; font: inherit; cursor: pointer; }
.campus-choice:focus-visible { outline: 4px solid #ffdc62; outline-offset: 3px; }
.campus-choice.active:hover, .campus-choice.active:focus-visible { box-shadow: 0 16px 38px rgba(11,49,83,.3); }
.campus-visual { display: block; position: relative; }
.campus-image-action { position: absolute; right: .7rem; bottom: .7rem; padding: .65rem .9rem; color: white; background: #165940; border: 1px solid #f0d27a; border-radius: .6rem; font-family: Arial,sans-serif; font-size: 1rem; font-weight: 800; box-shadow: 0 5px 18px #082a3d77; }
.campus-choice.upcoming .campus-image-action { color: #173449; background: #fff8e8; }
.campus-choice .card-copy { display: block; }
.campus-title { display: block; margin-bottom: .5rem; color: var(--navy); font-size: clamp(1.4rem, 2.8vw, 2rem); font-weight: bold; }
.campus-summary { display: block; color: #3d596b; font-family: Arial,sans-serif; font-size: 1rem; line-height: 1.45; }
.card-copy { padding: 1.05rem; }
.card-copy p { min-height: 4.65rem; margin-bottom: 1rem; color: #3d596b; }
.card-button {
  width: 100%;
  min-height: 3rem;
  padding: .72rem 1rem;
  color: var(--white);
  background: var(--green);
  border: 0;
  border-radius: .7rem;
  font-family: Arial, sans-serif;
  font-weight: 800;
}
.card-button.soon { color: var(--navy); background: var(--cream-2); border: 1px solid var(--gold); }
.card-button.fashion { background: var(--pink); }
.card-button.sugar { background: var(--red); }
.card-button.sleuths { background: #176343; }
.card-button.music { background: #164d78; }

/* Only the painted banners are clickable; the complete campus art stays visible. */
.campus-map-help { width: fit-content; max-width: calc(100% - 2rem); margin: 1rem auto; padding: .7rem 1rem; border: 1px solid var(--gold); border-radius: .65rem; color: #143e30; background: #fff5d5; font: 700 clamp(1rem, 2vw, 1.15rem)/1.5 Arial, sans-serif; text-align: center; }
.campus-map-frame { border: 3px solid var(--gold); border-radius: 1rem; background: #dcecf7; box-shadow: var(--shadow); }
.campus-map-canvas { position: relative; width: 100%; }
.campus-map-canvas > img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.campus-banner { position: absolute; z-index: 1; left: var(--map-x); top: var(--map-y); transform: translate(-50%, -50%); width: var(--map-width); height: var(--map-height); min-width: 24px; min-height: 24px; margin: 0; padding: 0; appearance: none; border: 0; border-radius: .15rem; background: transparent; outline: 2px solid #fff3ac; outline-offset: 1px; box-shadow: 0 0 0 3px #a5751d99, 0 0 12px 4px #ffe190b3; cursor: pointer; transition: outline-color .15s ease, box-shadow .15s ease; }
.campus-banner:hover, .campus-banner:focus-visible { outline-color: #fff9d6; box-shadow: 0 0 0 4px #a5751de6, 0 0 18px 7px #ffe59eeb; }
.campus-globe { border-radius: 50%; outline-color: #dcf7ff; box-shadow: 0 0 0 3px #b5d5e488, 0 0 16px 5px #d3f6ffb3; }
.campus-globe:hover, .campus-globe:focus-visible { outline-color: #ffffff; box-shadow: 0 0 0 4px #87c9d9b3, 0 0 22px 7px #d9fbffeb; }

.school-heading { display: flex; align-items: center; justify-content: center; gap: 1.25rem; }
.school-heading h1 { margin: 0; }
.school-brand { margin: 0 0 .35rem; font-family: Georgia,serif; font-size: 1rem !important; font-weight: bold; color: #165940 !important; }
.school-crest { display: block; flex: 0 0 8rem; width: 8rem; height: 8.2rem; object-fit: contain; filter: drop-shadow(0 3px 2px #72573455); }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.25rem; }

.school-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, .75fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  align-items: stretch;
}
.school-hero img { width: 100%; height: 100%; min-height: 20rem; object-fit: cover; border-radius: 1rem; border: 2px solid var(--gold); box-shadow: var(--shadow); }
.school-intro { display: flex; flex-direction: column; justify-content: center; padding: 1.5rem; background: var(--cream); border: 2px solid var(--gold); border-radius: 1rem; }
.school-intro .actions { justify-content: flex-start; }
.school-hero-fashion img, .school-hero-sugar img, .school-hero-sleuths img, .school-hero-music img, .school-hero-main-hall img, .school-hero-paths img, .school-hero-weather img, .school-hero-tinkers img, .school-hero-wonders img, .school-hero-flight img, .school-hero-place img { height: auto; min-height: 0; aspect-ratio: 16 / 9; object-fit: contain; align-self: center; background: #edf4f8; }
.place-info { margin: 1.5rem 0; }
.place-steps, .race-route { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style-position: inside; padding: 0; }
.place-steps li, .race-route li { padding: 1rem; background: var(--cream); border: 2px solid var(--gold); border-radius: 1rem; }
.place-steps h3 { display: inline; }
.cave-guide { list-style: none; }
.route-comparison { width: 100%; border-collapse: collapse; background: var(--cream); font-family: Arial, sans-serif; line-height: 1.5; }
.route-comparison th, .route-comparison td { padding: .8rem; border: 1px solid var(--gold); text-align: left; vertical-align: top; }
@media (max-width: 920px) { .place-steps, .race-route { grid-template-columns: 1fr; } }
.room-classes ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: .75rem 0 1.75rem; }
.room-classes li { margin: 0; padding: 1rem; background: #fffcf3; border: 1px solid #e5c981; border-radius: .75rem; }
.room-classes li strong, .room-classes li span { display: block; }
.room-classes li span { margin-top: .2rem; font-size: .95rem; line-height: 1.45; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(3, 22, 37, .82);
  backdrop-filter: blur(8px);
}
.modal {
  position: relative;
  display: block;
  width: min(75rem, 100%);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: var(--cream);
  border: 2px solid var(--gold);
  border-radius: 1rem;
  box-shadow: 0 28px 90px rgba(0,0,0,.46);
}
.modal-heading { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem clamp(1rem, 3vw, 2rem); background: var(--cream); border-bottom: 1px solid var(--gold); }
.modal-heading > div { min-width: 0; }
.modal-heading .eyebrow { margin: 0 0 .25rem; font-size: .72rem; line-height: 1.35; }
.modal-heading h2 { margin: 0; font-size: clamp(1.2rem, 2.4vw, 1.9rem); line-height: 1.2; }
.modal-media { min-height: 0; background: #dcecf7; }
.modal-media img { display: block; width: 100%; height: auto; object-fit: contain; }
.modal-copy { display: block; padding: clamp(1.25rem, 3vw, 2rem); }
.room-description { margin: 0 0 1.5rem; column-count: 2; column-gap: 2.25rem; font-size: 1.05rem; line-height: 1.65; }
.modal-copy .actions { justify-content: flex-start; }
.close-button {
  position: static;
  flex-shrink: 0;
  z-index: 2;
  width: 3rem;
  height: 3rem;
  color: var(--white);
  background: var(--navy);
  border: 2px solid var(--gold-light);
  border-radius: 50%;
  font: 800 1.25rem/1 Arial, sans-serif;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  z-index: 300;
  width: min(34rem, calc(100% - 2rem));
  padding: 1rem 1.2rem;
  transform: translateX(-50%);
  color: var(--white);
  background: var(--navy);
  border: 2px solid var(--gold-light);
  border-radius: .85rem;
  box-shadow: var(--shadow);
  font: 700 1rem/1.4 Arial, sans-serif;
  text-align: center;
}

@media (max-width: 920px) {
  .room-classes ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-description { column-count: 1; }
  .campus-grid, .destination-grid { grid-template-columns: 1fr; }
  .image-card:not(.campus-choice) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, .8fr); }
  .image-card img { height: 100%; min-height: 13rem; }
  .card-copy p { min-height: 0; }
  .school-hero { grid-template-columns: 1fr; }
  .school-hero img { min-height: auto; aspect-ratio: 16 / 9; }
}

@media (max-width: 680px) {
  .school-heading { flex-direction: column; gap: .3rem; }
  .school-crest { flex: none; width: 8rem; height: 8.2rem; }
  .topbar { position: relative; align-items: flex-start; }
  .brand span:last-child { max-width: 10rem; }
  .crumbs { display: none; }
  .hero-entry { padding: 1rem; }
  .entry-card { border-radius: .9rem; }
  .entry-copy { padding: 1rem; }
  .entry-copy h1 { font-size: 2rem; }
  .entry-copy .primary-button { width: 100%; }
  .video-tools { align-items: stretch; flex-direction: column; }
  .video-tools .secondary-button { width: 100%; }
  .content-shell { padding: 1rem; }
  .image-card { display: block; }
  .campus-choice .card-copy { padding: .85rem 1rem 1rem; }
  .campus-image-action { font-size: .95rem; }
  .modal-copy { padding: 1.2rem; }
}

@media (max-width: 600px) { .room-classes ul { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.academy-home-link { position:relative; z-index:1; margin:max(10px,env(safe-area-inset-top)) 12px 8px; display:inline-flex; align-items:center; min-height:44px; padding:.55rem .9rem; border:2px solid #e3bc56; border-radius:999px; color:#fff8dd; background:#0b3153; font:700 .9rem Georgia,serif; text-decoration:none; }
.academy-home-link:focus-visible { outline:3px solid #fff1a8; outline-offset:3px; }
.campus-overview { background:#fffdf4; border:2px solid #e3bc56; border-radius:18px; overflow:hidden; }
.campus-overview > img { display:block; width:100%; height:auto; }
.campus-overview > div { padding:1.3rem; }
.campus-overview > .campus-map { padding:0; }
.campus-overview .campus-map-frame { border-radius:0; border-inline:0; box-shadow:none; }
.leader-cards .image-card img { aspect-ratio:1; object-fit:contain; background:#fffdf4; }
.campus-overview ul { columns:2; line-height:1.9; padding-left:1.2rem; }
.primary-button[href], .text-button[href] { display:inline-flex; align-items:center; min-height:44px; text-decoration:none; }
@media(max-width:600px) { .campus-overview ul { columns:1; } }
