/* Royal Concrete Patching — custom motion and polish */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.75rem;
}

.site-logo {
  background: transparent;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  border-radius: 0.5rem;
  background: #d97706;
  padding: 0.5rem 1rem;
  color: #fff;
}

.skip-link:focus {
  top: 1rem;
}

#site-header {
  transition:
    background-color 0.35s ease,
    box-shadow 0.35s ease,
    backdrop-filter 0.35s ease,
    border-color 0.35s ease;
}

#site-header.is-scrolled {
  background: rgba(17, 17, 17, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

.hero-fade {
  animation: heroFade 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-fade-delay-1 { animation-delay: 0.15s; }
.hero-fade-delay-2 { animation-delay: 0.3s; }
.hero-fade-delay-3 { animation-delay: 0.45s; }
.hero-fade-delay-4 { animation-delay: 0.6s; }

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

#hero-slider {
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.15s ease;
}

.hero-slide.is-active {
  z-index: 1;
  opacity: 1;
}

.hero-slide img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide.is-active img {
  animation: kenBurns 8s ease-out forwards;
}

@keyframes kenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}

.hero-dot {
  position: relative;
  width: 52px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: inherit;
  background: #f59e0b;
}

.hero-dot.is-active::after {
  animation: heroProgress 7s linear forwards;
}

@keyframes heroProgress {
  from { width: 0; }
  to { width: 100%; }
}

.float-slow {
  animation: floatSlow 8s ease-in-out infinite;
}

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

.lift-card {
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease,
    border-color 0.3s ease;
}

.lift-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px -20px rgba(217, 119, 6, 0.35);
}

.project-card img {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card:hover img,
.project-card:focus-within img {
  transform: scale(1.08);
}

.project-card .overlay {
  opacity: 1;
}

.gallery-filter {
  border-radius: 999px;
  border: 1px solid #e7e5e4;
  background: #fff;
  padding: 0.55rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #111;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.gallery-filter:hover,
.gallery-filter.is-active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.gallery-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item.is-hidden {
  display: none;
}

.gallery-page-btn {
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d6d3d1;
  background: #fff;
  color: #111;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.gallery-page-btn:hover:not(:disabled) {
  border-color: #d97706;
  background: #fffbeb;
  color: #d97706;
}

.gallery-page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  padding: 1.5rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-height: 80vh;
  max-width: min(92vw, 1100px);
  border-radius: 1rem;
  object-fit: contain;
}

.lightbox-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.lightbox-close { top: 1.25rem; right: 1.25rem; }
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: #f59e0b;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

#mobile-nav {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease;
}

#mobile-nav.is-open {
  max-height: 520px;
  opacity: 1;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#testimonial-track {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: flex;
  height: 3.75rem;
  width: 3.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-size: 1.85rem;
  box-shadow: 0 12px 30px rgba(18, 140, 126, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
  animation: whatsappPulse 2s ease-out infinite;
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 36px rgba(18, 140, 126, 0.5);
}

@keyframes whatsappPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.process-line {
  background: linear-gradient(180deg, #d97706, #f59e0b, #fbbf24);
}

@media (min-width: 768px) {
  .process-line-h {
    background: linear-gradient(90deg, #d97706, #f59e0b, #fbbf24);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
