/* ==========================================================================
   Motion & interaction layer
   Loaded after style.css. All movement is disabled for users with
   prefers-reduced-motion; scroll reveals only engage when JS adds
   .motion-ready to <html>, so content is never hidden without JS.
   ========================================================================== */

:root {
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-snap: cubic-bezier(0.34, 1.4, 0.64, 1);
  --dur-fast: 160ms;
  --dur-med: 300ms;
  --dur-reveal: 650ms;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.btn:hover {
  transform: translateY(-0.125rem);
}

.btn:active {
  transform: translateY(0) scale(0.985);
  transition-duration: 80ms;
}

.btn svg {
  transition: transform var(--dur-fast) var(--ease-out);
}

.btn:hover svg {
  transform: translateX(0.25rem);
}

.btn--solid:hover {
  background: var(--blue-500);
  box-shadow: 0 0.875rem 1.875rem rgba(7, 94, 209, 0.34);
}

.btn--outline:hover {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: #fff;
}

.btn--ghost:hover {
  background: rgba(0, 17, 44, 0.42);
  border-color: #fff;
}

.btn--light:hover {
  box-shadow: 0 0.875rem 1.875rem rgba(0, 23, 78, 0.2);
}

.btn:focus-visible,
.play-button:focus-visible,
.sws-whatsapp-widget:focus-visible {
  outline: 0.125rem solid var(--blue-500);
  outline-offset: 0.1875rem;
}

/* --------------------------------------------------------------------------
   Primary nav — sliding underline
   -------------------------------------------------------------------------- */

.primary-nav > a {
  position: relative;
  transition: color var(--dur-fast) var(--ease-out);
}

.primary-nav > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.375rem;
  height: 0.1875rem;
  border-radius: 62.4375rem;
  background: var(--blue-500);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-med) var(--ease-out);
}

.primary-nav > a:hover {
  color: var(--blue-600);
}

.primary-nav > a:hover::after,
.primary-nav > a:first-child::after {
  transform: scaleX(1);
}

.mobile-menu__nav a {
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.mobile-menu__nav a:hover {
  border-color: var(--blue-500);
  background: var(--soft);
}

.mobile-menu__nav a i,
.mobile-menu__nav a svg {
  transition: transform var(--dur-fast) var(--ease-out);
}

.mobile-menu__nav a:hover i,
.mobile-menu__nav a:hover svg {
  transform: translateX(0.25rem);
}

/* --------------------------------------------------------------------------
   Top strip — pause ticker on touch/hover (mobile only, where it animates)
   -------------------------------------------------------------------------- */

.top-strip:hover .top-strip__inner {
  animation-play-state: paused;
}

/* --------------------------------------------------------------------------
   Hero — staggered entrance + slow settle on the background
   -------------------------------------------------------------------------- */

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(1.625rem);
  }
}

@keyframes heroSettle {
  from {
    transform: scale(1.07);
  }
  to {
    transform: scale(1);
  }
}

.hero .eyebrow,
.hero h1,
.hero p:not(.eyebrow),
.hero__actions {
  animation: heroRise 0.7s var(--ease-out) both;
}

.hero h1 {
  animation-delay: 90ms;
}

.hero p:not(.eyebrow) {
  animation-delay: 180ms;
}

.hero__actions {
  animation-delay: 270ms;
}

.hero__image {
  animation: heroSettle 10s var(--ease-out) both;
}

/* --------------------------------------------------------------------------
   Scroll reveals (JS adds .motion-ready to <html> and .in-view per element;
   --stagger is set inline per element by the script)
   -------------------------------------------------------------------------- */

html.motion-ready .reveal {
  opacity: 0;
  transform: translateY(1.625rem);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--stagger, 0ms);
}

html.motion-ready .reveal.in-view {
  opacity: 1;
  transform: none;
}

/* Section-title accent bar grows in once revealed */
html.motion-ready .section-title h2::after {
  transform: scaleX(0);
  transition: transform 0.55s var(--ease-out) 0.35s;
}

