/* https://piccalil.li/blog/a-modern-css-reset */
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@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;
  }
}

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

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 128px 48px;
  background-color: var(--stone-100);
}

.container {
  max-width: 46rem;
  display: flex;
  flex-direction: column;
  background-color: var(--white);
  border-radius: 24px;
  padding: 40px;
  gap: 2.5rem;
}

.container img {
  border-radius: 12px;
}

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

.title-desc {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.title-desc h1 {
  font: 400 2.5rem var(--young-serif);
  line-height: 1;
  color: var(--stone-900);
}

.title-desc p {
  font: 400 1rem var(--outfit);
  line-height: 1.5;
  color: var(--stone-600);
}

.note {
  display: flex;
  flex-direction: column;
  background-color: var(--rose-50);
  border-radius: 12px;
  padding: 24px;
  gap: 1rem;
}

.note h2 {
  font: 600 1.25rem var(--outfit);
  line-height: 1;
  color: var(--rose-800);
}

.note ul,
.ingredients ul,
.instructions ol {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding-left: 24px;
}

.note li,
.ingredients li,
.instructions li {
  font: 400 1rem var(--outfit);
  padding-left: 16px;
  line-height: 1.5;
  color: var(--stone-600);
}

.note li::marker {
  color: var(--rose-800);
}

section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

section h2 {
  font: 400 1.75rem var(--young-serif);
  line-height: 1;
  color: var(--brown-800);
}

.ingredients li::marker,
.instructions li::marker {
  color: var(--brown-800);
  font-weight: 700;
}

.nutrition p {
  font: 400 1rem var(--outfit);
  line-height: 1.5;
  color: var(--stone-600);
}

.nutrition table {
  font-size: 1rem;
  font-family: var(--outfit);
  text-align: left;
  border-collapse: collapse;
}

.nutrition th,
.nutrition td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.nutrition .first {
  padding-top: 0;
}

.nutrition .last {
  padding-bottom: 0;
}

.nutrition th {
  font-weight: 400;
  color: var(--stone-600);
  padding-left: 32px;
}

.nutrition td {
  font-weight: 700;
  color: var(--brown-800);
  padding-right: 32px;
}

.nutrition tr:not(:last-child) {
  border-bottom: 1px solid var(--stone-150);
}

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

.attribution {
  font-size: 11px;
  text-align: center;
  margin-top: 24px;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

@media (max-width: 600px) {
  body {
    padding: 0;
    background-color: var(--white);
  }
  .container {
    padding: 0;
    border-radius: 0;
  }

  .container img {
    border-radius: 0;
  }

  .title-desc,
  .note,
  .ingredients,
  .instructions,
  .nutrition {
    margin-left: 32px;
    margin-right: 32px;
  }

  .nutrition {
    margin-bottom: 40px;
  }

  hr {
    width: 80%;
  }

  .attribution {
    margin-top: 32px;
    margin-bottom: 32px;
  }
}
