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

:root {
  --bg: #0d0d1a;
  --bg-surface: #13132a;
  --bg-card: #1a1a35;
  --fg: #f0f0f8;
  --fg-muted: #8888aa;
  --accent: #4361ee;
  --accent-dim: rgba(67, 97, 238, 0.15);
  --green: #22c55e;
  --amber: #f59e0b;
  --border: rgba(255,255,255,0.07);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

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

/* === NAV === */
.nav {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.nav-tagline {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-weight: 400;
}

/* === HERO === */
.hero {
  padding: 6rem 2rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 480px;
}

/* Agent card */
.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  font-size: 0.82rem;
}
.agent-header {
  background: var(--bg-surface);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
}
.agent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.agent-status {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--green);
}
.agent-log {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.log-entry {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.log-entry.received span:last-child::before { content: '← '; color: var(--fg-muted); }
.log-entry.sent span:last-child::before { content: '→ '; color: var(--accent); }
.log-time {
  color: var(--fg-muted);
  min-width: 60px;
  font-size: 0.75rem;
}
.log-entry span:last-child { color: var(--fg); }

/* === STATS === */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 2.5rem 2rem;
}
.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
}
.stat-item {
  flex: 1;
  text-align: center;
  padding: 0 2rem;
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.4;
}
.stat-divider {
  width: 1px;
  height: 60px;
  background: var(--border);
  flex-shrink: 0;
}

/* === SECTION TITLE === */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 3rem;
  text-align: center;
}

/* === FEATURES === */
.features {
  padding: 5rem 2rem;
}
.features-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  transition: border-color 0.2s;
}
.feature-card:hover {
  border-color: rgba(67, 97, 238, 0.4);
}
.feature-icon {
  color: var(--accent);
  margin-bottom: 1rem;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.6rem;
}
.feature-card p {
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* === HOW IT WORKS === */
.howitworks {
  padding: 5rem 2rem;
  background: var(--bg-surface);
}
.howitworks-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--accent-dim);
  line-height: 1;
  min-width: 80px;
}
.step-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.step-content p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  max-width: 580px;
  line-height: 1.6;
}

/* === MAINTENANCE === */
.maintenance-section {
  padding: 5rem 2rem;
}
.maintenance-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.maintenance-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.maintenance-text p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.7;
}
.maintenance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.m-status {
  padding: 0.75rem 1rem;
  border-radius: 8px;
}
.m-status.open { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239,68,68,0.3); }
.m-status.triage { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); }
.m-status.dispatch { background: rgba(67,97,238,0.1); border: 1px solid rgba(67,97,238,0.3); }
.m-status.resolved { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); }
.m-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--fg);
}
.m-time {
  display: block;
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-top: 0.15rem;
}
.m-arrow {
  text-align: center;
  color: var(--fg-muted);
  font-size: 1.2rem;
  padding: 0.4rem 0;
}

/* === CLOSING === */
.closing {
  padding: 6rem 2rem;
  background: linear-gradient(to bottom, var(--bg), var(--bg-surface));
}
.closing-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.closing h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.closing p {
  font-size: 1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

/* === FOOTER === */
.footer {
  padding: 2rem 2rem;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--fg);
}
.footer-desc {
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-top: 0.25rem;
  display: block;
}
.footer-links {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .maintenance-inner { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .stats-inner { flex-direction: column; gap: 2rem; }
  .stat-divider { width: 60px; height: 1px; }
  .stats-inner { flex-direction: column; align-items: stretch; }
  .stat-item { text-align: left; padding: 0; }
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
  .step-num { font-size: 2rem; min-width: 50px; }
  .hero { padding: 4rem 1.5rem 3rem; }
  .features, .howitworks, .maintenance-section, .closing { padding: 3rem 1.5rem; }
  .footer-inner { flex-direction: column; gap: 0.75rem; }
}