/* ==========================================================================
   Michigan Burn Mass Casualty Plan - SBCC
   Plain CSS, no frameworks.
   ========================================================================== */

:root {
  --accent: #eb586f;        /* links, icons, buttons */
  --accent-dark: #d14e63;   /* link + button hover */
  --accent-nav: #e63d4f;    /* active / hovered nav link, back-to-top */
  --text: #444;
  --heading: #585b60;       /* section titles, nav links */
  --hero-heading: #2f3542;
  --hero-bg: #f4f6f9;
  --band-bg: #f6f6f6;
  --footer-bg: #282828;
  --copyright-bg: #1d1d1d;
  --font-body: "Rubik", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
}

h1, h2, h3, h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 25px;
}

ul { margin: 0 0 16px; padding: 0; list-style: none; }
li { font-size: 16px; line-height: 20px; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease-in, background-color 0.2s ease-in, border-color 0.2s ease-in;
}
a:hover, a:focus { color: var(--accent-dark); }

img { max-width: 100%; height: auto; vertical-align: middle; border: 0; }

strong { font-weight: 700; }

:focus-visible { outline: 2px solid var(--accent-nav); outline-offset: 2px; }

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}
@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

.section { padding: 60px 0; }
.section-tinted { background: var(--band-bg); }

.section-title {
  margin: 0 0 48px;
  padding: 0 10px;
  color: var(--heading);
  font-size: 38px;
  line-height: 1;
  letter-spacing: 1px;
  text-align: center;
}

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: block; height: 1em; fill: currentColor; }

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

/* ---------- Navigation ---------- */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1030;
  background: transparent;
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.site-nav.is-stuck {
  min-height: 58px;
  background: #fff;
  box-shadow: 0 3px 6px 3px rgba(0, 0, 0, 0.06);
  animation: nav-drop 1s both;
}
@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: none; }
}

.brand { display: inline-block; margin-right: 16px; line-height: 20px; }
.brand img { width: 136px; }
.site-nav.is-stuck .brand img { width: 200px; }

.nav-menu { display: flex; margin: 0; }
.nav-menu li { line-height: 20px; }
.nav-menu a {
  display: block;
  margin-right: 18px;
  padding: 18px 8px;
  color: var(--heading);
  font-size: 14px;
}
.nav-menu a:hover,
.nav-menu a:focus,
.nav-menu a.is-active { color: var(--accent-nav); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 35px;
  margin: 11px 0;
  padding: 0;
  border: 1px solid var(--accent-nav);
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 1px;
  background: var(--accent-nav);
}
.nav-toggle span + span { margin-top: 3px; }

@media (max-width: 1199px) {
  .site-nav.is-stuck .brand img { width: 140px; }
}

