@import url("https://fonts.googleapis.com/css2?family=Josefin+Slab:wght@300;500;700&display=swap");

:root {
  --clr-green: #cac6b8;
  --clr-tan: #eee8d8;
  --clr-red: #93766c;
  --clr-grey: #65635c;
  --clr-purple: #cfc5c1;

  --ff: "Josefin Slab", serif;

  --fs-150: 10px;
  --fs-200: 12px;
  --fs-250: 16px;
  --fs-300: 18px;
  --fs-400: 20px;
  --fs-450: 25px;
  --fs-500: 32px;
  --fs-600: 40px;
  --fs-800: 80px;

  --fw-300: 300;
  --fw-400: 500;
  --fw-700: 700;

  --fs-body: var(--fs-400);
  --fs-h1: var(--fs-800);
  --fs-h2: var(--fs-600);
  --fs-h3: var(--fs-500);
  --fs-button: var(--fs-300);
  --fs-nav: var(--fs-400);
  --fs-small: var(--fs-300);
}

@media screen and (max-width: 35em) {
  :root {
    --fs-body: var(--fs-250);
    --fs-h1: var(--fs-600);
    --fs-h2: var(--fs-500);
    --fs-h3: var(--fs-450);
    --fs-button: var(--fs-150);
    --fs-small: var(--fs-200);
    --fs-nav: var(--fs-450);
  }
}

/* ** */
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
* {
  margin: 0;
  padding: 0;
  font: inherit;
}

/* 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;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* Remove verticle scroll bar */

body::-webkit-scrollbar {
  display: none;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture,
svg {
  max-width: 100%;
  display: block;
}

/* 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;
  }
}
/* ** */

/* STATIC */
body {
  font-size: var(--fs-body);
  color: black;
  font-family: var(--ff);
  text-wrap: balance;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: black;
}
section {
  position: relative;
}
footer {
  padding: 10px;
}
h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-700);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}
p {
  font-size: var(--fs-body);
  line-height: 2.625rem;
}

/* UTILITY */
.green {
  background-color: var(--clr-green);
}
.tan {
  background-color: var(--clr-tan);
}
.red {
  background-color: var(--clr-red);
}
.grey {
  background-color: var(--clr-grey);
}
.purple {
  background-color: var(--clr-purple);
}
.tall {
  height: 100%;
}
.flex {
  display: flex;
  gap: var(--gap, 1rem);
}

/* STYLE */
/* nav */
.logo {
  margin: 2rem;
}
.primary-header {
  --gap: 5rem;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-nav);
}
.primary-navigation {
  list-style: none;
  & a {
    position: relative;
    &.active {
      font-weight: var(--fw-700);
    }
    &:hover::after {
      content: '';
      position: absolute;
      width: 100%;
      height: 1px;
      background-color: black;
      bottom:0;
      left: 0;
    }
  }
}
.mobile-nav-toggle {
  display: none;
}

@media (min-width: 35em) {
  .primary-header {
    background-color: var(--clr-tan);
  }
  .primary-navigation {
    padding-block: 0.4rem;
    padding-inline: clamp(3rem, 5vw, 10rem);
  }
}

@media (max-width: 35em) {
  .primary-navigation {
    --gap: 2em;

    position: fixed;

    inset: 0 0 0 25%;
    z-index: 1000;

    flex-direction: column;
    padding: min(30vh, 10rem) 3rem;

    background: hsl(44 39% 89% / 0.8);
    backdrop-filter: blur(1rem);

    transform: translateX(100%);
    &[data-visible="true"] {
      transform: translateX(0%);
    }
    transition: transform 350ms ease-out;
  }

  .mobile-nav-toggle {
    display: block;
    position: fixed;
    border: 0;
    right: 2rem;
    top: 2rem;
    z-index: 9999;
    background-color: transparent;
    &:hover {
      cursor: pointer;
    }
    &::after {
      content: "";
      position: absolute;
      top: 50%;
      right: 50%;
      height: 4rem;
      aspect-ratio: 1;
      transform: translate(50%, -60%);
      background-image: radial-gradient(
        closest-side,
        hsl(44 39% 89% / 1),
        hsl(44 39% 89% / 0.8),
        transparent
      );
      z-index: -1;
    }
  }
}

