/* FONTS ------------------------------ */
/* outfit-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400;
  src: url("./assets/fonts/outfit-v15-latin-regular.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* outfit-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  src: url("./assets/fonts/outfit-v15-latin-600.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* outfit-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Outfit";
  font-style: normal;
  font-weight: 700;
  src: url("./assets/fonts/outfit-v15-latin-700.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* young-serif-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  src: url("./assets/fonts/young-serif-v2-latin-regular.woff2") format("woff2"); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* VARIABLES ------------------------------ */
:root {
  /*  Colors */
  --clr-White: hsl(0, 0%, 100%);

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

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

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

  /* Fonts */
  --ff-title: "Young Serif", "Times New Roman", Times, serif;
  --ff-base: "Outfit", Arial, Helvetica, sans-serif;

  --fs-40: calc(40 / 16 * 1rem);
  --fs-36: calc(36 / 16 * 1rem);
  --fs-28: calc(28 / 16 * 1rem);
  --fs-20: calc(20 / 16 * 1rem);
  --fs-16: calc(16 / 16 * 1rem);

  --fs-h1-M: var(--fs-36);
  --fs-h1: var(--fs-40);
  --fs-h2: var(--fs-28);
  --fs-h3: var(--fs-20);
  --fs-p: var(--fs-16);

  --lh-100: 100%;
  --lh-150: 150%;

  --fw-bold: 700;
  --fw-semi-bold: 600;
  --fw-regular: 400;
}

/* RESET ------------------------------ */
/* Box sizing rules */
*,
::after,
::before {
  box-sizing: border-box;
}

* {
  margin: 0;
}

h1,
h2,
h3 {
  padding: 0;
}

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

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

hr {
  background-color: var(--clr-Stone-150);
  border: none;
  height: 1px;
  width: 100%;
}

/* BODY ------------------------------ */
body {
  background-color: var(--clr-Stone-900);
  font-family: var(--ff-base);
  font-size: var(--fs-16);
  font-weight: var(--fw-regular);
  line-height: var(--lh-150);
  color: var(--clr-Stone-600);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* MAIN ------------------------------ */
.container {
  width: min(100%, calc(1440 / 16 * 1rem));
  background-color: var(--clr-Stone-100);

  display: flex;
  justify-content: center;
  align-items: center;
}

.recipe {
  width: min(100%, calc(375 / 16 * 1rem));
  background-color: var(--clr-White);

  display: grid;
}

.recipe__text {
  padding: 2.5rem 2rem;

  display: grid;
  gap: 32px;
}

/* Titles */
.recipe__h1 {
  font-family: var(--ff-title);
  font-size: var(--fs-h1-M);
  font-weight: var(--fw-regular);
  line-height: var(--lh-100);
  color: var(--clr-Stone-900);
}
.recipe__h2 {
  font-family: var(--ff-title);
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  line-height: var(--lh-100);
  color: var(--clr-Brown-800);
}
.recipe__h3 {
  font-size: var(--fs-20);
  font-weight: var(--fw-semi-bold);
  line-height: var(--lh-100);
  color: var(--clr-Rose-800);
}

/* Recipe Detail */
.recipe__detail {
  display: grid;
  gap: 1.5rem;
}
.recipe__description {
  text-align: justify;
}

/* Recipe Preparations */
.recipe__prep {
  background-color: var(--clr-Rose-50);
  border-radius: 0.75rem;
  padding: 1.5rem;

  display: grid;
  gap: 1rem;
}
.recipe__prep--list {
  display: grid;
  gap: 0.5rem;
}
.recipe__prep--list li::before {
  content: "";
  position: absolute;
  top: calc(50% - (0.125rem));
  transform: translatex(-2em);

  width: 0.25rem;
  height: 0.25rem;
  background-color: var(--clr-Rose-800);
  border-radius: 50%;
}
.recipe__prep--list li {
  position: relative;
  margin-left: 2.5rem;
}

/* Recipe Ingredients */
.recipe__ing {
  display: grid;
  gap: 1.5rem;
}

.recipe__ing--list {
  display: grid;
  gap: 0.5rem;
}
.recipe__ing--list li::before {
  content: "";
  position: absolute;
  top: calc(50% - (0.125rem));
  transform: translatex(-2em);

  width: 0.25rem;
  height: 0.25rem;
  background-color: var(--clr-Brown-800);
  border-radius: 50%;
}
.recipe__ing--list li {
  position: relative;
  margin-left: 2.5rem;
}

/* Recipe Instructions */
.recipe__ins {
  display: grid;
  gap: 1.5rem;
}
.recipe__ins--list {
  counter-reset: number;
  display: grid;
  gap: 0.5rem;
}
.recipe__ins--list li::before {
  content: counter(number) ".";
  position: absolute;
  font-weight: var(--fw-bold);
  color: var(--clr-Brown-800);
  transform: translatex(-2em);
}
.recipe__ins--list li {
  position: relative;
  counter-increment: number;
  margin-left: 2.5rem;
}

/* Recipe Nutrition */
.recipe__nut {
  display: grid;
  gap: 1.5rem;
}

/* Table */
.recipe__nut--table {
  width: 100%;
  border-collapse: collapse;
}

/* Rows */
.recipe__nut--table tr.line {
  padding: 0;
  position: relative;
  height: 1.5rem;
}

.recipe__nut--table tr.line::after {
  content: "";
  position: absolute;
  width: 100%;
  border-bottom: 1px solid var(--clr-Stone-150);
  left: 0;
  transform: translateY(0.75rem);
}

/* Cells */
.recipe__nut--table td {
  padding: 0;
}
.recipe__nut--table td:first-child {
  width: 50%;
  padding-left: 2rem;
}
.recipe__nut--table td:last-child {
  padding-left: 0.5rem;
  font-weight: var(--fw-bold);
  color: var(--clr-Brown-800);
}

/* MEDIA ------------------------------ */
/* Tablette */
@media (min-width: 768px) {
  .recipe {
    gap: 2.5rem;
    width: min(100%, calc(616 / 16 * 1rem));
    margin-block: 128px;
    padding: 40px;
    border-radius: 24px;
  }

  .recipe__img > img {
    border-radius: 12px;
  }

  .recipe__text {
    padding: 0;
  }

  .recipe__h1 {
    font-size: var(--fs-h1);
  }
}

/* Desktop */
@media (min-width: 1440px) {
  .recipe {
    width: min(100%, calc(736 / 16 * 1rem));
  }
}
