/* ClaimScout - styles.css */
:root {
  --green-dark: #2d4a22;
  --green-mid: #3d6630;
  --green-light: #4a7a3a;
  --gold: #d4a843;
  --gold-hover: #c49a35;
  --cream: #f5f0e8;
  --cream-dark: #e8e0d0;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #7a7a7a;
  --white: #ffffff;
  --border: #d0c8b8;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-md: rgba(0, 0, 0, 0.12);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Navigation ---- */
.site-header {
  background: var(--green-dark);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

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

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-cta {
  background: var(--gold) !important;
  color: var(--green-dark) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--gold-hover) !important;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, #1a3314 100%);
  color: var(--white);
  padding: 6rem 1.5rem 5rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 800px;
  margin: 0 auto 1.25rem;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.5;
}

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dark);
  padding: 1rem 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  transition: background 0.2s, transform 0.15s;
  border: none;
  cursor: pointer;
}

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

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--white);
  padding: 1rem 2.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.05);
}

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

.hero-trust {
  margin-top: 3rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---- Section Shared ---- */
.section {
  padding: 5rem 1.5rem;
}

.section .container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--green-dark);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1.1rem;
}

/* ---- Features ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: box-shadow 0.2s;
}

.feature-card:hover {
  box-shadow: 0 4px 20px var(--shadow-md);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--green-dark);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ---- Pricing ---- */
.pricing-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 4px 24px var(--shadow-md);
  transform: scale(1.03);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--green-dark);
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: "\2713";
  color: var(--green-mid);
  font-weight: 700;
  flex-shrink: 0;
}

.btn-pricing {
  display: block;
  width: 100%;
  padding: 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  transition: background 0.2s;
}

.btn-pricing-primary {
  background: var(--gold);
  color: var(--green-dark);
}

.btn-pricing-primary:hover {
  background: var(--gold-hover);
}

.btn-pricing-outline {
  background: transparent;
  color: var(--green-dark);
  border: 2px solid var(--border);
}

.btn-pricing-outline:hover {
  border-color: var(--green-dark);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 1.5rem;
}

.site-footer .container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-copy {
  font-size: 0.85rem;
}

/* ---- Map Page ---- */
.map-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.map-header {
  flex-shrink: 0;
}

.map-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.map-sidebar {
  width: 320px;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  overflow-y: auto;
  flex-shrink: 0;
}

.map-sidebar h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 1rem;
}

.sidebar-section {
  margin-bottom: 1.75rem;
}

.sidebar-section label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--cream);
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
}

.sidebar-select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stat-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.sidebar-cta {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: var(--white);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
}

.sidebar-cta h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.sidebar-cta p {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.sidebar-cta .btn-primary {
  display: block;
  padding: 0.65rem;
  font-size: 0.95rem;
}

#map-container {
  flex: 1;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 12px var(--shadow-md);
  z-index: 800;
  font-weight: 600;
  color: var(--text-secondary);
}

.popup-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
}

.popup-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--cream-dark);
}

.popup-row:last-of-type {
  border-bottom: none;
}

.popup-label {
  color: var(--text-muted);
  font-weight: 500;
}

.popup-value {
  color: var(--text-primary);
  font-weight: 600;
}

.popup-blur {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--cream);
  border-radius: 6px;
  text-align: center;
  filter: none;
}

.popup-blur p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.popup-blur a {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dark);
  padding: 0.35rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---- About Page ---- */
.page-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.page-content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 1rem;
}

.page-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.page-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.page-content ul {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

.data-attribution {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.data-attribution h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
}

.data-attribution p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .features-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .pricing-card.featured {
    transform: none;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero .subtitle {
    font-size: 1.05rem;
  }

  .map-body {
    flex-direction: column;
  }

  .map-sidebar {
    width: 100%;
    max-height: 240px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--green-dark);
    padding: 1rem 1.5rem;
    gap: 1rem;
    border-bottom: 3px solid var(--gold);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
