/* ============================================
   mws-lab — Water Scarcity in Morocco
   Style: Dark, monospace-accented, research-focused
   Version: 1.0.0
   ============================================ */

:root {
  --bg: #0a0e14;
  --bg2: #11161f;
  --bg3: #1a2029;
  --border: #232b38;
  --text: #e6edf3;
  --muted: #8b95a5;
  --violet: #7c5cff;
  --violet2: #a78bfa;
  --blue: #3b82f6;
  --blue2: #60a5fa;
  --teal: #14b8a6;
  --teal2: #2dd4bf;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --mono: 'DM Mono', ui-monospace, monospace;
  --sans: 'DM Sans', system-ui, sans-serif;
  --display: 'Syne', system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: var(--blue2);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--violet2);
}

/* ============ NAV ============ */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: var(--violet2);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--violet);
}

.nav-cta {
  background: var(--violet);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--mono);
}

.nav-cta:hover {
  background: var(--violet2);
  color: white;
}

/* ============ HERO ============ */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.hero-badge span {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.c-b { color: var(--blue2); }
.c-t { color: var(--teal2); }

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.hero-quote {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--violet2);
  padding: 1rem 1.5rem;
  background: var(--bg2);
  border-left: 3px solid var(--violet);
  border-radius: 0 6px 6px 0;
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: left;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--violet);
  color: white;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--violet2);
  color: white;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
}

.btn-ghost:hover {
  border-color: var(--violet);
  color: var(--violet2);
}

/* ============ STATS ROW ============ */
.stats-row {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  text-align: center;
  padding: 1rem 0.5rem;
}

.stat-n {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.stat-l {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============ SECTIONS ============ */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--violet2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 780px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ============ CARDS ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s;
}

.card:hover {
  border-color: var(--violet);
  transform: translateY(-2px);
}

.card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* ============ STATUS BOX ============ */
.status-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}

.status-row:last-child {
  border-bottom: none;
}

.status-key {
  font-size: 0.9rem;
  color: var(--text);
}

.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-ok {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-err {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ============ FOOTER ============ */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.footer-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1rem;
  line-height: 1.8;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--violet2);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.flinks {
  display: flex;
  gap: 1.5rem;
}

.flinks a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.flinks a:hover {
  color: var(--text);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  nav {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .nav-links {
    gap: 1rem;
    font-size: 0.85rem;
  }
  .hero {
    padding: 3rem 1rem 2rem;
  }
  .stats-row {
    padding: 1.5rem 1rem;
  }
  .section {
    padding: 3rem 1rem;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-inner {
    padding: 2rem 1rem 1rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
