// Fragrance · How to Choose · Blotter First — L3 app

function FragranceHowToChooseBlotterFirstApp() {
  const [t, setTweak] = useTweaks(window.TWEAK_DEFAULTS);

  React.useEffect(() => {
    const io = new IntersectionObserver((entries) => {
      entries.forEach((e) => { if (e.isIntersecting) { e.target.classList.add("in"); io.unobserve(e.target); } });
    }, { threshold: 0.08, rootMargin: "0px 0px -40px 0px" });
    const scan = () => { document.querySelectorAll(".reveal:not(.in)").forEach((el) => io.observe(el)); };
    const raf = requestAnimationFrame(() => requestAnimationFrame(scan));
    const mo = new MutationObserver(scan);
    mo.observe(document.body, { childList: true, subtree: true });
    return () => { cancelAnimationFrame(raf); io.disconnect(); mo.disconnect(); };
  }, []);

  React.useEffect(() => {
    const b = document.body;
    b.classList.remove("fp-playfair-dmsans", "fp-dmserif-dmsans", "fp-fraunces-inter");
    b.classList.add(`fp-${t.fontPairing}`);
    b.classList.remove("ac-coral", "ac-oxblood", "ac-champagne", "ac-terracotta", "ac-bronze", "ac-carmine", "ac-amber");
    b.classList.add(`ac-${t.accent}`);
    b.classList.toggle("dark", !!t.dark);
    b.classList.remove("cs-editorial", "cs-rounded", "cs-framed", "cs-minimal");
    b.classList.add(`cs-${t.cardStyle || "editorial"}`);
  }, [t.fontPairing, t.accent, t.dark, t.cardStyle]);

  return (
    <>
      <Header onDark={false} />

      <nav className="crumb" aria-label="Breadcrumb">
        <a href="/">Home</a>
        <span className="sl">/</span>
        <a href="/en/fragrance/">Fragrance</a>
        <span className="sl">/</span>
        <a href="/en/fragrance/how-to-choose/">How to Choose</a>
        <span className="sl">/</span>
        <span className="cur">Blotter First</span>
      </nav>

      <div className="l2" data-screen-label="Blotter First L3">
        <FragranceHowToChooseBlotterFirstSidebar />
        <main className="l2-main">
          <FragranceHowToChooseBlotterFirstHero />
          <FragranceHowToChooseBlotterFirstTypeRail />
          <FragranceHowToChooseBlotterFirstEditorIntro />

          <SectionHead n="I." eyebrow="Definitions · Plain English" h={<>What a blotter <em>actually</em> reveals.</>} />
          <FragranceHowToChooseBlotterFirstQuickFacts />

          <SectionHead n="II." eyebrow="If blotters have misled you" h={<>The <em>beginner's</em> path.</>} link="Print as PDF" />
          <FragranceHowToChooseBlotterFirstBeginnerPath />

          <SectionHead n="III." eyebrow="Trending now · Top 5 searches" h={<>What everyone's <em>reading</em> this week.</>} link="See top 100" />
          <FragranceHowToChooseBlotterFirstTrending />

          <SectionHead n="IV." eyebrow="Blotter type · By what it reveals" h={<>Choosing the right <em>test format.</em></>} />
          <FragranceHowToChooseBlotterFirstFormatGuide />

          <SectionHead n="V." eyebrow={`The library · ${window.FragranceHowToChooseBlotterFirstPageData.totalCount} how-to's`} h={<>Everything we've published on <em>blotter technique.</em></>} link="Full index A–Z" />
          <FragranceHowToChooseBlotterFirstHowToLibrary cardStyle={t.libCardStyle || "editorial"} />

          <SectionHead n="VI." eyebrow="Other How to Choose topics" h={<>Beyond the <em>strip.</em></>} link="All topics" />
          <FragranceHowToChooseBlotterFirstCrosslinks />

          <FragranceHowToChooseBlotterFirstNext />
        </main>
      </div>

      <NellyTop3 category="fragrance blotter technique" />
      <Newsletter />
      <Footer />
    </>
  );
}

ReactDOM.createRoot(document.getElementById("root")).render(<FragranceHowToChooseBlotterFirstApp />);
