/* CommuGuard — site stylesheet */
:root {
  --bg: #0a0f1a;
  --bg-elev: #0e1626;
  --panel: #131b2e;
  --panel-2: #15203a;
  --border: #1f2d4d;
  --border-light: #2a3a5e;
  --text: #e6edf7;
  --text-2: #c1cce0;
  --muted: #9aa7c2;
  --muted-2: #6b7a99;
  --brand: #1fb47a;
  --brand-2: #38d39f;
  --brand-glow: rgba(31, 180, 122, 0.25);
  --primary: #3b82f6;
  --primary-2: #60a5fa;
  --danger: #ef4444;
  --warn: #f59e0b;
  --info: #06b6d4;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --link: #38d39f;
  --max: 1180px;
  --max-narrow: 880px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 0 1px rgba(31,180,122,0.18), 0 12px 40px rgba(31,180,122,0.15);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 50% -100px, rgba(31,180,122,0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(59,130,246,0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ── HEADER ──────────────────────────────────────────────────────────── */
header.site-header {
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 1.1rem;
}
.brand:hover { text-decoration: none; }

.brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #06231a;
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 0 0 1px rgba(31,180,122,0.2), 0 4px 12px var(--brand-glow);
}

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

main { max-width: 100%; }

/* ── HERO ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-home {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px 100px;
  align-items: center;
}

.hero-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px 48px;
  text-align: center;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-pattern svg { width: 100%; height: 100%; display: block; }

.hero-content {
  position: relative;
  z-index: 1;
}
.hero-content-page { max-width: 720px; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(31, 180, 122, 0.1);
  border: 1px solid rgba(31, 180, 122, 0.3);
  color: var(--brand-2);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 22px;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero .accent {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 60%, var(--primary-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-2);
  max-width: 540px;
  margin: 0 0 28px;
  line-height: 1.6;
}
.hero-content-page .hero-sub { margin-left: auto; margin-right: auto; }

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats strong {
  font-size: 1.5rem;
  color: var(--text);
  font-weight: 800;
}
.hero-stats span {
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-illustration {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-illustration svg {
  width: 100%;
  max-width: 440px;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5));
}

/* ── BUTTONS ─────────────────────────────────────────────────────────── */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #06231a;
  font-weight: 700;
  padding: 13px 22px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
  box-shadow: 0 4px 14px var(--brand-glow);
}
button:hover, .btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 8px 22px var(--brand-glow);
}

.btn-primary { /* default styling above */ }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text);
  box-shadow: none;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--muted);
  box-shadow: none;
}

.btn.secondary { /* legacy */
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

/* ── SECTIONS ────────────────────────────────────────────────────────── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 12px;
}

.section-header h2,
.sa-text h2,
.cta-card h2,
.form-text h2,
.hours-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
  margin: 0 0 14px;
  letter-spacing: -0.015em;
  font-weight: 800;
}
.sa-text .accent,
.section-header .accent,
.cta-card .accent {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 60%, var(--primary-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-header p {
  color: var(--text-2);
  font-size: 1.05rem;
  margin: 0;
}

/* ── FEATURE GRID ────────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 100%), var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-soft);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: rgba(31, 180, 122, 0.12);
  color: var(--brand-2);
}
.feature-icon svg { width: 24px; height: 24px; }

.icon-primary { background: rgba(59, 130, 246, 0.14); color: var(--primary-2); }
.icon-danger  { background: rgba(239, 68, 68, 0.14);  color: #f87171; }
.icon-sos     { background: rgba(239, 68, 68, 0.14);  color: #f87171; }
.icon-warn    { background: rgba(245, 158, 11, 0.14); color: #fbbf24; }
.icon-success { background: rgba(31, 180, 122, 0.14); color: var(--brand-2); }
.icon-accent  { background: rgba(56, 211, 159, 0.14); color: var(--brand-2); }
.icon-info    { background: rgba(6, 182, 212, 0.14);  color: #22d3ee; }
.icon-purple  { background: rgba(139, 92, 246, 0.14); color: #a78bfa; }
.icon-patrol  { background: rgba(16, 185, 129, 0.14); color: #34d399; }

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* legacy .card support for older pages */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card a { display: inline-block; margin-top: 10px; font-size: 0.92rem; }

/* ── HOW IT WORKS ────────────────────────────────────────────────────── */
.section-how {
  background:
    linear-gradient(180deg, transparent 0%, rgba(31,180,122,0.04) 50%, transparent 100%);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px 24px;
  text-align: left;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #06231a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.step h3 { margin: 0 0 10px; font-size: 1.15rem; }
.step p { margin: 0; color: var(--text-2); font-size: 0.95rem; }

/* ── BUILT FOR SA ────────────────────────────────────────────────────── */
.section-sa { padding-top: 60px; padding-bottom: 60px; }

.sa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.sa-text .eyebrow { margin-bottom: 14px; }
.sa-text > p {
  color: var(--text-2);
  font-size: 1.02rem;
  margin: 0 0 24px;
}

.sa-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.sa-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text-2);
  font-size: 0.97rem;
  line-height: 1.55;
}
.sa-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(31,180,122,0.15);
  border: 1.5px solid var(--brand);
}
.sa-list li::after {
  content: '';
  position: absolute;
  left: 5px; top: 12px;
  width: 8px; height: 4px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}
.sa-list strong { color: var(--text); }

.sa-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}
.sa-illustration svg {
  width: 100%;
  max-width: 420px;
  height: auto;
}

