/* --------------------------------------------------
   GLOBAL THEME
-------------------------------------------------- */
:root {
  --primary: #2563eb;
  --primary-light: #60a5fa;
  --secondary: #1e293b;
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --danger: #dc2626;

  --radius: 10px;
  --shadow: 0 4px 14px rgba(0,0,0,0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* --------------------------------------------------
   NAVIGATION
-------------------------------------------------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 20px;
  gap: 8px;
}

.logo-mark {
  background: var(--primary);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links a {
  margin: 0 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s ease-out;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(37,99,235,0.25);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37,99,235,0.3);
}

/* --------------------------------------------------
   LAYOUT
-------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1250px;
  margin: auto;
  padding: 40px 24px;
}

.section {
  margin: 80px 0;
  animation: fadeInUp 0.6s ease-out both;
}

.section-kicker {
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--muted);
  max-width: 650px;
  font-size: 16px;
}

/* --------------------------------------------------
   HERO
-------------------------------------------------- */
.hero {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
}

.hero h1 span {
  color: var(--primary);
}

.hero-sub {
  color: var(--muted);
  max-width: 550px;
  font-size: 17px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.btn {
  padding: 12px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, background 0.15s ease-out;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37,99,235,0.25);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15,23,42,0.18);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

/* --------------------------------------------------
   HERO CARD
-------------------------------------------------- */
.hero-card {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 380px;
  animation: floatIn 0.7s ease-out both;
}

.hero-chip {
  background: #e0f2fe;
  color: #0369a1;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.tool-pill {
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex: 1;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.tool-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15,23,42,0.08);
}

.hero-tools {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.metric {
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex: 1;
}

/* --------------------------------------------------
   CARDS & GRIDS
-------------------------------------------------- */
.card {
  background: #fff;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(15,23,42,0.12);
}

.card h3 {
  margin-top: 0;
  font-size: 20px;
  font-weight: 700;
}

.grid-3, .grid-4, .grid-5 {
  display: grid;
  gap: 24px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* --------------------------------------------------
   GRAPHS / METRICS
-------------------------------------------------- */
.metrics-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 24px;
  margin-top: 24px;
}

.metric-block {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
}

.metric-block h3 {
  margin-top: 0;
  font-size: 18px;
}

/* KPI row */
.kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.kpi {
  flex: 1;
  min-width: 140px;
  background: #f8fafc;
  border-radius: var(--radius);
  padding: 10px 12px;
  border: 1px solid var(--border);
}

.kpi-label {
  font-size: 12px;
  color: var(--muted);
}

.kpi-value {
  font-size: 18px;
  font-weight: 700;
}

/* Bar chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.bar-label {
  width: 140px;
}

.bar-track {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transform-origin: left;
  animation: growBar 1s ease-out forwards;
}

.bar-fill.success {
  background: var(--success);
}

.bar-fill.danger {
  background: var(--danger);
}

/* Timeline graph */
.timeline-graph {
  margin-top: 18px;
}

.timeline-line {
  position: relative;
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 80%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 999px;
  animation: growBar 1.2s ease-out forwards;
}

.timeline-points {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.timeline-point {
  text-align: center;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
  margin: 0 auto 4px;
}

/* Stacked comparison */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.stack-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px;
  box-shadow: var(--shadow);
}

.stack-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.stack-bar {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  display: flex;
  overflow: hidden;
}

.stack-segment {
  height: 100%;
}

.stack-manual {
  background: #f97316;
}

.stack-auto {
  background: #22c55e;
}

/* --------------------------------------------------
   CTA SECTION
-------------------------------------------------- */
.cta {
  text-align: center;
  padding: 60px 0;
  background: #f8fafc;
  border-radius: var(--radius);
}

/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */
footer {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

/* --------------------------------------------------
   ANIMATIONS
-------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes growBar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* --------------------------------------------------
   RESPONSIVE DESIGN
-------------------------------------------------- */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-card {
    width: 100%;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .grid-3, .grid-4, .grid-5, .stack-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
/* SPA pages */
.page-view {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}

.page-view.active {
  display: block;
  opacity: 1;
}

/* Active nav link */
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  width: 100%;
}
