/* ============================================================
   STRATA Engineering & Consulting — Animations Stylesheet
   ============================================================
   1.  Reveal Classes (scroll-triggered)
   2.  Hero Carousel / Swiper
   3.  Blueprint Line Drawing
   4.  Hover Animations
   5.  Loader Animation
   6.  Special Transitions
   ============================================================ */


/* ============================================================
   1. REVEAL CLASSES (scroll-triggered)
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal="left"] {
  transform: translateX(-30px);
}

[data-reveal="right"] {
  transform: translateX(30px);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translate(0, 0);
}

[data-reveal-delay="100"] { transition-delay: 0.1s; }
[data-reveal-delay="200"] { transition-delay: 0.2s; }
[data-reveal-delay="300"] { transition-delay: 0.3s; }
[data-reveal-delay="400"] { transition-delay: 0.4s; }
[data-reveal-delay="500"] { transition-delay: 0.5s; }
[data-reveal-delay="600"] { transition-delay: 0.6s; }


/* ============================================================
   2. HERO CAROUSEL / SWIPER
   ============================================================ */

.hero-swiper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-swiper .swiper-wrapper {
  height: 100%;
}

.hero-slide {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.hero-slide:not(.swiper-slide-active) {
  pointer-events: none !important;
}

.hero-slide.swiper-slide-active {
  z-index: 10 !important;
  pointer-events: auto !important;
}

.hero-slide .hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 51, 0.78);
  z-index: 1;
}

.hero-slide .hero__grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 79px,
      rgba(255, 255, 255, 0.04) 79px,
      rgba(255, 255, 255, 0.04) 80px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 79px,
      rgba(255, 255, 255, 0.04) 79px,
      rgba(255, 255, 255, 0.04) 80px
    );
  pointer-events: none;
}

.hero-slide .hero__content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 820px;
}

/* Swiper navigation buttons */
.hero-swiper-next,
.hero-swiper-prev {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(11, 31, 51, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white, #FFFFFF);
  cursor: pointer;
  z-index: 10;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-swiper-next::after,
.hero-swiper-prev::after {
  font-size: 1rem;
  font-weight: 700;
}

.hero-swiper-next {
  right: 2rem;
}

.hero-swiper-prev {
  left: 2rem;
}

.hero-swiper-next:hover,
.hero-swiper-prev:hover {
  background: var(--accent, #D67A2E);
  border-color: var(--accent, #D67A2E);
  transform: translateY(-50%) scale(1.05);
}

/* Swiper pagination */
.hero-swiper-pagination {
  bottom: 5rem !important;
  z-index: 10;
}

.hero-swiper .swiper-pagination-bullet {
  width: 32px;
  height: 2px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
  transition: all 0.35s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
  background: var(--accent, #D67A2E);
  width: 48px;
}




/* ============================================================
   3. BLUEPRINT LINE DRAWING
   ============================================================ */

.blueprint-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 2.5s ease forwards;
}

.blueprint-line.is-drawn {
  animation: drawLine 2.5s ease forwards;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

.bim-node {
  animation: nodePulse 2s ease infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes nodePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}


/* ============================================================
   4. HOVER ANIMATIONS
   ============================================================ */

.service-card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
}

.service-card:hover {
  transform: translateY(-6px);
}

.project-card__image {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-card__image {
  transform: scale(1.04);
}

.industry-tile {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.industry-tile:hover {
  transform: translateY(-2px);
}

/* Nav link underline animation */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 1px;
  background: var(--accent, #D67A2E);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* Button hover sweep */
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover::before {
  transform: translateX(100%);
}


/* ============================================================
   5. LOADER ANIMATION
   ============================================================ */

.page-loader {
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo-mark {
  animation: loaderRotate 2s linear infinite;
}

@keyframes loaderRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loader-progress {
  transition: width 0.15s linear;
}


/* ============================================================
   6. SPECIAL TRANSITIONS
   ============================================================ */

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 51, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-overlay__inner {
  width: 100%;
  max-width: 720px;
  padding: 2rem;
  position: relative;
}

.search-overlay__close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white, #FFFFFF);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.35s ease;
}

.search-overlay__close:hover {
  background: var(--accent, #D67A2E);
  border-color: var(--accent, #D67A2E);
}

.search-overlay__form {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 1rem;
}

.search-overlay__form input {
  flex: 1;
  background: none;
  border: none;
  color: var(--white, #FFFFFF);
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.5rem;
  outline: none;
}

.search-overlay__form input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Page transition */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--dark, #111820);
  z-index: 9998;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.page-transition.is-active {
  transform: translateY(0);
  pointer-events: all;
}

/* Marquee */
.marquee-track {
  animation: marqueeScroll 30s linear infinite;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }

  .bim-node {
    animation: none;
  }

  .loader-logo-mark {
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }


}
