@import url("https://fonts.googleapis.com/css2?family=Alata&family=Inter:wght@400;700;800&family=Josefin+Sans:wght@300&display=swap");

:root {
  --ff-base: "Josefin Sans", sans-serif;
  --ff-accent: "Alata", sans-serif;

  --clr-gray: hsl(0, 0%, 55%);
  --clr-dark-gray: hsl(0, 0%, 41%);

  --fs-main-title: 4rem;
  --fs-secondary-title: 2.5rem;
  --fs-card-title: 2rem;
}

@media (max-width: 767px) {
  :root {
    --fs-secondary-title: 1.5rem;
    --fs-main-title: 3rem;
  }
}

@media (max-width: 450px) {
  :root {
    --fs-main-title: 2rem;
    --fs-card-title: 1rem;
  }
}

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
  font: inherit;
  margin: 0;
  padding: 0;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  margin: 0;
}

/* A elements that don't have a class get default styles */
a {
  text-decoration-skip-ink: auto;
  text-decoration: none;
  color: inherit;
}

/* Make images easier to work with */
img,
picture,
svg {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

body {
  font-family: var(--ff-base);
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* start utilities */

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.container {
  --max-width: 1100px;
  max-width: min(var(--max-width), 100vw - 2rem);
  margin-inline: auto;
}

@media (min-width: 1365px) {
  .container {
    --max-width: 1150px;
  }
}
@media (min-width: 1440px) {
  .container {
    --max-width: 1250px;
  }
}

@media (max-width: 767px) {
  .text-center-sm {
    text-align: center;
  }

  .mx-auto-sm {
    width: fit-content;
    margin-inline: auto;
  }
}

/* start header */

.primary-header {
  padding: 3rem 0;
}

.primary-header img {
  z-index: 9999;
}

.primary-header > .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.primary-nav ul,
.footer__navigation ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  color: white;
  font-weight: bold;
}

@media (max-width: 767px) {
  .primary-header .primary-nav {
    position: fixed;
    background: #000;
    z-index: 1000;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transition: translate 250ms ease-out;
  }

  .primary-header .primary-nav ul {
    flex-direction: column;
    align-items: start;
    padding: 1rem;
    margin-top: min(20vh, 15rem);
  }

  .primary-nav[data-visible="false"] {
    translate: 100%;
  }
}

.primary-nav li,
.footer__navigation ul li {
  position: relative;
}

.primary-nav li::after,
.footer__navigation ul li::after,
footer .social-icons li::after {
  position: absolute;
  content: "";
  width: 0;
  height: 3px;
  background-color: white;
  bottom: -0.5rem;
  right: 50%;
  translate: 50%;
  transition: width 250ms ease;
  border-radius: 100vw;
}

.primary-nav li:hover::after,
.footer__navigation ul li:hover::after,
footer .social-icons li:hover::after {
  width: 50%;
}

.primary-header .nav-toggle {
  all: unset;
  background-image: url(images/icon-hamburger.svg);
  background-repeat: no-repeat;
  background-size: cover;
  width: 1rem;
  aspect-ratio: 1;
  z-index: 9999;
}

.primary-nav[data-visible="true"] + .nav-toggle {
  background-image: url(images/icon-close.svg);
}

@media (min-width: 767px) {
  .primary-header .nav-toggle {
    display: none;
  }
}

/* landing */

#landing {
  background-image: url(./images/mobile/image-hero.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 767px) {
  #landing {
    background-image: url(./images/desktop/image-hero.jpg);
  }
}

.hero {
  flex-grow: 1;
}

.hero .container {
  display: flex;
  justify-content: start;
  flex-wrap: wrap;
  align-content: center;
}

.hero .hero__title {
  color: white;
  font-size: var(--fs-main-title);
  text-transform: uppercase;
  padding: 2rem;
  border: 2px solid white;
  max-width: 15ch;
  line-height: 1;
  margin-top: 3rem;
}

/* start about */

#about {
  padding-block: 6rem;
}

