/* ============================================================
   Root / Variables
   ============================================================ */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-active: #1e40af;
  --primary-soft: #eff6ff;

  --text: #111;
  --muted: #666;
  --bg: #f6f7f9;
  --border: rgba(0,0,0,0.06);

  --radius: 10px;
  --radius-lg: 14px;
}

/* ============================================================
   Base
   ============================================================ */

body {
  background: var(--bg);
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.65;
}

/* ============================================================
   Typography
   ============================================================ */

h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

h4 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

h5 {
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  font-weight: 500;
}

p {
  font-size: clamp(0.95rem, 1.2vw, 1rem);
  color: var(--muted);
}

/* ============================================================
   Layout
   ============================================================ */

.container {
  max-width: 1100px;
}

.section {
  margin-top: clamp(2rem, 5vw, 3rem);
}

hr {
  margin: clamp(2rem, 4vw, 2.5rem) 0;
  opacity: 0.08;
}

/* ============================================================
   Navbar
   ============================================================ */

.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  font-weight: 600;
}

.nav-link {
  color: #555 !important;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #000 !important;
}

.nav-link.active {
  font-weight: 600;
  color: #000 !important;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 2.5rem);
}

.hero p {
  max-width: 600px;
}

/* ============================================================
   Buttons (Bootstrap override)
   ============================================================ */

.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-primary:focus,
.btn-primary.focus {
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.btn-primary:active {
  background: var(--primary-active);
  border-color: var(--primary-active);
}

.btn-outline-secondary:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================================
   Demo blocks
   ============================================================ */

.demo {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 2vw, 1.8rem);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.demo:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.demo h5 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
}

/* ============================================================
   Feature boxes
   ============================================================ */

.feature-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: #fff;
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.badge-soft {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

/* ============================================================
   Code blocks
   ============================================================ */

.code-block {
  background: #0d1117;
  color: #e6edf3;
  padding: clamp(1rem, 2vw, 1.2rem);
  border-radius: 10px;
  font-size: 0.85rem;
  overflow-x: auto;
}

code {
  background: #eee;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ============================================================
   Tables
   ============================================================ */

.table {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.table th {
  font-weight: 600;
}

/* ============================================================
   Forms
   ============================================================ */

label {
  font-size: 0.8rem;
  font-weight: 500;
}

.form-control {
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 0.6rem 0.7rem;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: none;
}

/* ============================================================
   Alerts
   ============================================================ */

.alert {
  border-radius: 10px;
}

/* ============================================================
   Footer
   ============================================================ */

footer {
  background: #fff;
}

footer a:hover {
  color: #000 !important;
}

/* ============================================================
   404
   ============================================================ */

.text-center h1 {
  font-size: clamp(3rem, 8vw, 4.5rem);
}

/* ============================================================
   Utility
   ============================================================ */

.text-muted {
  color: #777 !important;
}