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

/* Swift Response - Enugu Design System */

:root {
  /* Brand Colors - Government Emergency Response Platform */
  --emerald: 158 64% 35%;
  --deep-green: 168 73% 20%;
  --charcoal: 180 10% 6%;
  --off-white: 200 14% 97%;
  --gold-accent: 45 68% 47%;
  
  /* Core Design Tokens */
  --background: 200 14% 97%;
  --foreground: 180 10% 6%;
  
  --card: 0 0% 100%;
  --card-foreground: 180 10% 6%;
  
  --popover: 0 0% 100%;
  --popover-foreground: 180 10% 6%;
  
  --primary: 158 64% 35%;
  --primary-foreground: 0 0% 100%;
  
  --secondary: 168 73% 20%;
  --secondary-foreground: 0 0% 100%;
  
  --muted: 200 14% 92%;
  --muted-foreground: 180 10% 35%;
  
  --accent: 45 68% 47%;
  --accent-foreground: 180 10% 6%;
  
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  
  --border: 200 14% 85%;
  --input: 200 14% 90%;
  --ring: 158 64% 35%;
  
  --radius: 0.75rem;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, hsl(var(--emerald)), hsl(var(--deep-green)));
  --gradient-hero: linear-gradient(180deg, hsl(var(--background)) 0%, hsl(var(--background) / 0) 100%);
  --gradient-card: linear-gradient(145deg, hsl(var(--card)), hsl(var(--card) / 0.98));
  --gradient-glass: linear-gradient(135deg, hsl(var(--card) / 0.8), hsl(var(--card) / 0.4));
  
  /* Shadows */
  --shadow-sm: 0 2px 4px hsl(var(--charcoal) / 0.05);
  --shadow-md: 0 4px 12px hsl(var(--charcoal) / 0.08);
  --shadow-lg: 0 8px 24px hsl(var(--charcoal) / 0.12);
  --shadow-xl: 0 16px 48px hsl(var(--charcoal) / 0.16);
  --shadow-glow: 0 0 40px hsl(var(--emerald) / 0.2);
  
  /* Transitions */
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
}

/* Glass morphism effects */
.glass {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: hsl(var(--card) / 0.8);
  border: 1px solid hsl(var(--border) / 0.5);
}

.glass-strong {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background-color: hsl(var(--card) / 0.9);
  border: 1px solid hsl(var(--border) / 0.3);
}

/* Card variants */
.card-hover {
  transition: var(--transition-base);
}

.card-hover:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-glow {
  transition: var(--transition-base);
}

.card-glow:hover {
  box-shadow: var(--shadow-glow);
}

/* Button base styles */
.btn-primary {
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  transition: var(--transition-base);
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.05);
}

.btn-secondary {
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  border: 2px solid hsl(var(--primary));
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  transition: var(--transition-base);
}

.btn-secondary:hover {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* Background gradients */
.bg-gradient-primary {
  background: var(--gradient-primary);
}

.bg-gradient-hero {
  background: var(--gradient-hero);
}

.bg-gradient-card {
  background: var(--gradient-card);
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out;
}

.animate-slide-up {
  animation: slide-up 0.8s ease-out;
}

.animate-scale-in {
  animation: scale-in 0.5s ease-out;
}

.animate-pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

/* Scroll animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

/* Mobile menu styles - Simple and reliable */
#mobile-menu {
  transition: all 0.3s ease-in-out;
  transform: translateY(-10px);
  opacity: 0;
}

#mobile-menu.show {
  transform: translateY(0);
  opacity: 1;
}

/* Mobile menu item animations */
#mobile-menu a {
  transform: translateX(-20px);
  opacity: 0.7;
  transition: all 0.2s ease;
}

#mobile-menu.show a {
  transform: translateX(0);
  opacity: 1;
  animation: slideInLeft 0.3s ease forwards;
}

#mobile-menu.show a:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.show a:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu.show a:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu.show a:nth-child(4) { animation-delay: 0.25s; }
#mobile-menu.show a:nth-child(5) { animation-delay: 0.3s; }
#mobile-menu.show a:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideInLeft {
  from {
    transform: translateX(-20px);
    opacity: 0.7;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--muted));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--primary));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--secondary));
}

/* Utility classes */
.text-balance {
  text-wrap: balance;
}

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

/* Responsive utilities */
@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 3rem;
  }
}

/* Focus styles for accessibility */
/* Soft, rounded, ease-in focus ring (≤2px) */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: none; /* replace default */
  border-radius: 6px;
  box-shadow: 0 0 0 2px hsl(var(--ring) / .15); /* subtle halo */
  transition: box-shadow .18s ease-in, border-radius .18s ease-in;
}

