:root {
  --red: #d71920;
  --deep: #170000;
  --yellow: #ffd200;
  --cream: #fffaf0;
  --ink: #181614;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body.menuOpen {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}


/* =========================================
   HEADER
========================================= */

.siteHeader {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
  padding: 0 clamp(14px, 5vw, 72px);
  background: #ffffff;
  border-bottom: 5px solid var(--yellow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 3px solid var(--yellow);
  border-radius: 50%;
}

.brand span {
  display: flex;
  flex-direction: column;
}

.brand strong {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

.brand small {
  margin-top: 3px;
  color: #746d66;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

nav a,
.menuButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.supportButton {
  color: #181100;
  background: var(--yellow);
}

.menuButton {
  color: #ffffff;
  background: var(--red);
}

.supportButton,
.menuButton {
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.supportButton:hover,
.menuButton:hover {
  transform: translateY(-2px);
}

.menuButton:hover {
  background: #a90d13;
}

.supportButton:focus-visible,
.menuButton:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}


/* =========================================
   HERO
========================================= */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  height: calc(100vh - 82px);
  min-height: 680px;
  overflow: hidden;
  background: var(--deep);
}

.heroImage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.heroShade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(25, 0, 5, 0.97),
      rgba(70, 0, 8, 0.72) 46%,
      transparent 82%
    ),
    linear-gradient(
      0deg,
      rgba(20, 0, 4, 0.55),
      transparent 50%
    );
}

.heroContent {
  position: relative;
  z-index: 2;
  width: min(700px, 90%);
  margin-left: clamp(22px, 8vw, 130px);
  color: #ffffff;
}

.eyebrow {
  margin-bottom: 22px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--red);
}

.hero h1 {
  margin-bottom: 28px;
  font-family: Georgia, serif;
  font-size: clamp(50px, 7vw, 96px);
  font-weight: 700;
  line-height: 0.93;
  letter-spacing: -0.045em;
}

.hero h1 em {
  color: var(--yellow);
  font-weight: 400;
}

.heroIntro {
  max-width: 590px;
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
}

.goldButton {
  display: inline-flex;
  gap: 24px;
  margin-top: 16px;
  padding: 17px 22px;
  color: #211800;
  background: var(--yellow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.heroStat {
  position: absolute;
  right: 5vw;
  bottom: 40px;
  z-index: 2;
  padding-left: 18px;
  color: #ffffff;
  border-left: 3px solid var(--yellow);
}

.heroStat strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 54px;
  line-height: 0.9;
}

.heroStat span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}


/* =========================================
   MOTTO BAND
========================================= */

.introBand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 22px;
  padding: 24px 8vw;
  background: var(--yellow);
  border-top: 7px solid var(--red);
}

.introBand p {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 700;
}

.introBand span {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}


/* =========================================
   HISTORY TIMELINE
========================================= */

.timelineSection {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr;
  gap: 9vw;
  padding: 110px clamp(22px, 8vw, 130px);
}

.sectionLead {
  position: sticky;
  top: 40px;
  align-self: start;
}

.sectionLead h2,
.sectionTitle h2,
.todaySection h2,
.headmastersSection h2 {
  font-family: Georgia, serif;
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.sectionLead > p:last-child,
.sectionTitle > p,
.todaySection > div > p:last-child {
  color: #5f5952;
  font-family: Georgia, serif;
  font-size: 17px;
  line-height: 1.8;
}

.timeline {
  border-left: 1px solid #c8bfb2;
}

.timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 25px;
  padding: 0 0 54px 32px;
}

.timeline article::before {
  position: absolute;
  top: 6px;
  left: -6px;
  width: 11px;
  height: 11px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 6px var(--cream);
  content: "";
}

.timeline b {
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 700;
}

.timeline h3 {
  margin-bottom: 9px;
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 700;
}

.timeline p {
  color: #635d56;
  line-height: 1.7;
}


/* =========================================
   SCIENCE FEATURE
========================================= */

.featureStory {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 640px;
  color: #ffffff;
  background: var(--red);
}

.featureImage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featureCopy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(50px, 8vw, 115px);
}

