/* ═══════════════════════════════════════════════════
   Earth Pulse — Central Design System
   styles.css · Edit once, applies everywhere
   Brand: Deep Green + Warm Tan + Cream
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* ── Brand colours ── */
  --ep-green:      #214332;
  --ep-green-mid:  #2d5c44;
  --ep-green-light:#3a7a5a;
  --ep-tan:        #BF9B7B;
  --ep-tan-light:  #d4b99a;
  --ep-tan-pale:   #ede0d0;
  --ep-cream:      #F2F0E6;
  --ep-cream-dark: #e8e5d8;
  --ep-charcoal:   #2B2B2B;
  --ep-charcoal-mid: #444;
  --ep-charcoal-light: #6b6b6b;

  /* ── Semantic aliases ── */
  --bg:            var(--ep-cream);
  --bg-card:       #ffffff;
  --bg-surface:    rgba(242,240,230,0.7);
  --text-primary:  var(--ep-charcoal);
  --text-secondary:var(--ep-charcoal-mid);
  --text-muted:    var(--ep-charcoal-light);
  --border:        rgba(33,67,50,0.12);
  --border-strong: rgba(33,67,50,0.25);
  --accent:        var(--ep-tan);

  /* ── AQI colours ── */
  --aqi-good:      #22c55e;
  --aqi-fair:      #84cc16;
  --aqi-moderate:  #eab308;
  --aqi-poor:      #f97316;
  --aqi-unhealthy: #ef4444;
  --aqi-severe:    #8b5cf6;

  /* ── Typography ── */
  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;
  --mono:  'DM Mono', monospace;

  /* ── Spacing & shape ── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ── */
.ep-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(242,240,230,0.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.ep-nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ep-green);
}
.ep-nav-brand img, .ep-nav-brand svg { width: 36px; height: 36px; }
.ep-nav-brand-text {
  font-family: var(--sans); font-weight: 600;
  font-size: 1.05rem; color: var(--ep-green); letter-spacing: -0.01em;
}
.ep-nav-links { display: flex; gap: 2rem; list-style: none; }
.ep-nav-links a {
  text-decoration: none; color: var(--text-muted);
  font-size: 0.875rem; font-weight: 500;
  transition: color 0.2s;
}
.ep-nav-links a:hover, .ep-nav-links a.active { color: var(--ep-green); }
.ep-nav-cta {
  background: var(--ep-green); color: var(--ep-cream);
  padding: 0.45rem 1.2rem; border-radius: 2rem;
  text-decoration: none; font-size: 0.85rem; font-weight: 500;
  transition: background 0.2s;
}
.ep-nav-cta:hover { background: var(--ep-green-mid); }
@media (max-width: 700px) {
  .ep-nav-links { display: none; }
}

/* ── Page hero ── */
.ep-hero {
  background: linear-gradient(160deg, rgba(33,67,50,0.04) 0%, var(--ep-cream) 60%);
  padding: 4.5rem 2rem 3rem; text-align: center;
  border-bottom: 1px solid var(--border);
}
.ep-hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(33,67,50,0.08); color: var(--ep-green);
  padding: 0.3rem 1rem; border-radius: 2rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 1.25rem;
}
.ep-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.1; color: var(--ep-green);
  margin-bottom: 0.85rem;
}
.ep-hero h1 em { color: var(--ep-tan); font-style: normal; }
.ep-hero-sub {
  color: var(--text-muted); font-size: 1rem;
  max-width: 520px; margin: 0 auto 0.75rem;
}
.ep-hero-meta {
  font-size: 0.78rem; color: var(--text-muted);
  font-family: var(--mono);
}
.ep-hero-meta strong { color: var(--ep-green); font-weight: 500; }

/* ── Cards ── */
.ep-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.ep-card:hover {
  box-shadow: 0 6px 28px rgba(33,67,50,0.08);
  transform: translateY(-2px);
}
.ep-card-label {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.5rem;
}
.ep-card-value {
  font-family: var(--serif); font-size: 2.2rem;
  line-height: 1; color: var(--ep-green);
}
.ep-card-unit {
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--text-muted); margin-top: 0.3rem;
}

/* ── Section ── */
.ep-section { padding: 3.5rem 2rem; }
.ep-section-inner { max-width: 1100px; margin: 0 auto; }
.ep-section-tag {
  display: block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ep-tan); margin-bottom: 0.4rem;
}
.ep-section-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--ep-green); margin-bottom: 0.5rem;
}
.ep-section-sub {
  color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem;
}

