/* -- Page wrapper ------------------------------------------ */
.legal-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* -- Header ------------------------------------------------ */
.legal-header {
  position: relative;
  background: var(--dark);
  padding: 6rem;
  overflow: hidden;
}

.legal-header-body {
  position: relative;
  z-index: 1;
}

.legal-kicker {
  font-size: var(--font-xxxs);
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

.legal-title {
  font-size: var(--font-xl);
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.legal-subtitle {
  font-size: var(--font-xs);
  line-height: 1.8;
  color: var(--light-grey);
  max-width: 44ch;
}

/* -- Section nav strip ------------------------------------- */
.legal-nav {
  background: var(--dark);
  border-top: 1px solid var(--mid);
  border-bottom: 1px solid var(--mid);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.legal-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 4rem;
  min-height: 3.5rem;
  white-space: nowrap;
}

.legal-nav-inner a {
  display: block;
  font-size: var(--font-xxxxs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-grey);
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}

.legal-nav-inner a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* -- Body -------------------------------------------------- */
.legal-body {
  background: var(--off-white);
  padding: 5rem 6rem 8rem;
}

.legal-body-inner {
  max-width: 72ch;
  margin: 0 auto;
}

/* -- Sections ---------------------------------------------- */
.legal-section {
  margin-bottom: 5rem;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section-title {
  font-size: var(--font-m);
  letter-spacing: 0.06em;
  color: var(--dark);
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--muted-dark);
}

.legal-section h3 {
  font-size: var(--font-xxxs);
  font-family: var(--f-body);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal-section h3:first-of-type {
  margin-top: 0;
}

.legal-section p {
  font-size: var(--font-xs);
  font-weight: 300;
  line-height: 1.9;
  color: var(--grey);
  margin-bottom: 1rem;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  list-style: none;
  margin-bottom: 1rem;
}

.legal-section ul li {
  font-size: var(--font-xs);
  font-weight: 300;
  line-height: 1.9;
  color: var(--grey);
  padding-left: 1.5em;
  position: relative;
  margin-bottom: 0.25rem;
}

.legal-section ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.legal-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-section a:hover {
  color: var(--dark);
}

/* -- Cookie preferences box -------------------------------- */
.legal-pref-box {
  background: var(--white);
  border: 1px solid var(--muted-dark);
  padding: 2rem 2.5rem;
  margin-top: 2rem;
}

.legal-pref-status {
  font-size: var(--font-xs);
  font-weight: 300;
  color: var(--grey);
  margin-bottom: 1.75rem;
}

.legal-pref-status strong {
  font-weight: 500;
  color: var(--dark);
}

.pref-accepted { color: #2D6A4F; }
.pref-declined { color: #9B2C2C; }
.pref-not-set  { color: var(--grey); }

.legal-pref-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.legal-updated-msg {
  font-size: var(--font-xxxs);
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-top: 1.25rem;
  min-height: 1.25rem;
}

/* -- Responsive -------------------------------------------- */
@media (max-width: 768px) {
  .legal-header {
    padding: 5.5rem 2rem;
  }

  .legal-nav-inner {
    padding: 0 1.5rem;
  }

  .legal-body {
    padding: 3rem 2rem 5rem;
  }
}

@media (max-width: 480px) {
  .legal-body {
    padding: 2.5rem 1.5rem 4rem;
  }

  .legal-pref-actions {
    flex-direction: column;
  }
}
