@import url("https://fonts.googleapis.com/css2?family=Young+Serif&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap");

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

:root {
  --white: hsl(0, 0%, 100%);
  --Stone-100: hsl(30, 54%, 90%);
  --Stone-150: hsl(30, 18%, 87%);
  --Stone-600: hsl(30, 10%, 34%);
  --Stone-900: hsl(24, 5%, 18%);

  --Brown-800: hsl(14, 45%, 36%);

  --Rose-800: hsl(332, 51%, 32%);
  --Rose-50: hsl(330, 100%, 98%);

  --size-100: 0.3rem;
  --size-150: 0.4rem;
  --size-200: 0.5rem;
  --size-300: 0.8rem;
  --size-350: 0.9rem;
  --size-400: 1rem;
  --size-500: 1.2rem;
  --size-600: 1.4rem;
  --size-650: 1.5rem;
  --size-700: 1.6rem;
  --size-800: 1.8rem;
  --size-900: 2rem;
  --size-1000: 2.5rem;
  --size-1100: 3rem;
  --size-1200: 6rem;
  --size-1300: 7rem;
  --size-1400: 9rem;

  --font-young: "Young serif", sans-serif;
  --font-outfit: "Outfit", sans-serif;
}

body {
  font-family: var(--font-outfit);
  background-color: var(--Stone-100);
  display: flex;
  justify-content: center;
  align-content: center;
  min-height: 100vh;
}

.container {
  background-color: var(--white);
  max-width: 737px;
  padding: var(--size-1000) var(--size-1000) 0.9rem;
  margin: var(--size-1300) 0 var(--size-1300);
  border-radius: var(--size-300);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-img img {
  width: 100%;
  border-radius: var(--size-300);
}

/* Recipe Info section*/

.recipe-info h1 {
  margin-top: var(--size-900);
  margin-bottom: var(--size-400);
  font-size: var(--size-1000);
  font-family: var(--font-young);
  font-weight: 400;
  color: var(--Stone-900);
}

.recipe-info p {
  color: var(--Stone-600);
  margin-bottom: var(--size-900);
}

/* Preparation section */
.preparation {
  background-color: var(--Rose-50);
  border-radius: var(--size-300);
  font-family: "Outfit", sans-serif;
  padding: 1.8rem;
}

.preparation p {
  font-size: var(--size-500);
  font-weight: bold;
  margin-bottom: var(--size-300);
  color: var(--Rose-800);
}

.preparation ul {
  list-style: none;
  padding-left: var(--size-200);
}

.preparation li {
  margin-bottom: var(--size-200);
  color: var(--Stone-600);
}

.preparation li::before {
  content: "•";
  font-size: var(--size-500);
  padding-right: var(--size-650);
  color: var(--Rose-800);
}

/* Ingredients section */
.ingredients {
  border-radius: var(--size-300);
  padding: var(--size-800) 0 var(--size-800) 0;
  border-bottom: 1px solid var(--Stone-150);
}

.ingredients p {
  font-size: var(--size-800);
  font-family: var(--font-young);
  font-weight: 500;
  margin-bottom: var(--size-300);
  color: var(--Brown-800);
}

.ingredients ul {
  list-style: none;
  padding-left: var(--size-200);
}

.ingredients li {
  margin-bottom: var(--size-150);
  color: var(--Stone-600);
}

.ingredients li::before {
  content: "•";
  font-size: var(--size-500);
  padding-right: var(--size-650);
  color: var(--Rose-800);
}

/*Instructions section */

.instructions {
  padding: var(--size-700) 0 var(--size-700) 0;
  border-bottom: 1px solid var(--Stone-150);
}

.instructions p {
  font-size: var(--size-800);
  font-family: var(--font-young);
  font-weight: 500;
  margin-bottom: var(--size-300);
  color: var(--Brown-800);
}

.instructions ol {
  list-style: none;
  padding-left: var(--size-500);
}

.instructions ol li {
  counter-increment: number;
  margin-bottom: var(--size-350);
  padding-left: var(--size-500);
  color: var(--Stone-600);
}

.instructions ol li::marker {
  content: counter(number) ".";
  color: var(--Brown-800);
  font-weight: 700;
}

/* Nutrition section */

.nutrition {
  padding: var(--size-700) 0 var(--size-700) 0;
}

.nutrition p:nth-child(1) {
  font-size: var(--size-800);
  font-family: var(--font-young);
  font-weight: 500;
  margin-bottom: var(--size-300);
  color: var(--Brown-800);
}

.nutrition p:nth-child(2) {
  color: var(--Stone-600);
  margin-bottom: var(--size-300);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.nutrition th {
  border-bottom: 1px solid var(--Stone-150);
  color: var(--Stone-600);
  font-weight: 400;
  padding-left: var(--size-500);
}

.nutrition td {
  width: 100%;
  padding: var(--size-300);
  text-align: center;
  border-bottom: 1px solid var(--Stone-150);
  color: var(--Brown-800);
  font-weight: 700;
}

tr:last-child td {
  border-bottom: none;
}

tr:last-child th {
  border-bottom: none;
}

/* Media Queries */
@media (max-width: 768px) {
  .container {
    padding: var(--size-1000) var(--size-500) 0.9rem;
    margin: var(--size-1000) var(--size-200) var(--size-1300);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--size-500);
    margin: 0 0;
    border-radius: 0;
  }

  .hero-img img {
    border-radius: 0;
    position: absolute;
    left: 0;
    right: 0;
  }

  .recipe-info {
    margin-top: 11rem;
  }
}
