/* ToolWise — main stylesheet
   Clean, fast, mobile-first. No frameworks. */

:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --ink: #1a1d29;
  --muted: #5b6172;
  --line: #e6e8f0;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-soft: #eef0ff;
  --gold: #f59e0b;
  --green: #16a34a;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(26, 29, 41, .07);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1120px, 92%); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: grid; place-items: center;
  font-size: .95rem; font-weight: 800; letter-spacing: .5px;
}
.main-nav { display: flex; gap: 26px; }
.main-nav a { color: var(--ink); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.main-nav a:hover { color: var(--accent); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.2rem; padding: 6px 12px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 55%, #6d28d9 100%);
  color: #fff; padding: 72px 0 64px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 300px at 80% 20%, rgba(255,255,255,.12), transparent 60%);
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.15; letter-spacing: -1px; max-width: 640px; }
.hero p { margin-top: 16px; font-size: 1.1rem; opacity: .85; max-width: 560px; }
.hero-cta { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 10px;
  font-weight: 700; font-size: .95rem; border: none; cursor: pointer;
}
.btn-primary { background: #fff; color: #4c1d95; }
.btn-primary:hover { text-decoration: none; background: #f1efff; }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-ghost:hover { text-decoration: none; background: rgba(255,255,255,.22); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.section-head h2 { font-size: 1.6rem; letter-spacing: -.5px; }
.section-head a { font-weight: 600; font-size: .92rem; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(26,29,41,.12); }
.card-cover { height: 168px; display: grid; place-items: center; color: #fff; font-size: 2.6rem; position: relative; }
.card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.chip {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 20px; align-self: flex-start;
}
.card-body h3 { font-size: 1.08rem; line-height: 1.4; letter-spacing: -.2px; }
.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--accent); text-decoration: none; }
.card-body p { color: var(--muted); font-size: .92rem; flex: 1; }
.card-meta { font-size: .8rem; color: var(--muted); }

/* ---------- Tool directory cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
}
.tool-top { display: flex; align-items: center; gap: 14px; }
.tool-logo {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 1.25rem; flex-shrink: 0;
}
.tool-card h3 { font-size: 1.1rem; }
.tool-card p { color: var(--muted); font-size: .92rem; flex: 1; }
.price-badge { font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; align-self: flex-start; }
.price-free { background: #dcfce7; color: #15803d; }
.price-freemium { background: #fef3c7; color: #b45309; }
.price-paid { background: #e0e7ff; color: #4338ca; }
.price-trial { background: #fae8ff; color: #a21caf; }

/* ---------- Article page ---------- */
.article-hero { background: linear-gradient(135deg, #1e1b4b, #6d28d9); color: #fff; padding: 56px 0; }
.article-hero .chip { background: rgba(255,255,255,.16); color: #fff; }
.article-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -.8px; line-height: 1.25; margin: 14px 0 12px; max-width: 800px; }
.article-meta { opacity: .8; font-size: .9rem; }
.article-body { max-width: 760px; margin: 0 auto; padding: 44px 0 20px; }
.article-body > * { margin-bottom: 20px; }
.article-body h2 { font-size: 1.45rem; letter-spacing: -.4px; margin-top: 38px; }
.article-body h3 { font-size: 1.15rem; margin-top: 28px; }
.article-body ul, .article-body ol { padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  border-left: 4px solid var(--accent); background: var(--accent-soft);
  padding: 16px 20px; border-radius: 0 10px 10px 0; color: #333a55;
}
.takeaways {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.takeaways h3 { margin-bottom: 10px; }
.cover-art {
  height: 300px; border-radius: var(--radius); display: grid; place-items: center;
  color: #fff; font-size: 4rem; margin-bottom: 8px; box-shadow: var(--shadow);
}
.author-box {
  display: flex; gap: 16px; align-items: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 40px 0;
}
.author-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff; font-weight: 800;
}
.author-box p { color: var(--muted); font-size: .9rem; }

/* ---------- Ad slots (AdSense placeholders) ---------- */
.ad-slot {
  border: 2px dashed #c7cdea; background: #f4f5fd; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px;
  margin: 30px auto; color: #9aa1c7; min-height: 110px; max-width: 100%;
}
.ad-slot .ad-label { font-size: .7rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; }
.ad-slot small { font-size: .75rem; }
.ad-leaderboard { min-height: 110px; }
.ad-inarticle { min-height: 280px; }
.ad-sidebar { min-height: 250px; }

/* ---------- Content layouts ---------- */
.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.prose-page { max-width: 780px; margin: 0 auto; padding: 48px 0 60px; }
.prose-page h1 { font-size: 2rem; letter-spacing: -.6px; margin-bottom: 18px; }
.prose-page h2 { font-size: 1.3rem; margin: 30px 0 12px; }
.prose-page p, .prose-page li { color: #333a55; margin-bottom: 14px; }
.prose-page ul, .prose-page ol { padding-left: 24px; }

.newsletter {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  border-radius: 18px; padding: 44px; text-align: center; margin: 20px 0 8px;
}
.newsletter h2 { font-size: 1.6rem; margin-bottom: 10px; }
.newsletter p { opacity: .88; margin-bottom: 22px; }
.newsletter form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.newsletter input {
  flex: 1; padding: 12px 16px; border-radius: 10px; border: none; font-size: .95rem;
}
.newsletter button { background: #1a1d29; color: #fff; }
.newsletter-note { font-size: .8rem; opacity: .75; margin-top: 14px; }

.contact-form { display: grid; gap: 16px; max-width: 560px; margin-top: 24px; }
.contact-form label { font-weight: 600; font-size: .9rem; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: .95rem; background: var(--surface);
}
.contact-form textarea { min-height: 140px; resize: vertical; }

/* ---------- Footer ---------- */
.site-footer { background: #141625; color: #c6cbe0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
.footer-grid h4 { color: #fff; margin-bottom: 14px; font-size: .95rem; }
.footer-grid a { color: #c6cbe0; display: block; margin-bottom: 10px; font-size: .9rem; }
.footer-grid p { font-size: .9rem; max-width: 320px; }
.footer-bottom { border-top: 1px solid #2a2e45; padding: 20px 0; font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-grid, .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); flex-direction: column; padding: 16px 4%;
    border-bottom: 1px solid var(--line); gap: 14px;
  }
  .main-nav.open { display: flex; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .nav-toggle { display: block; }
  .card-grid, .tool-grid { grid-template-columns: 1fr; }
  .newsletter form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 52px 0 48px; }
}
