/* ============================================================
   legal.css — shared styling for Nemora policy pages
   (privacy, terms, dpa, acceptable use, subprocessors,
    accessibility, security)
   ============================================================ */

:root {
  --primary:   #534AB7;
  --primaryD:  #2A2470;
  --primaryDD: #12103A;
  --highlight: #9590E8;
  --light:     #AFA9EC;
  --pale:      #CECBF6;
  --whisper:   #EEEDFE;
  --leaf:      #97C459;
  --leafDark:  #639922;
  --leafPale:  #EAF3DE;
  --warn:      #FFF3CD;
  --warnDark:  #6F4E00;
  --white:     #FFFFFF;
  --offwhite:  #FAFAFE;
  --text:      #1A1830;
  --text2:     #3D3860;
  --text3:     #6B6590;
  --muted:     #9591B8;
  --border:    #E8E5F8;
  --maxw:      820px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--text);
  background: var(--offwhite);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────────────────────── */
header.legal-hero {
  background: linear-gradient(135deg, var(--primaryDD) 0%, var(--primaryD) 60%, var(--primary) 100%);
  color: var(--white);
  padding: 2.5rem 1.5rem 3.5rem;
  text-align: center;
}
header.legal-hero .wrap { max-width: var(--maxw); margin: 0 auto; }
header.legal-hero .brand {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 1rem;
  color: var(--pale);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
header.legal-hero h1 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
header.legal-hero .effective {
  color: var(--light);
  font-size: 0.95rem;
}

/* ── Body ────────────────────────────────────────────────── */
main.legal { max-width: var(--maxw); margin: -2rem auto 0; padding: 0 1.5rem 4rem; }
.card {
  background: var(--white);
  border-radius: 18px;
  padding: 2rem 2rem 2.5rem;
  box-shadow: 0 8px 32px rgba(42, 36, 112, 0.08);
  border: 1px solid var(--border);
}
.summary {
  background: var(--leafPale);
  border-left: 4px solid var(--leafDark);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}
.summary strong { color: var(--leafDark); }
.warn-box {
  background: var(--warn);
  border-left: 4px solid #B8860B;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin: 1rem 0 1.5rem;
  color: var(--warnDark);
  font-size: 0.92rem;
}

h2 {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--primaryD);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--whisper);
}
h2:first-of-type { margin-top: 0; }
h3 {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}
p { margin-bottom: 0.9rem; color: var(--text2); }
ul, ol { margin: 0.4rem 0 1rem 1.4rem; }
li { margin-bottom: 0.4rem; color: var(--text2); }
li::marker { color: var(--primary); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.6rem 0 1rem;
  font-size: 0.94rem;
}
th, td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--whisper);
  color: var(--primaryD);
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
}
td { color: var(--text2); }

a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--pale);
  transition: border-color .2s;
}
a:hover { border-bottom-color: var(--primary); }

.placeholder {
  background: var(--warn);
  color: var(--warnDark);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.88em;
}

footer.legal-foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 2rem 1.5rem 3rem;
}
footer.legal-foot a { color: var(--text3); border-bottom-color: var(--border); }
footer.legal-foot .sister-links { margin-top: 0.5rem; font-size: 0.82rem; }
footer.legal-foot .sister-links a { margin: 0 0.4rem; }

@media (max-width: 600px) {
  header.legal-hero { padding: 2rem 1.25rem 3rem; }
  header.legal-hero h1 { font-size: 1.6rem; }
  .card { padding: 1.5rem 1.25rem 2rem; }
  h2 { font-size: 1.2rem; }
  th, td { padding: 0.5rem 0.6rem; font-size: 0.88rem; }
}

/* ── Accessibility: skip-to-content link ───────────────────
   Hidden by default; becomes visible when a keyboard user tabs
   onto it, letting them jump past navigation straight to the
   main content. WCAG 2.4.1 (Bypass Blocks). */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--primaryD);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  text-decoration: none;
  border: 2px solid var(--white);
  z-index: 1000;
  transition: top .15s;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 1rem;
  outline: 3px solid var(--highlight);
  outline-offset: 2px;
}

/* ── Accessibility: visible keyboard focus ───────────────────
   Browser default focus rings are often suppressed by reset CSS.
   :focus-visible draws a clear ring only for keyboard users
   (not mouse clicks), so sighted mouse users aren't bothered.
   WCAG 2.4.7 (Focus Visible). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Accessibility: respect reduced-motion preference ────────
   Some users (vestibular disorders, cognitive load, dementia)
   benefit from less motion. Disable smooth-scroll and animations
   when the OS asks us to. WCAG 2.3.3 (Animation from Interactions). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
