:root {
  --bg-dark: #191919;
  --bg-light: #f2f2f2;
  --text-light: #ffffff;
  --text-dark: #171717;
  --text-muted: #c6c6c6;
  --brand-blue: #0567f5;
  --brand-cyan: #17e3d5;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Lato", sans-serif;
  color: var(--text-dark);
  background: #fff;
  line-height: 1.5;
}

html { scroll-behavior: smooth; }

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.site-header {
  position: relative;
  background: var(--bg-dark);
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  transition: background-color .25s ease, box-shadow .25s ease, padding .25s ease;
}

.brand { position: relative; display: inline-block; }
.brand img { width: 250px; max-width: 70vw; }
.logo-dark {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
}

.is-scrolled .nav {
  background: #fff;
  box-shadow: 0 3px 25px rgba(0,0,0,.15);
  padding-top: .8rem;
  padding-bottom: .8rem;
}

.is-scrolled .logo-light { opacity: 0; }
.is-scrolled .logo-dark { opacity: 1; }

.menu-toggle {
  display: none;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  background: transparent;
  padding: .5rem .75rem;
}

.menu {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.menu a {
  color: var(--text-light);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
}

.is-scrolled .menu a { color: #191919; }

.hero {
  min-height: 88vh;
  background-image: url("https://web.archive.org/web/20240228165118im_/https://swamp.xifi.com/wp-content/uploads/2022/01/fakurian-design-6zF2CgAZVXY-unsplash.jpg"), url("https://web.archive.org/web/20240228165118im_/https://swamp.xifi.com/wp-content/uploads/2022/01/BoxGraphic.png");
  background-repeat: no-repeat, no-repeat;
  background-position: center center, right center;
  background-size: cover, 53% auto;
  background-position: center;
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(25, 25, 25, 0.9);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--text-light);
  padding-top: 14rem;
  padding-bottom: 4rem;
  max-width: 760px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.hero p { font-size: 1.25rem; margin: 1rem 0 2rem; }

.angled-top {
  position: relative;
}

.angled-top::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -50px;
  height: 50px;
  background-image: url("https://web.archive.org/web/20240228165118im_/https://xifi.com/swamp/wp-content/uploads/2022/01/SWAMP_herodivider-1.png");
  background-size: cover;
  background-repeat: no-repeat;
}

.btn {
  display: inline-block;
  background: var(--brand-blue);
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  padding: .9rem 1.4rem;
}

.btn:hover { background: var(--brand-cyan); color: var(--text-dark); }
.btn-sm { padding: .55rem .9rem; }

.section { padding: 4.5rem 0; }
.services { background: #ffffff; }
.services h2, .mission h2 {
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 0;
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.card-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  border-radius: 10px;
  background: var(--bg-light);
  padding: 1.9rem 1.4rem;
  box-shadow: 0 5px 5px rgba(25,25,25,.23);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card h3 {
  margin: 1.3rem 0 0;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: clamp(1.55rem, 2.2vw, 1.95rem);
  line-height: 1.2;
}

.service-icon {
  color: #1f69e5;
  font-size: 5.8rem;
  line-height: 1;
  font-weight: 900;
}

.service-line {
  display: block;
  width: 86%;
  height: 3px;
  background: #1f69e5;
  margin-top: 1.8rem;
}

.mission {
  background: #dcdcdc;
  color: var(--text-dark);
}

.mission-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.mission-card {
  min-height: 460px;
  border-radius: 16px;
  box-shadow: 0 6px 12px rgba(0,0,0,.2);
  background: #101216;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.6rem;
  transition: background-color .25s ease, transform .25s ease;
}

.mission-card h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.mission-card .icon,
.mission-card p {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .25s ease, max-height .25s ease, margin .25s ease;
}

.mission-card .icon {
  font-size: 4.5rem;
  line-height: 1;
}

.mission-card p {
  margin: 0;
  font-size: 1rem;
  max-width: 530px;
  line-height: 1.45;
}

.mission-card:hover,
.mission-card:focus-within {
  background: #1f69e5;
  transform: translateY(-2px);
}

.mission-card:hover .icon,
.mission-card:focus-within .icon {
  opacity: 1;
  max-height: 130px;
  margin-top: 1.2rem;
}

.mission-card:hover p,
.mission-card:focus-within p {
  opacity: 1;
  max-height: 300px;
  margin-top: 1.5rem;
}

.contact {
  background: #fff;
}

.contact-wrap {
  max-width: 820px;
}

.contact-wrap h2 {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: .4rem;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #b8b8b8;
  border-radius: 8px;
  padding: .8rem;
  font: inherit;
}

.site-footer {
  background: var(--bg-dark);
  color: #fff;
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.footer-logo { width: 220px; max-width: 100%; }
.footer-links { display: grid; gap: .6rem; align-content: start; }
.footer-links a, .socials a {
  color: #fff;
  text-decoration: none;
}

.footer-links a:hover,
.socials a:hover {
  color: var(--brand-blue);
}

.footer-bottom {
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.2);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.socials { display: flex; gap: 1rem; }

.social-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #fff;
  color: #191919;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  text-transform: lowercase;
  letter-spacing: 0;
}

.social-icon span {
  line-height: 1;
  font-size: 1.5rem;
}

.social-icon:hover {
  background: var(--brand-blue);
  color: #fff;
}

@media (max-width: 900px) {
  .container { width: min(1200px, 94%); }
  .menu-toggle { display: inline-block; }
  .menu { display: none; }
  .menu.open {
    display: flex;
    position: absolute;
    right: 4%;
    top: 4.2rem;
    background: rgba(0,0,0,.9);
    padding: .75rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .is-scrolled .menu.open a { color: #fff; }
  .card-grid { grid-template-columns: 1fr; }
  .card {
    min-height: 340px;
    padding: 2rem 1.25rem;
  }
  .card h3 {
    font-size: clamp(1.8rem, 8vw, 2.2rem);
  }
  .service-icon { font-size: 4.7rem; }
  .service-line { width: 92%; }
  .mission-cards { grid-template-columns: 1fr; gap: 1.25rem; }
  .mission-card {
    min-height: 400px;
    padding: 1.5rem 1.25rem;
  }
  .mission-card .icon,
  .mission-card p {
    opacity: 1;
    max-height: none;
    overflow: visible;
  }
  .mission-card .icon {
    font-size: 4.2rem;
    margin-top: .9rem;
  }
  .mission-card p {
    margin-top: 1rem;
    font-size: 1rem;
  }
  .hero {
    background-size: cover, 0 0;
  }
  .hero-content {
    padding-top: 8.5rem;
    padding-bottom: 3rem;
  }
  .hero h1 {
    font-size: clamp(2.1rem, 10vw, 3rem);
    line-height: 1.08;
  }
  .hero p {
    font-size: 1.1rem;
    max-width: 30ch;
  }
  .btn {
    padding: .82rem 1.2rem;
  }
  .contact-wrap { max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .section { padding: 3.25rem 0; }
  .brand img { width: 210px; }
  .menu.open {
    right: 3%;
    left: 3%;
    top: 4rem;
  }
  .card { min-height: 320px; }
  .mission-card { min-height: 370px; }
  .mission h2,
  .services h2,
  .contact-wrap h2 {
    font-size: clamp(1.9rem, 9vw, 2.4rem);
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
