/**
 * Homepage luxury motion + polish
 * Desktop: soft cinematic motion | Mobile: lighter / reduced
 */

/* ----- Ambient layers ----- */
.home .pftf-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(30, 139, 195, 0.14), transparent 62%),
    radial-gradient(ellipse 50% 40% at 18% 70%, rgba(47, 163, 107, 0.10), transparent 55%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.15) 0%, transparent 35%, rgba(2, 6, 23, 0.25) 100%);
  opacity: 0;
  animation: pftfLuxFade 1.4s ease 0.2s forwards;
}

.home .pftf-hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.46) 0%,
    rgba(2, 6, 23, 0.22) 42%,
    rgba(2, 6, 23, 0.62) 100%
  ) !important;
}

/* Soft vignette ring */
.home .pftf-hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(2, 6, 23, 0.45) 100%);
  opacity: 0.85;
}

/* ----- Ken Burns (desktop only) ----- */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .home .pftf-hero-image img,
  .home .pftf-hero > .wp-block-image img {
    transform: scale(1.06);
    transform-origin: 58% 32%;
    animation: pftfLuxKen 28s ease-in-out infinite alternate;
  }
}

/* ----- Staggered entrance ----- */
.home .pftf-hero-logo-wrap,
.home .pftf-hero-overlay h1,
.home .pftf-hero-overlay p,
.home .pftf-hero-overlay .pftf-hero-cta-wrap,
.home .pftf-hero-overlay .pftf-hero-cta,
.home .pftf-hero-overlay .wp-block-buttons {
  opacity: 0;
  transform: translateY(18px);
  animation: pftfLuxRise 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home .pftf-hero-logo-wrap { animation-delay: 0.15s; }
.home .pftf-hero-overlay h1 { animation-delay: 0.38s; }
.home .pftf-hero-overlay > p { animation-delay: 0.55s; }
.home .pftf-hero-overlay .pftf-hero-cta-wrap,
.home .pftf-hero-overlay .pftf-hero-cta,
.home .pftf-hero-overlay .wp-block-buttons { animation-delay: 0.72s; }

.home #masthead .header-navigation,
.home #masthead .pftf-lang-item,
.home #masthead .menu-toggle-open {
  opacity: 0;
  animation: pftfLuxFade 0.9s ease 0.25s forwards;
}

/* Logo living glow */
@media (prefers-reduced-motion: no-preference) {
  .home .pftf-hero-logo {
    animation: pftfLuxLogoGlow 5.5s ease-in-out 1.2s infinite alternate;
  }
}

.home .pftf-hero-logo {
  filter:
    brightness(1.28)
    contrast(1.3)
    saturate(1.18)
    drop-shadow(0 0 16px rgba(255, 255, 255, 0.58))
    drop-shadow(0 0 32px rgba(30, 139, 195, 0.5))
    drop-shadow(0 0 48px rgba(47, 163, 107, 0.28))
    drop-shadow(0 4px 16px rgba(0, 0, 0, 0.55));
}

/* Title polish */
.home .pftf-hero-overlay h1 {
  letter-spacing: -0.015em;
  font-weight: 700 !important;
}

.home .pftf-hero-overlay p {
  max-width: 46rem;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* CTA — glass / teal luxury */
.home .pftf-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding: 0.78em 1.55em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: linear-gradient(135deg, rgba(30, 139, 195, 0.42), rgba(15, 118, 110, 0.38));
  color: #fff !important;
  text-decoration: none !important;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 8px 28px rgba(2, 6, 23, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.home .pftf-hero-cta:hover,
.home .pftf-hero-cta:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.62);
  background: linear-gradient(135deg, rgba(30, 139, 195, 0.58), rgba(15, 118, 110, 0.52));
  box-shadow:
    0 12px 34px rgba(2, 6, 23, 0.42),
    0 0 24px rgba(30, 139, 195, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #fff !important;
}

/* Scroll cue */
.home .pftf-hero-scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(5.5rem, 12vh, 8rem);
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  animation: pftfLuxFade 1s ease 1.4s forwards;
}

.home .pftf-hero-scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), transparent);
  transform-origin: top;
}

@media (prefers-reduced-motion: no-preference) {
  .home .pftf-hero-scroll-line {
    animation: pftfLuxScroll 2.2s ease-in-out 1.6s infinite;
  }
}

/* ----- Section reveal (driven by .is-inview from JS) ----- */
.home .pftf-services-head,
.home .pftf-latest-head,
.home .pftf-post-card {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.home .pftf-services-head.is-inview,
.home .pftf-latest-head.is-inview,
.home .pftf-post-card.is-inview {
  opacity: 1;
  transform: none;
}

.home .pftf-post-card:nth-child(2) { transition-delay: 0.08s; }
.home .pftf-post-card:nth-child(3) { transition-delay: 0.16s; }
.home .pftf-post-card:nth-child(4) { transition-delay: 0.24s; }

/* Soften default service entrance so lux reveal can take over when JS runs */
.home.js-pftf-lux .pftf-service {
  animation: none;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  transition-delay: var(--svc-delay, 0s);
}

.home.js-pftf-lux .pftf-service.is-inview {
  opacity: 1;
  transform: none;
}

.home.js-pftf-lux .pftf-service:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(11, 28, 44, 0.12);
}

