/* ==========================
   Core Motion Tokens
========================== */
:root {
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================
   Intersection Reveal
========================== */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.6s var(--ease-standard), transform 0.6s var(--ease-standard);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ==========================
   Scroll Indicator
========================== */
.scroll-indicator {
  animation: bounce-chevron 1.8s infinite;
}

@keyframes bounce-chevron {
  0%,
  100% {
    transform: translate(-50%, 0);
  }

  50% {
    transform: translate(-50%, 10px);
  }
}

/* ==========================
   Focus & Hover Helpers
========================== */
.btn,
.service-card,
.project-card,
.team-card,
.cert-card,
.social-link {
  will-change: transform;
}

/* ==========================
   Page Intro
========================== */
@keyframes page-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ==========================
   Home Micro Motion
========================== */
.home-page .hero-watermark {
  transform-origin: 70% 35%;
  animation: hero-watermark-drift 12s ease-in-out infinite alternate;
}

.home-page .hero-content {
  will-change: transform;
  animation: hero-copy-float 8.5s ease-in-out infinite;
}

.home-page .hero-visual {
  will-change: auto;
  animation: none;
}

.home-page .hero-photo {
  transform-origin: center;
  animation: none;
  transform: none;
}

.home-page .stats-bar {
  position: relative;
  overflow: hidden;
}

.home-page .stats-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: translateX(-180%);
  animation: stats-sheen 5.8s ease-in-out infinite;
}

.home-page .stats-bar.reveal.is-visible .stat-item {
  animation: stat-rise 0.65s var(--ease-standard) both;
}

.home-page .stats-bar.reveal.is-visible .stat-item:nth-child(1) { animation-delay: 0ms; }
.home-page .stats-bar.reveal.is-visible .stat-item:nth-child(2) { animation-delay: 80ms; }
.home-page .stats-bar.reveal.is-visible .stat-item:nth-child(3) { animation-delay: 160ms; }
.home-page .stats-bar.reveal.is-visible .stat-item:nth-child(4) { animation-delay: 240ms; }

.home-page .stats-bar .stat-number {
  transition: transform 0.22s ease;
}

.home-page .stats-bar .stat-item:hover .stat-number {
  transform: translateY(-2px) scale(1.03);
}

.home-page section.reveal .services-grid .service-card {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.45s var(--ease-standard), transform 0.45s var(--ease-standard);
}

.home-page section.reveal.is-visible .services-grid .service-card {
  opacity: 1;
  transform: translateY(0);
}

.home-page section.reveal.is-visible .services-grid .service-card:nth-child(1) { transition-delay: 0ms; }
.home-page section.reveal.is-visible .services-grid .service-card:nth-child(2) { transition-delay: 60ms; }
.home-page section.reveal.is-visible .services-grid .service-card:nth-child(3) { transition-delay: 120ms; }
.home-page section.reveal.is-visible .services-grid .service-card:nth-child(4) { transition-delay: 180ms; }
.home-page section.reveal.is-visible .services-grid .service-card:nth-child(5) { transition-delay: 240ms; }
.home-page section.reveal.is-visible .services-grid .service-card:nth-child(6) { transition-delay: 300ms; }

.home-page section.reveal.is-visible .services-grid .service-card .service-icon {
  animation: service-icon-pulse 3.2s ease-in-out infinite;
}

.home-page section.reveal.is-visible .services-grid .service-card:nth-child(1) .service-icon { animation-delay: 0ms; }
.home-page section.reveal.is-visible .services-grid .service-card:nth-child(2) .service-icon { animation-delay: 180ms; }
.home-page section.reveal.is-visible .services-grid .service-card:nth-child(3) .service-icon { animation-delay: 360ms; }
.home-page section.reveal.is-visible .services-grid .service-card:nth-child(4) .service-icon { animation-delay: 540ms; }
.home-page section.reveal.is-visible .services-grid .service-card:nth-child(5) .service-icon { animation-delay: 720ms; }
.home-page section.reveal.is-visible .services-grid .service-card:nth-child(6) .service-icon { animation-delay: 900ms; }

.home-page .why-block-photo .why-block-image {
  animation: why-photo-pan 11s ease-in-out infinite alternate;
}

