/* ═══════════════════════════════════════════
   INVOICE SENTINEL — DESIGN SYSTEM
   Aesthetic: High-Contrast Technical
   ═══════════════════════════════════════════ */

:root {
  --bg: #0B0E14;
  --surface: #111620;
  --surface-2: #1A1F2E;
  --primary: #00F3FF;
  --primary-25: rgba(0,243,255,.15);
  --primary-glow: rgba(0,243,255,.25);
  --warn: #F59E0B;
  --warn-25: rgba(245,158,11,.15);
  --recovery: #A78BFA;
  --recovery-25: rgba(167,139,250,.15);
  --green: #22C55E;
  --green-25: rgba(34,197,94,.15);
  --text: #EAE9F0;
  --muted: #7880A0;
  --muted2: #4A5068;
  --border: rgba(255,255,255,.06);
  --border-2: rgba(255,255,255,.1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'DM Mono', 'SF Mono', monospace;
  --head: 'Syne', 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ═══ GRID BACKGROUND ═══ */
.grid-bg {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -1;
}

/* ═══ LAYOUT ═══ */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

.mono {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 500;
}

.accent { color: var(--primary); }

/* ═══ NAV ═══ */
#nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  background: rgba(11,14,20,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-text {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
}

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 13px; color: var(--muted); transition: color .2s;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

/* ═══ BUTTONS ═══ */
.btn-primary {
  background: var(--primary);
  color: #000;
  border: none;
  padding: 10px 20px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
  transition: all .2s;
}
.btn-primary:hover {
  box-shadow: 0 0 24px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-lg { padding: 14px 32px; font-size: 12px; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--muted);
  padding: 10px 20px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
  transition: all .2s;
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ═══ HERO ═══ */
#hero {
  text-align: center;
  padding: 160px 24px 80px;
}

.hero-badge {
  color: var(--primary);
  margin-bottom: 24px;
  opacity: .8;
}

.hero-title {
  font-family: var(--head);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex; gap: 16px; justify-content: center;
  margin-bottom: 64px;
}

.hero-stats {
  display: flex; justify-content: center; align-items: center; gap: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.stat-sep {
  width: 1px; height: 32px;
  background: var(--border-2);
}

/* ═══ SECTIONS ═══ */
.section-head {
  text-align: center;
  margin-bottom: 48px;
  padding-top: 100px;
}

.section-head h2 {
  font-family: var(--head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.02em;
  margin-top: 12px;
}

.section-sub {
  color: var(--muted);
  font-size: 15px;
  max-width: 500px;
  margin: 12px auto 0;
}

/* ═══ SENTINEL CANVAS ═══ */
.canvas-wrap {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 2px;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}

.canvas-grid {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.03) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

.scan-line {
  position: absolute;
  left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: .15;
  animation: scanDown 5s linear infinite;
}

@keyframes scanDown {
  0% { top: 0; }
  100% { top: 100%; }
}

.flow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  position: relative;
  z-index: 2;
}

/* ═══ SENTINEL NODES ═══ */
.s-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  flex-shrink: 0;
}

.s-ring {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2px solid var(--muted2);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  position: relative;
  transition: all .3s ease;
}

.s-node.active .s-ring {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-25), 0 0 40px rgba(0,243,255,.08);
}

.s-node.warn .s-ring {
  border-color: var(--warn);
  box-shadow: 0 0 20px var(--warn-25);
}

.s-node.recovery .s-ring {
  border-color: var(--recovery);
  box-shadow: 0 0 20px var(--recovery-25);
}

.s-node.paid-node .s-ring {
  border-color: var(--green);
  box-shadow: 0 0 20px var(--green-25);
}

.s-node:hover .s-ring {
  transform: scale(1.1);
  box-shadow: 0 0 30px var(--primary-glow);
  border-color: var(--primary);
}


.s-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text);
  margin-top: 4px;
}

.s-count {
  font-size: 10px;
  color: var(--muted);
  font-family: var(--mono);
}

.s-pulse {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: .4; transform: translateX(-50%) scale(1.5); }
}

/* ═══ CONNECTORS ═══ */
.connector {
  display: flex;
  align-items: center;
  position: relative;
  width: 80px;
  flex-shrink: 0;
}

.conn-line {
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--muted2), var(--muted2));
  position: relative;
}

.conn-line::after {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 30%; height: 4px;
  background: var(--primary);
  border-radius: 2px;
  animation: dataPulse 3s ease-in-out infinite;
  opacity: .6;
}

