/*
 * PS1 Pluralistic School - design system
 * ======================================
 *
 * Redesign in "preserve" mode. The palette, the circle lattice, and the
 * photography all come from the school's existing identity; what changes is
 * the typography, the spacing rhythm, and the layout composition.
 *
 * Brand colours, sampled from the current site's stylesheet:
 *   navy    #2c364b   ink, dark surfaces, the base of the whole system
 *   slate   #5a6575   secondary ink
 *   orange  #f47d2b   THE accent. Every call to action is this colour.
 *   yellow  #fbc134   circle lattice + section band tint only
 *   cyan    #2ac5f4   circle lattice + section band tint only
 *   green   #50c878   circle lattice + section band tint only
 *
 * Accent lock: orange is the only interactive colour. Yellow, cyan and green
 * exist to tint the circle lattice and the six section identities, and never
 * appear on a button, a link, or a focus ring. PS1's identity is polychrome,
 * so the palette stays wide; the *interaction* colour stays single.
 *
 * Shape system, one scale, no exceptions:
 *   --r-lg  24px   panels, media, cards
 *   --r-sm  12px   inputs, small controls, chips with square ends
 *   pill    999px  buttons, tags, the nav
 *
 * Theme: light and dark, both driven entirely by the tokens below. No
 * component hardcodes a colour, which is what keeps dark mode honest across
 * fifty-odd pages.
 */

/* ---------------------------------------------------------------- tokens */

:root,
:root[data-theme='light'] {
  color-scheme: light;

  --navy: #2c364b;
  --orange: #f47d2b;
  --yellow: #fbc134;
  --cyan: #2ac5f4;
  --green: #50c878;

  --page: #f6f7f9;
  --surface: #ffffff;
  --surface-sunk: #eef0f4;
  --ink: #2c364b;
  --ink-soft: #5a6575;
  --ink-faint: #8a93a3;
  --on-dark: #ffffff;
  --on-dark-soft: rgb(255 255 255 / 0.72);

  --accent: #e06a16;
  --accent-hot: #f47d2b;
  --on-accent: #ffffff;

  --line: rgb(44 54 75 / 0.12);
  --line-strong: rgb(44 54 75 / 0.24);
  --lattice: rgb(44 54 75 / 0.16);
  --shadow-sm: 0 2px 8px rgb(44 54 75 / 0.06);
  --shadow: 0 18px 44px rgb(44 54 75 / 0.10);
  --shadow-lg: 0 32px 80px rgb(44 54 75 / 0.16);

  --dark-panel: #2c364b;
  --dark-panel-2: #232c3e;
}

:root[data-theme='dark'] {
  color-scheme: dark;

  --page: #151b27;
  --surface: #1d2432;
  --surface-sunk: #131924;
  --ink: #eef1f6;
  --ink-soft: #a9b3c4;
  --ink-faint: #7c8697;
  --on-dark: #ffffff;
  --on-dark-soft: rgb(255 255 255 / 0.72);

  /* the accent lightens in dark so it still clears AA on the panel */
  --accent: #f9903f;
  --accent-hot: #ffa459;
  --on-accent: #221204;

  --line: rgb(238 241 246 / 0.12);
  --line-strong: rgb(238 241 246 / 0.24);
  --lattice: rgb(238 241 246 / 0.14);
  --shadow-sm: 0 2px 8px rgb(0 0 0 / 0.30);
  --shadow: 0 18px 44px rgb(0 0 0 / 0.42);
  --shadow-lg: 0 32px 80px rgb(0 0 0 / 0.55);

  --dark-panel: #101623;
  --dark-panel-2: #0c111c;
}

:root {
  --font-display: 'Outfit', 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --r-lg: 24px;
  --r-sm: 12px;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 68ch;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* z-index scale, the only layers this site has */
  --z-lattice: 0;
  --z-content: 1;
  --z-header: 50;
  --z-menu: 60;
  --z-skip: 80;
}

/* ------------------------------------------------------------------ base */

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

