/* ============================================================
   ProLynkCRM — Accessibility + Cookie Consent
   Drop-in stylesheet. Uses tokens from style.css (--navy, --accent, etc.)
   ============================================================ */

/* Defensive: ensure [hidden] always wins, even on fixed-positioned elements */
[hidden] { display: none !important; }

/* ---------- A11y utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10001;
  background: var(--navy);
  color: #fff;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

/* Footer link buttons (match anchor styling) */
.footer-link-btn {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.footer-link-btn:hover { color: #fff; }
.footer-link-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   USER PREFERENCE OVERRIDES
   Driven by data-attributes on <html>
   ============================================================ */

/* Font size scaling */
html[data-a11y-fontsize="115"] { font-size: 115%; }
html[data-a11y-fontsize="130"] { font-size: 130%; }
html[data-a11y-fontsize="150"] { font-size: 150%; }

/* Reduce motion */
html[data-a11y-motion="reduce"] *,
html[data-a11y-motion="reduce"] *::before,
html[data-a11y-motion="reduce"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
html[data-a11y-motion="reduce"] [data-animate] {
  opacity: 1 !important;
  transform: none !important;
}

/* Dyslexia-friendly font */
html[data-a11y-font="dyslexia"],
html[data-a11y-font="dyslexia"] body,
html[data-a11y-font="dyslexia"] h1,
html[data-a11y-font="dyslexia"] h2,
html[data-a11y-font="dyslexia"] h3,
html[data-a11y-font="dyslexia"] h4,
html[data-a11y-font="dyslexia"] p,
html[data-a11y-font="dyslexia"] button,
html[data-a11y-font="dyslexia"] input,
html[data-a11y-font="dyslexia"] textarea,
html[data-a11y-font="dyslexia"] select,
html[data-a11y-font="dyslexia"] a,
html[data-a11y-font="dyslexia"] li,
html[data-a11y-font="dyslexia"] span:not(.a11y-slider) {
  font-family: 'Atkinson Hyperlegible', 'Outfit', sans-serif !important;
}

/* Underline links */
html[data-a11y-underline="on"] a:not(.btn):not(.nav-logo) {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* Letter spacing */
html[data-a11y-spacing="on"] body,
html[data-a11y-spacing="on"] p,
html[data-a11y-spacing="on"] li,
html[data-a11y-spacing="on"] h1,
html[data-a11y-spacing="on"] h2,
html[data-a11y-spacing="on"] h3 {
  letter-spacing: 0.05em !important;
  word-spacing: 0.1em;
  line-height: 1.85 !important;
}

/* Highlight focus */
html[data-a11y-focus="on"] *:focus-visible {
  outline: 3px solid #fbbf24 !important;
  outline-offset: 3px !important;
  border-radius: 4px;
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.25) !important;
}

/* High contrast */
html[data-a11y-contrast="high"] {
  --text: #000000;
  --text-muted: #1a1a1a;
  --bg: #ffffff;
  --white: #ffffff;
  --border: #000000;
  --navy: #000000;
  --navy-dark: #000000;
  --navy-mid: #000000;
  --accent: #0033cc;
  --accent-light: #e6ecff;
  --navy-light: #f0f0f0;
}
html[data-a11y-contrast="high"] body { background: #fff; color: #000; }
html[data-a11y-contrast="high"] .feature-card,
html[data-a11y-contrast="high"] .preview-card,
html[data-a11y-contrast="high"] .contact-form-wrap,
html[data-a11y-contrast="high"] .waitlist-card { border: 2px solid #000 !important; }
html[data-a11y-contrast="high"] .ftag {
  background: #fff;
  border: 2px solid #000;
  color: #000;
}

/* Dark mode */
html[data-a11y-contrast="dark"] {
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --bg: #0a1628;
  --white: #142640;
  --border: #1e3a5f;
  --navy-light: #1e3a5f;
  --navy-mid: #93c5fd;
  --accent-light: #1e3a5f;
}
html[data-a11y-contrast="dark"] body { background: #0a1628; color: #e2e8f0; }
html[data-a11y-contrast="dark"] .feature-card,
html[data-a11y-contrast="dark"] .preview-card,
html[data-a11y-contrast="dark"] .contact-form-wrap,
html[data-a11y-contrast="dark"] .waitlist-card {
  background: #142640;
  border-color: #1e3a5f;
}
html[data-a11y-contrast="dark"] .feature-card h3,
html[data-a11y-contrast="dark"] .section-header h2,
html[data-a11y-contrast="dark"] .waitlist-card h2,
html[data-a11y-contrast="dark"] .contact-info h2,
html[data-a11y-contrast="dark"] .form-group label,
html[data-a11y-contrast="dark"] .mock-value { color: #e2e8f0; }
html[data-a11y-contrast="dark"] .ftag { background: #1e3a5f; color: #93c5fd; }
html[data-a11y-contrast="dark"] .form-group input,
html[data-a11y-contrast="dark"] .form-group textarea,
html[data-a11y-contrast="dark"] .form-group select,
html[data-a11y-contrast="dark"] .waitlist-input {
  background: #0a1628;
  color: #e2e8f0;
  border-color: #1e3a5f;
}
html[data-a11y-contrast="dark"] .mock-stat,
html[data-a11y-contrast="dark"] .mock-deal,
html[data-a11y-contrast="dark"] .mock-ai { background: #0a1628; color: #e2e8f0; }
html[data-a11y-contrast="dark"] .hero-wave svg path { fill: #0a1628; }

/* ============================================================
   ACCESSIBILITY FAB + PANEL
   ============================================================ */
.a11y-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9998;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 35, 69, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.a11y-fab:hover {
  transform: scale(1.08);
  background: var(--accent);
  box-shadow: 0 10px 28px rgba(43, 108, 176, 0.4);
}
.a11y-fab:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

.a11y-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 24, 51, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.a11y-overlay.visible { opacity: 1; pointer-events: auto; }

.a11y-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 380px;
  max-width: 92vw;
  background: var(--white);
  z-index: 9999;
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  pointer-events: none;
  transition: transform 0.3s ease;
}
.a11y-panel.visible { transform: translateX(0); pointer-events: auto; }

.a11y-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--navy);
  color: #fff;
}
.a11y-panel-head h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}
.a11y-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.a11y-close:hover { background: rgba(255, 255, 255, 0.22); }
.a11y-close:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }

.a11y-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.a11y-group { margin-bottom: 1.5rem; }
.a11y-group-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.6rem;
}

.a11y-segmented {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}
.a11y-segmented button {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.55rem 0.5rem;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}
.a11y-segmented button:hover { color: var(--navy); }
.a11y-segmented button[aria-checked="true"] {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 35, 69, 0.18);
}
.a11y-segmented button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.a11y-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.a11y-toggle-row:last-of-type { border-bottom: none; }
.a11y-toggle-text { flex: 1; min-width: 0; }
.a11y-toggle-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.15rem;
}
.a11y-toggle-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* iOS-style switch */
.a11y-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.a11y-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.a11y-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: background 0.2s;
}
.a11y-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.a11y-switch input:checked + .a11y-slider { background: var(--accent); }
.a11y-switch input:checked + .a11y-slider::before { transform: translateX(20px); }
.a11y-switch input:focus-visible + .a11y-slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.a11y-switch-disabled { opacity: 0.55; cursor: not-allowed; }
.a11y-switch-disabled input { cursor: not-allowed; }

.a11y-reset {
  width: 100%;
  margin-top: 1rem;
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 0.7rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.a11y-reset:hover {
  border-color: var(--danger);
  color: var(--danger);
}
.a11y-foot {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.5;
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9997;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(15, 35, 69, 0.2);
  padding: 1.25rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  transform: translateY(120%);
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-banner.visible { transform: translateY(0); pointer-events: auto; }

.cookie-banner-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}
.cookie-banner-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.cookie-banner-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}
.cookie-banner-text a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 500;
}
.cookie-banner-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-cookie {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-cookie-primary {
  background: var(--navy);
  color: #fff;
}
.btn-cookie-primary:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 35, 69, 0.25);
}
.btn-cookie-ghost {
  background: var(--bg);
  color: var(--navy);
  border: 1px solid var(--border);
}
.btn-cookie-ghost:hover {
  background: var(--navy-light);
  border-color: var(--navy-mid);
}
.btn-cookie:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   COOKIE PREFERENCES MODAL
   ============================================================ */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 24, 51, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.cookie-modal-overlay.visible { opacity: 1; pointer-events: auto; }

