/* =================
    ROOT VARIABLES
==================*/
:root {
    --rose-50: #FFF7FB;
    --rose-800: #7A284E;
    --stone-100: #F3E5D7;
    --stone-150: #E3DDD7;
    --stone-600: #5F564D;
    --stone-900: #312E2C;
    --brown-800: #854632;
    --white: #FFFFFF;

    /* Typography */
    --font-primary: 'Young Serif', serif;
    --font-secondary: 'Outfit', sans-serif;

    /*Font Weight Young'*/
    --fw4: 400;
    --fw6: 600;
    --fw7: 700;

    /*Font line Height*/
    --lh1: 1;
    --lh15: 1.5;

    /* Spacing */
    --space-100: .5rem;
    --space-150: .75rem;
    --space-200: 1rem;
    --space-300: 1.5rem;
    --space-400: 2rem;
    --space-500: 2.5rem;
    --space-600: 3rem;
    --space-1600: 8rem;
    
    --text-preset-1-size: 2.5rem;
    --text-preset-2-size: 1.75rem;
    --text-preset-3-size: 1.25rem;
    --text-preset-4-size: 1rem;

}

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

* {
  margin: 0;
}

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

:focus-visible {
  outline: 3px solid #854632;
  outline-offset: 4px;
}

/* =========================
    BODY
==========================*/
body {
    background: var(--stone-100);
    color: var(--stone-600);
    min-height: 100dvh;
    line-height: 1.5;
}

.recipe-image {
    width: 100%;
    object-fit: cover;
    display: block;
    height: auto;
}

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

.recipe-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.recipe {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-400);
    padding: var(--space-300) var(--space-400);
}

.recipe-header h1 {
    font-family: var(--font-primary);
    color: var(--stone-900);
    font-size: clamp(2.25rem, 5vw, 2.5rem);
    font-weight: var(--fw4);
    line-height: var(--lh1);
    margin: 0;
}

.recipe-header p {
    font-family: var(--font-secondary);
    color: var(--stone-600);
    font-weight: var(--fw4);
    font-size: var(--text-preset-4-size);
    line-height: var(--lh15);
    margin: 0;
}

/*Preparation time*/
.preparation-time {
    background: var(--rose-50);
    padding: var(--space-300);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-200);
    width: 100%;
    max-width: 311px;
}

.prep-title {
    font-family: var(--font-secondary);
    font-size: var(--text-preset-3-size);
    color: var(--rose-800);
    font-weight: var(--fw6);
    line-height: var(--lh1);

}

.preparation-time ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-100);
    padding-inline-start: var(--space-300);
}

.preparation-time ul li::marker {
    color: var(--rose-800);
    width: 0.25rem;
}

.preparation-time ul li {
    font-family: var(--font-secondary);
    font-size: var(--text-preset-4-size);
    line-height: var(--lh15);
    font-weight: var(--fw4);
    padding-inline-start: var(--space-200);
}

.preparation-time ul li strong {
    font-weight: var(--fw7);
}

/*Ingredients*/
.ingredients {
    display: flex;
    flex-direction: column;
    gap: var(--space-300);
}

.ingredients-title {
    font-family: var(--font-primary);
    color: var(--brown-800);
    font-size: var(--text-preset-2-size);
    font-weight: var(--fw4);
    line-height: var(--lh1);

}

.ingredients ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-100);
    padding-inline-start: var(--space-300);
}

.ingredients ul li::marker {
    color: var(--brown-800);
    width: 0.25rem;
}

.ingredients ul li {
    font-family: var(--font-secondary);
    color: var(--stone-600);
    font-size: var(--text-preset-4-size);
    line-height: var(--lh15);
    font-weight: var(--fw4);
    padding-inline-start: var(--space-200);
}

/*Instructions*/
.instructions {
    display: flex;
    flex-direction: column;
    gap: var(--space-300);
}

.instructions-title {
    font-family: var(--font-primary);
    color: var(--brown-800);
    font-size: var(--text-preset-2-size);
    font-weight: var(--fw4);
    line-height: var(--lh1);

}

.instructions ol {
    display: flex;
    flex-direction: column;
    gap: var(--space-100);
    padding-inline-start: var(--space-300);
}

.instructions ol li::marker {
    color: var(--brown-800);
    width: var(--space-200);
    font-weight: var(--fw7);
}

.instructions ol li {
    font-family: var(--font-secondary);
    color: var(--stone-600);
    font-size: var(--text-preset-4-size);
    line-height: var(--lh15);
    font-weight: var(--fw4);
    padding-inline-start: var(--space-200);
}

/*Ingredients*/
.nutrition {
    display: flex;
    flex-direction: column;
    gap: var(--space-300);
    width: 100%;
    max-width: 311px;
}

.nutrition-title {
    font-family: var(--font-primary);
    color: var(--brown-800);
    font-size: var(--text-preset-2-size);
    font-weight: var(--fw4);
    line-height: var(--lh1);
}

.nutrition-message {
    font-family: var(--font-secondary);
    color: var(--stone-600);
    font-size: var(--text-preset-4-size);
    font-weight: var(--fw4);
    line-height: var(--lh15);
}

/* =================
   NUTRITION TABLE
================== */

.nutrition-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--stone-600);
    font-family: var(--font-secondary);
    font-size: var(--text-preset-4-size);
    font-weight: var(--fw4);
    line-height: var(--lh15);
}

.nutrition-table tbody tr {
    border-bottom: 1px solid var(--stone-100);
}

.nutrition-table tbody tr:last-child {
    border-bottom: none;
}

.nutrition-table th,
.nutrition-table td {
    text-align: left;
}

.nutrition-table th {
    font-weight: var(--fw4);
    color: var(--stone-600);
    padding: var(--space-150) var(--space-100) var(--space-150) var(--space-400);
}

.nutrition-table td {
    font-weight: var(--fw7);
    color: var(--brown-800);
    padding: var(--space-150) var(--space-400) var(--space-150) var(--space-100);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;

  overflow: hidden;
  white-space: nowrap;

  border: 0;

  clip-path: inset(100%);
}

@media (min-width: 768px) {
   body {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: var(--space-1600) var(--space-600);
   }

   .card {
        display: flex;
        flex-direction: column;
        gap: var(--space-500);
        width: 100%;
        max-width: 616px;
        border-radius: var(--space-300);
        padding: var(--space-500);
   }
   .recipe-image {
        border-radius: .75rem;
    }

   .recipe {
        padding: 0;
    }
    .preparation-time,
    .nutrition {
        max-width: 536px;
    }
}



@media (min-width: 1200px) {
    .card {
        max-width: 736px;
    }
    .preparation-time,
    .nutrition {
        max-width: 656px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

}