/* ============================================
   XARKLO PREMIUM HEADER & FOOTER
   Glassmorphism · Micro-interactions · Cinematic
   ============================================ */

/* ── CSS Custom Properties ─────────────────── */
:root {
  --pf-blur-sm: 8px;
  --pf-blur-md: 16px;
  --pf-blur-lg: 24px;
  --pf-blur-xl: 32px;
  --pf-glass-bg: rgba(10, 14, 26, 0.72);
  --pf-glass-border: rgba(255, 255, 255, 0.06);
  --pf-glass-border-strong: rgba(255, 255, 255, 0.12);
  --pf-shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.25);
  --pf-shadow-medium: 0 16px 48px rgba(0, 0, 0, 0.3);
  --pf-shadow-hard: 0 24px 64px rgba(0, 0, 0, 0.4);
  --pf-glow-gold: rgba(212, 175, 55, 0.12);
  --pf-glow-cyan: rgba(0, 217, 255, 0.08);
  --pf-glow-purple: rgba(127, 102, 255, 0.1);
  --pf-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --pf-ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --pf-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --pf-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ── Glassmorphism Base ───────────────────── */
.pf-glass {
  background: var(--pf-glass-bg);
  backdrop-filter: blur(var(--pf-blur-lg));
  -webkit-backdrop-filter: blur(var(--pf-blur-lg));
  border: 1px solid var(--pf-glass-border);
}

/* ── HEADER ENHANCEMENTS ───────────────────── */

/* Premium header - enhanced glassmorphism */
.xk-header {
  will-change: transform, backdrop-filter, background;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.xk-header.premium-header {
  background: rgba(6, 9, 18, 0.65);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--pf-glass-border);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 -1px 0 rgba(255, 255, 255, 0.02) inset;
  transition:
    background 0.4s var(--pf-ease-smooth),
    backdrop-filter 0.4s var(--pf-ease-smooth),
    box-shadow 0.4s var(--pf-ease-smooth),
    transform 0.5s var(--pf-ease-out);
}

/* Aurora ambient glow behind header */
.xk-header::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 10% 50%, var(--pf-glow-gold), transparent 70%),
    radial-gradient(ellipse 50% 50% at 90% 30%, var(--pf-glow-cyan), transparent 65%),
    radial-gradient(ellipse 40% 60% at 50% 100%, var(--pf-glow-purple), transparent 60%);
  opacity: 0;
  transition: opacity 0.6s var(--pf-ease-smooth);
}

.xk-header.premium-header::before {
  opacity: 0.8;
}

/* Animated gradient border at bottom of header */
.xk-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212, 175, 55, 0.3) 20%,
    rgba(0, 217, 255, 0.2) 50%,
    rgba(212, 175, 55, 0.3) 80%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.6s var(--pf-ease-smooth);
  background-size: 200% 100%;
  animation: pfBorderDrift 4s var(--pf-ease-in-out) infinite;
}

.xk-header.premium-header::after {
  opacity: 1;
}

@keyframes pfBorderDrift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Header scroll states */
.xk-header.premium-header.scrolled {
  background: rgba(6, 9, 18, 0.82);
  backdrop-filter: blur(32px) saturate(1.6);
  -webkit-backdrop-filter: blur(32px) saturate(1.6);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 -1px 0 rgba(255, 255, 255, 0.02) inset;
}

.xk-header.premium-header.header-hidden {
  transform: translateY(-100%);
}

.xk-header.premium-header.header-visible {
  transform: translateY(0);
}

/* ── Logo Enhancements ────────────────────── */
.xk-logo {
  position: relative;
  transition: transform 0.3s var(--pf-ease-spring);
}

.xk-logo::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 12px;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--pf-ease-smooth);
  pointer-events: none;
}

.xk-logo:hover {
  transform: scale(1.04);
}

.xk-logo:hover::after {
  opacity: 1;
}

.xk-logo img {
  transition: transform 0.4s var(--pf-ease-spring);
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.1));
}

.xk-logo:hover img {
  transform: scale(1.06) rotate(-2deg);
}

.xk-logo span {
  position: relative; color: #fff;
  background: linear-gradient(135deg, #fff 40%, var(--xk-gold, #d4af37) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.12em;
}

/* ── Navigation Item Premium Effects ───────── */
.xk-nav li {
  position: relative;
}

/* Tiny animated separator between nav items */
.xk-nav li:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transition: opacity 0.3s var(--pf-ease-smooth);
}

