@font-face {
  font-family: 'YoungSerif';
  src: url('assets/fonts/YoungSerif-Regular.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Outfit';
  src: url('assets/fonts/Outfit-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

: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%);
  --border: 1px solid var(--stone-150);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  background: var(--stone-100);
  color: var(--stone-600);
  font-family: 'Outfit', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 5rem 0;
}

.recipe {
  background: var(--white);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  max-width: 768px;
  padding: 2.5rem;
  gap: 2rem;
  border-radius: 20px;
}

.recipe img {
  height: 300px;
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: clamp(1rem, 5vw, 2rem);
}

.recipe h1,
.recipe h2 {
  font-family: 'YoungSerif';
  font-weight: 400;
  font-size: 1.7rem;
  color: var(--brown-800);
  margin-bottom: 1rem;
}

.recipe h1 {
  color: var(--stone-900);
  font-size: clamp(2rem, 5vw, 2.5rem);
}

.recipe section {
  width: 100%;
}

.recipe section:not(:first-of-type, :last-of-type) {
  padding-bottom: 2rem;
  border-bottom: var(--border);
}

.recipe ul,
.recipe ol {
  margin-left: 1.5rem;
}

.recipe li {
  padding-left: 1rem;
}

.recipe li:not(:last-child) {
  margin-bottom: 1rem;
}

.recipe li::marker {
  color: var(--brown-800);
}

.recipe ul li::marker {
  font-size: 0.8rem;
}

.recipe .preparation-time {
  background: var(--rose-50);
  padding: 1.5rem;
  border-radius: 10px;
}

.recipe .preparation-time h2 {
  font-family: 'Outfit';
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--rose-800);
}

.recipe .preparation-time li::marker {
  color: var(--rose-800);
}

.recipe .instructions li::marker {
  font-weight: 700;
}

.recipe .nutrition table {
  border-collapse: collapse;
  width: 100%;
}

.recipe .nutrition caption {
  text-align: left;
  margin-bottom: 1rem;
}

.recipe .nutrition th,
.recipe .nutrition td {
  padding: 1rem;
}

.recipe .nutrition tr:not(:last-child) th,
.recipe .nutrition tr:not(:last-child) td {
  border-bottom: var(--border);
}

.recipe .nutrition th {
  font-weight: 400;
  text-align: left;
}

.recipe .nutrition td {
  font-weight: 700;
  color: var(--brown-800);
}

@media (max-width: 1024px) {
  body {
    padding: 0;
  }

  .recipe {
    max-width: 1024px;
    padding: 1.5rem;
    border-radius: 0;
  }

  .recipe img {
    height: auto;
    width: calc(100% + 3rem);
    margin-top: -1.5rem;
    margin-inline: -1.5rem;
    border-radius: 0;
  }
}