/********************************/
/* Custom properties */
/********************************/

:root {
  /* Colors */
  --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-50: hsl(330, 100%, 98%);
  --rose-800: hsl(332, 51%, 32%);

  /* Spacing */
  --s-8: 0.5rem; /* 100 */
  --s-12: 0.75rem; /* 150 */
  --s-16: 1rem; /* 200 */
  --s-24: 1.5rem; /* 300 */
  --s-32: 2rem; /* 400 */
  --s-40: 2.5rem; /* 500 */
  --s-48: 3rem; /* 600 */
  --s-128: 8rem; /* 1600 */

  /* Fonts */
  --w-1: 400;
  --w-2: 600;
  --w-3: 700;
}

/********************************/
/* General */
/********************************/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 1.5;
  font-family: "Outfit", serif;
  font-weight: var(--w-1);
  font-size: 1rem;
  text-align: left;
}

h1,
h2,
caption {
  margin-bottom: var(--s-24);
}

/********************************/
/* Utilities */
/********************************/

/* Text Presets */
/********************************/

.txt-p--1,
.txt-p--2 {
  font-family: "Young Serif", serif;
  line-height: 1;
}

.txt-p--1 {
  font-size: 2.25rem;
  color: var(--stone-900);
}

.txt-p--2 {
  font-size: 1.75rem;
  color: var(--brown-800);
}

.txt-p--3 {
  font-weight: var(--w-2);
  font-size: 1.25rem;
  color: var(--rose-800);
  line-height: 1;
}

.txt-p--4 {
  color: var(--stone-600);
}

.txt-p--4b {
  font-weight: var(--w-3);
  color: var(--stone-600);
}

/* Colors */
/********************************/

.color--brown {
  color: var(--brown-800);
}

.color--hr {
  border-top: 1px solid var(--stone-150); /* Ruler's color */

  /* Mozilla */
  color: var(--stone-150);
}

.bg-primary {
  background-color: var(--stone-100);
}

.bg-secondary {
  background-color: white;
}

.bg-detail {
  background-color: var(--rose-50);
}

/* Spacing */
/********************************/

.stack > * + * {
  margin-bottom: var(--s-32);
}

.stack > :nth-child(8) {
  margin-bottom: 0;
}

.stack--sm > *:not(:last-child) {
  margin-bottom: 0.5rem;
}

.mg-btm--16 {
  margin-bottom: var(--s-16);
}

.pd-l--24 {
  padding-left: var(--s-24);
}

.pd-l--16 > * {
  padding-left: var(--s-16);
}

.pd--24 {
  padding: var(--s-24);
}

.pd-t--none {
  padding-top: 0 !important;
}

.pd-b--none {
  padding-bottom: 0 !important;
}

.br--none {
  border: none;
}

/********************************/
/* Elements */
/********************************/

.container {
  border-radius: 24px;
  margin: 0 auto;
}

.image {
  width: 100%;
}

.content {
  padding: var(--s-40) var(--s-32);
}

.prep {
  border-radius: 12px;
}

/* List styling */
/********************************/

/* Might not work on Safari */
ul li::marker {
  color: var(--brown-800);
}

ol li::marker {
  color: var(--brown-800);
  font-weight: var(--w-3);
}

/* Table styling */
/********************************/

.table {
  width: 100%;
  border-collapse: collapse;
}

tr {
  border-bottom: 1px solid var(--stone-150);
}

/* Had to set padding on <td>s because of border-collapse, which breaks <tr>'s padding */

td:nth-of-type(2n + 1) {
  padding: var(--s-12) var(--s-8) calc(var(--s-12) - 1px) var(--s-32);
}

td:nth-of-type(2n) {
  padding: var(--s-12) var(--s-32) calc(var(--s-12) - 1px) var(--s-8);
}

/********************************/
/* Media queries */
/********************************/

/* Above 704px */
@media (min-width: 44rem) {
  body {
    padding: var(--s-128) var(--s-48);
  }

  .image {
    margin-bottom: var(--s-40);
    border-radius: 12px;
    height: 18.75rem;
    object-fit: cover;
  }

  .content {
    padding: 0;
  }

  .container {
    padding: var(--s-40);
    width: clamp(38.5rem, 80.2%, 46rem);
  }

  .txt-p--1 {
    font-size: 2.5rem;
  }
}
