/* ==========================================================================
   Legal page template (privacy policy, cookie policy, website terms, …)
   Figma v4: "Legal page template – Desktop 1680" (145:2083) · "– Desktop 1440" (433:3517) · "– Mobile 390" (149:3384)
   ========================================================================== */

/* The legal frames have no floating CTA and no fries cut-out over the footer */
.page-legal .floating-cta,
.page-legal .site-footer .cutout--fries { display: none; }

/* 1. Page header: 560 tall; v4 uses the closing-CTA photo (#180D10 under the image) */
.page-legal .page-hero--short {
  min-height: 560px;
  padding-top: 223px;
}

/* 2. Legal body: sticky "On this page" + 760 content column */
.legal {
  display: flex; justify-content: center; align-items: flex-start; gap: 120px;
  padding-top: 120px; padding-bottom: 160px;
  background: var(--cream);
}
.legal-toc {
  position: sticky;
  top: calc(var(--header-top) + var(--header-h) + 24px);
  flex: 0 0 320px; min-width: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.legal-toc__title { color: var(--red-text); font-size: 13px; font-weight: 700; line-height: 1.2; letter-spacing: .12em; text-transform: uppercase; }
.legal-toc__list { display: grid; gap: 14px; }
.legal-toc__list a {
  display: inline-block;
  font-size: 16px; line-height: 1.55; letter-spacing: -0.001em;
  color: var(--muted);
  transition: color .15s ease;
}
.legal-toc__list a:hover { color: var(--char); }

.legal-content { flex: 0 1 760px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.legal-section {
  display: flex; flex-direction: column; gap: 16px;
  padding-bottom: 32px;
  scroll-margin-top: calc(var(--header-top) + var(--header-h) + 24px);
}
.legal-section h2 { font-size: 32px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; color: var(--char); }
.legal-section p { font-size: 16px; line-height: 1.55; letter-spacing: -0.001em; color: var(--muted); }

/* Tablet */
@media (max-width: 1199px) {
  .legal { gap: 56px; }
  .legal-toc { flex-basis: 240px; }
}
/* Narrow tablet: "On this page" becomes a card above the text (as on mobile) */
@media (max-width: 991px) {
  .legal { flex-direction: column; align-items: stretch; gap: 32px; }
  .legal-toc { position: static; flex: none; padding: 24px; border-radius: var(--radius-card); background: var(--white); }
  .legal-content { flex: none; max-width: 760px; }
}

/* Mobile (390 reference) */
@media (max-width: 767px) {
  .page-legal .page-hero--short {
    min-height: 0;
    padding-top: 120px; padding-bottom: 64px;
  }

  .legal { gap: 12px; padding: 48px 20px 72px; }
  .legal-toc { gap: 10px; padding: 20px; border-radius: 8px; }
  .legal-toc__list { gap: 10px; }
  .legal-content { gap: 12px; }
  .legal-section { gap: 10px; padding: 24px 0 0; }
  .legal-section h2 { font-size: 22px; line-height: 1.25; letter-spacing: -0.005em; }
}

/* ---------- WordPress: the policy text is block-editor output (page content) ----------
   Each h2 starts a .legal-section (templates/legal.php); other blocks inside a section follow its 16px rhythm. */
.legal-section h3 { font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -0.005em; color: var(--char); }
.legal-section ul,
.legal-section ol { display: grid; gap: 8px; padding-left: 1.4em; font-size: 16px; line-height: 1.55; letter-spacing: -0.001em; color: var(--muted); }
.legal-section ul { list-style: disc; }
.legal-section ol { list-style: decimal; }
.legal-section a { color: var(--char); text-decoration: underline; text-underline-offset: 3px; transition: color .15s ease; }
.legal-section a:hover { color: var(--red); }
.legal-section strong { color: var(--char); }
@media (max-width: 767px) {
  .legal-section h3 { font-size: 18px; }
}