html.motion-ready .section-title.in-view h2::after {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   Trust panel
   -------------------------------------------------------------------------- */

.line-icon {
  transition:
    background-color var(--dur-med) var(--ease-out),
    color var(--dur-med) var(--ease-out),
    transform var(--dur-med) var(--ease-snap);
}

.trust-panel article:hover .line-icon {
  background: #0d6fff;
  color: #fff;
  transform: translateY(-0.1875rem);
}

/* --------------------------------------------------------------------------
   Service cards
   -------------------------------------------------------------------------- */

.service-card {
  transition:
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out),
    border-color var(--dur-med) var(--ease-out);
}

.service-card:hover {
  transform: translateY(-0.375rem);
  border-color: rgba(10, 108, 240, 0.4);
  box-shadow: var(--shadow);
}

.service-card img {
  transition: transform 0.55s var(--ease-out);
}

.service-card:hover img {
  transform: scale(1.05);
}

.service-card h3 {
  transition: color var(--dur-fast) var(--ease-out);
}

.service-card:hover h3 {
  color: var(--blue-600);
}

.service-card a svg {
  transition: transform var(--dur-fast) var(--ease-out);
}

.service-card a:hover svg {
  transform: translateX(0.25rem);
}

/* --------------------------------------------------------------------------
   Video band — pulsing play button
   -------------------------------------------------------------------------- */

@keyframes playPulse {
  from {
    transform: scale(1);
    opacity: 0.85;
  }
  to {
    transform: scale(1.55);
    opacity: 0;
  }
}

.play-button {
  cursor: pointer;
  transition:
    transform var(--dur-med) var(--ease-snap),
    background-color var(--dur-med) var(--ease-out);
}

.play-button::before {
  content: "";
  position: absolute;
  inset: -0.125rem;
  border-radius: 50%;
  border: 0.125rem solid rgba(255, 255, 255, 0.55);
  animation: playPulse 2.4s var(--ease-out) infinite;
  pointer-events: none;
}

.play-button:hover {
  transform: scale(1.07);
  background: rgba(0, 14, 34, 0.55);
}

/* --------------------------------------------------------------------------
   Process cards
   -------------------------------------------------------------------------- */

.process-card {
  transition:
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out);
}

.process-card:hover {
  transform: translateY(-0.375rem);
  box-shadow: 0 1.5rem 3.5rem rgba(9, 31, 68, 0.18);
}

.process-card__top span {
  transition:
    background-color var(--dur-med) var(--ease-out),
    transform var(--dur-med) var(--ease-snap);
}

.process-card:hover .process-card__top span {
  background: var(--blue-500);
  transform: scale(1.08);
}

.process-card__icon,
.process-card__icon.svg-inline--fa {
  transition: transform var(--dur-med) var(--ease-snap);
}

.process-card:hover .process-card__icon {
  transform: translateY(-0.1875rem);
}

/* --------------------------------------------------------------------------
   Client logos — colour on hover
   -------------------------------------------------------------------------- */

.brand {
  transition:
    transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out);
}

.brand__img {
  filter: grayscale(1);
  opacity: 0.72;
  transition:
    filter var(--dur-med) var(--ease-out),
    opacity var(--dur-med) var(--ease-out);
}

.brand:hover {
  transform: translateY(-0.1875rem);
  box-shadow: 0 0.875rem 2rem rgba(9, 31, 68, 0.1);
}

.brand:hover .brand__img {
  filter: grayscale(0);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer-grid a,
.footer-links a {
  transition:
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.footer-grid a:hover,
.footer-links a:hover {
  color: #fff;
  transform: translateX(0.1875rem);
}

.footer-grid .footer-button,
.site-footer--v2 .footer-button {
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.footer-grid .footer-button:hover,
.site-footer--v2 .footer-button:hover {
  background: #fff;
  color: var(--blue-800);
  transform: none;
}

.social-links a {
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-snap);
}

.social-links a:hover {
  background: var(--blue-500);
  color: #fff;
  transform: scale(1.18);
}

/* --------------------------------------------------------------------------
   WhatsApp bubble — gentle attention pulse
   -------------------------------------------------------------------------- */

@keyframes whatsappPing {
  0% {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.24), 0 0 0 0 rgba(32, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.24), 0 0 0 0.875rem rgba(32, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.24), 0 0 0 0 rgba(32, 211, 102, 0);
  }
}

/* --------------------------------------------------------------------------
   Reduced motion — switch everything off
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  html.motion-ready .reveal {
    opacity: 1;
    transform: none;
  }

  html.motion-ready .section-title h2::after {
    transform: scaleX(1);
  }
}
