/* ============================================================
 * Site-wide accessibility + chrome
 * (WCAG 2.2 AA remediations — keep in sync with brand tokens)
 * ============================================================ */

:root {
  --fp-orange: #b45309;
  --fp-orange-dark: #92400e;
  --fp-teal: #0f766e;
  --fp-teal-bright: #14b8a6;
  --fp-brown: #78350f;
  --fp-cream: #fffbf5;
  --fp-focus-outer: #0f766e;
  --fp-focus-inner: #fffbf5;
  /* Announce (~2.5rem) + sticky header (~4–5rem) clearance for in-page targets */
  --fp-header-offset: 7.5rem;
}

/* ---- Skip link (also present statically in HTML) ---- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 1000;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  background: var(--fp-orange);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--fp-focus-outer);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--fp-focus-inner);
}

/* Visually hidden but available to AT */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- AA: lift muted brown text opacities to ≥4.5:1 on cream ---- */
.text-brand-brown\/70,
.text-brand-brown\/65 {
  color: rgb(120 53 15 / 0.85) !important;
}
.text-brand-brown\/60,
.text-brand-brown\/55 {
  color: rgb(120 53 15 / 0.8) !important;
}
.text-brand-brown\/50 {
  color: rgb(120 53 15 / 0.75) !important;
}

/* AA: muted cream on brown footers — keep ≥4.5:1 */
.text-cream-200\/60 {
  color: rgb(250 243 230 / 0.75) !important;
}
.text-cream-200\/50 {
  color: rgb(250 243 230 / 0.7) !important;
}

/* AA: orangeLight (#FDBA74) fails on cream/white (~1.6:1).
   Keep it for dark surfaces; remap if used on light backgrounds. */
.bg-white .text-brand-orangeLight,
.bg-cream-50 .text-brand-orangeLight,
.bg-cream-100 .text-brand-orangeLight,
.bg-cream-200 .text-brand-orangeLight {
  color: var(--fp-orange) !important;
}

/* ---- Hero photo scrim: keep copy ≥4.5:1 over any midtone ---- */
.hero-scrim {
  background: linear-gradient(
    90deg,
    rgba(255, 251, 245, 0.97) 0%,
    rgba(255, 251, 245, 0.95) 34%,
    rgba(255, 251, 245, 0.82) 52%,
    rgba(255, 251, 245, 0.4) 72%,
    rgba(255, 251, 245, 0.1) 88%,
    transparent 100%
  );
}
@media (max-width: 639px) {
  /* Mobile: text sits farther into the image plane */
  .hero-scrim {
    background: linear-gradient(
      180deg,
      rgba(255, 251, 245, 0.97) 0%,
      rgba(255, 251, 245, 0.94) 42%,
      rgba(255, 251, 245, 0.82) 68%,
      rgba(255, 251, 245, 0.45) 100%
    );
  }
}

/* ---- Focus visible: links, buttons, summaries, tabindex ---- */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid var(--fp-focus-outer);
  outline-offset: 3px;
  border-radius: 8px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--fp-focus-inner) 85%, transparent);
}

/* On dark surfaces (footer / brown CTAs), flip the focus ring */
.bg-brand-brown a:focus-visible,
.bg-brand-brown button:focus-visible,
footer a:focus-visible,
footer button:focus-visible {
  outline-color: #faf3e6;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--fp-brown) 70%, transparent);
}

/* ---- Reveal: visible by default; animate only when JS opts in ---- */
.reveal {
  opacity: 1;
  transform: none;
}
html.js .reveal:not(.visible) {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}
html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  html.js .reveal,
  html.js .reveal:not(.visible),
  html.js .reveal.visible,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .testimonial-track,
  .photo-zoom img,
  .masonry-item img {
    transition: none !important;
  }
  .animate-pulse,
  .animate-paw-bounce,
  .animate-paw-trot,
  .animate-float,
  .animate-tail-wag,
  .animate-fade-up,
  .animate-wiggle {
    animation: none !important;
  }
}

/* ---- Sticky chrome: keep focused content out from under sticky header ---- */
html {
  scroll-padding-top: var(--fp-header-offset);
  scroll-padding-bottom: 1.5rem;
}

@media (max-width: 639px) {
  a:focus-visible,
  button:focus-visible,
  [tabindex]:focus-visible {
    scroll-margin-top: var(--fp-header-offset);
  }
}

#menu-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Compact sticky header after scroll — frees vertical space on phones */
#site-header {
  transition:
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
#site-header.is-compact nav {
  height: 3.5rem;
}
#site-header.is-compact nav img {
  height: 2rem;
}
@media (min-width: 640px) {
  #site-header.is-compact nav {
    height: 4rem;
  }
  #site-header.is-compact nav img {
    height: 2.5rem;
  }
}

#site-announce {
  position: relative;
  padding-right: 2.75rem;
}
#site-announce[hidden] {
  display: none !important;
}
#site-announce .announce-dismiss {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 9999px;
  color: #faf3e6;
  opacity: 0.85;
  line-height: 1;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#site-announce .announce-dismiss:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* ---- Carousel controls (dots ≥24px, pause control) ---- */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.carousel-dots {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.carousel-dot {
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 9999px;
  border: 2px solid transparent;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.carousel-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: #f1e6d0;
  transition:
    width 0.2s ease,
    background-color 0.2s ease;
}
.carousel-dot[aria-current='true']::after {
  width: 18px;
  background: var(--fp-orange);
}
.carousel-pause {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid #f1e6d0;
  background: #fff;
  color: var(--fp-brown);
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 10px 40px -10px rgba(120, 53, 15, 0.15);
}
.carousel-pause:hover {
  border-color: var(--fp-orange);
  color: var(--fp-orange);
}

/* FAQ summary: keep custom + marker keyboard-clear */
details > summary {
  cursor: pointer;
}
details > summary::-webkit-details-marker {
  display: none;
}
