/* Site-wide motion — Riverrine landing */
:root {
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-fast: 0.35s;
  --motion-med: 0.7s;
}

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

/* Scroll reveal base — transform only (no layout/reflow); do not animate height */
.motion-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity var(--motion-med) var(--motion-ease),
    transform var(--motion-med) var(--motion-ease);
  /* Avoid will-change promoting layers that fight sticky/scroll anchoring */
  overflow-anchor: none;
}

.motion-reveal.is-in {
  opacity: 1;
  transform: none;
}

.motion-reveal.from-left { transform: translateX(-40px); }
.motion-reveal.from-right { transform: translateX(40px); }
.motion-reveal.from-scale { transform: scale(0.92); }
.motion-reveal.from-left.is-in,
.motion-reveal.from-right.is-in,
.motion-reveal.from-scale.is-in {
  transform: none;
}

.motion-delay-1 { transition-delay: 0.08s; }
.motion-delay-2 { transition-delay: 0.16s; }
.motion-delay-3 { transition-delay: 0.24s; }
.motion-delay-4 { transition-delay: 0.32s; }
.motion-delay-5 { transition-delay: 0.4s; }
.motion-delay-6 { transition-delay: 0.48s; }

/* Section titles — single underline accent */
.section-header .section-title {
  position: relative;
  display: inline-block;
}

.section-header.motion-reveal.is-in .section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 12px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #0d9488, #1ab7d8);
  animation: motionUnderline 0.7s var(--motion-ease) both;
}

@keyframes motionUnderline {
  from { width: 0; opacity: 0; }
  to { width: 56px; opacity: 1; }
}

/* Services cards */
#services .services-item {
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    border-color var(--motion-fast) ease;
  border: 1px solid transparent;
  border-radius: 8px;
}

#services .services-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(13, 148, 136, 0.14);
  border-color: rgba(13, 148, 136, 0.25);
}

#services .services-item .icon {
  transition: transform 0.45s var(--motion-ease), box-shadow 0.45s ease;
}

#services .services-item:hover .icon {
  transform: scale(1.08);
  box-shadow: 0 10px 24px rgba(26, 183, 216, 0.22);
}

#services .services-item .icon i {
  display: inline-block;
  animation: motionIconFloat 3.6s ease-in-out infinite;
}

#services .col-lg-4:nth-child(2n) .services-item .icon i {
  animation-delay: 0.4s;
}
#services .col-lg-4:nth-child(3n) .services-item .icon i {
  animation-delay: 0.8s;
}

@keyframes motionIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Features */
#features .featured-box {
  transition:
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease);
  border-radius: 8px;
  padding: 8px;
}

#features .featured-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(15, 42, 50, 0.08);
}

#features .featured-icon {
  transition: transform 0.45s var(--motion-ease);
}

#features .featured-box:hover .featured-icon {
  transform: scale(1.1);
}

#features .featured-icon i {
  display: inline-block;
  transition: color 0.3s ease;
}

#features .featured-box:hover .featured-icon i {
  animation: motionPop 0.55s var(--motion-ease);
}

@keyframes motionPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Call to action */
.call-action .cta-trial {
  transition: transform var(--motion-med) var(--motion-ease);
}

.call-action .btn-common {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--motion-ease), box-shadow 0.25s ease;
}

.call-action .btn-common:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 28px rgba(13, 148, 136, 0.32);
}

/* Why Choose Us hero motions */
.why-choose-hero .why-choose-brand {
  animation: whyBrandIn 0.9s var(--motion-ease) both;
}

.why-choose-hero .why-choose-lead {
  animation: whyBrandIn 0.9s var(--motion-ease) 0.12s both;
}

.why-choose-hero .why-choose-actions {
  animation: whyBrandIn 0.9s var(--motion-ease) 0.22s both;
}

@keyframes whyBrandIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .why-choose-hero .why-choose-brand,
  .why-choose-hero .why-choose-lead,
  .why-choose-hero .why-choose-actions {
    animation: none;
  }
}

/* Video promo */
.video-promo .video-popup i {
  transition: transform 0.35s var(--motion-ease);
  animation: motionPlayPulse 2.4s ease-in-out infinite;
}

.video-promo .video-popup:hover i {
  transform: scale(1.12);
}

@keyframes motionPlayPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35); }
  50% { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); }
}

/* Counters */
.counters .facts-item {
  transition: transform var(--motion-fast) var(--motion-ease);
}

.counters .facts-item:hover {
  transform: translateY(-6px);
}

.counters .facts-item .icon i {
  display: inline-block;
  animation: motionIconFloat 3.2s ease-in-out infinite;
}

.counters .facts-item.is-in .fact-count h3 {
  animation: motionCountIn 0.7s var(--motion-ease) both;
}

@keyframes motionCountIn {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

/* Team / testimonials */
.team-member-card {
  transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) ease;
}

.team-member-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(26, 183, 216, 0.16);
}

.team-member-photo img {
  transition: transform 0.5s var(--motion-ease), filter 0.5s ease;
}

.team-member-card:hover .team-member-photo img {
  transform: scale(1.03);
  filter: saturate(1.08);
}

.testimonial-item {
  transition: transform var(--motion-fast) var(--motion-ease), box-shadow var(--motion-fast) ease;
}

.testimonial-item:hover {
  transform: translateY(-6px);
}

.testimonial-item .img-thumb img {
  transition: transform 0.5s var(--motion-ease), filter 0.5s ease;
}

.testimonial-item:hover .img-thumb img {
  transform: scale(1.03);
  filter: saturate(1.08);
}

/* Subscribe & contact */
#subscribe .form-control,
#contact .form-control {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

#subscribe .form-control:focus,
#contact .form-control:focus {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.16);
}

#contact .btn,
#subscribe .btn {
  transition: transform 0.25s var(--motion-ease), box-shadow 0.25s ease;
}

#contact .btn:hover,
#subscribe .btn:hover {
  transform: translateY(-2px);
}

.btn-login-nav {
  position: relative;
  overflow: hidden;
}

.btn-quote-nav {
  transition: transform 0.25s var(--motion-ease), filter 0.25s ease !important;
}

.back-to-top {
  transition: transform 0.25s var(--motion-ease), opacity 0.25s ease !important;
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.06);
}

.navbar-brand {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(0.85rem, 1.8vw, 1.15rem) !important;
  line-height: 1.2;
  max-width: min(520px, 78vw);
  white-space: normal;
}

.navbar-brand .brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
}
