/* ==================================================================
   SID — Accessibility layer (WCAG 2.2 AA)
   Loaded LAST on every page so it can correct contrast, focus and
   keyboard affordances without touching each page's own styles.
   Brand orange (#E87120) is unchanged; only text colors placed on
   or near it are adjusted to reach 4.5:1 (or 3:1 for large text).
   ================================================================== */

/* Screen-reader-only text */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Visible keyboard focus (2.4.7 / 2.4.13-friendly) ── */
:focus-visible {
  outline: 3px solid #FFB27A !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 5px rgba(0,0,0,.65) !important;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #FFB27A !important; outline-offset: 1px !important;
}
.thumb:focus-visible { opacity: 1 !important; }

/* ── Focus not obscured by sticky nav (2.4.11) — JS refines this ── */
html { scroll-padding-top: 110px; }

/* ── Contrast fixes (1.4.3) ── */
/* Email pill in the orange top bar */
.top-bar a[href^="mailto:"] { background: rgba(255,255,255,.18) !important; color: #111 !important; }

/* Facebook-blue buttons: slightly deeper blue so white text passes */
.nav-fb-btn, .btn-fb, .btn-fb-full { background: #1466D6 !important; color: #fff !important; }
.nav-fb-btn:hover, .btn-fb:hover, .btn-fb-full:hover { background: #0F55B8 !important; }

/* White text on orange buttons → dark text (same orange) */
.btn-cta-orange, .pdf-open-btn, .footer-brand a[href$="contact.html"] { color: #111 !important; }

/* Orange text on white buttons → deeper orange */
.btn-white { color: #A84A0C !important; }

/* Roofing quick-card on the home page (white on bright orange) */
.quick-card[href*="sidroofingllc"] h3,
.quick-card[href*="sidroofingllc"] p { color: #111 !important; }

/* Muted grays raised to 4.5:1+ */
.footer-bottom, .footer-bottom a[href$="privacy.html"], .footer-bottom > div { color: #9A9A9A !important; }
.form-note, .hero-card-divider { color: #A0A0A0 !important; }

/* Big decorative step numbers (large text → 3:1) */
.step-num, .svc-num { color: rgba(232,113,32,.72) !important; }

/* Orange email pill on dark-brown sidebar */
.sidebar-contact-row a[href^="mailto:"] { color: #F5964F !important; }

/* ── Form field outlines visible against the dark card (1.4.11 Non-text Contrast) ── */
.form-group input:not([type="radio"]):not([type="checkbox"]), .form-group select, .form-group textarea {
  border-color: rgba(255,255,255,.45) !important;
}

/* ── Links inside text must not rely on color alone (1.4.1) ── */
.breadcrumb a, .footer-bottom a, p a:not([class]) { text-decoration: underline; text-underline-offset: 2px; }

/* ── Photo controls: readable "enlarge" hint that is also a keyboard button ── */
.zoom-hint {
  color: #fff !important; background: rgba(0,0,0,.6); padding: 4px 10px; border-radius: 4px;
  cursor: pointer;
}
[role="button"] { cursor: pointer; }

/* ── Hero slideshow pause control (2.2.2) ── */
.hero-pause-btn {
  position: absolute; right: 16px; top: 16px; z-index: 5;
  min-width: 44px; min-height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(17,17,17,.75); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px; font: 600 12px/1 'Oswald', sans-serif; letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer;
}
.hero-pause-btn:hover { background: rgba(17,17,17,.9); }
@media (max-width: 768px) {
  .hero-pause-btn { top: auto; bottom: 12px; right: 12px; width: 44px; padding: 0; justify-content: center; }
  .hero-pause-btn .hp-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ── Respect reduced-motion preference ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ── Visible horizontal scrollbar for photo strips (see hscroll.js) ── */
.has-hscroll { scrollbar-width: none !important; }
.has-hscroll::-webkit-scrollbar { display: none !important; }
.hscroll {
  position: relative; height: 24px; margin-top: 4px;           /* 24px = comfortable touch target */
  cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
}
.hscroll::before {                                               /* track */
  content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 8px;
  background: rgba(255,255,255,.16); border-radius: 4px;
}
.hscroll-thumb {
  position: absolute; left: 0; top: 4px; height: 16px; min-width: 44px; cursor: grab;
}
.hscroll-thumb::before {                                         /* visible bar inside a taller grab area */
  content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 8px;
  background: #E87120; border-radius: 4px; transition: background .15s, height .15s, top .15s;
}
.hscroll:hover .hscroll-thumb::before, .hscroll.dragging .hscroll-thumb::before { background: #FF8A3D; top: 2px; height: 12px; }
.hscroll.dragging .hscroll-thumb { cursor: grabbing; }

/* ── Reflow at 320px / 400% zoom (1.4.10) ── */
@media (max-width: 360px) {
  .nav-phone { display: none !important; }            /* phone stays in the orange top bar; keeps the menu button on-screen */
  #fp-grid, div[style*="minmax(340px"] { grid-template-columns: 1fr !important; }
  .about-inner > * { min-width: 0; }
  .build-grid { grid-template-columns: 1fr !important; }
  .about-stats { grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; }
  .about-stat { padding: 24px 10px; }
  .about-stat .lbl { letter-spacing: 1px; }
}

/* ── Skip link (2.4.1 Bypass Blocks) — added 2026-11-18 ── */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100000;
  background: #E87120; color: #111 !important; font-weight: 700;
  padding: 10px 16px; border-radius: 4px; text-decoration: none;
}
.skip-link:focus, .skip-link:focus-visible { top: 12px; }
