:root {
  --navy: #1a3a6b;
  --gold: #e8c042;
  --light-gold: #fff8e6;
  --white: #ffffff;
  --bg: #f8f9fa;
  --text: #1a1a2e;
  --muted: #6b7280;
  --line: #e5e7eb;
  --shadow: 0 14px 35px rgba(26, 58, 107, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.navbar {
  width: min(1180px, calc(100% - 28px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--white);
  padding: 3px;
}

.brand strong {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 1.2rem;
}

.brand small {
  display: block;
  color: rgba(255,255,255,0.78);
  margin-top: -4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--white);
  font-weight: 700;
  position: relative;
  padding: 26px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 18px;
  width: 100%;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  background: transparent;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
}

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(26,58,107,0.98), rgba(26,58,107,0.86) 55%, rgba(232,192,66,0.86));
  color: var(--white);
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  right: -16vw;
  top: -12vw;
  width: 48vw;
  height: 48vw;
  background: rgba(232, 192, 66, 0.22);
  transform: rotate(28deg);
  border-radius: 8px;
}

.home-hero {
  min-height: 620px;
  display: grid;
  align-items: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26,58,107,0.88), rgba(26,58,107,0.58)), url("https://www2.yrdsb.ca/sites/default/files/school-images/418.jpg") center/cover;
}

.hero-content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 72px 0;
}

.page-hero .container {
  position: relative;
  z-index: 1;
  padding: 84px 0 72px;
}

h1, h2, h3 {
  font-family: "Poppins", sans-serif;
  line-height: 1.08;
  margin: 0;
}

h1 { font-size: clamp(2.6rem, 6vw, 5.4rem); letter-spacing: 0; }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 4.4rem); }
.hero-copy, .page-hero p:not(.eyebrow) { max-width: 680px; font-size: 1.18rem; color: rgba(255,255,255,0.88); }
.eyebrow { color: var(--gold); text-transform: uppercase; font-weight: 800; letter-spacing: 0.08em; font-size: 0.78rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.btn {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: var(--white); }
.hero .btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold); color: var(--navy); }
.btn-outline { border-color: var(--gold); color: var(--white); background: rgba(255,255,255,0.08); }

.stats-bar {
  width: min(1040px, calc(100% - 32px));
  margin: -46px auto 0;
  position: relative;
  z-index: 2;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}

.stats-bar div { padding: 24px; border-right: 1px solid var(--line); }
.stats-bar div:last-child { border-right: 0; }
.stats-bar strong { display: block; color: var(--navy); font-family: "Poppins", sans-serif; font-size: 1.35rem; }
.stats-bar span { color: var(--muted); font-weight: 600; }

.section { padding: 84px 0; }
.section-soft { background: var(--light-gold); }
.section-heading { margin-bottom: 30px; }
.section-heading h2, .feature-copy h2, .info-panel h2, .form-card h2 {
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3rem);
  position: relative;
  padding-bottom: 14px;
}
.section-heading h2::after, .feature-copy h2::after, .info-panel h2::after, .form-card h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 4px;
  border-radius: 99px;
  background: var(--gold);
}

