/* ============================================================
   a11y.css — accessibility layer (WCAG 2.1 AA)
   Load AFTER base.css and after any page-specific CSS.
   Ships with every bar site built from this template.
   ============================================================ */

/* ── 1. SKIP LINK ─────────────────────────────────────────
   Off-screen until focused. First tab stop on every page. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--gold);
  color: #0a0806;
  padding: .9rem 1.6rem;
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* Skip link moves focus to <main tabindex="-1">. Suppress the ring
   there — the user asked to go to the content, not to a control. */
main:focus,
main:focus-visible {
  outline: none;
  box-shadow: none;
}


/* ── 2. VISUALLY HIDDEN UTILITY ───────────────────────────
   Hidden from sight, still read by screen readers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}


/* ── 3. FOCUS VISIBLE ─────────────────────────────────────
   Two-tone ring. Gold reads against the dark surfaces; the dark
   halo reads against the red buttons and the hero photography.
   One of the two always clears 3:1, whatever is underneath. */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(10, 8, 6, .95);
  border-radius: 2px;
}

/* Mouse clicks should not leave a ring behind. */
:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* .form-field sets `outline: none` in pages.css — re-assert it here.
   Form fields always sit on a dark panel, so no halo needed. */
.form-field:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--gold);
  box-shadow: none;
}


/* ── 4. BUTTON RESETS ─────────────────────────────────────
   For elements converted from <div onclick> to real <button>.
   Deliberately does NOT set background — the existing rules in
   pages.css / index.css still own the visual design. */
.gallery-cell,
.cdot {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}
.gallery-cell {
  display: block;
  width: 100%;
}


/* ── 5. CAROUSEL PAUSE CONTROL ────────────────────────────
   WCAG 2.2.2 — anything that auto-moves for more than 5s needs a
   way to stop it. Top-right, clear of .hero-over and the dots. */
.c-pause {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 12;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 6, .7);
  border: 1px solid var(--border-gold);
  color: var(--text);
  font-size: .75rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: color .2s, border-color .2s;
}
.c-pause:hover {
  color: var(--gold);
  border-color: var(--gold);
}
@media (max-width: 768px) {
  .c-pause { top: 1rem; right: 1rem; width: 38px; height: 38px; }
}


/* ── 6. FORM ERRORS ───────────────────────────────────────
   #e04a3f is the lightened red — 4.97:1 on --bg, vs 3.57:1 for
   the brand --red. Used for text only; buttons keep brand red. */
.form-error-summary {
  background: rgba(201, 36, 27, .12);
  border: 1px solid #e04a3f;
  color: #e04a3f;
  padding: .8rem 1rem;
  margin-bottom: 1.2rem;
  font-size: .78rem;
  line-height: 1.6;
}
.field-error {
  color: #e04a3f;
  font-size: .72rem;
  line-height: 1.5;
  margin: -.6rem 0 1rem;
}


/* ── 8. ACCESSIBILITY PAGE ──────────────────────
   The one page on the site that is mostly prose. Measure is capped
   near 70 characters and the line height is loose — both are
   readability, not decoration. */
.a11y-prose {
  max-width: 42rem;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  font-family: var(--font-body);
  font-size: .92rem;
  line-height: 1.85;
  color: var(--text-muted);
}
.a11y-prose .lede {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 2.5rem;
}
.a11y-prose h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--gold);
  margin: 2.8rem 0 .9rem;
}
.a11y-prose p { margin-bottom: 1.1rem; }
.a11y-prose ul {
  margin: 0 0 1.4rem;
  padding-left: 1.2rem;
}
.a11y-prose li { margin-bottom: .7rem; }
.a11y-prose a { color: var(--gold); }
.a11y-prose strong { color: var(--text); font-weight: 400; }
.a11y-contact { list-style: none; padding-left: 0; }
.a11y-updated {
  margin-top: 2.5rem;
  font-size: .78rem;
  color: var(--text-dim);
}
@media (max-width: 768px) {
  .a11y-prose { padding: 2.5rem 1.4rem 4rem; }
}


/* ── 7. REDUCED MOTION ────────────────────────────────────
   Kills the 9s hero zoom, the popup scale-in, the drawer slide,
   and smooth scrolling for anyone who has asked for less motion.
   carousel.js reads the same media query and stops autoplay. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    /* Zero the delays too. The overlays hide themselves with
       `visibility 0s linear <duration>` so the fade-out can finish
       before they leave the tab order; with no fade left to wait
       for, that delay would just strand a closed dialog on top of
       the page, focusable, for up to half a second. */
    animation-delay: 0s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
