:root {
    --color-white: hsl(0, 0%, 100%);
    --color-stone-100: hsl(30, 54%, 90%);
    --color-stone-150: hsl(30, 18%, 87%);
    --color-stone-600: hsl(30, 10%, 34%);
    --color-stone-900: hsl(24, 5%, 18%);
    --color-brown-800: hsl(14, 45%, 36%);
    --color-rose-800: hsl(332, 51%, 32%);
    --color-rose-50: hsl(330, 100%, 98%);

    --spacing-100: 0.8rem;
    --spacing-150: 1.2rem;
    --spacing-200: 1.6rem;
    --spacing-300: 2.4rem;
    --spacing-400: 3.2rem;
    --spacing-500: 4rem;
    --spacing-600: 4.8rem;
    --spacing-1600: 12.8rem;

    --font-family-body: "Outfit", sans-serif;
    --font-family-heading: "Young Serif", serif;

    --font-size-desktop-text-preset-1: 4rem;
    --font-size-desktop-text-preset-2: 2.8rem;
    --font-size-desktop-text-preset-3: 2rem;
    --font-size-desktop-text-preset-4: 1.6rem;

    --font-size-mobile-text-preset-1: 3.6rem;

    /* Use responsive font sizing for main h1 */
    /* 3.6rem, viewport: 375px -> 4rem, viewport: 1440px */
    --font-size-h1: clamp(3.6rem, 3.459rem + 0.376vw, 4rem);
}

html {
    font-size: 62.5%;
}

body {
    font-size: var(--font-size-desktop-text-preset-4);
    font-family: var(--font-family-body);
    font-weight: 400;
    color: var(--color-stone-600);
    background-color: var(--color-stone-100);
    line-height: 1.5;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 400;
    margin: 0;
    line-height: 1;
}

h1 {
    color: var(--color-stone-900);  
    margin-bottom: var(--spacing-300);
    font-size: var(--font-size-h1);
}

h2 {
    color: var(--color-brown-800);
    font-size: var(--font-size-desktop-text-preset-2);
    margin-bottom: var(--spacing-300);
}

p {
    margin: 0;
}

strong {
    font-weight: 700;
}

.container {
    display: flex;
    justify-content: center;
    padding: var(--spacing-1600) var(--spacing-600);
}

.card {
    max-width: 736px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-500);
    border-radius: var(--spacing-300);
    background-color: var(--color-white);
}

.card header {
    padding: var(--spacing-500) var(--spacing-500) 0;
}

.card header img {
    width: 100%;
}

.card .text-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-400);
}

.card .text-content {
    padding: 0 var(--spacing-500) var(--spacing-500); 
}

aside {
    background-color: var(--color-rose-50);
    padding: var(--spacing-300);
}

aside h2 {
    font-family: Outfit;
    color: var(--color-rose-800);
    font-family: var(--font-family-body);
    font-size: var(--font-size-desktop-text-preset-3);
    font-weight: 600;
    margin-bottom: var(--spacing-200);
}

ul, ol {
    padding: 0;
    margin: 0;
    list-style-position: inside;
}

li {
    margin-bottom: var(--spacing-100);
}

.section-separator {
    border-bottom: 1px solid var(--color-stone-150);
}

/* General table styling */

table {
    margin-top: var(--spacing-150);
    width: 100%;
    border-collapse: collapse;
}

td {
    padding-top: var(--spacing-150);
    padding-bottom: var(--spacing-150);
    border-bottom: 1px solid var(--color-stone-150);
}

td:first-of-type {
    padding-left: var(--spacing-400);
}

td:last-of-type {
    padding-right: var(--spacing-400);
    color: var(--color-brown-800);
}

/* Nutrition table specific styling */

table.nutrition td:last-of-type {
    font-weight: 700;
}

/* Mobile layout */

@media (max-width: 375px) {

    .container {
        padding: 0;
    }

    .card header {
        padding: 0;
    }

    .card {
        border-radius: 0;
    }
}
