/*
 * Copyright (c) 2026 Enactus McMaster. All rights reserved.
 * Source available for viewing only. See LICENSE.
 */

@font-face {
  font-family: "DM Sans";
  src: url("../assets/fonts/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/barlow-condensed.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/barlow-condensed-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --maroon: #7a003c;
  --yellow: #ffc72c;
  --white: #fff;
  --ink: #251e22;
  --muted: #665c62;
  --line: #ded8db;
  --surface: #f6f5f5;
  --veil: #390d24;
  --project-ground: #f3edf0;
  --project-mark: #e8d8e0;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --s10: 128px;
  --gutter: clamp(24px, 5vw, 80px);
  --max: 1280px;
  --nav-inset: 24px;
  --radius-frame: 12px;
  --project-radius: 20px;
  --fast: 180ms;
  --motion-control: 240ms;
  --motion-ease: cubic-bezier(.2, .7, .2, 1);
  --focus: 3px;
}

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

html {
  scroll-padding-top: var(--s5);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 1rem / 1.65 var(--body);
}

:where(p, h1, h2, h3, h4, figure) {
  margin: 0;
}

:where(h1, h2, h3) {
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.045em;
}

h1, h2 {
  color: var(--maroon);
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

a {
  color: inherit;
  text-underline-offset: 6px;
}

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: var(--focus) solid var(--maroon);
  outline-offset: var(--s1);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.section-space {
  padding-block: var(--s9);
}

.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  line-height: 1.6;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: var(--s4);
  left: var(--s4);
  padding: var(--s3) var(--s4);
  background: var(--yellow);
  color: var(--ink);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  margin: var(--nav-inset) var(--nav-inset) 0;
  background: var(--white);
  border-radius: var(--radius-frame);
}

:where(.home-page, body:has(main > .hero)) .site-header {
  position: absolute;
  z-index: 10;
  inset: var(--nav-inset) var(--nav-inset) auto;
  margin: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 2 * var(--s7));
  min-height: 88px;
  gap: var(--s6);
}

.wordmark {
  display: inline-flex;
  flex: none;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
}

.wordmark > span {
  color: var(--maroon);
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: -.065em;
}

.wordmark > img {
  width: 100px;
  height: auto;
  object-fit: contain;
}

.wordmark small {
  margin-top: var(--s2);
  font-size: .65rem;
}

#main-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.7vw, 44px);
}

#main-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: .85rem;
  text-decoration: none;
}

#main-nav a:hover {
  text-decoration: underline;
}

#main-nav [aria-current="page"] {
  color: var(--maroon);
  font-weight: 700;
}

#main-nav [aria-current="page"]::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-inline-start: var(--s2);
  border-radius: 50%;
  background: currentColor;
}

#main-nav .nav-join {
  padding: var(--s3) var(--s5);
  border-radius: var(--s1);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 600;
}

.menu-button {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 56px;
  padding: var(--s3) var(--s6);
  border: 0;
  background: var(--yellow);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.button:hover,
.button-maroon {
  background: var(--maroon);
  color: var(--white);
}

.button-maroon:hover {
  background: var(--veil);
}

.underlined-link, .light-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  color: var(--maroon);
  font-size: .85rem;
  font-weight: 600;
}

figcaption {
  font-size: .7rem;
  color: var(--muted);
}

figcaption a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-footer {
  margin-top: var(--s7);
  padding-top: var(--s8);
  background: var(--project-ground);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--s8);
  align-items: start;
  padding-bottom: var(--s8);
}

.footer-identity {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s7);
  align-items: center;
}

.footer-identity .wordmark > span {
  font-size: 3.2rem;
}

.footer-identity .wordmark > img {
  width: 134px;
}

.footer-identity p {
  font-size: .9rem;
  line-height: 1.7;
  color: var(--muted);
}

.footer-connect {
  padding-top: var(--s2);
}

.footer-connect h2 {
  margin-bottom: var(--s4);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.025em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s6);
}

