/* ========================================
   MarshRoadSafety.org — Dark Cinematic Theme
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #121212;
  --bg-secondary: #1a1a1a;
  --bg-card: rgba(255,255,255,0.06);
  --bg-card-hover: rgba(255,255,255,0.10);
  --bg-glass: rgba(18,18,18,0.80);
  --text-primary: #f5f5f5;
  --text-secondary: #d9d9d9;
  --text-muted: #aaaaaa;
  --accent-orange: #e8792b;
  --accent-orange-glow: rgba(232,121,43,0.3);
  --accent-red: #d93025;
  --accent-red-glow: rgba(217,48,37,0.25);
  --accent-green: #4a8c3f;
  --accent-green-light: #6db562;
  --border-subtle: rgba(255,255,255,0.06);
  --border-highlight: rgba(232,121,43,0.3);
  --gradient-hero: linear-gradient(135deg, #0a0a0a 0%, #1a1008 50%, #0a0a0a 100%);
  --gradient-danger: linear-gradient(135deg, rgba(217,48,37,0.1) 0%, rgba(232,121,43,0.05) 100%);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(232,121,43,0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Outfit', 'Inter', sans-serif; font-weight: 700; line-height: 1.2; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ========== NAV ========== */
/* Floating back-to-top */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 900;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent-orange); color: #fff; border: none;
  font-size: 1.5rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(0,0,0,0.4), 0 0 0 1px rgba(232,121,43,0.6);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, filter 0.2s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { filter: brightness(1.15); transform: translateY(-2px); }
.back-to-top:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (max-width: 600px) {
  .back-to-top { bottom: 16px; right: 16px; width: 44px; height: 44px; font-size: 1.3rem; }
}

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}
.nav.scrolled { background: rgba(10,10,10,0.95); box-shadow: 0 4px 30px rgba(0,0,0,0.5); }
.nav-inner {
  display: flex; align-items: center; justify-content: center;   /* cluster logo + items centered as one group */
  width: 100%; max-width: 1200px;
  margin: 0 auto; padding: 0 24px; height: 72px;
  box-sizing: border-box; gap: 32px;
}
.nav-logo img { height: 48px; width: auto; }
.nav-links { display: flex; gap: 4px; list-style: none; align-items: center; flex-wrap: nowrap; }
.nav-links li { flex: 0 0 auto; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.875rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
  transition: var(--transition);
  white-space: nowrap;            /* never break a label mid-word */
  display: inline-block;
}
/* Tighter labels on narrower desktops before hamburger kicks in */
@media (max-width: 1400px) {
  .nav-inner { padding: 0 16px; }
  .nav-links { gap: 1px; }
  .nav-links a { font-size: 0.78rem; padding: 7px 8px; }
  .nav-logo img { height: 38px; }
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.nav-cta {
  background: var(--accent-orange) !important; color: #fff !important;
  font-weight: 600 !important; border-radius: 8px !important;
}
.nav-cta:hover { filter: brightness(1.15); transform: translateY(-1px); }
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--border-subtle);
  color: var(--text-primary); cursor: pointer;
  align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 8px;
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: var(--transition);
}
.nav-toggle:hover { background: var(--bg-card); border-color: var(--accent-orange); color: var(--accent-orange); }
.nav-toggle .nav-toggle-icon { font-size: 1.3rem; line-height: 1; transition: transform 0.2s; }
.nav-toggle.is-open .nav-toggle-icon { transform: rotate(90deg); }

