/* The Performance Hub: shared styles. Hand-written.
   Page layout lives in /assets/css/<page>.css, generated by build.py from the
   old site's rendered styles. This file holds everything shared. */

@font-face { font-family: 'Broadway'; src: url('/assets/fonts/2025-12-BROADW.woff') format('woff'); font-display: swap; }

:root {
  --navy: #181948;
  --gold: #c9a961;
  --mist: #e8e9f0;
  --ink: #334155;
  --sys: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--navy); color: var(--ink); font: 400 16px/1.65 var(--sys); overflow-x: hidden; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; vertical-align: middle; border: 0; }
h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-weight: inherit; font-size: inherit; line-height: inherit; color: inherit; font-family: inherit; }
a { color: inherit; }
.t a, .ttl a { color: inherit; text-decoration: none; }
main { display: block; }
main > section:first-child { position: relative; }
.anchor { display: block; scroll-margin-top: 20px; }
.rich a, .iconlist a, .site-footer a { text-decoration: none; }
.rich img { display: inline-block; }
.rich table { border-collapse: collapse; width: 100%; }
.rich td, .rich th { border: 1px solid rgba(128, 128, 128, .4); padding: 8px; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: #fff; color: #000; padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer;
  transition: filter .2s ease, transform .2s ease; }
.btn:hover, .btn:focus-visible { filter: brightness(1.1); }
.btn svg { flex: none; }
@media (min-width: 768px) { .btn { white-space: nowrap; } }

/* ---------- dividers (optionally labelled) */
.sep .ln { flex: 1 1 auto; border-top: var(--line, 1px solid currentColor); min-width: 10px; }
.sep .dt { margin: 0; }

/* ---------- header */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 50; }
.hd-in { max-width: 1140px; margin: 0 auto; padding-top: 20px; display: flex; align-items: flex-start; gap: 20px; min-height: 70px; }
.logo { flex: none; display: block; line-height: 0; }
.logo img { width: 120px; height: auto; }
.nav { flex: 1; display: flex; justify-content: flex-end; }
.nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.nav li { position: relative; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 10px 20px; font: 500 16px/20px 'Broadway', sans-serif; color: var(--mist);
  text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a:focus-visible { color: var(--gold); }
.nav .caret { width: 10px; height: 16px; fill: currentColor; }
.nav .sub { list-style: none; margin: 0; padding: 0; position: absolute; top: 100%; left: 0; min-width: 190px; background: var(--navy);
  border-radius: 0 0 6px 6px; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s; }
.nav .has-sub:hover .sub, .nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.nav .sub a { padding: 12px 20px; font-size: 15px; }
.hd-btn { flex: none; display: inline-block; background: var(--gold); color: var(--mist); font: 500 15px/15px 'Aboreto', sans-serif;
  padding: 12px 24px; border-radius: 3px; text-decoration: none; text-transform: uppercase; }
.hd-btn:hover { filter: brightness(1.1); }
.burger { display: none; margin-left: auto; background: none; border: 0; padding: 0; width: 50px; height: 50px; cursor: pointer; }
.burger svg { width: 50px; height: 50px; fill: var(--mist); }

/* tablet: the live site keeps the full menu down to 1025px */
@media (max-width: 1024px) {
  .hd-in { padding: 20px 20px 0; }
  .nav, .hd-btn { display: none; }
  .burger { display: block; }
}
@media (max-width: 767px) {
  .site-header { position: relative; background: var(--navy); }
  .hd-in { padding: 20px 20px 0 25px; min-height: 109px; align-items: flex-start; }
  .logo img { width: 117px; }
  .burger { margin-top: 2px; }
}

/* mobile menu (slides in from the right, like the old off-canvas) */
.offcanvas { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .55); }
.offcanvas[hidden] { display: none; }
.oc-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 75%; max-width: 380px; background: var(--navy);
  border-radius: 40px 0 0 40px; padding: 20px 15px 30px; overflow-y: auto; animation: oc-in .25s ease-out; }
