.hero-slide {
    opacity: 0;
    transition: opacity 1s ease-in-out;
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.hero-slide.active {
    opacity: 1;
}

.project-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}
.project-slideshow .slide {
    opacity: 0;
    transition: opacity 1s ease-in-out;
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.project-slideshow .slide.active {
    opacity: 1;
}

body.locked { overflow: hidden; height: 100vh; }

#intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0C2C40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10;
  overflow: hidden;
  will-change: transform;
}

#intro-grid .cell:nth-child(5) {
  transform: rotate(180deg);
}

#intro-grid {
  display: grid;
  grid-template-columns: repeat(3, clamp(64px, 11vw, 128px));
  grid-template-rows: repeat(3, clamp(64px, 11vw, 128px));
  gap: clamp(8px, 1.6vw, 16px);
}
.cell {
  position: relative;
  width: 100%; height: 100%;
  background: transparent;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .5s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1);
}
.cell.on { opacity: 1; transform: scale(1); }
.cell.solid.orange { background: #F99E33; }
.cell.solid.navy { background: #145A85; }
.cell.tri { background: transparent; overflow: hidden; }
.cell.tri::after {
  content: '';
  position: absolute; inset: 0;
  background: #F99E33;
}
.cell.tri-tl::after { clip-path: polygon(0 0, 100% 0, 0 100%); }
.cell.tri-br::after { clip-path: polygon(100% 0, 100% 100%, 0 100%); }

#intro-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
#intro-word.on { opacity: 1; transform: translateY(0); }
#intro-word img {
  height: clamp(48px, 6vw, 80px);
  width: auto;
}
#intro-word span {
  font-family: 'Archivo', sans-serif; font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.16em; color: #7FA6BE; text-transform: uppercase;
}

#intro.leaving {
  animation: introOut .8s cubic-bezier(.6,0,.2,1) forwards;
  animation-delay: .15s;
}
@keyframes introOut {
  to { transform: translateY(-100%); }
}
#intro.hidden { display: none; }

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.project-card {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.project-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }

  @keyframes pulse {
    0%, 100% {
      opacity: 0.5;
    }
    50% {
      opacity: 1;
    }
  }

  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }

  .scrollbar-with-indicator {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255, 255, 255, 0.5) transparent !important;
  }

  .scrollbar-with-indicator::-webkit-scrollbar {
    display: block !important;
    height: 6px !important;
  }

  .scrollbar-with-indicator::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1) !important;
  }

  .scrollbar-with-indicator::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5) !important;
    border-radius: 3px !important;
  }

  .scrollbar-with-indicator::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.7) !important;
  }

  .scrollbar-hide.sm\:scrollbar-with-indicator::-webkit-scrollbar {
    display: block !important;
    height: 6px !important;
  }

  .scrollbar-hide.sm\:scrollbar-with-indicator {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255, 255, 255, 0.5) transparent !important;
  }
}

.bg-services {
    position: relative;
}

.bg-services::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('bg-services.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(3px);
    z-index: -1;
}

.bg-services::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 90, 133, 1);
    z-index: -1;
}
