:root {
  --rmc-red: #ed1c24;
  --rmc-blue: #125ea3;
  --white: #ffffff;
  --ink: #17212b;
  --muted: #5d6873;
  --line: #dce2e8;
  --soft: #f5f7f9;
  --max: 1180px;
  --shadow: 0 16px 45px rgba(20, 35, 50, .12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--rmc-blue); }
a:hover { color: var(--rmc-red); }

button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid var(--rmc-red);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 9999;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.nav-wrap {
  width: min(calc(100% - 36px), var(--max));
  min-height: 78px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.15;
}
.brand img {
  width: 48px;
  height: 52px;
  object-fit: cover;
}
.brand strong { display: block; font-size: 16px; letter-spacing: .02em; }
.brand small {
  display: block;
  margin-top: 3px;
  color: var(--rmc-blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  position: relative;
  padding: 28px 14px 25px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 17px;
  height: 3px;
  background: var(--rmc-red);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}
.site-nav a:hover::after,
.site-nav a.active::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  width: 46px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 9px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
  color: white;
}
.hero-red, .hero-blue {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-red {
  background: var(--rmc-red);
  clip-path: polygon(0 0, 51% 0, 43% 100%, 0 100%);
}
.hero-blue {
  background: var(--rmc-blue);
  clip-path: polygon(51% 0, 100% 0, 100% 100%, 43% 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 90px;
  background: white;
  clip-path: polygon(0 100%, 0 55%, 45% 55%, 50% 100%, 55% 55%, 100% 55%, 100% 100%);
  z-index: -1;
}
.hero-content {
  width: min(780px, calc(100% - 36px));
  margin-top: -35px;
  text-align: center;
}
.hero-mark {
  width: 78px;
  height: 78px;
  margin: 0 auto 22px;
  border: 4px solid white;
  border-radius: 50%;
  overflow: hidden;
  background: white;
  box-shadow: 0 7px 25px rgba(0,0,0,.15);
}
.hero-mark img { width: 100%; height: 100%; object-fit: cover; }

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .18em;
}
.blue-text { color: var(--rmc-blue); }
.red-text { color: var(--rmc-red); }

.hero .eyebrow { color: white; opacity: .95; }
.hero h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 88px);
  line-height: .98;
  letter-spacing: -.045em;
}
.hero-lead {
  max-width: 700px;
  margin: 22px auto 28px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.button {
  display: inline-block;
  padding: 13px 20px;
  border: 2px solid white;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
}
.button-light { background: white; color: var(--rmc-blue); }
.button-outline { background: transparent; color: white; }
.button:hover { background: var(--rmc-red); color: white; }

.section {
  width: min(calc(100% - 36px), var(--max));
  margin: auto;
  padding: 94px 0;
}
.section-heading {
  max-width: 760px;
  margin: 0 auto 52px;
  text-align: center;
}
.section-heading h2,
.section-subheading h3,
.about-copy h2,
.contact h2 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.section-heading h2,
.about-copy h2,
.contact h2 {
  font-size: clamp(38px, 5vw, 58px);
}
.section-heading > p:last-child { color: var(--muted); }

.event-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.event-card {
  display: grid;
  grid-template-columns: 94px 1fr;
  grid-template-rows: auto auto;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 8px 26px rgba(20,35,50,.05);
  overflow: hidden;
}
.event-card.featured {
  grid-column: 1 / -1;
  grid-template-columns: 115px 1fr 360px;
}
.event-date {
  padding: 20px 14px;
  background: var(--rmc-blue);
  color: white;
  text-align: center;
}
.event-card.featured .event-date { background: var(--rmc-red); }
.event-date span {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.event-date small {
  display: block;
  margin-top: 7px;
  font-weight: 800;
  letter-spacing: .1em;
}
.event-body { padding: 24px 26px; }
.event-body h3 { margin: 0 0 10px; font-size: 25px; line-height: 1.15; }
.event-body p { margin: 8px 0; color: var(--muted); }
.event-kicker {
  color: var(--rmc-red) !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.event-card > img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}
.event-card.featured > img { min-height: 100%; }
.text-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 800;
  text-decoration: none;
}

.sports {
  margin-top: 70px;
  padding: 42px;
  background: var(--soft);
  border-top: 7px solid var(--rmc-red);
}
.sports-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}
.sports-heading h2 { margin: 0; font-size: 34px; }
.sports-heading p:last-child { margin-bottom: 0; color: var(--muted); }
.sports-heading img { width: 105px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
  padding: 11px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
th {
  background: var(--rmc-blue);
  color: white;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
tr:last-child td { border-bottom: 0; }
td a { font-weight: 700; }

.section-projects { background: white; }
.project-feature-grid { display: grid; gap: 26px; }
.project-feature {
  display: grid;
  grid-template-columns: 330px 1fr;
  border: 1px solid var(--line);
  background: white;
  overflow: hidden;
}
.project-feature:nth-child(even) { grid-template-columns: 1fr 330px; }
.project-feature:nth-child(even) img { order: 2; }
.project-feature img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}
.project-feature > div { padding: 32px; }
.project-feature h3 { margin: 0 0 14px; font-size: 28px; line-height: 1.15; }
.project-feature p { color: var(--muted); }

.section-subheading {
  max-width: 760px;
  margin: 70px auto 30px;
  text-align: center;
}
.section-subheading h3 { font-size: 34px; }
.section-subheading p:last-child { color: var(--muted); }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery figure {
  margin: 0;
  background: var(--soft);
  border: 1px solid var(--line);
}
.gallery-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.gallery-button img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .2s ease;
}
.gallery-button:hover img { transform: scale(1.025); }
.gallery figcaption {
  padding: 12px 14px 15px;
  font-size: 13px;
  color: var(--muted);
}