/* ==========================
   Non-Home Motion
========================== */
body:not(.home-page) .page-hero {
  position: relative;
  overflow: hidden;
}

body:not(.home-page) .page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent, rgba(204, 16, 16, 0.08), transparent);
  transform: translateX(-160%);
  animation: nonhome-hero-sheen 9s ease-in-out infinite;
}

body:not(.home-page) .page-hero .accent-line {
  position: relative;
  overflow: hidden;
}

body:not(.home-page) .page-hero .accent-line::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-150%);
  animation: nonhome-accent-sweep 4.5s ease-in-out infinite;
}

body:not(.home-page) .page-hero .section-label {
  animation: nonhome-label-breathe 3.6s ease-in-out infinite;
}

body:not(.home-page) .nonhome-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1300;
  pointer-events: none;
  background: rgba(10, 10, 10, 0.45);
}

body:not(.home-page) .nonhome-scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--primary), #ef4444, #f59e0b);
  box-shadow: 0 0 12px rgba(204, 16, 16, 0.5);
}

body:not(.home-page) .why-block::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  pointer-events: none;
  background: radial-gradient(circle at 30% 25%, rgba(204, 16, 16, 0.24), transparent 55%);
  animation: nonhome-blob-drift 10s ease-in-out infinite alternate;
}

body:not(.home-page) .why-block-photo .why-block-image {
  animation: nonhome-photo-push 9.5s ease-in-out infinite alternate;
}

body:not(.home-page) section.reveal .service-card,
body:not(.home-page) section.reveal .project-card,
body:not(.home-page) section.reveal .team-card,
body:not(.home-page) section.reveal .cert-card,
body:not(.home-page) section.reveal .usp-item,
body:not(.home-page) section.reveal .timeline-item,
body:not(.home-page) section.reveal .portal-step-card,
body:not(.home-page) section.reveal .portal-shortcut-card,
body:not(.home-page) section.reveal .maintenance-card,
body:not(.home-page) section.reveal .tier-card,
body:not(.home-page) section.reveal .contract-type-card,
body:not(.home-page) section.reveal .rate-card,
body:not(.home-page) section.reveal .faq-item,
body:not(.home-page) section.reveal .location-topic-content {
  opacity: 0;
  transform: translateY(20px) scale(0.985) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: opacity 0.55s var(--ease-standard), transform 0.55s var(--ease-standard);
}

body:not(.home-page) section.reveal.is-visible .service-card,
body:not(.home-page) section.reveal.is-visible .project-card,
body:not(.home-page) section.reveal.is-visible .team-card,
body:not(.home-page) section.reveal.is-visible .cert-card,
body:not(.home-page) section.reveal.is-visible .usp-item,
body:not(.home-page) section.reveal.is-visible .timeline-item,
body:not(.home-page) section.reveal.is-visible .portal-step-card,
body:not(.home-page) section.reveal.is-visible .portal-shortcut-card,
body:not(.home-page) section.reveal.is-visible .maintenance-card,
body:not(.home-page) section.reveal.is-visible .tier-card,
body:not(.home-page) section.reveal.is-visible .contract-type-card,
body:not(.home-page) section.reveal.is-visible .rate-card,
body:not(.home-page) section.reveal.is-visible .faq-item,
body:not(.home-page) section.reveal.is-visible .location-topic-content {
  opacity: 1;
  transform: translateY(0) scale(1) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

body:not(.home-page) .interactive-card {
  position: relative;
  isolation: isolate;
  transform-style: preserve-3d;
  --spot-x: 50%;
  --spot-y: 50%;
  --spot-opacity: 0;
}

body:not(.home-page) .interactive-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: calc(var(--spot-opacity) * 0.9);
  transition: opacity 0.22s ease;
  background: radial-gradient(280px circle at var(--spot-x) var(--spot-y), rgba(230, 48, 48, 0.24), transparent 58%);
}

body:not(.home-page) .interactive-card > * {
  position: relative;
  z-index: 1;
}