.featureCopy h2,
.sportHeader h2 {
  font-family: Georgia, serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 700;
  line-height: 1;
}

.featureCopy > p:nth-of-type(2) {
  font-family: Georgia, serif;
  font-size: 17px;
  line-height: 1.8;
}

.featureFact {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}

.featureFact strong {
  color: var(--yellow);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 700;
}

.featureFact span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}


/* =========================================
   MAIN SECTIONS
========================================= */

.legacySection,
.sportSection,
.todaySection,
.headmastersSection {
  padding: 110px clamp(22px, 6vw, 100px);
}


/* =========================================
   ACADEMIC LEGACY
========================================= */

.legacySection {
  background: #ffffff;
}

.sectionTitle {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr;
  align-items: end;
  gap: 8vw;
  margin-bottom: 55px;
}

.portraitGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.portraitGrid article {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: #222222;
}

.portraitGrid article::after {
  position: absolute;
  inset: 30% 0 0;
  background:
    linear-gradient(
      transparent,
      rgba(23, 0, 5, 0.95)
    );
  content: "";
}

.portraitGrid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portraitGrid article > div {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 28px;
  color: #ffffff;
}

.portraitGrid span {
  color: var(--yellow);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portraitGrid h3 {
  margin: 8px 0;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 700;
}

.portraitGrid p {
  font-size: 13px;
  line-height: 1.6;
}

.rhodesStrip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  padding: 24px 28px;
  color: #ffffff;
  background: var(--deep);
}

.rhodesStrip strong {
  margin-right: auto;
  color: var(--yellow);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

.rhodesStrip span {
  font-size: 10px;
  text-transform: uppercase;
}


/* =========================================
   SPORTS
========================================= */

.sportSection {
  color: #ffffff;
  background: var(--deep);
}

.sportHeader {
  max-width: 760px;
}

.sportHeader > p:last-child {
  color: #d2c1c1;
  font-family: Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
}

.sportStats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 48px 0;
  border-top: 1px solid #5f3030;
  border-bottom: 1px solid #5f3030;
}

.sportStats div {
  display: flex;
  align-items: baseline;
  gap: 15px;
  padding: 28px;
  border-right: 1px solid #5f3030;
}

.sportStats div:last-child {
  border-right: 0;
}

.sportStats strong {
  color: var(--yellow);
  font-family: Georgia, serif;
  font-size: 50px;
  font-weight: 700;
}

.sportStats span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.historyGallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.historyGallery figure {
  position: relative;
  height: 410px;
  margin: 0;
  overflow: hidden;
}

.historyGallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.historyGallery figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 60px 20px 22px;
  background: linear-gradient(transparent, #000000);
}

.historyGallery figcaption strong {
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 700;
}

.historyGallery figcaption span {
  margin-top: 5px;
  color: #dddddd;
  font-size: 10px;
  text-transform: uppercase;
}


/* =========================================
   SCHOOL TODAY
========================================= */

.todaySection {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  align-items: center;
  gap: 7vw;
}

.todayImages {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  height: 550px;
}

.todayImages img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* =========================================
   HEADMASTERS
========================================= */

.headmastersSection {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 8vw;
  background: #eadfce;
}

.headmasterList {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}

.headmasterList p {
  margin: 0;
  padding: 15px 0;
  border-top: 1px solid #c7bbaa;
  font-family: Georgia, serif;
  font-size: 15px;
}


/* =========================================
   FOOTER
========================================= */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 45px clamp(22px, 6vw, 100px);
  color: #ffffff;
  background: #120000;
}

footer > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

footer img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 3px solid var(--yellow);
  border-radius: 50%;
}

footer p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

footer p strong {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

footer > a {
  color: var(--yellow);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}


/* =========================================
   EVENT MENU MODAL
========================================= */

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 10px;
}

.modalBackdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.73);
  cursor: pointer;
}

.modalPanel {
  position: relative;
  width: min(620px, calc(100vw - 20px));
  max-height: calc(100vh - 20px);
  padding: 30px;
  overflow: auto;
  background: var(--cream);
  border-top: 8px solid var(--yellow);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.53);
  outline: none;
  animation: menuAppear 0.25s ease;
}