@keyframes oc-in { from { transform: translateX(100%); } to { transform: none; } }
.oc-close { display: block; margin-left: auto; background: none; border: 0; width: 34px; height: 34px; padding: 4px; cursor: pointer; }
.oc-close svg { fill: var(--mist); width: 100%; height: 100%; }
.oc-panel ul { list-style: none; margin: 4px 0 20px; padding: 0; }
.oc-panel li a { display: block; padding: 14px 0; border-bottom: 1px solid rgba(232, 233, 240, .8); color: #fff; text-decoration: none;
  font: 500 21.9px/1.2 'Broadway', sans-serif; }
.oc-panel li:last-child a { border-bottom: 0; }
.oc-btn { display: block; text-align: center; background: var(--gold); color: var(--mist); text-decoration: none; text-transform: uppercase;
  font: 500 15px/15px 'Aboreto', sans-serif; padding: 12px 24px; border-radius: 3px; }
body.menu-open { overflow: hidden; }

/* ---------- accordions (native <details>) */
.acc details > summary { list-style: none; }
.acc details > summary::-webkit-details-marker { display: none; }
.acc .aic { display: inline-flex; flex: none; }
.acc .aic > span { display: inline-flex; }
.acc details[open] > summary .ai-closed, .acc details:not([open]) > summary .ai-open { display: none; }
.acc .aic svg { display: block; }

/* ---------- Elementor shape dividers */
.shape { position: absolute; left: 0; width: 100%; overflow: hidden; line-height: 0; z-index: 0; pointer-events: none; }
.shape-top { top: -1px; }
.shape-bottom { bottom: -1px; }
.shape svg { display: block; position: relative; left: 50%; transform: translateX(-50%); }

/* ---------- icon lists */
.iconlist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.iconlist li { display: flex; align-items: flex-start; }
.iconlist li > a { display: flex; align-items: flex-start; color: inherit; text-decoration: none; }
.iconlist .ic { display: inline-flex; flex: none; align-self: center; margin-right: 6px; }
.iconlist .ic svg { display: block; }

/* ---------- maps, social */
.map iframe { display: block; width: 100%; border: 0; }
.social { display: flex; gap: 10px; flex-wrap: wrap; }
.social a { display: inline-flex; line-height: 0; }
.social svg { width: 1em; height: 1em; }

/* ---------- popups */
dialog.popup { padding: 0; border: 0; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: auto; }
dialog.popup::backdrop { background: rgba(0, 0, 0, .7); }
.popup-close { position: absolute; top: 8px; right: 12px; z-index: 5; background: none; border: 0; font-size: 34px; line-height: 1;
  color: #fff; text-shadow: 0 0 4px rgba(0, 0, 0, .6); cursor: pointer; }

/* ---------- gallery + lightbox */
.gallery { column-gap: 10px; }
.gallery .gi { display: block; overflow: hidden; margin-bottom: 10px; break-inside: avoid; }
.gallery img { display: block; width: 100%; height: auto; transition: transform .4s; }
.gallery .gi:hover img { transform: scale(1.04); }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .9); }
dialog.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; display: block; }
dialog.lightbox button { position: fixed; background: rgba(0, 0, 0, .4); color: #fff; border: 0; font-size: 34px; width: 52px; height: 52px; cursor: pointer; border-radius: 50%; }
dialog.lightbox .lb-close { top: 14px; right: 14px; }
dialog.lightbox .lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
dialog.lightbox .lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- slider (awards) */
.slider { position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slider::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; }
.slide .sc { padding: 20px; }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.slider-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(128, 128, 128, .5); padding: 0; cursor: pointer; }
.slider-dots button[aria-current="true"] { background: var(--gold); }

