:root {
  --bg-1:#071b34;
  --bg-2:#0e305e;
  --bg-soft:#eef7ff;
  --card:#ffffff;
  --ink:#0c1b2b;
  --muted:#516173;
  --line:#d9e2ec;
  --primary:#0ea5e9;
  --primary-2:#38bdf8;
  --secondary:#8b5cf6;
  --secondary-2:#a78bfa;
  --success:#22c55e;
  --warning:#f59e0b;
  --danger:#ef4444;
  --shadow:0 16px 38px rgba(7,27,52,.18);
  --radius:20px;
}

* { box-sizing:border-box; }

html { scroll-behavior:smooth; }

body {
  margin:0;
  font-family:Inter,Arial,sans-serif;
  background:linear-gradient(180deg,var(--bg-1),#f4fbff 28%);
  color:var(--ink);
  min-height:100vh;
}

img { max-width:100%; display:block; }

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

.skip-link {
  position:absolute;
  left:-9999px;
  top:0;
  z-index:9999;
  background:#fff;
  color:#000;
  padding:10px 14px;
  border-radius:10px;
}
.skip-link:focus {
  left:12px;
  top:12px;
}

.container {
  width:min(1200px, calc(100% - 32px));
  margin:0 auto;
}

.site-header {
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(217,226,236,.9);
}

.nav-wrap {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
  flex-wrap:wrap;
}

.brand {
  display:inline-flex;
  align-items:center;
  gap:12px;
  font-weight:800;
  color:var(--ink);
  font-size:22px;
}

.brand-mark {
  width:40px;
  height:40px;
}

.nav {
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.nav a {
  color:var(--ink);
  font-weight:600;
}

.inline-form {
  margin:0;
  display:inline-flex;
  align-items:center;
}

.button,
.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 18px;
  border-radius:14px;
  font-weight:700;
  border:0;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow:var(--shadow);
  font:inherit;
}

.button:hover,
.btn:hover {
  transform:translateY(-1px);
}

.button,
.btn-primary {
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:#fff;
}

.button.secondary,
.btn-secondary {
  background:linear-gradient(135deg,var(--secondary),var(--secondary-2));
  color:#fff;
}

.button.small {
  padding:10px 14px;
  border-radius:12px;
}

.button.ghost {
  background:#fff;
  color:var(--ink);
  border:1px solid var(--line);
  box-shadow:none;
}

.hero {
  max-width:1200px;
  margin:24px auto;
  padding:28px;
  border-radius:24px;
  color:#fff;
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:end;
  box-shadow:var(--shadow);
  background:linear-gradient(135deg,#0f172a,#1d4ed8,#0ea5e9);
}

.hero-grid {
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);
  gap:24px;
  align-items:center;
}

.eyebrow {
  display:inline-block;
  margin:0 0 8px;
  text-transform:uppercase;
  letter-spacing:.16em;
  font-size:12px;
  font-weight:700;
  opacity:.88;
}

.hero h1 {
  margin:0 0 12px;
  font-size:clamp(34px, 5vw, 60px);
  line-height:1.05;
}

.lead,
.hero-copy {
  max-width:720px;
  margin:0;
  opacity:.95;
  font-size:18px;
  line-height:1.6;
}

.hero-actions {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:20px;
}

.hero-pills {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
}

.hero-pills span {
  display:inline-flex;
  align-items:center;
  padding:9px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.22);
  color:#fff;
  font-weight:700;
  font-size:13px;
}

.hero-card {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.metric-card,
.stat-card,
.mobile-card,
.map-panel-side,
.incident-item,
.card,
.pricing-card {
  background:var(--card);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow);
}

.metric-card {
  padding:20px;
  color:#fff;
  min-height:130px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
}

.metric-card strong {
  display:block;
  font-size:34px;
  line-height:1;
  margin-bottom:8px;
}

.metric-card span {
  font-weight:700;
  opacity:.95;
}