/* ── Badge ── */
.ep-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 600;
  padding: 2px 9px; border-radius: 20px; letter-spacing: 0.04em;
}
.ep-badge-common    { background: rgba(33,67,50,0.1);  color: var(--ep-green); }
.ep-badge-migratory { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.ep-badge-rare      { background: rgba(191,155,123,0.2); color: #7c4a1a; }
.ep-badge-vulnerable{ background: rgba(239,68,68,0.1);  color: #991b1b; }
.ep-badge-new       { background: #fef08a; color: #713f12; }

/* ── Filter bar ── */
.ep-filters {
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 0.85rem 2rem; display: flex; gap: 0.6rem;
  flex-wrap: wrap; align-items: center;
  position: sticky; top: 62px; z-index: 90;
}
.ep-filter-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
}
.ep-filter-btn {
  padding: 0.32rem 0.85rem; border-radius: 2rem;
  border: 1px solid var(--border-strong); background: transparent;
  font-family: var(--sans); font-size: 0.78rem; cursor: pointer;
  transition: all 0.15s; color: var(--text-secondary);
}
.ep-filter-btn:hover { border-color: var(--ep-tan); color: var(--ep-green); }
.ep-filter-btn.active {
  background: var(--ep-green); color: var(--ep-cream);
  border-color: var(--ep-green);
}

/* ── AQI gauge ── */
.ep-aqi-gauge {
  width: 88px; height: 88px; border-radius: 50%; flex-shrink: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ep-aqi-gauge-num {
  font-family: var(--serif); font-size: 2rem;
  line-height: 1; color: white; font-weight: 700;
}
.ep-aqi-gauge-lbl {
  font-size: 0.62rem; color: rgba(255,255,255,0.85);
  font-family: var(--sans); font-weight: 600; letter-spacing: 0.06em;
}

/* ── Bird card ── */
.ep-bird-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  display: flex; gap: 1rem; align-items: flex-start;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none; color: inherit;
}
.ep-bird-card:hover {
  box-shadow: 0 6px 28px rgba(33,67,50,0.1);
  transform: translateY(-2px);
}
.ep-bird-icon {
  width: 54px; height: 54px; border-radius: var(--radius-sm);
  background: rgba(33,67,50,0.07); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem;
}
.ep-bird-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; color: var(--ep-green); }
.ep-bird-sci  { font-style: italic; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; }
.ep-bird-conf { font-family: var(--mono); font-size: 0.7rem; color: var(--ep-tan); margin-top: 4px; }
.ep-bird-time { font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); }

/* ── Insight card (dark) ── */
.ep-insight {
  background: var(--ep-green); border-radius: var(--radius-xl);
  padding: 2.5rem; display: grid;
  grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start;
}
.ep-insight-icon {
  width: 50px; height: 50px; background: rgba(242,240,230,0.12);
  border-radius: var(--radius-md); display: flex;
  align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
}
.ep-insight-tag { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ep-tan); margin-bottom: 0.4rem; }
.ep-insight-text { font-family: var(--serif); font-size: 1.35rem; line-height: 1.4; color: var(--ep-cream); margin-bottom: 0.6rem; }
.ep-insight-detail { font-size: 0.85rem; color: rgba(242,240,230,0.65); }

/* ── Insight mini stats ── */
.ep-mini-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 0.75rem; margin-top: 1.25rem;
}
.ep-mini {
  background: var(--ep-cream); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem;
}
.ep-mini-label { font-size: 0.72rem; font-weight: 600; color: var(--ep-tan); margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.06em; }
.ep-mini-val   { font-family: var(--serif); font-size: 1.15rem; color: var(--ep-green); }

/* ── Chart block ── */
.ep-chart-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.25rem;
}
.ep-chart-title { font-family: var(--serif); font-size: 1.2rem; color: var(--ep-green); margin-bottom: 0.2rem; }
.ep-chart-sub   { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.25rem; }

/* ── Newsletter ── */
.ep-newsletter {
  background: rgba(33,67,50,0.05); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl); padding: 3rem 2rem; text-align: center;
  max-width: 580px; margin: 0 auto;
}
.ep-newsletter h3 { font-family: var(--serif); font-size: 1.8rem; color: var(--ep-green); margin-bottom: 0.5rem; }
.ep-newsletter p  { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 1.5rem; }
.ep-newsletter-form { display: flex; gap: 0.5rem; max-width: 420px; margin: 0 auto; }
.ep-newsletter-form input {
  flex: 1; padding: 0.72rem 1rem; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-family: var(--sans); font-size: 0.9rem;
  background: white; outline: none; color: var(--text-primary);
  transition: border-color 0.2s;
}
.ep-newsletter-form input:focus { border-color: var(--ep-green); }
.ep-newsletter-form button {
  background: var(--ep-green); color: var(--ep-cream);
  padding: 0.72rem 1.4rem; border: none; border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: 0.9rem; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: background 0.2s;
}
.ep-newsletter-form button:hover { background: var(--ep-green-mid); }
@media(max-width:450px){ .ep-newsletter-form { flex-direction:column; } }