body:not(.home-page) section.reveal.is-visible .service-card:nth-child(1),
body:not(.home-page) section.reveal.is-visible .project-card:nth-child(1),
body:not(.home-page) section.reveal.is-visible .team-card:nth-child(1),
body:not(.home-page) section.reveal.is-visible .cert-card:nth-child(1),
body:not(.home-page) section.reveal.is-visible .usp-item:nth-child(1),
body:not(.home-page) section.reveal.is-visible .timeline-item:nth-child(1),
body:not(.home-page) section.reveal.is-visible .portal-step-card:nth-child(1),
body:not(.home-page) section.reveal.is-visible .portal-shortcut-card:nth-child(1),
body:not(.home-page) section.reveal.is-visible .maintenance-card:nth-child(1),
body:not(.home-page) section.reveal.is-visible .tier-card:nth-child(1),
body:not(.home-page) section.reveal.is-visible .contract-type-card:nth-child(1),
body:not(.home-page) section.reveal.is-visible .rate-card:nth-child(1),
body:not(.home-page) section.reveal.is-visible .faq-item:nth-child(1) { transition-delay: 0ms; }
body:not(.home-page) section.reveal.is-visible .service-card:nth-child(2),
body:not(.home-page) section.reveal.is-visible .project-card:nth-child(2),
body:not(.home-page) section.reveal.is-visible .team-card:nth-child(2),
body:not(.home-page) section.reveal.is-visible .cert-card:nth-child(2),
body:not(.home-page) section.reveal.is-visible .usp-item:nth-child(2),
body:not(.home-page) section.reveal.is-visible .timeline-item:nth-child(2),
body:not(.home-page) section.reveal.is-visible .portal-step-card:nth-child(2),
body:not(.home-page) section.reveal.is-visible .portal-shortcut-card:nth-child(2),
body:not(.home-page) section.reveal.is-visible .maintenance-card:nth-child(2),
body:not(.home-page) section.reveal.is-visible .tier-card:nth-child(2),
body:not(.home-page) section.reveal.is-visible .contract-type-card:nth-child(2),
body:not(.home-page) section.reveal.is-visible .rate-card:nth-child(2),
body:not(.home-page) section.reveal.is-visible .faq-item:nth-child(2) { transition-delay: 80ms; }
body:not(.home-page) section.reveal.is-visible .service-card:nth-child(3),
body:not(.home-page) section.reveal.is-visible .project-card:nth-child(3),
body:not(.home-page) section.reveal.is-visible .team-card:nth-child(3),
body:not(.home-page) section.reveal.is-visible .cert-card:nth-child(3),
body:not(.home-page) section.reveal.is-visible .usp-item:nth-child(3),
body:not(.home-page) section.reveal.is-visible .timeline-item:nth-child(3),
body:not(.home-page) section.reveal.is-visible .portal-step-card:nth-child(3),
body:not(.home-page) section.reveal.is-visible .portal-shortcut-card:nth-child(3),
body:not(.home-page) section.reveal.is-visible .maintenance-card:nth-child(3),
body:not(.home-page) section.reveal.is-visible .tier-card:nth-child(3),
body:not(.home-page) section.reveal.is-visible .contract-type-card:nth-child(3),
body:not(.home-page) section.reveal.is-visible .rate-card:nth-child(3),
body:not(.home-page) section.reveal.is-visible .faq-item:nth-child(3) { transition-delay: 160ms; }
body:not(.home-page) section.reveal.is-visible .service-card:nth-child(4),
body:not(.home-page) section.reveal.is-visible .project-card:nth-child(4),
body:not(.home-page) section.reveal.is-visible .team-card:nth-child(4),
body:not(.home-page) section.reveal.is-visible .cert-card:nth-child(4),
body:not(.home-page) section.reveal.is-visible .usp-item:nth-child(4),
body:not(.home-page) section.reveal.is-visible .timeline-item:nth-child(4),
body:not(.home-page) section.reveal.is-visible .portal-step-card:nth-child(4),
body:not(.home-page) section.reveal.is-visible .portal-shortcut-card:nth-child(4),
body:not(.home-page) section.reveal.is-visible .maintenance-card:nth-child(4),
body:not(.home-page) section.reveal.is-visible .tier-card:nth-child(4),
body:not(.home-page) section.reveal.is-visible .contract-type-card:nth-child(4),
body:not(.home-page) section.reveal.is-visible .rate-card:nth-child(4),
body:not(.home-page) section.reveal.is-visible .faq-item:nth-child(4) { transition-delay: 240ms; }
body:not(.home-page) section.reveal.is-visible .service-card:nth-child(5),
body:not(.home-page) section.reveal.is-visible .project-card:nth-child(5),
body:not(.home-page) section.reveal.is-visible .team-card:nth-child(5),
body:not(.home-page) section.reveal.is-visible .cert-card:nth-child(5),
body:not(.home-page) section.reveal.is-visible .usp-item:nth-child(5),
body:not(.home-page) section.reveal.is-visible .timeline-item:nth-child(5),
body:not(.home-page) section.reveal.is-visible .portal-step-card:nth-child(5),
body:not(.home-page) section.reveal.is-visible .portal-shortcut-card:nth-child(5),
body:not(.home-page) section.reveal.is-visible .maintenance-card:nth-child(5),
body:not(.home-page) section.reveal.is-visible .tier-card:nth-child(5),
body:not(.home-page) section.reveal.is-visible .contract-type-card:nth-child(5),
body:not(.home-page) section.reveal.is-visible .rate-card:nth-child(5),
body:not(.home-page) section.reveal.is-visible .faq-item:nth-child(5) { transition-delay: 320ms; }
body:not(.home-page) section.reveal.is-visible .service-card:nth-child(6),
body:not(.home-page) section.reveal.is-visible .project-card:nth-child(6),
body:not(.home-page) section.reveal.is-visible .team-card:nth-child(6),
body:not(.home-page) section.reveal.is-visible .cert-card:nth-child(6),
body:not(.home-page) section.reveal.is-visible .usp-item:nth-child(6),
body:not(.home-page) section.reveal.is-visible .timeline-item:nth-child(6),
body:not(.home-page) section.reveal.is-visible .portal-step-card:nth-child(6),
body:not(.home-page) section.reveal.is-visible .portal-shortcut-card:nth-child(6),
body:not(.home-page) section.reveal.is-visible .maintenance-card:nth-child(6),
body:not(.home-page) section.reveal.is-visible .tier-card:nth-child(6),
body:not(.home-page) section.reveal.is-visible .contract-type-card:nth-child(6),
body:not(.home-page) section.reveal.is-visible .rate-card:nth-child(6),
body:not(.home-page) section.reveal.is-visible .faq-item:nth-child(6) { transition-delay: 400ms; }

