/* ═══════════════════════════════════════════════════════════════════════════
   EMERGENZ MERIDIAN — Global Stylesheet
   Light body + dark hero · EMERGENZ Design System · DM Mono + DM Sans
═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg:  #f3f4f8;
  --s1:  #ffffff;
  --s2:  #f7f8fc;
  --s3:  #edf0f5;
  --s4:  #e2e6ed;
  --text:       #18192a;
  --text-soft:  #505568;
  --text-muted: #8b91a3;
  --text-faint: #b8bcc8;
  --border:        #dde1ea;
  --border-strong: #c4cad8;
  --blue:        #1B4F8A;
  --blue-bg:     #e8f1fb;
  --blue-border: #b8cfe8;
  --navy:        #0d2654;
  --teal:        #0d7a70;
  --teal-bg:     #f0fdf9;
  --teal-border: #a7f0e8;
  --green:        #166534;
  --green-bg:     #f0fdf4;
  --green-border: #bbf7d0;
  --amber:        #92400e;
  --amber-bg:     #fffbeb;
  --amber-border: #fde68a;
  --red:        #C00000;
  --red-bg:     #fff1f2;
  --red-border: #fecdd3;
  --nav-h:     60px;
  --radius:    6px;
  --shadow:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.05);
  --mono: 'DM Mono', 'Courier New', monospace;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  /* alias so any remaining var(--serif) refs inherit DM Sans */
  --serif: 'DM Sans', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }

.container { width: min(1160px, calc(100% - 80px)); margin: 0 auto; }
main { padding-top: var(--nav-h); }
section { padding: 88px 0; }