.cookie-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 10000;
  width: 92vw;
  max-width: 580px;
  max-height: 85vh;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.cookie-modal.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.cookie-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.cookie-modal-head h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}
.cookie-modal-close {
  background: var(--bg);
  border: none;
  color: var(--text);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.cookie-modal-close:hover { background: var(--navy-light); color: var(--navy); }
.cookie-modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.cookie-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}
.cookie-modal-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.cookie-category {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--bg);
}
.cookie-category:last-child { margin-bottom: 0; }
.cookie-category-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-category-text { flex: 1; }
.cookie-category h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.3rem 0;
}
.cookie-category p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.cookie-modal-foot {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  border-radius: 0 0 16px 16px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .a11y-fab {
    width: 48px;
    height: 48px;
    left: 14px;
    bottom: 14px;
  }
  .a11y-panel { width: 100%; max-width: 100%; }
  .cookie-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 1rem;
  }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn-cookie { flex: 1; }
  .cookie-modal { width: 95vw; max-height: 90vh; }
  .cookie-modal-foot { flex-direction: column-reverse; }
  .cookie-modal-foot .btn-cookie { width: 100%; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .a11y-panel, .cookie-banner, .cookie-modal, .a11y-overlay, .cookie-modal-overlay {
    transition: none !important;
  }
}