.about__text {
  background-color: #fff;
  padding: 4rem 4rem 0;
}

.about__text h2 {
  font-size: var(--fs-secondary-title);
  text-transform: uppercase;
  line-height: 1.2;
  max-width: 20ch;
  margin-bottom: 2rem;
  font-weight: 500;
}

.about__text p {
  color: var(--clr-gray);
  font-family: var(--ff-accent);
  font-weight: 500;
  max-width: 53ch;
}

#about .grid-container {
  display: grid;
  align-items: end;
  grid-template-columns: 1fr calc(3rem + 5em) 1fr;
}

@media (max-width: 996px) {
  #about .grid-container {
    grid-template-columns: auto;
  }
}

#about .grid-container img {
  grid-column: 1/3;
  grid-row: 1;
}

@media (max-width: 996px) {
  #about .grid-container img {
    grid-row: auto;
    grid-column: auto;
  }
}

#about .grid-container .about__text {
  grid-column: 2/-1;
  grid-row: 1;
}

@media (max-width: 996px) {
  #about .grid-container .about__text {
    grid-row: auto;
    grid-column: auto;
  }
}

/* creations */

#creations {
  padding-block: 6rem;
}

#creations h2 {
  font-size: 3rem;
  text-transform: uppercase;
  font-weight: 500;
  grid-column: 1/ -1;
  grid-row: 1;
  justify-self: start;
}

@media (max-width: 767px) {
  #creations h2 {
    justify-self: center;
  }
}

#creations button {
  all: unset;
  border: 2px solid var(--clr-dark-gray);
  padding: 0.75rem 2.25rem;
  text-transform: uppercase;
  font-weight: bold;
  cursor: pointer;
  transition: color 250ms ease, background-color 250ms ease;
  grid-column: 1/ -1;
  grid-row: 1;
  justify-self: end;
}

@media (max-width: 767px) {
  #creations button {
    justify-self: center;
    grid-row: 10;
  }
}

#creations button:hover {
  background-color: black;
  color: white;
}

#creations .grid-container {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(
    auto-fit,
    minmax(250px, 1fr)
  );
}

.creations__card {
  display: grid;
  grid-template-areas: "pile";
  isolation: isolate;
  cursor: pointer;
}

.creations__card > * {
  grid-area: pile;
}

.creations__card picture {
  z-index: -2;
  width: 100%;
  height: 100%;
}

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

.creations__card h3 {
  align-self: end;
  padding: 2rem;
  color: white;
  font-weight: bold;
  font-size: var(--fs-card-title);
  text-transform: uppercase;
  transform: color 250ms ease;
}

.creations__card:hover h3 {
  color: black;
}

.creations__card .overlay {
  background: linear-gradient(
    transparent,
    hsl(0 0% 0% / 0.7)
  );
  z-index: -1;
  transition: background-color 250ms ease;
}

.creations__card:hover .overlay {
  background: hsl(0 0% 100% / 0.5);
  backdrop-filter: blur(0.25rem);
}

/* start footer */

footer {
  background: black;
  color: white;
  padding-block: 2rem;
}

footer .grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  row-gap: 1.5rem;
}

@media (max-width: 767px) {
  footer .grid-container {
    grid-template-columns: 1fr;
    justify-content: center;
  }
}

.footer__navigation ul {
  justify-content: start;
}

@media (max-width: 767px) {
  .footer__navigation ul {
    flex-direction: column;
  }
}

.footer__navigation ul li {
  position: relative;
}

footer .social-icons {
  display: flex;
  align-items: center;
  grid-row: 1;
  grid-column: 2;
  justify-self: end;
  gap: 1rem;
}

footer .social-icons li {
  cursor: pointer;
  position: relative;
}

footer .copyright {
  justify-self: end;
  color: var(--clr-gray);
  font-weight: 700;
}

@media (max-width: 767px) {
  footer .grid-container > * {
    grid-row: auto;
    grid-column: auto;
    justify-self: center;
  }
}
