/* =====================================================================
   Lubbock Arts Festival – Accessibility layer (WCAG 2.2 AA)
   Enqueued from functions.php after the parent theme and style.css,
   and before css/light-2027.css.

   Sections
   1. Utilities (screen-reader text)
   2. Skip link
   3. Focus indicators (two-tone, readable on light AND dark)
   4. Menus (keyboard-operable dropdowns, off-canvas)
   5. Carousel controls (pause/play, pagination hit areas)
   6. Target size (WCAG 2.5.8)
   7. Forms
   8. Reduced motion
   ===================================================================== */

:root {
  /* Focus ring: dark inner band + light outer band. Either band has
     >= 3:1 against any page background used on the site (white,
     the brand colors, or the 2027 dark indigo). */
  --laf-focus-dark:  #0b021d;
  --laf-focus-light: #ffffff;
}

/* ------------------------------------------------------------------
   1. Utilities
   ------------------------------------------------------------------ */
.laf-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;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ------------------------------------------------------------------
   2. Skip link (Salient prints .nectar-skip-to-content as the first
   focusable element; a11y.js points it at <main> and moves focus).
   ------------------------------------------------------------------ */
.nectar-skip-to-content,
.nectar-skip-to-content:visited {
  position: fixed !important;
  top: 8px !important;
  left: 8px !important;
  z-index: 2147483000 !important;
  display: block !important;
  padding: 14px 22px !important;
  background: #ffffff !important;
  color: #0b021d !important;
  font-family: "futura-pt", Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-decoration: underline !important;
  border: 3px solid #0b021d !important;
  border-radius: 6px !important;
  box-shadow: 0 0 0 3px #ffffff, 0 6px 24px rgba(0, 0, 0, .45) !important;
  transform: translateY(-250%) !important;
  transition: none !important;
}
.nectar-skip-to-content:focus,
.nectar-skip-to-content:focus-visible {
  transform: translateY(0) !important;
  outline: 3px solid #0b021d !important;
  outline-offset: 2px !important;
}

/* Programmatic focus target for the skip link: no ring needed. */
#laf-main:focus,
#laf-main:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* ------------------------------------------------------------------
   3. Focus indicators
   ------------------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible,
.toggle-heading:focus-visible,
.swiper-pagination-bullet:focus-visible,
.flex-direction-nav a:focus-visible,
.flex-control-nav a:focus-visible,
.pum-close:focus-visible {
  outline: 3px solid var(--laf-focus-light) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px var(--laf-focus-dark) !important;
  border-radius: 3px;
  transition: none !important;
}

/* Inputs and anything that clips its outline: draw the ring inside. */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.wpcf7-submit:focus-visible,
.swiper-pagination-bullet:focus-visible,
.laf-hero-prev:focus-visible,
.laf-hero-next:focus-visible,
#laf-hero-pause:focus-visible,
.laf-carousel-toggle:focus-visible,
.sf-menu .sub-menu a:focus-visible,
#slide-out-widget-area a:focus-visible,
.flex-direction-nav a:focus-visible {
  outline-offset: -3px !important;
  box-shadow: inset 0 0 0 3px var(--laf-focus-dark) !important;
}

/* Salient hides the outline on some mouse-focus states; keep mouse
   clicks clean but never remove the keyboard ring. */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* Off-canvas menu items: add an underline so focus is not conveyed by
   color alone (WCAG 1.4.1). The desktop bar has its own indicator. */
#slide-out-widget-area .off-canvas-menu-container a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* ------------------------------------------------------------------
   4. Menus
   ------------------------------------------------------------------ */
/* Escape dismissal for desktop dropdowns (WCAG 1.4.13). a11y.js adds
   .laf-menu-dismissed; it is cleared on the next hover or key press. */
#header-outer .sf-menu li.laf-menu-dismissed > ul.sub-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Closed off-canvas menu must not be reachable by keyboard. a11y.js
   toggles `inert`; this is the no-JS-state visual backstop. */
#slide-out-widget-area[inert] {
  visibility: hidden;
}

/* Off-canvas close control gets a real target. */
#slide-out-widget-area .slide_out_area_close {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------------------
   5. Carousel controls
   ------------------------------------------------------------------ */
/* Pause / play button (WCAG 2.2.2). Used for the button a11y.js adds
   and for the page-supplied #laf-hero-pause. */