html {
  scroll-behavior: smooth;
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  letter-spacing: -0.015em;
}

h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

p {
  margin: 0 0 1.1em;
  max-width: var(--measure);
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.18em;
  transition: color 0.18s var(--ease), text-decoration-color 0.18s var(--ease);
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

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

img {
  height: auto;
}

strong {
  font-weight: 600;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  z-index: var(--z-skip);
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transform: translate(-50%, -220%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  color: var(--on-accent);
  transform: translate(-50%, 0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --------------------------------------------------------------- lattice */

/*
 * The circle lattice. It is a mask, not a background image, so one SVG file
 * can be tinted per surface: navy on paper, white on navy, orange over the
 * hero video. Always decorative, always behind content, never interactive.
 */
.lattice {
  position: absolute;
  inset: 0;
  z-index: var(--z-lattice);
  pointer-events: none;
  background-color: var(--lattice);
  -webkit-mask-image: url('/patterns/circles.svg');
  mask-image: url('/patterns/circles.svg');
  -webkit-mask-size: 128px 128px;
  mask-size: 128px 128px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
}

.lattice--lg {
  -webkit-mask-size: 232px 232px;
  mask-size: 232px 232px;
}

.lattice--xl {
  -webkit-mask-size: 340px 340px;
  mask-size: 340px 340px;
}

/* fade the lattice out so it never fights the text sitting on top of it */
.lattice--fade {
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  -webkit-mask-image: url('/patterns/circles.svg'), linear-gradient(180deg, #000, transparent 82%);
  mask-image: url('/patterns/circles.svg'), linear-gradient(180deg, #000, transparent 82%);
  -webkit-mask-size: 232px 232px, 100% 100%;
  mask-size: 232px 232px, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat;
  mask-repeat: repeat, no-repeat;
}

.lattice--orange {
  background-color: rgb(244 125 43 / 0.55);
}

.lattice--white {
  background-color: rgb(255 255 255 / 0.16);
}

.lattice--cyan {
  background-color: rgb(42 197 244 / 0.30);
}

.lattice--yellow {
  background-color: rgb(251 193 52 / 0.36);
}

.lattice--green {
  background-color: rgb(80 200 120 / 0.28);
}

/* ---------------------------------------------------------------- layout */

.shell {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow {
  max-width: 860px;
}

.shell--mid {
  max-width: 1080px;
}

.band {
  position: relative;
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}

.band > .shell {
  position: relative;
  z-index: var(--z-content);
}

.band--tight {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.band--sunk {
  background: var(--surface-sunk);
}

.band--paper {
  background: var(--surface);
}

.band--navy {
  background: var(--dark-panel);
  color: var(--on-dark);
}

.band--navy h1,
.band--navy h2,
.band--navy h3,
.band--navy h4 {
  color: var(--on-dark);
}

.band--navy .lede,
.band--navy p {
  color: var(--on-dark-soft);
}

/* ---------------------------------------------------------------- typography helpers */

.lede {
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
}

.kicker {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.band--navy .kicker {
  color: var(--yellow);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.4em;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 1.3rem;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  max-width: var(--measure);
  padding-left: 1.15rem;
  margin-block: 0;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose li::marker {
  color: var(--accent);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s var(--ease), transform 0.12s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn:hover {
  background: var(--accent-hot);
  color: var(--on-accent);
}

.btn:active {
  transform: scale(0.98);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

/* on navy and over photography the ghost button needs its own contrast */
.btn--onDark {
  border-color: rgb(255 255 255 / 0.45);
  background: rgb(255 255 255 / 0.08);
  color: #ffffff;
  backdrop-filter: blur(6px);
}

.btn--onDark:hover {
  border-color: #ffffff;
  background: rgb(255 255 255 / 0.18);
  color: #ffffff;
}

.btn--sm {
  padding: 0.6rem 1.15rem;
  font-size: 0.875rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.9rem;
}

/* text link with a moving arrow. Motion = feedback on hover, nothing more. */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.arrow-link::after {
  content: '';
  width: 1.05em;
  height: 1.05em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M5 12h14m-6-6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M5 12h14m-6-6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s var(--ease);
}

.arrow-link:hover::after {
  transform: translateX(0.22em);
}

.band--navy .arrow-link {
  color: var(--yellow);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 72px;
}

.site-header__logo {
  flex: none;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header__logo img {
  width: auto;
  height: 40px;
}

.nav {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
}

.nav__item {
  position: relative;
}

.nav__top {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.nav__top:hover,
.nav__item:focus-within .nav__top {
  background: var(--surface-sunk);
  color: var(--ink);
}

.nav__top[aria-current='true'] {
  color: var(--accent);
}

.nav__top::after {
  content: '';
  width: 0.62em;
  height: 0.62em;
  background: currentColor;
  opacity: 0.5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.18s var(--ease);
}

.nav__item:hover .nav__top::after,
.nav__item:focus-within .nav__top::after {
  transform: rotate(180deg);
}

/*
 * Mega menu. CSS-only: it opens on hover and on keyboard focus inside the
 * item, so it works with no script and stays reachable by tab.
 */
.nav__panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 50%;
  z-index: var(--z-menu);
  min-width: 20rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -0.4rem);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}

.nav__item:hover .nav__panel,
.nav__item:focus-within .nav__panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nav__panel a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: 0.9125rem;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.14s var(--ease), color 0.14s var(--ease);
}

.nav__panel a:hover {
  background: var(--surface-sunk);
  color: var(--accent);
}

.nav__panel a[aria-current='page'] {
  color: var(--accent);
  font-weight: 600;
}

.site-header__end {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.site-header__cta {
  display: none;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-sunk);
  color: var(--accent);
}

.icon-btn i {
  font-size: 1.15rem;
}

@media (min-width: 1080px) {
  .nav {
    display: flex;
  }

  .site-header__cta {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }
}

/* mobile drawer, driven by a native <details> so it needs no script */
.drawer {
  display: block;
}

.drawer > summary {
  list-style: none;
}

.drawer > summary::-webkit-details-marker {
  display: none;
}

.drawer__panel {
  position: fixed;
  inset: 72px 0 0;
  z-index: var(--z-menu);
  overflow-y: auto;
  padding: 1.25rem var(--gutter) 3rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.drawer__group {
  border-bottom: 1px solid var(--line);
}

.drawer__group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 0.25rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.drawer__group > summary::-webkit-details-marker {
  display: none;
}

.drawer__group > summary::after {
  content: '';
  width: 0.8em;
  height: 0.8em;
  background: currentColor;
  opacity: 0.45;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.18s var(--ease);
}

.drawer__group[open] > summary::after {
  transform: rotate(180deg);
}

.drawer__links {
  padding: 0 0.25rem 1rem;
}

.drawer__links a {
  display: block;
  padding: 0.5rem 0;
  color: var(--ink-soft);
  text-decoration: none;
}

.drawer__links a:hover {
  color: var(--accent);
}

.drawer__cta {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

@media (min-width: 1080px) {
  .drawer {
    display: none;
  }
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(88dvh, 780px);
  overflow: hidden;
  background: var(--dark-panel);
  color: var(--on-dark);
}

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

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(20 26 38 / 0.55) 0%, rgb(20 26 38 / 0.20) 38%, rgb(20 26 38 / 0.88) 100%),
    linear-gradient(90deg, rgb(20 26 38 / 0.62) 0%, transparent 62%);
}

.hero__inner {
  position: relative;
  z-index: var(--z-content);
  width: 100%;
  padding-block: clamp(3rem, 8vw, 6rem);
}

.hero__copy {
  max-width: 40rem;
}

.hero h1 {
  color: #ffffff;
  text-shadow: 0 2px 26px rgb(12 17 26 / 0.42);
}

.hero__lede {
  max-width: 34rem;
  margin-top: 1.15rem;
  color: rgb(255 255 255 / 0.90);
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  line-height: 1.55;
  text-shadow: 0 1px 18px rgb(12 17 26 / 0.5);
}

/* page hero: the shorter banner every interior page uses */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  background: var(--dark-panel);
  color: var(--on-dark);
}

.page-hero__media {
  position: absolute;
  inset: 0;
}

.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(28 35 50 / 0.92) 0%, rgb(28 35 50 / 0.74) 48%, rgb(28 35 50 / 0.52) 100%);
}

.page-hero__inner {
  position: relative;
  z-index: var(--z-content);
}

.page-hero h1 {
  max-width: 20ch;
  color: #ffffff;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
}

.page-hero__lede {
  max-width: 52ch;
  margin-top: 1rem;
  color: rgb(255 255 255 / 0.86);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.55;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
  color: rgb(255 255 255 / 0.66);
  font-size: 0.85rem;
}

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

.crumbs a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.crumbs span[aria-hidden] {
  opacity: 0.5;
}

/* ------------------------------------------------------------- components */

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-sunk);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.card__body {
  padding: 1.35rem 1.4rem 1.5rem;
}

.card__body p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

a.card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

a.card:hover .card__media img {
  transform: scale(1.04);
}

a.card:hover h3 {
  color: var(--accent);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 {
  grid-template-columns: 1fr;
}

.grid--3 {
  grid-template-columns: 1fr;
}

.grid--4 {
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* two-column text + media split */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .split--wideText {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .split--reverse > :first-child {
    order: 2;
  }
}

.split__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* section header block */
.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head p {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: 1.075rem;
}

.band--navy .section-head p {
  color: var(--on-dark-soft);
}

/* stat row */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--line);
}

@media (min-width: 860px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  padding: 1.6rem 1.4rem;
  background: var(--surface);
}

.band--navy .stat {
  background: var(--dark-panel-2);
}

.band--navy .stats {
  border-color: rgb(255 255 255 / 0.14);
  background: rgb(255 255 255 / 0.14);
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.6vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat__label {
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.4;
}

.band--navy .stat__label {
  color: var(--on-dark-soft);
}

/* pull quote */
.quote {
  position: relative;
  max-width: 46rem;
}

.quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
  text-wrap: balance;
}

.quote figcaption {
  margin-top: 1.3rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.band--navy .quote figcaption {
  color: var(--on-dark-soft);
}

.quote figcaption b {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.band--navy .quote figcaption b {
  color: var(--on-dark);
}

/* definition rows, used for tuition, calendars, contact blocks */
.rows {
  border-top: 1px solid var(--line);
}

.row {
  display: grid;
  gap: 0.35rem 2rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .row {
    grid-template-columns: 15rem 1fr;
    align-items: baseline;
  }
}

.row__key {
  font-weight: 600;
}

.row__value {
  color: var(--ink-soft);
}

.row__value p {
  max-width: none;
}

/* accordion for FAQ-style content */
.qa {
  border-top: 1px solid var(--line);
}

.qa__item {
  border-bottom: 1px solid var(--line);
}

.qa__item > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.qa__item > summary::-webkit-details-marker {
  display: none;
}

.qa__item > summary::after {
  content: '';
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.28rem;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s var(--ease);
}

.qa__item[open] > summary::after {
  transform: rotate(45deg);
}

.qa__body {
  padding-bottom: 1.3rem;
  color: var(--ink-soft);
}

.qa__body > * + * {
  margin-top: 0.9rem;
}

/* people grid */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem 1.25rem;
}

.person__photo {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-sunk);
}

.person__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person__name {
  margin-top: 0.7rem;
  font-weight: 600;
  line-height: 1.3;
}

.person__role {
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* tag/chip list */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chip {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.875rem;
}

.band--navy .chip {
  border-color: rgb(255 255 255 / 0.2);
  background: rgb(255 255 255 / 0.07);
  color: var(--on-dark);
}

/* callout panel */
.callout {
  position: relative;
  overflow: hidden;
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.callout > * {
  position: relative;
  z-index: var(--z-content);
}

.callout--navy {
  border-color: transparent;
  background: var(--dark-panel);
  color: var(--on-dark);
}

.callout--navy h2,
.callout--navy h3 {
  color: var(--on-dark);
}

.callout--navy p {
  color: var(--on-dark-soft);
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  background: var(--dark-panel);
  color: var(--on-dark);
}

.site-footer > .shell {
  position: relative;
  z-index: var(--z-content);
}

.site-footer__top {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .site-footer__top {
    grid-template-columns: 20rem 1fr;
    gap: 4rem;
  }
}

.site-footer__brand img {
  width: auto;
  height: 66px;
}

.site-footer__contact {
  margin-top: 1.5rem;
  color: var(--on-dark-soft);
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: normal;
}

.site-footer__contact a {
  color: var(--on-dark);
  text-decoration: none;
}

.site-footer__contact a:hover {
  color: var(--yellow);
}

.site-footer__nav {
  display: grid;
  gap: 2rem 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 720px) {
  .site-footer__nav {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1180px) {
  .site-footer__nav {
    grid-template-columns: repeat(6, 1fr);
  }
}

.site-footer__nav h4 {
  margin-bottom: 0.7rem;
  color: var(--yellow);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer__nav ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer__nav li + li {
  margin-top: 0.4rem;
}

.site-footer__nav a {
  color: var(--on-dark-soft);
  font-size: 0.9125rem;
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: #ffffff;
}

.accreditations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  padding-block: 2.25rem;
  margin-top: 3rem;
  border-block: 1px solid rgb(255 255 255 / 0.14);
}

.accreditations img {
  width: auto;
  height: 46px;
  filter: brightness(0) invert(1);
  opacity: 0.72;
  transition: opacity 0.18s var(--ease);
}

.accreditations a:hover img {
  opacity: 1;
}

.site-footer__legal {
  display: grid;
  gap: 1.25rem;
  padding-top: 1.75rem;
  color: rgb(255 255 255 / 0.55);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.site-footer__legal p {
  max-width: 90ch;
}

.site-footer__legal a {
  color: rgb(255 255 255 / 0.75);
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.socials {
  display: flex;
  gap: 0.5rem;
}

.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 999px;
  color: #ffffff;
  font-size: 1.05rem;
  text-decoration: none;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease);
}

.socials a:hover {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}

/* --------------------------------------------------------------- motion */

/*
 * One reveal pattern for the whole site: sections rise slightly as they enter
 * the viewport. It communicates hierarchy, you read a section as it arrives,
 * and nothing else.
 *
 * It animates transform only, deliberately. An opacity fade reads better but
 * it fails closed: any renderer that does not resolve the view() timeline
 * (print, some capture pipelines, a future engine quirk) leaves the section
 * stuck at opacity 0 and the content is simply gone. A transform-only reveal
 * fails open, with the worst case being a section sitting 20px low and fully
 * readable. On a school site that trade is not close.
 */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal-up 0.7s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% entry 42%;
  }

  @keyframes reveal-up {
    from {
      transform: translateY(20px);
    }

    to {
      transform: none;
    }
  }
}

/* browsers without scroll-driven animation support simply show the content */
@supports not (animation-timeline: view()) {
  .reveal {
    animation: none;
    transform: none;
  }
}

@media print {
  .reveal {
    animation: none;
    transform: none;
  }

  .site-header,
  .theme-toggle,
  .lattice {
    display: none;
  }
}

/* --------------------------------------------------------------- theming */

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.theme-toggle:hover {
  background: var(--surface-sunk);
  color: var(--accent);
}

.theme-toggle .i-sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .i-sun {
  display: block;
}

:root[data-theme='dark'] .theme-toggle .i-moon {
  display: none;
}

/* dark mode wants the photography a touch calmer so text keeps its weight */
:root[data-theme='dark'] .card__media img,
:root[data-theme='dark'] .split__media img,
:root[data-theme='dark'] .person__photo img {
  filter: brightness(0.9);
}