/* ============================================================
   LEGAL MODALS (Privacy / Terms / Accessibility Statement)
   ============================================================ */
.legal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 24, 51, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.legal-modal-overlay.visible { opacity: 1; pointer-events: auto; }

.legal-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 10000;
  width: 94vw;
  max-width: 720px;
  max-height: 88vh;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.legal-modal.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.legal-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--navy);
  color: #fff;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}
.legal-modal-head h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.2rem 0;
  letter-spacing: -0.01em;
}
.legal-modal-meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
}
.legal-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.legal-modal-close:hover { background: rgba(255, 255, 255, 0.22); }
.legal-modal-close:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }

.legal-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem 1.75rem 2rem;
  scroll-behavior: smooth;
}
.legal-modal-body:focus { outline: none; }
.legal-modal-body::-webkit-scrollbar { width: 8px; }
.legal-modal-body::-webkit-scrollbar-track { background: var(--bg); }
.legal-modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.legal-modal-body::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.legal-intro {
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.7;
  padding: 1rem 1.25rem;
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  margin-bottom: 1.5rem;
}
.legal-intro strong { color: var(--navy); font-weight: 700; }

.legal-modal-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.75rem 0 0.6rem;
  letter-spacing: -0.005em;
}
.legal-modal-body h3:first-of-type { margin-top: 0.5rem; }
.legal-modal-body p {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.7;
  margin: 0 0 0.85rem 0;
}
.legal-modal-body p strong { color: var(--navy); font-weight: 600; }
.legal-modal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-modal-body a:hover { color: var(--navy); }
.legal-modal-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--bg);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.legal-list {
  margin: 0 0 1rem 1.5rem;
  padding: 0;
}
.legal-list li {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}
.legal-list li strong { color: var(--navy); font-weight: 600; }

.legal-modal-foot {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  border-radius: 0 0 16px 16px;
  flex-shrink: 0;
}

/* Cookie banner privacy link as button */
.cookie-link-btn {
  background: none;
  border: 0;
  color: var(--accent);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}
.cookie-link-btn:hover { color: var(--navy); }
.cookie-link-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* A11y panel footer link */
.a11y-foot-link {
  background: none;
  border: 0;
  color: var(--accent);
  text-decoration: underline;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  margin-top: 0.4rem;
  display: inline-block;
}
.a11y-foot-link:hover { color: var(--navy); }
.a11y-foot-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Dark contrast support for legal modals */
html[data-a11y-contrast="dark"] .legal-modal { background: #142640; }
html[data-a11y-contrast="dark"] .legal-modal-body p,
html[data-a11y-contrast="dark"] .legal-modal-body li { color: #e2e8f0; }
html[data-a11y-contrast="dark"] .legal-modal-body h3,
html[data-a11y-contrast="dark"] .legal-modal-body p strong,
html[data-a11y-contrast="dark"] .legal-modal-body li strong { color: #93c5fd; }
html[data-a11y-contrast="dark"] .legal-intro { background: #1e3a5f; color: #e2e8f0; }
html[data-a11y-contrast="dark"] .legal-intro strong { color: #93c5fd; }
html[data-a11y-contrast="dark"] .legal-modal-foot { background: #0a1628; }

/* Responsive */
@media (max-width: 768px) {
  .legal-modal { width: 96vw; max-height: 92vh; }
  .legal-modal-head { padding: 1.25rem 1.25rem; }
  .legal-modal-head h2 { font-size: 1.2rem; }
  .legal-modal-body { padding: 1.25rem; }
  .legal-modal-body h3 { font-size: 1rem; }
  .legal-modal-foot { padding: 1rem 1.25rem; }
}

/* ============================================================
   FOOTER COLUMNS
   Replaces the old single-row .footer-links layout.
   ============================================================ */
.footer-inner {
  display: grid !important;
  grid-template-columns: 1.2fr 2fr;
  gap: 3rem;
  align-items: start;
}

.footer-brand-email {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  transition: color 0.2s;
}
.footer-brand-email:hover { color: #fff; text-decoration: underline; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col-heading {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 0.35rem 0;
}

.footer-col a,
.footer-col .footer-link-btn {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-align: left;
  transition: color 0.2s;
  width: fit-content;
  padding: 0;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.footer-col a:hover,
.footer-col .footer-link-btn:hover { color: #fff; }
.footer-col a:focus-visible,
.footer-col .footer-link-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
  border-radius: 2px;
  color: #fff;
}
.footer-col a svg { opacity: 0.6; }

/* Responsive */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr !important; gap: 2rem; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
@media (max-width: 600px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
  .footer-col-heading { font-size: 0.72rem; }
  .footer-col a, .footer-col .footer-link-btn { font-size: 0.85rem; }
}
@media (max-width: 380px) {
  .footer-cols { grid-template-columns: 1fr; }
}