/* ========== HERO ========== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: flex-start;
  background: var(--gradient-hero);
  overflow: visible; padding: 120px 0 80px;     /* visible so tall mobile content isn't clipped */
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(232,121,43,0.08) 0%, transparent 60%);
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 200px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
  pointer-events: none; z-index: 1;
}
.hero-content { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
/* Wrapper that lives ABOVE the two-column hero-content, so the badge centers across the full body */
.hero-badge-wrap {
  width: 100%; display: flex; flex-direction: column; align-items: center;
  margin-bottom: 32px;
}
.hero-badge {
  display: flex; align-items: center; gap: 8px;
  background: var(--accent-red-glow); border: 1px solid rgba(217,48,37,0.3);
  color: #ff6b5e; font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; padding: 7px 20px; border-radius: 100px;
  width: fit-content; max-width: 100%;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .hero-badge { white-space: normal; text-align: center; line-height: 1.5; justify-content: center; }
}
.hero-badge .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-red);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.5); } }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; margin-bottom: 20px; letter-spacing: -0.02em; }
.hero h1 .highlight { color: var(--accent-orange); }
.hero-subtitle {
  font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 36px;
  max-width: 540px; line-height: 1.8;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px; font-size: 0.95rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: var(--transition); font-family: inherit;
}
.btn-primary {
  background: var(--accent-orange); color: #fff;
  box-shadow: 0 4px 20px var(--accent-orange-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-orange-glow); filter: brightness(1.1); }
.btn-secondary {
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-highlight); }

.hero-image {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card); border: 1px solid var(--border-subtle);
}
.hero-slideshow { position: relative; width: 100%; aspect-ratio: 16/10; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.2s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-slide-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  padding: 32px 20px 16px; font-size: 0.85rem; color: var(--text-secondary);
  font-style: italic;
}
.hero-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(232,121,43,0.1), transparent);
  pointer-events: none;
}
.slideshow-progress {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,0.15); z-index: 2;
}
.slideshow-progress-bar {
  height: 100%; width: 0%; background: var(--accent-orange);
  transition: width 0.1s linear;
}
.slideshow-controls {
  position: absolute; bottom: 12px; right: 12px; z-index: 3;
  display: flex; gap: 4px;
}
.slide-btn {
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; width: 32px; height: 32px; border-radius: 6px;
  cursor: pointer; font-size: 1rem; display: flex; align-items: center;
  justify-content: center; transition: var(--transition); backdrop-filter: blur(4px);
}
.slide-btn:hover { background: rgba(232,121,43,0.5); border-color: var(--accent-orange); }

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  z-index: 3; text-align: center;
  animation: scrollFade 3s ease-in-out infinite;
}
.scroll-indicator span {
  display: block; font-size: 0.75rem; font-weight: 500;
  color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 8px;
}
.scroll-arrow {
  font-size: 1.8rem; color: var(--accent-orange); line-height: 1;
  animation: scrollBounce 2.5s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(10px); opacity: 1; }
}
@keyframes scrollFade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ========== STATS BAR ========== */
.stats-bar {
  position: relative; z-index: 3;
  background: var(--bg-secondary); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 32px 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px;
  margin-top: -60px; box-shadow: var(--shadow-card);
}
.stat-item { text-align: center; }
.stat-number {
  font-family: 'Outfit', sans-serif; font-size: 2.4rem; font-weight: 800;
  color: var(--accent-orange); display: block;
}
.stat-label { font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }
.stat-sublabel { display: block; font-size: 0.7rem; color: var(--text-secondary); opacity: 0.7; margin-top: 2px; font-style: italic; }

/* ========== SECTIONS ========== */
section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--accent-orange); margin-bottom: 16px;
}
.section-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.section-desc { color: var(--text-secondary); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

/* ========== PROBLEM ========== */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.problem-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: 32px; transition: var(--transition);
  position: relative; overflow: hidden;
}
.problem-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-orange), var(--accent-red));
  opacity: 0; transition: var(--transition);
}
.problem-card:hover { background: var(--bg-card-hover); transform: translateY(-4px); box-shadow: var(--shadow-card); }
.problem-card:hover::before { opacity: 1; }
.problem-icon { font-size: 2rem; margin-bottom: 16px; display: block; }
.problem-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.problem-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* ========== DANGER POINTS / MAP ========== */
.map-section { background: var(--bg-secondary); }
.map-container {
  border-radius: var(--radius-lg); overflow: hidden; height: 500px;
  border: 1px solid var(--border-subtle); box-shadow: var(--shadow-card);
}
#danger-map { height: 100%; width: 100%; }
.map-legend {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px; margin-top: 32px;
}
.legend-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: 20px; transition: var(--transition);
}
.legend-item:hover { border-color: var(--border-highlight); }
.legend-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
  box-shadow: 0 0 8px currentColor;
}
.legend-item h4 { font-size: 0.95rem; margin-bottom: 10px; }
.legend-item p { font-size: 0.8rem; color: var(--text-secondary); }

