:root {
  --red: #e30613;
  --deep-red: #b8000a;
  --gold: #ffd400;
  --cream: #fffdf2;
  --ink: #221818;
  --muted: #706365;
  --border: rgba(227, 6, 19, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);

  background:
    linear-gradient(
      rgba(27, 9, 10, 0.78),
      rgba(27, 9, 10, 0.78)
    ),
    url("../images/school-background.jpg")
    center / cover fixed;

  font-family: "DM Sans", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

/* PAGE OVERLAY */

.page-overlay {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(28, 9, 10, 0.3);
  backdrop-filter: blur(7px);
}

/* MAIN POPUP */

.contact-modal {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;

  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 26px;

  background: var(--cream);

  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.46);

  animation: modalEnter 0.38s ease-out both;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* CLOSE BUTTON */

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;

  width: 44px;
  height: 44px;

  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;

  color: #ffffff;
  background: rgba(0, 0, 0, 0.22);

  font-size: 29px;
  line-height: 1;

  cursor: pointer;

  transition:
    transform 0.2s,
    background 0.2s;
}

.close-button:hover,
.close-button:focus-visible {
  background: rgba(0, 0, 0, 0.4);
  transform: rotate(90deg);

  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* CONTACT HEADER */

.contact-header {
  position: relative;
  overflow: hidden;

  padding:
    42px
    clamp(22px, 6vw, 68px)
    40px;

  color: #ffffff;

  background:
    radial-gradient(
      circle at 92% 5%,
      rgba(244, 196, 48, 0.34),
      transparent 28%
    ),
    linear-gradient(
      135deg,
      var(--red),
      var(--deep-red)
    );
}

.contact-header::after {
  content: "";

  position: absolute;
  right: -90px;
  bottom: -125px;

  width: 310px;
  height: 310px;

  border: 42px solid rgba(244, 196, 48, 0.08);
  border-radius: 50%;

  pointer-events: none;
}

/* SCHOOL BRAND */

.school-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.school-crest {
  width: 76px;
  height: 76px;
  object-fit: contain;

  filter:
    drop-shadow(0 8px 16px rgba(0, 0, 0, 0.26));
}

.eyebrow {
  margin: 0 0 5px;

  color: var(--gold);

  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-header h1,
.chapters h2,
.chapter-card h3 {
  font-family:
    "Barlow Condensed",
    Arial,
    sans-serif;
}

.contact-header h1 {
  margin: 0;

  font-size:
    clamp(2.5rem, 7vw, 4.7rem);

  line-height: 0.9;
  text-transform: uppercase;
}

.intro {
  max-width: 670px;
  margin: 20px 0 28px;

  color: rgba(255, 255, 255, 0.82);

  line-height: 1.65;
}

/* MAIN CONTACT CARDS */

.contact-grid {
  position: relative;
  z-index: 1;

  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 15px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 15px;

  min-height: 112px;
  padding: 18px;

  border:
    1px solid rgba(255, 255, 255, 0.2);

  border-radius: 17px;

  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);

  text-decoration: none;

  transition:
    transform 0.2s,
    background 0.2s;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.17);
  transform: translateY(-3px);
}

.contact-icon {
  flex: 0 0 48px;

  display: grid;
  place-items: center;

  width: 48px;
  height: 48px;

  border-radius: 14px;

  color: var(--deep-red);
  background: var(--gold);
}

.contact-icon svg {
  width: 24px;
  fill: currentColor;
}

.contact-card small {
  display: block;
  margin-bottom: 4px;

  color: rgba(255, 255, 255, 0.66);

  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-card strong {
  display: block;
  line-height: 1.35;
}

.contact-card em {
  display: block;
  margin-top: 7px;

  color: var(--gold);

  font-size: 0.8rem;
  font-style: normal;
  font-weight: 700;
}

/* CHAPTER SECTION */

.chapters {
  padding:
    34px
    clamp(22px, 6vw, 68px)
    48px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 20px;
}

.eyebrow.dark {
  color: var(--red);
}

.section-heading h2 {
  margin: 0;

  color: var(--deep-red);

  font-size:
    clamp(2rem, 4vw, 3rem);

  line-height: 1;
  text-transform: uppercase;
}

.section-heading > p {
  max-width: 400px;
  margin: 0;

  color: var(--muted);

  font-size: 0.92rem;
  line-height: 1.5;
}

.chapter-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 16px;
}

.chapter-card {
  position: relative;

  min-height: 210px;
  overflow: hidden;

  padding: 26px;

  border:
    1px solid rgba(123, 17, 19, 0.14);

  border-radius: 19px;

  background: #ffffff;

  box-shadow:
    0 13px 32px rgba(78, 8, 10, 0.07);
}

.chapter-number {
  position: absolute;
  top: 14px;
  right: 20px;

  color: rgba(123, 17, 19, 0.08);

  font-family:
    "Barlow Condensed",
    sans-serif;

  font-size: 4.7rem;
  font-weight: 800;
  line-height: 1;
}

.status {
  position: relative;
  display: inline-block;

  margin-bottom: 25px;
  padding: 7px 11px;

  border-radius: 999px;

  color: var(--red);
  background: rgba(244, 196, 48, 0.28);

  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.chapter-card h3 {
  position: relative;

  max-width: 85%;
  margin: 0 0 9px;

  color: var(--deep-red);

  font-size: 1.55rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.chapter-card p {
  position: relative;
  margin: 0;

  color: var(--muted);

  font-size: 0.9rem;
  line-height: 1.6;
}

/* MOBILE VIEW */

@media (max-width: 680px) {

  body {
 background: var(--red);
  }

  .page-overlay {
    display: block;
    padding: 0;
  }

  .contact-modal {
    width: 100%;
    min-height: 100vh;
    max-height: none;

    border: 0;
    border-radius: 0;
  }

  .contact-header {
    padding: 55px 19px 28px;
  }

  .school-brand {
    align-items: flex-start;
    padding-right: 44px;
  }

  .school-crest {
    width: 61px;
    height: 61px;
  }

  .contact-grid,
  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    min-height: 100px;
  }

  .chapters {
    padding: 28px 19px 38px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 11px;
  }
}

/* REDUCE ANIMATION */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.contact-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.directory-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 2px solid #ffd400;
  border-radius: 10px;
  color: #8b0000;
  background: #ffd400;
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.2s ease;
}

.directory-button:hover,
.directory-button:focus-visible {
  color: #ffd400;
  background: #8b0000;
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .contact-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .directory-button {
    width: 100%;
  }
}