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

:root {
  --bg: #0a0f1e;
  --bg-card: #0f1629;
  --bg-card-hover: #141f38;
  --fg: #f0f4ff;
  --fg-muted: #8896b3;
  --border: rgba(255,255,255,0.07);
  --emerald: #10b981;
  --emerald-dim: rgba(16,185,129,0.12);
  --amber: #f59e0b;
  --amber-dim: rgba(245,158,11,0.12);
  --rose: #ef4444;
  --rose-dim: rgba(239,68,68,0.12);
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

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

/* === BACKGROUND TEXTURE === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* === NAV === */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 64px;
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--emerald);
  background: var(--emerald-dim);
  border: 1px solid rgba(16,185,129,0.3);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 1px;
}

.nav-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-muted);
  font-family: var(--font-body);
  letter-spacing: 0.3px;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

/* === HERO === */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 80px 64px 96px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--emerald-dim);
  border: 1px solid rgba(16,185,129,0.25);
  color: var(--emerald);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
  font-family: var(--font-body);
}

.badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse-green 1.5s infinite;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 48px;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 0;
}

.proof-stat {
  display: flex;
  flex-direction: column;
  padding: 0 28px;
}

.proof-stat:first-child { padding-left: 0; }

.proof-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--emerald);
  line-height: 1;
  margin-bottom: 4px;
}

.proof-label {
  font-size: 11px;
  color: var(--fg-muted);
  line-height: 1.4;
  max-width: 120px;
  font-family: var(--font-body);
}

.proof-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* === DASHBOARD CARD === */
.hero-dashboard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.dash-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.3px;
}

.dash-live {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--emerald);
  font-weight: 500;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse-green 1.5s infinite;
}

.dash-table { padding: 8px 0; }

.dash-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 0.8fr 0.8fr;
  padding: 10px 24px;
  font-size: 12px;
  align-items: center;
  transition: background 0.15s;
}

.dash-row:hover { background: var(--bg-card-hover); }

.dash-row-head {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.row-name {
  font-weight: 500;
  color: var(--fg);
}

.status-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-body);
  width: fit-content;
}

.status-ok { background: var(--emerald-dim); color: var(--emerald); border: 1px solid rgba(16,185,129,0.2); }
.status-warn { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,0.2); }
.status-alert { background: var(--rose-dim); color: var(--rose); border: 1px solid rgba(239,68,68,0.2); }

.score { font-family: var(--font-display); font-weight: 700; color: var(--fg); }

.alerts-count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
}

.count-clear { color: var(--emerald); }
.count-warn { color: var(--amber); }
.count-alert { color: var(--rose); }

.dash-legend {
  display: flex;
  gap: 20px;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--fg-muted);
  font-family: var(--font-body);
}

.leg-ok, .leg-warn, .leg-alert {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
  margin-right: 5px;
}
.leg-ok { background: var(--emerald); }
.leg-warn { background: var(--amber); }
.leg-alert { background: var(--rose); }

/* === SECTION SHARED === */
section { position: relative; z-index: 1; }

.section-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.8px;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 560px;
}

/* === MONITORING === */
.monitoring {
  padding: 96px 64px;
  border-top: 1px solid var(--border);
}

.mon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.mon-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.2s, background 0.2s;
}

.mon-card:hover {
  border-color: rgba(16,185,129,0.2);
  background: var(--bg-card-hover);
}

.mon-icon {
  margin-bottom: 20px;
}

.mon-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.mon-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.65;
}

.mon-ticker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex-wrap: wrap;
}

.ticker-label {
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker-items {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ticker-tag {
  font-size: 11px;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.2px;
}

.tag-ok { background: var(--emerald-dim); color: var(--emerald); border: 1px solid rgba(16,185,129,0.15); }
.tag-warn { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,0.15); }
.tag-alert { background: var(--rose-dim); color: var(--rose); border: 1px solid rgba(239,68,68,0.15); }

/* === ALERTS === */
.alerts-section {
  padding: 96px 64px;
  border-top: 1px solid var(--border);
}

.alerts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.alert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.alert-warn { border-left: 3px solid var(--amber); }
.alert-alert { border-left: 3px solid var(--rose); }
.alert-clear { border-left: 3px solid var(--emerald); }

.alert-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-display);
}

.badge-warn { background: var(--amber-dim); color: var(--amber); }
.badge-alert { background: var(--rose-dim); color: var(--rose); }
.badge-clear { background: var(--emerald-dim); color: var(--emerald); }

.alert-time {
  font-size: 11px;
  color: var(--fg-muted);
  font-family: var(--font-body);
}

.alert-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.alert-detail {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
  flex: 1;
}

.alert-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.action-btn {
  font-size: 11px;
  font-family: var(--font-body);
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.action-btn:hover { border-color: var(--emerald); color: var(--emerald); }

.action-primary {
  background: var(--emerald-dim);
  border-color: rgba(16,185,129,0.3);
  color: var(--emerald);
}

.action-alert {
  background: var(--rose-dim);
  border-color: rgba(239,68,68,0.3);
  color: var(--rose);
}

/* === PROTOCOL === */
.protocol {
  padding: 96px 64px;
  border-top: 1px solid var(--border);
}

.proto-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 64px;
}

.proto-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  color: rgba(16,185,129,0.15);
  line-height: 1;
  letter-spacing: -2px;
}

.step-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-body p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.7;
}

.proto-connector {
  flex: 0 0 60px;
  height: 2px;
  background: linear-gradient(90deg, rgba(16,185,129,0.3), rgba(16,185,129,0.05));
  margin: 24px 24px 0;
  align-self: flex-start;
  margin-top: 24px;
}

/* === CLOSING === */
.closing {
  padding: 120px 64px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.closing-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.8px;
  max-width: 640px;
  margin: 0 auto 24px;
}

.closing-sub {
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.closing-note {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-dim);
  border: 1px solid rgba(16,185,129,0.2);
  padding: 10px 20px;
  border-radius: 100px;
  letter-spacing: 0.3px;
}

/* === FOOTER === */
.footer {
  padding: 48px 64px;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--emerald);
  background: var(--emerald-dim);
  border: 1px solid rgba(16,185,129,0.3);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
}

.footer-tagline {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.footer-legal {
  font-size: 11px;
  color: rgba(136,150,179,0.5);
  font-family: var(--font-body);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding: 48px 32px; }
  .hero-dashboard { order: -1; }
  .mon-grid { grid-template-columns: 1fr; }
  .alerts-grid { grid-template-columns: 1fr; }
  .proto-steps { flex-direction: column; gap: 32px; }
  .proto-connector { display: none; }
  .nav { padding: 20px 32px; }
  .monitoring, .alerts-section, .protocol { padding: 64px 32px; }
  .closing { padding: 80px 32px; }
  .footer { padding: 40px 32px; }
  .hero-proof { flex-wrap: wrap; gap: 16px; }
  .proof-divider { display: none; }
  .dash-row { grid-template-columns: 2fr 1.5fr 1fr 0.8fr 0.8fr; padding: 8px 16px; font-size: 11px; }
}

@media (max-width: 600px) {
  .dash-row { grid-template-columns: 1.5fr 1fr 1fr; }
  .dash-row-head span:nth-child(2),
  .dash-row-head span:nth-child(4),
  .dash-row span:nth-child(2),
  .dash-row span:nth-child(4) { display: none; }
}
