@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&family=Young+Serif&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Young+Serif&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --ff-primary: "Outfit", sans-serif;
  --ff-secondary: "Young Serif", serif;

  --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: hsl(14, 45%, 36%);

  --color-rose-800: hsl(332, 51%, 32%);
  --color-rose-50: hsl(330, 100%, 98%);

  --color-white: hsl(0, 0%, 100%);

  --fs-8: 0.5rem;
  --fs-10: 0.675rem;
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-22: 1.375rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-32: 2rem;
  --fs-36: 2.25rem;
  --fs-40: 2.5rem;

  --fw-thin: 100;
  --fw-extralight: 200;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
  --fw-dark: 900;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--color-stone-100);
  min-height: 100vh;
  padding: 10rem;
  line-height: 1.5;
}

.main-container {
  width: 730px;
  border-radius: 1.5rem;
  padding: 2.5rem;
  background-color: var(--color-white);
}

img {
  width: 100%;
  border-radius: 1rem;
  margin-bottom: 2rem;
}

.content-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

h3 {
  color: var(--color-brown);
  font-size: var(--fs-28);
  font-family: var(--ff-secondary);
  font-weight: var(--fw-medium);
}
p,
span,
li {
  font-family: var(--ff-primary);
  font-size: var(--fs-16);
  color: var(--color-stone-600);
}

ul,
li {
  padding-left: 1rem;
}
span {
  font-weight: var(--fw-bold);
}

.recipe h1 {
  font-family: var(--ff-secondary);
  font-weight: var(--fw-medium);
  font-size: var(--fs-40);
  color: var(--color-stone-900);
  margin-bottom: 1rem;
}

.preparation {
  background-color: var(--color-rose-50);
  border-radius: 1rem;
  padding: 1.5rem;
  line-height: 2;
}

.preparation h3 {
  font-family: var(--ff-primary);
  font-size: var(--fs-20);
  font-weight: var(--fw-bold);
}
.preparation ul li {
  padding-left: 1.5rem;
  list-style-type: disc;
}
.preparation ul li::marker {
  color: var(--color-brown);
  font-size: var(--fs-12);
}
.ingredients {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ingredients ul li {
  list-style-type: square;
  line-height: 2;
}
.ingredients ul li::marker {
  color: var(--color-brown);
  font-size: var(--fs-12);
}
hr {
  height: 1px;
  border: none;
  background-color: var(--color-stone-150);
}
.instructions ol {
  padding-left: 1.5rem;
}
.instructions ol li {
  padding-top: 0.5rem;
  line-height: 1.5;
}
.instructions ol li::marker {
  color: var(--color-brown);
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
}
.nutrition {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

table {
  font-family: var(--ff-primary);
  color: var(--color-stone-600);
  border-collapse: collapse;
}
tr {
  border-width: 1px;
  border-style: solid;
  border-left: 0px;
  border-right: 0px;
  border-top: 0px;
  border-color: var(--color-stone-150);
}

tr:last-child {
  border-bottom: 0px;
}
td {
  padding: 0.5rem 0;
}

.nutrition_type {
  padding-left: 2rem;
  width: 50%;
}
.nutrition_value {
  padding-left: 1rem;
  font-weight: var(--fw-bold);
  color: var(--color-brown);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0); /* Support for older browsers */
  clip-path: inset(50%); /* Modern approach */
  white-space: nowrap; /* Prevents unwanted text wrapping */
  border: 0;
}

@media screen and (max-width: 375px) {
  body {
    display: flex;
    flex-direction: column;
    background-color: var(--color-stone-100);
    width: 375px;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    line-height: 1.5;
  }

  .main-container {
    max-width: 100%;
    background-color: var(--color-white);
    border-radius: 0;
    padding: 0;
  }
  img {
    width: 100%;
    border-radius: 0;
    object-fit: contain;
  }

  .content-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 0 2rem 2rem 2rem;
    gap: 2rem;
  }

  .recipe h1 {
    font-size: var(--fs-36);
    line-height: 1;
    margin-bottom: 1.5rem;
  }
  p {
    font-weight: var(--fw-light);
  }
}

@media (max-width: 768px) {
  .main-container {
    width: 618px;
  }
  td {
    padding: 0.75rem 0;
  }
}
