/* Mount Si Speech & Debate
   Colours come from the Wildcat logo: red, black, white. */

:root {
  --paper: #f5f5f3;
  --white: #ffffff;
  --ink: #161616;
  --ink-soft: #3d3d3d;
  --line: #d6d6d2;
  --charcoal: #1c1c1c;
  --red: #b3141c;
  --red-deep: #8c0e14;
  --on-dark: #f2f2f0;
  --on-dark-soft: #c9c9c5;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Public Sans", sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --wide: 72rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 0.95;
  margin: 0;
}

h1 {
  font-size: clamp(3.25rem, 9vw, 6.5rem);
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  text-transform: uppercase;
}

h3 {
  font-size: 1.75rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
  max-width: 66ch;
}

a {
  color: var(--red);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--red-deep);
  text-decoration-thickness: 0.14em;
}

a:focus-visible,
.button:focus-visible,
iframe:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--white);
  color: var(--ink);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Site bar ---------- */

.site-bar {
  background: var(--charcoal);
  color: var(--on-dark);
  border-bottom: 4px solid var(--red);
}

.site-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--on-dark);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
  text-transform: uppercase;
}

.brand:hover {
  color: var(--white);
}

.brand img {
  width: 48px;
  height: 53px;
  object-fit: cover;
  border-radius: 3px;
}

.brand:focus-visible,
.site-nav a:focus-visible {
  outline-color: var(--white);
}

.site-nav {
  display: flex;
  gap: 0.25rem 1.75rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--on-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--white);
  border-bottom-color: var(--on-dark-soft);
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--red);
}

@media (max-width: 40rem) {
  .brand span {
    font-size: 1.15rem;
  }
  .site-nav {
    width: 100%;
    gap: 0.25rem 1.25rem;
  }
}

/* ---------- Page heads ---------- */

.masthead {
  background: var(--charcoal);
  color: var(--on-dark);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.masthead .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem 3rem;
  align-items: end;
}

.masthead h1 {
  max-width: 11ch;
}

.masthead .lede {
  margin: 1.5rem 0 0;
  font-size: 1.2rem;
  color: var(--on-dark-soft);
  max-width: 44ch;
}

.masthead .crest {
  width: clamp(11rem, 26vw, 18rem);
  margin: -2rem 0;
  height: auto;
}

@media (max-width: 40rem) {
  .masthead .wrap {
    grid-template-columns: 1fr;
  }
  .masthead .crest {
    display: none;
  }
}

.page-head {
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}

.page-head p {
  margin: 1rem 0 0;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(2.5rem, 7vw, 5rem) 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

/* Heading in a narrow left column, content on the right */
.split {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 1.5rem 4rem;
}

@media (max-width: 52rem) {
  .split {
    grid-template-columns: 1fr;
  }
}

.split > h2 {
  padding-top: 0.2rem;
}

/* ---------- Home ---------- */

.gallery-title {
  margin-bottom: 1.5rem;
}

.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  height: clamp(22rem, 48vw, 34rem);
}

.slot {
  margin: 0;
  background: #e4e4e0;
  overflow: hidden;
  border-radius: 2px;
}

.slot-main {
  grid-row: span 2;
}

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

.slot.is-empty {
  display: grid;
  place-items: center;
}

.slot.is-empty::after {
  content: "Team photo";
  color: #5c5c5c;
  font-weight: 600;
  font-size: 0.95rem;
}

@media (max-width: 40rem) {
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 14rem 9rem;
    height: auto;
  }
  .slot-main {
    grid-row: auto;
    grid-column: span 2;
  }
}

.meeting {
  margin: 0 0 1.5rem;
  display: grid;
  gap: 1.25rem;
}

.meeting dt {
  font-weight: 700;
  color: var(--red);
  font-size: 0.95rem;
}

.meeting dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.events {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.events li {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.channels {
  list-style: none;
  margin: 0;
  padding: 0;
}

.channels li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 2rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.channels li:first-child {
  padding-top: 0;
}

.channels h3 {
  margin-bottom: 0.35rem;
}

.channels p {
  margin: 0;
  color: var(--ink-soft);
}

.remind-code {
  font-weight: 700;
  color: var(--ink);
}

@media (max-width: 40rem) {
  .channels li {
    grid-template-columns: 1fr;
  }
  .channels .button {
    justify-self: start;
  }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--red);
  border-radius: 4px;
  background: var(--red);
  color: var(--white);
  white-space: nowrap;
}

.button:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
  color: var(--white);
  text-decoration: none;
}

.button:active {
  transform: translateY(1px);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.button.secondary:hover {
  background: var(--ink);
  color: var(--white);
}

/* ---------- About ---------- */

.president {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.president .initials {
  width: 6rem;
  height: 6rem;
  font-size: 2.5rem;
}

.president .name {
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.initials {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  background: var(--charcoal);
  color: var(--on-dark);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  border-radius: 2px;
}

.role {
  display: block;
  font-weight: 700;
  color: var(--red);
  font-size: 0.95rem;
}

.name {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.05;
}

.roster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 3rem;
}

.roster li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.roster a,
.president a {
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

@media (max-width: 40rem) {
  .roster {
    grid-template-columns: 1fr;
  }
  .president {
    gap: 1rem;
  }
  .president .initials {
    width: 4rem;
    height: 4rem;
    font-size: 1.75rem;
  }
}

.coaches {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3.5rem;
}

.coaches .name {
  font-size: 2rem;
}

/* ---------- Calendar ---------- */

.calendar-frame {
  border: 1px solid var(--line);
  background: var(--white);
}

.calendar-frame iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: 0;
}

@media (max-width: 40rem) {
  .calendar-frame iframe {
    height: 520px;
  }
}

/* ---------- Resources ---------- */

.resource-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 3rem 4rem;
  align-items: start;
}

@media (max-width: 52rem) {
  .resource-cols {
    grid-template-columns: 1fr;
  }
}

.resource-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.resource-list li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.resource-list h3 {
  margin-bottom: 0.4rem;
}

.resource-list p {
  margin-bottom: 0.5rem;
  color: var(--ink-soft);
}

.judges {
  background: var(--charcoal);
  color: var(--on-dark);
  padding: 2rem;
  border-radius: 2px;
}

.judges h2 {
  margin-bottom: 1rem;
}

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

.judges h3 {
  margin: 1.5rem 0 0.4rem;
}

.judges .button {
  margin-top: 0.5rem;
}

.judges .button:focus-visible {
  outline-color: var(--white);
}

/* ---------- Footer ---------- */

.site-foot {
  background: var(--charcoal);
  color: var(--on-dark-soft);
  margin-top: clamp(3rem, 8vw, 5rem);
  padding: 2.5rem 0;
  font-size: 0.95rem;
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-foot p {
  margin: 0;
}

.site-foot strong {
  color: var(--on-dark);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  a,
  .button,
  .site-nav a {
    transition: color 0.15s ease, background-color 0.15s ease,
      border-color 0.15s ease;
  }
}
