/* ============================================================
   TriRev Landing Page — CSS
   Design system: "TriRev Mono" (generated by Stitch, refined manually)

   Anti-slop principles enforced:
   - No gradient text (bg-clip-text)
   - No purple-to-pink gradients (max 0 gradients on this page)
   - No glassmorphism
   - No decorative orbs/blobs
   - No rounded-full pill shapes on cards
   - Accessible: WCAG AA contrast minimums
   - Mobile-first, tested at 360 / 768 / 1280px
   - Inter font for editorial precision

   Stitch-informed design tokens:
   - Surface: #131318
   - Surface-container-low: #1b1b20
   - Surface-container: #1f1f25
   - Primary (IBM Blue): #0F62FE
   - Correctness (Green): #4ae176
   - Security (Error): #ffb4ab / #ef4444
   - Style (Secondary): #bbc3ff / #7c8cf8
   ============================================================ */

/* --- Screen reader 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-width: 0;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* Respect motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background-color: #131318;
  color: #e0e0e8;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Typography scale --- */
h1, h2, h3 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f0f0f8;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.625rem, 3.5vw, 2.375rem); }
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }

p { max-width: 64ch; }

code {
  font-family: "SF Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;
  font-size: 0.875em;
  background-color: #1f1f25;
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: #bbc3ff;
  border: 1px solid rgba(187, 195, 255, 0.15);
}

/* --- Layout utilities --- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.section-sub {
  color: #7a7a9a;
  font-size: 1.0625rem;
  margin-top: 0.625rem;
  max-width: 56ch;
}

/* --- Skip link (a11y) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #0F62FE;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.15s;
}
.skip-link:focus { top: 1rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 1.375rem;
  border-radius: 5px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, outline-offset 0.1s;
  line-height: 1;
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn:focus-visible {
  outline: 2px solid #0F62FE;
  outline-offset: 3px;
}

.btn-primary {
  background-color: #0F62FE;
  color: #fff;
}
.btn-primary:hover { background-color: #0353e9; }

.btn-ghost {
  background-color: transparent;
  color: #c8c8d8;
  border-color: rgba(255, 255, 255, 0.12);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: #e8e8f0;
}

.btn-lg {
  padding: 0.875rem 2.25rem;
  font-size: 1.0625rem;
}

/* Plan buttons */
.btn-plan {
  width: 100%;
  background-color: #1b1b20;
  color: #c8c8d8;
  border-color: rgba(255, 255, 255, 0.1);
  margin-top: auto;
  font-size: 0.9375rem;
}
.btn-plan:hover {
  background-color: #1f1f25;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-plan--featured {
  background-color: #0F62FE;
  color: #fff;
  border-color: transparent;
}
.btn-plan--featured:hover { background-color: #0353e9; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(19, 19, 24, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: #f0f0f8;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo:focus-visible {
  outline: 2px solid #0F62FE;
  outline-offset: 3px;
  border-radius: 4px;
}

.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: #9090a8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.site-nav a:hover { color: #f0f0f8; }
.site-nav a:focus-visible {
  outline: 2px solid #0F62FE;
  outline-offset: 3px;
  border-radius: 3px;
}

.nav-link-gh {
  color: #d0d0e0 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  padding: 0.3rem 0.75rem;
  border-radius: 5px;
}
.nav-link-gh:hover { border-color: rgba(255, 255, 255, 0.25) !important; }

/* --- Hero --- */
.hero {
  padding: 5rem 0 4.5rem;
  background-color: #131318;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7c8cf8;
  margin-bottom: 1.5rem;
  padding: 0.25rem 0.75rem 0.25rem 0.5rem;
  border: 1px solid rgba(124, 140, 248, 0.25);
  border-radius: 4px;
  background-color: rgba(124, 140, 248, 0.07);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #7c8cf8;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow-dot { animation: none; }
}

.hero h1 {
  color: #f2f2fa;
  margin-bottom: 1.375rem;
}

.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  color: #9090a8;
  margin-bottom: 2.375rem;
  max-width: 54ch;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 0;
  align-items: center;
  font-size: 0.8125rem;
  color: #5a5a72;
}

