:root {
  /* Colors - Precision Quality Assurance & Engineering Palette */
  --primary: #0284c7;         /* Precision Cobalt / Sky Blue */
  --primary-dark: #0369a1;    /* Deep Cobalt */
  --primary-light: #38bdf8;   /* Bright Azure */
  --accent-cyan: #06b6d4;     /* Cyan accent */
  --accent-green: #10b981;    /* Verification Emerald (Passed / Approved) */
  --accent-green-dark: #059669;
  --accent-amber: #f59e0b;    /* Warning Amber (Hold Points / Review) */
  --accent-amber-dark: #d97706;
  --accent-red: #ef4444;      /* NCR Crimson (Deficiency / Non-Conformance) */
  --accent-red-dark: #dc2626;

  --bg-body: #ffffff;
  --bg-surface: #f8fafc;      /* Clean Engineering Surface */
  --bg-surface-hover: #f1f5f9;
  --bg-dark: #0f172a;         /* Deep Slate 900 */
  --bg-dark-card: #1e293b;    /* Slate 800 */

  --text-main: #0f172a;       /* Headings & Heavy Text */
  --text-body: #334155;       /* Body Text */
  --text-muted: #64748b;      /* Secondary/Muted */
  
  --border-color: #e2e8f0;
  --border-focus: #38bdf8;
  --transition-speed: 0.25s;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: "Outfit", sans-serif;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- Navbar --- */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.9rem 0;
  transition: all var(--transition-speed) ease;
  z-index: 1040;
}

.navbar.scrolled {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  color: var(--text-main) !important;
}

.navbar-brand span.highlight {
  color: var(--primary);
}

.nav-link {
  color: var(--text-body) !important;
  font-weight: 500;
  font-size: 0.93rem;
  margin-left: 0.85rem;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary) !important;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* --- Hamburger / Toggler --- */
.navbar-toggler {
  border: 1.5px solid var(--primary) !important;
  background-color: #f8fafc !important;
  padding: 0.4rem 0.6rem !important;
  border-radius: 8px !important;
  transition: all var(--transition-speed) ease;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25) !important;
  outline: none !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230284c7' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* --- Buttons --- */
.btn {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.75rem 1.75rem;
  transition: all var(--transition-speed) ease;
}

.btn-primary {
  background-color: var(--text-main); 
  border: none;
  color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  color: #fff;
}

.btn-accent {
  background-color: var(--primary);
  border: none;
  color: #ffffff;
}

.btn-accent:hover, .btn-accent:focus {
  background-color: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-outline {
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-body);
}

.btn-outline:hover {
  border-color: var(--text-main);
  background: var(--bg-surface);
  color: var(--text-main);
  transform: translateY(-1px);
}

.btn-outline-primary {
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-1px);
}

/* --- Hero Section --- */
.hero {
  padding: 8.5rem 0 6rem;
  background: radial-gradient(circle at top right, #f0f9ff 0%, transparent 60%),
              radial-gradient(circle at bottom left, #ecfdf5 0%, transparent 50%),
              #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.95rem;
  border-radius: 50px;
  background: #f0f9ff;
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  border: 1px solid #bae6fd;
}

.pill-tag i {
  color: var(--primary);
}

.pill-tag-green {
  background: #ecfdf5;
  color: var(--accent-green-dark);
  border: 1px solid #a7f3d0;
}

.pill-tag-green i {
  color: var(--accent-green);
}

.hero-title {
  font-size: clamp(2.4rem, 5.2vw, 4.1rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-body);
  max-width: 760px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

/* --- Hero Visual Flow Banner --- */
.hero-flow-container {
  margin-top: 3.5rem;
  padding: 1.75rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.07);
}

.flow-step-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow-x: auto;
  padding: 0.5rem 0;
  gap: 12px;
}

.flow-node {
  flex: 1;
  min-width: 135px;
  text-align: center;
  padding: 1rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-speed) ease;
}

.flow-node:hover {
  background: #ffffff;
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.12);
}

.flow-node.active {
  background: #f0f9ff;
  border-color: var(--primary);
}

.flow-node .flow-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e0f2fe;
  color: var(--primary);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.flow-node.success .flow-icon {
  background: #d1fae5;
  color: var(--accent-green);
}

.flow-node.amber .flow-icon {
  background: #fef3c7;
  color: var(--accent-amber);
}

.flow-arrow {
  color: #94a3b8;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* --- Pages General Header --- */
.page-header {
  padding: 7.5rem 0 4rem;
  background: linear-gradient(135deg, var(--bg-surface) 0%, #f0f9ff 100%);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

/* --- Section Styling --- */
.section {
  padding: 6rem 0;
}

.section-bg {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-dark {
  background-color: var(--bg-dark);
  color: #e2e8f0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-dark h2, .section-dark h3, .section-dark h4 {
  color: #ffffff;
}

.section-dark .text-muted {
  color: #94a3b8 !important;
}

/* --- Feature Cards & Grid --- */
.feature-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
  border-color: var(--primary);
}

.icon-box {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f9ff;
  color: var(--primary);
  border-radius: 12px;
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
  border: 1px solid #bae6fd;
}

.icon-box-green {
  background: #ecfdf5;
  color: var(--accent-green);
  border: 1px solid #a7f3d0;
}

.icon-box-amber {
  background: #fef3c7;
  color: var(--accent-amber);
  border: 1px solid #fde68a;
}

.icon-box-red {
  background: #fee2e2;
  color: var(--accent-red);
  border: 1px solid #fecaca;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* --- Problem Cards --- */
.problem-card {
  background: #ffffff;
  border: 1px solid #fee2e2;
  border-left: 4px solid var(--accent-red);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  height: 100%;
  transition: all var(--transition-speed) ease;
}

.problem-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.08);
}

/* --- The Evidence Chain Stack --- */
.evidence-chain-container {
  position: relative;
  padding: 2.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.05);
}

.chain-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.chain-item:last-child {
  padding-bottom: 0;
}

.chain-item::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 21px;
  bottom: 0;
  width: 2px;
  background: #cbd5e1;
}

