/*
  THESIS: Legal information should feel like a clear continuation of the site, not a detached file viewer.
  OWN-WORLD: White reading surface, warm cream framing, burgundy accents, fine rules, and the site's system sans typography.
  STORY: The reader identifies the document, reads it without distraction, and can return to the main site at any point.
  FIRST VIEWPORT: A compact brand header leads into a warm title band; the complete document begins immediately below.
  FORM: A restrained single-column reading page extending the established landing-page identity.
*/

:root {
  --legal-bg: #fcf9ea;
  --legal-surface: #ffffff;
  --legal-accent: #b90e2b;
  --legal-accent-dark: #891428;
  --legal-text: #3f3f3f;
  --legal-muted: #6f6d65;
  --legal-border: rgba(63, 63, 63, 0.14);
  --legal-page-width: 1120px;
  --legal-reading-width: 900px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.legal-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--legal-text);
  background: var(--legal-surface);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

.legal-page a {
  color: inherit;
}

.legal-page :is(h1, h2, h3) {
  text-wrap: balance;
}

.legal-page :is(p, li) {
  text-wrap: pretty;
}

.legal-skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #ffffff;
  background: var(--legal-accent-dark);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-180%);
}

.legal-skip-link:focus {
  transform: translateY(0);
}

.legal-header {
  color: var(--legal-text);
  background: var(--legal-surface);
  border-bottom: 1px solid var(--legal-border);
}

.legal-header__inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(var(--legal-page-width), calc(100% - 48px));
  margin-inline: auto;
}

.legal-header__brand,
.legal-header__back {
  display: inline-flex;
  align-items: center;
  color: var(--legal-accent-dark);
  font-weight: 650;
  text-decoration: none;
}

.legal-header__brand {
  gap: 11px;
  font-size: 16px;
}

.legal-header__symbol {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--legal-accent);
}

.legal-header__back {
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
}

.legal-header__brand,
.legal-header__back,
.site-footer__contact a,
.site-footer__legal-link {
  transition: color 180ms ease, opacity 180ms ease;
}

@media (hover: hover) {
  .legal-header__brand:hover,
  .legal-header__back:hover {
    opacity: 0.68;
  }

  .site-footer__contact a:hover,
  .site-footer__legal-link:hover {
    color: var(--legal-accent);
  }
}

.legal-page :is(a, button):focus-visible {
  outline: 3px solid var(--legal-accent);
  outline-offset: 4px;
}

.legal-hero {
  padding-block: clamp(54px, 8vw, 96px);
  background: var(--legal-bg);
}

.legal-hero__inner {
  width: min(var(--legal-reading-width), calc(100% - 48px));
  margin-inline: auto;
}

