/* Content is visible by default, including when the motion script or GSAP
   cannot load. The legacy observer may add .js before it can reveal anything. */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal:not(.is-visible) { opacity: 1; transform: none; }
  html.js :is(.about-copy, .review-intro, .contact-info).reveal:not(.is-visible) > *,
  html.js .section-top.reveal:not(.is-visible) > div > *,
  html.js .section-top.reveal:not(.is-visible) > p { opacity: 1; transform: none; }
  html.js :is(.about-visual, .service-card, .gallery-item).reveal:not(.is-visible) img {
    clip-path: none;
    transform: none;
  }
  html.js .about-visual.reveal:not(.is-visible)::before { opacity: 1; transform: none; }
  html.js .reveal:not(.is-visible) .eyebrow > span,
  html.js .hero:not(.is-ready) .hero-eyebrow > span { transform: none; }

  /* Legacy hero keyframes start before the intro has finished. Suppress them;
     motion.js starts the replacement only after the intro contract completes. */
  html.js .hero:not(.is-ready) :is(.hero-eyebrow, .hero-line, .hero-copy > p, .hero-actions, .hero-proof, .hero-visual) {
    opacity: 1;
    transform: none;
  }
  html.js .hero:not(.is-ready) .hero-image-frame { clip-path: none; }
  html.js .hero:not(.is-ready) .hero-photo { transform: none; }
  html.js .hero :is(.hero-eyebrow, .hero-line, .hero-copy > p, .hero-actions, .hero-proof, .hero-visual, .hero-image-frame, .hero-photo, .hero-eyebrow > span) {
    animation: none !important;
  }
  /* Set the hero's starting position while it is still behind the overlay.
     The script removes this class and starts the tween in the same frame. */
  html.haro-hero-pending .hero :is(.hero-eyebrow, h1, .hero-copy > p, .hero-actions, .hero-proof) {
    transform: translateY(14px);
  }
  html.haro-hero-pending .hero .hero-visual { transform: translateY(18px); }
}

/* Do not let legacy reveal/hover transitions interpolate every GSAP frame.
   The class exists only during a tween; cleanup restores the prior inline
   values, so the original hover/focus transitions resume afterwards. */
html.js.haro-motion .haro-motion-pending { transition: none !important; }

.scroll-progress {
  position: fixed;
  z-index: 1001;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--tan, #B07A4A);
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
}

/* Keep existing hover/focus underlines; animate only the active nav marker. */
html.haro-motion .desktop-nav.haro-nav-tracker { position: relative; }
html.haro-motion .desktop-nav.haro-nav-tracker a[aria-current="location"]:not(:hover):not(:focus-visible)::after { right: 100%; }
.haro-nav-indicator {
  position: absolute;
  left: 0;
  bottom: 3px;
  width: 1px;
  height: 2px;
  opacity: 0;
  background: var(--tan, #B07A4A);
  pointer-events: none;
  transform-origin: left center;
}

/* The site's existing button sheen remains available without affecting the
   independently maintained service, gallery, feature or contact hover rules. */
html.haro-motion :is(.button:not(.button-outline), .mobile-menu .mobile-quote) { position: relative; overflow: hidden; }
html.haro-motion :is(.button:not(.button-outline), .mobile-menu .mobile-quote)::before {
  position: absolute;
  inset: -30% auto -30% 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  content: "";
  pointer-events: none;
  transform: translateX(-180%) skewX(-18deg);
}
@media (prefers-reduced-motion: no-preference) {
  html.haro-motion :is(.button:not(.button-outline), .mobile-menu .mobile-quote):not(:disabled):is(:hover, .haro-sheen)::before {
    animation: haro-sheen .9s ease-out both;
  }
}
@keyframes haro-sheen {
  from { transform: translateX(-180%) skewX(-18deg); }
  to { transform: translateX(420%) skewX(-18deg); }
}

@media (prefers-reduced-motion: reduce) {
  html.haro-motion .haro-nav-indicator { transition: none; }
}