/* Latest cards hover polish */
.home .pftf-post-card {
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease;
}

.home .pftf-post-card.is-inview:hover {
  transform: translateY(-4px);
}

/* ----- Hero slider ----- */
.home .pftf-hero-slider {
  position: absolute !important;
  inset: 0;
  z-index: 0;
  margin: 0 !important;
  overflow: hidden;
  background: #020617;
}
.home .pftf-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.15s ease;
  pointer-events: none;
}
.home .pftf-hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.home .pftf-hero-slide img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center 28% !important;
}
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .home .pftf-hero-slide.is-active img {
    animation: pftfLuxKen 28s ease-in-out infinite alternate;
  }
  /* Disable ken-burns on legacy single-image when slider present */
  .home .pftf-hero:has(.pftf-hero-slider) .pftf-hero-image img {
    animation: none !important;
    transform: none !important;
  }
}
.home .pftf-hero-dots {
  position: absolute;
  left: 50%;
  bottom: clamp(1.25rem, 3vh, 2rem);
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(8px);
}
.home .pftf-hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, width 0.3s ease;
}
.home .pftf-hero-dot.is-active {
  width: 22px;
  background: rgba(255, 255, 255, 0.92);
}
.home .pftf-hero-dot:focus-visible {
  outline: 2px solid rgba(30, 139, 195, 0.9);
  outline-offset: 2px;
}

/* Hide leftover keyword ribbon if any cached HTML remains */
.home .pftf-keyword-ribbon {
  display: none !important;
}

/* No hill wave under hero */
.home .pftf-hero::after {
  display: none !important;
  content: none !important;
}

/* ----- Keyframes ----- */
@keyframes pftfLuxFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pftfLuxRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes pftfLuxKen {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.2%, -1%, 0); }
}

@keyframes pftfLuxLogoGlow {
  from {
    filter:
      brightness(1.28) contrast(1.3) saturate(1.18)
      drop-shadow(0 0 14px rgba(255, 255, 255, 0.5))
      drop-shadow(0 0 28px rgba(30, 139, 195, 0.42))
      drop-shadow(0 0 40px rgba(47, 163, 107, 0.22))
      drop-shadow(0 4px 16px rgba(0, 0, 0, 0.55));
  }
  to {
    filter:
      brightness(1.38) contrast(1.32) saturate(1.22)
      drop-shadow(0 0 20px rgba(255, 255, 255, 0.7))
      drop-shadow(0 0 40px rgba(30, 139, 195, 0.62))
      drop-shadow(0 0 56px rgba(47, 163, 107, 0.36))
      drop-shadow(0 4px 16px rgba(0, 0, 0, 0.55));
  }
}

@keyframes pftfLuxScroll {
  0%, 100% { transform: scaleY(0.55); opacity: 0.35; }
  50% { transform: scaleY(1); opacity: 0.9; }
}

/* ----- Mobile: lighter ----- */
@media (max-width: 767px) {
  .home .pftf-hero::before {
    animation: none;
    opacity: 1;
  }

  .home .pftf-hero-logo-wrap,
  .home .pftf-hero-overlay h1,
  .home .pftf-hero-overlay p,
  .home .pftf-hero-overlay .pftf-hero-cta {
    animation-duration: 0.7s;
  }

  .home .pftf-hero-logo {
    animation: none !important;
  }

  .home .pftf-hero-scroll {
    display: none;
  }

  .home .pftf-hero-dots {
    bottom: 1rem;
  }

  .home.js-pftf-lux .pftf-service:hover {
    transform: none;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .home .pftf-hero::before,
  .home .pftf-hero-logo-wrap,
  .home .pftf-hero-overlay h1,
  .home .pftf-hero-overlay p,
  .home .pftf-hero-overlay .pftf-hero-cta,
  .home .pftf-hero-overlay .wp-block-buttons,
  .home #masthead .header-navigation,
  .home #masthead .pftf-lang-item,
  .home #masthead .menu-toggle-open,
  .home .pftf-hero-scroll,
  .home .pftf-hero-scroll-line,
  .home .pftf-hero-logo,
  .home .pftf-hero-image img,
  .home .pftf-hero > .wp-block-image img {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter:
      brightness(1.28) contrast(1.3) saturate(1.18)
      drop-shadow(0 0 16px rgba(255, 255, 255, 0.55))
      drop-shadow(0 0 28px rgba(30, 139, 195, 0.45))
      drop-shadow(0 4px 14px rgba(0, 0, 0, 0.55)) !important;
  }

  .home .pftf-services-head,
  .home .pftf-latest-head,
  .home .pftf-post-card,
  .home.js-pftf-lux .pftf-service {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