.legal-hero__eyebrow {
  margin: 0 0 18px;
  color: var(--legal-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 19ch;
  margin: 0;
  color: var(--legal-accent-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.legal-hero__subtitle {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--legal-text);
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.3;
}

.legal-hero__revision {
  margin: 24px 0 0;
  color: var(--legal-muted);
  font-size: 14px;
  line-height: 1.5;
}

.legal-content {
  padding-block: clamp(54px, 8vw, 96px);
}

.legal-document {
  width: min(var(--legal-reading-width), calc(100% - 48px));
  margin-inline: auto;
}

.legal-document__intro {
  margin-bottom: 48px;
  font-size: 17px;
  line-height: 1.72;
}

.legal-section + .legal-section {
  margin-top: 54px;
}

.legal-section h2 {
  margin: 0 0 22px;
  padding-top: 18px;
  border-top: 1px solid var(--legal-border);
  color: var(--legal-accent-dark);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.16;
}

.legal-section h3 {
  margin: 34px 0 14px;
  color: var(--legal-text);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
}

.legal-section p,
.legal-section li {
  font-size: 16px;
  line-height: 1.72;
}

.legal-section p {
  margin: 0;
}

.legal-section p + p,
.legal-section ul + p,
.legal-section p + ul,
.legal-section ul + ul {
  margin-top: 13px;
}

.legal-section ul {
  display: grid;
  gap: 7px;
  margin-bottom: 0;
  padding-left: 24px;
}

.legal-section li::marker {
  color: var(--legal-accent);
}

.legal-definition strong,
.legal-label {
  color: var(--legal-text);
  font-weight: 700;
}

.legal-fields {
  display: grid;
  gap: 4px;
  margin-top: 16px;
}

.legal-fields p + p {
  margin-top: 0;
}

.site-footer {
  padding-block: 0 44px;
  color: var(--legal-text);
  background: var(--legal-bg);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.65fr 1.7fr;
  gap: 48px;
  width: min(var(--legal-page-width), calc(100% - 48px));
  margin-inline: auto;
  padding-top: 42px;
  border-top: 1px solid var(--legal-border);
}

.site-footer p {
  margin: 0;
}

.site-footer__name {
  color: var(--legal-accent-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  letter-spacing: -0.4px;
  line-height: 1;
}

.site-footer__note {
  max-width: 270px;
  margin-top: 14px !important;
  color: var(--legal-muted);
  font-size: 14px;
  line-height: 21px;
}

.site-footer__label {
  margin-bottom: 14px !important;
  color: var(--legal-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 14px;
  text-transform: uppercase;
}

.site-footer__contact a,
.site-footer__legal-link {
  color: var(--legal-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 21px;
  text-decoration: none;
}

.site-footer__contact a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.site-footer__legal {
  display: grid;
  align-content: start;
  gap: 5px;
  color: var(--legal-muted);
  font-size: 13px;
  line-height: 19px;
}

.site-footer__legal .site-footer__label {
  margin-bottom: 9px !important;
}

.site-footer__documents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 20px;
  margin-top: 11px;
}

.site-footer__legal-link {
  width: fit-content;
  color: var(--legal-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 17px;
  text-decoration: underline;
  text-decoration-color: rgba(63, 63, 63, 0.42);
  text-underline-offset: 4px;
}

.site-footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--legal-border);
  color: var(--legal-muted);
  font-size: 12px;
  line-height: 18px;
}

.site-footer__bottom p:last-child {
  max-width: 580px;
  text-align: right;
}

@media (max-width: 760px) {
  .legal-header__inner,
  .legal-hero__inner,
  .legal-document,
  .site-footer__inner {
    width: calc(100% - 28px);
  }

  .legal-header__inner {
    min-height: 68px;
  }

  .legal-header__brand {
    font-size: 15px;
  }

  .legal-header__back span:last-child {
    display: none;
  }

  .legal-hero h1 {
    font-size: clamp(34px, 10.5vw, 48px);
    line-height: 1.02;
  }

  .legal-content {
    padding-top: 52px;
  }

  .legal-document__intro {
    margin-bottom: 40px;
    font-size: 16px;
  }

  .legal-section + .legal-section {
    margin-top: 44px;
  }

  .legal-section h2 {
    margin-bottom: 18px;
    font-size: 24px;
  }

  .legal-section h3 {
    margin-top: 28px;
    font-size: 18px;
  }

  .legal-section p,
  .legal-section li {
    font-size: 15px;
    line-height: 1.68;
  }

  .site-footer {
    padding-bottom: 32px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 32px;
  }

  .site-footer__documents {
    grid-template-columns: 1fr;
  }

  .site-footer__bottom {
    grid-column: auto;
    flex-direction: column;
    gap: 8px;
  }

  .site-footer__bottom p:last-child {
    max-width: none;
    text-align: left;
  }
}

@media print {
  .legal-header,
  .site-footer,
  .legal-skip-link {
    display: none;
  }

  .legal-hero,
  .legal-content {
    padding-block: 24px;
    background: #ffffff;
  }

  .legal-hero__inner,
  .legal-document {
    width: 100%;
  }

  .legal-section {
    break-inside: avoid-page;
  }
}
