
/* ========== HOMEPAGE-SPECIFIC CSS (shared rules in style.css) ========== */
html { scroll-behavior: smooth; overflow-x: hidden; }

/* Navbar CSS moved to style.css - shared across all pages */
@media(max-width:768px){
  .hero-stats{gap:16px 24px;}
  .stat-num{font-size:1.5rem;}
  .hero-stats .stat-item{min-width:0;flex:1 1 40%;text-align:center;}
.footer{padding:10px 16px 10px !important;margin-top:0 !important;}
.footer-inner{padding:0 !important;gap:12px !important;}
.footer-brand p{font-size:0.72rem !important;margin-bottom:2px !important;}
.footer-col p{font-size:0.7rem !important;margin-bottom:4px !important;}
.footer-col a{font-size:0.75rem !important;padding:1px 0 !important;}
.footer-bottom{margin-top:8px !important;padding:8px 16px !important;gap:4px !important;}
.footer-bottom p{font-size:0.7rem !important;margin-top:2px !important;}
.footer-bottom > div{margin-top:4px !important;}
}

@media(max-width:480px){
  div.hero-stats{gap:8px;margin-top:32px;flex-wrap:nowrap;}
  .stat-num{font-size:1.3rem;}
  .hero-stats .stat-label{font-size:0.72rem;white-space:nowrap;}
  .hero-stats .stat-item{flex:1 1 0%;min-width:0;}
}
@media(max-width:360px){
  .hero-stats .stat-label{font-size:0.66rem;}
  div.hero-stats{gap:4px;}
}

/* ===== HERO ===== */
.hero {
  position: relative; overflow: hidden; overflow-x: clip; overflow-y: visible;
  padding: clamp(16px, 3vw, 28px) 24px clamp(32px, 6vw, 60px);
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 50%, #f8fafc 100%);
}
/* Old Safari (<16) doesn't understand overflow:clip and would clip the
   search-suggestions dropdown at the hero's bottom edge. Fallback: let the
   hero overflow visibly and hide the decorative glow blobs (they are the
   only horizontal overflow source; html already has overflow-x:hidden). */
@supports not (overflow: clip) {
  .hero { overflow: visible; }
  .hero::before, .hero::after { display: none; }
}
.hero::before {
  content: ''; position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -150px; left: -150px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 800;
  line-height: 1.1; margin-bottom: 0; position: relative; z-index: 1;
  color: #0f172a; text-align: center;
}
.hero-rotator {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 800;
  line-height: 1.1; margin: 0 auto 20px; position: relative; z-index: 1;
  color: #0f172a; text-align: center;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* Animated rotating text - production version.
   ============================================================================
   ROOT CAUSE OF THE MOBILE OVERLAP (fixed here):
   ----------------------------------------------------------------------------
   1) MISMATCHED GEOMETRY - the old @media(max-width:480px) rules shrank each
      word to font-size:0.85em and the clip window to height:1.02em, while the
      slide used PERCENTAGE translateY steps (16.6667% of the track height).
      Percentages are relative to the WHOLE flex track, so any em/font
      mismatch, sub-pixel rounding, or webfont swap made the resting steps stop
      BETWEEN words - leaving two words framed inside the window at once. That
      is exactly the "For You" + "For Free" on top of each other you saw.
   2) SAFARI COMPOSITING BLEED - the track had `will-change: transform` while
      the clip lived on the parent. On iOS Safari a composited child can ignore
      the parent's overflow:hidden clip and paint neighbour words over each
      other mid-transition.
   WHY THIS DESIGN IS SAFE:
   - The clip window (.text-rotator) and every word share the SAME height
     (1.2em) at every breakpoint, so the window can only ever frame ONE word
     at a rest position - overlap is impossible by construction.
   - The JS measures the real pixel height of one word and slides by exactly
     one measured step (no percentage math → no desync possible).
   - contain:paint + translateZ(0) + a WebKit mask force Safari to clip the
     sliding track correctly (fixes the compositing bleed).
   - min-width reserves horizontal space so the h1 never reflows as words
     change (CLS-safe).
   ============================================================================ */