.conn-line.paid::after { background: var(--green); }

@keyframes dataPulse {
  0% { left: 0; opacity: 0; }
  20% { opacity: .8; }
  80% { opacity: .8; }
  100% { left: 70%; opacity: 0; }
}

.conn-arrow {
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--muted2);
  flex-shrink: 0;
}
.conn-arrow.paid { border-left-color: var(--green); }

.conn-pill {
  position: absolute;
  top: -18px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
  background: var(--surface);
  padding: 2px 6px;
  border: 1px solid var(--border);
}

.paid-pill { color: var(--green); border-color: var(--green-25); }

/* ═══ FEATURES ═══ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  transition: all .3s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity .3s;
}

.feature-card:hover {
  border-color: var(--primary-25);
  transform: translateY(-4px);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-25);
  border: 1px solid rgba(0,243,255,.1);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: -.01em;
  margin-bottom: 12px;
  color: var(--text);
}

.feature-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.feature-tag {
  color: var(--primary);
  font-size: 10px;
  opacity: .7;
}

/* ═══ COMPARISON TABLE ═══ */
.compare-table {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.compare-row:last-child { border-bottom: none; }

.compare-row.header {
  background: var(--surface-2);
}

.compare-cell {
  padding: 16px 24px;
  font-size: 13px;
  color: var(--text);
  border-right: 1px solid var(--border);
}

.compare-cell:last-child { border-right: none; }

.compare-cell.label {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}

.compare-cell.muted {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}

.compare-cell.accent-head {
  color: var(--primary);
  font-weight: 600;
  font-size: 12px;
}

.x-mark {
  color: #EF4444;
  font-weight: 700;
  margin-right: 8px;
}

.check-mark {
  color: var(--green);
  font-weight: 700;
  margin-right: 8px;
}

/* ═══ PRICING ═══ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  position: relative;
  transition: all .3s;
}

.price-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
}

.price-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 40px rgba(0,243,255,.08);
}

.price-badge {
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #000;
  padding: 4px 16px;
  font-size: 9px;
  font-weight: 700;
}

.price-tier {
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 12px;
}

.price-amount {
  font-family: var(--head);
  font-size: 42px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.price-period {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  font-family: var(--font);
}

.price-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.price-features {
  list-style: none;
  margin-bottom: 24px;
}

.price-features li {
  font-size: 13px;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 20px;
}

.price-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 12px;
}

/* ═══ FINAL CTA ═══ */
.final-cta {
  text-align: center;
  padding: 60px;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.final-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* ═══ FOOTER ═══ */
#footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

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

/* ═══ RESPONSIVE ═══ */
/* ═══ RESPONSIVE OVERHAUL ═══ */
@media (max-width: 992px) {
  .hero-title { font-size: clamp(2.4rem, 8vw, 3.8rem); }
  .canvas-wrap { padding: 40px 20px; }
  .flow-row { flex-direction: column; gap: 32px; }
  .connector { transform: rotate(90deg); width: 60px; height: 2px; margin: 10px 0; }
  .conn-pill { transform: translateX(-50%) rotate(-90deg); top: 0; left: -30px; }
  .s-ring { width: 70px; height: 70px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  
  #hero { padding: 120px 20px 60px; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 300px; margin-left: auto; margin-right: auto; }
  .btn-lg { width: 100%; }

  .hero-stats { flex-direction: column; gap: 24px; padding: 32px 0; }
  .stat-sep { width: 40px; height: 1px; background: var(--border-2); }

  .features-grid,
  .pricing-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Mobile-Friendly Comparison Table */
  .compare-table { border: none; background: transparent; }
  .compare-row.header { display: none; }
  .compare-row { 
    grid-template-columns: 1fr; 
    background: var(--surface); 
    border: 1px solid var(--border); 
    margin-bottom: 16px; 
    padding: 16px;
    border-radius: 4px;
  }
  .compare-cell { border: none; padding: 8px 0; }
  .compare-cell.label { 
    color: var(--primary); 
    font-size: 10px; 
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    padding-bottom: 4px;
  }
  .compare-cell::before {
    content: attr(data-label);
    display: block;
    font-size: 9px;
    color: var(--muted);
    margin-bottom: 4px;
    text-transform: uppercase;
  }

  .footer-inner { flex-direction: column; gap: 20px; text-align: center; }
  
  .onboarding-container { margin: 60px 10px; padding: 24px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.2rem; }
  .hero-sub { font-size: 15px; }
  .brand-text { font-size: 12px; }
}
