/* Andy Bell CSS Reset https://andy-bell.co.uk/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;
  }
}

/* ========================= Base Styles ========================= */

/* ======= CSS Variables ======= */
:root {
  --white: hsl(0, 0%, 100%);
  --very-lt-stone: hsl(30, 54%, 90%);
  --lt-stone: hsl(30, 18%, 87%);
  --md-stone: hsl(30, 10%, 34%);
  --drk-stone: hsl(0, 0%, 12%);
  --drk-grey: hsl(24, 5%, 18%);
  --brown: hsl(14, 45%, 36%);
  --drk-rose: hsl(332, 51%, 32%);
  --lt-rose: hsl(330, 100%, 98%);
}

@font-face {
  font-family: "YoungSerif";
  src: url("./assets/fonts/young-serif/YoungSerif-Regular.ttf");
}

@font-face {
  font-family: "Outfit";
  src: url("./assets/fonts/outfit/Outfit-VariableFont_wght.ttf");
}

body {
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  font-family: "Outfit", sans-serif;
  background-color: var(--lt-stone);
}

main {
  font-size: 1rem;
  color: var(--md-stone);
  background-color: var(--lt-stone);
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  max-width: 23.4375rem;
}

.section-title {
  font-size: 1.75rem;
  color: var(--brown);
  font-family: "YoungSerif", serif;
  padding-top: 0.5rem;
}

/* ======= recipe ======= */

.recipe-desc-container,
.prep-container,
.ingredient-container,
.instruction-container,
.nutrition-container {
  margin-right: 2rem;
  margin-left: 2rem;
}

.recipe-desc-container {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

.recipe-title {
  font-family: "YoungSerif", serif;
  font-size: 2.5rem;
  font-weight: normal;
  color: var(--drk-stone);
  line-height: 1;
  letter-spacing: 0px;
  padding-bottom: 1.5rem;
  padding-top: 1.5rem;
}

/* ======= prep ======= */

.prep-container {
  background-color: var(--lt-rose);
  padding: 1.5rem;
  width: calc(100% - 5rem);
  border-radius: 12px;
}

.prep-title {
  color: var(--drk-rose);
  font-family: "Outfit", sans-serif;
  font-size: 1.25rem;
}

.prep-list {
  padding: 0rem;
  padding-left: 1rem;
  margin-right: 1.5rem;
}

.prep-list li {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  padding-left: 1rem;
}

.prep-list li::marker {
  font-size: 0.75rem;
  color: var(--drk-rose);
}

/* ======= ingredient ======= */

.ingredient-container {
  padding-top: 1rem;
  padding-bottom: 1rem;
  width: calc(100% - 5rem);
}

.ingredient-list {
  padding: 0;
  margin-left: 1rem;
}

.ingredient-list li {
  padding-left: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.ingredient-list li::marker {
  color: var(--brown);
  font-size: 0.75rem;
}

/* ======= instruction ======= */

.instruction-container {
  /* margin: 1rem 2rem; */
  border-top: solid 1px var(--lt-stone);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.instruction-list {
  padding: 0;
  margin-left: 1.5rem;
}

.instruction-list li {
  padding-left: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.instruction-list li::marker {
  color: var(--brown);
  font-weight: bold;
}
/* ======= nutrition ======= */

.nutrition-container {
  border-top: solid 1px var(--lt-stone);
  padding-top: 1rem;
  padding-bottom: 2.5rem;
}

.nutrition-container p {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

table {
  width: 100%;
}

tr {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: center;
}

td {
  width: 50%;
  padding-bottom: 0.5rem;
  padding-top: 0.5rem;
}

.nutrition-info,
.nutrition-units {
  border-bottom: 1px solid var(--lt-stone);
  text-align: left;
}

.nutrition-info {
  padding-left: 1.5rem;
}

.nutrition-units {
  color: var(--brown);
  font-weight: bold;
  padding-left: 1rem;
}

/* ========== Footer ========== */

footer {
  display: flex;
  flex-flow: column wrap;
  justify-content: end;
  align-items: center;
  /* padding-top: 8rem; */
  padding-bottom: 1rem;
}

footer p {
  color: var(--drk-stone);
  font-size: 0.825rem;
}

footer a {
  text-decoration: none;
  color: var(--drk-rose);
}

/* ========================= Media Queries ========================= */

/* tablet change at 640px */
@media screen and (min-width: 40rem) {
  .container {
    max-width: 38.5rem;
    border-radius: 24px;
  }

  .recipe-image {
    max-width: 33.5rem;
    border-radius: 12px;
    padding-top: 2.5rem;
  }

  .recipe-desc-container,
  .prep-container,
  .ingredient-container,
  .instruction-container,
  .nutrition-container {
    margin-right: 2.5rem;
    margin-left: 2.5rem;
  }
}

/* desktop change at 960px */
@media screen and (min-width: 60rem) {
  .container {
    max-width: 46rem;
  }

  .recipe-image {
    max-width: 41rem;
  }
}
