/* ============================================================
   ServeLynx Theme — accessibility.css
   Cookie notice, accessibility menu, and the display options
   the menu switches on (classes on <html>)
   ============================================================ */

/* Text for screen readers only */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


/* ══════════════════════════════════════════
   COOKIE NOTICE
══════════════════════════════════════════ */
.cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: var(--z-modal);
  width: min(780px, calc(100% - 200px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px 24px;
  padding: 18px 22px;
  background: rgba(13, 27, 42, 0.97);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  animation: fade-up 0.45s ease 0.3s both;
}

.cookie-notice[hidden] { display: none; }

.cookie-notice__text {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-2);
}

.cookie-notice__text a {
  color: var(--electric-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.cookie-notice__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cookie-notice {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-notice__actions .btn { flex: 1; }
}


/* ══════════════════════════════════════════
   ACCESSIBILITY MENU
══════════════════════════════════════════ */
/* Sits below the navigation and the mobile drawer, so an open drawer covers it. */
.a11y-menu {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: calc(var(--z-nav) - 10);
}

.a11y-menu__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--text-1);
  border: 2px solid var(--electric);
  box-shadow: var(--shadow-card);
  transition: background var(--transition-fast), transform var(--transition-base);
}

.a11y-menu__toggle:hover,
.a11y-menu__toggle[aria-expanded="true"] {
  background: var(--blue-600);
}

.a11y-menu__toggle:hover { transform: scale(1.06); }

.a11y-menu__panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding: 18px;
  background: var(--navy-900);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.a11y-menu__panel[hidden] { display: none; }

.a11y-menu__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}

.a11y-menu__panel button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-sm);
  background: var(--navy-800);
  color: var(--text-1);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.a11y-menu__panel button:hover { border-color: var(--electric); }

.a11y-menu__panel button[aria-pressed="true"] {
  background: var(--blue-600);
  border-color: var(--electric);
}

.a11y-menu__sizes {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.a11y-menu__sizes span[aria-hidden] {
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
}

.a11y-menu__sizes button { min-width: 48px; }

.a11y-menu__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
}

/* On/off box at the end of each option */
.a11y-menu__option::after {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.a11y-menu__option[aria-pressed="true"]::after {
  background: #fff;
  box-shadow: inset 0 0 0 3px var(--blue-600);
}

.a11y-menu__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  font-size: 0.875rem;
}

.a11y-menu__foot button {
  min-height: 36px;
  font-size: 0.875rem;
  font-weight: 500;
}

.a11y-menu__foot a {
  color: var(--electric-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 768px) {
  .a11y-menu {
    left: 12px;
    bottom: 12px;
    /* Moves above the cookie notice while it is showing. */
    transform: translateY(calc(var(--cookie-notice-height, 0px) * -1));
  }

  .a11y-menu__toggle {
    width: 46px;
    height: 46px;
  }
}

@media print {
  .cookie-notice,
  .a11y-menu { display: none; }
}


/* ══════════════════════════════════════════
   OPTIONS CHOSEN IN THE MENU
══════════════════════════════════════════ */

/* ── Larger text: sizes are in rem, so the whole page scales ── */
html.a11y-text-1 { font-size: 112.5%; }
html.a11y-text-2 { font-size: 125%; }

/* At the larger sizes the desktop links no longer fit beside the logo and
   button on a small laptop, so let them wrap onto a second row. */
html.a11y-text-1 .nav-inner,
html.a11y-text-2 .nav-inner,
html.a11y-readable .nav-inner {
  flex-wrap: wrap;
  row-gap: 8px;
}


/* ── High contrast: black, white and light blue, stronger borders, underlined links ── */
html.a11y-contrast {
  --navy-950: #000;
  --navy-900: #000;
  --navy-800: #0A0A0A;
  --navy-700: #141414;
  --navy-600: #1C1C1C;
  --electric: #81D4FA;
  --text-2: #FFFFFF;
  --text-3: #FFFFFF;
  --text-4: #FFFFFF;
  --border: rgba(255, 255, 255, 0.6);
  --border-blue: #81D4FA;
  --surface-glass: #000;
  --gradient-hero: linear-gradient(#000, #000);
  --gradient-card: linear-gradient(#0A0A0A, #0A0A0A);
  --gradient-blue: linear-gradient(#81D4FA, #81D4FA);
  --gradient-button: linear-gradient(#0D47A1, #0D47A1);
  --gradient-text: linear-gradient(#FFFFFF, #FFFFFF);
}

html.a11y-contrast .site-nav.scrolled,
html.a11y-contrast .cookie-notice {
  background: #000;
}

html.a11y-contrast .btn,
html.a11y-contrast .card,
html.a11y-contrast .faq-item,
html.a11y-contrast .form-control,
html.a11y-contrast .step-number {
  border: 2px solid #fff;
}

html.a11y-contrast .hero-shape { display: none; }

html.a11y-contrast :focus-visible {
  outline: 3px solid #fff;
}

html.a11y-contrast a:not(.btn):not(.nav-logo):not(.footer-logo),
html.a11y-links a:not(.btn):not(.nav-logo):not(.footer-logo) {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}


/* ── Easier-to-read text: more space between lines, letters and words,
      no all-capitals, and plain colors where text was filled with a gradient ── */
html.a11y-readable body {
  line-height: 1.8;
  letter-spacing: 0.02em;
  word-spacing: 0.08em;
}

html.a11y-readable p,
html.a11y-readable li {
  line-height: 1.9;
}

html.a11y-readable * {
  text-transform: none !important;
}

html.a11y-readable h1,
html.a11y-readable h2,
html.a11y-readable h3,
html.a11y-readable h4,
html.a11y-readable .section-heading {
  letter-spacing: 0;
  line-height: 1.35;
}

html.a11y-readable .gradient-text,
html.a11y-readable .gradient-text-blue,
html.a11y-readable .section-heading span {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--electric-light);
}


/* ── Stop animations ── */
html.a11y-calm,
html.a11y-calm *,
html.a11y-calm *::before,
html.a11y-calm *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* Content that waits for a scroll animation is simply shown. */
html.a11y-calm [data-aos],
html.a11y-calm .stagger-children > * {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}
