:root {
  --red: #e30620;
  --red-dark: #bd061b;
  --navy: #071a36;
  --off-white: #f7f8fa;
  --bg: #f9fafb;
  --text: #374151;
  --headings: #111827;
  --gray-panel: #ebedf0;
  --shadow: 0 0 40px 0 rgba(0, 0, 0, 0.11);
  --width: 1120px;
  --gutter: 20px;
  --body-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --heading-font: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --h1: 48.83px;
  --h2: 39.06px;
  --h3: 31.25px;
  --h4: 25px;
  --h5: 20px;
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.45;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h3 {
  margin: 0 0 0.5em;
  color: var(--headings);
  font-family: var(--heading-font);
  font-weight: 400;
  line-height: 1.2;
}

h1 { font-size: var(--h1); }
h2, .h2 { font-size: var(--h2); }
h3, .h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); }
h5 { font-size: var(--h5); }

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  margin: 0;
  color: var(--red);
}

main {
  flex: 1;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
}

.skip-link:focus {
  left: 10px;
  top: 10px;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1.5px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.button:hover,
.button:focus-visible {
  background: var(--red-dark);
  color: #fff;
}

/* Top bar */

.topbar {
  background: var(--navy);
  font-size: 14px;
}

.topbar .container {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.topbar a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}

.topbar span {
  color: var(--off-white);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--navy);
  transition: transform 0.3s ease-in-out;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 11px;
  padding-bottom: 10px;
}

.header-main {
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: block;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

.logo img {
  width: 300px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.site-nav ul {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(209, 213, 219, 0.25);
  color: var(--headings);
}

/* Sections */

.section {
  padding: 24px 0;
}

.section-white {
  background: #fff;
}

.section-gray {
  background: var(--gray-panel);
}

.section-head {
  text-align: center;
}

.section-head h2 {
  margin: 0;
}

/* Hero */

.hero {
  background: url("../img/hero.webp") center / cover no-repeat;
}

.hero .container {
  min-height: 90vh;
  padding-top: 40px;
  padding-bottom: 40px;
}

.hero h1,
.hero .hero-accent {
  margin: 0;
  font-size: 80px;
  line-height: 1.2;
}

.hero h1 {
  max-width: 500px;
  color: var(--navy);
}

.hero .hero-accent {
  display: block;
  color: var(--red);
}

.divider {
  width: 100px;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 3px solid var(--red);
}

.hero-text {
  max-width: 500px;
  margin-top: 31px;
}

.hero-text p {
  margin: 0;
}

.hero .button {
  margin-top: 36px;
}

/* Cards */

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.card img {
  width: 100%;
}

.card-title {
  margin: 20px 0 10px;
}

.card-text {
  margin: 0 0 20px;
}

.card .button {
  margin-top: auto;
}

.grid {
  display: grid;
  gap: 32px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.services-grid {
  padding: 30px 0 24px;
}

/* Estimate online */

.estimate-cta {
  display: grid;
  grid-template-columns: 35% minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 10px;
}

.estimate-cta .eyebrow {
  margin-bottom: 19px;
}

.estimate-cta h3 {
  margin: 0;
}

.estimate-cta p:not(.eyebrow) {
  margin: 4px 0 0;
}

.estimate-cta .button {
  margin-top: 31px;
}

/* Projects */

.projects {
  padding: 20px 0 30px;
  text-align: center;
}

.projects .eyebrow {
  margin-top: 6px;
}

.projects h2 {
  margin: 16px 0 30px;
}

.project {
  padding: 10px;
}

.project img {
  height: 200px;
  object-fit: cover;
}

.project .card-title {
  margin: 16px 0 3px;
  line-height: 1;
}

.project .card-text {
  margin: 0 0 6px;
  color: var(--red);
}

.projects > .container > .button {
  margin-top: 30px;
}

/* Rich text */

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 0.8em 0 0.6em;
}

.prose ul {
  margin: 0 0 1em;
  padding-left: 25px;
}

.prose .spaced {
  margin-top: 2.25em;
}

/* Services page */

.page-title {
  padding: 30px 0 9px;
}

.page-title h1 {
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: 35% minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.split + .split {
  margin-top: 24px;
}

.services-body {
  padding: 14px 0 35px;
}

/* About page */

.about {
  padding: 50px 0 60px;
}

.about-grid {
  display: grid;
  grid-template-columns: 59% minmax(0, 1fr);
  gap: 32px;
}

.about-grid h2 {
  margin: 0 0 22px;
}

.about-grid h2.about-subhead {
  margin: 75px 0 14px;
}

.about-grid .prose + .card {
  margin-top: 41px;
}

.feature-card {
  align-items: flex-start;
  border: 1px solid var(--navy);
  border-radius: 6px;
  text-align: left;
}

.feature-card .button {
  margin-top: 0;
}

/* Contact page */

.contact {
  padding: 40px 0 60px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 32px;
  align-items: stretch;
}

.contact-info h1 {
  margin: 0 0 16px;
}

.contact-list {
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 14px 0;
  border-top: 1px solid #dfe4ea;
}

.contact-list li:last-child {
  border-bottom: 1px solid #dfe4ea;
}

.contact-list strong {
  display: block;
  margin-bottom: 2px;
  color: var(--headings);
  font-family: var(--heading-font);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.contact-list a {
  color: var(--red);
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-map {
  min-height: 380px;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
}

/* Footer */

.site-footer {
  padding: 15px 0;
  background: var(--navy);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: center;
}

.footer-grid img {
  width: auto;
  height: 89px;
}

.footer-contact {
  text-align: center;
}

.footer-contact p {
  margin: 0;
}

.footer-tagline {
  color: #fff;
}

.footer-phone {
  margin-top: 6px !important;
  font-size: 24px;
}

.footer-phone a {
  color: var(--red);
  text-decoration: none;
}

.footer-address {
  margin-top: 1px !important;
  color: var(--off-white);
}

.footer-cta {
  display: flex;
  justify-content: center;
}

/* Responsive */

@media (max-width: 1119px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .estimate-cta,
  .split,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .split > img {
    max-width: 420px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
  }
}

@media (max-width: 1023px) {
  .nav-toggle {
    display: flex;
  }

  .site-header .container {
    position: relative;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--bg);
    border-bottom: 1px solid var(--navy);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    padding: 20px;
    border-top: 1px solid #eee;
    border-radius: 0;
  }

  .header-main {
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .hero h1,
  .hero .hero-accent {
    font-size: 60px;
  }

  .hero {
    background-image: linear-gradient(rgba(249, 250, 251, 0.9) 35%, rgba(249, 250, 251, 0) 75%), url("../img/hero.webp");
  }

  .hero .container {
    min-height: 70vh;
  }

  .topbar .container {
    justify-content: center;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .logo img {
    width: 200px;
  }

  .header-cta {
    display: none;
  }

  .about-grid h2.about-subhead {
    margin-top: 40px;
  }
}

@media (max-width: 479px) {
  .hero h1,
  .hero .hero-accent {
    font-size: 52px;
  }

  .logo img {
    width: 170px;
  }
}
