/* Motion and transitions matching AKHAIHA timing and easing */

/* Header scrolled elevation */
.site-header.scrolled {
  box-shadow: 0 4px 16px rgba(1, 35, 95, 0.08);
}

/* Button fill sweep on hover and keyboard focus */
.btn {
  overflow: hidden;
  background-image: linear-gradient(var(--btn-sweep, transparent), var(--btn-sweep, transparent));
  background-repeat: no-repeat;
  background-position: left center;
  background-origin: border-box;
  background-size: 0 100%;
  transition: background-size 0.42s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease, border-color 0.3s ease, opacity 0.2s ease;
}

.btn-primary {
  --btn-sweep: var(--navy);
}

.btn-secondary {
  --btn-sweep: var(--blue);
}

.btn:hover,
.btn:focus-visible {
  background-size: 100% 100%;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--orange);
  color: #ffffff;
  border-color: var(--navy);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background-color: transparent;
  color: #ffffff;
  border-color: var(--blue);
}

/* Slideshow crossfade */
.hero-slide {
  transition: opacity 0.6s ease;
}

.hero-slide.is-leaving {
  opacity: 1;
  z-index: 1;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

/* Hero letters intro */
.hero-copy .w {
  display: inline-block;
  white-space: nowrap;
}

.hero-copy .l {
  display: inline-block;
  transition: opacity 0.8s ease var(--t, 0s), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--t, 0s);
}

.hero-company-logo {
  transition: opacity 0.8s ease 0.08s, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s;
}

.js.motion-ready .hero:not(.hero-go) .hero-company-logo,
.js.motion-ready .hero:not(.hero-go) .hero-company .l,
.js.motion-ready .hero:not(.hero-go) .hero-eyebrow .l,
.js.motion-ready .hero:not(.hero-go) h1 .l {
  opacity: 0;
  transform: translateY(0.12em);
}

.hero-lead,
.hero-actions {
  transition: opacity 0.9s ease var(--ht, 0.9s), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--ht, 0.9s);
}

.js.motion-ready .hero:not(.hero-go) .hero-lead,
.js.motion-ready .hero:not(.hero-go) .hero-actions {
  opacity: 0;
  transform: translateY(12px);
}

/* Keep hero actions clickable even during the intro transition */
.hero-actions,
.hero-actions .btn {
  pointer-events: auto;
}

/* Scroll reveals */
.rv {
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js.motion-ready .rv:not(.in) {
  opacity: 0;
  transform: translateY(14px);
}

/* Safety fallback if script fails after setting .js */
.rv-all .rv,
.rv-all .hero-company-logo,
.rv-all .hero-company .l,
.rv-all .hero-eyebrow .l,
.rv-all .hero h1 .l,
.rv-all .hero-lead,
.rv-all .hero-actions {
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .hero-slide,
  .hero-company-logo,
  .hero-copy .l,
  .hero-lead,
  .hero-actions,
  .rv {
    transition: none !important;
  }

  .js.motion-ready .rv:not(.in),
  .js.motion-ready .hero:not(.hero-go) .hero-company-logo,
  .js.motion-ready .hero:not(.hero-go) .hero-company .l,
  .js.motion-ready .hero:not(.hero-go) .hero-eyebrow .l,
  .js.motion-ready .hero:not(.hero-go) h1 .l,
  .js.motion-ready .hero:not(.hero-go) .hero-lead,
  .js.motion-ready .hero:not(.hero-go) .hero-actions {
    opacity: 1;
    transform: none;
  }
}