/* ===== DESIGN SYSTEM: Trust & Authority ===== */
:root {
  --primary: #0F172A;
  --secondary: #334155;
  --accent: #CA8A04;
  --accent-light: #FEF3C7;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #020617;
  --text-muted: #475569;
  --border: #E2E8F0;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --danger-border: #FECACA;
  --success: #059669;
  --success-bg: #ECFDF5;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-family: 'Lexend', sans-serif; line-height: 1.3; }

/* ===== NAVIGATION ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 64px;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: white;
}
.nav-brand img { height: 36px; width: auto; }
.nav-brand span { font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1.1rem; }
.nav-brand small { color: var(--accent); font-size: 0.7rem; font-weight: 500; margin-left: 0.25rem; }

.nav-tabs { display: flex; gap: 0; height: 100%; }
.nav-tab {
  background: none; border: none; color: rgba(255,255,255,0.6);
  font-family: 'Source Sans 3', sans-serif; font-size: 0.85rem; font-weight: 500;
  padding: 0 1rem; height: 100%; cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  display: flex; align-items: center; gap: 0.4rem;
  white-space: nowrap;
}
.nav-tab:hover { color: rgba(255,255,255,0.9); }
.nav-tab.active { color: white; border-bottom-color: var(--accent); }
.nav-tab svg { width: 16px; height: 16px; }

/* Mobile nav */
.nav-mobile {
  display: none; overflow-x: auto; background: #1E293B;
  padding: 0.5rem; gap: 0.25rem; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-mobile::-webkit-scrollbar { display: none; }
.nav-mobile-tab {
  background: none; border: none; color: rgba(255,255,255,0.5);
  font-size: 0.75rem; font-weight: 500; padding: 0.5rem 0.75rem;
  border-radius: 6px; cursor: pointer; white-space: nowrap;
  transition: all 0.2s; font-family: 'Source Sans 3', sans-serif;
}
.nav-mobile-tab.active { background: var(--accent); color: var(--primary); font-weight: 700; }

@media (max-width: 768px) {
  .nav-tabs { display: none; }
  .nav-mobile { display: flex; }
}

/* ===== MAIN CONTENT ===== */
.main { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; min-height: 80vh; }

/* Tab views */
.view { display: none; animation: fadeSlideIn 0.4s ease; }
.view.active { display: block; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== CARDS ===== */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: all 0.25s ease; cursor: default;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-accent { border-top: 4px solid var(--accent); }
.card-danger { border-top: 4px solid var(--danger); }
.card-success { border-top: 4px solid var(--success); }
.card-navy { border-top: 4px solid var(--primary); }

/* ===== GRID ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ===== HERO ===== */
.hero {
  text-align: center; padding: 2rem 0 3rem;
}
.hero h1 { font-size: 2rem; color: var(--primary); margin-bottom: 0.75rem; }
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 640px; margin: 0 auto; }
.hero-badges { display: flex; justify-content: center; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.85rem; border-radius: 99px; font-size: 0.8rem; font-weight: 600;
}
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-accent { background: var(--accent-light); color: #92400E; }
.badge-navy { background: #EFF6FF; color: var(--primary); }

/* ===== ALERT BOX ===== */
.alert {
  padding: 1.25rem 1.5rem; border-radius: var(--radius);
  display: flex; gap: 1rem; align-items: flex-start;
  margin-bottom: 2rem;
}
.alert-danger { background: var(--danger-bg); border: 1px solid var(--danger-border); }
.alert-danger .alert-icon { color: var(--danger); flex-shrink: 0; }
.alert-accent { background: var(--accent-light); border: 1px solid #FDE68A; }

/* ===== SECTION HEADERS ===== */
.section-header {
  padding: 1.5rem; border-radius: var(--radius); margin-bottom: 2rem;
}
.section-header h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.section-header p { font-size: 0.95rem; }
.section-header-navy { background: #EFF6FF; }
.section-header-navy h2 { color: var(--primary); }
.section-header-navy p { color: #1E40AF; }
.section-header-danger { background: var(--danger-bg); }
.section-header-danger h2 { color: var(--danger); }
.section-header-danger p { color: #991B1B; }
.section-header-accent { background: var(--accent-light); }
.section-header-accent h2 { color: #92400E; }
.section-header-accent p { color: #78350F; }
.section-header-green { background: var(--success-bg); }
.section-header-green h2 { color: var(--success); }
.section-header-green p { color: #065F46; }

/* ===== STAT COUNTER ===== */
.stat-grid { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; padding: 2rem 0; }
.stat-item { text-align: center; }
.stat-number {
  font-family: 'Lexend', sans-serif; font-size: 2.5rem; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 2rem; margin-left: 1rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--border); border-radius: 2px;
}
.timeline-item { position: relative; padding-bottom: 2.5rem; }
.timeline-dot {
  position: absolute; left: -2.35rem; top: 0.2rem;
  width: 20px; height: 20px; border-radius: 50%;
  border: 4px solid var(--surface); box-shadow: var(--shadow);
}
.timeline-dot-navy { background: var(--primary); }
.timeline-dot-accent { background: var(--accent); }
.timeline-dot-green { background: var(--success); }

/* ===== COMPARISON TABLE ===== */
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.compare-table th {
  text-align: left; padding: 0.75rem 1rem; font-weight: 600;
  background: var(--primary); color: white; font-family: 'Lexend', sans-serif;
}
.compare-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.compare-table tr:hover { background: #F1F5F9; }

/* ===== CHECKLIST ===== */
.checklist { list-style: none; }
.checklist li {
  padding: 0.6rem 0; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.9rem;
}
.checklist li svg { flex-shrink: 0; margin-top: 2px; }

/* ===== QUOTE BLOCK ===== */
.quote-block {
  text-align: center; padding: 2rem; margin: 2rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, #1E293B 100%);
  border-radius: var(--radius); color: white;
}
.quote-block blockquote {
  font-family: 'Lexend', sans-serif; font-size: 1.3rem;
  font-weight: 300; font-style: italic; margin-bottom: 0.5rem;
}
.quote-block cite { font-size: 0.85rem; color: var(--accent); font-style: normal; }

/* ===== PARTNER CARD ===== */
.partner-card { padding: 2rem; text-align: center; }
.partner-card .partner-icon {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--accent-light); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem; color: var(--accent);
}
.partner-card h4 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.partner-card .partner-type { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-bottom: 0.75rem; }
.partner-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ===== LEADER CARD ===== */
.leader-card { padding: 1.5rem; }
.leader-card .leader-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.leader-card .leader-avatar {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--primary); display: flex; align-items: center; justify-content: center;
  color: white; font-family: 'Lexend', sans-serif; font-weight: 700; font-size: 1.1rem;
}
.leader-card .leader-name { font-weight: 700; font-size: 1rem; }
.leader-card .leader-role { font-size: 0.8rem; color: var(--text-muted); }
.leader-card ul { list-style: none; }
.leader-card ul li {
  font-size: 0.85rem; color: var(--text-muted); padding: 0.3rem 0;
  padding-left: 1.25rem; position: relative;
}
.leader-card ul li::before {
  content: ''; position: absolute; left: 0; top: 0.65rem;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* ===== COMPLIANCE COLUMNS ===== */
.law-card { padding: 1.5rem; }
.law-card .law-badge {
  display: inline-block; padding: 0.25rem 0.75rem; border-radius: 4px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 1rem;
}
.law-card .law-badge-red { background: var(--danger-bg); color: var(--danger); }
.law-card .law-badge-amber { background: var(--accent-light); color: #92400E; }

/* ===== FORM ===== */
.data-form { padding: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--text);
}
.form-group input, .form-group select {
  width: 100%; padding: 0.7rem 1rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.9rem; font-family: inherit;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(202,138,4,0.1);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary); color: rgba(255,255,255,0.6);
  text-align: center; padding: 2rem 1.5rem; margin-top: 3rem;
  font-size: 0.85rem;
}
.footer a { color: var(--accent); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ===== CHART ===== */
.chart-wrap { position: relative; width: 100%; max-width: 500px; margin: 0 auto; height: 280px; }

/* ===== UTILITIES ===== */
.space-y > * + * { margin-top: 1.5rem; }
.space-y-sm > * + * { margin-top: 1rem; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.p-card { padding: 1.5rem; }

@media (max-width: 768px) {
  .hero h1 { font-size: 1.5rem; }
  .stat-number { font-size: 2rem; }
  .stat-grid { gap: 2rem; }
  .nav-brand span { font-size: 0.95rem; }
  .nav-brand small { display: none; }
}

/* ===== PRICING CALCULATOR ===== */
.addon-card {
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
  border-width: 2px;
}
.addon-card:hover {
  border-color: var(--primary);
}
.addon-card.selected {
  border-color: var(--accent);
  background-color: #FFFBEC;
}
.checkbox-wrap {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}
.addon-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
  pointer-events: none; /* Let the card handle the click */
}
.sticky-summary {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  border-top: 2px solid var(--accent);
  box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
  padding: 1rem 1.5rem;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 3rem;
  transition: transform 0.3s ease;
  transform: translateY(120%);
}
.sticky-summary.visible {
  transform: translateY(0);
}
.summary-group {
  text-align: right;
}
.summary-price {
  font-family: 'Lexend', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.summary-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  .sticky-summary {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    align-items: center;
    text-align: center;
  }
  .summary-group { text-align: center; }
  .summary-price { font-size: 1.25rem; }
  /* Padding bottom to main so content isn't hidden by sticky summary */
  .main { padding-bottom: 120px; }
}