.xk-nav a {
  position: relative;
  transition:
    color 0.3s var(--pf-ease-smooth),
    background 0.3s var(--pf-ease-smooth),
    transform 0.3s var(--pf-ease-spring);
  transform: translateZ(0);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Animated underline for nav items */
.xk-nav a::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: calc(100% - 24px);
  height: 2px;
  background: linear-gradient(90deg, var(--xk-gold, #d4af37), var(--xk-cyan, #00d9ff));
  border-radius: 2px;
  transition: transform 0.35s var(--pf-ease-out);
  transform-origin: center;
  opacity: 0.7;
}

.xk-nav a:hover::before {
  transform: translateX(-50%) scaleX(1);
}

.xk-nav a.active::before {
  transform: translateX(-50%) scaleX(1);
  background: linear-gradient(90deg, var(--xk-gold, #d4af37), var(--xk-gold-light, #e8c547));
}

/* Hover morphing - subtle lift */
.xk-nav a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

.xk-nav a.active {
  background: rgba(212, 175, 55, 0.08);
}

/* Active nav glow dot */
.xk-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--xk-gold, #d4af37);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
  animation: pfGlowDot 2s var(--pf-ease-in-out) infinite;
}

@keyframes pfGlowDot {
  0%, 100% { box-shadow: 0 0 6px rgba(212, 175, 55, 0.4); }
  50% { box-shadow: 0 0 14px rgba(212, 175, 55, 0.8); }
}

/* ── Language Button Premium ───────────────── */
.xk-lang-btn {
  position: relative;
  overflow: hidden;
  transition:
    all 0.3s var(--pf-ease-smooth),
    transform 0.3s var(--pf-ease-spring);
  transform: translateZ(0);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.xk-lang-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(0, 217, 255, 0.04));
  opacity: 0;
  transition: opacity 0.3s var(--pf-ease-smooth);
  border-radius: inherit;
}

.xk-lang-btn:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: rgba(212, 175, 55, 0.5);
}

.xk-lang-btn:hover::before {
  opacity: 1;
}

/* ── CTA Button Premium ────────────────────── */
.xk-cta-btn {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition:
    all 0.3s var(--pf-ease-smooth),
    transform 0.35s var(--pf-ease-spring);
  letter-spacing: 0.03em;
}

.xk-cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s var(--pf-ease-smooth);
  border-radius: inherit;
}

.xk-cta-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 8px 24px rgba(212, 175, 55, 0.35),
    0 0 0 1px rgba(212, 175, 55, 0.2);
}

.xk-cta-btn:hover::before {
  opacity: 1;
}

/* Shimmer effect on CTA */
.xk-cta-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 30%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: rotate(18deg);
  transition: left 0.6s var(--pf-ease-smooth);
  pointer-events: none;
}

.xk-cta-btn:hover::after {
  left: 130%;
}

/* ── Burger Button Premium ─────────────────── */
.xk-burger {
  transition:
    all 0.3s var(--pf-ease-smooth),
    transform 0.3s var(--pf-ease-spring);
  transform: translateZ(0);
}

.xk-burger:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.05);
}

/* ── Mobile Menu Premium ───────────────────── */
@media (max-width: 900px) {
  .xk-nav.open {
    background: rgba(6, 9, 18, 0.95);
    backdrop-filter: blur(28px) saturate(1.5);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
    border-bottom: 1px solid var(--pf-glass-border-strong);
    animation: pfMobileMenuIn 0.35s var(--pf-ease-out);
  }

  .xk-nav li:not(:last-child)::after {
    display: none;
  }

  .xk-nav a {
    border-radius: 10px;
    padding: 14px 18px;
    transform: translateZ(0);
    transition:
      all 0.3s var(--pf-ease-smooth),
      transform 0.3s var(--pf-ease-spring);
  }

  .xk-nav a:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.06);
  }

  .xk-nav a::before {
    display: none;
  }
}

@keyframes pfMobileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── FOOTER ENHANCEMENTS ───────────────────── */

