:root {
    /* Colors */
    --colors-white: hsl(0, 0%, 100%);
    --colors-stone-100: hsl(30, 54%, 90%);
    --colors-stone-150: hsl(30, 18%, 87%);
    --colors-stone-600: hsl(30, 10%, 34%);
    --colors-stone-900: hsl(24, 5%, 18%);
    --colors-brown-800: hsl(14, 45%, 36%);
    --colors-rose-800: hsl(332, 51%, 32%);
    --colors-rose-50: hsl(330, 100%, 98%);
    
    /* Typography */
    --font-family-content:'Outfit', sans-serif;
    --font-family-title:'Young Serif', sans-serif;
}

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

@font-face {
    font-family: 'Young Serif';
    src: url(assets/fonts/young-serif/YoungSerif-Regular.ttf) format('truetype');
    font-weight: 400;
}
/* Reset*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    font-family: var(--font-family-content);
    font-size: 1rem;
    color: var(--colors-stone-600);
    background-color: var(--colors-stone-100);
    min-height: 100vh;
    padding: 7.6875rem;

}

.section-devider{
    border: 0;
    height: 1px;
    background-color: var(--colors-stone-150);
    width: 100%;
}


/* header styles */
.recipe__card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: var(--colors-white);
    width: clamp(23.4375rem, 90vw, 46rem);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: 1.5rem;
}

.recipe__header {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.recipe__image {
    width: 100%;
    height: auto;
    max-height: 18.75rem;
    border-radius: 1rem;
    object-fit: cover;
    display: block;

}

.recipe__title {
    font-family: var(--font-family-title);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--colors-stone-900);
}

/* Section prep-time styles */
.prep-time {
    display: flex;
    flex-direction: column;
    background-color: var(--colors-rose-50);
    border-radius: 1rem;
    padding: 1.5rem;
    gap: 1rem;
}

.prep-time__title {
    font-size: 1.25rem;
    font-weight: 600;
}

.prep-time__label {
    font-weight: 700;
    color: var(--colors-rose-800);
}

.prep-time__list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding-left: 1.5rem ;
    list-style-type: none;
    padding-left: 0;
}

.prep-time__item {
    position: relative;
    padding-left: 2.5rem;
}

.prep-time__item::before {
    content: "•";
    position: absolute;
    left: .25rem;
    color: inherit;
    font-size: 1rem;
    font-weight: 700;

}

/* Section ingredients styles */
.ingredients {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.ingredients__title {
    font-family: var(--font-family-title);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--colors-brown-800);
}

.ingredients__list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    list-style-type: none;
    padding-left: 0;
}

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

.ingredients__item::before {
    content: "•";
    position: absolute;
    left: .25rem;
    color: inherit;
    font-size: 1rem;
    font-weight: 700;
}

/* Section instructions styles */
.instructions {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.instructions__title {
    font-family: var(--font-family-title);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--colors-brown-800);
}

.instructions__list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding-left: 2.5rem;
    line-height: 150%;
    /* counter */
    counter-reset: instructions-counter;
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.instructions__item {
    /* counter */
    counter-increment: instructions-counter;
    position: relative;
    padding-left: 2.5rem;
}

.instructions__item::before {
    content: counter(instructions-counter) "."; 
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    font-size: 1rem;
    color: var(--colors-stone-600);
    text-align: right;
}

.instructions__step {
    font-weight: 700;
}

/* Section nutrition styles */
.nutrition {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.nutrition__title {
    font-family: var(--font-family-title);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--colors-brown-800);
}

.nutrition__table {
    width: 100%;
    border-collapse: collapse;
    padding: 0;
}

.nutrition__row {
    border-bottom: .0625rem solid var(--colors-stone-150);
}

.nutrition__row:last-child {
    border-bottom: none;
}
.nutrition__label,
.nutrition__value {
    width: 50%;
    text-align: left;
    padding: 1rem 0;
    padding-left: 2.5rem;
}

.nutrition__label {
    font-weight: 400;
}

.nutrition__value {
    font-weight: 700;
    color: var(--colors-brown-800);
}

/* footer styles */
.attribution {
    font-size: .625rem;
    text-align: center;
}
.attribution__link {
    color: var(--colors-stone-900);
}

/* Media query */
@media (max-width: 375px) {
  body {
    padding: 0;
    gap: 1rem;
  }

  .recipe__card {
    padding: 0;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .recipe__title {
    font-size: 2.25rem ;
  }

  .recipe__image {
    border-radius: 0;
  }

  .recipe__title, 
  .recipe__description,
  .prep-time,
  .ingredients,
  .instructions,
  .nutrition {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
