/* ==========================================================================
   WorkIQ WOW layer — motion + visual upgrade.
   Loaded AFTER css/style.css. Pure enhancement: no existing selector is
   removed, only extended. All animation is transform/opacity (GPU cheap)
   and disabled under prefers-reduced-motion.
   ========================================================================== */

/* ---------- Deep-space body ---------- */
body {
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, #1c1145 0%, transparent 62%),
    radial-gradient(ellipse 70% 50% at 85% 110%, #2a0f45 0%, transparent 60%),
    linear-gradient(180deg, #050214, #0a0628 55%, #030014);
}

/* ---------- Galaxy starfield (JS-generated layers) ---------- */
.starfield { position: fixed; inset: 0; z-index: -3; overflow: hidden; pointer-events: none; }
.starfield .slayer { position: absolute; inset: 0; display: block; border-radius: 50%; background: transparent; animation: twinkle var(--tw, 4s) ease-in-out infinite; will-change: opacity; }
@keyframes twinkle { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.shooting-star { position: absolute; left: -12%; width: 190px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #fff, rgba(255,255,255,0)); transform: rotate(-16deg); opacity: 0; animation: shoot 12s linear infinite; pointer-events: none; }
.shooting-star::before { content: ""; position: absolute; left: 0; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px 3px rgba(255,255,255,.85); }
@keyframes shoot {
  0%, 90% { opacity: 0; transform: translateX(0) translateY(0) rotate(-16deg); }
  92% { opacity: 1; }
  97%, 100% { opacity: 0; transform: translateX(74vw) translateY(26vh) rotate(-16deg); }
}

/* ---------- Nebula (aurora recolored for deep space) ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(90px); opacity: .5; will-change: transform; }
.aurora span:nth-child(1) { background: radial-gradient(circle, rgba(109,40,217,.55), transparent 70%); top: -16vmax; left: -12vmax; animation: drift1 26s ease-in-out infinite alternate; }
.aurora span:nth-child(2) { background: radial-gradient(circle, rgba(34,211,238,.34), transparent 70%); top: 18vh; right: -18vmax; animation: drift2 32s ease-in-out infinite alternate; }
.aurora span:nth-child(3) { background: radial-gradient(circle, rgba(217,70,239,.3), transparent 70%); bottom: -22vmax; left: 28vw; animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(9vmax, 7vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-8vmax, 6vmax) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-6vmax, -8vmax) scale(1.2); } }

/* ---------- Scroll reveal (only hidden when JS is running) ---------- */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); transition-delay: var(--rd, 0s); will-change: opacity, transform; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Header upgrade ---------- */
.header { transition: box-shadow .3s ease, background .3s ease; }
.header.scrolled { box-shadow: 0 12px 40px rgba(0,0,0,.35); background: rgba(8,10,31,.85); }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; padding: 9px 18px !important; border-radius: 999px; background: linear-gradient(135deg, var(--primary), var(--cyan)); color: #fff !important; font-weight: 900; box-shadow: 0 10px 26px rgba(124,92,255,.35); transition: transform .2s ease, box-shadow .2s ease; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(124,92,255,.5); background: linear-gradient(135deg, var(--primary), var(--cyan)); }

/* ---------- Hero ---------- */
.wow-hero { position: relative; text-align: center; padding: 92px 0 64px; overflow: hidden; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: .82rem; font-weight: 800; letter-spacing: .04em; color: var(--text-secondary); border: 1px solid var(--line-strong); background: rgba(255,255,255,.06); padding: 8px 18px; border-radius: 999px; margin-bottom: 22px; backdrop-filter: blur(8px); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(64,249,155,.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 11px rgba(64,249,155,0); } 100% { box-shadow: 0 0 0 0 rgba(64,249,155,0); } }
.wow-hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.4rem); line-height: 1.06; letter-spacing: -0.035em; margin: 0 0 18px; font-weight: 900; }
.grad { background: linear-gradient(90deg, #a78bfa, #e879f9, #22d3ee, #a78bfa); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: gradShift 9s linear infinite; }
@keyframes gradShift { to { background-position: 300% 0; } }
.rotator { display: inline-block; }
.rotator.swap { animation: wordIn .45s cubic-bezier(.16,1,.3,1); }
@keyframes wordIn { from { opacity: 0; transform: translateY(55%); } to { opacity: 1; transform: none; } }
.hero-sub { max-width: 640px; margin: 0 auto; color: var(--text-secondary); font-size: 1.08rem; }

/* Hero search */
.hero-search { max-width: 620px; margin: 32px auto 0; position: relative; }
.hero-search .s-icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); opacity: .55; pointer-events: none; font-size: 1.15rem; }
.hero-search input { width: 100%; padding: 18px 24px 18px 56px; border-radius: 999px; font-size: 1.04rem; color: var(--text); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); outline: none; transition: border-color .25s, box-shadow .25s, background .25s; backdrop-filter: blur(10px); }
.hero-search input::placeholder { color: rgba(247,248,255,.42); }
.hero-search input:focus { border-color: rgba(0,212,255,.65); box-shadow: 0 0 0 6px rgba(0,212,255,.12); background: rgba(255,255,255,.09); }
.search-hint { margin-top: 12px; font-size: .85rem; color: var(--text-muted); }
.search-hint button { background: none; border: none; color: var(--cyan); cursor: pointer; font: inherit; padding: 2px 4px; }
.search-hint button:hover { text-decoration: underline; }

