/* Quartic Advisory — accessibility overrides.
   Class-based, applied to <html>. Works across both the home page and the
   generated pages because both design systems share the same CSS variables. */

/* ---- Larger text (root font-size scales all rem/clamp sizing) ---- */
html.a11y-t1 { font-size: 118%; }
html.a11y-t2 { font-size: 136%; }

/* ---- High contrast: push the shared tokens to stronger values ---- */
html.a11y-contrast {
  --ink: #0A0F14;
  --navy: #0C1620;
  --muted: #263340;
  --line: rgba(12, 22, 32, .55);
  --green: #0A6E56;
  --teal: #0A6E56;
}
html.a11y-contrast .hero,
html.a11y-contrast .clients,
html.a11y-contrast .cta,
html.a11y-contrast footer,
html.a11y-contrast .footer,
html.a11y-contrast .opsroom { --muted: #C9D6DF; }
html.a11y-contrast .hero p,
html.a11y-contrast .lead,
html.a11y-contrast .body-copy { color: #EAF1F5 !important; }
html.a11y-contrast .card,
html.a11y-contrast .svc,
html.a11y-contrast .member,
html.a11y-contrast .principle,
html.a11y-contrast .form,
html.a11y-contrast .faq-item { border-color: rgba(12,22,32,.5) !important; }

/* ---- Dyslexia-friendly typeface (font loaded lazily by a11y.js) ---- */
html.a11y-dyslexic,
html.a11y-dyslexic body,
html.a11y-dyslexic h1,
html.a11y-dyslexic h2,
html.a11y-dyslexic h3,
html.a11y-dyslexic p,
html.a11y-dyslexic a,
html.a11y-dyslexic span,
html.a11y-dyslexic li,
html.a11y-dyslexic label,
html.a11y-dyslexic input,
html.a11y-dyslexic textarea,
html.a11y-dyslexic button,
html.a11y-dyslexic .h1, html.a11y-dyslexic .h2 {
  font-family: "Atkinson Hyperlegible", "Manrope", system-ui, sans-serif !important;
  letter-spacing: normal !important;
}

/* ---- Always underline links (for colour-blind users) ---- */
html.a11y-underline a:not(.btn):not(.nav-cta):not(.client-logo) {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* ---- Stronger keyboard focus whenever any a11y setting is on ---- */
html.a11y-on :focus-visible {
  outline: 3px solid #0A6E56 !important;
  outline-offset: 3px !important;
  border-radius: 2px;
}

/* ---- Calm mode: no motion at all, content shown static ---- */
html.a11y-calm *, html.a11y-calm *::before, html.a11y-calm *::after {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}
html.a11y-calm .reveal,
html.a11y-calm .rise,
html.a11y-calm .rv {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}
html.a11y-calm .seismo,
html.a11y-calm .co2-hud,
html.a11y-calm .ping-ring { display: none !important; }

/* ---- The accessibility panel itself ---- */
.a11y-skip {
  position: fixed;
  left: 12px;
  top: 10px;
  z-index: 4000;
  background: #0B7A61;
  color: #fff;
  padding: .55rem .9rem;
  border-radius: 8px;
  font: 600 .85rem/1 "Manrope", system-ui, sans-serif;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.a11y-skip:focus { transform: translateY(0); }

.a11y-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(10, 16, 22, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.a11y-overlay.open { display: flex; }
.a11y-panel {
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #FFFEFC;
  color: #1C2836;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(8, 13, 20, .5);
  padding: 1.5rem 1.5rem 1.2rem;
  font-family: "Manrope", system-ui, sans-serif;
}
.a11y-panel h2 {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.3rem;
  color: #1C2836;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.a11y-panel .a11y-x {
  background: none; border: none; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: #5C6B77; padding: .2rem .4rem;
}
.a11y-panel .a11y-x:hover { color: #1C2836; }
.a11y-sub { margin-top: .35rem; font-size: .88rem; color: #5C6B77; }
.a11y-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .9rem 0; border-top: 1px solid rgba(28,40,54,.12);
}
.a11y-row:first-of-type { margin-top: .8rem; }
.a11y-row .lbl { font-weight: 600; font-size: .95rem; }
.a11y-row .lbl small { display: block; font-weight: 400; font-size: .8rem; color: #5C6B77; margin-top: .1rem; }
.a11y-switch {
  flex: 0 0 auto; width: 46px; height: 26px; border-radius: 999px;
  background: #CBD5Dc; border: none; cursor: pointer; position: relative;
  transition: background .2s ease;
}
.a11y-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform .2s ease;
}
.a11y-switch[aria-pressed="true"] { background: #0B7A61; }
.a11y-switch[aria-pressed="true"]::after { transform: translateX(20px); }
.a11y-seg { display: inline-flex; border: 1px solid rgba(28,40,54,.2); border-radius: 999px; overflow: hidden; }
.a11y-seg button {
  background: none; border: none; cursor: pointer; padding: .4rem .7rem;
  font: 600 .85rem "Manrope", sans-serif; color: #5C6B77;
}
.a11y-seg button[aria-pressed="true"] { background: #0B7A61; color: #fff; }
.a11y-reset {
  margin-top: 1rem; background: none; border: none; cursor: pointer;
  font: 700 .78rem "Manrope", sans-serif; letter-spacing: .1em; text-transform: uppercase;
  color: #5C6B77; padding: 0;
}
.a11y-reset:hover { color: #1C2836; }

/* ---- One-time privacy notice (slim, dismissible, never nags again) ---- */
.privacy-note {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 3500;
  max-width: min(680px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #12202B;
  color: rgba(255,255,255,.82);
  border: 1px solid rgba(64,188,168,.3);
  border-radius: 12px;
  padding: .7rem 1rem;
  font: 400 .84rem/1.45 "Manrope", system-ui, sans-serif;
  box-shadow: 0 14px 40px rgba(8,13,20,.45);
}
.privacy-note a { color: #40BCA8; text-underline-offset: 2px; }
.privacy-note .pn-ok {
  flex: 0 0 auto; background: #0B7A61; color: #fff; border: none; cursor: pointer;
  padding: .45rem .9rem; border-radius: 999px; font: 700 .78rem "Manrope", sans-serif;
}
.privacy-note .pn-ok:hover { background: #096A54; }
@media (max-width: 560px) { .privacy-note { flex-direction: column; align-items: flex-start; } }
