:root {
  --red-top: #c90000;
  --red-bottom: #5e0400;
  --cream: #ffffff;
  --lime: #edf000;
  --ink-shadow: rgba(0, 0, 0, 0.4);
  --phone-size: clamp(1.65rem, 3vw, 3rem);
  --address-size: clamp(0.72rem, 2.55vw, 1.35rem);
  --service-size: clamp(0.74rem, 1.12vw, 1.12rem);
  --supporting-size: clamp(0.67rem, 2.48vw, 1.65rem);
  --discount-size: clamp(1.45rem, 2.45vw, 2.5rem);
  --truck-title-size: clamp(2rem, 4.7vw, 4.5rem);
}

@font-face {
  font-family: "Open Sans Local";
  src: url("../assets/fonts/open-sans-300.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rokkitt Local";
  src: url("../assets/fonts/rokkitt-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rokkitt Local";
  src: url("../assets/fonts/rokkitt-900.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--red-bottom);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--cream);
  background: linear-gradient(180deg, var(--red-top) 0%, var(--red-bottom) 100%);
  font-family: "Rokkitt Local", Georgia, "Times New Roman", serif;
}

.hero {
  min-height: 100vh;
  padding: clamp(3.5rem, 6vw, 6.25rem) 1.5rem clamp(4rem, 7vw, 7.5rem);
}

.shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  text-align: center;
}

.brand {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
}

.brand-mark {
  width: clamp(190px, 18vw, 285px);
  height: auto;
  animation: lumberjack-arrival 1600ms cubic-bezier(0.22, 0.74, 0.32, 1) both;
}

.brand-wordmark {
  width: clamp(255px, 25vw, 405px);
  height: auto;
}

.phone,
.address,
.services,
.supporting {
  font-weight: 800;
  letter-spacing: 0.025em;
  text-shadow: 0 0.1em 0.1em var(--ink-shadow);
}

.phone {
  display: inline-block;
  margin-top: clamp(1.85rem, 3.25vw, 3.35rem);
  padding: 0.2rem 0.4rem;
  color: var(--cream);
  font-size: var(--phone-size);
  font-weight: 900;
  line-height: 1.08;
  text-decoration: none;
}

.phone:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 7px;
}

.address {
  margin: 0.75rem 0 0;
  font-size: var(--address-size);
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.services {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.7vw, 2.75rem) clamp(1rem, 3.25vw, 3.75rem);
  margin: clamp(3.5rem, 6vw, 5.75rem) 0 0;
  padding: 0;
  color: var(--lime);
  list-style: none;
  font-size: var(--service-size);
  line-height: 1.45;
  text-align: center;
}

.services li {
  grid-column: span 2;
  display: grid;
  min-width: 0;
  place-items: center;
  text-align: center;
}

.services li:nth-child(4) {
  grid-column: 2 / span 2;
}

.services li:nth-child(5) {
  grid-column: span 2;
}

.discount {
  margin: clamp(4rem, 7vw, 6.75rem) 0 0;
  color: var(--lime);
  font-family: "Open Sans Local", Arial, Helvetica, sans-serif;
  font-size: var(--discount-size);
  font-weight: 300;
}

.supporting {
  margin: 1.65rem 0 0;
  font-size: var(--supporting-size);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.truck {
  width: 100%;
  margin: clamp(3.5rem, 6vw, 5.75rem) auto 0;
}

.truck h2 {
  margin: 0 0 2rem;
  color: var(--lime);
  font-family: "Open Sans Local", Arial, Helvetica, sans-serif;
  font-size: var(--truck-title-size);
  font-weight: 300;
  line-height: 1.08;
}

.truck img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.24);
}

.site-footer {
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.76);
  background: rgba(49, 0, 0, 0.28);
  font-family: "Open Sans Local", Arial, Helvetica, sans-serif;
  font-size: clamp(0.72rem, 1.2vw, 0.9rem);
  font-weight: 300;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.footer-credit::before {
  content: " · ";
}

.site-footer a {
  color: var(--lime);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 4px;
}

@keyframes lumberjack-arrival {
  from {
    opacity: 0;
    transform: translateY(0.85rem) scale(0.84);
  }

  58% {
    opacity: 1;
    transform: translateY(-0.22rem) scale(1.045);
  }

  76% {
    transform: translateY(0.08rem) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (max-width: 700px) {
  .hero {
    padding-inline: 1.15rem;
  }

  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.65rem 1.1rem;
  }

  .services li,
  .services li:nth-child(4),
  .services li:nth-child(5) {
    grid-column: auto;
  }

  .services li:last-child {
    grid-column: 1 / -1;
    text-align: center;
  }

  .phone {
    max-width: 16ch;
  }

  .address,
  .supporting {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .footer-business,
  .footer-credit {
    display: block;
  }

  .footer-credit::before {
    content: none;
  }
}

@media (max-width: 340px) {
  .address,
  .supporting {
    white-space: normal;
  }

  .brand-wordmark {
    width: min(100%, 265px);
  }
}

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

  .brand-mark {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