/* ── Register CTA ── */
.ep-register-cta {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 3rem 2rem; text-align: center;
}
.ep-register-cta h3 { font-family: var(--serif); font-size: 1.8rem; color: var(--ep-green); margin-bottom: 0.75rem; }
.ep-register-cta p  { color: var(--text-muted); max-width: 500px; margin: 0 auto 1.5rem; font-size: 0.9rem; }
.ep-register-benefits { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 2rem; }
.ep-register-benefit {
  background: rgba(33,67,50,0.07); color: var(--ep-green);
  padding: 0.3rem 0.9rem; border-radius: 2rem; font-size: 0.78rem; font-weight: 500;
}
.ep-btn-primary {
  display: inline-block; background: var(--ep-green); color: var(--ep-cream);
  padding: 0.85rem 2.2rem; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 500; font-size: 0.95rem;
  transition: background 0.2s;
}
.ep-btn-primary:hover { background: var(--ep-green-mid); }
.ep-btn-secondary {
  display: inline-block; background: transparent; color: var(--ep-green);
  padding: 0.85rem 2.2rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--ep-green);
  text-decoration: none; font-weight: 500; font-size: 0.95rem;
  transition: all 0.2s;
}
.ep-btn-secondary:hover { background: var(--ep-green); color: var(--ep-cream); }

/* ── About section ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media(max-width:700px){ .about-grid { grid-template-columns: 1fr; } }
.about-section h3 { font-family: var(--serif); font-size: 1.1rem; color: var(--ep-tan); margin-bottom: 0.6rem; }
.about-section p, .about-section li { font-size: 0.88rem; color: var(--text-muted); line-height: 1.75; }
.about-section ul { padding-left: 1rem; }
.about-section li { margin-bottom: 0.35rem; }
.about-section a { color: var(--ep-green); }
.about-love { grid-column: 1/-1; text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ── Footer ── */
.ep-footer {
  background: var(--ep-green); color: rgba(242,240,230,0.55);
  padding: 2.5rem 2rem; text-align: center; font-size: 0.8rem;
}
.ep-footer a { color: var(--ep-tan); text-decoration: none; }
.ep-footer a:hover { color: var(--ep-tan-light); }
.ep-footer-logo { font-family: var(--sans); font-weight: 600; font-size: 1.1rem; color: var(--ep-cream); margin-bottom: 0.2rem; letter-spacing: -0.01em; }
.ep-footer-tagline { font-size: 0.78rem; color: rgba(242,240,230,0.4); margin-bottom: 1rem; font-style: italic; }
.ep-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0.75rem 0; }
.ep-footer-credits { margin-top: 1rem; font-size: 0.72rem; }

/* ── Skeleton loader ── */
.ep-skeleton {
  background: linear-gradient(90deg, var(--ep-cream-dark) 25%, var(--border) 50%, var(--ep-cream-dark) 75%);
  background-size: 200% 100%;
  animation: ep-shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes ep-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Animations ── */
@keyframes ep-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ep-fade-up   { animation: ep-fade-up 0.55s ease both; }
.ep-delay-1   { animation-delay: 0.1s; }
.ep-delay-2   { animation-delay: 0.2s; }
.ep-delay-3   { animation-delay: 0.3s; }

/* ── Forms ── */
.ep-form-group { margin-bottom: 1.1rem; }
.ep-label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.3rem; }
.ep-input, .ep-textarea, .ep-select {
  width: 100%; padding: 0.68rem 1rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: 0.9rem; color: var(--text-primary);
  background: white; outline: none; transition: border-color 0.2s;
}
.ep-input:focus, .ep-textarea:focus, .ep-select:focus { border-color: var(--ep-green); }
.ep-textarea { resize: vertical; min-height: 120px; }
.ep-submit {
  width: 100%; background: var(--ep-green); color: var(--ep-cream);
  padding: 0.8rem; border: none; border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
  cursor: pointer; transition: background 0.2s;
}
.ep-submit:hover { background: var(--ep-green-mid); }

/* ── Utilities ── */
.ep-mono { font-family: var(--mono); }
.ep-green { color: var(--ep-green); }
.ep-tan   { color: var(--ep-tan); }
.ep-muted { color: var(--text-muted); }
.ep-center { text-align: center; }
.ep-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ep-grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1rem; }
@media(max-width:600px){ .ep-grid-2 { grid-template-columns: 1fr; } }
