/* ### CUSTOM PROPERTIES ###  */

:root {
  /* # PRIMARY # */
  --white: hsl(0, 0%, 100%);
  --black: hsl(0, 0%, 0%);
  --grey-200: hsl(0, 0%, 85%);
  /* # TYPOGRAPHY # */
  --ff-alata: "Alata", sans-serif;
  --ff-josefin: "Josefin Sans", sans-serif;
  --fw-400: 400;
  --fw-300: 300;
}

/* ### CSS RESET ### */

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

nav ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

picture,
img,
svg {
  max-width: 100%;
  display: block;
}

button {
  border: none;
  background-color: unset;
}

/* ### UTILITY CLASSES ### */

.container {
  width: 90%;
  margin-inline: auto;
}

/* ### GENERAL STYLING ### */

body {
  font-family: var(--ff-alata);
  font-weight: var(--fw-300);
}

h1,
h2,
h3 {
  font-weight: var(--fw-300);
  line-height: 1.1;
  text-transform: uppercase;
  font-family: var(--ff-josefin);
}

button {
  cursor: pointer;
}
/* ### HERO SECTION ### */

.hero-section {
  background: url(./images/mobile/image-hero.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  padding-top: 2.4rem;
  color: var(--white);
  min-height: 650px;
  display: flex;
}

.hero-section .container {
  display: grid;
  grid-auto-rows: auto 1fr;
}

.desktop-nav {
  display: none;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .logo-container {
  width: 160px;
}

.hero__content {
  align-self: center;
}

.hero__content h1 {
  border: 2px solid var(--white);
  padding: 1.2rem 1.5rem;
  font-size: clamp(2.6rem, 1.7549rem + 3.6056vw, 5rem);
  text-wrap: balance;
  max-width: 18ch;
}

/* ### DIALOG ### */

dialog {
  /* position: fixed; */
  background-color: var(--black);
  color: var(--white);
  border: none;
  top: 0;
  width: 100%;
  height: 650px;
}

dialog > * {
  width: 90%;
  margin-inline: auto;
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2.4rem;
}

.mobile-nav {
  margin-top: 10rem;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  font-size: 1.6rem;
  text-transform: uppercase;
  font-family: var(--ff-josefin);
}

header a,
footer a {
  position: relative;
  padding-bottom: 0.5rem;
}

header a::after,
footer a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  width: 35px;
  height: 2px;
  background-color: var(--white);
}

header a:hover::after,
footer a:hover::after {
  display: block;
}

/* ### INTERACTIVE SECTION ### */

.interactive-section {
  padding-block: 6rem;
  display: grid;
  justify-items: center;
  gap: 2.5rem;
  text-align: center;
  text-wrap: balance;
}

.interactive__content h2 {
  font-size: clamp(2rem, 1.7887rem + 0.9014vw, 2.6rem);
}

.interactive__content p {
  line-height: 1.8;
  margin-top: 1rem;
  color: #818181;
  font-size: 0.985rem;
}

/* ### CREATIONS SECTION ### */

.creations-section {
  display: grid;
  grid-template-areas:
    "title"
    "earth-cell"
    "arcade-cell"
    "soccer-cell"
    "the-grid-cell"
    "above-cell"
    "borealis-cell"
    "curiosity-cell"
    "fisheye-cell"
    "link";
  gap: 2rem;
  padding-bottom: 6rem;
}

.creations__title {
  grid-area: title;
  font-size: 1.4rem;
  text-align: center;
}

.earth-cell {
  grid-area: earth-cell;
  background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
    url(./images/mobile/image-deep-earth.jpg);
}

.arcade-cell {
  grid-area: arcade-cell;
  background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
    url(./images/mobile/image-night-arcade.jpg);
}

.soccer-cell {
  grid-area: soccer-cell;
  background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
    url(./images/mobile/image-soccer-team.jpg);
}

.the-grid-cell {
  grid-area: the-grid-cell;
  background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
    url(./images/mobile/image-grid.jpg);
}

.above-cell {
  grid-area: above-cell;
  background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
    url(./images/mobile/image-from-above.jpg);
}

.borealis-cell {
  grid-area: borealis-cell;
  background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
    url(./images/mobile/image-pocket-borealis.jpg);
}

.curiosity-cell {
  grid-area: curiosity-cell;
  background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
    url(./images/mobile/image-curiosity.jpg);
}

.fisheye-cell {
  grid-area: fisheye-cell;
  background: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
    url(./images/mobile/image-fisheye.jpg);
}

.creations__link {
  grid-area: link;
  font-size: 1.2rem;
  text-align: center;
  border: 2px solid var(--black);
  padding: 0.6rem 2.8rem;
  justify-self: center;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 1rem;
}

.creations__link:hover {
  background-color: var(--black);
  color: var(--white);
  cursor: pointer;
}

.bg-cell {
  height: 120px;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--white);
  font-size: 1.235rem;
  position: relative;
  z-index: 0;
}

