/* ===== SaaS Theme — Dark Professional ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #1a1f35;
  --bg-card: #242940;
  --bg-muted: #2a3050;
  --fg: #eef0f5;
  --fg-muted: #7882a0;
  --primary: #4a7cf5;
  --accent: #f97316;
  --border: rgba(255,255,255,0.10);
  --radius: 0.5rem;
  --max-w: 1400px;
  --nav-h: 3.5rem;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--fg); }
img { max-width: 100%; display: block; }

/* ===== Utility ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.text-center { text-align: center; }
.text-muted { color: var(--fg-muted); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.8125rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.375rem; }
.text-2xl { font-size: 1.75rem; }
.text-3xl { font-size: 2.25rem; }
.text-4xl { font-size: 3rem; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font); font-weight: 600; font-size: 0.8125rem;
  padding: 0.5rem 1.25rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.2s ease; text-decoration: none; line-height: 1.4;
}
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #ea6a10; color: #fff; }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-outline:hover { border-color: var(--fg-muted); color: #fff; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #3b6de0; color: #fff; }
.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.75rem; }
.btn-lg { padding: 0.65rem 1.75rem; font-size: 0.875rem; }

/* ===== Card ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

/* ===== Grid ===== */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .text-4xl { font-size: 2rem; }
  .text-3xl { font-size: 1.5rem; }
  .section { padding: 2.5rem 0; }
  .hide-mobile { display: none !important; }
}

/* ===== Navbar ===== */
.navbar {
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 100;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.navbar-brand {
  font-weight: 600; font-size: 0.9375rem; color: var(--fg);
  text-decoration: none; letter-spacing: -0.02em;
}
.navbar-links { display: flex; gap: 1.5rem; align-items: center; }
.navbar-links a {
  font-size: 0.75rem; color: var(--fg-muted);
  text-decoration: none; font-weight: 500; transition: color 0.15s;
}
.navbar-links a:hover { color: var(--fg); }
.navbar-links a.active { color: var(--fg); }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 1rem 0;
  font-size: 0.75rem; color: var(--fg-muted);
}
.footer .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
}
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--fg-muted); font-size: 0.75rem; }
.footer-links a:hover { color: var(--fg); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 5rem 0 4rem; text-align: center;
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
  display: inline-block; font-size: 0.6875rem; font-weight: 600;
  padding: 0.3rem 0.85rem; border-radius: 999px;
  background: var(--bg-muted); border: 1px solid var(--border);
  color: var(--fg-muted); margin-bottom: 1.25rem; letter-spacing: 0.02em;
}
.hero h1 { font-size: 3.25rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; }
.hero p.subtitle { color: var(--fg-muted); font-size: 1rem; margin-top: 1rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.hero-actions { margin-top: 1.75rem; display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

@media (max-width: 768px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 2rem; }
}

/* ===== Stats ===== */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); overflow: hidden;
}
.stat-item {
  text-align: center; padding: 1.25rem 0.5rem;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.6875rem; color: var(--fg-muted); margin-top: 0.15rem; }

@media (max-width: 768px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
}

/* ===== Feature Cards ===== */
.feature-icon {
  width: 2rem; height: 2rem; border-radius: 0.375rem;
  background: var(--bg-muted); display: flex; align-items: center;
  justify-content: center; font-size: 1rem; margin-bottom: 0.6rem;
  color: var(--primary);
}
.feature-card h3 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.3rem; }
.feature-card p { font-size: 0.75rem; color: var(--fg-muted); line-height: 1.5; }

