/* =============================================
   FX 3D — عمق، تیلت و افکت متن
   ============================================= */

.hero.fx-hero-scene {
  perspective: 1400px;
  perspective-origin: 50% 42%;
}

#hero-content.fx-hero-scene-inner {
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-title.fx-text-3d {
  transform: translateZ(52px);
  transform-style: preserve-3d;
  text-shadow:
    0 1px 0 #9A7B2F,
    0 2px 0 #8A6B25,
    0 3px 0 rgba(0, 0, 0, 0.15),
    0 6px 14px rgba(0, 0, 0, 0.35),
    0 14px 32px rgba(201, 168, 76, 0.14);
}

.hero-title.fx-text-3d .highlight {
  display: inline-block;
  transform: translateZ(28px);
  filter: drop-shadow(0 10px 28px rgba(201, 168, 76, 0.38));
}

.hero-subtitle.fx-text-soft {
  transform: translateZ(28px);
  animation: fxTextSoft 7s ease-in-out infinite;
}

@keyframes fxTextSoft {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

.fx-text-depth {
  position: relative;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.32),
    0 8px 22px rgba(201, 168, 76, 0.14);
  transition:
    transform 0.4s var(--ease-luxury),
    text-shadow 0.4s var(--ease-luxury);
}

.section-header.visible:hover .fx-text-depth,
.faq-inner .section-header:hover .fx-text-depth {
  transform: translateY(-3px) translateZ(10px);
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.38),
    0 12px 30px rgba(201, 168, 76, 0.24);
}

.fx-text-wave {
  background: linear-gradient(
    100deg,
    var(--light) 0%,
    var(--gold-light) 42%,
    var(--light) 84%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fxTextWave 7s linear infinite;
}

@keyframes fxTextWave {
  to { background-position: 220% center; }
}

.fx-text-glow {
  animation: fxTextGlow 3.5s ease-in-out infinite;
}

@keyframes fxTextGlow {
  0%, 100% {
    text-shadow: 0 0 0 transparent;
    filter: brightness(1);
  }
  50% {
    text-shadow: 0 0 24px rgba(201, 168, 76, 0.55), 0 0 40px rgba(201, 168, 76, 0.18);
    filter: brightness(1.08);
  }
}

.fx-stat-3d {
  padding: 1.1rem 0.65rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 168, 76, 0.14);
  transform-style: preserve-3d;
  transition:
    transform 0.45s var(--ease-luxury),
    box-shadow 0.45s var(--ease-luxury),
    border-color 0.35s;
}

.fx-stat-3d:hover {
  transform: translateY(-10px) rotateX(10deg) scale(1.04);
  border-color: rgba(201, 168, 76, 0.32);
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(201, 168, 76, 0.18);
}

.step.fx-step-3d {
  transform-style: preserve-3d;
  transition:
    transform 0.45s var(--ease-luxury),
    border-color 0.35s,
    box-shadow 0.45s var(--ease-luxury);
}

.step.fx-step-3d:hover {
  transform: translateY(-12px) rotateY(-5deg) rotateX(5deg);
  border-color: rgba(201, 168, 76, 0.34);
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.38),
    0 0 36px rgba(201, 168, 76, 0.1);
}

.step-num.fx-text-3d-num {
  display: inline-block;
  transform: translateZ(24px);
  text-shadow:
    0 2px 0 #8A6B25,
    0 4px 10px rgba(0, 0, 0, 0.45);
}

.step-title.fx-text-accent {
  transition: color 0.35s, text-shadow 0.35s;
}

.step.fx-step-3d:hover .step-title.fx-text-accent {
  color: var(--gold-light);
  text-shadow: 0 0 18px rgba(201, 168, 76, 0.42);
}

.about-video.fx-video-3d {
  transform-style: preserve-3d;
  transition: transform 0.55s var(--ease-luxury);
}

.about-video.fx-video-3d:hover {
  transform: rotateY(-4deg) rotateX(3deg) translateZ(12px);
}

.about-video.fx-video-3d .video-wrapper {
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(201, 168, 76, 0.12);
}