.xk-footer.premium-footer {
  position: relative;
  background: linear-gradient(180deg, rgba(6, 9, 18, 0.96), rgba(3, 5, 10, 0.99));
  border-top: 1px solid var(--pf-glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

/* Ambient background glow in footer */
.xk-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 30% at 20% 100%, var(--pf-glow-gold), transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, var(--pf-glow-purple), transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 0%, var(--pf-glow-cyan), transparent 60%);
  opacity: 0.5;
  transition: opacity 0.8s var(--pf-ease-smooth);
}

/* Floating decorative orbs in footer */
.xk-footer::after {
  content: '';
  position: absolute;
  top: 10%;
  right: 5%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: pfFooterOrb 12s var(--pf-ease-in-out) infinite;
}

@keyframes pfFooterOrb {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  33% { transform: translate(-30px, -20px) scale(1.1); opacity: 0.6; }
  66% { transform: translate(20px, 15px) scale(0.9); opacity: 0.3; }
}

/* Footer brand section */
.xk-footer-brand {
  position: relative;
  z-index: 1;
}

.xk-footer-brand .xk-logo {
  margin-bottom: 20px;
}

.xk-footer-brand p {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  line-height: 1.8;
}

/* Footer heading premium */
.xk-footer h4 {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* Animated divider after headings */
.xk-footer h4::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--xk-gold, #d4af37), transparent);
  border-radius: 2px;
}

body[data-lang="ar"] .xk-footer h4::after {
  left: auto;
  right: 0;
  background: linear-gradient(270deg, var(--xk-gold, #d4af37), transparent);
}

/* Footer link premium effects */
.xk-footer ul li {
  transition: transform 0.3s var(--pf-ease-spring);
  position: relative;
  z-index: 1;
}

.xk-footer ul li:hover {
  transform: translateX(4px);
}

body[data-lang="ar"] .xk-footer ul li:hover {
  transform: translateX(-4px);
}

.xk-footer ul a {
  position: relative;
  display: inline-block;
  transition:
    color 0.3s var(--pf-ease-smooth),
    transform 0.3s var(--pf-ease-spring);
  font-size: 0.9rem;
  padding: 2px 0;
}

.xk-footer ul a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--xk-gold, #d4af37);
  transition: width 0.3s var(--pf-ease-out);
}

body[data-lang="ar"] .xk-footer ul a::before {
  left: auto;
  right: 0;
}

.xk-footer ul a:hover::before {
  width: 100%;
}

/* Footer social icons premium */
.xk-footer .flex.gap-3 a,
.xk-footer .pf-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--pf-glass-border-strong);
  background: rgba(255, 255, 255, 0.03);
  transition:
    all 0.3s var(--pf-ease-spring);
  transform: translateZ(0);
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}

.xk-footer .flex.gap-3 a::before,
.pf-social-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--pf-ease-smooth);
  border-radius: inherit;
}

.xk-footer .flex.gap-3 a:hover,
.pf-social-icon:hover {
  transform: translateY(-3px) scale(1.1);
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.15);
}

.xk-footer .flex.gap-3 a:hover::before,
.pf-social-icon:hover::before {
  opacity: 1;
}

/* Footer bottom section premium */
.xk-footer-bottom {
  position: relative;
  z-index: 1;
  padding-top: 28px;
  border-top: 1px solid var(--pf-glass-border);
  transition: border-color 0.3s var(--pf-ease-smooth);
}

.xk-footer-links a {
  position: relative;
  transition: color 0.3s var(--pf-ease-smooth);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.xk-footer-links a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--xk-gold, #d4af37);
  transition: width 0.3s var(--pf-ease-out);
}

.xk-footer-links a:hover::before {
  width: 100%;
}