.text-rotator {
  display: inline-block;
  position: relative;
  height: 1.2em;               /* identical to each word's height below */
  overflow: hidden;            /* hard clip window - one word per frame */
  contain: paint;              /* force the clip to actually clip (Safari fix) */
  transform: translateZ(0);    /* promote the clipper to its own layer (Safari fix) */
  -webkit-mask-image: -webkit-linear-gradient(#fff, #fff); /* legacy iOS hard clip */
  vertical-align: bottom;
  text-align: center;
  min-width: clamp(260px, 80vw, 480px);  /* width reserve → no CLS on rotation */
  line-height: 1.2;
}
.text-rotator__track {
  display: flex;
  flex-direction: column;
  will-change: transform;      /* GPU-accelerated vertical slide */
  transform: translate3d(0, 0, 0);
}
/* Deterministic pre-start state (mobile refresh fix): before JS measures and
   starts the loop, pin the track to word 1 so the first paint can never show
   a mid-list or between-words frame. JS sets data-ready="1" on start. */
.text-rotator:not([data-ready="1"]) .text-rotator__track {
  transform: translate3d(0, 0, 0) !important;
}
.text-rotator__word {
  display: block;
  height: 1.2em;               /* must equal .text-rotator height → exact framing */
  line-height: 1.2;
  white-space: nowrap;
  padding: 0 0.15em;           /* side breathing room so glyph edges are never cropped */
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* Punch: top-10 most-used tools, each word pops in its own color (11th = seamless-loop duplicate of 1st) */
.text-rotator__word:nth-child(1),.text-rotator__word:nth-child(11){background:linear-gradient(135deg,#ff3b30,#ff6b60);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.text-rotator__word:nth-child(2){background:linear-gradient(135deg,#22c55e,#4ade80);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.text-rotator__word:nth-child(3){background:linear-gradient(135deg,#8b5cf6,#c084fc);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.text-rotator__word:nth-child(4){background:linear-gradient(135deg,#f97316,#fb923c);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.text-rotator__word:nth-child(5){background:linear-gradient(135deg,#06b6d4,#3b82f6);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.text-rotator__word:nth-child(6){background:linear-gradient(135deg,#10b981,#34d399);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.text-rotator__word:nth-child(7){background:linear-gradient(135deg,#d946ef,#f0abfc);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.text-rotator__word:nth-child(8){background:linear-gradient(135deg,#ec4899,#f472b6);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.text-rotator__word:nth-child(9){background:linear-gradient(135deg,#3b82f6,#60a5fa);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.text-rotator__word:nth-child(10){background:linear-gradient(135deg,#f59e0b,#fbbf24);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem); color: #475569;
  max-width: 640px; margin: 0 auto 36px; line-height: 1.7;
  position: relative; z-index: 1;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
  padding: 14px 32px; border-radius: 100px; font-weight: 700; font-size: 0.95rem;
  border: none; cursor: pointer; transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(59,130,246,0.4); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: #334155;
  padding: 14px 32px; border-radius: 100px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid #e2e8f0; cursor: pointer; transition: all 0.3s ease;
}
.btn-secondary:hover { border-color: #3b82f6; color: #3b82f6; transform: translateY(-2px); }

/* Stats */
.hero-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 32px 48px; margin-top: 48px;
  position: relative; z-index: 1; max-width: 100%;
}
.stat-item { text-align: center; }
.stat-num { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; font-weight: 800; color: #0f172a; }
.stat-label { font-size: 0.85rem; color: #475569; font-weight: 500; margin-top: 2px; }

/* ===== SEARCH ===== */
.search-section {
  max-width: 640px; margin: -20px auto 0; padding: 0 24px;
  position: relative; z-index: 2;
}
.search-box {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 6px 6px 6px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}
.search-box:focus-within { border-color: #3b82f6; box-shadow: 0 4px 20px rgba(59,130,246,0.15); }
.search-box svg { width: 20px; height: 20px; color: #475569; flex-shrink: 0; }
.search-box input {
  flex: 1; border: none; outline: none; font-size: 0.95rem;
  font-family: 'Inter', sans-serif; color: #0f172a; background: transparent;
}
.search-box input::placeholder { color: #475569; }
.search-btn {
  background: #3b82f6; color: #fff; border: none; border-radius: 12px;
  padding: 10px 20px; font-weight: 600; font-size: 0.85rem; cursor: pointer;
  transition: background 0.2s; white-space: nowrap;
}
.search-btn:hover { background: #2563eb; }
.search-results {
  position: absolute; top: 100%; left: 24px; right: 24px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12); margin-top: 8px;
  display: none; max-height: 400px; overflow-y: auto; z-index: 100;
  text-align: left;
}
.search-results.active { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; transition: background 0.15s;
  border-bottom: 1px solid #f1f5f9;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f8fafc; }
.search-result-item .sr-icon { font-size: 1.2rem; flex-shrink: 0; line-height: 1; }
.search-result-item .sr-info { flex: 1; min-width: 0; }
.search-result-item .sr-info h3 { font-size: 0.9rem; font-weight: 600; color: #0f172a; margin: 0; line-height: 1.3; }
.search-result-item .sr-info p { font-size: 0.78rem; color: #475569; margin: 2px 0 0; line-height: 1.4; }
.search-no-results { padding: 24px 24px 8px; text-align: center; color: #475569; font-size: 0.9rem; }
.search-result-item mark { background: transparent; color: #2563eb; font-weight: 700; }
[data-theme="dark"] .search-result-item mark { color: #60a5fa; }
.search-result-item[aria-selected="true"] { background: #eff6ff; }
[data-theme="dark"] .search-result-item[aria-selected="true"] { background: #253244; }
.search-fallback-label { padding: 10px 20px 2px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; }
.search-browse-all { display: block; text-align: center; padding: 12px; font-size: 0.85rem; font-weight: 600; color: #2563eb; text-decoration: none; }
.search-browse-all:hover { text-decoration: underline; }
[data-theme="dark"] .search-browse-all { color: #60a5fa; }
/* Favorite star inside inline search results */
.aff-fav { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: #cbd5e1; font-size: 1.05rem; line-height: 1; cursor: pointer; }
.aff-fav:hover { border-color: #e2e8f0; color: #f59e0b; }
.aff-fav[aria-pressed="true"] { color: #f59e0b; }
/* ===== STUDIO BANNER ===== */
.studio-section { max-width: 1200px; margin: 0 auto; padding: 8px 24px 0; }
.studio-banner {
  text-align: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: 24px; padding: clamp(22px, 3.5vw, 36px) clamp(20px, 4vw, 48px);
  color: #f1f5f9; overflow: hidden; position: relative;
}
.studio-banner::before {
  content: ''; position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 560px; height: 280px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, rgba(139,92,246,0.28) 0%, transparent 70%);
}
.studio-banner::after {
  content: ''; position: absolute; bottom: -140px; left: 10%; width: 380px; height: 260px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, rgba(59,130,246,0.18) 0%, transparent 70%);
}
.studio-banner h2 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; margin: 0 0 8px; position: relative; z-index: 1; }
.studio-banner h2 .grad{background:linear-gradient(90deg,#93c5fd,#c4b5fd,#f0abfc);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.studio-sub { font-size: 0.9rem; color: #cbd5e1; max-width: 560px; margin: 0 auto 18px; line-height: 1.55; position: relative; z-index: 1; }
.studio-chain{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin:0 auto 18px;position:relative;z-index:1}
.studio-chip{display:inline-flex;align-items:center;gap:7px;background:rgba(255,255,255,0.07);border:1px solid rgba(255,255,255,0.16);color:#f1f5f9;font-size:0.78rem;font-weight:700;padding:6px 12px;border-radius:10px;backdrop-filter:blur(4px)}
.studio-chip i{width:9px;height:9px;border-radius:3px;flex-shrink:0}
.studio-arrow{color:#67e8f9;font-weight:800;font-size:0.9rem}
.studio-stats{display:flex;align-items:center;justify-content:center;gap:26px;flex-wrap:wrap;margin:0 auto 20px;position:relative;z-index:1}
.studio-stat{font-size:0.78rem;color:#a5b4cf}
.studio-stat b{display:block;font-size:1.1rem;color:#fff;font-family:'Space Grotesk',sans-serif}
.studio-cta-row{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;position:relative;z-index:1}
.studio-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #38bdf8, #818cf8 55%, #c084fc); color: #fff;
  font-weight: 800; font-size: 0.95rem; font-family: 'Inter', sans-serif;
  padding: 13px 34px; border-radius: 14px; border: none; text-decoration: none;
  box-shadow: 0 8px 32px rgba(129,140,248,0.45), inset 0 1px 0 rgba(255,255,255,0.35);
  position: relative; z-index: 1; transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.studio-btn::after{content:'';position:absolute;top:0;left:-80%;width:50%;height:100%;background:linear-gradient(100deg,transparent,rgba(255,255,255,0.45),transparent);transform:skewX(-20deg);animation:stshine 3.2s infinite}
@keyframes stshine{0%{left:-80%}55%{left:130%}100%{left:130%}}
.studio-btn:hover{transform:translateY(-2px) scale(1.02);box-shadow:0 12px 40px rgba(129,140,248,0.6), inset 0 1px 0 rgba(255,255,255,0.35)}
.studio-guide-link{color:#a5b4cf;font-size:0.88rem;font-weight:600;text-decoration:none;border-bottom:1px dashed rgba(165,180,207,0.5);padding-bottom:1px}
.studio-guide-link:hover{color:#fff;border-bottom-color:#fff}
@media (prefers-reduced-motion: reduce){.studio-btn::after{animation:none}}
@media (max-width: 640px) { .studio-banner { border-radius: 20px; padding: 20px 16px; } .studio-stats{gap:16px} .studio-chain{gap:6px;margin-bottom:14px} .studio-chip{font-size:0.72rem;padding:5px 10px} .studio-arrow{font-size:0.8rem} .studio-sub{margin-bottom:14px} .studio-stats{margin-bottom:16px} .studio-btn{padding:12px 28px;font-size:0.9rem} }

/* ===== CATEGORIES ===== */
.categories-section {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(28px, 3.5vw, 48px) 24px;
  overflow-x: hidden;
}
.section-header {
  text-align: center; margin-bottom: 32px;
}
.section-header h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800; color: #0f172a; margin-bottom: 12px;
}
.section-header p { font-size: 1.05rem; color: #475569; max-width: 560px; margin: 0 auto; }

.categories-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 900px) { .categories-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.category-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(var(--cat-glow),0.10), rgba(var(--cat-glow),0.02)), #fff;
  border: 1px solid rgba(var(--cat-glow),0.25); border-radius: 18px;
  padding: 18px 20px; cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), border-color 0.3s ease, box-shadow 0.35s ease;
  display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 2px 14px; align-items: center;
  grid-template-areas: "icon title arrow" "icon desc arrow";
  box-shadow: 0 2px 14px rgba(var(--cat-glow),0.08);
}
.category-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--cat-gradient); opacity: 0; transition: opacity 0.3s ease;
  z-index: 1;
}
.category-card::after {
  content: ''; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg); transition: left 0.7s ease; pointer-events: none;
}
.category-card:hover {
  transform: translateY(-10px); border-color: #93c5fd;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(59,130,246,0.08);
}
.category-card:focus-visible { outline: 2px solid #3b82f6; outline-offset: 3px; }
[data-theme="dark"] .category-card::after {
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.08), transparent);
}
.category-card:hover::before { opacity: 0.7 !important; }
.category-card:hover::after { left: 125%; }
.cat-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  grid-area: icon; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--cat-glow),0.30);
}
.cat-icon svg { width: 24px; height: 24px; }
.category-card:hover .cat-icon { transform: scale(1.12) rotate(-4deg); }
.category-card:hover h3 { transform: translateX(4px); }
.category-card h3 { transition: transform 0.3s ease; }
.cat-icon.pdf { background: linear-gradient(135deg, #fef2f2, #fee2e2); }
.cat-icon.calculator { background: linear-gradient(135deg, #faf5ff, #f3e8ff); }
.cat-icon.image { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.cat-icon.security { background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.cat-icon.audio-video { background: linear-gradient(135deg, #fdf2f8, #fce7f3); }
.cat-icon.utility { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.category-card h3 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem;
  font-weight: 700; color: #0f172a; grid-area: title; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.category-card p { font-size: 0.83rem; color: #475569; line-height: 1.45; grid-area: desc; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-meta { display: flex; flex-direction: column; align-items: center; gap: 6px; grid-area: arrow; }
.cat-count {
  font-size: 0.78rem; font-weight: 600; color: #475569;
  background: rgba(var(--cat-glow),0.12); padding: 4px 10px; border-radius: 100px;
}
.cat-arrow {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cat-gradient); color: #fff; border: none;
  box-shadow: 0 3px 10px rgba(var(--cat-glow),0.40);
  transition: all 0.3s ease;
}
.category-card:hover .cat-arrow { filter: brightness(1.08); transform: translateX(4px); }
@media (max-width: 560px) {
  .categories-grid { grid-template-columns: 1fr; gap: 10px; }
  .category-card { padding: 12px 14px 12px 16px; gap: 1px 12px; border-radius: 16px; grid-template-columns: 44px minmax(0,1fr) auto; }
  [data-theme="dark"] .category-card { border-radius: 16px; }
  .category-card::before { top: 0; left: 0; right: auto; bottom: 0; width: 4px; height: auto; background: var(--cat-gradient); opacity: 1; }
  .category-card:active { transform: scale(0.98); }
  .cat-icon { width: 44px; height: 44px; border-radius: 14px; }
  .cat-icon svg { width: 22px; height: 22px; }
  .category-card h3 { font-size: 0.95rem; letter-spacing: 0.01em; }
  .category-card p { display: block; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cat-count { font-size: 0.68rem; padding: 2px 8px; }
  .cat-arrow { width: 30px; height: 30px; }
}

/* Category Colors */
.category-card[data-cat="pdf"] { --cat-gradient: linear-gradient(90deg, #ff3b30, #f97316); --cat-glow: 248,113,113; }
.category-card[data-cat="calculator"] { --cat-gradient: linear-gradient(90deg, #8b5cf6, #a855f7); --cat-glow: 139,92,246; }
.category-card[data-cat="image"] { --cat-gradient: linear-gradient(90deg, #22c55e, #16a34a); --cat-glow: 34,197,94; }
.category-card[data-cat="security"] { --cat-gradient: linear-gradient(90deg, #f59e0b, #f97316); --cat-glow: 245,158,11; }
.category-card[data-cat="audio-video"] { --cat-gradient: linear-gradient(90deg, #ec4899, #f43f5e); --cat-glow: 236,72,153; }
.category-card[data-cat="utility"] { --cat-gradient: linear-gradient(90deg, #3b82f6, #6366f1); --cat-glow: 59,130,246; }

/* ===== TOOLS PANEL (shown when category clicked) ===== */
.tools-panel {
  max-width: 1200px; margin: 0 auto; padding: 0 24px 60px;
  display: none;
}
.tools-panel.active { display: block; }
.tools-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.tools-panel-header h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem;
  font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 10px;
}
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0;
  padding: 8px 16px; border-radius: 100px; font-size: 0.85rem;
  font-weight: 500; cursor: pointer; transition: all 0.2s;
}
.back-btn:hover { background: #e2e8f0; color: #334155; }
.tools-grid-panel {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.tool-card-new {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 18px 20px; transition: all 0.25s ease;
  text-decoration: none;
}
.tool-card-new:hover {
  border-color: #3b82f6; transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59,130,246,0.1);
}
.tool-card-new .tc-icon { font-size: 1.5rem; flex-shrink: 0; }
/* category icon colors */
.cat-pdf { color: #3b82f6; }
.cat-calculator { color: #10b981; }
.cat-utility { color: #8b5cf6; }
.cat-security { color: #ff3b30; }
.cat-image { color: #ec4899; }
.cat-audio-video { color: #f59e0b; }
.tool-card-new .tc-info { flex: 1; min-width: 0; }
.tool-card-new .tc-info h4 { font-size: 0.92rem; font-weight: 600; color: #0f172a; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-card-new .tc-info p { font-size: 0.78rem; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-card-new .tc-arrow {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #f8fafc; color: #475569; transition: all 0.2s;
}
.tool-card-new:hover .tc-arrow { background: #3b82f6; color: #fff; }

/* ===== FEATURES ===== */
.features-section {
  background: #fff; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9;
  padding: clamp(28px, 3.5vw, 48px) 24px;
}
.features-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; gap: 24px; } }
.feature-item {
  text-align: center; padding: 32px 24px;
  background: #fff; border: 1px solid #eef2f6; border-radius: 20px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.feature-item:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(15,23,42,0.08); border-color: #e2e8f0; }
.feature-icon-wrap {
  width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.feature-item:hover .feature-icon-wrap { transform: scale(1.08); }
.fi-blue { background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 1px solid rgba(59,130,246,0.25); }
.fi-purple { background: linear-gradient(135deg, #faf5ff, #f3e8ff); border: 1px solid rgba(139,92,246,0.25); }
.fi-green { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border: 1px solid rgba(34,197,94,0.25); }
.feature-item:hover .fi-blue { box-shadow: 0 10px 24px rgba(59,130,246,0.18); }
.feature-item:hover .fi-purple { box-shadow: 0 10px 24px rgba(139,92,246,0.18); }
.feature-item:hover .fi-green { box-shadow: 0 10px 24px rgba(34,197,94,0.18); }
.feature-item h3 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem;
  font-weight: 700; color: #0f172a; margin-bottom: 8px;
}
.feature-item p { font-size: 0.9rem; color: #475569; line-height: 1.6; }

/* ===== FAQ ===== */
.faq-section {
  max-width: 780px; margin: 0 auto;
  padding: clamp(32px, 4vw, 56px) 24px clamp(24px, 3vw, 40px);
}
.faq-item {
  border: 1px solid #e2e8f0; border-radius: 16px;
  margin-bottom: 12px; overflow: hidden;
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.35s, transform 0.3s;
}
.faq-item:hover {
  border-color: #bfdbfe;
  box-shadow: 0 4px 20px rgba(59,130,246,0.07);
}
.faq-item.open {
  border-color: #93c5fd;
  box-shadow: 0 8px 32px rgba(59,130,246,0.1);
  transform: translateY(-2px);
}
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; font-size: 0.95rem; font-weight: 600; color: #0f172a;
  font-family: 'Inter', sans-serif; text-align: left;
  transition: color 0.2s;
}
.faq-q:hover { color: #3b82f6; }
.faq-num {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #3b82f6; font-size: 0.72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.faq-item.open .faq-num {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; transform: scale(1.08);
}
.faq-q span:not(.faq-num) { flex: 1; }
.faq-q svg {
  width: 20px; height: 20px; color: #94a3b8; flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.22,0.61,0.36,1), color 0.25s;
}
.faq-item.open .faq-q svg { transform: rotate(45deg); color: #3b82f6; }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22,0.61,0.36,1), padding 0.3s;
  padding: 0 22px;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 22px 22px; }
.faq-a p {
  font-size: 0.9rem; color: #475569; line-height: 1.75;
  border-top: 1px solid #f1f5f9; padding-top: 16px; margin: 0;
}
[data-theme="dark"] .faq-item { background:#1e293b; border-color:#334155; }
[data-theme="dark"] .faq-item:hover { border-color:#475569; box-shadow:0 4px 20px rgba(0,0,0,0.2); }
[data-theme="dark"] .faq-item.open { border-color:#3b82f6; box-shadow:0 8px 32px rgba(59,130,246,0.15); }
[data-theme="dark"] .faq-q { color:#f1f5f9; }
[data-theme="dark"] .faq-q:hover { color:#60a5fa; }
[data-theme="dark"] .faq-num { background:rgba(96,165,250,0.12); color:#60a5fa; }
[data-theme="dark"] .faq-item.open .faq-num { background:linear-gradient(135deg,#3b82f6,#2563eb); color:#fff; }
[data-theme="dark"] .faq-a p { color:#94a3b8; border-top-color:#334155; }
@media(max-width:600px) {
  .faq-q { padding:16px 16px; font-size:0.88rem; gap:10px; }
  .faq-num { width:24px; height:24px; font-size:0.68rem; border-radius:7px; }
  .faq-a { padding:0 16px; }
  .faq-item.open .faq-a { padding:0 16px 18px; }
}

/* ===== LISTED-ON BADGES (bare badges, light + dark support) ===== */
.aff-listed{background:var(--bg-main);border-top:1px solid #e2e8f0;padding:12px 16px 10px;text-align:center;}
.aff-listed-inner{max-width:1200px;margin:0 auto;}
.aff-listed-title{font-family:'Space Grotesk',sans-serif;font-size:0.68rem;font-weight:700;text-transform:uppercase;letter-spacing:1.5px;color:#64748b;margin-bottom:8px;}
.aff-listed-row{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px;}
.aff-listed-row a{width:140px;height:43px;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;padding:0;box-sizing:border-box;transition:transform 0.2s,opacity 0.2s;}
.aff-listed-row a:hover{transform:scale(1.06);opacity:0.92;}
.aff-listed-row img{width:100% !important;height:auto !important;max-width:100% !important;max-height:100% !important;object-fit:contain;display:block;}
[data-theme="dark"] .aff-listed{background:#0b1120;border-top-color:#1e293b;}
[data-theme="dark"] .aff-listed-title{color:#94a3b8;}
.aff-listed-row a.aff-b-narrow{width:130px;}
.aff-listed-row a.aff-b-wide{width:155px;}
.aff-listed-row a.aff-b-xl{width:175px;}
@media (max-width:640px){.aff-listed{padding:10px 12px 8px;}.aff-listed-row{gap:8px;}.aff-listed-row a{flex:0 0 calc(33.333% - 6px);width:auto;height:auto;aspect-ratio:140/43;}}

/* ===== FEATURED-ON STRIP (visible directory badges, kept small) ===== */
.aff-featured{background:var(--bg-main);border-top:1px solid #e2e8f0;padding:14px 16px 12px;text-align:center;}
.aff-featured-title{font-family:'Space Grotesk',sans-serif;font-size:0.68rem;font-weight:700;text-transform:uppercase;letter-spacing:1.5px;color:#64748b;margin-bottom:10px;}
.aff-featured-row{display:flex;gap:6px;overflow-x:auto;max-width:1100px;margin:0 auto;padding:2px 4px 6px;scrollbar-width:none;-ms-overflow-style:none;cursor:grab;touch-action:pan-x pan-y;}
.aff-featured-row::-webkit-scrollbar{display:none;width:0 !important;height:0 !important;}
.aff-featured-row a{display:flex !important;align-items:center;justify-content:center;width:auto !important;height:48px;padding:6px 12px;box-sizing:border-box;flex:none;transition:transform 0.2s,opacity 0.2s;}
.aff-featured-row a:hover{transform:scale(1.06);opacity:0.92;}
.aff-featured-row img{height:32px !important;max-height:32px;width:auto !important;max-width:126px !important;min-width:0 !important;display:block;object-fit:contain;pointer-events:none;}
.aff-featured-row.dragging{cursor:grabbing;}
.aff-featured-row.dragging a{pointer-events:none;}
[data-theme="dark"] .aff-featured{background:#0b1120;border-top-color:#1e293b;}
/* StartupFast badge art is transparent-fill + dark text: white tile keeps it readable in dark mode */
[data-theme="dark"] .aff-featured-row a[href*="startupfa.st"]{background:none;}
[data-theme="dark"] .aff-featured-row a[href*="startupfa.st"] img{background:#ffffff;border-radius:8px;padding:3px 8px;box-sizing:content-box;}
/* DeepLaunch badge art is a dark pill + light text: subtle tile lifts it off the dark strip */
[data-theme="dark"] .aff-featured-row a[href*="deeplaunch.io"] img{background:#1e293b;border-radius:8px;padding:3px 8px;box-sizing:content-box;}
[data-theme="dark"] .aff-featured-title{color:#94a3b8;}
@media (max-width:640px){.aff-featured-row{gap:5px;}.aff-featured-row a{height:36px;padding:3px 4px;}.aff-featured-row img{height:28px !important;max-height:28px;max-width:100% !important;}}

/* ===== FOOTER ===== */
.footer {
  background: #0f172a; color: #fff; padding: 10px 24px 14px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px;
  padding: 4px 20px 12px;
}
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 20px; } }

.footer-brand h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.footer-brand p { font-size: 0.78rem; color: #94a3b8; line-height: 1.5; }
.footer-col h4 { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; margin-bottom: 6px; }
.footer-col a { display: block; width: fit-content; max-width: 100%; font-size: 0.8rem; color: #cbd5e1; padding: 1px 0; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1200px; margin: 10px auto 0;
  padding: 10px 20px; border-top: 1px solid rgba(255,255,255,0.08);
  width: 100%; box-sizing: border-box; text-align: center;
}
.footer-bottom p { font-size: 0.74rem; color: #94a3b8; }
.footer-bottom .heart-icon { color: #ef4444; }
.footer-bottom .made-with { margin-top: 2px; }
.footer-bottom .footer-social {
  display: flex; justify-content: center; gap: 16px; margin-top: 6px;
  align-items: center; flex-wrap: wrap;
}
.footer-bottom .footer-social a {
  display: inline-flex; min-width: 36px; min-height: 36px;
  align-items: center; justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
}
.footer-bottom .footer-social a:hover { opacity: 0.7; transform: scale(1.15); }
@media (max-width: 640px) { .footer-bottom { text-align: center; } }

/* ===== CATEGORY PAGE (overlay) ===== */
.cat-page-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: #f8fafc; overflow-y: auto;
  transform: translateY(100%); visibility: hidden; pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s 0.4s;
  overscroll-behavior: contain;
}
.cat-page-overlay.active { transform: translateY(0); visibility: visible; pointer-events: auto; transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1); }
.cat-page-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
  border-bottom: 1px solid #e2e8f0; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.cat-page-header h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.2rem; font-weight: 700; }
.cat-page-header h2 svg { vertical-align: -6px; margin-right: 4px; }
.cat-page-close {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid #e2e8f0;
  background: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; color: #64748b;
}
.cat-page-close:hover { background: #f1f5f9; color: #0f172a; }
.cat-page-body { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.cat-page-tools {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}

/* ===== ANIMATIONS & GLOW EFFECTS ===== */

/* Floating blobs in hero */
.hero-blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.22;
  animation: blobFloat 8s ease-in-out infinite alternate;
}
.blob-1 { width: 400px; height: 400px; background: #3b82f6; top: -10%; left: 10%; animation-duration: 7s; }
.blob-2 { width: 300px; height: 300px; background: #8b5cf6; top: 20%; right: 5%; animation-duration: 9s; animation-delay: -2s; }
.blob-3 { width: 250px; height: 250px; background: #ec4899; bottom: 0%; left: 30%; animation-duration: 8s; animation-delay: -4s; }
.blob-4 { width: 180px; height: 180px; background: #06b6d4; top: 10%; left: 55%; animation-duration: 10s; animation-delay: -1s; }
@media(max-width:768px){ .blob{filter:blur(40px);opacity:0.08} .blob-3,.blob-4{display:none} }
@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
  100% { transform: translate(15px, -15px) scale(1.02); }
}

/* Hero badge - static, no float */

/* Gradient text shimmer */
.hero h1 .gradient-text {
  background-size: 200% 200%;
  animation: gradientShimmer 4s ease-in-out infinite;
}
@keyframes gradientShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Featured tool link on category cards */


/* Popular Tools tabs section */
.popular-section{background:#fff;padding:clamp(28px,3.5vw,48px) 24px;border-top:1px solid #f1f5f9}
.popular-inner{max-width:1200px;margin:0 auto}
.popular-tabs{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:32px}
.popular-tab{padding:8px 18px;border-radius:100px;border:1px solid #e2e8f0;background:#fff;font-size:0.85rem;font-weight:600;color:#475569;cursor:pointer;transition:all 0.2s;font-family:'Inter',sans-serif}
.popular-tab:hover{border-color:#bfdbfe;color:#3b82f6}
.popular-tab.active{background:#3b82f6;color:#fff;border-color:#3b82f6}
.popular-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px;margin-bottom:28px}
.popular-tool{display:flex;align-items:center;gap:14px;padding:18px 20px;background:#fff;border:1px solid #eef2f6;border-radius:14px;text-decoration:none;transition:all 0.25s;position:relative;overflow:hidden}
.popular-tool::before{content:'';position:absolute;left:0;top:0;height:100%;width:3px;background:#3b82f6;opacity:0;transition:opacity 0.25s}
.popular-tool:hover{border-color:#bfdbfe;transform:translateY(-3px);box-shadow:0 8px 24px rgba(59,130,246,0.1)}
.popular-tool:hover::before{opacity:1}
.popular-tool-icon{font-size:1.6rem;flex-shrink:0;width:42px;height:42px;display:flex;align-items:center;justify-content:center;background:#f8fafc;border-radius:10px;border:1px solid #f1f5f9}
.popular-tool-info{flex:1;min-width:0}
.popular-tool-info h4{font-size:0.95rem;font-weight:600;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.popular-tool-info p{font-size:0.78rem;color:#475569;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.popular-tool .popular-cat-badge{font-size:0.6rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;padding:3px 10px;border-radius:100px;background:#f1f5f9;color:#475569;flex-shrink:0}
.load-more-wrap{text-align:center;padding-top:12px}
.load-more-btn{display:inline-flex;align-items:center;gap:8px;padding:12px 36px;border-radius:100px;border:2px solid #e2e8f0;background:#fff;font-size:0.9rem;font-weight:600;color:#2563eb;cursor:pointer;transition:all 0.25s;font-family:'Inter',sans-serif}
.load-more-btn:hover{background:#f0f7ff;border-color:#2563eb;color:#1d4ed8;transform:translateY(-2px);box-shadow:0 4px 12px rgba(59,130,246,0.12)}
.load-more-btn .spin{display:inline-block;animation:spin 0.8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.popular-tool.hidden{display:none}
/* Popular tool entrance stagger */
@keyframes toolFadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
.popular-tool{animation:toolFadeIn 0.4s ease both;}
[data-theme="dark"] .popular-section{background:#0f172a;border-color:#1e293b}
[data-theme="dark"] .popular-tab{background:#1e293b;border-color:#334155;color:#94a3b8}
[data-theme="dark"] .popular-tab:hover{border-color:#3b82f6;color:#60a5fa}
[data-theme="dark"] .popular-tab.active{background:#3b82f6;color:#fff;border-color:#3b82f6}
[data-theme="dark"] .popular-tool{background:#1e293b;border-color:#334155}
[data-theme="dark"] .popular-tool:hover{border-color:#3b82f6}
[data-theme="dark"] .popular-tool-info h4{color:#f1f5f9}
[data-theme="dark"] .popular-cat-badge{background:#334155;color:#94a3b8}
[data-theme="dark"] .popular-tool-icon{background:#1e293b;border-color:#334155}
[data-theme="dark"] .load-more-btn{background:#1e293b;border-color:#334155;color:#60a5fa}
[data-theme="dark"] .load-more-btn:hover{background:#0f172a;border-color:#60a5fa}
[data-theme="dark"] .how-section{background:#0f172a;border-color:#1e293b}
[data-theme="dark"] .how-step h3{color:#f1f5f9}
[data-theme="dark"] .how-step p{color:#94a3b8}
[data-theme="dark"] .how-grid::before{background:linear-gradient(90deg,#1d4ed8,#7c3aed,#15803d);opacity:0.45}
[data-theme="dark"] .how-icon.hi-blue{background:rgba(96,165,250,0.12);border:1px solid rgba(96,165,250,0.25)}
[data-theme="dark"] .how-icon.hi-purple{background:rgba(139,92,246,0.12);border:1px solid rgba(139,92,246,0.25)}
[data-theme="dark"] .how-icon.hi-green{background:rgba(34,197,94,0.12);border:1px solid rgba(34,197,94,0.25)}
[data-theme="dark"] .how-icon.hi-blue svg{color:#60a5fa}
[data-theme="dark"] .how-icon.hi-purple svg{color:#a78bfa}
[data-theme="dark"] .how-icon.hi-green svg{color:#4ade80}
[data-theme="dark"] .how-num{border-color:#1e293b}
[data-theme="dark"] .guides-section{background:#0b1120}
[data-theme="dark"] .guide-card{background:#1e293b;border-color:#334155}
[data-theme="dark"] .guide-card:hover{border-color:#60a5fa;box-shadow:0 8px 24px rgba(96,165,250,0.15)}
[data-theme="dark"] .guide-card h3{color:#f1f5f9}
[data-theme="dark"] .guide-card p{color:#94a3b8}

/* Search box animated glow */
.search-box { transition: all 0.3s ease, box-shadow 0.4s ease; }
.search-box:focus-within {
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12), 0 4px 20px rgba(59,130,246,0.15);
  border-color: #3b82f6;
}

/* Button ripple */
.btn-primary, .btn-secondary, .nav-cta { position: relative; overflow: hidden; }
.btn-primary::after, .btn-secondary::after, .nav-cta::after {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
}
.btn-primary:active::after, .btn-secondary:active::after, .nav-cta:active::after {
  width: 300px; height: 300px; opacity: 0;
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Stat counter glow */
.stat-num { transition: color 0.3s, text-shadow 0.3s; }
.stat-item:hover .stat-num { color: #3b82f6; text-shadow: 0 0 20px rgba(59,130,246,0.3); }

/* Footer column links glow */
.footer-col a { transition: color 0.2s, text-shadow 0.2s; }
.footer-col a:hover { text-shadow: 0 0 10px rgba(255,255,255,0.3); }

/* Tool card glow in overlay */
.tool-card-new:hover { box-shadow: 0 0 20px rgba(59,130,246,0.12), 0 8px 24px rgba(59,130,246,0.1); }

/* Nav CTA glow */
.nav-cta { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
.nav-cta:hover { box-shadow: 0 0 20px rgba(59,130,246,0.25), 0 4px 12px rgba(59,130,246,0.35); }

/* Section header underline animation */
.section-header h2 { position: relative; display: inline-block; }
.section-header h2::after {
  content: ''; position: absolute; bottom: -8px; left: 50%; width: 0; height: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6); border-radius: 2px;
  transition: width 0.4s ease, left 0.4s ease;
}
.section-header h2:hover::after { width: 60px; left: calc(50% - 30px); }

/* FAQ item glow on open - now handled by card border/shadow above */

/* How It Works */
.how-section{background:#fff;padding:clamp(20px,3vw,36px) 24px;border-top:1px solid #f1f5f9}
.how-section .section-header{margin-bottom:24px}
.how-grid{max-width:960px;margin:0 auto;position:relative;display:grid;grid-template-columns:repeat(3,1fr);gap:24px 20px}
@media(max-width:720px){.how-grid{grid-template-columns:1fr;gap:22px}}
.how-grid::before{content:'';position:absolute;top:25px;left:16.67%;right:16.67%;height:2px;background:linear-gradient(90deg,#bfdbfe,#ddd6fe,#bbf7d0);border-radius:2px;z-index:0;opacity:0.8}
@media(max-width:720px){.how-grid::before{display:none}}
.how-step{position:relative;z-index:1;text-align:center;padding:12px 6px;overflow:visible}
.how-icon{position:relative;width:56px;height:56px;border-radius:16px;margin:0 auto 14px;display:flex;align-items:center;justify-content:center;transition:transform 0.3s ease,box-shadow 0.3s ease;overflow:visible}
.how-icon svg{width:24px;height:24px}
.how-step:hover .how-icon{transform:scale(1.08)}
.how-num{position:absolute;top:-7px;right:-7px;width:22px;height:22px;border-radius:50%;color:#fff;font-size:0.72rem;font-weight:800;display:flex;align-items:center;justify-content:center;font-family:'Space Grotesk',sans-serif;box-shadow:0 2px 8px rgba(15,23,42,0.18);border:2px solid #fff}
.how-icon.hi-blue{background:linear-gradient(135deg,#eff6ff,#dbeafe)}
.how-icon.hi-purple{background:linear-gradient(135deg,#faf5ff,#f3e8ff)}
.how-icon.hi-green{background:linear-gradient(135deg,#f0fdf4,#dcfce7)}
.how-icon.hi-blue svg{color:#3b82f6}
.how-icon.hi-purple svg{color:#8b5cf6}
.how-icon.hi-green svg{color:#22c55e}
.how-icon.hi-blue .how-num{background:#3b82f6}
.how-icon.hi-purple .how-num{background:#8b5cf6}
.how-icon.hi-green .how-num{background:#22c55e}
.how-step:hover .hi-blue{box-shadow:0 10px 24px rgba(59,130,246,0.22)}
.how-step:hover .hi-purple{box-shadow:0 10px 24px rgba(139,92,246,0.22)}
.how-step:hover .hi-green{box-shadow:0 10px 24px rgba(34,197,94,0.22)}
.how-step h3{font-family:'Space Grotesk',sans-serif;font-size:1rem;font-weight:700;color:#0f172a;margin-bottom:5px}
.how-step p{font-size:0.83rem;color:#475569;line-height:1.55;max-width:240px;margin:0 auto}

/* Latest Guides */
.guides-section{background:#f8fafc;padding:clamp(28px,3.5vw,48px) 24px}
.guides-grid{max-width:900px;margin:0 auto;display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
@media(max-width:768px){.guides-grid{grid-template-columns:1fr;gap:16px}}
.guide-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:24px;transition:all 0.3s ease;text-decoration:none;display:flex;flex-direction:column;gap:8px}
.guide-card:hover{border-color:#bfdbfe;transform:translateY(-3px);box-shadow:0 8px 24px rgba(59,130,246,0.1)}
.guide-cat{font-size:0.7rem;font-weight:600;text-transform:uppercase;letter-spacing:0.08em;color:#3b82f6;background:#eff6ff;padding:3px 10px;border-radius:100px;align-self:flex-start}
.guide-card h3{font-family:'Space Grotesk',sans-serif;font-size:0.95rem;font-weight:700;color:#0f172a;line-height:1.3}
.guide-card p{font-size:0.82rem;color:#475569;line-height:1.5;flex:1}
.guide-card .guide-read{font-size:0.8rem;font-weight:600;color:#3b82f6;display:flex;align-items:center;gap:4px;margin-top:4px}

[data-theme="dark"] .guide-card .guide-read{color:#60a5fa}

/* Back to top */

/* Skip link */
.skip-link{position:absolute;top:-100px;left:0;background:#3b82f6;color:#fff;padding:8px 16px;z-index:9999;transition:top .2s;font-weight:600;border-radius:0 0 8px 8px;}
.skip-link:focus{top:0;}
/* Visually hidden but readable by screen readers (used for the rotating h1). */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}

/* Sticky nav anchor offset - anchored sections never hide under the 64px navbar */
section[id]{scroll-margin-top:80px;}

/* Keyboard focus ring - mouse users unaffected, keyboard users get clear focus */
:focus-visible{outline:2px solid #3b82f6;outline-offset:2px;border-radius:4px;}
[data-theme="dark"] :focus-visible{outline-color:#60a5fa;}

/* Selection + scrollbar polish */
::selection{background:rgba(59,130,246,0.18);}
::-webkit-scrollbar{width:10px;height:10px;}
::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:8px;}
::-webkit-scrollbar-thumb:hover{background:#94a3b8;}
::-webkit-scrollbar-track{background:transparent;}
[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#334155;}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{background:#475569;}

/* Scroll progress bar */
.scroll-progress{
  position:fixed;top:0;left:0;width:100%;height:3px;
  background:linear-gradient(90deg,#3b82f6,#8b5cf6,#ec4899);
  transform-origin:0 50%;transform:scaleX(0);
  z-index:2001;pointer-events:none;
}

/* Reduced Motion - Accessibility */
@media (prefers-reduced-motion: reduce) {
  .hero-blobs, .blob { animation: none !important; }
  .navbar { transition: none !important; }
  .btn-primary, .btn-secondary { transition: none !important; }
  .category-card, .category-card::after, .popular-tool, .tool-card-new { transition: none !important; }
  .category-card:hover, .popular-tool:hover { transform: none !important; }
}
/* Solid header background (no translucency) */
.navbar{background:#ffffff!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
[data-theme="dark"] .navbar{background:#0f172a!important;}