.footer-links a, .footer-bottom a {
  display: inline-flex;
  gap: var(--s2);
  min-height: 44px;
  align-items: center;
  width: fit-content;
  color: var(--maroon);
}

.footer-links a {
  font-size: .8rem;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--s3) var(--s5);
  align-items: center;
  padding-block: var(--s4);
  border-top: 1px solid var(--project-mark);
  font-size: .75rem;
  color: var(--muted);
}

.footer-bottom :is(.footer-copyright, [data-year], :has(> [data-year])) {
  grid-column: 2;
  grid-row: 1;
  text-align: center;
}

.footer-bottom > a:last-child {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  text-align: end;
}

@media (max-width: 1000px) {
  .header-inner {
    width: calc(100% - 2 * var(--s6));
  }

  #main-nav {
    gap: var(--s5);
  }

  .footer-top {
    gap: var(--s7);
  }

  .footer-identity {
    grid-template-columns: 1fr;
    gap: var(--s5);
  }
}

@media (max-width: 760px) {
  :root {
    --nav-inset: 12px;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 0;
    width: calc(100% - 2 * var(--s5));
    min-height: 76px;
  }

  .wordmark {
    margin-block: var(--s3);
  }

  .wordmark > span {
    font-size: 2rem;
  }

  .section-space {
    padding-block: var(--s8);
  }

  #main-nav {
    justify-content: space-between;
    flex-wrap: wrap;
    width: 100%;
    gap: 0 var(--s4);
  }

  .has-interactions .menu-button {
    display: inline-flex;
    align-items: center;
    gap: var(--s5);
    min-height: 44px;
    padding: var(--s2) 0 var(--s2) var(--s4);
    border: 0;
    background: transparent;
    font-size: .85rem;
  }

  .menu-symbol {
    font-size: 1.5rem;
    line-height: 1;
  }

  .has-interactions #main-nav {
    display: none;
    flex-flow: column nowrap;
    align-items: stretch;
    gap: var(--s2);
    padding-block: var(--s4) var(--s5);
    border-top: 1px solid var(--line);
  }

  .has-interactions #main-nav.is-open {
    display: flex;
  }

  .has-interactions #main-nav .nav-join {
    align-self: start;
  }

  .site-footer {
    margin-top: var(--s5);
    padding-top: var(--s7);
  }

  .footer-top, .footer-identity {
    grid-template-columns: 1fr;
    gap: var(--s4);
  }

  .footer-top {
    gap: var(--s6);
    padding-bottom: var(--s6);
  }

  .footer-identity .wordmark {
    margin: 0;
  }

  .footer-identity .wordmark > span {
    font-size: 3rem;
  }

  .footer-identity p {
    font-size: .85rem;
  }

  .footer-connect h2 {
    font-size: 1.15rem;
  }

  .footer-links {
    gap: var(--s2) var(--s5);
  }

  .footer-bottom {
    grid-template-columns: 1fr 1fr;
    gap: var(--s2) var(--s5);
  }

  .footer-bottom :is(.footer-copyright, [data-year], :has(> [data-year])) {
    grid-column: 1 / -1;
  }

  .footer-bottom > a:last-child {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a, button {
    transition: color var(--fast), background-color var(--fast);
  }

  .button {
    transition: transform var(--motion-control) var(--motion-ease),
                color var(--motion-control), background-color var(--motion-control);
  }

  .button:hover {
    transform: translateY(-3px);
  }

  .button:active {
    transform: translateY(0);
  }

  .underlined-link, .light-link {
    transition: color var(--motion-control), text-underline-offset var(--motion-control);
  }

  .underlined-link:hover, .light-link:hover {
    text-underline-offset: 10px;
  }

  .has-interactions #main-nav.is-open {
    animation: menu-enter var(--motion-control) var(--motion-ease) both;
  }

  @keyframes menu-enter {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
  }
}

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 180ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