/* Copyright animated */
.xk-footer-bottom span {
  color: #b0b8c1;
  background: linear-gradient(90deg, var(--xk-text-sec, #b0b8c1), rgba(255, 255, 255, 0.6));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── PREMIUM DIVIDER ───────────────────────── */
.pf-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 20%,
    rgba(212, 175, 55, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 80%,
    transparent 100%
  );
  margin: 24px 0;
  position: relative;
}

.pf-divider::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--xk-gold, #d4af37);
  opacity: 0.3;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

/* ── SCROLL PROGRESS BAR ────────────────────── */
.xk-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  z-index: 9999;
  background: linear-gradient(90deg, var(--xk-gold, #d4af37), var(--xk-cyan, #00d9ff), var(--xk-gold, #d4af37));
  background-size: 200% 100%;
  animation: pfProgressDrift 2s linear infinite;
  transition: width 0.05s linear;
  pointer-events: none;
  will-change: width;
  box-shadow:
    0 0 10px rgba(212, 175, 55, 0.4),
    0 0 20px rgba(212, 175, 55, 0.2);
}

@keyframes pfProgressDrift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ── BACK TO TOP BUTTON ─────────────────────── */
.pf-back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.15);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition:
    opacity 0.4s var(--pf-ease-smooth),
    transform 0.4s var(--pf-ease-spring),
    background 0.3s var(--pf-ease-smooth),
    border-color 0.3s var(--pf-ease-smooth),
    box-shadow 0.3s var(--pf-ease-smooth);
  pointer-events: none;
  color: var(--xk-gold, #d4af37);
  font-size: 1.2rem;
  will-change: transform, opacity;
}

.pf-back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
}

.pf-back-to-top:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-3px) scale(1.08);
  box-shadow:
    0 8px 24px rgba(212, 175, 55, 0.2),
    0 0 0 1px rgba(212, 175, 55, 0.15);
}

body[data-lang="ar"] .pf-back-to-top {
  right: auto;
  left: 32px;
}

/* ── PREMIUM MICRO INTERACTIONS ─────────────── */

/* Magnetic button wrapper */
.pf-magnetic {
  display: inline-block;
  transform: translateZ(0);
  transition: transform 0.15s var(--pf-ease-out);
  will-change: transform;
}

/* Ripple effect container */
.pf-ripple {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}

.pf-ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: pfRippleAnim 0.6s var(--pf-ease-out);
  pointer-events: none;
  will-change: transform, opacity;
}

@keyframes pfRippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Card lift effect */
.pf-card-lift {
  transition:
    transform 0.35s var(--pf-ease-spring),
    box-shadow 0.35s var(--pf-ease-smooth);
  transform: translateZ(0);
  will-change: transform;
}

.pf-card-lift:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(212, 175, 55, 0.08);
}

/* ── SCROLL REVEALS ─────────────────────────── */
@keyframes pfRevealFallback {
  to { opacity: 1; transform: translateY(0) scale(1) translateX(0); filter: blur(0); }
}

.pf-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s var(--pf-ease-out),
    transform 0.7s var(--pf-ease-out);
  will-change: opacity, transform;
  animation: pfRevealFallback 0.01s 3.5s forwards;
}

.pf-reveal.pf-visible,
.pf-reveal-scale.pf-visible,
.pf-reveal-left.pf-visible,
.pf-reveal-right.pf-visible,
.pf-reveal-blur.pf-visible,
.pf-stagger.pf-visible > * {
  animation: none;
}

.pf-reveal.pf-visible {
  opacity: 1;
  transform: translateY(0);
}

.pf-reveal-scale {
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  transition:
    opacity 0.7s var(--pf-ease-out),
    transform 0.7s var(--pf-ease-out);
  will-change: opacity, transform;
  animation: pfRevealFallback 0.01s 3.5s forwards;
}

.pf-reveal-scale.pf-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.pf-reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition:
    opacity 0.7s var(--pf-ease-out),
    transform 0.7s var(--pf-ease-out);
  animation: pfRevealFallback 0.01s 3.5s forwards;
}

.pf-reveal-left.pf-visible {
  opacity: 1;
  transform: translateX(0);
}

.pf-reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition:
    opacity 0.7s var(--pf-ease-out),
    transform 0.7s var(--pf-ease-out);
  animation: pfRevealFallback 0.01s 3.5s forwards;
}

.pf-reveal-right.pf-visible {
  opacity: 1;
  transform: translateX(0);
}

.pf-reveal-blur {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(20px);
  transition:
    opacity 0.8s var(--pf-ease-out),
    filter 0.8s var(--pf-ease-out),
    transform 0.8s var(--pf-ease-out);
  animation: pfRevealFallback 0.01s 3.5s forwards;
}

.pf-reveal-blur.pf-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Stagger children */
.pf-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s var(--pf-ease-out),
    transform 0.5s var(--pf-ease-out);
  animation: pfRevealFallback 0.01s 3.5s forwards;
}

.pf-stagger.pf-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ── TEXT REVEAL ────────────────────────────── */
.pf-text-reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.pf-text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.6s var(--pf-ease-out);
  will-change: transform;
}

