/* Rewi Legal Pages — v1.1
   Extends landing-v1.4.css and intentionally reuses the landing/CRM visual language. */

.legal-page {
  min-height: 100vh;
  background: var(--paper);
}

.legal-hero {
  position: relative;
  min-height: 430px;
  padding: 150px max(40px,calc((100vw - 1140px)/2)) 72px;
  overflow: hidden;
  display: flex;
  align-items: end;
  background:
    radial-gradient(circle at 82% 24%,rgba(22,119,255,.14),transparent 28%),
    radial-gradient(circle at 92% 80%,rgba(110,231,216,.20),transparent 25%),
    linear-gradient(135deg,#f7f9fc 0%,#edf4ff 100%);
  border-bottom: 1px solid var(--line);
}

.legal-hero::after {
  content: "";
  position: absolute;
  right: max(32px,calc((100vw - 1140px)/2));
  top: 120px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(22,119,255,.16);
  border-radius: 48px;
  transform: rotate(10deg);
  background:
    linear-gradient(145deg,rgba(255,255,255,.85),rgba(255,255,255,.35));
  box-shadow: 0 30px 70px rgba(23,35,61,.08);
}

.legal-hero::before {
  content: "Rewi";
  position: absolute;
  z-index: 1;
  right: max(88px,calc((100vw - 1060px)/2));
  top: 205px;
  color: rgba(22,119,255,.17);
  font-family: Georgia,"Times New Roman",serif;
  font-size: 72px;
  font-weight: 700;
  letter-spacing: -.06em;
  transform: rotate(10deg);
}

.legal-hero-copy {
  position: relative;
  z-index: 2;
  width: min(760px,calc(100% - 250px));
}

.legal-kicker {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(22,119,255,.10);
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  font-family: Georgia,"Times New Roman",serif;
  font-size: clamp(45px,5.5vw,72px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 600;
  text-wrap: balance;
}

.legal-hero-lead {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.7;
}

.legal-meta {
  margin: 22px 0 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: #6d7e81;
  font-size: 12px;
  font-weight: 700;
}

.legal-meta span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
}

.legal-shell {
  padding: 70px max(40px,calc((100vw - 1140px)/2)) 100px;
  background: #fff;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 270px;
  gap: 36px;
  align-items: start;
}

.legal-content {
  min-width: 0;
}

.legal-section {
  margin-bottom: 18px;
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fffdf9;
  box-shadow: 0 14px 38px rgba(23,35,61,.045);
}

.legal-section h2 {
  margin: 0 0 15px;
  font-family: Georgia,"Times New Roman",serif;
  font-size: clamp(27px,3vw,36px);
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 600;
}

.legal-section h3 {
  margin: 26px 0 10px;
  font-size: 16px;
}

.legal-section p,
.legal-section li {
  color: #44516a;
  font-size: 15px;
  line-height: 1.72;
}

.legal-section p {
  margin: 0 0 14px;
}

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

.legal-section ul,
.legal-section ol {
  margin: 14px 0 0;
  padding-left: 22px;
}

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

.legal-section a {
  color: #0864d8;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-callout {
  margin-top: 18px;
  padding: 18px 20px;
  border-left: 3px solid var(--blue);
  border-radius: 0 16px 16px 0;
  background: #edf4ff;
  color: #35445e;
}

.legal-contact-card {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(22,119,255,.15);
  border-radius: 18px;
  background: #f7faff;
}

.legal-contact-card strong,
.legal-contact-card span,
.legal-contact-card a {
  display: block;
}

.legal-contact-card strong {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
}

.legal-contact-card span,
.legal-contact-card a {
  margin-top: 5px;
  color: var(--soft);
  font-size: 13px;
}

.legal-aside {
  position: sticky;
  top: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 16px 45px rgba(23,35,61,.06);
}

.legal-aside-label {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.legal-aside a {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid rgba(23,35,61,.08);
  color: var(--soft);
  font-size: 12px;
  font-weight: 750;
}

.legal-aside a:last-child {
  border-bottom: 0;
}

.legal-aside a:hover,
.legal-aside a:focus-visible {
  color: var(--blue);
}

.legal-actions {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.legal-actions .button-secondary {
  background: #fff;
}

.legal-page footer {
  grid-template-columns: 140px 1fr auto;
}

.legal-page footer img {
  width: 100px;
  height: auto;
  display: block;
}

.legal-page footer p {
  margin: 0;
}

.legal-page footer p:last-child {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legal-page footer a:hover,
.legal-page footer a:focus-visible {
  color: #fff;
}

@media (max-width: 900px) {
  .legal-hero {
    min-height: 390px;
    padding: 125px 28px 58px;
  }

  .legal-hero::after,
  .legal-hero::before {
    opacity: .45;
  }

  .legal-hero-copy {
    width: min(720px,100%);
  }

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

  .legal-aside {
    position: static;
    order: -1;
  }

  .legal-aside nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
  }

  .legal-page footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .legal-page footer img {
    margin: auto;
  }

  .legal-page footer p:last-child {
    justify-content: center;
  }
}

@media (max-width: 680px) {
  .legal-hero {
    min-height: 350px;
    padding: 110px 18px 48px;
  }

  .legal-hero::after,
  .legal-hero::before {
    display: none;
  }

  .legal-hero h1 {
    font-size: clamp(40px,13vw,58px);
  }

  .legal-hero-lead {
    font-size: 16px;
  }

  .legal-shell {
    padding: 36px 14px 70px;
  }

  .legal-section {
    padding: 24px 20px;
    border-radius: 20px;
  }

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

  .legal-actions {
    display: grid;
  }

  .legal-actions .button {
    width: 100%;
  }
}
