/* ============================================================
   HomeSpring Movers — Motion & Effects Layer
   Loaded on all 4 pages. Gated behind .js (progressive enhancement)
   and fully disabled under prefers-reduced-motion: reduce.
   ============================================================ */

/* Prevent horizontal overflow from slide reveals */
.js body { overflow-x: hidden; }

/* Anchor jump offset so sticky header never covers section tops */
html { scroll-padding-top: 96px; }

/* ---- Scroll progress bar ---- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 220; pointer-events: none; }
.scroll-progress .bar { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #0d9488, #5eead4); }

/* ---- Header shrink on scroll ---- */
.header .container { transition: padding 0.35s ease; }
.header.scrolled .container { padding-top: 8px; padding-bottom: 8px; }

/* ---- Scroll cue (hero "scroll down" chevron) ---- */
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: rgba(255, 255, 255, 0.75); font-size: 0.68rem; letter-spacing: 2px;
  text-transform: uppercase; z-index: 3; pointer-events: none; transition: opacity 0.35s ease;
}
.scroll-cue svg { width: 18px; height: 18px; animation: cueBounce 1.8s ease-in-out infinite; }
.scroll-cue.hidden { opacity: 0; }
@keyframes cueBounce { 0%, 100% { transform: translateY(0); opacity: 0.55; } 50% { transform: translateY(8px); opacity: 1; } }

/* ---- Scroll reveals ---- */
.js [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal="left"]  { transform: translateX(-36px); }
.js [data-reveal="right"] { transform: translateX(36px); }
.js [data-reveal="zoom"]  { transform: scale(0.92); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---- CTA button shine sweep ---- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-18deg); transition: left 0.5s ease;
}
.btn-primary:hover::after { left: 130%; }
.btn:active { transform: translateY(1px); }

/* ---- Back to top ---- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; border: none;
  border-radius: 50%; background: #0d9488; color: #fff; cursor: pointer; z-index: 150;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #0f766e; transform: translateY(-3px); }
.to-top svg { width: 20px; height: 20px; }

/* ---- Trust marquee (side-scrolling strip) ---- */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-group { display: flex; align-items: center; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- Focus affordances ---- */
a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 2px solid #0d9488; outline-offset: 2px; border-radius: 4px;
}

/* ---- Reduced motion: kill everything ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; transition-delay: 0ms; }
  .scroll-cue svg { animation: none; }
  .btn-primary::after { display: none; }
  .scroll-cue.hidden { opacity: 1; }
  .marquee-track { animation: none; }
}