@media (max-width: 991px) {
  .brand img,
  .site-nav.is-stuck .brand img { width: 120px; }
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    flex: 0 0 100%;
    flex-direction: column;
    max-height: 350px;
    overflow-y: auto;
    margin: 0 -15px;
    padding: 2px 0;
    background: #fff;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.06);
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu li { line-height: 30px; }
  .nav-menu a {
    margin: 2px 5px;
    padding: 5px 10px;
    color: #666;
  }
  .nav-menu a:hover,
  .nav-menu a:focus,
  .nav-menu a.is-active { background: #f8f9fa; }
}

/* ---------- Hero ---------- */

.hero {
  margin-bottom: 60px;
  padding-top: 80px;
  background: var(--hero-bg);
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 30px;
}
.hero-figure { margin: 0 0 16px; }
.hero-text { margin-top: 0; }
.hero h1 {
  color: var(--hero-heading);
  font-size: 22px;
}
.hero h1 strong {
  display: block;
  margin-bottom: 10px;
  font-size: 32px;
  line-height: 38px;
}
.hero-text p {
  margin-bottom: 45px;
  font-size: 18px;
}
@media (min-width: 576px) {
  .hero .container { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 641px) {
  .hero-text { margin-top: 40px; }
  .hero h1 { font-size: 24px; }
  .hero h1 strong { font-size: 48px; line-height: 62px; }
}

/* ---------- Disaster plans ---------- */

.plans {
  display: grid;
  align-items: start;
  grid-template-columns: 1fr;
  column-gap: 30px;
}
@media (min-width: 768px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .plans { grid-template-columns: repeat(4, 1fr); } }

.plan { text-align: center; }
.plan img { width: 100px; margin-bottom: 15px; }
.plan h3 { font-size: 18px; }
.plan h3 a { color: var(--text); }
.plan h3 a:hover, .plan h3 a:focus { color: var(--accent); }
@media (max-width: 480px) { .plan { margin-bottom: 30px; } }

/* ---------- Burn essentials ---------- */

.resources {
  display: grid;
  align-items: start;
  grid-template-columns: 1fr;
  column-gap: 30px;
}
@media (min-width: 768px) { .resources { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .resources { grid-template-columns: repeat(3, 1fr); } }

.resource { margin: 15px 0 16px; }
.resource ul { margin-bottom: 0; }
.resource-icon {
  float: left;
  margin-top: 5px;
  color: var(--accent);
  font-size: 32px;
}
.resource-body { padding-left: 48px; }
.resource h3 { margin-bottom: 10px; font-size: 18px; }
@media (max-width: 640px) { .resource h3 { font-size: 14px; } }

/* ---------- Training modules ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 4px;
}
.filters button {
  padding: 11px 27px;
  border: 2px solid var(--accent);
  border-radius: 0;
  background: var(--accent);
  color: #222;
  font: 400 14px/21px var(--font-body);
  cursor: pointer;
  transition: 0.2s ease-in;
}
.filters button:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
}
.filters button.is-active { color: #fff; }
@media (max-width: 640px) { .filters button { margin: 5px 0; padding: 7px 14px; } }
@media (max-width: 480px) { .filters button { padding: 7px 8px; font-size: 13px; } }

.modules {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 60px 0;
}
@media (min-width: 768px) { .modules { grid-template-columns: repeat(2, 1fr); margin: 0 -15px; } }
@media (min-width: 992px) { .modules { grid-template-columns: repeat(3, 1fr); } }

.module {
  position: relative;
  display: block;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.module[hidden] { display: none; }
.module.is-leaving,
.module.is-entering { opacity: 0; transform: scale(0.9); }
.module img { display: block; width: 100%; }

.module-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 35px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}
.module-overlay::before {
  content: "";
  position: absolute;
  inset: 15px;
  background: rgba(235, 88, 111, 0.7);
  transform: scale(0.8);
  transition: transform 0.4s ease;
}
.module-title,
.module-description {
  position: relative;
  display: block;
  color: #fff;
  opacity: 0;
  transition: all 0.5s ease;
}
.module-title {
  margin-bottom: 18px;
  font: 700 18px/22px var(--font-heading);
  text-transform: uppercase;
  transform: scale(0);
}
.module-description {
  font-size: 13px;
  line-height: 18px;
  transform: translateY(40px);
}
.module:hover .module-overlay,
.module:focus-visible .module-overlay { opacity: 1; }
.module:hover .module-overlay::before,
.module:focus-visible .module-overlay::before { transform: scale(1); }
.module:hover .module-title,
.module:focus-visible .module-title,
.module:hover .module-description,
.module:focus-visible .module-description { opacity: 1; transform: none; }

/* ---------- Contributors ---------- */

.section-intro { margin-bottom: 35px; }

.contributors {
  display: grid;
  align-items: start;
  grid-template-columns: 1fr;
  column-gap: 30px;
}
@media (min-width: 768px) { .contributors { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .contributors { grid-template-columns: repeat(3, 1fr); } }

.contributor-group { margin-bottom: 40px; }
.contributor-icon {
  float: left;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border: 2px solid #f1f1f1;
  border-radius: 10px;
  color: var(--accent);
  font-size: 30px;
  transition: all 0.4s ease;
}
.contributor-group:hover .contributor-icon { background: var(--accent); color: #fff; }
.contributor-body { padding-left: 88px; }
.contributor-group h3 {
  margin-bottom: 10px;
  font-size: 15px;
  text-transform: uppercase;
}
.contributor-group ul { margin-bottom: 0; }
.contributor-group li { font-size: 14px; line-height: 25px; }

/* ---------- Stats ---------- */

.stats-band {
  padding: 60px 0;
  background: #25264e url("../img/about/testimonial-bg.jpg") center / cover no-repeat;
}
.stats {
  display: grid;
  align-items: start;
  grid-template-columns: 1fr;
  column-gap: 30px;
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.stat { margin: 80px 0; text-align: center; }
.stat-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 48px;
}
.stat-value {
  margin: 0 0 20px;
  color: #fff;
  font: 700 48px/1.2 var(--font-heading);
}
.stat-rule {
  width: 25px;
  height: 0;
  margin: 20px auto;
  border-top: 1px solid #fff;
}
.stat-label { margin: 0; color: #fff; font-size: 14px; line-height: 20px; }
@media (max-width: 480px) { .stat { margin: 40px 0; } }

/* ---------- Contact ---------- */

.contact-details {
  margin: 0 0 23px;
  color: var(--text);
  font: 700 24px/1.2 var(--font-heading);
  text-align: center;
}
.contact-details p {
  margin: 0 0 29px;
  font: inherit;
}
.contact-details p:last-child { margin-bottom: 0; }
.contact-details a { text-decoration: underline; }

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

.site-footer { background: var(--footer-bg); color: #7c7c7c; }
.support { padding-top: 30px; padding-bottom: 30px; }
.support h2 { margin-bottom: 20px; color: #fff; font-size: 22px; }
.support p { color: #fff; }
.copyright { padding: 30px 0 20px; background: var(--copyright-bg); }
.copyright p { margin: 0; color: #999; line-height: 38px; }

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  right: 15px;
  bottom: 18px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 2px;
  background: var(--accent-nav);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.back-to-top:hover, .back-to-top:focus { color: #fff; }
.back-to-top.is-visible { opacity: 1; visibility: visible; }

/* ---------- Page loader (only shown when JavaScript is running) ---------- */

.preloader { display: none; }
.js .preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: opacity 0.4s ease;
}
.js .preloader.is-done { opacity: 0; pointer-events: none; }
.preloader::after {
  content: "";
  width: 50px;
  height: 50px;
  border: 2px solid #f2f2f2;
  border-top-color: var(--accent-nav);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Smaller screens ---------- */

@media (max-width: 991px) {
  .section-title { margin-bottom: 30px; font-size: 26px; }
}
@media (max-width: 767px) {
  .section-title { font-size: 22px; }
}

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