.pf-text-reveal.pf-visible span {
  transform: translateY(0);
}

/* ── NEWSLETTER SECTION ─────────────────────── */
.pf-newsletter {
  position: relative;
  z-index: 1;
  padding: 48px 32px;
  border-radius: 20px;
  border: 1px solid var(--pf-glass-border);
  background: linear-gradient(135deg,
    rgba(212, 175, 55, 0.04),
    rgba(0, 217, 255, 0.02)
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 32px;
  overflow: hidden;
}

.pf-newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.06), transparent 60%);
  pointer-events: none;
}

.pf-newsletter h4 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.pf-newsletter p {
  color: var(--xk-text-sec, #b0b8c1);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.pf-newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
}

.pf-newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--pf-glass-border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition:
    border-color 0.3s var(--pf-ease-smooth),
    box-shadow 0.3s var(--pf-ease-smooth);
}

.pf-newsletter-form input:focus {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.pf-newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.pf-newsletter-form button {
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--xk-gold, #d4af37), var(--xk-gold-light, #e8c547));
  color: #0a0e1a;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    transform 0.3s var(--pf-ease-spring),
    box-shadow 0.3s var(--pf-ease-smooth);
  font-family: inherit;
  white-space: nowrap;
}

.pf-newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3);
}

/* ── FOOTER MINI CTA ──────────────────────────── */
.pf-footer-cta {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 24px;
  margin-bottom: 32px;
  border-radius: 20px;
  border: 1px solid var(--pf-glass-border);
  background: linear-gradient(135deg,
    rgba(127, 102, 255, 0.04),
    rgba(212, 175, 55, 0.03)
  );
  overflow: hidden;
}

.pf-footer-cta h4 {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.pf-footer-cta p {
  color: var(--xk-text-sec, #b0b8c1);
  margin-bottom: 24px;
}

/* ── FOOTER STATS ─────────────────────────────── */
.pf-footer-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.pf-footer-stat {
  text-align: center;
  padding: 24px 16px;
  border-radius: 16px;
  border: 1px solid var(--pf-glass-border);
  background: rgba(255, 255, 255, 0.02);
  transition:
    transform 0.3s var(--pf-ease-spring),
    border-color 0.3s var(--pf-ease-smooth),
    background 0.3s var(--pf-ease-smooth);
}

.pf-footer-stat:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.2);
  background: rgba(212, 175, 55, 0.04);
}

.pf-footer-stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800; color: var(--xk-gold, #d4af37);
  background: linear-gradient(135deg, var(--xk-gold, #d4af37), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin-bottom: 4px;
}

.pf-footer-stat span {
  font-size: 0.8rem;
  color: var(--xk-text-muted, #7a869e);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ── ANIMATED DOTS LOADER ──────────────────── */
@keyframes pfDots {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  80%, 100% { opacity: 0; }
}

/* ── UTILITY: GPU ACCELERATION ─────────────── */
.pf-gpu {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
  .pf-back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  body[data-lang="ar"] .pf-back-to-top {
    right: auto;
    left: 20px;
  }

  .pf-newsletter {
    padding: 32px 20px;
  }

  .pf-newsletter-form {
    flex-direction: column;
  }

  .pf-footer-cta {
    padding: 28px 16px;
  }

  .pf-footer-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .pf-footer-stat strong {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .pf-footer-stats {
    grid-template-columns: 1fr 1fr;
  }

  .pf-newsletter {
    padding: 24px 16px;
  }
}

/* ── REDUCED MOTION ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .xk-header::after,
  .xk-header::before,
  .xk-footer::before,
  .xk-footer::after,
  .pf-back-to-top,
  .xk-nav a::before,
  .xk-nav a.active::after,
  .xk-cta-btn::after,
  .xk-footer ul a::before,
  .pf-divider::after,
  .xk-progress-bar,
  .pf-reveal,
  .pf-reveal-scale,
  .pf-reveal-left,
  .pf-reveal-right,
  .pf-reveal-blur,
  .pf-stagger > *,
  .pf-text-reveal span {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .pf-back-to-top {
    opacity: 1 !important;
    pointer-events: auto !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--pf-glass-border) !important;
    color: var(--xk-text-sec, #b0b8c1) !important;
  }

  .pf-back-to-top.visible {
    opacity: 1 !important;
  }

  .xk-header.premium-header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}
