/* Movapoint legal pages — quiet, readable, and consistent with the main site. */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body.legal-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(226, 55, 63, 0.15), transparent 66%),
    radial-gradient(700px 420px at 94% 18%, rgba(226, 55, 63, 0.07), transparent 70%),
    var(--bg);
}

body.legal-page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(245, 241, 238, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 241, 238, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: #fff;
  background: var(--red-deep);
  border-radius: 8px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.16s ease;
}

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

.legal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(245, 241, 238, 0.09);
  background: rgba(7, 6, 5, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  min-height: 72px;
  margin: 0 auto;
  gap: 24px;
}

.legal-header .wordmark {
  flex: 0 0 auto;
  font-size: 1.25rem;
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legal-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.legal-nav a:hover {
  color: var(--text);
  background: rgba(245, 241, 238, 0.055);
}

.legal-nav a[aria-current="page"] {
  color: #fff;
  border-color: rgba(226, 55, 63, 0.46);
  background: rgba(226, 55, 63, 0.12);
}

.legal-header a:focus-visible,
.legal-page main a:focus-visible,
.legal-footer a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.legal-hero {
  width: min(960px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(72px, 11vw, 128px) 0 54px;
  text-align: center;
}

.legal-kicker {
  margin-bottom: 14px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 900px;
  margin: 0 auto;
  font: 400 clamp(3.15rem, 9vw, 7rem)/0.95 var(--font-display);
  letter-spacing: -0.025em;
  text-transform: uppercase;
  text-wrap: balance;
}

.legal-hero h1 em {
  color: var(--red);
  font-family: var(--font-serif);
  font-weight: 400;
  text-transform: none;
}

.legal-deck {
  max-width: 690px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  line-height: 1.75;
  text-wrap: balance;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px 18px;
  margin-top: 25px;
  color: #81756f;
  font-size: 0.79rem;
}

.legal-meta span + span::before {
  margin-right: 18px;
  color: var(--red);
  content: "·";
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(190px, 248px) minmax(0, 780px);
  align-items: start;
  justify-content: center;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 92px;
  gap: 32px;
}

.legal-toc {
  position: sticky;
  top: 96px;
  padding: 19px;
  border: 1px solid rgba(245, 241, 238, 0.1);
  border-radius: 18px;
  background: rgba(20, 16, 15, 0.62);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.18);
}

.legal-toc h2 {
  margin-bottom: 11px;
  color: var(--text);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.legal-toc ol {
  list-style: none;
}

.legal-toc li + li { margin-top: 3px; }

.legal-toc a {
  display: block;
  padding: 6px 8px;
  border-radius: 7px;
  color: #968983;
  font-size: 0.77rem;
  line-height: 1.35;
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--text);
  background: rgba(245, 241, 238, 0.05);
}

.legal-document {
  min-width: 0;
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid rgba(245, 241, 238, 0.1);
  border-radius: 24px;
  background: rgba(13, 11, 10, 0.78);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.legal-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 46px;
  border: 1px solid rgba(226, 55, 63, 0.22);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(226, 55, 63, 0.045);
}

.legal-summary-item {
  min-width: 0;
  padding: 18px;
}

.legal-summary-item + .legal-summary-item {
  border-left: 1px solid rgba(226, 55, 63, 0.18);
}

.legal-summary strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 0.82rem;
}

.legal-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.legal-document section {
  scroll-margin-top: 104px;
}

.legal-document section + section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid rgba(245, 241, 238, 0.085);
}

