/* ==========================================================================
   fcm.com accessibility layer (WCAG 2.1 AA) - v9
   Load AFTER style.css and client_portal_style.css.
   Works together with js/a11y.js. Nothing here changes layout.
   ========================================================================== */

/* 1. Text for screen readers only ---------------------------------------- */
.a11y-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* 2. Skip link (WCAG 2.4.1). Hidden until it receives keyboard focus ------- */
.a11y-skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2147483000;
  padding: 14px 20px;
  background: #272a2d;
  color: #fff;
  font: 700 14px/1 "Source Sans Pro", sans-serif;
  letter-spacing: .155em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-300%);
}
.a11y-skip-link:focus {
  transform: none;
}
#main:focus {
  outline: 0 !important;
  box-shadow: none !important;
}

/* 3. Visible keyboard focus (WCAG 2.4.7) ---------------------------------
   Two rings, one dark and one white, so the indicator shows on every
   background. :focus-visible only matches keyboard focus, not mouse clicks. */
:focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px #272a2d !important;
}

/* 4. Colour contrast (WCAG 1.4.3) ---------------------------------------- */
/* Footer copyright and credit: #5d5f62 on #272a2d was 2.25:1, now 5.29:1 */
.footer-wrapper.dark-bg .copyright p,
.footer-wrapper.dark-bg .website-creator a {
  color: #9a9da0;
}
/* Small orange text: #f26532 on light backgrounds was 3.0:1, now 4.7:1 */
.contact form .column .element.button button,
.contact form p.button {
  color: #c4491a !important;
}
/* Main menu panel: white on #7d8082 was 3.98:1, now 5.14:1 */
#menu .menu__container > div {
  background: #6b6e70;
}
@media (max-width: 960px) {
  #menu {
    background-color: #6b6e70;
  }
}

/* 5. Menu button (WCAG 2.1.1, 4.1.2) ------------------------------------- */
#menu-toggler {
  cursor: pointer;
}
@media (max-width: 960px) {
  /* Keep the word "Menu" / "Close" available as the button's name */
  #menu-toggler > span {
    display: block !important;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  /* Larger tap area (was 24 x 15 px). The icon stays in the same place. */
  #menu-toggler {
    padding: 15px 10px;
    margin: -15px -10px;
  }
}
#menu .menu__menu-item-title[role="button"] {
  cursor: pointer;
}

/* 6. Staff bios (WCAG 2.1.1, 4.1.2) -------------------------------------- */
.hover__item-img[role="button"] {
  cursor: pointer;
}
/* Show the hover state when the card is reached with the keyboard */
.grid .hover__item-img[role="button"]:focus-visible img:nth-child(2) {
  opacity: 1;
}
.grid .hover__item-img[role="button"]:focus-visible > div {
  opacity: 1;
}
#people-info .a11y-close {
  display: block;
  margin: -84px 0 44px auto;
  padding: 12px 0 12px 12px;
  background: none;
  border: 0;
  color: #fff;
  font: 700 14px/1 "Source Sans Pro", sans-serif;
  letter-spacing: .155em;
  text-transform: uppercase;
  cursor: pointer;
}
#people-info .a11y-close:hover {
  color: #f26532;
}
@media (max-width: 667px) {
  #people-info .a11y-close {
    margin: 0 0 0 auto;
    padding: 24px 36px 12px 12px;
  }
}

/* 7. Contact form errors (WCAG 3.3.1, 4.1.3) ----------------------------- */
.a11y-field-error {
  display: block;
  margin-top: 6px;
  font: 400 12px/1.4 "Source Sans Pro", sans-serif;
  letter-spacing: .05em;
  color: #b3261e;
}
[aria-invalid="true"] {
  border-bottom-color: #b3261e !important;
}

/* 8. Home page links next to the language switcher (bottom right):
      Accessibility (opens the animation control, WCAG 2.2.2), Privacy
      Policy and Cookie preferences, centered on the same line. Small, muted variant of the
      language-link style, available as .text-meta for other uses. ------ */
:root {
  --fcm-meta-size: 12px;
  --fcm-meta-weight: 400;
  --fcm-meta-tracking: .155em;
  --fcm-meta-color: #a7aaad;
  --fcm-meta-hover: #f26532;
}
.text-meta,
.home-footer-links {
  font-family: "Source Sans Pro", sans-serif;
  font-size: var(--fcm-meta-size);
  font-weight: var(--fcm-meta-weight);
  line-height: 17px;
  letter-spacing: var(--fcm-meta-tracking);
  text-transform: uppercase;
  color: var(--fcm-meta-color);
}
.home-footer-links {
  position: fixed;
  left: 50%;
  bottom: 60px;
  z-index: 9;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 10px 32px;
  width: max-content;
  margin: 0;
  padding: 0;
}
.home-footer-links a,
.home-footer-links button {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 0 0 6px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .9);
  transition: color .2s ease-in-out;
}
.home-footer-links a:hover,
.home-footer-links button:hover {
  color: var(--fcm-meta-hover);
}
/* "Accessibility" opens a small panel with the animation control */
.a11y-menu {
  position: relative;
  display: inline-block;
}
.a11y-menu-panel {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  z-index: 3;
  transform: translateX(-50%);
  padding: 12px 18px;
  background: #272a2d;
  border: 1px solid #565a5e;
  white-space: nowrap;
}
.a11y-menu-panel[hidden] {
  display: none;
}
@media (max-width: 667px) {
  /* Phones: centered, on the language link's baseline; wraps when narrow */
  .home-footer-links {
    bottom: 31px;
    max-width: calc(100% - 120px);
    gap: 10px 20px;
  }
}

/* 9. Reduced motion (WCAG 2.2.2, 2.3.3) ---------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}
