/* ============================================================
   Homepage - professional redesign
   Scoped to #view-home. Existing app styles are untouched.
   ============================================================ */

#view-home { padding-bottom: 0; }

/* ---------- Hero ---------- */
.home-hero {
  position: relative;
  text-align: center;
  padding: 54px 0 34px;
  overflow: hidden;
}
.home-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -260px;
  width: 900px;
  height: 620px;
  transform: translateX(-50%);
  background:
    radial-gradient(600px 320px at 20% 30%, rgba(79,70,229,.14), transparent 60%),
    radial-gradient(520px 300px at 80% 25%, rgba(14,165,233,.12), transparent 60%),
    radial-gradient(400px 240px at 50% 0%, rgba(79,70,229,.10), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 22px;
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(22,163,74,.15);
  flex-shrink: 0;
}
.home-hero h1 {
  font-size: clamp(30px, 5.4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 auto 16px;
  max-width: 820px;
}
.hero-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto 28px;
}
.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-btn, .hero-btn-ghost { padding: 13px 28px; font-size: 15.5px; border-radius: 12px; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-stats > div {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 26px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 108px;
}
.hero-stats strong { font-size: 22px; font-weight: 800; color: var(--primary); }
.hero-stats span { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ---------- Home sections ---------- */
.home-section { padding: 52px 0 8px; }
.home-section-head { text-align: center; max-width: 620px; margin: 0 auto 26px; }
.home-section-head h2 { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.01em; margin-bottom: 8px; }
.home-section-head p { color: var(--muted); font-size: 15.5px; }

/* ---------- Category tabs ---------- */
.cat-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.cat-tab {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.cat-tab:hover { border-color: #c7cbe8; color: var(--text); }
.cat-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(79,70,229,.35);
}
#home-tool-grid .tool-card.hidden { display: none; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  text-align: center;
}
.step-num {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 40px;
  font-weight: 800;
  color: #eef0f6;
  line-height: 1;
}
.step-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.step-icon svg { width: 27px; height: 27px; }
.step-icon.blue { background: #eff6ff; color: #2563eb; }
.step-icon.indigo { background: #eef2ff; color: #4f46e5; }
.step-icon.green { background: #ecfdf5; color: #059669; }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 13.5px; }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.feature-icon svg { width: 23px; height: 23px; }
.feature h3 { font-size: 16px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 13px; }

/* ---------- Privacy banner ---------- */
.privacy-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 52px;
  background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%);
  border: 1px solid #dbe0f7;
  border-radius: var(--radius);
  padding: 24px 26px;
  text-align: left;
}
.pb-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pb-icon svg { width: 27px; height: 27px; }
.privacy-banner h3 { font-size: 17px; margin-bottom: 4px; }
.privacy-banner p { color: var(--muted); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.faq-item.open { border-color: #c7cbe8; box-shadow: var(--shadow-lg); }
.faq-q {
  width: 100%;
  border: none;
  background: transparent;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-chev { color: var(--muted); font-size: 12px; transition: transform .2s; flex-shrink: 0; }
.faq-item.open .faq-chev { transform: rotate(180deg); color: var(--primary); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-a { max-height: 200px; }
.faq-a p { padding: 0 20px 16px; color: var(--muted); font-size: 14px; }

/* ---------- Final CTA ---------- */
.cta-banner {
  margin-top: 52px;
  margin-bottom: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  border-radius: 18px;
  text-align: center;
  color: #fff;
  padding: 48px 24px;
  box-shadow: 0 16px 40px rgba(79,70,229,.35);
}
.cta-banner h2 { font-size: clamp(24px, 3.6vw, 34px); margin-bottom: 10px; }
.cta-banner p { opacity: .9; margin-bottom: 24px; font-size: 15.5px; }
.cta-banner .btn.primary {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.cta-banner .btn.primary:hover { background: #eef0ff; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .home-hero { padding: 38px 0 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  .privacy-banner { flex-direction: column; text-align: center; }
  .cat-tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-tab { flex-shrink: 0; }
}
