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

:root {
  --brand-primary: #1B4332;
  --brand-forest: #2D6A4F;
  --brand-mint: #40916C;
  --brand-emerald: #52B788;
  --brand-sage: #74C69D;
  --brand-pale: #D8F3DC;
  --brand-earth: #78350F;
  --brand-bark: #451A03;
  --brand-amber: #D97706;
  --brand-gold: #F59E0B;
  --brand-sand: #FAF7F2;
  --brand-surface: #FFFFFF;
  --brand-dark: #081C15;
  --brand-gray-50: #F8FAFC;
  --brand-gray-100: #F1F5F9;
  --brand-gray-200: #E2E8F0;
  --brand-gray-600: #475569;
  --brand-gray-900: #0F172A;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--brand-gray-900);
  background-color: var(--brand-sand);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Navigation & Header */
.nav-link {
  font-weight: 600;
  color: #334155;
  transition: all 0.2s ease;
  position: relative;
}
.nav-link:hover {
  color: var(--brand-forest);
}
.nav-link.active {
  color: var(--brand-forest);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2.5px;
  background-color: var(--brand-forest);
  border-radius: 2px;
}

/* Hero Section */
.hero-gradient {
  background: radial-gradient(circle at 80% 20%, rgba(82, 183, 136, 0.15) 0%, rgba(27, 67, 50, 0.03) 70%),
              linear-gradient(180deg, #FFFFFF 0%, #FAF7F2 100%);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

/* Card Styling */
.landworks-card {
  background: #FFFFFF;
  border: 1px solid var(--brand-gray-200);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.landworks-card:hover {
  border-color: #94A3B8;
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* Interactive Map Container */
#map {
  width: 100%;
  height: 100%;
  min-height: 480px;
  z-index: 10;
  border-radius: 0.75rem;
  background-color: #0F172A;
}

.map-viewport-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--brand-gray-200);
  box-shadow: inset 0 2px 4px 0 rgba(0,0,0,0.06);
}

/* Map Overlays & Toolbars */
.map-floating-bar {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  pointer-events: none;
}
.map-floating-bar > * {
  pointer-events: auto;
}

.map-status-pill {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 30;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Leaflet Custom Marker & Tooltip Overrides */
.leaflet-tooltip-landworks {
  background: rgba(27, 67, 50, 0.95);
  border: 1px solid #52B788;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  border-radius: 6px;
  padding: 4px 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.fence-marker-pin {
  background: #F59E0B;
  color: #78350F;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

/* Pulse Animation for AI Scanning */
@keyframes aiScanPulse {
  0% {
    transform: scale(0.98);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.01);
    box-shadow: 0 0 0 16px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.98);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.ai-scanning-active {
  animation: aiScanPulse 1.8s infinite;
  border: 2px solid #10B981 !important;
}

/* Radar Scan Line effect across map */
.radar-sweep-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #10B981, #6EE7B7, transparent);
  box-shadow: 0 0 15px 3px rgba(16, 185, 129, 0.6);
  z-index: 25;
  pointer-events: none;
  animation: sweepDown 2.2s ease-in-out infinite;
}

@keyframes sweepDown {
  0% { top: 0%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-forest) 0%, var(--brand-primary) 100%);
  color: #FFFFFF;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.65rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(27, 67, 50, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1B4332 0%, #081C15 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(27, 67, 50, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-accent {
  background: linear-gradient(135deg, var(--brand-amber) 0%, var(--brand-earth) 100%);
  color: #FFFFFF;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 0.65rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}
.btn-accent:hover {
  background: linear-gradient(135deg, #B45309 0%, #78350F 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(217, 119, 6, 0.35);
}

.btn-secondary {
  background: #FFFFFF;
  color: #334155;
  border: 1px solid #CBD5E1;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 0.65rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
}
.btn-secondary:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: #0F172A;
}

/* Mulch Color Swatches */
.mulch-swatch-radio {
  display: none;
}
.mulch-swatch-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 2px solid #E2E8F0;
  border-radius: 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #FFFFFF;
}
.mulch-swatch-label:hover {
  border-color: #94A3B8;
}
.mulch-swatch-radio:checked + .mulch-swatch-label {
  border-color: var(--brand-forest);
  background: #F0FDF4;
  box-shadow: 0 0 0 1px var(--brand-forest);
}

.swatch-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

/* Frequency radio cards */
.freq-card-radio {
  display: none;
}
.freq-card-label {
  display: block;
  padding: 0.85rem;
  border: 2px solid #E2E8F0;
  border-radius: 0.75rem;
  cursor: pointer;
  background: #FFFFFF;
  transition: all 0.2s ease;
  position: relative;
}
.freq-card-label:hover {
  border-color: #94A3B8;
}
.freq-card-radio:checked + .freq-card-label {
  border-color: var(--brand-forest);
  background: #F0FDF4;
}

/* Stepper Indicator */
.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: #E2E8F0;
  color: #64748B;
  transition: all 0.2s ease;
}
.step-dot.active {
  background: var(--brand-forest);
  color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.2);
}
.step-dot.completed {
  background: #10B981;
  color: #FFFFFF;
}

/* Quote Summary Box */
.quote-summary-panel {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF7F2 100%);
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  position: sticky;
  top: 1.5rem;
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Utility Animations */
.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  #map {
    min-height: 360px;
  }
}