body:not(.home-page) .service-card:hover,
body:not(.home-page) .project-card:hover,
body:not(.home-page) .team-card:hover,
body:not(.home-page) .cert-card:hover,
body:not(.home-page) .portal-step-card:hover,
body:not(.home-page) .portal-shortcut-card:hover,
body:not(.home-page) .maintenance-card:hover,
body:not(.home-page) .tier-card:hover,
body:not(.home-page) .contract-type-card:hover,
body:not(.home-page) .rate-card:hover,
body:not(.home-page) .faq-item:hover,
body:not(.home-page) .location-topic-content:hover {
  transform: translateY(-6px) scale(1.012) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

body:not(.home-page) section.reveal.is-visible .service-card .service-icon {
  animation: nonhome-service-icon-float 2.5s ease-in-out infinite;
}

body:not(.home-page) section.reveal.is-visible .service-card:nth-child(1) .service-icon { animation-delay: 0ms; }
body:not(.home-page) section.reveal.is-visible .service-card:nth-child(2) .service-icon { animation-delay: 140ms; }
body:not(.home-page) section.reveal.is-visible .service-card:nth-child(3) .service-icon { animation-delay: 280ms; }
body:not(.home-page) section.reveal.is-visible .service-card:nth-child(4) .service-icon { animation-delay: 420ms; }
body:not(.home-page) section.reveal.is-visible .service-card:nth-child(5) .service-icon { animation-delay: 560ms; }
body:not(.home-page) section.reveal.is-visible .service-card:nth-child(6) .service-icon { animation-delay: 700ms; }

body:not(.home-page) section.reveal.is-visible .timeline-year {
  animation: nonhome-timeline-pulse 2.9s ease-in-out infinite;
}

@keyframes hero-watermark-drift {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0.035;
  }
  100% {
    transform: translate3d(-24px, 16px, 0) rotate(-4deg);
    opacity: 0.075;
  }
}

