* {
  box-sizing: border-box;
}

body {
  display: grid;
  grid-template-areas:
    "hero"
    "content"
    "footer";
  margin: 0;
  background-color: hsl(0, 0%, 88%);
  font-family: system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell,
    "Helvetica Neue", sans-serif;
}

header {
  grid-area: hero;
  display: flex;
  justify-content: space-between;
  justify-self: center;
  z-index: 1;
  padding: 0 16px;
  max-width: 1000px;
  height: fit-content;

  address {
    display: flex;
    gap: 16px;
    a {
      align-items: center;
      font-size: calc(24 / 16 * 1rem);

      > :nth-child(2) {
        display: none;

        @media (min-width: 800px) {
          display: inline;
          font-size: 1rem;
        }
      }
    }
  }
}

footer {
  grid-area: footer;
  align-items: center;
  background-color: black;
  padding: 32px 5vw;
  gap: 32px;

  * {
    margin: auto;
  }

  address {
    display: block;
    width: fit-content;
    text-align: center;
  }
}

header,
footer {
  width: 100%;
  color: white;
}

header address,
footer address {
}

footer address {
  display: block;
  flex-direction: column;
  align-items: center;

  > a {
    display: block;
    margin: auto;
  }
}

main {
  grid-area: content;
}

address {
  font-style: normal;
}

address a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  color: hsl(0, 0%, 90%);
  gap: 8px;
}

address a:hover {
  text-decoration: underline;
  color: hsl(0, 0%, 100%);
}

.logo {
  width: fit-content;
  font-family: "GoodTiming", sans-serif;

  > :nth-child(1) {
    font-family: "Overdrive", sans-serif;
    font-size: calc(32 / 16 * 1em);
  }

  > :nth-child(2) {
    font-size: calc(40 / 16 * 1em);
  }

  > :nth-child(3) {
    margin-top: -1em;
    text-align: right;
    font-size: calc(9 / 16 * 1em);
  }
}

.hero {
  grid-area: hero;
  position: relative;
  width: 100%;
  height: 100svh;
  color: white;
}

.hero::after {
  --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M11.29 11.46a1 1 0 0 0 1.42 0l3-3A1 1 0 1 0 14.29 7L12 9.34L9.71 7a1 1 0 1 0-1.42 1.46Zm3 1.08L12 14.84l-2.29-2.3A1 1 0 0 0 8.29 14l3 3a1 1 0 0 0 1.42 0l3-3a1 1 0 0 0-1.42-1.42Z'/%3E%3C/svg%3E");
  position: absolute;
  bottom: 24px;
  left: calc(50% - 20px);
  transform: scale(1.8, 1);
  width: 1em;
  height: 1em;
  color: hsla(0, 0%, 100%, 0.6);
  font-size: 3rem;
  content: "";
  -webkit-mask-image: var(--svg);
  mask-image: var(--svg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero hgroup {
  display: flex;
  position: absolute;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(hsla(0, 0%, 0%, 0.9), hsla(0, 0%, 0%, 0.3));
  inset: 0;
}

h1 {
  font-size: clamp(2rem, 2rem + 2vw, 5rem);
}

hgroup em {
  margin-top: clamp(-4rem, -1rem - 2vw, -2rem);
  font-size: clamp(1.8rem, 1rem + 2vw, 2.5rem);
}

h2.max-width {
  margin: 40px auto;
  text-align: center;
  font-size: calc(40 / 16 * 1rem);
}

article > :nth-child(1) {
  position: relative;
  width: 100%;
  height: 50svh;
}

article > :nth-child(1) img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

article > :nth-child(2) {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
}

article > :nth-child(2) label {
  cursor: pointer;
  padding: 0 12px;
  color: #a3a3a3;
  font-size: calc(20 / 16 * 1rem);
}

article > :nth-child(2) label:hover {
  color: #717171;
}

article input:checked + h3 {
  color: black;
}

article > :nth-child(2) label input {
  position: absolute;
  left: -100vw;
}

article > :nth-child(2) h2 {
  display: none;
}

#polish {
  object-position: 95% 75%;
}

#paint {
  object-fit: 50% 50%;
}

#detailing {
  object-position: 20% 20%;
}

#headlamp {
  object-position: 100% 100%;
}

@media (min-width: 750px) {
  .hero {
    height: 70svh;
  }

  .hero::after {
    display: none;
  }

  article {
    display: flex;
    align-items: center;
    margin: 80px 0;
  }

  article > :nth-child(1) {
    width: 50%;
    height: max(550px, 60svh);
    clip-path: polygon(
      calc(100% - 50px) 0,
      100% calc(0% + 50px),
      100% calc(100% - 50px),
      calc(100% - 50px) 100%,
      0 100%,
      0% 60%,
      0 0
    );
  }

  article > :nth-child(2) {
    width: 50%;
    max-width: 1000px;
  }

  article > :nth-child(2) h3 {
    margin-bottom: 20px;
  }

  footer .max-width {
    flex-direction: row;
  }

  footer address {
    flex-direction: row;
    margin-left: auto;
  }

  h2.max-width {
    display: none;
  }

  article > :nth-child(2) h2 {
    display: block;
    margin-bottom: 40px;
    font-size: 3rem;
  }
}
