/* ICT Forex Academy — unified motion tuning
   Loaded last so older homepage animation layers cannot fight each other. */

/* One lightweight reveal system for desktop and laptop. */
html.ifa-motion-ready [data-ifa-reveal],
html.ifa-motion-ready [data-ifa-reveal="true"] {
  opacity: 0 !important;
  transform: translate3d(0, 14px, 0) !important;
  filter: none !important;
  transition:
    opacity .52s cubic-bezier(.22,.61,.36,1),
    transform .58s cubic-bezier(.22,.61,.36,1) !important;
  transition-delay: var(--ifa-reveal-delay, 0ms) !important;
  will-change: auto !important;
}
html.ifa-motion-ready [data-ifa-reveal].ifa-in-view,
html.ifa-motion-ready [data-ifa-reveal="true"].ifa-in-view {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}
html.ifa-motion-ready .course-card {
  opacity: 0 !important;
  transform: translate3d(0, 14px, 0) !important;
  transition:
    opacity .52s cubic-bezier(.22,.61,.36,1),
    transform .58s cubic-bezier(.22,.61,.36,1),
    border-color .28s ease,
    box-shadow .28s ease !important;
  transition-delay: var(--ifa-stagger, 0ms) !important;
  will-change: auto !important;
}
html.ifa-motion-ready .course-card.ifa-in-view {
  opacity: 1 !important;
  transform: none !important;
}
html.ifa-motion-ready .facts .fact {
  opacity: 0 !important;
  transform: translate3d(0, 10px, 0) !important;
  transition: opacity .42s ease, transform .48s ease !important;
}
html.ifa-motion-ready .facts.ifa-in-view .fact {
  opacity: 1 !important;
  transform: none !important;
}

/* No scale/filter layer on the full-screen video: a CSS filter forces the
   browser to composite every video frame through a software/GPU filter pass
   instead of the fast hardware video path, which is what made scroll-seeking
   stutter badly on phones. The color grade is now baked into the MP4 itself
   at encode time, so no runtime filter is needed at all. */
.ifa-scroll-scene video {
  transform: none !important;
  filter: none !important;
  backface-visibility: visible !important;
}

/* Hover depth only on devices that genuinely support precise hover. */
@media (hover: hover) and (pointer: fine) {
  .course-card:hover {
    transform: translate3d(0, -3px, 0) !important;
  }
}

/* Touch devices: shorter movement, no decorative hover/tilt work. */
@media (max-width: 760px), (pointer: coarse) {
  html.ifa-motion-ready [data-ifa-reveal],
  html.ifa-motion-ready [data-ifa-reveal="true"] {
    transform: translate3d(0, 9px, 0) !important;
    transition-duration: .4s !important;
    transition-delay: 0ms !important;
  }
  html.ifa-motion-ready .course-card {
    transform: translate3d(0, 10px, 0) !important;
    transition-duration: .42s !important;
    transition-delay: 0ms !important;
  }
  html.ifa-motion-ready .facts .fact {
    transform: translate3d(0, 7px, 0) !important;
    transition-duration: .34s !important;
  }
  html.ifa-motion-ready [data-ifa-reveal].ifa-in-view,
  html.ifa-motion-ready [data-ifa-reveal="true"].ifa-in-view,
  html.ifa-motion-ready .course-card.ifa-in-view,
  html.ifa-motion-ready .facts.ifa-in-view .fact {
    transform: none !important;
  }
  .course-card:hover,
  .course-card.ifa-tilt-active,
  .faq-item:hover,
  .fact:hover,
  .trust-pill:hover {
    transform: none !important;
  }
  .hero-badge,
  .badge-dot,
  .candle {
    animation: none !important;
  }
}

/* Accessibility: never hide content or animate when reduced motion is requested. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  html.ifa-motion-ready [data-ifa-reveal],
  html.ifa-motion-ready [data-ifa-reveal="true"],
  html.ifa-motion-ready [data-ifa-reveal].ifa-in-view,
  html.ifa-motion-ready [data-ifa-reveal="true"].ifa-in-view,
  html.ifa-motion-ready .course-card,
  html.ifa-motion-ready .course-card.ifa-in-view,
  html.ifa-motion-ready .facts .fact,
  html.ifa-motion-ready .facts.ifa-in-view .fact {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
  }
  .ifa-scroll-scene video { transform: none !important; }
}


/* Brighter homepage journey video: the footage itself is now color-graded
   (contrast/brightness/saturation baked in at encode time), so only opacity
   is set here — no runtime filter cost. */
.ifa-home-journey-scene.is-video-ready video {
  opacity: 1 !important;
}
.ifa-home-journey-scene::after {
  background:
    radial-gradient(ellipse at 50% 38%, transparent 10%, rgba(3,7,13,.10) 76%),
    linear-gradient(180deg, rgba(3,7,13,.05), rgba(3,7,13,.20)) !important;
}
@media (max-width: 760px), (pointer: coarse) {
  .ifa-home-journey-scene.is-video-ready video {
    opacity: 1 !important;
  }
  .ifa-home-journey-scene::after {
    background:
      radial-gradient(ellipse at 50% 38%, transparent 8%, rgba(3,7,13,.08) 78%),
      linear-gradient(180deg, rgba(3,7,13,.04), rgba(3,7,13,.16)) !important;
  }
}


/* Hero copy now spans the available width after removing the decorative market chart. */
.ifa-editorial-layout {
  grid-template-columns: minmax(0, 1fr) !important;
}
.ifa-editorial-hero .ifa-chapter-heading {
  max-width: 780px;
}
