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

:root {
  /* =========================
     Font families
  ========================== */
  --font-young-serif: "Young Serif", serif;
  --font-outfit: "Outfit", sans-serif;

  /* =========================
     Font weights
  ========================== */
  --fw-regular: 400;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* =========================
     Line heights
  ========================== */
  --lh-100: 1;
  --lh-150: 1.5;

  /* =========================
     Letter spacing
  ========================== */
  --ls-0: 0px;

  /* =========================
     Text Preset 1
     (Young Serif Regular)
  ========================== */
  --tp-1-font: var(--font-young-serif);
  --tp-1-size: 4rem; /* 40px */
  --tp-1-weight: var(--fw-regular);
  --tp-1-line-height: var(--lh-100);
  --tp-1-letter-spacing: var(--ls-0);

  /* =========================
     Text Preset 2
     (Young Serif Regular + Outfit Bold body)
  ========================== */
  --tp-2-font: var(--font-young-serif);
  --tp-2-size: 2.8rem; /* 28px */
  --tp-2-weight: var(--fw-regular);
  --tp-2-line-height: var(--lh-100);
  --tp-2-letter-spacing: var(--ls-0);

  /* =========================
     Text Preset 3
     (Outfit SemiBold)
  ========================== */
  --tp-3-font: var(--font-outfit);
  --tp-3-size: 2rem; /* 20px */
  --tp-3-weight: var(--fw-semibold);
  --tp-3-line-height: var(--lh-100);
  --tp-3-letter-spacing: var(--ls-0);

  /* =========================
     Text Preset 4
     (Outfit Regular / Bold body text)
  ========================== */
  --tp-4-font: var(--font-outfit);
  --tp-4-size: 1.6rem; /* 16px */
  --tp-4-line-height: var(--lh-150);
  --tp-4-letter-spacing: var(--ls-0);

  --tp-4-regular-weight: var(--fw-regular);
  --tp-4-bold-weight: var(--fw-bold);

  --white: hsl(0, 0%, 100%);

  /* =========================
     Stone
  ========================== */
  --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
  ========================== */
  --rose-50: hsl(330, 100%, 98%);
  --rose-800: hsl(332, 51%, 32%);

  /* =========================
     Spacing scale
  ========================== */
  --spacing-100: 8px;
  --spacing-150: 12px;
  --spacing-200: 16px;
  --spacing-300: 24px;
  --spacing-400: 32px;
  --spacing-500: 40px;
  --spacing-600: 48px;
  --spacing-1600: 128px;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 62.5%;
}
body {
  font-size: 1.6rem;
  min-height: 100vh;
  background: var(--stone-100);
  font-family: var(--font-outfit);
}
main {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-1600) var(--spacing-600);
}
main::selection {
    background: var(--stone-100);
}
.recipe-card {
  max-width: 73.6rem;
  background: var(--white);
  padding: var(--spacing-500);
  border-radius: var(--spacing-300);
}
.recipe-card .top-image {
  max-width: 65.6rem;
  border-radius: var(--spacing-150);
  overflow: hidden;
  margin-bottom: var(--spacing-500);
}
.recipe-card .top-image img {
  width: 100%;
  height: 100%;
}
.recipe-card .content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-400);
}
/* Recipe Info */
.recipe-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-300);
}
.recipe-info h1 {
  font-family: var(--tp-1-font);
  font-size: var(--tp-1-size);
  font-weight: var(--tp-1-weight);
  line-height: var(--tp-1-line-height);
  color: var(--stone-900);
}
.recipe-info p {
  font-family: var(--tp-4-font);
  font-size: var(--tp-4-size);
  font-weight: var(--tp-4-weight);
  line-height: var(--tp-4-line-height);
  color: var(--stone-600);
}
/* Preparation Section */
.preparation-section {
  padding: var(--spacing-300);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-200);
  background: var(--rose-50);
  border-radius: var(--spacing-150);
}
.preparation-section h2 {
  font-size: var(--tp-3-size);
  font-weight: var(--tp-3-weight);
  line-height: var(--tp-3-line-height);
  color: var(--rose-800);
}
.preparation-section ul {
  font-size: var(--tp-4-size);
  font-weight: var(--tp-4-weight);
  line-height: var(--tp-4-line-height);
  color: var(--stone-600);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-100);
  padding-left: 6px;
  /* Make the disc using before */
}
.preparation-section ul li {
  margin-left: 2rem;
}
.preparation-section ul li::marker {
  color: var(--rose-800);
  margin-right: var(--spacing-200);
  font-size: 16px;
}
.preparation-section ul .time-part {
  padding-left: 16px;
}

.ingredients-section,
.instructions-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-300);
  padding-bottom: var(--spacing-400);
  border-bottom: 1px solid var(--stone-150);
}
.ingredients-section h2,
.instructions-section h2,
.nutrition-section h2 {
  font-family: var(--tp-2-font);
  font-size: var(--tp-2-size);
  font-weight: var(--tp-2-weight);
  line-height: var(--tp-2-line-height);
  color: var(--brown-800);
}
.instructions-section ul {
  list-style: none;
  padding-left: var(--spacing-100);
}
.ingredients-section ul,
.instructions-section ol {
  font-size: var(--tp-4-size);
  font-weight: var(--tp-4-weight);
  line-height: var(--tp-4-line-height);
  color: var(--stone-600);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-100);
  /* list-style-position: inside; */
}
.ingredients-section > ul > li {
  padding-left: var(--spacing-200);
  margin-left: 2.3rem;
}
.instructions-section > ol > li {
  padding-left: var(--spacing-200);
  margin-left: 2.3rem;
}
.instructions-section > ol > li::marker {
  color: var(--Brown-800);
  font-weight: bold;
}
/* Nutrition Section */
.nutrition-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-300);
  color: var(--stone-600);
}
.nutrition-section table {
  text-align: left;
  line-height: var(--tp-4-line-height);
  row-gap: var(--spacing-150);
}
tr:not(:first-child):not(:last-child) th,
tr:not(:first-child):not(:last-child) td {
  padding-block: var(--spacing-150);
}
tr:first-child th,
tr:first-child td {
  padding-bottom: var(--spacing-150);
}
tr:last-child th,
tr:last-child td {
  padding-top: var(--spacing-150);
}
th {
  padding-left: var(--spacing-400);
  padding-right: var(--spacing-200);
  font-weight: var(--tp-4-regular-weight);
}
td {
  font-size: var(--tp-4-size);
  font-weight: var(--tp-4-bold-weight);
  line-height: var(--tp-4-line-height);
  padding-right: var(--spacing-400);
  padding-left: var(--spacing-500);
}
tr:not(:last-child) th,
tr:not(:last-child) td {
  border-bottom: 1px solid var(--stone-150);
}
@media (max-width: 768px) {
  .recipe-card {
    max-width: 616px;
  }
}
@media (max-width: 575px) {
  main {
    padding: 0;
  }
  .recipe-card {
    width: 100%;
    height: 100%;
    padding: 0;
    border-radius: 0;
  }
  .recipe-card .top-image {
    margin-bottom: 0;
    border-radius: 0;
  }
  .content {
    padding: var(--spacing-500) var(--spacing-400);
  }
}