.chain-item:last-child::before {
  display: none;
}

.chain-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  z-index: 2;
}

.chain-circle.success {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.chain-circle.amber {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.chain-content {
  flex-grow: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: all 0.2s ease;
}

.chain-content:hover {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.08);
}

/* --- Interactive Quality Dashboard Simulator --- */
.dash-simulator-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.09);
  overflow: hidden;
}

.dash-header {
  background: var(--bg-dark);
  color: #ffffff;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.dash-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem;
  border-radius: 10px;
  flex-wrap: wrap;
}

.dash-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.5rem 1rem;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-tab-btn:hover {
  color: #ffffff;
}

.dash-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
}

.dash-body {
  padding: 2.25rem;
}

.dash-kpi-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease;
}

.dash-kpi-box:hover {
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.dash-kpi-val {
  font-family: "Outfit", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.dash-kpi-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* --- Progress Bar --- */
.turnover-progress {
  height: 16px;
  border-radius: 50px;
  background-color: #e2e8f0;
  overflow: hidden;
  margin-top: 1rem;
}

.turnover-progress-bar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-green) 100%);
  transition: width 0.6s ease;
}

/* --- Unifying Visual Spine Banner --- */
.visual-spine-banner {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  color: #ffffff;
  margin: 2rem 0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

.spine-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.spine-step-node {
  flex: 1;
  min-width: 105px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.75rem 0.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

.spine-step-node:hover {
  background: rgba(2, 132, 199, 0.2);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.spine-step-node.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--accent-green);
}

.spine-step-node .spine-step-num {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 700;
}

.spine-step-node .spine-step-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0.25rem;
  white-space: nowrap;
}

.spine-step-arrow {
  color: #64748b;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* --- Item Lifecycle Trace Box --- */
.item-trace-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.9rem 1.15rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #1e293b;
  letter-spacing: -0.01em;
}

/* --- Mobile Checklist Mockup --- */
.mobile-mockup {
  max-width: 380px;
  margin: 0 auto;
  background: #ffffff;
  border: 10px solid var(--bg-dark);
  border-radius: 36px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.2);
}

.mockup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
}

.mockup-item:last-child {
  border-bottom: none;
}

/* --- Hold & Witness Point Gatekeeper --- */
.gate-card {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  background: #ffffff;
  position: relative;
}

.gate-card.locked {
  border-color: var(--accent-amber);
  background: #fffbeb;
}

.gate-card.released {
  border-color: var(--accent-green);
  background: #ecfdf5;
}

/* --- Closed-Loop NCR Stepper --- */
.ncr-stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow-x: auto;
  padding: 1rem 0;
  gap: 8px;
}

.ncr-step {
  flex: 1;
  text-align: center;
  min-width: 95px;
}

.ncr-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--text-body);
}

.ncr-step.done .ncr-badge {
  background: #d1fae5;
  color: var(--accent-green-dark);
}

.ncr-step.active .ncr-badge {
  background: #dbeafe;
  color: var(--primary-dark);
  border: 1px solid var(--primary);
}

/* --- Ecosystem Grid (Roles) --- */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.1rem;
  border-radius: 50px;
  background: white;
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* --- Form Controls --- */
.form-control, .form-select {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: all var(--transition-speed) ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
  outline: none;
}

/* --- Footer --- */
.footer {
  background-color: #0b1329 !important; /* Deep Navy Slate */
  color: #e2e8f0 !important;
  padding: 5rem 0 3.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer h5, 
.footer h6 {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.footer p,
.footer .footer-desc {
  color: #cbd5e1 !important;
  font-size: 0.95rem;
  line-height: 1.65;
}

.footer .footer-feature-note {
  color: #e2e8f0 !important;
  font-size: 0.88rem;
}

.footer .text-muted,
.footer small.text-muted,
.footer p.text-muted,
.footer div.text-muted {
  color: #94a3b8 !important;
}

.footer hr {
  border-color: rgba(255, 255, 255, 0.15) !important;
  opacity: 1 !important;
}

.footer a {
  color: #cbd5e1 !important;
  text-decoration: none;
  transition: all var(--transition-speed) ease;
}

.footer a:hover {
  color: #38bdf8 !important;
  text-decoration: none;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
}

.footer-links li a {
  color: #cbd5e1 !important;
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
}

.footer-links li a:hover {
  color: #38bdf8 !important;
  transform: translateX(4px);
}

.footer .legal-copy {
  color: #94a3b8 !important;
  font-size: 0.85rem;
}

.footer .legal-copy strong,
.footer .legal-copy a {
  color: #cbd5e1 !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .hero {
    padding: 6.5rem 0 4.5rem;
  }
  .hero-flow-container {
    padding: 1.25rem;
  }
  .flow-node {
    min-width: 120px;
  }
}
