// features.html için entry point — uzun özellikler sayfası
function App() {
  // TOC anchor highlight + reveal-on-scroll
  React.useEffect(() => {
    const prefersReduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
    if (prefersReduce) return;

    // Reveal animasyonu
    const targets = document.querySelectorAll('.fp-section, .fp-card, .fp-hero');
    targets.forEach(el => el.classList.add('reveal'));
    const io = new IntersectionObserver((entries) => {
      entries.forEach(e => {
        if (e.isIntersecting) {
          e.target.classList.add('revealed');
          io.unobserve(e.target);
        }
      });
    }, { rootMargin: '0px 0px -8% 0px', threshold: 0.06 });
    targets.forEach(el => io.observe(el));
    return () => io.disconnect();
  }, []);

  return (
    <>
      <Nav />
      <FeaturesPage />
      <Footer />
    </>
  );
}

ReactDOM.createRoot(document.getElementById('root')).render(<App/>);
