/* ============================================================================
   ActivePolicy — Enterprise UI
   Neutral slate palette, shadcn/Tailwind-inspired design system
   ============================================================================ */

:root {
  --background: #09090b;
  --foreground: #fafafa;

  --card: #0c0c0f;
  --card-foreground: #fafafa;

  --muted: #18181b;
  --muted-foreground: #a1a1aa;

  --accent: #27272a;
  --accent-foreground: #fafafa;

  --primary: #fafafa;
  --primary-foreground: #09090b;

  --secondary: #27272a;
  --secondary-foreground: #fafafa;

  --border: #27272a;
  --ring: #3b82f6;

  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-600: #2563eb;
  --blue-950: #0c1629;

  --emerald-500: #10b981;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', sans-serif;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
}

a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover { color: var(--foreground); }

/* Container */
.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 150ms ease;
}

.nav-link:hover { color: var(--foreground); }

.logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover { color: var(--foreground); }

/* ── Badge ── */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--blue-950);
  color: var(--blue-400);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-muted {
  background: var(--muted);
  color: var(--muted-foreground);
  border-color: var(--border);
}

.badge-small {
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
  background: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 150ms ease;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: #e4e4e7;
  color: var(--primary-foreground);
}

.btn-secondary {
  background: transparent;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--accent);
  color: var(--foreground);
}

/* ── Hero ── */
.hero {
  padding: 6rem 0 5rem;
  border-bottom: 1px solid var(--border);
}

.hero-content {
  max-width: 42rem;
}

.hero .badge {
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--foreground);
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--muted-foreground);
  max-width: 36rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Sections ── */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--card);
}

.section-header {
  margin-bottom: 3rem;
}

.section-header .badge {
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--foreground);
}

.text-muted {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.text-muted:last-child { margin-bottom: 0; }

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 150ms ease;
}

.section-alt .card {
  background: var(--muted);
}

.card:hover {
  border-color: #3f3f46;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--muted);
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.section-alt .card-icon {
  background: var(--accent);
}

.card .badge-small {
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-text {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--muted-foreground);
}

/* ── Two Column Layout ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.two-col-left h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--foreground);
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

/* ── Feature List ── */
.feature-list {
  display: flex;
  flex-direction: column;
}

.feature-item {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 0;
}

.feature-check {
  flex-shrink: 0;
  color: var(--emerald-500);
  margin-top: 0.125rem;
}

.feature-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.feature-desc {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.separator {
  height: 1px;
  background: var(--border);
}

/* ── Tabs ── */
.tabs-container {
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: rgba(24, 24, 27, 0.5);
}

.tab-btn {
  flex: 1;
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 150ms ease;
  border-bottom: 2px solid transparent;
  font-family: var(--font-sans);
}

.tab-btn:hover {
  color: var(--foreground);
  background: rgba(39, 39, 42, 0.5);
}

.tab-btn.tab-active {
  color: var(--foreground);
  border-bottom-color: var(--foreground);
  background: rgba(39, 39, 42, 0.3);
}

.tab-panel {
  display: none;
  padding: 2rem;
}

.tab-panel-active {
  display: block;
}

.tab-panel h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.tab-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.tab-list li {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  padding-left: 1.25rem;
  position: relative;
}

.tab-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--muted-foreground);
  opacity: 0.4;
}

/* ── Comparison Table ── */
.comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.comparison-table thead {
  background: var(--muted);
}

.comparison-th-label {
  width: 20%;
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-weight: 500;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}

.comparison-th {
  width: 40%;
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-weight: 500;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}

.comparison-th-highlight {
  color: var(--foreground);
}

.comparison-table tbody tr {
  border-bottom: 1px solid var(--border);
}

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

.comparison-table tbody tr:nth-child(even) {
  background: rgba(24, 24, 27, 0.3);
}

.comparison-label {
  padding: 0.875rem 1.25rem;
  font-weight: 500;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.comparison-old {
  padding: 0.875rem 1.25rem;
  color: #71717a;
}

.comparison-new {
  padding: 0.875rem 1.25rem;
  color: var(--foreground);
  font-weight: 500;
}

/* ── CTA Block ── */
.section-cta-block {
  padding: 5rem 0;
}

.cta-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 4rem 3rem;
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}

.cta-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.cta-card .text-muted {
  margin-bottom: 2rem;
  font-size: 0.9375rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-logo {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  display: block;
  margin-bottom: 0.5rem;
}

.footer-legal {
  font-size: 0.8125rem;
  color: #52525b;
  line-height: 1.5;
}

.footer-right {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-link:hover {
  color: var(--foreground);
}

/* ── Focus ── */
*:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 3.5rem 0 3rem;
  }
  .hero h1 {
    font-size: 1.875rem;
  }
  .section {
    padding: 3rem 0;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .tabs-nav {
    flex-wrap: wrap;
  }
  .tab-btn {
    flex: 1 1 50%;
  }
  .comparison-table {
    font-size: 0.8125rem;
  }
  .comparison-label,
  .comparison-old,
  .comparison-new,
  .comparison-th,
  .comparison-th-label {
    padding: 0.625rem 0.75rem;
  }
  .cta-card {
    padding: 2.5rem 1.5rem;
  }
  .footer-inner {
    flex-direction: column;
    gap: 1.5rem;
  }
  .header-inner {
    height: 3.5rem;
  }
}
