/* Global custom styles */
.floating-cta {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px rgba(0,0,0,0.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.floating-cta:hover {
  transform: scale(1.06);
  box-shadow: 0 15px 25px rgba(0,0,0,0.30);
}
.frosted-glass {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
}
#back-to-top {
  transition: opacity .25s ease, transform .25s ease;
}
header#main-header.scrolled {
  background-color: rgba(17, 24, 39, 0.9); /* gray-900/90 */
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -2px rgba(0,0,0,0.15);
  backdrop-filter: blur(6px);
}

/* === HX_PATCH: Accessibility & Visibility Improvements === */

/* Ensure scrolled header reads well on light sections */
header#main-header.scrolled, #main-header.scrolled {
  background-color: rgba(17, 24, 39, 0.9); /* slate-900 / 90% */
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.3), 0 4px 6px -2px rgba(0,0,0,.15);
}
#main-header.scrolled a,
#main-header.scrolled .hover-text-brand,
#main-header.scrolled .text-white { color: #fff !important; }
#main-header.scrolled svg { fill: #fff; color: #fff; }

/* Back-to-top: make visible on white/light backgrounds */
#back-to-top {
  color: #fff !important;
  outline: none;
}
#back-to-top.frosted-glass {
  background: rgba(15, 23, 42, 0.85); /* slate-900 / 85% */
  border-color: rgba(255,255,255,0.25);
}
#back-to-top:focus-visible {
  outline: 2px solid rgba(59,130,246,.65); /* blue-500 focus ring */
  outline-offset: 3px;
}
#back-to-top:hover {
  transform: translateY(-2px) scale(1.06);
}

/* Respect reduced motion preferences for transitions */
@media (prefers-reduced-motion: reduce) {
  #back-to-top, .floating-cta { transition: none !important; }
}
/* === End HX_PATCH === */