/* ===== Terminal ===== */
.terminal {
  background: #0d1117; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  max-width: 640px; margin: 0 auto; font-family: 'SF Mono', 'Fira Code', monospace;
}
.terminal-header {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 0.85rem; background: #161b22; border-bottom: 1px solid var(--border);
}
.terminal-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; }
.terminal-dot.r { background: #ff5f57; }
.terminal-dot.y { background: #febc2e; }
.terminal-dot.g { background: #28c840; }
.terminal-body { padding: 1rem; font-size: 0.75rem; line-height: 1.7; color: #c9d1d9; }
.terminal-body .prompt { color: var(--accent); }
.terminal-body .success { color: #3fb950; }
.terminal-body .info { color: var(--primary); }

/* ===== Dashboard Preview ===== */
.dashboard {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.dashboard-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}
.dashboard-topbar span { color: var(--fg-muted); font-size: 0.6875rem; }
.dashboard-body { display: flex; }
.dashboard-main { flex: 1; padding: 1.25rem; }
.dashboard-sidebar {
  width: 220px; border-left: 1px solid var(--border);
  padding: 1.25rem; flex-shrink: 0;
}
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
.kpi-card {
  background: var(--bg-muted); border-radius: 0.375rem;
  padding: 0.75rem; border: 1px solid var(--border);
}
.kpi-label { font-size: 0.625rem; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-value { font-size: 1.125rem; font-weight: 700; margin-top: 0.15rem; }
.kpi-change { font-size: 0.625rem; margin-top: 0.1rem; }
.kpi-change.up { color: #3fb950; }
.kpi-change.down { color: #3fb950; }

.chart-area { display: flex; align-items: flex-end; gap: 0.35rem; height: 120px; padding-top: 0.5rem; }
.chart-bar {
  flex: 1; background: var(--primary); border-radius: 0.2rem 0.2rem 0 0;
  min-width: 0; transition: background 0.2s;
}
.chart-bar.accent { background: var(--accent); }

.sidebar-title { font-size: 0.6875rem; font-weight: 600; margin-bottom: 0.75rem; }
.plan-item { margin-bottom: 0.6rem; }
.plan-item-header { display: flex; justify-content: space-between; font-size: 0.6875rem; margin-bottom: 0.2rem; }
.plan-item-header span:last-child { color: var(--fg-muted); }
.plan-bar { height: 0.35rem; background: var(--bg); border-radius: 999px; overflow: hidden; }
.plan-bar-fill { height: 100%; border-radius: 999px; background: var(--primary); }
.plan-bar-fill.accent { background: var(--accent); }

@media (max-width: 768px) {
  .dashboard-body { flex-direction: column; }
  .dashboard-sidebar { width: 100%; border-left: none; border-top: 1px solid var(--border); }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Testimonials ===== */
.testimonial-card blockquote {
  font-size: 0.8125rem; font-style: italic; color: var(--fg-muted);
  line-height: 1.6; margin-bottom: 0.75rem;
}
.testimonial-author { font-size: 0.75rem; font-weight: 600; }
.testimonial-role { font-size: 0.6875rem; color: var(--fg-muted); }

/* ===== Pricing ===== */
.pricing-card { text-align: center; padding: 1.75rem 1.25rem; position: relative; }
.pricing-card.highlighted { border-color: var(--accent); }
.pricing-badge {
  position: absolute; top: -0.65rem; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 0.625rem; font-weight: 700;
  padding: 0.15rem 0.65rem; border-radius: 999px; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pricing-name { font-size: 0.875rem; font-weight: 600; }
.pricing-price { font-size: 2.5rem; font-weight: 700; margin: 0.5rem 0 0.25rem; }
.pricing-price span { font-size: 0.8125rem; font-weight: 400; color: var(--fg-muted); }
.pricing-features { list-style: none; margin: 1rem 0 1.25rem; font-size: 0.75rem; color: var(--fg-muted); }
.pricing-features li { padding: 0.3rem 0; }
.pricing-features li::before { content: '\2713'; color: var(--primary); margin-right: 0.5rem; font-weight: 700; }

/* ===== Blog Card ===== */
.blog-card-img {
  height: 140px; background: var(--bg-muted); border-radius: 0.375rem;
  margin-bottom: 0.75rem; display: flex; align-items: center; justify-content: center;
  color: var(--fg-muted); font-size: 0.75rem;
}
.blog-card-tag { font-size: 0.625rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.blog-card h3 { font-size: 0.9375rem; font-weight: 600; margin: 0.3rem 0; }
.blog-card p { font-size: 0.75rem; color: var(--fg-muted); }

/* ===== FAQ / Accordion ===== */
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 0; background: none; border: none; color: var(--fg);
  font-family: var(--font); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; text-align: left;
}
.accordion-trigger:hover { color: var(--primary); }
.accordion-icon { font-size: 1.125rem; transition: transform 0.2s; color: var(--fg-muted); }
.accordion-item.open .accordion-icon { transform: rotate(45deg); }
.accordion-content {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  font-size: 0.8125rem; color: var(--fg-muted); line-height: 1.6;
}
.accordion-item.open .accordion-content { max-height: 300px; }
.accordion-content-inner { padding-bottom: 1rem; }

/* ===== Forms ===== */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.75rem; font-weight: 500; margin-bottom: 0.3rem; }
.form-input, .form-textarea {
  width: 100%; padding: 0.55rem 0.75rem;
  background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--fg);
  font-family: var(--font); font-size: 0.8125rem;
  transition: border-color 0.15s;
}
.form-input:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
}
.form-textarea { resize: vertical; min-height: 100px; }

/* ===== Search ===== */
.search-input {
  width: 100%; max-width: 480px; padding: 0.65rem 1rem 0.65rem 2.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--fg);
  font-family: var(--font); font-size: 0.875rem;
}
.search-input:focus { outline: none; border-color: var(--primary); }
.search-wrap { position: relative; display: inline-block; width: 100%; max-width: 480px; }
.search-wrap::before {
  content: '\1F50D'; position: absolute; left: 0.85rem; top: 50%;
  transform: translateY(-50%); font-size: 0.875rem; opacity: 0.5;
}

/* ===== CTA Section ===== */
.cta-section {
  background: var(--bg-card); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0; text-align: center;
}

/* ===== Page Header ===== */
.page-header { padding: 3rem 0 2rem; text-align: center; }
.page-header h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.page-header p { color: var(--fg-muted); font-size: 0.9375rem; margin-top: 0.5rem; }

/* ===== Team Card ===== */
.team-avatar {
  width: 4rem; height: 4rem; border-radius: 50%;
  background: var(--bg-muted); margin-bottom: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: var(--fg-muted);
}

/* ===== Theme Switcher ===== */
.theme-switcher {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 1000;
}
.theme-switcher-toggle {
  width: 2.25rem; height: 2.25rem; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--fg); cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 0.875rem;
  transition: border-color 0.15s;
}
.theme-switcher-toggle:hover { border-color: var(--fg-muted); }
.theme-switcher-panel {
  display: none; position: absolute; bottom: 2.75rem; right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.5rem;
  min-width: 160px; max-height: calc(100vh - 8rem); overflow-y: auto; -webkit-overflow-scrolling: touch; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.theme-switcher-panel.open { display: block; }
.theme-switcher-panel a {
  display: block; padding: 0.35rem 0.65rem; font-size: 0.6875rem;
  color: var(--fg-muted); border-radius: 0.25rem; text-decoration: none;
  font-weight: 500;
}
.theme-switcher-panel a:hover { background: var(--bg-muted); color: var(--fg); }
.theme-switcher-panel a.current { color: var(--accent); background: var(--bg-muted); }
