/* ==========================================================================
   home-upgrade.css — homepage-only upgrade (27 Nov 2026)
   Loaded AFTER v6.css (order: v3-compat.css < v6.css < home-upgrade.css).
   Card grids for the Popular + category tool sections, a cleaner hero,
   and subtle CSS-only entrance / hover motion. No JS, no new dependency.
   All motion is disabled under prefers-reduced-motion.
   ========================================================================== */

/* ---- Hero: a little more air, eyebrow kept small, search untouched. ---- */
main.home .home-intro{padding:56px 0 44px}
@media(min-width:760px){main.home .home-intro{padding:72px 0 52px}}
main.home .home-intro h1{font-size:clamp(1.9rem,5vw,2.6rem);line-height:1.15;
  letter-spacing:-.01em}
main.home .home-intro .g-eyebrow{margin-bottom:14px}

/* ---- Tool card grids (Popular + every category section). ---- */
/* v6.css styles .home-cat ul as a plain 2-col link list; this file turns
   those lists (and the Popular list, which v6.css never styled) into
   proper cards. Loaded later, so these rules win without touching v6.css. */
main.home .home-cat ul.tool-cards,
main.home .home-popular ul.tool-cards{list-style:none;margin:0 0 18px;padding:0;display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media(max-width:1023px){main.home .home-cat ul.tool-cards,
  main.home .home-popular ul.tool-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:559px){main.home .home-cat ul.tool-cards,
  main.home .home-popular ul.tool-cards{grid-template-columns:minmax(0,1fr)}}

main.home ul.tool-cards li.tool-card{min-width:0}
main.home ul.tool-cards li.tool-card a{display:flex;flex-direction:column;gap:4px;height:100%;
  padding:14px 16px;border:1px solid var(--line);border-radius:10px;
  background:var(--paper);color:var(--ink);text-decoration:none;line-height:1.5;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
main.home ul.tool-cards li.tool-card a:hover,
main.home ul.tool-cards li.tool-card a:focus-visible{border-color:var(--blue-line);
  box-shadow:0 4px 16px rgba(37,99,235,.10);transform:translateY(-2px);
  text-decoration:none}
main.home ul.tool-cards li.tool-card a:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
main.home ul.tool-cards li.tool-card .tc-name{font-weight:700;font-size:.98rem;color:var(--ink)}
main.home ul.tool-cards li.tool-card a:hover .tc-name{color:var(--blue)}
main.home ul.tool-cards li.tool-card .tc-desc{font-size:.86rem;color:var(--ink-2);line-height:1.55}

/* ---- Popular section: same cards, tighter top spacing, no top border. ---- */
main.home .home-popular{padding:36px 0 8px;border-top:1px solid var(--line)}
main.home .home-popular h2{margin-bottom:6px}
main.home .home-popular>p{color:var(--ink-2);max-width:68ch;margin:0 0 18px}

/* ---- Category sections: keep v6 spacing, drop the old plain-list look. ---- */
main.home .home-cat .view-all{margin-top:2px}

/* ---- Subtle entrance motion (CSS-only). ---- */
@keyframes hu-rise{from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}}
main.home .home-intro,
main.home .home-popular,
main.home .home-cat,
main.home .home-more,
main.home .home-guides,
main.home .home-faq{animation:hu-rise .45s ease both}
main.home .home-popular{animation-delay:.05s}
main.home .home-cat{animation-delay:.08s}

/* ---- Respect reduced motion: no entrance, no hover lift. ---- */
@media(prefers-reduced-motion:reduce){
  main.home .home-intro,
  main.home .home-popular,
  main.home .home-cat,
  main.home .home-more,
  main.home .home-guides,
  main.home .home-faq{animation:none}
  main.home ul.tool-cards li.tool-card a{transition:none}
  main.home ul.tool-cards li.tool-card a:hover,
  main.home ul.tool-cards li.tool-card a:focus-visible{transform:none}
}
