/* ForAIThings.com — Dark tech/media aesthetic */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --accent: #8b5cf6;
  --accent-cyan: #06b6d4;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-elevated: #263148;
  --bg-nav: rgba(15,23,42,0.95);
  --border: #334155;
  --border-subtle: #1e293b;
  --success: #10b981;
  --warning: #f59e0b;
  --radius: 10px;
  --radius-lg: 16px;
  --max-w: 1140px;
  --shadow: 0 2px 12px rgba(99,102,241,0.1);
  --shadow-hover: 0 8px 28px rgba(99,102,241,0.22);
  --glow: 0 0 40px rgba(99,102,241,0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}
a { color: var(--primary-light); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ===== LAYOUT ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* ===== NAV ===== */
nav {
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--primary-light); }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links .nav-cta {
  background: var(--primary);
  color: #fff;
  padding: 7px 16px;
  border-radius: 6px;
  font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--primary-dark); color: #fff; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1a1040 50%, #0f2040 100%);
  padding: 80px 0 70px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.hero-tag {
  display: inline-block;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  max-width: 720px;
  margin: 0 auto 20px;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
.hero-stat { text-align: center; }
.hero-stat span:first-child { display: block; font-size: 1.8rem; font-weight: 800; color: #fff; }
.hero-stat span:last-child { display: block; font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s;
  border: 2px solid var(--primary);
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 2px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary-light); color: #fff; text-decoration: none; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* ===== CATEGORY NAV ===== */
.cat-nav { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 0; }
.cat-nav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 12px 0; }
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}
.cat-pill:hover, .cat-pill.active {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.3);
  color: var(--primary-light);
  text-decoration: none;
}

/* ===== SECTIONS ===== */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-card); }
.section-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.section-sub { color: var(--text-muted); margin-bottom: 36px; font-size: 1rem; }

/* ===== CARDS ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.cards-2 { grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.25s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card:hover {
  border-color: rgba(99,102,241,0.4);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  text-decoration: none;
}
.card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.badge-news { background: rgba(6,182,212,0.15); color: #67e8f9; border: 1px solid rgba(6,182,212,0.25); }
.badge-guide { background: rgba(99,102,241,0.15); color: var(--primary-light); border: 1px solid rgba(99,102,241,0.25); }
.badge-howto { background: rgba(16,185,129,0.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.25); }
.badge-stats { background: rgba(245,158,11,0.15); color: #fcd34d; border: 1px solid rgba(245,158,11,0.25); }
.badge-tools { background: rgba(139,92,246,0.15); color: #c4b5fd; border: 1px solid rgba(139,92,246,0.25); }

.card h3 { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 10px; line-height: 1.4; }
.card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.card-meta { font-size: 0.78rem; color: var(--text-dim); display: flex; gap: 14px; }
.card-arrow { color: var(--primary-light); font-size: 0.85rem; margin-top: 12px; display: block; }

/* Featured card */
.card-featured {
  background: linear-gradient(135deg, #1e293b, #1a1040);
  border: 1px solid rgba(99,102,241,0.3);
  grid-column: span 2;
}
@media (max-width: 700px) { .card-featured { grid-column: span 1; } }
.card-featured h3 { font-size: 1.3rem; }

/* ===== ARTICLE PAGES ===== */
.article-header {
  background: linear-gradient(180deg, #1a1040 0%, var(--bg) 100%);
  padding: 52px 0 40px;
  border-bottom: 1px solid var(--border);
}
.breadcrumb { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-light); text-decoration: none; }
.article-header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  max-width: 800px;
  letter-spacing: -0.02em;
}
.article-meta { margin-top: 18px; font-size: 0.85rem; color: var(--text-dim); display: flex; gap: 20px; flex-wrap: wrap; }
.article-meta span { display: flex; align-items: center; gap: 5px; }

/* Quick Answer Box */
.quick-answer {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 32px 0;
}
.quick-answer-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-light);
  margin-bottom: 10px;
}
.quick-answer p { color: var(--text); font-size: 1rem; line-height: 1.7; margin: 0; }

/* Article layout */
.article-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 48px 0;
  align-items: start;
}
.article-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 40px 0 14px;
  letter-spacing: -0.02em;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}