/* Remove focus borders for menu items and FAQ buttons */
.accordion-trigger:focus,
nav a:focus,
.mobile-menu a:focus,
header nav a:focus,
#mobile-menu a:focus {
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  button:focus,
  a:focus,
  input:focus,
  textarea:focus {
    transition: none;
  }
}

/* High-contrast fallback */
@media (forced-colors: active) {
  button:focus,
  a:focus,
  input:focus,
  textarea:focus {
    outline: 2px solid CanvasText;
    outline-offset: 2px;
    box-shadow: none;
  }
}


/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.back-to-top svg {
  color: white;
  width: 24px;
  height: 24px;
}

/* Parallax Section Styles */
.parallax-section {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Mobile fallback - disable parallax on mobile devices for better performance */
@media (max-width: 768px) {
  .parallax-section {
    background-attachment: scroll;
  }
}

/* iOS Safari fix */
@supports (-webkit-touch-callout: none) {
  .parallax-section {
    background-attachment: scroll;
  }
}

/* Incident Reporting Pins with Tooltips */
.incident-pin {
  position: absolute;
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
}

/* Pin Markers */
.pin-marker {
  width: 40px;
  height: 40px;
  border-radius: 50% 50% 50% 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  transform: rotate(-45deg);
  position: relative;
}

.pin-marker svg {
  transform: rotate(45deg);
}

/* Pin Marker Colors by Incident Type */
.fire-emergency {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  animation: pulse-red 2s infinite;
}

.medical-emergency {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  animation: pulse-orange 2s infinite;
}

.security-alert {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  animation: pulse-blue 2s infinite;
}

.traffic-accident {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  animation: pulse-purple 2s infinite;
}

.domestic-violence {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  animation: pulse-red 2s infinite;
}

.robbery {
  background: linear-gradient(135deg, #1f2937, #374151);
  animation: pulse-gray 2s infinite;
}

.missing-person {
  background: linear-gradient(135deg, #059669, #047857);
  animation: pulse-green 2s infinite;
}

.flood-alert {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  animation: pulse-sky 2s infinite;
}

/* Pulse animations for different incident types */
@keyframes pulse-red { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } }
@keyframes pulse-orange { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); } 50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); } }
@keyframes pulse-blue { 0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); } 50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); } }
@keyframes pulse-purple { 0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); } 50% { box-shadow: 0 0 0 8px rgba(139, 92, 246, 0); } }
@keyframes pulse-gray { 0%, 100% { box-shadow: 0 0 0 0 rgba(55, 65, 81, 0.7); } 50% { box-shadow: 0 0 0 8px rgba(55, 65, 81, 0); } }
@keyframes pulse-green { 0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); } 50% { box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); } }
@keyframes pulse-sky { 0%, 100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7); } 50% { box-shadow: 0 0 0 8px rgba(14, 165, 233, 0); } }

/* Tooltip Cards */
.incident-tooltip {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 16px;
  min-width: 280px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 50;
}

.incident-pin:hover .incident-tooltip {
  opacity: 1;
  pointer-events: auto;
  bottom: 55px;
}

.incident-pin:hover .pin-marker {
  transform: rotate(-45deg) scale(1.1);
}

/* Tooltip Header */
.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid hsl(var(--border));
}

.incident-type {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.incident-type.fire { color: #ef4444; }
.incident-type.medical { color: #f59e0b; }
.incident-type.security { color: #3b82f6; }
.incident-type.traffic { color: #8b5cf6; }
.incident-type.violence { color: #ef4444; }
.incident-type.robbery { color: #374151; }
.incident-type.missing { color: #059669; }
.incident-type.flood { color: #0ea5e9; }

.incident-time {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted));
  padding: 4px 8px;
  border-radius: 6px;
}

/* Victim Info */
.victim-info strong {
  font-size: 16px;
  color: hsl(var(--foreground));
  display: block;
  margin-bottom: 6px;
}

.victim-info p {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  margin-bottom: 8px;
}

.coordinates {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  background: hsl(var(--muted));
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* Pin Positioning - Scattered across hero section */
.pin-1 {
  top: 15%;
  left: 12%;
}

.pin-2 {
  top: 25%;
  right: 15%;
}

.pin-3 {
  top: 40%;
  left: 20%;
}

.pin-4 {
  top: 50%;
  right: 25%;
}

.pin-5 {
  top: 65%;
  left: 8%;
}

.pin-6 {
  top: 75%;
  right: 12%;
}

.pin-7 {
  top: 85%;
  left: 35%;
}

.pin-8 {
  top: 30%;
  left: 45%;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .incident-tooltip {
    min-width: 240px;
    padding: 12px;
  }

  .pin-marker {
    width: 32px;
    height: 32px;
  }

  /* Hide some pins on mobile to reduce clutter */
  .pin-6, .pin-7, .pin-8 {
    display: none;
  }
}

/* Tooltip arrow */
.incident-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: hsl(var(--card));
}