.card-grid, .quick-grid, .club-grid, .staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card, .quick-card, .club-card, .event-card, .staff-card, .info-panel, .calendar-card, .form-card, .map-panel {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card, .club-card, .staff-card { padding: 24px; border-left: 4px solid transparent; }
.card:hover, .quick-card:hover, .club-card:hover, .event-card:hover, .staff-card:hover {
  transform: translateY(-5px);
  border-left-color: var(--gold);
  box-shadow: 0 18px 45px rgba(26,58,107,0.18);
}

.card h3, .club-card h2, .event-card h2, .staff-card h3 { color: var(--navy); margin: 10px 0; font-size: 1.25rem; }
.tag, .badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.tag { background: var(--light-gold); color: var(--navy); }
.badge.sports { background: #e8f1ff; color: #174ea6; }
.badge.academic { background: var(--light-gold); color: #8a6500; }
.badge.tech { background: #e8fff7; color: #057a55; }
.badge.arts { background: #fff0f2; color: #b4234a; }
.meta { color: var(--muted); font-weight: 700; margin: 0 0 8px; }
.text-link { color: var(--navy); font-weight: 800; border-bottom: 2px solid var(--gold); }

.split-feature {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}
.feature-copy p { color: #374151; }
.feature-photo img { border-radius: 8px; box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; }

.quick-grid { grid-template-columns: repeat(4, 1fr); }
.quick-card { padding: 24px; display: grid; gap: 8px; border-left: 4px solid transparent; }
.quick-card strong { color: var(--navy); font-size: 1.1rem; }
.quick-card small { color: var(--muted); font-weight: 600; }
.quick-icon { font-size: 2rem; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.filter-btn {
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}
.filter-btn.active, .filter-btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.club-card.is-hidden { transform: scale(0.96); opacity: 0; pointer-events: none; display: none; }

.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 28px;
  align-items: start;
}
.calendar-card { padding: 24px; }
.calendar-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.calendar-header h2 { color: var(--navy); font-size: 1.7rem; }
.calendar-header span { color: var(--muted); font-weight: 700; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.weekdays span { color: var(--muted); font-size: 0.75rem; font-weight: 800; text-align: center; }
.day {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: var(--white);
}
.day.blank { border-color: transparent; background: transparent; }
.day.has-event { background: var(--navy); color: var(--white); border-color: var(--navy); box-shadow: inset 0 -4px 0 var(--gold); }

.event-list { display: grid; gap: 16px; }
.event-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 18px;
  padding: 18px;
  border-left: 4px solid transparent;
}
.date-pill {
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
  min-height: 76px;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: inset 0 -5px 0 var(--gold);
}
.date-pill strong { font-family: "Poppins", sans-serif; font-size: 1.5rem; line-height: 1; }
.date-pill span { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
.board-events { margin-top: 54px; }
.board-event-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.board-event {
  background: var(--white);
  border-radius: 8px;
  padding: 18px;
  border-left: 4px solid var(--gold);
  box-shadow: 0 8px 22px rgba(26,58,107,0.08);
}
.board-event h3 { color: var(--navy); font-size: 1rem; margin-bottom: 8px; }
.board-event p { color: var(--muted); margin: 0; font-weight: 700; }

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
}
.info-panel, .form-card { padding: 28px; }
.info-panel dl { display: grid; gap: 16px; margin: 24px 0 0; }
.info-panel dt { color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 0.75rem; }
.info-panel dd { margin: 4px 0 0; font-weight: 700; color: var(--navy); }
.map-panel { overflow: hidden; min-height: 420px; }
.map-panel iframe { width: 100%; height: 100%; border: 0; display: block; }

.staff-grid { grid-template-columns: repeat(3, 1fr); }
.staff-card span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold);
  font-weight: 900;
}
.staff-card a { color: var(--navy); font-weight: 700; word-break: break-word; }

.form-card {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 30px;
}
form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
label { display: grid; gap: 7px; color: var(--navy); font-weight: 800; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
}
textarea { resize: vertical; }
.full { grid-column: 1 / -1; }
.form-success { grid-column: 1 / -1; color: #057a55; font-weight: 800; margin: 0; }

.footer {
  background: #10284d;
  color: rgba(255,255,255,0.86);
  padding: 42px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 28px;
}
.footer h2 { color: var(--gold); font-size: 1rem; margin-bottom: 10px; }
.footer-logo { width: 68px; background: var(--white); border-radius: 8px; padding: 8px; margin-bottom: 12px; }
.footer a { color: var(--white); font-weight: 700; }

.fade-in { opacity: 0; transform: translateY(18px); transition: opacity 520ms ease, transform 520ms ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    inset: 76px 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    padding: 8px 20px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 0; }
  .nav-links a::after { bottom: 8px; }
  .home-hero { min-height: 560px; }
  .stats-bar, .card-grid, .quick-grid, .club-grid, .staff-grid, .footer-grid, .calendar-layout, .contact-layout, .form-card, .split-feature, .board-event-grid {
    grid-template-columns: 1fr;
  }
  .stats-bar { margin-top: 0; border-radius: 0; width: 100%; }
  .stats-bar div { border-right: 0; border-bottom: 1px solid var(--line); }
  .section { padding: 58px 0; }
  .event-card { grid-template-columns: 70px 1fr; }
  form { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .fade-in { opacity: 1; transform: none; }
}