@keyframes hero-photo-breathe {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.075) translate3d(6px, -4px, 0);
  }
}

@keyframes hero-card-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes hero-copy-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -6px, 0);
  }
}

@keyframes stat-rise {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes service-icon-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(204, 16, 16, 0);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(204, 16, 16, 0.08);
  }
}

@keyframes stats-sheen {
  0%,
  12% {
    transform: translateX(-180%);
  }
  45%,
  100% {
    transform: translateX(380%);
  }
}

@keyframes why-photo-pan {
  0% {
    transform: scale(1.03) translate3d(-1.5%, 0, 0);
  }
  100% {
    transform: scale(1.1) translate3d(1.5%, -1.5%, 0);
  }
}

@keyframes nonhome-hero-sheen {
  0%,
  10% {
    transform: translateX(-160%);
  }
  45%,
  100% {
    transform: translateX(260%);
  }
}

@keyframes nonhome-accent-sweep {
  0%,
  25% {
    transform: translateX(-150%);
  }
  75%,
  100% {
    transform: translateX(250%);
  }
}

@keyframes nonhome-label-breathe {
  0%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    opacity: 0.86;
    transform: translateY(-1px);
  }
}

@keyframes nonhome-blob-drift {
  0% {
    transform: translate3d(-5%, -3%, 0) scale(1);
  }
  100% {
    transform: translate3d(6%, 4%, 0) scale(1.08);
  }
}

@keyframes nonhome-photo-push {
  0% {
    transform: scale(1.02) translate3d(-1.5%, 0, 0);
  }
  100% {
    transform: scale(1.08) translate3d(1.5%, -1.2%, 0);
  }
}

@keyframes nonhome-service-icon-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(204, 16, 16, 0);
  }
  50% {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 0 0 9px rgba(204, 16, 16, 0.08);
  }
}

@keyframes nonhome-timeline-pulse {
  0%,
  100% {
    transform: translateY(0);
    text-shadow: 0 0 0 rgba(204, 16, 16, 0);
  }
  50% {
    transform: translateY(-1px);
    text-shadow: 0 0 10px rgba(204, 16, 16, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.home-page) .nonhome-scroll-progress {
    display: none;
  }

  body:not(.home-page) .page-hero::after,
  body:not(.home-page) .page-hero .accent-line::after,
  body:not(.home-page) .page-hero .section-label,
  body:not(.home-page) .why-block::before,
  body:not(.home-page) .why-block-photo .why-block-image,
  body:not(.home-page) section.reveal.is-visible .service-card .service-icon,
  body:not(.home-page) section.reveal.is-visible .timeline-year {
    animation: none;
  }

  body:not(.home-page) section.reveal .service-card,
  body:not(.home-page) section.reveal .project-card,
  body:not(.home-page) section.reveal .team-card,
  body:not(.home-page) section.reveal .cert-card,
  body:not(.home-page) section.reveal .usp-item,
  body:not(.home-page) section.reveal .timeline-item,
  body:not(.home-page) section.reveal .portal-step-card,
  body:not(.home-page) section.reveal .portal-shortcut-card,
  body:not(.home-page) section.reveal .maintenance-card,
  body:not(.home-page) section.reveal .tier-card,
  body:not(.home-page) section.reveal .contract-type-card,
  body:not(.home-page) section.reveal .rate-card,
  body:not(.home-page) section.reveal .faq-item,
  body:not(.home-page) section.reveal .location-topic-content {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .home-page .hero-content,
  .home-page .hero-visual,
  .home-page .hero-watermark,
  .home-page .hero-photo,
  .home-page .stats-bar::after,
  .home-page .stats-bar .stat-item,
  .home-page section.reveal.is-visible .services-grid .service-card .service-icon,
  .home-page .why-block-photo .why-block-image {
    animation: none;
  }

  .home-page section.reveal .services-grid .service-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