/* Hero stats */
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.hstat { text-align: center; min-width: 110px; }
.hstat b { display: block; font-size: 2.1rem; font-weight: 900; letter-spacing: -0.03em; background: linear-gradient(135deg, #fff, var(--cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; font-variant-numeric: tabular-nums; }
.hstat span { color: var(--text-secondary); font-size: .85rem; font-weight: 600; }

/* Scroll cue */
.scroll-cue { margin-top: 44px; color: var(--text-muted); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 800; }
.scroll-cue::after { content: ""; display: block; width: 1px; height: 44px; margin: 12px auto 0; background: linear-gradient(180deg, var(--cyan), transparent); animation: cueDrop 1.8s ease-in-out infinite; }
@keyframes cueDrop { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Marquee ticker ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 15px 0; background: rgba(255,255,255,.025); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: inline-flex; gap: 40px; white-space: nowrap; animation: scrollX 36s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track a { color: var(--text-secondary); font-weight: 700; font-size: .92rem; display: inline-flex; align-items: center; gap: 40px; }
.marquee-track a:hover { color: #fff; }
.marquee-track .tick { color: var(--cyan); font-size: .8rem; }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.wow-section { padding: 76px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 38px; }
.section-head .kicker { display: inline-block; font-size: .78rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); margin-bottom: 12px; }
.section-head h2 { font-size: clamp(1.8rem, 3.8vw, 2.5rem); margin: 0 0 12px; letter-spacing: -0.03em; font-weight: 900; }
.section-head p { color: var(--text-secondary); margin: 0; font-size: 1.02rem; }

/* ---------- Filter pills ---------- */
.filter-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 10px; }
.filter-pills button { cursor: pointer; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text-secondary); padding: 9px 18px; border-radius: 999px; font-size: .88rem; font-weight: 800; transition: all .22s ease; }
.filter-pills button:hover { color: #fff; border-color: rgba(0,212,255,.5); transform: translateY(-1px); }
.filter-pills button.active { background: linear-gradient(135deg, var(--primary), var(--cyan)); border-color: transparent; color: #fff; box-shadow: 0 10px 26px rgba(124,92,255,.35); }
.tool-count-line { text-align: center; color: var(--text-muted); font-size: .9rem; margin: 14px 0 0; font-weight: 600; }
.tool-count-line b { color: var(--cyan); font-variant-numeric: tabular-nums; }

/* ---------- Tool cards ---------- */
.wow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 16px; margin-top: 26px; }
.utility { position: relative; display: block; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.05); padding: 20px 20px 22px; overflow: hidden; transition: transform .28s cubic-bezier(.16,1,.3,1), border-color .28s ease, box-shadow .28s ease, background .28s ease, opacity .3s ease; }
.utility::before { content: ""; position: absolute; inset: 0; background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(0,212,255,.14), transparent 46%); opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.utility:hover::before { opacity: 1; }
.utility:hover { transform: translateY(-7px); border-color: rgba(0,212,255,.5); box-shadow: 0 26px 54px rgba(0,0,0,.4); background: rgba(255,255,255,.075); }
.utility.hidden-card { display: none; }
.utility .card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.utility .glyph { width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: .78rem; letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, var(--primary), var(--cyan)); box-shadow: 0 10px 24px rgba(124,92,255,.3); transition: transform .28s cubic-bezier(.16,1,.3,1); flex: none; }
.utility:hover .glyph { transform: scale(1.12) rotate(-5deg); }
.utility[data-categories*="pdf"] .glyph { background: linear-gradient(135deg, #ff4fa3, #7c5cff); box-shadow: 0 10px 24px rgba(255,79,163,.3); }
.utility[data-categories*="ai"] .glyph { background: linear-gradient(135deg, #00d4ff, #40f99b); box-shadow: 0 10px 24px rgba(0,212,255,.3); }
.utility[data-categories*="calculator"] .glyph, .utility[data-categories*="finance"] .glyph { background: linear-gradient(135deg, #ffd166, #ff7a3d); box-shadow: 0 10px 24px rgba(255,209,102,.28); }
.utility[data-categories*="seo"] .glyph { background: linear-gradient(135deg, #40f99b, #00d4ff); box-shadow: 0 10px 24px rgba(64,249,155,.28); }
.utility[data-categories*="design"] .glyph { background: linear-gradient(135deg, #b388ff, #ff4fa3); box-shadow: 0 10px 24px rgba(179,136,255,.3); }
.utility .badge { font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.04); }
.utility .badge.key { color: var(--gold); border-color: rgba(255,209,102,.35); }
.utility strong { display: block; font-size: 1.03rem; margin: 0 0 6px; letter-spacing: -0.01em; }
.utility small { color: var(--text-secondary); font-size: .88rem; line-height: 1.55; display: block; }
.utility .go { position: absolute; right: 18px; bottom: 16px; color: var(--cyan); font-weight: 900; font-size: 1.1rem; opacity: 0; transform: translateX(-8px); transition: opacity .25s ease, transform .25s ease; }
.utility:hover .go { opacity: 1; transform: none; }
.no-results { display: none; text-align: center; padding: 46px 20px; color: var(--text-secondary); border: 1px dashed var(--line-strong); border-radius: 18px; margin-top: 26px; }
.no-results.show { display: block; animation: wordIn .4s ease; }
.no-results b { color: var(--text); }

/* ---------- Feature cards upgrade ---------- */
.feature-card { transition: transform .28s cubic-bezier(.16,1,.3,1), border-color .28s ease, box-shadow .28s ease; position: relative; overflow: hidden; }
.feature-card:hover { transform: translateY(-6px); border-color: rgba(0,212,255,.45); box-shadow: 0 24px 50px rgba(0,0,0,.35); }
.feature-card .feature-icon { transition: transform .28s cubic-bezier(.16,1,.3,1); }
.feature-card:hover .feature-icon { transform: scale(1.12) rotate(-5deg); }

/* ---------- Guide CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border: 1px solid rgba(124,92,255,.35); border-radius: 24px; background: linear-gradient(135deg, rgba(124,92,255,.16), rgba(0,212,255,.08)); padding: 46px 40px; display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta-band::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -140px; top: -140px; background: radial-gradient(circle, rgba(0,212,255,.22), transparent 70%); filter: blur(40px); animation: drift2 20s ease-in-out infinite alternate; pointer-events: none; }
.cta-band-text { flex: 1; min-width: 240px; position: relative; z-index: 1; }
.cta-band-text h2 { margin: 0 0 10px; font-size: 1.7rem; letter-spacing: -0.02em; }
.cta-band-text p { margin: 0; color: var(--text-secondary); }
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after { content: ""; position: absolute; top: 0; left: -80%; width: 55%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg); animation: shine 3.4s ease-in-out infinite; }
@keyframes shine { 0%, 55% { left: -80%; } 100% { left: 160%; } }

/* ---------- FAQ accordion ---------- */
.wow-faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.wow-faq details { border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.045); padding: 19px 22px; transition: border-color .25s ease, background .25s ease; }
.wow-faq details[open] { border-color: rgba(0,212,255,.45); background: rgba(255,255,255,.06); }
.wow-faq summary { cursor: pointer; font-weight: 800; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.wow-faq summary::-webkit-details-marker { display: none; }
.wow-faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--cyan); font-weight: 400; transition: transform .28s ease; flex: none; }
.wow-faq details[open] summary::after { transform: rotate(45deg); }
.wow-faq details > div { color: var(--text-secondary); margin: 12px 0 2px; line-height: 1.7; }
.wow-faq details a { color: var(--cyan); }

/* ---------- Footer polish ---------- */
.footer-grid { display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.footer-brand p { margin: 8px 0 0; color: rgba(255,255,255,.55); font-size: .92rem; max-width: 300px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-weight: 700; font-size: .92rem; transition: color .2s; }
.footer-links a:hover { color: #fff !important; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: rgba(255,255,255,.5); }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .nav-cta { display: none; }
  .wow-hero { padding: 64px 0 48px; }
  .hero-stats { gap: 24px; }
  .hstat b { font-size: 1.7rem; }
  .wow-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .utility { padding: 16px; }
  .utility small { font-size: .82rem; }
  .cta-band { padding: 32px 24px; }
}

/* ---------- Reduced motion: everything calms down ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .aurora, .starfield { display: none; }
}
