/* ALCA Models — Page Animations */

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

  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Page loader ── */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--bg);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

.page-loader-bar {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.page-loader-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  background: var(--teal);
  border-radius: 3px;
  animation: loaderSlide 1.2s ease-in-out infinite;
}

.page-loader-logo {
  height: 40px;
  width: auto;
  animation: loaderPulse 1.2s ease-in-out infinite;
}

@keyframes loaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

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

/* ── Scroll reveal base ── */
[data-animate] {
  opacity: 0;
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}

[data-animate].is-visible {
  opacity: 1;
  transform: none !important;
}

[data-animate="fade-up"] {
  transform: translateY(48px);
}

[data-animate="fade-down"] {
  transform: translateY(-32px);
}

[data-animate="fade-left"] {
  transform: translateX(-48px);
}

[data-animate="fade-right"] {
  transform: translateX(48px);
}

[data-animate="scale-in"] {
  transform: scale(0.88);
}

[data-animate="zoom-in"] {
  transform: scale(1.08);
}

[data-animate="flip-up"] {
  transform: perspective(800px) rotateX(12deg) translateY(40px);
}

/* ── Hero load sequence ── */
body:not(.is-loaded) .header {
  opacity: 0;
  transform: translateY(-24px);
}

body.is-loaded .header {
  animation: headerDrop 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.is-loaded .nav-brand img {
  animation: logoIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s backwards;
}

@keyframes logoIn {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.header {
  transition: padding 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.header.scrolled .navbar {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.header.scrolled .nav-brand img {
  height: 36px;
  transition: height 0.4s ease;
}

@keyframes headerDrop {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate {
  opacity: 0;
}

body.is-loaded .hero-animate {
  animation: heroReveal 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--hero-delay, 0s);
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.is-loaded .hero-animate[data-hero="1"] { --hero-delay: 0.15s; transform: translateY(40px); }
body.is-loaded .hero-animate[data-hero="2"] { --hero-delay: 0.3s; transform: translateY(40px); }
body.is-loaded .hero-animate[data-hero="3"] { --hero-delay: 0.45s; transform: translateY(40px); }
body.is-loaded .hero-animate[data-hero="4"] { --hero-delay: 0.55s; transform: translateY(40px); }
body.is-loaded .hero-animate[data-hero="5"] { --hero-delay: 0.65s; transform: translateY(40px); }
body.is-loaded .hero-animate[data-hero="6"] { --hero-delay: 0.75s; transform: translateY(40px); }
body.is-loaded .hero-animate[data-hero="7"] { --hero-delay: 0.85s; transform: translateY(40px); }

.hero-video-wrap {
  opacity: 0;
  transform: scale(1.05);
}

body.is-loaded .hero-video-wrap {
  animation: videoReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

@keyframes videoReveal {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.section-line {
  transform: scaleY(0);
  transform-origin: top;
}

body.is-loaded .section-line {
  animation: lineGrow 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.is-loaded .section-line:nth-child(1) { animation-delay: 0.9s; }
body.is-loaded .section-line:nth-child(2) { animation-delay: 1s; }
body.is-loaded .section-line:nth-child(3) { animation-delay: 1.1s; }
body.is-loaded .section-line:nth-child(4) { animation-delay: 1.2s; }
body.is-loaded .section-line:nth-child(5) { animation-delay: 1.3s; }

@keyframes lineGrow {
  to { transform: scaleY(1); }
}

/* ── Continuous motion ── */
.hero-scroll {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* Keep pre-title icon static as requested */
.is-visible .pre-title-square,
body.is-loaded .hero-left .pre-title-square {
  animation: none;
}

@keyframes squarePulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(0, 139, 139, 0.12); }
  50% { box-shadow: 0 0 0 10px rgba(0, 139, 139, 0.2); transform: rotate(90deg); }
}

body.is-loaded .hero-title .text-teal {
  background: none;
  color: #0b8f8f;
  -webkit-text-fill-color: currentColor;
  animation: none;
}

/* ── Hover & interaction ── */
.btn {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 139, 139, 0.2);
}

.btn-icon-wrap img {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn:hover .btn-icon-wrap img {
  transform: translateX(4px);
}

.stat-circle--media:hover img {
  transform: scale(1.06);
}

.stat-circle--media img {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-item-features-list li {
  transition: transform 0.3s ease;
}

.service-item.is-active .service-item-features-list li {
  transition: transform 0.3s ease;
}

.service-item.is-active:hover .service-item-features-list li {
  transform: translateX(4px);
}


.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.industry-tab {
  transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.industry-tab:hover:not(.is-active) {
  transform: translateY(-2px);
}

.industry-panel.is-active {
  animation: panelIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.industry-panel.is-active .industry-image {
  animation: imageKenBurns 8s ease-out forwards;
}

@keyframes imageKenBurns {
  from { transform: scale(1.05); }
  to { transform: scale(1); }
}

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

.industry-panel.is-active .industry-list-item {
  animation: listStagger 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.industry-panel.is-active .industry-list-item:nth-child(1) { animation-delay: 0.15s; }
.industry-panel.is-active .industry-list-item:nth-child(2) { animation-delay: 0.25s; }
.industry-panel.is-active .industry-list-item:nth-child(3) { animation-delay: 0.35s; }

@keyframes listStagger {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.group-list li,
.why-list li {
  transition: transform 0.35s ease, padding-left 0.35s ease;
}

.group-list li:hover,
.why-list li:hover {
  transform: translateX(8px);
}

.cta-title .text-teal {
  display: inline-block;
  animation: ctaPop 2.5s ease-in-out infinite;
}

@keyframes ctaPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.video-control {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.video-control:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Parallax backgrounds */
.group-section--bg,
.why-section--bg {
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .group-section--bg,
  .why-section--bg {
    background-attachment: scroll;
  }
}

/* Counter glow */
.stat-circle-stat.is-counted .count-value {
  animation: numberPop 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes numberPop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.footer-col {
  transition: transform 0.4s ease;
}

.footer-col:hover {
  transform: translateY(-4px);
}

.newsletter-form input:focus {
  animation: inputGlow 1.5s ease infinite alternate;
}

@keyframes inputGlow {
  from { box-shadow: 0 0 0 0 rgba(0, 139, 139, 0.2); }
  to { box-shadow: 0 0 0 6px rgba(0, 139, 139, 0.15); }
}

/* ── Architectural page motion ── */
.page-architectural .service-detail-main > * {
  opacity: 0;
  transform: translateY(28px);
}

body.is-loaded.page-architectural .service-detail-main > * {
  animation: architecturalHeroTextIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.is-loaded.page-architectural .service-detail-main > *:nth-child(1) { animation-delay: 0.2s; }
body.is-loaded.page-architectural .service-detail-main > *:nth-child(2) { animation-delay: 0.34s; }
body.is-loaded.page-architectural .service-detail-main > *:nth-child(3) { animation-delay: 0.48s; }

@keyframes architecturalHeroTextIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-architectural .service-detail-image {
  transform: scale(1.06);
  filter: saturate(0.92) contrast(1.02);
  transition: transform 0.6s ease;
  will-change: transform;
}

body.is-loaded.page-architectural .service-detail-image {
  animation:
    architecturalHeroImageIn 1.25s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards,
    architecturalHeroImageFloat 16s ease-in-out 1.6s infinite alternate;
}

@keyframes architecturalHeroImageIn {
  from {
    opacity: 0;
    transform: scale(1.12);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes architecturalHeroImageFloat {
  0% { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.04) translate3d(0, -10px, 0); }
}

.page-architectural .service-info-description h3,
.page-architectural .service-category-title,
.page-architectural .section-title .text-teal,
.page-architectural .cta-form-title span {
  background: linear-gradient(90deg, var(--teal), #11d0d0, var(--teal));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  animation: architecturalTextShimmer 6s linear infinite;
}

@keyframes architecturalTextShimmer {
  to { background-position: 200% center; }
}

.page-architectural .feature-main,
.page-architectural .grid-category-info.row,
.page-architectural .faq-item,
.page-architectural .cta-contact-form input,
.page-architectural .cta-contact-form textarea {
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease,
    border-color 0.35s ease,
    background 0.35s ease;
  will-change: transform;
}

.page-architectural .feature-main.is-visible {
  animation: architecturalCardFloat 6s ease-in-out infinite;
  animation-delay: calc(var(--architectural-float-delay, 0) * 1s);
}

.page-architectural .feature-main:nth-child(1) { --architectural-float-delay: 0; }
.page-architectural .feature-main:nth-child(2) { --architectural-float-delay: 0.8; }
.page-architectural .feature-main:nth-child(3) { --architectural-float-delay: 1.6; }
.page-architectural .feature-main:nth-child(4) { --architectural-float-delay: 2.4; }

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

.page-architectural .feature-main:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.08);
}

.page-architectural .feature-main:hover .feature-icon {
  animation: architecturalIconSpin 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes architecturalIconSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(14deg) scale(1.12); }
  100% { transform: rotate(0deg) scale(1); }
}

.page-architectural .grid-category-info.row:hover {
  transform: translateX(10px);
}

.page-architectural .grid-category-info.row:hover .category-name {
  color: rgba(255, 255, 255, 0.92) !important;
}

.page-architectural .grid-category-info.row:hover .category-details {
  border-left-color: rgba(0, 194, 194, 0.9) !important;
}

.page-architectural .step-circle {
  animation: architecturalStepBob 6.5s ease-in-out infinite;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.08);
}

.page-architectural .step-circle--2 {
  animation-delay: 1s;
}

.page-architectural .step-circle--3 {
  animation-delay: 2s;
}

@keyframes architecturalStepBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.015); }
}

.page-architectural .step-circle:hover {
  transform: translateY(-8px) scale(1.05);
}

.page-architectural .faq-item:hover {
  transform: translateX(8px);
}

.page-architectural .faq-item.is-open {
  box-shadow: inset 0 1px 0 rgba(0, 139, 139, 0.18), inset 0 -1px 0 rgba(0, 139, 139, 0.18);
}

.page-architectural .architectural-category-badge,
.page-architectural .cta-form-badge {
  animation: architecturalBadgePulse 3.2s ease-in-out infinite;
}

@keyframes architecturalBadgePulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(0, 194, 194, 0.2);
  }
  50% {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 0 0 10px rgba(0, 194, 194, 0.06);
  }
}

.page-architectural .cta-section--architectural-form {
  overflow: hidden;
}

.page-architectural .cta-section--architectural-form::after {
  content: "";
  position: absolute;
  inset: -8%;
  background: inherit;
  background-position: center;
  background-size: cover;
  opacity: 0.18;
  transform: scale(1.02);
  animation: architecturalBackgroundDrift 18s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes architecturalBackgroundDrift {
  0% { transform: scale(1.02) translate3d(0, 0, 0); }
  100% { transform: scale(1.08) translate3d(0, -12px, 0); }
}

.page-architectural .cta-send-btn {
  position: relative;
  overflow: hidden;
}

.page-architectural .cta-send-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.08) 42%, rgba(255, 255, 255, 0.32) 50%, transparent 58%);
  transform: translateX(-140%);
}

.page-architectural .cta-send-btn:hover::after {
  animation: architecturalButtonSweep 0.9s ease forwards;
}

@keyframes architecturalButtonSweep {
  to { transform: translateX(140%); }
}

.page-architectural .cta-contact-form input:hover,
.page-architectural .cta-contact-form textarea:hover,
.page-architectural .cta-contact-form input:focus,
.page-architectural .cta-contact-form textarea:focus {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .page-architectural .feature-main.is-visible,
  .page-architectural .step-circle,
  .page-architectural .architectural-category-badge,
  .page-architectural .cta-form-badge {
    animation-duration: 4.5s;
  }

  .page-architectural .grid-category-info.row:hover,
  .page-architectural .faq-item:hover,
  .page-architectural .step-circle:hover,
  .page-architectural .feature-main:hover {
    transform: none;
  }
}
