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

/* ── Custom Properties ── */
:root {
  /* [BRU-245] Darkened from #3B82F6 → #2563EB (Tailwind blue-600) so
     white-on-primary buttons clear WCAG AA 4.5:1. Affects nav-cta,
     hero-cta, pricing-cta, pricing-badge, pricing-enterprise-cta. */
  --primary: #2563EB;
  --primary-light: #3B82F6;
  --accent: #06B6D4;
  --success: #22C55E;
  --slate-950: #020617;
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
  --card-border: 1px solid rgba(255,255,255,0.06);
  --card-border-hover: 1px solid rgba(255,255,255,0.12);
  --glow-primary: 0 0 20px rgba(59,130,246,0.3);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--slate-900);
  color: var(--slate-300);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  transition: background 150ms ease, border-color 150ms ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(15,23,42,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--card-border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-50);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 1rem;
  color: var(--slate-300);
  text-decoration: none;
  transition: color 150ms ease;
  line-height: 1.6;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--slate-50);
}

.nav-cta {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  padding: 8px 20px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.nav-cta:hover {
  background: var(--primary-light);
  box-shadow: var(--glow-primary);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--slate-300);
  margin: 5px 0;
  transition: transform 200ms ease, opacity 200ms ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--slate-800);
  padding: 24px;
  z-index: 99;
  border-bottom: var(--card-border);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  color: var(--slate-300);
  text-decoration: none;
  border-bottom: var(--card-border);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  color: var(--slate-50);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 0%, #0F172A 0%, #020617 70%);
  padding: 160px 24px 80px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--slate-50);
}

.hero-sub {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--slate-300);
  max-width: 640px;
  margin: 24px auto 0;
}

.hero-code {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  line-height: 1.8;
  background: var(--slate-950);
  border: var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  max-width: 640px;
  margin: 40px auto 0;
  text-align: left;
  white-space: pre;
}

/* [BRU-245] primary-light for AA contrast on the dark hero background. */
.hero-code .tag { color: var(--primary-light); }
.hero-code .attr { color: var(--accent); }
.hero-code .str { color: var(--success); }
.hero-code .punct { color: var(--slate-400); }

.hero-cta {
  display: inline-block;
  margin-top: 32px;
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 12px 32px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.hero-cta:hover {
  background: var(--primary-light);
  box-shadow: var(--glow-primary);
}

/* ── Section shared ── */
.section {
  padding: 64px 24px;
}

.section + .section {
  margin-top: 0;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-heading {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--slate-50);
  text-align: center;
  margin-bottom: 64px;
}

.section-subline {
  font-size: 1.125rem;
  color: var(--slate-400);
  text-align: center;
  margin-top: 8px;
}

/* ── Problem ── */
.problem {
  background: var(--slate-900);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.problem-card {
  background: var(--slate-800);
  border: var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: border 150ms ease;
}

.problem-card:hover {
  border: var(--card-border-hover);
}

.problem-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--slate-50);
}

.problem-card p {
  margin-top: 16px;
  color: var(--slate-300);
}

/* ── Capabilities ── */
.capabilities {
  background: var(--slate-800);
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.capability-card {
  background: var(--slate-900);
  border: var(--card-border);
  border-radius: var(--radius-md);
  padding: 0;
  transition: border 150ms ease;
  display: flex;
  flex-direction: column;
}

.capability-card:hover {
  border: var(--card-border-hover);
}

.capability-header {
  padding: 32px 32px 24px;
}

.capability-pill {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 16px;
}

.capability-pill--green {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}

.capability-pill--blue {
  background: rgba(59, 130, 246, 0.15);
  /* [BRU-245] #93C5FD (blue-300) lightens the text for AA contrast
     against the dark capability-card background that the rgba tint
     sits on top of (computed contrast ~5.5:1 vs effective bg). */
  color: #93C5FD;
}

.capability-card h3 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--slate-50);
}

