/* ===== BASE RESET & TOKENS ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0b0f1e;
  --bg-2: #111827;
  --bg-3: #0f172a;
  --fg: #f1f5f9;
  --fg-muted: #94a3b8;
  --cyan: #00e5ff;
  --cyan-dim: rgba(0, 229, 255, 0.12);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.12);
  --crit: #ef4444;
  --crit-dim: rgba(239, 68, 68, 0.15);
  --high: #f97316;
  --high-dim: rgba(249, 115, 22, 0.12);
  --med: #eab308;
  --med-dim: rgba(234, 179, 8, 0.12);
  --low: #64748b;
  --border: rgba(148, 163, 184, 0.08);
  --border-2: rgba(148, 163, 184, 0.15);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

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

/* ===== LAYOUT ===== */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1rem;
}

.section-headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg);
  margin-bottom: 1.25rem;
}

/* ===== HERO ===== */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 420px;
}

/* ===== QUEUE VIZ ===== */
.queue-viz {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 16px;
  padding: 1.25rem;
  position: relative;
}

.qv-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.qv-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
}

.qv-dot.live {
  box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(0, 229, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}

.qv-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  flex: 1;
}

.qv-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  background: var(--cyan-dim);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.qv-lanes {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.qv-lane { border-radius: 8px; padding: 0.6rem; }
.qv-lane.critical { background: var(--crit-dim); border-left: 3px solid var(--crit); }
.qv-lane.high { background: var(--high-dim); border-left: 3px solid var(--high); }
.qv-lane.medium { background: var(--med-dim); border-left: 3px solid var(--med); }
.qv-lane.low { background: rgba(100, 116, 139, 0.08); border-left: 3px solid var(--low); }

.lane-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin-bottom: 0.4rem;
}

.lane-items { display: flex; flex-direction: column; gap: 0.35rem; }

.ticket-card {
  background: var(--bg);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  transition: transform 0.15s;
}

.ticket-card:hover { transform: translateX(2px); }

.tc-priority {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tc-priority.critical { background: var(--crit); }
.tc-priority.high { background: var(--high); }
.tc-priority.medium { background: var(--med); }
.tc-priority.low { background: var(--low); }

.tc-body { flex: 1; min-width: 0; }

.tc-title {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-meta {
  font-size: 0.65rem;
  color: var(--fg-muted);
  margin-top: 0.1rem;
}

.tc-badge {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--cyan);
  background: var(--cyan-dim);
  border-radius: 100px;
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
}

.tc-badge.auto { color: var(--amber); background: var(--amber-dim); }

.qv-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.qv-stat { text-align: center; }

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
}

.stat-label {
  display: block;
  font-size: 0.6rem;
  color: var(--fg-muted);
  margin-top: 0.1rem;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

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

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: center;
}

.step {
  flex: 0 0 260px;
  text-align: center;
  padding: 0 1rem;
}

.step-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--border-2);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.step-icon { margin-bottom: 1rem; }

.step-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

.step-connector {
  padding-top: 2.5rem;
  flex-shrink: 0;
}

/* ===== TRIAGE ENGINE ===== */
.triage-engine {
  padding: 5rem 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.te-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.te-analysis-card {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 1.25rem;
}

.tac-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--fg-muted);
  font-style: italic;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.tac-scores { display: flex; flex-direction: column; gap: 0.75rem; }

.score-row {
  display: grid;
  grid-template-columns: 64px 1fr 160px;
  align-items: center;
  gap: 0.75rem;
}

.score-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fg-muted);
}

.score-bar {
  height: 4px;
  background: var(--bg);
  border-radius: 100px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  background: var(--cyan);
  border-radius: 100px;
}

.score-fill.negative { background: var(--crit); }
.score-fill.critical { background: var(--crit); }
.score-fill.neutral { background: var(--fg-muted); }
.score-fill.cyan { background: var(--cyan); }

.score-val {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fg);
}

.score-val.negative { color: var(--crit); }
.score-val.critical { color: var(--crit); font-weight: 600; }
.score-val.cyan { color: var(--cyan); font-weight: 600; }

.tac-decision { margin-top: 1rem; }

.decision-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
}

.decision-badge.critical {
  background: var(--crit-dim);
  color: var(--crit);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.te-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.te-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.feature-dot.cyan { background: var(--cyan); }
.feature-dot.amber { background: var(--amber); }

/* ===== SMART ROUTING ===== */
.smart-routing {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.sr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.sr-desc {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.sr-metrics { display: flex; gap: 2rem; }

.sr-metric {}

.sr-metric-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}

.sr-metric-label {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 0.25rem;
  max-width: 100px;
}

/* Routing flow diagram */
.routing-flow { position: relative; }

.rf-source { margin-bottom: 1.5rem; }

.rf-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 100px;
}

.rf-pill.incoming {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.rf-lines {
  position: absolute;
  top: 3.5rem;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
}

.rf-svg { width: 100%; height: 100%; }

.rf-nodes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.rf-node {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 0.85rem;
}

.rf-node.tier1 { border-top: 2px solid var(--cyan); }
.rf-node.tier2 { border-top: 2px solid var(--amber); }
.rf-node.eng { border-top: 2px solid var(--crit); }

.rn-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.15rem;
}

.rn-count {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
}

.rn-sub {
  font-size: 0.65rem;
  color: var(--fg-muted);
  margin-top: 0.15rem;
}

.rf-escalate { margin-top: 1rem; }

.rf-escalate-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
}

/* ===== ALWAYS ON ===== */
.always-on {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.ao-inner {}

.ao-headline { margin-bottom: 3rem; }

.ao-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg);
}

.ao-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.ao-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.ao-card:hover {
  border-color: rgba(0, 229, 255, 0.2);
  transform: translateY(-2px);
}

.ao-icon { margin-bottom: 1rem; }

.ao-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.ao-card-desc {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ===== CLOSING ===== */
.closing-section {
  padding: 6rem 0 5rem;
}

.closing-inner {
  max-width: 680px;
}

.closing-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}

.closing-headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 1.25rem;
}

.closing-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.closing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.closing-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  padding: 0.35rem 0.85rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-inner,
  .te-grid,
  .sr-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .steps { flex-direction: column; align-items: center; gap: 2rem; }
  .step-connector { display: none; }

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

@media (max-width: 600px) {
  .hero { padding: 3rem 0 2.5rem; }
  .sr-metrics { flex-direction: column; gap: 1rem; }
  .rf-nodes { grid-template-columns: 1fr; }
  .ao-grid { grid-template-columns: 1fr; }
}