/* ── Navigation */
.nav-shell {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; height: var(--nav-h);
  background: rgba(247,248,252,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.nav {
  width: min(1240px, calc(100% - 48px)); margin: 0 auto;
  height: var(--nav-h); display: flex; align-items: center; gap: 20px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; }
.nav-logo-mark { flex-shrink: 0; display: block; }
.nav-divider { width: 1px; height: 20px; background: var(--border-strong); flex-shrink: 0; }
.nav-signal {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal); flex-shrink: 0;
  animation: sig-pulse 2.4s ease-in-out infinite;
}
@keyframes sig-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.78); }
}
.nav-wordmark {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--navy); white-space: nowrap;
}
.nav-wordmark span { color: var(--text-muted); }
.nav-links { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; overflow: hidden; }
.nav-link {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-muted); padding: 5px 9px; border-radius: 4px;
  transition: color 0.13s, background 0.13s; white-space: nowrap; flex-shrink: 0;
}
.nav-link:hover  { color: var(--text); background: var(--s3); }
.nav-link.active { color: var(--navy); background: var(--blue-bg); font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ── Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 16px; border-radius: 5px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.07em; text-transform: uppercase; cursor: pointer;
  border: 1px solid transparent; transition: all 0.13s;
  white-space: nowrap; text-decoration: none; line-height: 1;
}
.btn-primary { background: var(--red); color: #ffffff; border-color: var(--red); }
.btn-primary:hover { background: #a00000; border-color: #a00000; }
.btn-ghost { background: transparent; color: var(--text-soft); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--s3); color: var(--text); border-color: var(--border-strong); }
.btn-ghost-dark { background: transparent; color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.22); }
.btn-ghost-dark:hover { background: rgba(255,255,255,0.1); color: #ffffff; border-color: rgba(255,255,255,0.4); }
.btn-outline { background: transparent; color: var(--text-soft); border-color: var(--border); }
.btn-outline:hover { border-color: var(--border-strong); color: var(--text); background: var(--s2); }
.btn-teal { background: var(--teal-bg); color: var(--teal); border-color: var(--teal-border); }
.btn-teal:hover { background: #d4f5f0; border-color: #7ae3d9; }

/* ── Dark Hero */
.dark-hero {
  position: relative;
  background: linear-gradient(150deg, var(--navy) 0%, #1a4e8a 100%);
  overflow: hidden; padding: 88px 0 0; text-align: center;
}
.dark-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 28px 28px; pointer-events: none;
}
.dark-hero .container { position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.06); margin-bottom: 28px;
}
.hero-badge span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.hero-badge-sep { color: rgba(255,255,255,0.22) !important; }
.dark-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 16px; }
.dark-title { font-family: var(--sans); font-size: clamp(64px, 10vw, 120px); font-weight: 800; line-height: 0.9; letter-spacing: -0.03em; color: #ffffff; margin-bottom: 20px; }
.dark-acronym { font-family: var(--mono); font-size: 11px; font-weight: 300; line-height: 2.2; color: rgba(255,255,255,0.4); letter-spacing: 0.05em; margin-bottom: 24px; }
.dark-desc { font-size: 15px; color: rgba(255,255,255,0.62); max-width: 580px; margin: 0 auto 32px; line-height: 1.75; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-stats { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 56px; border-top: 1px solid rgba(255,255,255,0.1); }
.hero-stat { padding: 24px 16px; border-right: 1px solid rgba(255,255,255,0.08); text-align: center; }
.hero-stat:last-child { border-right: none; }
.hero-stat-num { font-family: var(--mono); font-size: 30px; font-weight: 500; line-height: 1; margin-bottom: 8px; }
.hero-stat-label { font-size: 11px; color: rgba(255,255,255,0.45); line-height: 1.5; }
.hero-stat-source { font-family: var(--mono); font-size: 9px; color: rgba(255,255,255,0.25); margin-top: 4px; letter-spacing: 0.04em; }

/* ── Typography */
.section-label {
  font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; display: block;
}
.section-label.centered { text-align: center; }
.section-heading { font-family: var(--sans); font-size: clamp(26px, 3.2vw, 40px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--text); margin-bottom: 16px; }
.section-subhead { font-size: 15px; color: var(--text-soft); line-height: 1.75; max-width: 640px; margin-bottom: 40px; }

/* ── Card */
.card { background: var(--s1); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ── Chips */
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; border: 1px solid var(--border); color: var(--text-muted); background: var(--s3); white-space: nowrap; }
.chip-blue  { background: var(--blue-bg);  color: var(--blue);  border-color: var(--blue-border); }
.chip-teal  { background: var(--teal-bg);  color: var(--teal);  border-color: var(--teal-border); }
.chip-green { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.chip-amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.chip-red   { background: var(--red-bg);   color: var(--red);   border-color: var(--red-border); }

/* ── Callouts */
.callout { border-radius: var(--radius); padding: 16px 20px; font-size: 13px; color: var(--text-soft); line-height: 1.7; }
.callout-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; margin-bottom: 8px; display: block; }
.callout-warning  { background: var(--amber-bg); border: 1px solid var(--amber-border); border-left: 3px solid var(--amber); }
.callout-warning  .callout-label { color: var(--amber); }
.callout-critical { background: var(--red-bg);   border: 1px solid var(--red-border);   border-left: 3px solid var(--red); }
.callout-critical .callout-label { color: var(--red); }
.callout-info     { background: var(--blue-bg);  border: 1px solid var(--blue-border);  border-left: 3px solid var(--blue); }
.callout-info     .callout-label { color: var(--blue); }
.callout-teal     { background: var(--teal-bg);  border: 1px solid var(--teal-border);  border-left: 3px solid var(--teal); }
.callout-teal     .callout-label { color: var(--teal); }

/* ── Page hero */
.page-hero { padding: 56px 0 48px; border-bottom: 1px solid var(--border); background: var(--s1); }
.page-hero-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; display: block; }
.page-hero-title { font-family: var(--sans); font-size: clamp(32px, 5vw, 56px); font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; color: var(--text); margin-bottom: 18px; }
.page-hero-title span { color: var(--text-muted); }
.page-hero-title em { font-style: normal; color: var(--text-muted); }
.page-hero-sub { font-size: 15px; color: var(--text-soft); line-height: 1.75; max-width: 680px; }

/* ── Footer */
.site-footer { background: var(--navy); border-top: 1px solid rgba(255,255,255,0.08); padding: 52px 0 48px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: start; }
.footer-brand { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: #ffffff; margin-bottom: 8px; }
.footer-small { font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.85; margin-bottom: 14px; }
.footer-disclaimer { font-size: 11px; color: rgba(255,255,255,0.25); line-height: 1.8; max-width: 560px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; margin-bottom: 8px; }
.footer-links a { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.4); transition: color 0.13s; }
.footer-links a:hover { color: #ffffff; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--s4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

@media (max-width: 900px) {
  .container { width: calc(100% - 48px); }
  .nav-links { display: none; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .container   { width: calc(100% - 32px); }
  section      { padding: 56px 0; }
  .page-hero   { padding: 40px 0 36px; }
  .dark-hero   { padding: 72px 0 0; }
  .dark-title  { font-size: clamp(52px, 14vw, 80px); }
  .hero-stats  { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-links { justify-content: flex-start; }
  .nav-actions .btn-ghost { display: none; }
}