.capability-question {
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--slate-400);
  margin-top: 8px;
}

.capability-signals {
  background: rgba(0, 0, 0, 0.2);
  border-top: var(--card-border);
  padding: 24px 32px;
  margin-top: auto;
  list-style: none;
}

.capability-signals li {
  position: relative;
  padding: 5px 0 5px 16px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--slate-300);
}

.capability-signals li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--slate-500);
}

.replay-teaser {
  text-align: center;
  margin-top: 48px;
  font-size: 1rem;
  font-style: italic;
  /* [BRU-245] slate-400 (lighter) for AA contrast against the
     dark capabilities-section background. */
  color: var(--slate-400);
}

/* ── Privacy ── */
.privacy {
  background: var(--slate-900);
}

.privacy .section-inner {
  max-width: 1000px;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.privacy-card {
  background: var(--slate-800);
  border: var(--card-border);
  border-radius: var(--radius-md);
  padding: 40px 32px;
}

.privacy-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--slate-50);
  line-height: 1.3;
  margin-bottom: 16px;
}

.privacy-card p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--slate-300);
}

/* ── Pricing ── */
.pricing {
  background: var(--slate-800);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.pricing-card {
  position: relative;
  background: var(--slate-900);
  border: var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  transition: border 150ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pricing-card:hover {
  border: var(--card-border-hover);
}

.pricing-card.highlighted {
  border: 1px solid var(--primary);
  box-shadow: var(--glow-primary);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 16px;
  border-radius: 9999px;
  white-space: nowrap;
}

.pricing-tier {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 12px;
}

.pricing-price {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--slate-50);
}

.pricing-period {
  font-size: 1rem;
  /* [BRU-245] slate-400 (lighter) for AA contrast against the
     pricing card's slate-900 background. */
  color: var(--slate-400);
}

.pricing-events {
  font-size: 1rem;
  color: var(--slate-300);
  margin-top: 16px;
}

.pricing-enterprise-label {
  font-size: 2rem;
  font-weight: 600;
  color: var(--slate-50);
  margin-top: 12px;
}

.pricing-enterprise-sub {
  font-size: 1rem;
  color: var(--slate-400);
  margin-top: 4px;
}

.pricing-cta {
  display: inline-block;
  margin-top: auto;
  padding-top: 24px;
  font-size: 0.875rem;
  font-weight: 500;
  /* [BRU-245] primary-light (#3B82F6) for AA contrast on the
     pricing card's slate-900 background. The solid-fill primary
     uses the darker --primary so white text on it passes too. */
  color: var(--primary-light);
  text-decoration: none;
  transition: color 150ms ease;
}

.pricing-cta:hover {
  color: #60A5FA;
  text-decoration: underline;
}

.pricing-cta-primary {
  display: inline-block;
  margin-top: auto;
  padding-top: 24px;
}

.pricing-cta-primary a {
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 24px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.pricing-cta-primary a:hover {
  background: #60A5FA;
  box-shadow: var(--glow-primary);
}

/* ── Pricing tagline (BRU-245) ── */
.pricing-tagline {
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--slate-400);
  margin-top: 12px;
  min-height: 2.4em;
  text-align: center;
}

/* ── Screen-reader-only utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Hash-anchor :target highlight (FR-BRU245-026) ── */
.pricing-card {
  scroll-margin-top: 80px;
}

@media (prefers-reduced-motion: no-preference) {
  .pricing-card:target {
    animation: bru245-highlight 1.5s ease-out;
  }

  @keyframes bru245-highlight {
    0%   { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
  }
}

/* ── Pricing comparison table (BRU-245) ── */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin: 64px 0 48px;
  font-size: 0.9375rem;
  color: var(--slate-300);
}

.pricing-table caption {
  caption-side: top;
}

.pricing-table thead th {
  padding: 14px 16px;
  text-align: left;
  color: var(--slate-50);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.pricing-table tbody th,
.pricing-table tbody td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pricing-table tbody th {
  color: var(--slate-200);
  font-weight: 600;
}

.pricing-table thead th:not(:first-child),
.pricing-table tbody td {
  text-align: center;
}

.pricing-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.pricing-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* ── Enterprise callout ── */
.pricing-enterprise {
  background: var(--slate-900);
  border: var(--card-border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  margin-top: 48px;
}

.pricing-enterprise p {
  font-size: 1.0625rem;
  color: var(--slate-300);
  margin-bottom: 20px;
}

.pricing-enterprise strong {
  color: var(--slate-50);
}

.pricing-enterprise-cta {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.pricing-enterprise-cta:hover {
  background: var(--primary-light);
  box-shadow: var(--glow-primary);
}

/* ── How we compare ── */
.compare-section {
  background: var(--slate-900);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  color: var(--slate-300);
}

.compare-table thead th {
  padding: 14px 16px;
  text-align: left;
  color: var(--slate-50);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.compare-table tbody th,
.compare-table tbody td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.compare-table tbody th {
  color: var(--slate-200);
  font-weight: 600;
  width: 18%;
}

.compare-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.compare-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* ── Footer ── */
.footer {
  background: var(--slate-950);
  padding: 48px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-50);
  text-decoration: none;
}

.footer-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.footer-links a {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--slate-400);
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-links a:hover {
  color: var(--slate-200);
  text-decoration: underline;
}

.footer-attribution {
  text-align: center;
  margin-top: 32px;
  font-size: 1rem;
  /* [BRU-245] slate-400 for AA contrast on the slate-950 footer. */
  color: var(--slate-400);
}

.footer-attribution a {
  color: var(--slate-400);
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-attribution a:hover {
  color: var(--slate-200);
  text-decoration: underline;
}

/* ── Responsive: Tablet ── */
@media (max-width: 1023px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Responsive: Mobile ── */
@media (max-width: 767px) {
  .hero {
    padding: 120px 24px 60px;
    min-height: auto;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .hero-code {
    font-size: 0.875rem;
    padding: 12px 16px;
  }

  .section {
    padding: 40px 24px;
  }

  .section-heading {
    font-size: 1.5rem;
    margin-bottom: 40px;
  }

  .problem-grid,
  .capabilities-grid {
    grid-template-columns: 1fr;
  }

  .privacy-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-table,
  .compare-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .problem-card,
  .capability-card {
    padding: 24px;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .mobile-menu {
    display: block;
  }

  .footer-row {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }

  .subprocessor-count .big-number {
    font-size: 2.25rem;
  }
}

/* ── Print ── */
@media print {
  body {
    background: #fff;
    color: #111;
  }

  .nav, .mobile-menu {
    display: none !important;
  }

  .hero {
    background: #fff;
    min-height: auto;
    padding-top: 40px;
  }

  .hero h1, .section-heading, .problem-card h3, .capability-card h3, .privacy-statements strong, .pricing-price, .footer-wordmark {
    color: #111;
  }

  .hero-sub, .problem-card p, .capability-card p, .privacy-statements p, .pricing-events, .footer-attribution {
    color: #333;
  }

  .hero-code {
    background: #f5f5f5;
    border: 1px solid #ccc;
  }

  .problem-card, .capability-card, .pricing-card, .pricing-enterprise {
    border: 1px solid #ccc;
    background: #fff;
  }

  .pricing-table, .compare-table {
    color: #111;
  }

  .pricing-table thead th, .compare-table thead th,
  .pricing-table tbody th, .compare-table tbody th,
  .pricing-table tbody td, .compare-table tbody td {
    color: #111;
    border-bottom: 1px solid #ccc;
    background: #fff;
  }

  .capabilities, .pricing, .compare-section {
    background: #f9f9f9;
  }

  .footer {
    background: #f5f5f5;
  }
}
