/* Luxury motion layer for index_codex only */

:root {
  --lux-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hero cinematic reveal */
#hero .hero-tag,
#hero .hero-sub,
#hero .hero-cta {
  will-change: transform, opacity, filter;
}

#hero .hero-title {
  will-change: transform, opacity, filter;
}

#hero .hero-title .outline-text {
  display: block;
  will-change: transform, opacity, filter;
}

#hero .hero-title.reveal.visible {
  animation: lux-title-in 1200ms var(--lux-ease) 80ms both;
}

#hero .hero-title.reveal.visible .outline-text {
  animation: lux-line-in 1200ms var(--lux-ease) 250ms both;
}

#hero .hero-tag.reveal.visible {
  animation: lux-fade-up 900ms var(--lux-ease) both;
}

#hero .hero-sub.reveal.visible {
  animation: lux-fade-up 1100ms var(--lux-ease) 180ms both;
}

#hero .hero-cta.reveal.visible {
  animation: lux-fade-up 1200ms var(--lux-ease) 320ms both;
}

@keyframes lux-title-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes lux-line-in {
  from {
    opacity: 0;
    transform: translateY(34px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes lux-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Hero parallax hooks */
#hero {
  --mx: 0px;
  --my: 0px;
  --sy: 0px;
}

#hero .hero-logomark {
  transform: translate3d(
      calc(var(--mx) * 0.35),
      calc(-50% + (var(--my) * 0.2) - (var(--sy) * 0.08)),
      0
    );
}

#hero .glow-orange {
  transform: translate3d(
      calc(var(--mx) * 0.5),
      calc(var(--my) * 0.3 - (var(--sy) * 0.05)),
      0
    );
}

#hero .glow-teal {
  transform: translate3d(
      calc(var(--mx) * -0.35),
      calc(var(--my) * -0.2 + (var(--sy) * 0.03)),
      0
    );
}

/* Magnetic hover cards */
.service-card,
.pricing-card,
.team-card {
  transform: translate3d(0, 0, 0);
  transition: box-shadow 0.45s var(--lux-ease), border-color 0.45s var(--lux-ease);
  will-change: transform;
}

.service-card:hover,
.pricing-card:hover,
.team-card:hover {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
}

.service-card::after,
.pricing-card::after,
.team-card::after {
  content: "";
  position: absolute;
  inset: -40% -50%;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.055) 50%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 900ms var(--lux-ease);
  pointer-events: none;
}

.service-card:hover::after,
.pricing-card:hover::after,
.team-card:hover::after {
  transform: translateX(120%);
}

.lux-ready {
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(0.985);
  filter: blur(4px);
}

.lux-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  transition:
    transform 850ms var(--lux-ease),
    opacity 850ms var(--lux-ease),
    filter 850ms var(--lux-ease);
}

.work-item.lux-ready {
  transform: translate3d(0, 26px, 0) scale(0.985);
}

/* Subtle ambient pulse visible on mobile too */
.pricing-featured {
  animation: lux-ambient 4.8s var(--lux-ease) infinite;
}

@keyframes lux-ambient {
  0%, 100% { box-shadow: 0 0 0 rgba(224, 112, 64, 0); }
  50% { box-shadow: 0 12px 36px rgba(224, 112, 64, 0.18); }
}

/* Services section premium redesign */
#services {
  position: relative;
  background:
    radial-gradient(80% 90% at 10% 0%, rgba(224, 112, 64, 0.07), transparent 52%),
    radial-gradient(70% 80% at 100% 100%, rgba(42, 138, 122, 0.06), transparent 56%),
    var(--bg);
}

#services .section-header {
  margin-bottom: 3.5rem;
}

#services .section-tag {
  color: rgba(224, 112, 64, 0.95);
  letter-spacing: 0.26em;
}

#services .section-header h2 {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.95;
}

#services .services-grid {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(2px);
}

#services .service-card {
  display: block;
  cursor: pointer;
  min-height: 290px;
  padding: 3.1rem 3rem 2.6rem;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.02), transparent 45%),
    rgba(10, 10, 10, 0.78);
  transition:
    background 560ms var(--lux-ease),
    border-color 560ms var(--lux-ease),
    box-shadow 560ms var(--lux-ease);
}

#services .service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: 0;
  pointer-events: none;
  transition: border-color 560ms var(--lux-ease);
}

#services .service-card:hover {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent 45%),
    rgba(16, 16, 16, 0.9);
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.28);
}

#services .service-card:hover::before {
  border-color: rgba(224, 112, 64, 0.28);
}

#services .service-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-bottom: 1.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

#services .service-card h3 {
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  margin-bottom: 1rem;
  color: var(--white);
}

#services .service-card p {
  max-width: 37ch;
  font-size: 1.02rem;
  color: rgba(240, 240, 240, 0.7);
  line-height: 1.65;
}

#services .service-arrow {
  opacity: 0.42;
  transform: translateX(0);
  transition: transform 420ms var(--lux-ease), opacity 420ms var(--lux-ease);
}

#services .service-card:hover .service-arrow {
  opacity: 1;
  transform: translateX(8px);
}

@media (max-width: 768px) {
  #services .section-header {
    margin-bottom: 2.4rem;
  }

  #services .section-header h2 {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }

  #services .service-card {
    min-height: auto;
    padding: 2rem 1.45rem;
  }

  #services .service-card p {
    font-size: 0.97rem;
    line-height: 1.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hero .hero-title.reveal.visible,
  #hero .hero-title.reveal.visible .outline-text,
  #hero .hero-tag.reveal.visible,
  #hero .hero-sub.reveal.visible,
  #hero .hero-cta.reveal.visible {
    animation: none !important;
  }

  .service-card,
  .pricing-card,
  .team-card {
    transform: none !important;
  }

  .pricing-featured {
    animation: none !important;
  }
}