.bg-cell::before {
  position: absolute;
  content: "";
  display: none;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.563);
  z-index: -1;
}

.bg-cell:hover {
  cursor: pointer;
}

.bg-cell:hover::before {
  display: block;
}

.bg-cell:hover h3 {
  color: var(--black);
}

.bg-cell h3 {
  max-width: 10ch;
  text-wrap: balance;
  z-index: 3;
}

.earth-cell h3,
.the-grid-cell h3 {
  max-width: 6ch;
}

/* ### FOOTER ### */

footer {
  background-color: var(--black);
  color: var(--white);
  padding-block: 3.5rem;
}

footer ul {
  list-style: none;
}

footer .container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.ft-item .logo-container {
  margin-bottom: 1.8rem;
  width: 160px;
  margin-inline: auto;
}

.ft-item nav ul {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.socials-container {
  margin-bottom: 1rem;
}

.socials-container ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.socials-container + p {
  text-align: center;
  color: #7f7f7f;
}

.socials-container a {
  display: inline-block;
  padding-bottom: 0.8rem;
}

/* ### MEDIA QUERIES ### */

@media (min-width: 46.875em) {
  .container {
    width: 80%;
  }

  /* # HERO SECTION # */
  .hero-section {
    padding-top: 4rem;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
      url(./images/desktop/image-hero.jpg);
    background-size: cover;
    background-repeat: no-repeat;
  }

  .hero-section .logo-container {
    width: 192px;
  }

  .hero-section h1 {
    max-width: 715px;
  }

  .nav-icon {
    display: none;
  }

  .desktop-nav {
    display: block;
  }

  .desktop-nav ul {
    display: flex;
    align-items: center;
    gap: 1.8rem;
  }
}

@media (min-width: 57.5em) {
  /* # CREATIONS # */
  .creations-section {
    padding-block: 6rem;
    justify-content: space-between;
    grid-template-areas:
      "title title title link"
      "earth-cell arcade-cell soccer-cell the-grid-cell"
      "above-cell borealis-cell curiosity-cell fisheye-cell";
    grid-template-columns: repeat(4, minmax(150px, 256px));
  }

  .creations__title {
    justify-self: start;
  }

  .creations__link {
    justify-self: end;
    margin-bottom: 1.5rem;
  }

  .bg-cell {
    height: 440px;
    padding-inline: 2.5rem;
  }

  .earth-cell {
    grid-area: earth-cell;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
      url(./images/desktop/image-deep-earth.jpg);
  }

  .arcade-cell {
    grid-area: arcade-cell;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
      url(./images/desktop/image-night-arcade.jpg);
  }

  .soccer-cell {
    grid-area: soccer-cell;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
      url(./images/desktop/image-soccer-team.jpg);
  }

  .the-grid-cell {
    grid-area: the-grid-cell;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
      url(./images/desktop/image-grid.jpg);
  }

  .above-cell {
    grid-area: above-cell;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
      url(./images/desktop/image-from-above.jpg);
  }

  .borealis-cell {
    grid-area: borealis-cell;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
      url(./images/desktop/image-pocket-borealis.jpg);
  }

  .curiosity-cell {
    grid-area: curiosity-cell;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
      url(./images/desktop/image-curiosity.jpg);
  }

  .fisheye-cell {
    grid-area: fisheye-cell;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6)),
      url(./images/desktop/image-fisheye.jpg);
  }
  /* # FOOTER # */

  footer {
    margin-top: 3rem;
  }

  footer .container {
    flex-direction: row;
    justify-content: space-between;
  }

  .ft-item .logo-container {
    margin-inline: unset;
    width: 192px;
  }

  .ft-item nav ul {
    flex-direction: row;
  }

  .socials-container ul {
    justify-content: flex-end;
  }
}

@media (min-width: 70.625em) {
  /* # INTERACTIVE  */
  .interactive-section {
    position: relative;
    text-align: start;
    grid-template-columns: 2fr 1fr;
    padding-block: 8rem;
  }

  .interactive__content {
    position: absolute;
    bottom: 11px;
    left: 50%;
    padding: 5rem;
    background-color: var(--white);
    width: 620px;
  }

  .interactive__content p {
    max-width: 50ch;
    line-height: 1.4;
  }
}
