/* ==========================================================================
   Legal pages (privacy policy, terms of use…): hero photo and document text.
   Shared parts (hero, button) live in components.css.
   Breakpoints: mobile < 768 ≤ tablet < 1280 ≤ desktop (design: 320 and 1920).
   ========================================================================== */

/* Document section
   ========================================================================== */

.legal {
  padding-block: 35px 32px;
  background: #f8f8f8;
}

/* Document text
   ========================================================================== */

.prose {
  color: #57595f;
  font-size: 14px;
  line-height: 17px;
  /* Figma sets small text a bit tighter than browsers: keeps the design's line breaks */
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 10px;
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--color-text);
}

/* document title */
.prose h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 29px;
}

.prose__date {
  color: #000000;
}

.prose h2 + .prose__date {
  margin-top: 12px;
}

.prose__date + * {
  margin-top: 24px;
}

/* numbered sections */
.prose h3 {
  margin-top: 25px;
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
}

.prose h3 + * {
  margin-top: 11px;
}

/* sub-sections: a), b), c) */
.prose h4 {
  font-size: 16px;
  font-weight: 500;
  line-height: 19px;
}

.prose h4 + * {
  margin-top: 9px;
}

.prose ul {
  margin-bottom: 0;
  padding-inline-start: 21px;
  list-style: none;
}

.prose li {
  position: relative;
}

.prose li + li {
  margin-top: 10px;
}

.prose li::before {
  content: "";
  position: absolute;
  top: 7px;
  inset-inline-start: -13px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.prose strong {
  color: #000000;
  font-weight: 600;
}

.prose a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--color-accent-strong);
}

/* Tablet and desktop
   ========================================================================== */

@media (min-width: 768px) {
  .hero--privacy .hero__text {
    max-width: 560px;
  }

  .legal {
    padding-block: 106px 100px;
  }

  .prose {
    font-size: 16px;
    line-height: 19px;
    letter-spacing: 0;
  }

  .prose > * + * {
    margin-top: 14px;
  }

  .prose h2 {
    font-size: 32px;
    line-height: 38px;
  }

  .prose__date {
    font-size: 18px;
    font-weight: 500;
    line-height: 22px;
  }

  .prose h2 + .prose__date {
    margin-top: 16px;
  }

  .prose__date + * {
    margin-top: 19px;
  }

  .prose h3 {
    margin-top: 40px;
    font-size: 24px;
    line-height: 29px;
  }

  .prose h3 + * {
    margin-top: 20px;
  }

  .prose h4 {
    font-size: 18px;
    line-height: 22px;
  }

  .prose h4 + * {
    margin-top: 14px;
  }

  .prose ul {
    padding-inline-start: 25px;
  }

  .prose li + li {
    margin-top: 8px;
  }

  .prose li::before {
    top: 8px;
    inset-inline-start: -16px;
    width: 5px;
    height: 5px;
  }
}

/* Hero photo
   ========================================================================== */

@media (min-width: 1024px) {
  .hero--legal::before {
    background-image: url("../img/intro-privacy-policy-bg_x1.webp");
    background-image: image-set(url("../img/intro-privacy-policy-bg_x1.webp") 1x, url("../img/intro-privacy-policy-bg_x2.webp") 2x);
  }

  .hero--cookie::before {
    background-image: url("../img/intro-cookie-bg_x1.webp");
    background-image: image-set(url("../img/intro-cookie-bg_x1.webp") 1x, url("../img/intro-cookie-bg_x2.webp") 2x);
  }
}

/* Terms of Use and Cookie Policy: their designs differ from the privacy
   policy in a few spacings
   ========================================================================== */

@media (max-width: 767px) {
  .hero--terms .hero__text,
  .hero--cookie .hero__text {
    line-height: 22px;
  }

  .hero--cookie .hero__break {
    display: none;
  }

  .prose--terms .prose__date + *,
  .prose--cookie .prose__date + * {
    margin-top: 13px;
  }
}

@media (min-width: 768px) {
  .prose--terms p + ul,
  .prose--cookie p + ul,
  .prose--cookie ul + p,
  .prose--cookie p + h4 {
    margin-top: 20px;
  }

  .prose--cookie .prose__date + * {
    margin-top: 21px;
  }

  .prose--cookie h3 {
    margin-top: 39px;
  }

  .prose--cookie h3 + * {
    margin-top: 21px;
  }

  .legal--cookie {
    padding-bottom: 125px;
  }

  .legal--terms {
    padding-bottom: 140px;
  }
}
