/* ─── CardForge Design System ─── */
:root {
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #2563eb;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-elevated: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: #334155;
  --border-light: #475569;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --border: #e2e8f0;
  --border-light: #cbd5e1;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

/* ─── Navigation ─── */
.topbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="light"] .topbar {
  background: rgba(248, 250, 252, 0.95);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  font-weight: 800;
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.logo span { color: var(--primary-light); }
.logo img { height: 48px; width: auto; display: block; }

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  white-space: nowrap;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-elevated);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 20px;
  transition: all var(--transition);
}

.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  margin-left: 8px;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ─── Sections ─── */
.section {
  padding: 80px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-wide {
  padding: 80px 24px;
}

.section-dark {
  background: var(--bg-card);
  transition: background var(--transition);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246,, 0.15), transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(59, 130, 246,, 0.1), transparent 60%);
  animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-2%, -2%) rotate(3deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246,, 0.15);
  border: 1px solid rgba(59, 130, 246,, 0.3);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246,, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 130, 246,, 0.4);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #1e293b;
  box-shadow: 0 4px 16px rgba(59, 130, 246,, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 130, 246,, 0.4);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 18px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 800px;
  margin: 60px auto 0;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-light);
  display: block;
}

.hero-stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Approach Grid ─── */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.approach-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
}

.approach-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.approach-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.approach-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.approach-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── Product Cards ─── */
.category-title {
  font-size: 28px;
  font-weight: 700;
  margin: 60px 0 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-title:first-of-type {
  margin-top: 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product-card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.product-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.product-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.product-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-light);
}

.product-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 16px;
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.product-features li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

.product-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
  margin-top: auto;
}

.product-link:hover {
  gap: 10px;
}

/* ─── Tools Section ─── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.tool-card .tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.tool-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tool-card .tool-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.tool-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.tool-card .tool-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tool-stack span {
  padding: 4px 12px;
  background: var(--bg-elevated);
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ─── Comparison Table ─── */
.comparison-wrapper {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.comparison-table th {
  background: var(--bg-elevated);
  font-weight: 700;
  white-space: nowrap;
}

.comparison-table th:first-child {
  min-width: 200px;
}

.comparison-table td:first-child {
  font-weight: 600;
  color: var(--text);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table .check {
  color: var(--success);
  font-size: 16px;
}

.comparison-table .cross {
  color: var(--danger);
  font-size: 16px;
}

.comparison-table .winner {
  background: rgba(59, 130, 246,, 0.05);
}

[data-theme="light"] .comparison-table .winner {
  background: rgba(59, 130, 246,, 0.03);
}

/* ─── How It Works ─── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  counter-reset: step;
}

.step-card {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  transition: all var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
}

.step-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── CTA Section ─── */
.cta-section {
background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 100px 24px;
}

.cta-section h2 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Values / Why Us ─── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
}

.value-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.value-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.value-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.value-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── Footer ─── */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 60px 24px 32px;
  transition: background var(--transition);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.7;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--text);
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-dim);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 16px;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  color: white;
}

/* ─── Scroll Animations ─── */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
  white-space: nowrap;
    width: 100%;
    padding: 12px 16px;
  }

  .nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 17px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px;
  }

  .section-title {
    font-size: 28px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .cta-section h2 {
    font-size: 30px;
  }

  .comparison-table {
    font-size: 13px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 12px 14px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 26px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: 48px 16px;
  }
}