.article-content h2:first-of-type { margin-top: 0; border-top: none; }
.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 28px 0 10px;
}
.article-content p { color: var(--text-muted); margin-bottom: 18px; line-height: 1.8; }
.article-content ul, .article-content ol { margin: 0 0 18px 22px; color: var(--text-muted); }
.article-content li { margin-bottom: 8px; line-height: 1.7; }
.article-content a { color: var(--primary-light); }
.article-content a:hover { color: #fff; }
.article-content strong { color: #e2e8f0; font-weight: 700; }

/* Tool card in articles */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
  transition: border-color 0.2s;
}
.tool-card:hover { border-color: rgba(99,102,241,0.4); }
.tool-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.tool-card-title { font-size: 1.1rem; font-weight: 800; color: #fff; }
.tool-card-price { font-size: 0.82rem; color: var(--accent-cyan); font-weight: 600; background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.2); padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.tool-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 12px; }
.tool-card .review-link { font-size: 0.82rem; color: var(--text-dim); font-style: italic; }
.tool-card .cta-link { display: inline-block; background: var(--primary); color: #fff; padding: 8px 18px; border-radius: 7px; font-size: 0.85rem; font-weight: 700; margin-top: 10px; transition: background 0.2s; }
.tool-card .cta-link:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.tool-card-why { background: rgba(99,102,241,0.07); border-left: 3px solid var(--primary); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 12px 0; font-size: 0.88rem; color: var(--text-muted); }
.tool-card-why strong { color: var(--primary-light); }

/* Stats */
.stat-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
}
.stat-block .stat-number { font-size: 2.2rem; font-weight: 900; color: var(--primary-light); line-height: 1; margin-bottom: 6px; }
.stat-block .stat-label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 4px; }
.stat-block .stat-source { font-size: 0.75rem; color: var(--text-dim); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 24px 0; }

/* Table */
.article-content table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 0.88rem; }
.article-content th { background: var(--bg-elevated); padding: 12px 16px; text-align: left; font-weight: 700; color: #e2e8f0; border: 1px solid var(--border); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.article-content td { padding: 12px 16px; border: 1px solid var(--border); color: var(--text-muted); }
.article-content tr:hover td { background: var(--bg-elevated); }

/* FAQ Accordion */
.faq-section { margin: 40px 0; }
.faq-title { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 20px; letter-spacing: -0.02em; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.faq-question {
  width: 100%;
  background: var(--bg-card);
  border: none;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.2s;
}
.faq-question:hover { background: var(--bg-elevated); }
.faq-question.active { background: var(--bg-elevated); color: #fff; }
.faq-icon { font-size: 1.1rem; color: var(--primary-light); flex-shrink: 0; transition: transform 0.3s; }
.faq-question.active .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 4px 20px 20px; background: var(--bg-card); color: var(--text-muted); font-size: 0.9rem; line-height: 1.8; border-top: 1px solid var(--border-subtle); }
.faq-answer.open { display: block; }
.faq-answer a { color: var(--primary-light); }

/* Sidebar */
.sidebar { position: sticky; top: 84px; }
.sidebar-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
}
.sidebar-box h4 { font-size: 0.88rem; font-weight: 700; color: #e2e8f0; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.sidebar-box ul { list-style: none; }
.sidebar-box ul li { margin-bottom: 10px; }
.sidebar-box ul li a { font-size: 0.88rem; color: var(--text-muted); line-height: 1.4; }
.sidebar-box ul li a:hover { color: var(--primary-light); text-decoration: none; }
.sidebar-toc { list-style: none; }
.sidebar-toc li a { font-size: 0.85rem; color: var(--text-muted); padding: 4px 0; display: block; border-left: 2px solid var(--border); padding-left: 12px; transition: all 0.2s; }
.sidebar-toc li a:hover { color: var(--primary-light); border-left-color: var(--primary); text-decoration: none; }

/* Newsletter CTA */
.newsletter-section {
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  margin: 40px 0;
}
.newsletter-section h3 { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.newsletter-section p { color: var(--text-muted); margin-bottom: 24px; }
.newsletter-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}
.newsletter-form input::placeholder { color: var(--text-dim); }
.newsletter-form input:focus { border-color: var(--primary); }

/* Disclosure notice */
.disclosure-notice {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 24px 0;
}
.disclosure-notice a { color: var(--warning); }

/* ===== FOOTER ===== */
footer {
  background: #070e1a;
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-brand .logo { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-brand .logo span { color: var(--primary-light); }
.footer-brand p { font-size: 0.85rem; color: var(--text-dim); line-height: 1.7; }
.footer-col h5 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a { font-size: 0.85rem; color: var(--text-dim); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--primary-light); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border-subtle); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-bottom p { font-size: 0.8rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-size: 0.8rem; color: var(--text-dim); }
.footer-links a:hover { color: var(--primary-light); text-decoration: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .article-body { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; flex-direction: column; gap: 0; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    z-index: 99;
  }
  .nav-links.open li { padding: 0 20px; }
  .nav-links.open a { display: block; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
  .nav-toggle { display: flex; }
  .hero { padding: 50px 0 40px; }
  .hero-stats { gap: 20px; }
  .hero-btns { flex-direction: column; align-items: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .newsletter-form { flex-direction: column; }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.divider { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

/* About / static pages */
.page-header { background: linear-gradient(180deg, #1a1040 0%, var(--bg) 100%); padding: 56px 0 40px; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 2.2rem; font-weight: 900; color: #fff; letter-spacing: -0.03em; }
.page-content { padding: 48px 0; max-width: 760px; }
.page-content h2 { font-size: 1.4rem; font-weight: 800; color: #fff; margin: 36px 0 14px; }
.page-content p { color: var(--text-muted); margin-bottom: 18px; line-height: 1.8; }
.page-content ul { margin: 0 0 18px 22px; color: var(--text-muted); }
.page-content li { margin-bottom: 8px; }
.page-content a { color: var(--primary-light); }