.legal-document h2 {
  margin-bottom: 17px;
  color: var(--text);
  font: 400 clamp(1.72rem, 4vw, 2.45rem)/1.08 var(--font-display);
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.legal-document h3 {
  margin: 29px 0 10px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
}

.legal-document p,
.legal-document li {
  color: #b5aaa4;
  font-size: 0.94rem;
  line-height: 1.78;
}

.legal-document p + p { margin-top: 14px; }

.legal-document ul,
.legal-document ol {
  margin: 13px 0 0 1.2rem;
  padding-left: 0.5rem;
}

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

.legal-document strong { color: #eee8e4; }

.legal-document a,
.legal-footer a,
.waitlist-legal a {
  color: #f06a70;
  text-decoration-color: rgba(240, 106, 112, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-document a:hover,
.legal-footer a:hover,
.waitlist-legal a:hover {
  color: #ff8a8f;
  text-decoration-color: currentColor;
}

.legal-callout {
  margin: 22px 0;
  padding: 18px 20px;
  border-left: 3px solid var(--red);
  border-radius: 0 12px 12px 0;
  background: rgba(226, 55, 63, 0.07);
}

.legal-callout p { color: #c9bdb6; }

.legal-table-wrap {
  width: 100%;
  margin-top: 18px;
  border: 1px solid rgba(245, 241, 238, 0.1);
  border-radius: 14px;
  overflow-x: auto;
}

.legal-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.79rem;
}

.legal-table th,
.legal-table td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(245, 241, 238, 0.075);
  color: #afa39d;
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  color: var(--text);
  background: rgba(245, 241, 238, 0.035);
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-table tbody tr:last-child td { border-bottom: 0; }

.legal-contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 19px;
  padding: 20px;
  gap: 20px;
  border: 1px solid rgba(245, 241, 238, 0.1);
  border-radius: 14px;
  background: rgba(245, 241, 238, 0.025);
}

.legal-contact-card p { margin: 0; }

.legal-contact-card a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(226, 55, 63, 0.42);
  border-radius: 999px;
  background: rgba(226, 55, 63, 0.09);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.legal-footer {
  border-top: 1px solid rgba(245, 241, 238, 0.09);
}

.legal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 48px));
  min-height: 98px;
  margin: 0 auto;
  gap: 24px;
  color: #7f746e;
  font-size: 0.77rem;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: minmax(0, 780px); }

  .legal-toc {
    position: static;
    columns: 2;
  }

  .legal-toc h2 { column-span: all; }

  .legal-toc li { break-inside: avoid; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 126px; }

  .legal-header-inner,
  .legal-hero,
  .legal-layout,
  .legal-footer-inner {
    width: min(100% - 32px, 780px);
  }

  .legal-header-inner {
    flex-wrap: wrap;
    min-height: 0;
    padding: 14px 0 10px;
    gap: 8px 14px;
  }

  .legal-header .wordmark { font-size: 1.02rem; }

  .legal-nav {
    width: 100%;
    justify-content: space-between;
  }

  .legal-nav a {
    flex: 1 1 auto;
    padding-inline: 8px;
    font-size: 0.73rem;
  }

  .legal-hero { padding: 58px 0 38px; }

  .legal-hero h1 { font-size: clamp(2.9rem, 17vw, 4.8rem); }

  .legal-meta {
    display: grid;
    gap: 4px;
  }

  .legal-meta span + span::before { display: none; }

  .legal-layout { gap: 18px; padding-bottom: 58px; }

  .legal-toc { columns: 1; padding: 15px; }

  .legal-document { padding: 24px 19px; border-radius: 18px; }

  .legal-summary { grid-template-columns: 1fr; }

  .legal-summary-item + .legal-summary-item {
    border-top: 1px solid rgba(226, 55, 63, 0.18);
    border-left: 0;
  }

  .legal-document section + section {
    margin-top: 38px;
    padding-top: 38px;
  }

  .legal-contact-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-contact-card a { width: 100%; }

  .legal-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 28px 0;
    gap: 10px;
  }

  .legal-footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body.legal-page {
    color: #111;
    background: #fff;
    font-size: 10pt;
  }

  body.legal-page::before,
  .skip-link,
  .legal-header,
  .legal-toc,
  .legal-footer { display: none !important; }

  .legal-hero,
  .legal-layout {
    width: 100%;
    padding: 0;
  }

  .legal-hero {
    margin-bottom: 24px;
    text-align: left;
  }

  .legal-hero h1,
  .legal-document h2,
  .legal-document h3,
  .legal-document strong { color: #111; }

  .legal-deck,
  .legal-meta,
  .legal-document p,
  .legal-document li,
  .legal-table td { color: #222; }

  .legal-document {
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: none;
  }

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

  .legal-callout,
  .legal-summary,
  .legal-table-wrap,
  .legal-contact-card { border-color: #aaa; background: #fff; }

  a { color: #111 !important; }
}