/* ---------- the ONE enquiry form (posts to the Hub). Look comes from the old form via CSS variables. */
.hub-enquiry { --in-bg: #fff; --in-color: #333; --in-radius: 0; --in-border: 1px solid #ccc; --in-pad: 6px 16px; --in-font: inherit; --in-size: 15px;
  --bt-bg: var(--gold); --bt-color: #fff; --bt-radius: 0; --bt-font: inherit; --bt-size: 15px; --bt-transform: none; --bt-pad: 10px 20px; --gap: 10px; }
.hub-enquiry form { display: flex; flex-direction: column; gap: var(--gap); }
.hub-enquiry .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.hub-enquiry input, .hub-enquiry textarea { width: 100%; background: var(--in-bg); color: var(--in-color); border: var(--in-border); border-radius: var(--in-radius);
  padding: var(--in-pad); font-family: var(--in-font); font-size: var(--in-size); line-height: 1.4; min-height: 40px; }
.hub-enquiry textarea { min-height: 96px; resize: vertical; }
.hub-enquiry input:focus, .hub-enquiry textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.hub-enquiry fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.hub-enquiry legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: inherit; }
.hub-enquiry .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-enquiry .chip { position: relative; }
.hub-enquiry .chip input { position: absolute; opacity: 0; inset: 0; min-height: 0; cursor: pointer; }
.hub-enquiry .chip span { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 1px solid currentColor; font-size: 13px; line-height: 1.4; opacity: .85; }
.hub-enquiry .chip input:checked + span { background: var(--bt-bg); border-color: var(--bt-bg); color: var(--bt-color); opacity: 1; }
.hub-enquiry .chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.hub-enquiry .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hub-enquiry .notice { font-size: 12px; line-height: 1.5; opacity: .85; }
.hub-enquiry button[type=submit] { background: var(--bt-bg); color: var(--bt-color); border: 0; border-radius: var(--bt-radius); padding: var(--bt-pad);
  font-family: var(--bt-font); font-size: var(--bt-size); text-transform: var(--bt-transform); cursor: pointer; width: 100%; }
.hub-enquiry button[disabled] { opacity: .6; cursor: wait; }
.hub-enquiry .err { color: #b91c1c; background: #fff; border-radius: 4px; padding: 0; font-size: 14px; }
.hub-enquiry .err:not(:empty) { padding: 6px 10px; }
.hub-enquiry .bad input, .hub-enquiry input.bad { outline: 2px solid #dc2626; }
.hub-enquiry .after { padding: 10px 0; }
.hub-enquiry .after h3 { font-size: 20px; margin-bottom: 6px; }
.hub-enquiry .cf-turnstile, .hub-enquiry .human { min-height: 65px; }
@media (max-width: 340px) { .hub-enquiry .row2 { grid-template-columns: 1fr; } }
.hub-enquiry button[type=submit], .newsletter button { min-height: 40px; }

/* newsletter (footer) */
.newsletter { display: flex; gap: 10px; }
.newsletter input { flex: 1; min-width: 0; }

/* ---------- live timetable rows (timetable.js) */
.tt-teacher { opacity: .85; }
.tt-note { font-size: 13px; opacity: .8; margin-top: 8px; }
.tt-extra { background: var(--navy); color: var(--mist); border-radius: 35px; padding: 30px 35px; font: 400 15px/1.5 Lato, sans-serif; }
.tt-extra-h { font: 400 26px/1.2 Aboreto, sans-serif; color: var(--gold); text-transform: uppercase; margin-bottom: 18px; }
.tt-extra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px 30px; }
.tt-extra h4 { font: 400 17px/1.3 Aboreto, sans-serif; color: var(--gold); text-transform: uppercase; margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid rgba(201, 169, 97, .5); }
.tt-extra ul { list-style: none; margin: 0; padding: 0; }
.tt-extra li { padding: 3px 0; }
.tt-extra strong { color: var(--gold); font-weight: 700; margin-right: 4px; }
@media (max-width: 767px) { .tt-extra { padding: 22px 20px; border-radius: 20px; } }
