:root {
  --color-rose-800: #7a284e;
  --color-rose-50: #fff7fb;

  --color-stone-900: #312e2c;
  --color-stone-600: #5f564d;
  --color-stone-150: #e3ddd7;
  --color-stone-100: #f3e5d7;

  --color-brown-800: #854632;

  --color-white: #ffffff;

  --font-family-accent: "Young Serif";
  --font-family-main: "Outfit";
}

@font-face {
  font-family: "Young Serif";
  src: url("../assets/fonts/young-serif/YoungSerif-Regular.ttf")
    format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit/Outfit-VariableFont_wght.ttf")
    format("truetype");
  font-style: normal;
  font-display: swap;
}

body {
  background-color: var(--color-stone-100);
  font-family: var(--font-family-main), sans-serif;
  color: var(--color-stone-600);
  line-height: 1.5;
}

/* common */

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

.title {
  font-family: var(--font-family-accent), sans-serif;
  font-weight: 400;
  line-height: 1;
}

.section-title {
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  color: var(--color-brown-800);
}

.list-item {
  position: relative;
  padding-left: 2.5rem;
}

.list-item:not(:last-child) {
  margin-bottom: 0.5rem;
}

.recipe-card {
  background-color: var(--color-white);
}

.recipe-card__body {
  display: flex;
  flex-direction: column;
  row-gap: 2rem;
}

.recipe-card__title {
  margin-bottom: 1.5rem;
  font-size: 2.25rem;
  color: var(--color-stone-900);
}

.preparation__text span,
.instructions__text span {
  font-weight: 700;
}
/* preparation */

.preparation {
  padding: 1.5rem;
  background-color: var(--color-rose-50);
}

.preparation__title {
  margin-bottom: 1rem;
  color: var(--color-rose-800);
  line-height: 1;
  font-weight: 600;
}

.preparation__item::before {
  background-color: var(--color-rose-800);
}

/* ingredients */

.ingredients__item::before {
  background-color: var(--color-brown-800);
}

/* instruction */

.instructions__list {
  counter-reset: my-counter;
}

.instructions__item {
  counter-increment: my-counter;
  position: relative;
}

.instructions__item::before {
  content: counter(my-counter) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-brown-800);
  font-weight: 700;
}

/* nutrition */

.nutrition__text {
  margin-bottom: 1.5rem;
}

.nutrition__table {
  table-layout: fixed;
  width: 100%;
}

.table__item:not(:last-child) {
  border-bottom: 0.0625rem solid var(--color-stone-150);
}

th,
td {
  padding-block: 0.75rem;
}

.row-name {
  padding-left: 2rem;
  text-align: left;
  font-weight: 400;
}

.row-value {
  padding-right: 2rem;
  font-weight: 700;
}

/* mobile */

@media screen and (max-width: 47.9988rem) {
  .recipe-card {
    max-width: 38.5rem;
  }

  .recipe-card__image {
    margin-inline: auto;
    width: 100%;
    max-width: 33.5rem;
  }

  .recipe-card__body {
    padding: 2.5rem 2rem;
  }

  .recipe-card__title {
    font-size: 2.25rem;
  }
}

/* tablet */

@media screen and (min-width: 48rem) {
  .recipe-section {
    padding-block: 8rem;
  }

  .recipe-card {
    padding: 2.5rem;
    border-radius: 1.5rem;
    max-width: 38.5rem;
  }

  .img-wrapper {
    margin-bottom: 2.5rem;
    overflow: hidden;
    border-radius: 0.75rem;
  }

  .recipe-card__image {
    margin-inline: auto;
    width: 100%;
  }
}

/* desktop */

@media screen and (min-width: 90rem) {
  .recipe-card {
    max-width: 46rem;
  }
}

/* utilities */

.attribution {
  font-size: 0.875rem;
  text-align: center;
}
.attribution a {
  color: var(--color-rose-800);
}

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

.list-marker::before {
  position: absolute;
  top: 50%;
  left: 0.5rem;
  transform: translateY(-50%);
  content: "";
  display: block;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
}

.section-underline::after {
  display: block;
  margin-top: 2rem;
  content: "";
  width: 100%;
  height: 0.0625rem;
  background-color: var(--color-stone-150);
}
