/* ── Global motion foundation ── */
html {
  scroll-behavior: smooth;
}

body {
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}

html:not(.js) body {
  opacity: 1;
}

body.is-ready {
  opacity: 1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── Scroll reveal ── */
[data-animate],
[data-reveal] {
  opacity: 0;
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease),
    filter 0.85s var(--ease);
  transition-delay: var(--animate-delay, 0s);
  will-change: opacity, transform;
}

[data-animate="fade-up"],
[data-reveal] {
  transform: translateY(2rem);
}

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

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

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

[data-animate="fade-in"] {
  transform: none;
}

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

[data-animate="blur-in"] {
  transform: translateY(1.25rem);
  filter: blur(8px);
}

[data-animate].is-visible,
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

[data-animate-stagger] [data-animate-child] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease);
}

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

/* ── Hero cinematic entrance ── */
.hero {
  position: relative;
}

.hero__parallax {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.15) 0%, transparent 35%, rgba(5, 5, 5, 0.55) 100%),
    radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
  opacity: 0;
  animation: heroOverlayIn 1.4s var(--ease) 0.2s forwards;
}

.hero__shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(201, 162, 39, 0.06) 48%,
    transparent 65%
  );
  transform: translateX(-120%);
  animation: heroShine 2.2s var(--ease) 0.6s forwards;
}

.hero__image {
  width: 100%;
  height: 115%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.1);
  animation: heroKenBurns 2.8s var(--ease) forwards;
}

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

@keyframes heroOverlayIn {
  to {
    opacity: 1;
  }
}

@keyframes heroShine {
  to {
    transform: translateX(120%);
  }
}

/* ── Title line draw ── */
.about__content.is-visible .about__title::after,
.services__header.is-visible .services__title::after {
  animation: lineDraw 0.9s var(--ease) 0.25s forwards;
}

.services__title::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin-top: 0.85rem;
  background: var(--torq-accent);
  box-shadow: 0 0 18px rgba(201, 162, 39, 0.45);
}

@keyframes lineDraw {
  from {
    width: 0;
    opacity: 0;
  }

  to {
    width: 4.5rem;
    opacity: 1;
  }
}

/* ── About image luxury hover ── */
.about__media {
  transition: transform 0.6s var(--ease);
}

.about__media.is-visible:hover {
  transform: translateY(-4px);
}

.about__image {
  transition: filter 0.6s var(--ease), transform 0.8s var(--ease);
}

.about__media.is-visible:hover .about__image {
  transform: scale(1.02);
  filter: saturate(1) contrast(1.08);
}

/* ── Pillar pulse on services ── */
.services__pillar {
  transition:
    border-color 0.4s var(--ease),
    color 0.4s var(--ease),
    background 0.4s var(--ease),
    box-shadow 0.4s var(--ease),
    transform 0.4s var(--ease);
}

.services__pillar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.12);
}

/* ── Plan card premium hover ── */
.plan-card {
  transition:
    border-color 0.45s var(--ease),
    transform 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.plan-card.is-visible:hover,
[data-animate-stagger].is-visible .plan-card:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 40px rgba(201, 162, 39, 0.06);
}

/* ── Testimonial card glow ── */
.testimonial-card {
  transition:
    border-color 0.4s var(--ease),
    transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ── Contact map pulse pin ── */
.contact__map-pin-icon {
  animation: pinPulse 2.5s ease-in-out infinite;
}

@keyframes pinPulse {
  0%,
  100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  }

  50% {
    box-shadow: 0 4px 28px rgba(201, 162, 39, 0.55);
  }
}

/* ── Footer link underline ── */
.footer__nav a,
.footer__legal a {
  position: relative;
}

.footer__nav a::after,
.footer__legal a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--torq-accent);
  transition: width 0.35s var(--ease);
}

.footer__nav a:hover::after,
.footer__legal a:hover::after {
  width: 100%;
}

/* ── CTA shimmer ── */
.nav__cta,
.plan-card__cta,
.contact__submit {
  position: relative;
  overflow: hidden;
}

.nav__cta::after,
.plan-card__cta::after,
.contact__submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}

.nav__cta:hover::after,
.plan-card__cta:hover::after,
.contact__submit:hover::after {
  transform: translateX(120%);
}

/* ── Section ambient glow on scroll ── */
.section-glow {
  position: relative;
}

.section-glow::after {
  content: "";
  position: absolute;
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.06), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

.section-glow.is-visible::after {
  opacity: 1;
}

.about.section-glow::after {
  top: 10%;
  right: -5%;
}

.services.section-glow::after {
  bottom: 5%;
  left: -8%;
}

.plans.section-glow::after {
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
}

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

  body {
    opacity: 1;
    transition: none;
  }

  body::after {
    display: none;
  }

  [data-animate],
  [data-reveal],
  [data-animate-stagger] [data-animate-child] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .hero__image {
    height: 100%;
    animation: none;
    transform: none;
  }

  .hero__overlay,
  .hero__shine {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .contact__map-pin-icon {
    animation: none;
  }

  .nav__cta::after,
  .plan-card__cta::after,
  .contact__submit::after {
    display: none;
  }
}