.bright-a { background:linear-gradient(135deg,#0ea5e9,#38bdf8); }
.bright-b { background:linear-gradient(135deg,#8b5cf6,#a78bfa); }
.bright-c { background:linear-gradient(135deg,#10b981,#34d399); }
.bright-d { background:linear-gradient(135deg,#f59e0b,#fbbf24); }

.section {
  margin:42px auto;
}

.section-head {
  margin-bottom:18px;
}

.section-head h2 {
  margin:0 0 8px;
  font-size:38px;
}

.section-head p {
  margin:0;
  color:var(--muted);
  font-size:17px;
}

.card-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.card,
.pricing-card {
  padding:22px;
}

.card h3,
.pricing-card h3 {
  margin:0 0 10px;
  font-size:24px;
}

.card p,
.pricing-card p {
  margin:0;
  color:var(--muted);
  line-height:1.65;
}

.price {
  font-size:32px;
  font-weight:800;
  color:var(--ink) !important;
  margin:8px 0 10px !important;
}

.price small {
  font-size:15px;
  color:var(--muted);
  font-weight:600;
  margin-left:4px;
}

.hero-crisis { background:linear-gradient(135deg,#0f172a,#1d4ed8,#0ea5e9); }
.hero-ops { background:linear-gradient(135deg,#1e293b,#7c3aed,#22c55e); }
.hero-public { background:linear-gradient(135deg,#0f766e,#06b6d4,#38bdf8); }
.hero-mobile { background:linear-gradient(135deg,#111827,#2563eb,#f59e0b); }

.stats-grid {
  max-width:1200px;
  margin:0 auto 24px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.stat-card { padding:20px; }

.stat-label {
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:10px;
}

.stat-card strong {
  font-size:34px;
  display:block;
}

.map-shell {
  max-width:1200px;
  margin:0 auto 28px;
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(320px,1fr);
  gap:16px;
}

.map-panel-main { min-height:620px; }

.leaflet-panel {
  height:620px;
  border-radius:24px;
  overflow:hidden;
  box-shadow:var(--shadow);
  border:1px solid rgba(255,255,255,.2);
  background:#dbeafe;
}

.map-panel-side { padding:20px; }

.legend-stack {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:14px 0 18px;
}

.legend-chip {
  padding:8px 12px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  color:#fff;
}

.legend-open { background:var(--success); }
.legend-warning { background:var(--warning); }
.legend-full { background:var(--danger); }

.incident-list {
  display:grid;
  gap:12px;
}

.incident-item { padding:14px; }

.incident-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.meter {
  height:12px;
  background:#edf2f7;
  border-radius:999px;
  overflow:hidden;
  margin-bottom:10px;
}

.meter span {
  display:block;
  height:100%;
  background:linear-gradient(90deg,#0ea5e9,#22c55e,#f59e0b,#ef4444);
  border-radius:999px;
}

.stack-form {
  display:grid;
  gap:14px;
}

.stack-form label {
  display:grid;
  gap:8px;
  font-weight:600;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
  padding:12px 14px;
  border-radius:14px;
  border:1px solid #cbd5e1;
  font:inherit;
  width:100%;
}

.helper-text {
  color:var(--muted);
  font-size:14px;
  min-height:22px;
}

.mobile-grid {
  max-width:1200px;
  margin:0 auto 28px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.mobile-card { padding:20px; }

.offline-queue {
  display:grid;
  gap:10px;
}

.offline-item {
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background:#f8fbff;
}

.status-pill {
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.status-online { background:#dcfce7; color:#166534; }
.status-offline { background:#fee2e2; color:#991b1b; }

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline:3px solid rgba(14,165,233,.35);
  outline-offset:2px;
}

@media (max-width: 980px) {
  .nav-wrap { align-items:flex-start; }
  .hero-grid,
  .map-shell,
  .mobile-grid,
  .stats-grid,
  .card-grid {
    grid-template-columns:1fr;
  }
  .hero {
    align-items:start;
  }
  .leaflet-panel,
  .map-panel-main {
    min-height:420px;
    height:420px;
  }
  .hero-card {
    grid-template-columns:1fr;
  }
}