/* ========== EVIDENCE GALLERY ========== */
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.evidence-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-subtle); transition: var(--transition);
  cursor: pointer; group: evidence;
}
.evidence-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); border-color: var(--border-highlight); }
.evidence-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; transition: var(--transition); }
.evidence-card:hover img { transform: scale(1.05); }
.evidence-overlay {
  position: absolute; top: 0; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px; pointer-events: none;
}
.evidence-tag {
  position: absolute; top: 12px; left: 12px;
  display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; padding: 4px 10px; border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.tag-truck { background: rgba(232,121,43,0.85); color: #fff; }
.tag-night { background: rgba(100,60,180,0.85); color: #fff; }
.tag-speed { background: rgba(217,48,37,0.85); color: #fff; }
.tag-cyclist { background: rgba(74,140,63,0.85); color: #fff; }
.tag-camera { background: rgba(59,130,246,0.85); color: #fff; }
.evidence-overlay h4 { font-size: 0.95rem; margin: 0 0 4px 0; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.evidence-overlay .evidence-meta { font-size: 0.75rem; color: #ddd; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

/* ========== OVERNIGHT ========== */
.overnight-section { background: var(--gradient-danger); }
.overnight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.overnight-images { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.overnight-images img {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}
.overnight-text h3 { font-size: 1.8rem; margin-bottom: 20px; }
.overnight-text h3 .highlight-red { color: var(--accent-red); }
.overnight-text p { color: var(--text-secondary); margin-bottom: 16px; }
.overnight-stats { display: flex; gap: 24px; margin-top: 24px; }
.ov-stat { text-align: center; }
.ov-stat .ov-num { font-family: 'Outfit'; font-size: 2rem; font-weight: 800; color: var(--accent-red); }
.ov-stat .ov-label { font-size: 0.75rem; color: var(--text-muted); }

/* ========== IMPACT ========== */
.impact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.impact-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: 32px; transition: var(--transition);
}
.impact-card:hover { border-color: var(--border-highlight); }
.impact-card .impact-quote {
  font-size: 1.05rem; font-style: italic; color: var(--text-secondary);
  margin-bottom: 16px; line-height: 1.8; position: relative; padding-left: 20px;
  border-left: 3px solid var(--accent-orange);
}
.impact-card .impact-attr { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

/* ========== SOLUTIONS ========== */
.solutions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.solution-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: 28px; transition: var(--transition);
  display: flex; gap: 16px; align-items: flex-start;
}
.solution-card:hover { border-color: var(--bg-card-hover); transform: translateY(-2px); }
.solution-num {
  font-family: 'Outfit'; font-size: 1.5rem; font-weight: 800;
  color: var(--accent-orange); opacity: 0.5; flex-shrink: 0;
}
.solution-card h4 { font-size: 1rem; margin-bottom: 8px; }
.solution-card p { font-size: 0.85rem; color: var(--text-secondary); }

/* ========== TAKE ACTION ========== */
.action-section {
  background: linear-gradient(135deg, #1a1008 0%, #0a0a0a 50%, #0a0a12 100%);
}
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.action-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 40px; text-align: center;
  transition: var(--transition); position: relative; overflow: hidden;
}
.action-card::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, var(--accent-orange-glow) 0%, transparent 60%);
  opacity: 0; transition: var(--transition);
}
.action-card:hover::before { opacity: 1; }
.action-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-glow); }
.action-icon { font-size: 3rem; margin-bottom: 20px; display: block; position: relative; z-index: 1; }
.action-card h3 { font-size: 1.3rem; margin-bottom: 12px; position: relative; z-index: 1; }
.action-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; position: relative; z-index: 1; }
.action-card .btn { position: relative; z-index: 1; }

/* ========== PETITION FORM ========== */
.petition-section { background: var(--bg-secondary); }
.petition-form-wrap {
  max-width: 640px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 48px;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 14px 16px; background: var(--bg-primary);
  border: 1px solid var(--border-subtle); border-radius: 8px;
  color: var(--text-primary); font-family: inherit; font-size: 0.95rem;
  transition: var(--transition); outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--accent-orange); box-shadow: 0 0 0 3px var(--accent-orange-glow);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-check { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent-orange); }
.form-check label { font-size: 0.85rem; color: var(--text-secondary); }

/* ========== FAQ ========== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border-subtle); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden; transition: var(--transition);
}
.faq-item:hover { border-color: var(--border-highlight); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; background: var(--bg-card); border: none;
  color: var(--text-primary); font-family: inherit; font-size: 1rem; font-weight: 600;
  cursor: pointer; text-align: left; transition: var(--transition);
}
.faq-question:hover { background: var(--bg-card-hover); }
.faq-question .faq-icon { font-size: 1.2rem; transition: var(--transition); color: var(--accent-orange); }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  padding: 0 24px; background: var(--bg-card);
}
.faq-item.active .faq-answer { max-height: 2000px; padding: 0 24px 20px; }
.faq-answer p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.8; }

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand img { height: 56px; margin-bottom: 16px; }
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; max-width: 360px; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; padding: 4px 0; transition: var(--transition); }
.footer-col a:hover { color: var(--accent-orange); }
.footer-bottom {
  border-top: 1px solid var(--border-subtle); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-muted);
}

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.95); backdrop-filter: blur(10px);
  justify-content: center; align-items: center; padding: 40px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 85vh; border-radius: var(--radius); box-shadow: 0 0 60px rgba(0,0,0,0.5); }
.lightbox-close {
  position: absolute; top: 24px; right: 32px;
  background: none; border: none; color: #fff; font-size: 2rem;
  cursor: pointer; opacity: 0.7; transition: var(--transition);
}
.lightbox-close:hover { opacity: 1; }
.lightbox-caption {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: var(--text-secondary); font-size: 0.9rem; text-align: center; max-width: 600px;
}

/* ========== SCROLL ANIMATIONS ========== */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { margin: 0 auto 36px; }
  .hero-buttons { justify-content: center; }
  .hero-image { max-width: 600px; margin: 40px auto 0; }
  .stats-bar { grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 28px 20px; }
  .stats-bar .stat-number { font-size: 2rem; }
  .problem-grid { grid-template-columns: repeat(2, 1fr); }
  .overnight-grid { grid-template-columns: 1fr; }
  .action-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1280px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed;                            /* fixed to viewport, not nav element */
    top: 72px; left: 0; right: 0;
    height: calc(100vh - 72px);                 /* full remaining viewport height */
    height: calc(100dvh - 72px);                /* dvh = dynamic viewport height — handles mobile address bar */
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 20px 24px;
    gap: 2px;
    overflow-y: auto;
    overscroll-behavior: contain;               /* stop scroll passthrough to body */
    -webkit-overflow-scrolling: touch;          /* iOS momentum */
    z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open a {
    padding: 14px 16px; font-size: 1rem; width: 100%;
    border-radius: 8px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-links.open li:last-child a { border-bottom: none; }
  .nav-toggle { display: inline-flex; }
  /* Backdrop scrim under the menu */
  .nav-backdrop {
    display: none; position: fixed; inset: 72px 0 0 0;
    background: rgba(0,0,0,0.55); z-index: 998;
  }
  .nav-backdrop.open { display: block; }
  /* Lock body scroll when nav is open */
  body.nav-open { overflow: hidden; touch-action: none; }
}
@media (max-width: 480px) {
  .nav-links.open a { padding: 12px 14px; font-size: 0.95rem; }
}
@media (max-width: 768px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); padding: 24px 16px; gap: 16px; }
  .stat-number { font-size: 1.7rem; }
  .stat-label { font-size: 0.78rem; }
  .stat-sublabel { font-size: 0.65rem; }
  .problem-grid { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr; }
  .impact-cards,
  .impact-cards[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .council-grid { grid-template-columns: 1fr !important; }
  .video-grid { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .rebuttal-row { grid-template-columns: 1fr !important; }
  .rebuttal-cell.claim { border-right: none !important; border-bottom: 1px solid var(--border-subtle); }
  .map-container { height: 350px; }
  .overnight-images { grid-template-columns: 1fr; }
  .petition-form-wrap { padding: 28px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  /* Update banner / large hero text reflow */
  .update-banner { padding: 22px 20px; margin: 32px auto 70px; }
  .update-banner h2 { font-size: 1.2rem; line-height: 1.35; }
  .update-banner .update-photos { grid-template-columns: repeat(2, 1fr); }
  .update-banner .update-links { flex-direction: column; }
  .update-banner .update-links .btn { width: 100%; text-align: center; }
  /* History timeline left padding tighter on mobile */
  .history-section { padding: 56px 0; }
  .history-timeline { padding-left: 18px; }
  .history-event { padding-left: 22px; padding-bottom: 28px; }
  .history-event::before { left: -18px; }
  .history-event .h-year { font-size: 1.35rem; display: block; }
  .history-event .h-source { display: block; margin-left: 0; margin-top: 2px; }
  /* Rebuttal & Greenbook callouts breathing room */
  .greenbook-callout, .history-closing { padding: 22px 20px; margin-left: 16px; margin-right: 16px; }
  /* Transcript blocks don't break layout */
  .transcript-block summary { padding: 16px 20px; font-size: 0.95rem; }
  .transcript-block summary .t-meta { display: block; margin-left: 0; margin-top: 4px; }
  .transcript-body { padding: 8px 18px 22px; max-height: 70vh; }
  /* Featured (vertical) video stacks */
  .video-featured { grid-template-columns: 1fr; }
  .video-featured .video-frame { aspect-ratio: 9/16; max-height: 70vh; }
  .video-featured .video-meta { padding: 18px 20px 22px; }
  /* Engineering rebuttal title softer */
  .section-title { font-size: 1.6rem; line-height: 1.25; }
  /* Section base padding */
  section { padding: 56px 0 !important; }
  /* Hero on mobile: shrink the bottom-fade gradient so it doesn't cover stacked content */
  .hero { padding: 96px 0 60px !important; min-height: auto !important; overflow: visible !important; }
  .hero::after { height: 60px !important; }
  .hero-content { gap: 32px; }
  .hero-text { padding-bottom: 0; }
  .hero-image { margin-top: 24px !important; }
  /* Nav: tighter mobile menu */
  .nav-inner { padding: 0 16px; height: 64px; }
  .nav-logo img { height: 36px; }
}
/* Extra-tight phone screens */
@media (max-width: 420px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); padding: 18px 12px; gap: 12px; }
  .stat-number { font-size: 1.5rem; }
  .update-banner .update-photos { grid-template-columns: 1fr; }
  .update-banner h2 { font-size: 1.1rem; }
  .hero h1 { font-size: 1.8rem !important; line-height: 1.2 !important; }
  .section-title { font-size: 1.4rem; }
}
/* Smooth scroll target offset so anchors don't hide behind the fixed nav */
[id^="meeting-"], #evidence, #videos, #history, #council, #documents, #rebuttal,
#overnight, #solutions, #faq, #action, #petition, #submit, #problem,
#danger-points, #narrative, #update-may2026 {
  scroll-margin-top: 90px;
}
html { scroll-behavior: smooth; }