.modalClose {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  border: 0;
  color: #201818;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.modalPanel header {
  display: flex;
  align-items: center;
  gap: 17px;
  padding-bottom: 20px;
  border-bottom: 1px solid #dfd2ba;
}

.modalPanel header img {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  object-fit: cover;
  border: 3px solid var(--yellow);
  border-radius: 50%;
}

.modalPanel h2 {
  margin: 0 0 6px;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 700;
}

.modalPanel header p {
  margin: 0;
  color: #6a5d52;
  font-size: 13px;
}

.eventMenuGrid {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.eventMenuGrid a {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
  background: #ffffff;
  border: 1px solid #e3d8c6;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.eventMenuGrid a:hover {
  color: #ffffff;
  background: var(--red);
  transform: translateX(5px);
}

.eventMenuGrid span {
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
}

.eventMenuGrid a:hover span {
  color: var(--yellow);
}

.eventMenuGrid strong {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

.eventMenuGrid b {
  color: var(--yellow);
  font-size: 20px;
}

@keyframes menuAppear {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 850px) {
  .brand small {
    display: none;
  }

  .hero {
    height: calc(100svh - 82px);
    min-height: 640px;
  }

  .heroShade {
    background:
      linear-gradient(
        0deg,
        rgba(37, 0, 6, 0.96),
        rgba(37, 0, 6, 0.2) 78%
      );
  }

  .heroContent {
    align-self: flex-end;
    margin: 0 22px 70px;
  }

  .heroStat {
    display: none;
  }

  .timelineSection,
  .featureStory,
  .sectionTitle,
  .todaySection,
  .headmastersSection {
    grid-template-columns: 1fr;
  }

  .timelineSection,
  .legacySection,
  .sportSection,
  .todaySection,
  .headmastersSection {
    padding: 75px 22px;
  }

  .sectionLead {
    position: static;
  }

  .timeline {
    margin-top: 35px;
  }

  .featureImage {
    height: 420px;
  }

  .featureCopy {
    padding: 65px 24px;
  }

  .portraitGrid,
  .historyGallery {
    grid-template-columns: 1fr;
  }

  .portraitGrid article {
    height: 480px;
  }

  .rhodesStrip {
    flex-direction: column;
    align-items: flex-start;
  }

  .sportStats {
    grid-template-columns: 1fr;
  }

  .sportStats div {
    border-right: 0;
    border-bottom: 1px solid #5f3030;
  }

  .sportStats div:last-child {
    border-bottom: 0;
  }

  .todayImages {
    height: 470px;
  }

  .headmasterList {
    grid-template-columns: 1fr;
  }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {
  .siteHeader {
    height: 78px;
    padding: 0 10px;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }

  .brand strong {
    font-size: 14px;
  }

  nav {
    gap: 5px;
  }

  nav a,
  .menuButton {
    padding: 11px 8px;
    font-size: 9px;
    letter-spacing: 0.03em;
  }

  .hero {
    height: calc(100svh - 78px);
  }

  .hero h1 {
    font-size: clamp(45px, 13vw, 68px);
  }

  .heroIntro {
    font-size: 16px;
  }

  .timeline article {
    grid-template-columns: 72px 1fr;
    gap: 13px;
    padding-left: 24px;
  }

  .todayImages {
    grid-template-columns: 1fr;
    height: auto;
  }

  .todayImages img {
    height: 300px;
  }

  .modalPanel {
    padding: 22px 15px;
  }

  .modalPanel h2 {
    font-size: 23px;
  }

  .modalPanel header img {
    width: 56px;
    height: 56px;
  }

  .eventMenuGrid a {
    padding: 15px 12px;
  }

  .eventMenuGrid strong {
    font-size: 16px;
  }
}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 390px) {
  .brand span {
    display: none;
  }

  .brand img {
    width: 45px;
    height: 45px;
  }

  nav a,
  .menuButton {
    padding: 10px 7px;
    font-size: 8px;
  }
}


/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .modalPanel {
    animation: none;
  }
}