.hanan-blog-title.fx-text-depth {
  display: inline-block;
}

.fx-tilt {
  transform-style: preserve-3d;
  will-change: transform;
}

.fx-tilt-inner {
  transform: translateZ(18px);
  transition: transform 0.35s var(--ease-luxury);
}

.fx-tilt:hover .fx-tilt-inner {
  transform: translateZ(32px);
}

/* ── Cinematic motion ── */
.fx-hero-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    circle 320px at var(--fx-spot-x, 50%) var(--fx-spot-y, 42%),
    rgba(201, 168, 76, 0.14) 0%,
    rgba(201, 168, 76, 0.04) 35%,
    transparent 68%
  );
  mix-blend-mode: screen;
  transition: opacity 0.35s ease;
}

.fx-hero-badge {
  transform: translateZ(40px);
  transform-style: preserve-3d;
  transition: transform 0.35s var(--ease-luxury), box-shadow 0.35s;
}

.fx-hero-bg,
.fx-hero-grid {
  will-change: transform, opacity;
  transition: opacity 0.2s linear;
}

.fx-cinematic-section {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.15s linear;
}

@keyframes meshDrift {
  0%, 100% { transform: scale(1) translate3d(0, 0, 0); }
  50% { transform: scale(1.06) translate3d(-1.5%, 1%, 0); }
}

.ambient-mesh {
  animation: meshDrift 22s ease-in-out infinite alternate;
}

@keyframes orbFloat3d {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(24px, -18px, 0) scale(1.06); }
  66% { transform: translate3d(-18px, 12px, 0) scale(0.96); }
}

.orb {
  animation: orbFloat3d 16s ease-in-out infinite;
}

.fx-mask-reveal {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.fx-mask-reveal.visible {
  clip-path: inset(0 0 0 0);
}

.hero-title .highlight {
  animation: shimmer 5s linear infinite, highlightPulse 3s ease-in-out infinite;
}

@keyframes highlightPulse {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 22px rgba(201, 168, 76, 0.45)); }
}

.reveal.visible {
  animation: fxRiseIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fxRiseIn {
  from {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

html[data-theme="light"] .hero-title.fx-text-3d {
  text-shadow:
    0 2px 0 rgba(154, 123, 47, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .fx-text-depth {
  text-shadow: 0 3px 12px rgba(154, 123, 47, 0.18);
}

html[data-theme="light"] .fx-stat-3d {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(154, 123, 47, 0.2);
}

@media (max-width: 900px) {
  .hero-title.fx-text-3d,
  .hero-subtitle.fx-text-soft,
  .fx-hero-badge {
    transform: none;
  }

  .fx-hero-spotlight {
    display: none;
  }

  .fx-cinematic-section {
    transform: none !important;
  }

  .step.fx-step-3d:hover,
  .fx-stat-3d:hover,
  .about-video.fx-video-3d:hover {
    transform: none;
  }

  .ambient-mesh,
  .orb,
  .hero-title .highlight {
    animation: none !important;
  }

  .fx-mask-reveal {
    clip-path: none;
    transition: none;
  }

  .reveal.visible {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title.fx-text-3d,
  .hero-subtitle.fx-text-soft,
  .fx-text-wave,
  .fx-text-glow {
    animation: none !important;
    transform: none !important;
    text-shadow: none;
    -webkit-text-fill-color: unset;
    background: none;
    color: inherit;
  }

  .hero-title.fx-text-3d .highlight {
    -webkit-text-fill-color: transparent;
    background: linear-gradient(120deg, var(--gold-dark), var(--gold), var(--gold-light));
    background-clip: text;
    filter: none;
  }

  .step.fx-step-3d:hover,
  .fx-stat-3d:hover,
  .about-video.fx-video-3d:hover {
    transform: none;
  }

  .ambient-mesh,
  .orb,
  .hero-title .highlight {
    animation: none !important;
  }

  .fx-mask-reveal {
    clip-path: none;
    transition: none;
  }

  .reveal.visible {
    animation: none;
  }
}