.section-about { background: var(--soft); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.about-image img {
  width: 100%;
  box-shadow: var(--shadow);
}
.about-copy h2 { margin-bottom: 22px; }
.about-copy p { color: var(--muted); }
.document-links {
  display: grid;
  gap: 9px;
  margin-top: 26px;
}
.document-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
}
.document-links span {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 28px;
  background: var(--rmc-blue);
  color: white;
  font-size: 10px;
  letter-spacing: .08em;
}

.section-directors { background: white; }
.director-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.director {
  border: 1px solid var(--line);
  background: white;
  text-align: center;
}
.director img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--soft);
}
.director h3 { margin: 17px 14px 3px; font-size: 20px; }
.director p {
  margin: 0 14px 20px;
  color: var(--rmc-blue);
  font-size: 13px;
  font-weight: 800;
}

.contact {
  background: var(--rmc-blue);
  color: white;
  padding: 75px 18px;
}
.contact-inner {
  width: min(100%, var(--max));
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.contact h2 { color: white; margin-bottom: 15px; }
.contact .eyebrow { color: white; }
.contact p { color: rgba(255,255,255,.86); }
.contact-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.contact-links a {
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.38);
  color: white;
  text-decoration: none;
  font-weight: 700;
}
.contact-links a:hover { background: var(--rmc-red); border-color: var(--rmc-red); }
.contact-links .contact-email {
  grid-column: 1 / -1;
  background: white;
  color: var(--rmc-blue);
  border-color: white;
  font-size: 18px;
}

.site-footer {
  width: min(calc(100% - 36px), var(--max));
  margin: auto;
  min-height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 13px;
}
.site-footer strong, .site-footer span { display: block; }
.site-footer span { color: var(--muted); margin-top: 4px; }
.site-footer a { font-weight: 800; text-decoration: none; }

.image-dialog {
  width: min(92vw, 1000px);
  max-width: 1000px;
  padding: 18px;
  border: 0;
  background: white;
  box-shadow: 0 30px 90px rgba(0,0,0,.35);
}
.image-dialog::backdrop { background: rgba(0,0,0,.78); }
.image-dialog img { max-height: 78vh; width: auto; margin: auto; }
.image-dialog p { margin: 12px 0 0; color: var(--muted); text-align: center; }
.dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  background: var(--ink);
  color: white;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .site-nav a { padding-inline: 9px; font-size: 12px; }
  .event-card.featured { grid-template-columns: 100px 1fr; }
  .event-card.featured > img { grid-column: 1 / -1; max-height: 280px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .director-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { gap: 40px; }
}

@media (max-width: 700px) {
  html { scroll-padding-top: 70px; }
  .nav-wrap { min-height: 70px; }
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 18px 14px;
    background: white;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 4px; }
  .site-nav a::after { left: 0; right: auto; bottom: 5px; width: 42px; }
  .hero { min-height: 650px; }
  .hero-red { clip-path: polygon(0 0, 100% 0, 54% 52%, 0 52%); }
  .hero-blue { clip-path: polygon(100% 48%, 100% 100%, 0 100%, 46% 48%); }
  .hero::after { display: none; }
  .hero-content { margin-top: 0; }
  .section { padding: 68px 0; }
  .event-grid, .sports-grid, .about-grid, .contact-inner { grid-template-columns: 1fr; }
  .event-card, .event-card.featured { grid-template-columns: 82px 1fr; }
  .event-card > img, .event-card.featured > img { grid-column: 1 / -1; max-height: 240px; min-height: 0; }
  .sports { padding: 25px 18px; }
  .sports-heading { align-items: flex-start; }
  .project-feature, .project-feature:nth-child(even) { grid-template-columns: 1fr; }
  .project-feature:nth-child(even) img { order: 0; }
  .project-feature img { min-height: 220px; max-height: 300px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .contact-links { grid-template-columns: 1fr; }
  .contact-links .contact-email { grid-column: auto; }
  .site-footer { flex-direction: column; align-items: flex-start; padding: 28px 0; }
}

@media (max-width: 460px) {
  .brand strong { font-size: 14px; }
  .brand small { font-size: 10px; }
  .hero h1 { font-size: 52px; }
  .hero-lead { font-size: 16px; }
  .gallery { grid-template-columns: 1fr; }
  .director-grid { grid-template-columns: 1fr; }
  .event-body { padding: 20px 18px; }
  .event-body h3 { font-size: 22px; }
}

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

/* Chronological sports schedule */
.sports-schedule {
  background: white;
  border: 1px solid var(--line);
}
.sports-table {
  margin: 0;
}
.sports-table th,
.sports-table td {
  padding: 14px 16px;
}
.sports-table tbody tr:nth-child(even) {
  background: #fafbfc;
}
.sports-table tbody tr:hover {
  background: #f2f6fa;
}
.sports-table td:first-child {
  white-space: nowrap;
  font-weight: 700;
}
.sports-table td:nth-child(2) {
  color: var(--rmc-red);
  white-space: nowrap;
}
@media (max-width: 700px) {
  .sports-table {
    min-width: 680px;
  }
}

/* Event groups: keeps Toronto Branch events separate from other events. */
.event-group + .event-group { margin-top: 64px; }
.event-group-heading {
  margin: 0 0 24px;
  text-align: left;
}
.event-group-heading h3 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
}
.event-card.branch-event {
  grid-column: 1 / -1;
  grid-template-columns: 115px 1fr;
  border-top: 5px solid var(--rmc-red);
}
.event-card.branch-event .event-kicker { color: var(--rmc-blue) !important; }

@media (max-width: 700px) {
  .event-card.branch-event { grid-template-columns: 82px 1fr; }
  .event-group + .event-group { margin-top: 48px; }
  .event-group-heading h3 { font-size: 28px; }
}
