/* ============================================================
   Bradford Shipley Surveyors – Hero Animation Styles
   ============================================================ */

/* Floating house icons in hero background */
.hero-bg-animation {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.floating-house {
  position: absolute;
  font-size: 2rem;
  opacity: 0.06;
  animation: floatHouse linear infinite;
  filter: blur(1px);
}

.house-1 {
  left: 5%;
  bottom: 10%;
  font-size: 3rem;
  animation-duration: 25s;
  animation-delay: 0s;
}

.house-2 {
  left: 85%;
  bottom: 15%;
  font-size: 2.5rem;
  animation-duration: 30s;
  animation-delay: -10s;
}

.house-3 {
  left: 50%;
  bottom: 5%;
  font-size: 2rem;
  animation-duration: 20s;
  animation-delay: -5s;
}

@keyframes floatHouse {
  0%   { transform: translateY(0) scale(1); opacity: 0.04; }
  25%  { transform: translateY(-15px) scale(1.05); opacity: 0.08; }
  50%  { transform: translateY(-5px) scale(0.98); opacity: 0.05; }
  75%  { transform: translateY(-20px) scale(1.03); opacity: 0.09; }
  100% { transform: translateY(0) scale(1); opacity: 0.04; }
}

/* Animated gold line under headings */
.underline-gold {
  position: relative;
  display: inline-block;
}
.underline-gold::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.6s ease;
}
.underline-gold.visible::after,
.visible .underline-gold::after {
  width: 100%;
}

/* Pulse animation for CTA buttons */
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,149,42,.4); }
  50%       { box-shadow: 0 0 0 12px rgba(200,149,42,0); }
}
.btn-pulse {
  animation: ctaPulse 2.5s ease-in-out infinite;
}

/* Number ticker animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* Image hover zoom wrapper */
.img-zoom {
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.img-zoom img {
  transition: transform 0.5s ease;
}
.img-zoom:hover img {
  transform: scale(1.04);
}

/* Gold accent border left */
.border-gold-left {
  border-left: 4px solid var(--gold);
  padding-left: 1.25rem;
}

/* Shimmer loading effect */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

/* Smooth image reveal */
img.lazy-reveal {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img.lazy-reveal.loaded {
  opacity: 1;
}

/* Service level color themes */
.level-1-theme { --level-color: #16a34a; }
.level-2-theme { --level-color: #2563eb; }
.level-3-theme { --level-color: #d97706; }

/* Interactive area card with gold select */
.area-card.selected {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.area-card.selected * { color: #fff !important; }

/* Data visualisation / stats bars */
.stat-bar-container {
  background: var(--grey-lt);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
  margin-top: .4rem;
}
.stat-bar {
  height: 100%;
  background: linear-gradient(to right, var(--gold), var(--gold-lt));
  border-radius: 20px;
  width: 0;
  transition: width 1.2s ease;
}
.stat-bar.animated {
  width: var(--bar-width, 75%);
}

/* Print styles for survey reports */
@media print {
  #site-header, #site-footer, .sticky-cta, #back-to-top, .cookie-banner { display: none !important; }
  body { color: #000; background: #fff; }
  a { color: #000; }
  .article-content { max-width: 100%; }
}

/* Accessibility: focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  /* Intentionally minimal - site uses light theme by design */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