/* hero */
section#hero {
  display: grid;
  place-content: center;
  text-align: center;
  position: relative;
  isolation: isolate;

  padding: 12vw;

  background-image: url(images/hero2.0.jpg);
  background-size: cover;
  background-position-y: -25vw;

  & ::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background-color: black;
    opacity: 0.1;
  }

  & .container {
    display: flex;
    flex-direction: column;
    color: var(--clr-tan);
    -webkit-text-stroke-color: rgba(0, 0, 0, 0.3);
    -webkit-text-stroke-width: 1px;
    gap: 30px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 50px 80px;
    @media screen and (max-width: 900px) {
      padding: 30px 30px;
    }
  }
  & a {
    border-radius: 100vh;
    border: 1px solid white;
    background-color: var(--clr-grey);
    color: white;
    padding: 10px 15px;
    width: fit-content;
    margin: auto;
    letter-spacing: 0.4vw;
    &:hover {
      background-color: transparent;
    }
  }
}

/* about__me */
section#aboutMe {
  background-color: #cac6b8;
  padding: 110px 0 0 0;
  & a {
    padding: 8px 20px;
    width: fit-content;
    background-color: transparent;
    border: 1px solid black;
    &:hover {
      background-color: var(--clr-tan);
      cursor: pointer;
    }
  }
  & img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }
}
.grid {
  display: grid;
  margin: auto;
  width: fit-content;
  height: fit-content;
  grid-template-rows: 50px 1fr;
  grid-template-columns: 400px 70px 400px;
}
.item-1 {
  grid-column: 2 / -1;
  grid-row-start: 1;
}
.item-2 {
  display: flex;
  flex-direction: column;
  grid-area: 2 / 1 / -1 / 3;
  z-index: 1;
  background-color: white;
  padding: 40px 30px;
  gap: 30px;
}
@media screen and (max-width: 900px) {
  .grid {
    display: flex;
    flex-direction: column;
  }
  section#aboutMe {
    padding-right: 50px;
    padding-left: 50px;
  }
  section#aboutMe {
    & img {
      border-top-left-radius: 100vh;
      border-top-right-radius: 100vh;
      width: 100%;
      width: 230px;
      height: 290px;
      margin: auto;
    }
  }
}
/* quote */
section#quote {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 60px 3.75rem;
  & h3 {
    text-wrap: balance;
  }
}

/* testimonials */
section#testimonials {
  padding: 0 3.75rem;
  background-color: var(--clr-red);
  color: white;
  display: flex;
  & > div:first-child {
    display: flex;
    flex-direction: column;
    padding: 60px 10px;
    gap: 30px;

    & h2 {
      text-align: center;
    }
  }
  & > div:last-child {
    background-color: white;
    width: 30rem;
  }
  & .testimonial {
    display: flex;
    flex-direction: column;
    gap: 10px;

    & p {
      line-height: 30px;
    }
  }
}

@media screen and (max-width: 900px) {
  section#testimonials {
    padding: 0 1rem;
  }
}

/* contact */
section#contact {
  --gap: 30px 40px;
  display: flex;
  padding: 60px 85px;
  gap: 100px;

  & h2 {
    color: var(--clr-grey);
  }
  & .form_img {
    width: 100%;
    display: flex;
    align-items: center;
  }
  & .form_box {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 60px;
  }
  & input {
    border: none;
    border-bottom: 1px solid black;
  }
  & textarea {
    min-height: 150px;
    &::placeholder {
      font-size: 1rem;
    }
  }
  & textarea,
  input {
    &:focus {
      background-color: var(--clr-tan);
      outline: none;
    }
    width: 100%;
    border: none;
    border-bottom: 1px solid black;
  }
  & form {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    height: 100%;
    & > div {
      display: flex;
      gap: var(--gap);
    }

    & button {
      padding: 4px 20px;
      width: fit-content;
      background-color: transparent;
      border: 1px solid black;
      &:hover {
        background-color: var(--clr-tan);
        cursor: pointer;
      }
    }
  }
}
@media screen and (max-width: 900px) {
  section#contact {
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    & form {
      padding: 0;
      --gap: 10px;
      & > div {
        display: flex;
        flex-direction: column;
      }
    }
    & img {
      width: 100%;
      height: fit-content;
    }
  }
}

/* footer */
footer {
  background-color: var(--clr-green);
  display: flex;
  justify-content: space-between;
  padding: 20px;
  gap: 10px;
  & a {
    width: fit-content;
    margin: auto;
  }
  & i {
    transform: scale(1.5);
  }
  & span {
    width: 100%;
  }
  & p {
    text-align: right;
    font-size: var(--fs-small);
    width: 100%;
  }
}
@media screen and (max-width: 900px) {
  footer {
    flex-direction: column;
    & p {
      text-align: center;
    }
  }
}
