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

:root {
  --clr-icons: #929292;
  --clr-text: #fff;
  --clr-bg-dark: #242424;
  --clr-bg-light: #3b3b3b;
  --clr-accent: #ff7600;
}

body {
  margin: 1em;
  background-color: var(--clr-bg-dark);
  color: var(--clr-text);
  line-height: 1.5;
  font-family: sans-serif;
}

img {
  max-width: 100%;
}

.btn {
  cursor: pointer;
  display: inline-block;
  border: 0;
  background: transparent;
  color: var(--clr-text);
  font-size: 1.125rem;
  padding: 0.5em;
  position: relative;
  align-self: start;
  justify-self: start;
}

.btn::after {
  content: "";
  position: absolute;
  background: var(--clr-accent);
  height: 0.85em;
  width: 75%;
  left: 0;
  top: 50%;
  z-index: -1;
  transition: transform 175ms cubic-bezier(0.91, 0, 0.55, 1.64);
  transform-origin: bottom left;
}

.btn:hover::after,
.btn:focus::after {
  transform: scale(1.35, 1.85);
}

.title {
  color: var(--clr-accent);
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
  font-size: clamp(3rem, 10vw, 12rem);
}

.location {
  color: var(--clr-icons);
  margin: 0;
  font-size: 1.5rem;
  margin-bottom: 1.5em;
}

header {
  display: flex;
  align-items: center;
  margin: 2em 0;
}

.nav {
  flex-grow: 1;
  display: flex;
  justify-content: space-around;
}

.nav__link {
  color: var(--clr-text);
  text-transform: capitalize;
  text-decoration: none;
}

.nav__link:hover,
.nav__link:focus {
  color: var(--clr-accent);
}

.secondary-images {
  display: flex;
  gap: 0.5em;
}

footer {
  margin-top: 2em;
}

.social-links {
  display: flex;
  gap: 2em;
}

.social-link:hover,
.social-link:focus {
  opacity: 0.5;
}

@media (min-width: 800px) {
  body {
    margin: 0;
  }

  .main-grid {
    display: grid;
    grid-template-columns:
      minmax(1em, 1fr)
      repeat(2, minmax(15rem, 35rem))
      minmax(5rem, 10rem)
      minmax(1em, 1fr);
    gap: 2em;
    position: relative;
  }

  header {
    grid-column: 2 / 5;
    display: grid;
    grid-template-columns: subgrid;
  }

  .nav {
    grid-column: 2 / 5;
  }

  main {
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: subgrid;
    grid-auto-rows: min-content;
    grid-auto-flow: dense;
  }

  main::after {
    content: "";
    position: absolute;
    background-color: var(--clr-bg-light);
    top: 0;
    bottom: 0;
    left: -2em;
    right: -2em;
    grid-column: 3 / 5;
    z-index: -10;
  }

  .title {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .location,
  .description {
    grid-column: 1 / 2;
  }

  .description::after {
    content: "01";
    font-size: 50vw;
    position: absolute;
    opacity: 0.03;
    z-index: -100;
    line-height: 1;
    /*     grid-column: 1 / 3; */
    left: -0.15em;
    top: 0;
  }

  .primary-image {
    grid-column: 2 / -1;
    grid-row: 1 / span 4;
    z-index: -1;
    height: 100%;
    max-height: 500px;
    width: min(100%, 1000px);
    object-fit: cover;
  }

  .secondary-images {
    grid-column: 2 / 4;
    margin-top: 4em;
  }

  footer {
    grid-column: 2 / 3;
  }
}

@media (min-width: 1200px) {
  main::after {
    grid-column: 3 / 4;
  }

  .nav,
  .secondary-images {
    grid-column: 2 / 3;
  }
}