/* ── ROLES ───────────────────────────────────────────────────────────── */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.role {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  text-align: center;
  transition: transform 0.15s, border-color 0.15s;
}
.role:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
}
.role h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--text);
}
.role p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* ── CTA ────────────────────────────────────────────────────────────── */
.cta-card {
  background:
    linear-gradient(135deg, rgba(31,180,122,0.12) 0%, rgba(59,130,246,0.08) 100%),
    var(--panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 60px 32px;
  text-align: center;
  box-shadow: var(--shadow-glow);
}
.cta-card p {
  color: var(--text-2);
  font-size: 1.05rem;
  margin: 0 0 26px;
}
.cta-card .hero-ctas { justify-content: center; }

/* ── CONTACT PAGE ────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.contact-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.contact-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-soft);
}
.contact-card.no-link { cursor: default; }
.contact-card.no-link:hover { transform: none; border-color: var(--border); box-shadow: none; }

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.contact-icon svg { width: 22px; height: 22px; }

.contact-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--text);
}

.contact-value {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand-2);
}

.contact-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.warn-card {
  border-color: rgba(239, 68, 68, 0.3);
  background:
    linear-gradient(180deg, rgba(239,68,68,0.06), transparent 80%),
    var(--panel);
}
.warn-card .contact-value { color: #fca5a5; }

/* ── FORM ────────────────────────────────────────────────────────────── */
.form-wrap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.form-text > p {
  color: var(--text-2);
  margin: 0 0 18px;
  font-size: 1rem;
}

.quick-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.quick-list li {
  color: var(--text-2);
  font-size: 0.95rem;
  padding-left: 18px;
  position: relative;
}
.quick-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}

form.contact {
  display: grid;
  gap: 14px;
  margin-top: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

form.contact label {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}

form.contact input,
form.contact textarea,
form.contact select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  transition: border-color 0.12s;
}
form.contact input:focus,
form.contact textarea:focus,
form.contact select:focus {
  outline: none;
  border-color: var(--brand);
}

form.contact textarea {
  min-height: 140px;
  resize: vertical;
}

.section-form {
  background:
    linear-gradient(180deg, transparent 0%, rgba(59,130,246,0.04) 50%, transparent 100%);
}

/* ── HOURS ───────────────────────────────────────────────────────────── */
.hours-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  max-width: 720px;
  margin: 0 auto;
}
.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 12px;
}
.hours-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.hours-table td:first-child { font-weight: 600; color: var(--text); }
.hours-table td:last-child { text-align: right; color: var(--brand-2); }
.hours-table tr:last-child td { border-bottom: 0; }

/* ── LEGAL PAGES (existing) ──────────────────────────────────────────── */
article.legal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 36px;
  max-width: var(--max-narrow);
  margin: 32px auto;
}

article.legal h1 {
  margin-top: 0;
  font-size: 2rem;
}

article.legal h2 {
  margin-top: 36px;
  font-size: 1.3rem;
  color: var(--brand-2);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

article.legal h3 {
  margin-top: 24px;
  font-size: 1.05rem;
}

article.legal ul, article.legal ol { padding-left: 22px; }
article.legal li { margin: 6px 0; }

.muted, .updated {
  color: var(--muted);
  font-size: 0.9rem;
}

.notice {
  border-left: 3px solid var(--brand);
  background: rgba(31, 180, 122, 0.08);
  padding: 12px 16px;
  border-radius: 6px;
  margin: 16px 0;
}
.notice.warn {
  border-left-color: var(--warn);
  background: rgba(240, 184, 110, 0.08);
}
.notice.danger {
  border-left-color: var(--danger);
  background: rgba(224, 85, 106, 0.08);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.95rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 600;
}

/* legacy main wrapper for legal pages */
main > article.legal { max-width: var(--max-narrow); padding-left: 36px; padding-right: 36px; }

/* ── FOOTER ──────────────────────────────────────────────────────────── */
footer.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 56px 24px 24px;
  margin-top: 80px;
  color: var(--muted);
  font-size: 0.92rem;
}

.foot-wrap {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.foot-brand .brand { font-size: 1.1rem; }
.foot-tag {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 280px;
}

.foot-col h4 {
  margin: 0 0 14px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}
.foot-col a {
  display: block;
  color: var(--muted);
  padding: 4px 0;
  font-size: 0.92rem;
}
.foot-col a:hover { color: var(--text); text-decoration: none; }

.foot-base {
  max-width: var(--max);
  margin: 24px auto 0;
  padding-top: 0;
  font-size: 0.85rem;
  color: var(--muted-2);
  text-align: center;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .hero-home {
    grid-template-columns: 1fr;
    padding: 48px 24px 56px;
    gap: 28px;
    text-align: center;
  }
  .hero-content-page,
  .hero-home .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-home .hero-ctas { justify-content: center; }
  .hero-home .hero-stats { justify-content: center; }
  .hero-illustration { order: -1; max-height: 320px; overflow: hidden; }
  .hero-illustration svg { max-width: 240px; }
  .sa-grid { grid-template-columns: 1fr; gap: 40px; }
  .sa-illustration { order: -1; }
  .form-wrap { grid-template-columns: 1fr; gap: 30px; }
  .foot-wrap { grid-template-columns: 1fr 1fr; gap: 24px; }
  .section { padding: 56px 20px; }
  .cta-card { padding: 44px 24px; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.85rem; }
  .hero-stats { gap: 20px; }
  .hero-stats strong { font-size: 1.25rem; }
  article.legal { padding: 24px 20px; margin: 16px 12px; }
  main > article.legal { padding-left: 20px; padding-right: 20px; }
  .foot-wrap { grid-template-columns: 1fr; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.88rem; }
}
