/* ── Home Page CSS ── */

/* Hero */
.hero { padding: 96px 0 80px; overflow: hidden; }
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
.hero-content { display: flex; flex-direction: column; gap: 20px; }
.hero-content h1 { margin-top: 8px; }
.hero-content h1 em { font-style: italic; color: var(--accent2); }
.hero-desc { font-size: 17px; line-height: 1.65; max-width: 460px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.hero-note { font-size: 13px; color: var(--text3); }

/* Demo card */
.hero-demo { display: flex; flex-direction: column; gap: 14px; }
.demo-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg);
}
.demo-header {
  background: var(--bg2); padding: 10px 16px;
  display: flex; align-items: center; gap: 7px;
  border-bottom: 1px solid var(--border);
}
.demo-dot { width: 10px; height: 10px; border-radius: 50%; }
.demo-dot.red { background: #ef4444; }
.demo-dot.yellow { background: #f59e0b; }
.demo-dot.green { background: #22c55e; }
.demo-title { font-size: 12px; color: var(--text3); margin-left: 6px; }
.demo-body { padding: 18px; min-height: 120px; }
.demo-line { font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.demo-line.muted { color: var(--text3); }
.demo-divider { height: 1px; background: var(--border); margin: 10px 0; }
.demo-typing { font-size: 14px; color: var(--text); min-height: 40px; white-space: pre-wrap; transition: opacity 0.3s; }
.demo-expanded { color: var(--accent2); }

.demo-shortcuts { display: flex; flex-direction: column; gap: 8px; }
.ds-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px;
}
.ds-item code { font-size: 12px; white-space: nowrap; }
.ds-item span { font-size: 12px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Stats bar */
.stats-bar {
  background: var(--bg2); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 20px 0;
}
.stats-inner {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
}
.stat-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 40px; gap: 2px;
}
.stat-item strong { font-size: 22px; font-weight: 700; color: var(--text); font-family: var(--font-display); }
.stat-item span { font-size: 12px; color: var(--text3); }
.stat-sep { width: 1px; height: 36px; background: var(--border); }

/* Section header */
.section-header { text-align: center; margin-bottom: 52px; }
.section-header .tag { margin-bottom: 14px; }
.section-header h2 { margin-bottom: 14px; }
.section-header p { font-size: 17px; max-width: 520px; margin: 0 auto; }

/* Features grid */
.features { background: var(--bg); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 16px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px; transition: all 0.2s;
}
.feature-card:hover { border-color: var(--accent2); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature-card.large { grid-column: span 2; }
.fc-icon { font-size: 26px; margin-bottom: 14px; }
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { font-size: 14px; line-height: 1.6; }
.fc-example {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 12px 16px;
  background: var(--bg2); border-radius: 8px;
  flex-wrap: wrap;
}
.fc-key { background: var(--accent3); color: var(--accent2); padding: 3px 10px; border-radius: 5px; font-size: 13px; font-weight: 700; font-family: monospace; }
.fc-arrow { color: var(--text3); }
.fc-val { font-size: 13px; color: var(--text2); }

/* Callout */
.callout-section { padding: 0 0 80px; }
.callout {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--accent3); border: 1px solid var(--accent2);
  border-radius: 16px; padding: 28px 32px;
  opacity: 0.95;
}
[data-theme="dark"] .callout { background: #1a1232; border-color: #4c1d95; }
.callout-icon { font-size: 28px; flex-shrink: 0; margin-top: 2px; }
.callout-content h3 { color: var(--accent); margin-bottom: 10px; }
[data-theme="dark"] .callout-content h3 { color: var(--accent2); }
.callout-content p { font-size: 15px; color: var(--text2); margin-bottom: 16px; }
.callout-compare { display: flex; flex-direction: column; gap: 10px; }
.compare-bad, .compare-good {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; flex-wrap: wrap;
}
.compare-label { font-weight: 600; white-space: nowrap; }
.compare-label.bad { color: #b91c1c; }
.compare-label.good { color: #15803d; }
[data-theme="dark"] .compare-label.good { color: #4ade80; }

/* Library */
.library-section { background: var(--bg2); }
.packs-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
.pack-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: all 0.2s;
}
.pack-card:hover { border-color: var(--accent2); transform: translateY(-2px); }
.pack-icon { font-size: 28px; }
.pack-card h4 { font-family: var(--font-display); font-weight: 400; font-size: 1rem; }
.pack-card p { font-size: 12px; line-height: 1.5; flex: 1; }
.pack-count { font-size: 11px; font-weight: 600; color: var(--accent2); background: var(--accent3); padding: 2px 9px; border-radius: 20px; align-self: flex-start; }

/* CTA */
.cta-section { padding: 80px 0; }
.cta-box {
  background: var(--accent); border-radius: 20px;
  padding: 60px 48px; text-align: center;
}
.cta-box h2 { color: #fff; margin-bottom: 14px; }
.cta-box p { color: rgba(255,255,255,0.75); font-size: 17px; margin-bottom: 28px; }
.cta-box .btn-primary { background: #fff; color: var(--accent); font-size: 16px; padding: 14px 30px; border-radius: 10px; }
.cta-box .btn-primary:hover { background: #f5f3ff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-demo { display: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature-card.large { grid-column: span 2; }
  .packs-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .feature-card.large { grid-column: span 1; }
  .packs-grid { grid-template-columns: 1fr 1fr; }
  .stats-inner { gap: 20px; }
  .stat-sep { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
}