.laf-carousel-toggle,
#laf-hero-pause {
  width: auto !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  white-space: nowrap;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 16px/1 "futura-pt", Arial, sans-serif !important;
  letter-spacing: 0;
  text-transform: none;
  color: #ffffff !important;
  background: #0b021d !important;
  border: 2px solid #ffffff !important;
  border-radius: 24px !important;
  cursor: pointer;
  opacity: 1 !important;
}
.laf-carousel-toggle:hover,
#laf-hero-pause:hover {
  background: #2a1466 !important;
}
.laf-carousel-toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 20;
}
.laf-carousel-toggle svg,
#laf-hero-pause svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: none;
}

/* Pagination bullets: 24px hit pitch (WCAG 2.5.8) without changing the
   drawn dot size. */
.swiper-pagination-bullet {
  position: relative;
  margin: 0 8px !important;
}
.swiper-pagination-bullet::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
}
/* Bullet dot minimum visibility: inactive dots need 3:1 (WCAG 1.4.11). */
.swiper-pagination-bullet:not(.swiper-pagination-bullet-active) {
  opacity: .85 !important;
  box-shadow: 0 0 0 1px rgba(11, 2, 29, .65);
}

/* Prev/next arrows */
.laf-hero-prev,
.laf-hero-next {
  min-width: 44px;
  min-height: 44px;
}

/* Gallery (FlexSlider) arrows: icon-only; a11y.js adds the names. */
.flex-direction-nav a {
  min-width: 44px;
  min-height: 44px;
}

/* ------------------------------------------------------------------
   6. Target size (WCAG 2.5.8, 24 x 24 CSS px minimum)
   ------------------------------------------------------------------ */
/* Top-level nav links are 18px tall and abut each other; grow the hit
   area without moving the layout (negative margins cancel the padding). */
#header-outer nav .sf-menu:not(.buttons) > li > a {
  box-sizing: border-box;
  min-height: 24px;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  margin-top: -3px;
  margin-bottom: -3px;
}
#copyright a,
#footer-outer .widget a {
  display: inline-block;
  min-height: 24px;
  line-height: 24px;
}
#footer-outer .social li a,
#footer-outer #social li a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.toggle-heading,
.nectar-inherit-h3.toggle-heading {
  min-height: 24px;
}

/* ------------------------------------------------------------------
   7. Forms
   ------------------------------------------------------------------ */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.wpcf7-form select {
  min-height: 44px;
  border-width: 2px;
}
.wpcf7-not-valid-tip {
  font-weight: 700;
}
/* Error text must not rely on color only. */
.wpcf7-not-valid-tip::before {
  content: "\26A0\FE0E  ";
}

/* ------------------------------------------------------------------
   9. Contrast safety net for the 2026 brand-color components
   (white on #ef4f23 = 3.6:1, white on #ff5705 = 3.1:1, white on
   #06b04f = 2.9:1). Brand colors are NOT changed; only the text on
   them. These are low-priority fallbacks: css/light-2027.css loads
   after this file and restyles the same components for the 2027
   LIGHT theme.
   ------------------------------------------------------------------ */
#laf-dc .laf-btn-explore,
#laf-dc .laf-btn-culinary {
  color: #1a1a1a !important;              /* 6.0:1 on #ff5705, 6.1:1 on #06b04f */
}
/* Off-canvas panel is #ef4f23: 20px bold counts as "large text" (3:1). */
#slide-out-widget-area .inner .off-canvas-menu-container li a {
  font-weight: 700 !important;
}

/* ------------------------------------------------------------------
   8. Reduced motion (WCAG 2.3.3, 2.2.2)
   Disables Salient entrance animations, parallax, page-load fade,
   smooth scrolling and long transitions. a11y.js also refuses to
   start carousel autoplay in this mode.
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  /* Salient scroll-reveal: show content immediately. */
  .nectar-waypoint-el,
  [data-animation]:not([data-animation=""]):not([data-animation="none"]),
  .has-animation,
  .wpb_animate_when_almost_visible,
  .nectar_cascading_images .cascading-image,
  .nectar-fancy-ul[data-animation] li,
  .img-with-aniamtion-wrap,
  .img-with-animation,
  .col.has-animation,
  .nectar-scale-animation {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
  }

  /* Parallax backgrounds and floating scenes stay put. */
  .nectar-parallax-scene,
  .nectar-parallax-scene *,
  .row-bg-wrap [data-parallax-speed],
  .row-bg.using-image[data-parallax-speed],
  .nectar-recent-posts-single_featured .parallaxImg,
  [data-nectar-parallax-scroll] {
    transform: none !important;
  }

  /* Page-load transition screen. */
  #ajax-loading-screen {
    display: none !important;
  }

  /* Swiper: no sliding transitions. */
  .swiper-wrapper {
    transition-duration: 0ms !important;
  }

  /* 2026 petal rain (kept in repo, retired in 2027). */
  .laf-petals,
  #laf-petals {
    display: none !important;
  }
}