.hero-trust span { color: #5a5a72; }

.trust-sep {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: #3a3a52;
  margin: 0 0.625rem;
  flex-shrink: 0;
  color: transparent;
}

/* --- Feature preview --- */
.feature-preview {
  padding: 3rem 0 4rem;
  background-color: #0e0e13;
}

.feature-card-img {
  display: block;
  width: 100%;
  max-width: 880px;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin: 0 auto;
}

/* --- How it works --- */
.how {
  padding: 5rem 0;
  background-color: #131318;
}

.steps-container {
  margin-bottom: 4rem;
}

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  position: relative;
}

.step-marker {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: #1b1b20;
  border: 2px solid #0F62FE;
  color: #7c8cf8;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-top: 0.125rem;
}

.step-connector {
  position: absolute;
  left: 1.25rem;
  top: 2.75rem;
  bottom: -1rem;
  width: 1px;
  background: rgba(15, 98, 254, 0.2);
  z-index: 0;
}

.step-content {
  padding-bottom: 2.5rem;
  flex: 1;
}

.step-content h3 {
  color: #e8e8f0;
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
}

.step-content p {
  color: #7a7a9a;
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Last step: no connector */
.step:last-child .step-content { padding-bottom: 0; }

/* --- Agent cards --- */
.agent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.agent-card {
  background-color: #1b1b20;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top-width: 3px;
  border-radius: 8px;
  padding: 1.75rem;
}

.agent-card--correctness { border-top-color: #4ae176; }
.agent-card--security    { border-top-color: #ef4444; }
.agent-card--style       { border-top-color: #7c8cf8; }

.agent-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.agent-card--correctness .agent-icon {
  background-color: rgba(74, 225, 118, 0.1);
  color: #4ae176;
}
.agent-card--security .agent-icon {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.agent-card--style .agent-icon {
  background-color: rgba(124, 140, 248, 0.1);
  color: #7c8cf8;
}

.agent-card h3 {
  color: #e4e4f0;
  margin-bottom: 0.5rem;
}

.agent-card p {
  color: #6a6a88;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Comparison table --- */
.diff {
  padding: 5rem 0;
  background-color: #0e0e13;
}

.diff-table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.diff-table-wrapper:focus-visible {
  outline: 2px solid #0F62FE;
  outline-offset: 2px;
}

.diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 560px;
}

.diff-table thead {
  background-color: #1b1b20;
}

.diff-table th {
  padding: 0.875rem 1.125rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5a5a78;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.diff-table th.col-trirev {
  background-color: rgba(15, 98, 254, 0.15);
  color: #7ca8f8;
  border-bottom-color: rgba(15, 98, 254, 0.3);
}

.diff-table th:first-child { width: 38%; }

.diff-table td {
  padding: 0.875rem 1.125rem;
  color: #7a7a98;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.diff-table td.col-trirev {
  background-color: rgba(15, 98, 254, 0.06);
}

.diff-table tr:last-child td { border-bottom: none; }

.diff-table tbody tr { background-color: #131318; }
.diff-table tbody tr:hover { background-color: #161620; }

.diff-table td:first-child {
  color: #c0c0d4;
  font-weight: 500;
}

.cell-yes {
  color: #4ae176 !important;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.check-icon {
  flex-shrink: 0;
  color: #4ae176;
}

.cell-no { color: #3a3a52 !important; }

.cell-partial { color: #f59e0b !important; }

/* --- Pricing --- */
.pricing {
  padding: 5rem 0;
  background-color: #131318;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 2rem;
}

.plan {
  background-color: #1b1b20;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
  position: relative;
}

.plan--featured {
  border-color: #0F62FE;
  border-left-width: 4px;
  background-color: #0d0d1c;
  padding-left: 1.5rem;
}

.plan-featured-badge {
  position: absolute;
  top: -0.875rem;
  left: 1.5rem;
  background-color: #0F62FE;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.625rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.plan-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.plan-name {
  color: #e2e2ee;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
}

.plan-amount {
  font-size: 2.125rem;
  font-weight: 700;
  color: #f0f0f8;
  letter-spacing: -0.03em;
}

.plan-period {
  font-size: 0.875rem;
  color: #5a5a78;
}

.plan-features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.plan-features li {
  font-size: 0.9rem;
  color: #8080a0;
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.5;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #2e2e46;
}

.plan--featured .plan-features li::before {
  background-color: rgba(15, 98, 254, 0.5);
}

.pricing-note {
  font-size: 0.875rem;
  color: #5a5a78;
  text-align: center;
  max-width: none;
  padding-top: 0.5rem;
}

/* --- Trust section --- */
.trust {
  padding: 5rem 0;
  background-color: #0e0e13;
}

.trust-heading {
  margin-bottom: 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.trust-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 6px;
  background-color: rgba(124, 140, 248, 0.08);
  color: #7c8cf8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.875rem;
  flex-shrink: 0;
}

.trust-item h3 {
  color: #c8c8e0;
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

.trust-item p {
  color: #5a5a78;
  font-size: 0.875rem;
  line-height: 1.65;
}

/* --- Trust section security link --- */
.trust-security-link {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: #5a5a78;
  max-width: none;
}

.trust-security-link a {
  color: #7c8cf8;
  text-decoration: none;
}

.trust-security-link a:hover {
  color: #a8b4f8;
  text-decoration: underline;
}

.trust-security-link a:focus-visible {
  outline: 2px solid #0F62FE;
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Final CTA --- */
.cta-section {
  padding: 5rem 0;
  background-color: #131318;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cta-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.cta-section h2 { margin-bottom: 0; }

.cta-section > .container > p,
.cta-inner > p {
  color: #6a6a88;
  font-size: 1.0625rem;
  max-width: 46ch;
  margin: 0 auto;
}

.cta-sub {
  font-size: 0.8125rem !important;
  color: #4a4a62 !important;
  margin: -0.25rem 0 0 !important;
}

/* --- Footer --- */
.site-footer {
  background-color: #0a0a0f;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.75rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-weight: 700;
  color: #d0d0e0;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.footer-tagline {
  font-size: 0.8125rem;
  color: #3a3a52;
}

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

.footer-nav a {
  color: #4a4a68;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}
.footer-nav a:hover { color: #8080a0; }
.footer-nav a:focus-visible {
  outline: 2px solid #0F62FE;
  outline-offset: 3px;
  border-radius: 3px;
}

/* ============================================================
   Focus styles — keyboard navigation
   ============================================================ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #0F62FE;
  outline-offset: 3px;
}

/* ============================================================
   Responsive — 640px (small tablet / large mobile)
   ============================================================ */
@media (min-width: 640px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .pricing-grid .plan:last-child {
    grid-column: span 2;
    max-width: calc(50% - 0.625rem);
  }
}

/* ============================================================
   Responsive — 768px (tablet)
   ============================================================ */
@media (min-width: 768px) {
  .hero {
    padding: 7rem 0 6rem;
  }

  .hero h1 br {
    display: block;
  }

  .agent-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .step {
    gap: 2rem;
  }

  .step-connector {
    left: 1.25rem;
  }

  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pricing-grid .plan:last-child {
    grid-column: auto;
    max-width: none;
  }
}

/* ============================================================
   Responsive — 1024px (desktop)
   ============================================================ */
@media (min-width: 1024px) {
  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   Responsive — 1280px (wide desktop)
   ============================================================ */
@media (min-width: 1280px) {
  .hero {
    padding: 8rem 0 7.5rem;
  }

  .container {
    padding: 0 2rem;
  }

  .hero-sub {
    max-width: 58ch;
  }

  .trust-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ============================================================
   High contrast support
   ============================================================ */
@media (prefers-contrast: high) {
  body {
    background-color: #000;
    color: #fff;
  }

  .site-header,
  .site-footer,
  .feature-preview,
  .diff,
  .trust {
    background-color: #000;
  }

  .agent-card,
  .plan,
  .diff-table tbody tr {
    background-color: #000;
    border-color: #fff;
  }

  .btn-primary,
  .btn-plan--featured {
    background-color: #00f;
  }
}
