/* ========================================
   Comparison Page Styles
   Matches the case study / site design system.
   ======================================== */

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

:root {
  --primary: #3a9be0;
  --primary-dark: #0e74b7;
  --accent: #e87a54;
  --success: #7dc244;
  --bg-dark: #0b1627;
  --bg-section: #0f1f3a;
  --bg-card: #172a48;
  --text-primary: #e8edf5;
  --text-secondary: #8ea2bf;
  --text-muted: #7a92b2;
  --border: #1e3456;
  --radius: 8px;
  --radius-lg: 16px;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

/* ── Nav ── */
.cmp-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(11, 22, 39, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30, 52, 86, 0.5);
}

.cmp-nav-logo img { height: 32px; display: block; }

.cmp-nav-back {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.cmp-nav-back:hover { color: var(--primary); }

/* ── Layout ── */
.cmp-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.cmp-crumbs {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cmp-crumbs a { color: var(--text-secondary); }
.cmp-crumbs span[aria-hidden] { margin: 0 6px; opacity: 0.6; }

.cmp-header { margin-bottom: 40px; }

.cmp-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.cmp-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cmp-updated {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.cmp-intro {
  margin-top: 20px;
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 62ch;
}

/* ── Body copy ── */
.cmp-body h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 700;
  line-height: 1.3;
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.cmp-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.cmp-body p { margin-bottom: 18px; color: var(--text-secondary); }
.cmp-body p strong { color: var(--text-primary); }

.cmp-list {
  list-style: none;
  margin: 0 0 20px;
}

.cmp-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.cmp-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.cmp-source {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

.cmp-placeholder {
  background: rgba(232, 122, 84, 0.16);
  color: var(--accent);
  border: 1px dashed rgba(232, 122, 84, 0.5);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 0.9em;
  font-weight: 600;
}

/* ── Comparison table ── */
.cmp-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-section);
}

.cmp-table-wrap:focus-visible { outline: 2px solid var(--primary); }

.cmp-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.cmp-table th,
.cmp-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.cmp-table tbody tr:last-child th,
.cmp-table tbody tr:last-child td { border-bottom: none; }

.cmp-table thead th {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(23, 42, 72, 0.7);
  white-space: nowrap;
}

.cmp-table tbody th {
  font-weight: 600;
  color: var(--text-primary);
  width: 26%;
}

.cmp-table td { color: var(--text-secondary); }

/* grobot column, subtly highlighted */
.cmp-table .cmp-col-grobot {
  background: rgba(58, 155, 224, 0.07);
  box-shadow: inset 1px 0 0 rgba(58, 155, 224, 0.28), inset -1px 0 0 rgba(58, 155, 224, 0.28);
  color: var(--text-primary);
}

.cmp-table thead .cmp-col-grobot {
  background: rgba(58, 155, 224, 0.16);
  color: var(--primary);
}

/* ── CTA ── */
.cmp-cta {
  margin: 48px 0;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(58, 155, 224, 0.12), rgba(23, 42, 72, 0.6));
}

.cmp-cta h2 {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0 0 8px;
  padding: 0;
  border: none;
}

.cmp-cta p { color: var(--text-secondary); margin-bottom: 20px; }

.cmp-cta-btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #04101f;
  font-weight: 700;
  transition: background 0.25s, transform 0.25s;
}

.cmp-cta-btn:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* ── FAQ ── */
.cmp-faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

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

.cmp-faq-item h3 {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.cmp-faq-item p { margin: 0; color: var(--text-secondary); }

/* ── More comparisons ── */
.cmp-more {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.cmp-more h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cmp-more-cat {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 16px 0 10px;
}

.cmp-more-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cmp-more-list a {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-section);
  font-size: 0.875rem;
  transition: border-color 0.25s, background 0.25s;
}

.cmp-more-list a:hover {
  border-color: var(--primary);
  background: var(--bg-card);
}

.cmp-more-hub { margin-top: 20px; font-weight: 600; }

/* ── Hub ── */
.cmp-hub-cat { margin-top: 44px; }

.cmp-hub-cat h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.cmp-hub-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.cmp-hub-grid a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-section);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.cmp-hub-grid a:hover {
  border-color: var(--primary);
  background: var(--bg-card);
  transform: translateY(-2px);
}

.cmp-hub-title {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

.cmp-hub-blurb {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ── Footer ── */
.cmp-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.cmp-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-bottom: 14px;
}

/* ── Mobile ── */
@media (max-width: 720px) {
  .cmp-nav { padding: 14px 20px; }
  .cmp-main { padding: 104px 16px 64px; }
  .cmp-cta { padding: 24px 20px; }
  .cmp-table { font-size: 0.875rem; }
  .cmp-table th, .cmp-table td { padding: 12px; }
  .cmp-hub-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ── Accessibility: links inside text blocks must not rely on color alone,
   and the highlighted column / placeholder need 4.5:1 contrast. ── */
.cmp-crumbs a,
.cmp-body a,
.cmp-faq-item a,
.cmp-more-hub a,
.cmp-footer-inner a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cmp-table thead .cmp-col-grobot { color: #8ecbf5; }

.cmp-placeholder {
  background: rgba(232, 122, 84, 0.2);
  color: #f3ad93;
}
