/* ============================================================
   legal.css — Legal & Privacy pages (Blue Lion Websites)
   Premium glass-morphism styling for long-form legal content
   and the Data Rights / Accessibility forms.
   ============================================================ */

/* ── 1. HERO ─────────────────────────────────────────────── */
.legal-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(7rem, 14vh, 10rem) 0 clamp(2.6rem, 6vw, 4rem);
  text-align: center;
  color: #fff;
  background:
    radial-gradient(92% 100% at 10% 10%, rgba(52, 121, 255, 0.24) 0%, rgba(10, 24, 59, 0) 60%),
    radial-gradient(90% 120% at 90% 86%, rgba(25, 92, 255, 0.20) 0%, rgba(10, 24, 59, 0) 58%),
    linear-gradient(145deg, #030916 0%, #06112a 36%, #08193d 62%, #030914 100%);
  border-bottom: 1px solid rgba(115, 167, 255, 0.22);
}
.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(46, 107, 255, 0.22), transparent 22% 78%, rgba(31, 86, 215, 0.18)),
    repeating-linear-gradient(112deg, rgba(114, 169, 255, 0.07) 0 2px, rgba(114, 169, 255, 0) 2px 26px);
  opacity: 0.85;
}
.legal-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: -2;
  will-change: transform;
}
.legal-hero__orb--1 {
  width: 480px; height: 480px;
  top: -150px; right: -90px;
  background: radial-gradient(circle, rgba(36, 126, 255, 0.5), rgba(36, 126, 255, 0) 70%);
}
.legal-hero__orb--2 {
  width: 380px; height: 380px;
  bottom: -110px; left: -70px;
  background: radial-gradient(circle, rgba(57, 166, 255, 0.4), rgba(57, 166, 255, 0) 70%);
}
.legal-hero .container { position: relative; z-index: 2; }
.legal-hero__kicker {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #bcd6ff;
  margin-bottom: 1.15rem;
  background: rgba(90, 150, 240, 0.12);
  padding: .5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(140, 190, 255, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.legal-hero__title {
  font-family: 'Cormorant Garamond', 'Cormorant Garamond Fallback', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.08;
  color: #f4f8ff;
  margin: 0 auto .9rem;
  max-width: 760px;
  text-wrap: balance;
}
.legal-hero__updated {
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  color: rgba(200, 220, 255, 0.82);
  margin: 0;
}

/* ── 2. BODY LAYOUT ──────────────────────────────────────── */
.legal-body {
  position: relative;
  padding: clamp(2.6rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(60% 60% at 85% 0%, rgba(210, 226, 255, 0.5) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #f4f8ff 0%, #eef4ff 100%);
}
.legal-shell {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: clamp(1.6rem, 3vw, 2.8rem);
  align-items: start;
  max-width: 1120px;
}

/* ── 3. TABLE OF CONTENTS ────────────────────────────────── */
.legal-toc {
  position: sticky;
  top: 96px;
  border: 1px solid rgba(180, 205, 255, 0.5);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(246,250,255,.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 34px rgba(10, 31, 63, .08), inset 0 1px 0 rgba(255,255,255,.7);
  padding: 1.25rem 1.25rem 1.35rem;
}
.legal-toc__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #1D5CB5;
  margin: 0 0 .8rem;
}
.legal-toc nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .12rem; }
.legal-toc nav a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  line-height: 1.35;
  color: #475569;
  text-decoration: none;
  padding: .34rem .55rem;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.legal-toc nav a:hover,
.legal-toc nav a:focus-visible {
  color: #0A1F3F;
  background: rgba(29, 92, 181, .08);
  border-left-color: #1D5CB5;
  outline: none;
}

/* ── 4. DOCUMENT CONTENT CARD ────────────────────────────── */
.legal-doc {
  border: 1px solid rgba(180, 205, 255, 0.45);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255,255,255,.97) 0%, rgba(248,251,255,.9) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 46px rgba(10, 31, 63, .09), inset 0 1px 0 rgba(255,255,255,.75);
  padding: clamp(1.6rem, 3.4vw, 3rem);
  color: #23324a;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.72;
  max-width: 100%;
}
.legal-doc > *:first-child { margin-top: 0; }
.legal-doc > *:last-child { margin-bottom: 0; }

.legal-doc h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.62rem);
  line-height: 1.25;
  color: #0A1F3F;
  margin: 2.4rem 0 .9rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(29, 92, 181, .12);
  scroll-margin-top: 96px;
}
.legal-doc > h2:first-of-type { border-top: 0; padding-top: 0; margin-top: .3rem; }
.legal-doc h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  color: #14315e;
  margin: 1.7rem 0 .6rem;
  scroll-margin-top: 96px;
}
.legal-doc p { margin: 0 0 1.05rem; }
.legal-doc strong { color: #0A1F3F; font-weight: 600; }
.legal-doc a {
  color: #1D5CB5;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color .2s ease;
}
.legal-doc a:hover,
.legal-doc a:focus-visible { color: #0A1F3F; }
.legal-doc ul,
.legal-doc ol { margin: 0 0 1.15rem; padding-left: 1.4rem; display: grid; gap: .4rem; }
.legal-doc li { padding-left: .2rem; }
.legal-doc ul li::marker { color: #1D5CB5; }
.legal-doc ol li::marker { color: #1D5CB5; font-weight: 600; }
.legal-doc code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .88em;
  background: rgba(29, 92, 181, .08);
  border: 1px solid rgba(29, 92, 181, .14);
  border-radius: 6px;
  padding: .08em .4em;
  color: #14315e;
  word-break: break-word;
}
.legal-doc .legal-address {
  margin: 0 0 1.05rem;
  line-height: 1.6;
}

/* ── 5. FORMS (Data Rights / Accessibility) ──────────────── */
.legal-form-section { margin-top: 1.2rem; }
.legal-form {
  margin: 1.2rem 0 .4rem;
}
.legal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}
.lf-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.lf-field--full { grid-column: 1 / -1; }
.lf-field label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .82rem;
  color: #334155;
  letter-spacing: .02em;
}
.lf-req { color: #1D5CB5; }
.lf-field input,
.lf-field select,
.lf-field textarea {
  font-family: 'Inter', sans-serif;
  font-size: .94rem;
  color: #0A1F3F;
  padding: .72rem .9rem;
  border: 1.5px solid rgba(180, 205, 255, .55);
  border-radius: 12px;
  background: rgba(255,255,255,.85);
  transition: border-color .25s ease, box-shadow .25s ease;
  outline: none;
  width: 100%;
}
.lf-field input:focus,
.lf-field select:focus,
.lf-field textarea:focus {
  border-color: #1D5CB5;
  box-shadow: 0 0 0 3px rgba(29, 92, 181, .12);
}
.lf-field input[aria-invalid="true"],
.lf-field select[aria-invalid="true"],
.lf-field textarea[aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}
.lf-field textarea { resize: vertical; min-height: 130px; }
.lf-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  padding-right: 2.4rem;
  cursor: pointer;
}

/* honeypot — visually and semantically hidden but focus-hostile to bots */
.lf-hp {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.legal-form-notice {
  margin: 1.3rem 0 1.1rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid #1D5CB5;
  border-radius: 12px;
  background: rgba(29, 92, 181, .06);
  font-size: .92rem;
  line-height: 1.6;
  color: #334155;
}
.legal-form-notice a { color: #1D5CB5; }

.legal-turnstile {
  margin: 0 0 1.1rem;
  min-height: 65px;
}
.legal-turnstile-fallback {
  margin: .2rem 0 1.1rem;
  font-size: .9rem;
  color: #b45309;
  line-height: 1.5;
}

.legal-form-actions { margin-top: .2rem; }
.legal-form-submit {
  width: 100%;
  padding: .95rem 1.6rem;
  font-size: 1rem;
  gap: .6rem;
  border-radius: 999px;
}
.legal-form-submit svg { transition: transform .25s ease; }
.legal-form-submit:hover svg { transform: translateX(4px); }
.legal-form-submit[aria-disabled="true"],
.legal-form-submit:disabled { opacity: .6; cursor: not-allowed; }

.legal-form-status {
  margin: 1rem 0 0;
  font-size: .95rem;
  line-height: 1.55;
  min-height: 1.4rem;
  text-align: center;
}
.legal-form-status--success { color: #166534; }
.legal-form-status--error { color: #b91c1c; }
.legal-form-ref {
  margin: .6rem 0 0;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  color: #0A1F3F;
}
.legal-form-ref strong {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: rgba(29, 92, 181, .1);
  border: 1px solid rgba(29, 92, 181, .18);
  border-radius: 8px;
  padding: .18em .55em;
  letter-spacing: .03em;
}

/* ── 6. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .legal-shell { grid-template-columns: 1fr; }
  .legal-toc {
    position: static;
    top: auto;
  }
  .legal-toc nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .1rem .6rem;
  }
}
@media (max-width: 540px) {
  .legal-form-grid { grid-template-columns: 1fr; }
  .legal-toc nav ul { grid-template-columns: 1fr; }
}

/* Reduced motion: nothing animates here beyond reveal; respect global setting */
@media (prefers-reduced-motion: reduce) {
  .legal-hero__orb { animation: none; }
}
