/* ========================================
   San Juan County Budget Visualization
   Dark Theme + Glassmorphism
   ======================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary:    #0a0f1a;
  --bg-secondary:  #0f1629;
  --bg-card:       rgba(15, 22, 41, 0.65);
  --glass-border:  rgba(255, 255, 255, 0.08);
  --glass-bg:      rgba(255, 255, 255, 0.04);
  --accent:        #00d4ff;
  --accent-glow:   rgba(0, 212, 255, 0.25);
  --amber:         #ff9f43;
  --amber-glow:    rgba(255, 159, 67, 0.25);
  --red:           #ff4757;
  --green:         #2ed573;
  --text-primary:  #e8ecf1;
  --text-secondary:#8892a4;
  --text-muted:    #7e8a9d;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --section-padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 5vw, 4rem);
  --max-width:     1200px;
  --radius:        16px;
  --radius-sm:     10px;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Accessibility base ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 10px 10px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--text-primary);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sim-slider:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 6px;
}
.sim-slider::-webkit-slider-thumb:focus {
  box-shadow: 0 0 0 4px var(--accent-glow);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-scroll-hint {
    animation: none !important;
  }
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }

img { max-width: 100%; display: block; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  max-width: 640px;
  line-height: 1.7;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

section {
  padding: var(--section-padding);
  position: relative;
}

/* ---------- Glassmorphism Card ---------- */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}
.site-nav.scrolled {
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.6rem 2rem;
  border-bottom: 1px solid var(--glass-border);
}
.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo .logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), #0088cc);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  opacity: 1;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-cao-link {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- Hero Section ---------- */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}
#globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 2;
  pointer-events: none;
  max-width: 700px;
}
.hero-supline {
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.hero-description {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.hero-budget-total {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #7dd3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 40px var(--accent-glow));
  line-height: 1;
  margin-bottom: 0.5rem;
}
.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 2rem;
}
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 2s ease-in-out infinite;
}
.hero-scroll-hint .arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Budget at a Glance ---------- */
#overview {
  background: var(--bg-secondary);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
}
.stat-card .stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-card .stat-value.accent  { color: var(--accent); }
.stat-card .stat-value.amber   { color: var(--amber); }
.stat-card .stat-value.red     { color: var(--red); }
.stat-card .stat-value.green   { color: var(--green); }
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.stat-card .stat-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Info button — sits inline to the right of the stat value */
.stat-value-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.stat-value-row .stat-value {
  margin-bottom: 0;
}
.stat-info-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  font-style: normal;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.stat-info-btn:hover,
.stat-info-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.1);
}

/* Info popup */
.stat-info-popup {
  background: rgba(10, 15, 26, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(16px);
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: left;
  margin: 0.5rem 0 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease, margin 0.3s ease;
}
.stat-info-popup.visible {
  max-height: 200px;
  opacity: 1;
  padding: 0.85rem 1rem;
}

/* ---------- Revenue / Expenditure Chart Sections ---------- */
#revenue, #expenditures {
  position: relative;
}
.expenditure-total {
  text-align: center;
  margin-top: 2.5rem;
}
.expenditure-total-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--accent);
}
.expenditure-total-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 0.25rem;
}
.expenditure-total-context {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.chart-container {
  width: 100%;
  max-width: 800px;
  margin: 2.5rem auto 0;
  position: relative;
}
.chart-container svg,
.chart-container canvas {
  width: 100%;
  height: auto;
}
.chart-tooltip {
  position: absolute;
  background: rgba(10, 15, 26, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 50;
  backdrop-filter: blur(12px);
  max-width: 300px;
}
.chart-tooltip.visible { opacity: 1; }
.chart-tooltip .tooltip-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}
.chart-tooltip .tooltip-value {
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
}
.chart-tooltip .tooltip-pct {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: opacity 0.2s;
}
.legend-item:hover { opacity: 0.7; }
.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ---------- Tooltip line items ---------- */
.tooltip-detail {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.tooltip-line-item {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  padding: 3px 0;
}
.tooltip-line-item span:first-child {
  flex: 1;
  min-width: 0;
}
.tooltip-line-item span:last-child {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Department detail panel ---------- */
.dept-detail-panel {
  display: none;
  margin-top: 1.5rem;
  padding: 1.5rem;
  animation: fadeSlideUp 0.3s ease;
}
.dept-detail-panel.visible {
  display: block;
}
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.detail-header h3 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}
.detail-total {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.detail-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}
.detail-close:hover { color: var(--text-primary); }
.detail-items {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.detail-row-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem;
  margin-bottom: 0.2rem;
}
.detail-row-name {
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex: 1;
  min-width: 0;
}
.detail-row-amount {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.detail-row-pct {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.25rem;
}
.detail-row-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}
.detail-row-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- All Funds Overview ---------- */
#all-funds {
  background: var(--bg-primary);
}
.all-funds-total {
  text-align: center;
  margin-top: 2.5rem;
}
.all-funds-total-value {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #7dd3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.all-funds-total-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 0.25rem;
}
.all-funds-svg text {
  font-family: var(--font-body);
}
.fund-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.fund-card {
  padding: 1.25rem 1.5rem;
}
.fund-card--general {
  border: 1px solid rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.08);
}
.fund-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.fund-card-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.fund-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.fund-card-amount {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.fund-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.fund-card-source {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- Areas of Concern ---------- */
#concerns {
  background: var(--bg-primary);
}
.concern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.concern-card {
  padding: 1.75rem;
  position: relative;
  border-left: 3px solid var(--amber);
}
.concern-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.concern-card-icon {
  font-size: 1.5rem;
}
.concern-severity {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
}
.concern-severity.high {
  background: rgba(255, 71, 87, 0.15);
  color: var(--red);
  border: 1px solid rgba(255, 71, 87, 0.3);
}
.concern-severity.medium {
  background: rgba(255, 159, 67, 0.12);
  color: var(--amber);
  border: 1px solid rgba(255, 159, 67, 0.25);
}
.concern-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.concern-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.concern-savings {
  display: inline-block;
  background: rgba(255, 159, 67, 0.1);
  border: 1px solid rgba(255, 159, 67, 0.2);
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--amber);
}

/* ---------- Shortfall Section ---------- */
#shortfall {
  background: var(--bg-secondary);
}
.shortfall-visual {
  max-width: 700px;
  margin: 2.5rem auto 0;
}
.gap-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.gap-bar {
  position: relative;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}
.gap-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.gap-bar-fill.revenue { background: linear-gradient(90deg, #00d4ff33, #00d4ff88); }
.gap-bar-fill.expense { background: linear-gradient(90deg, #ff475733, #ff475788); }
.gap-bar-label {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.levy-explainer {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.levy-card {
  padding: 1.5rem;
}
.levy-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.levy-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.levy-card .rate {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0.5rem 0;
}
.levy-card .rate.slow { color: var(--accent); }
.levy-card .rate.fast { color: var(--red); }

/* ---------- Simulator Section ---------- */
#simulator {
  background: var(--bg-primary);
}
.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}
.simulator-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sim-slider-group {
  padding: 1rem 1.25rem;
}
.sim-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.sim-slider-label {
  font-size: 0.85rem;
  font-weight: 600;
}
.sim-slider-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 70px;
  text-align: right;
}
.sim-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
}
.sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  cursor: pointer;
  transition: transform 0.15s;
}
.sim-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
.sim-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  border: none;
  cursor: pointer;
}

.sim-results {
  position: sticky;
  top: 6rem;
}
.sim-total-bar {
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.sim-total-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}
.sim-total-value {
  font-size: 2.2rem;
  font-weight: 800;
}
.sim-total-value.surplus { color: var(--green); }
.sim-total-value.deficit { color: var(--red); }

.sim-chart-box {
  padding: 1.5rem;
  min-height: 300px;
}

.scenario-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.scenario-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.scenario-btn:hover,
.scenario-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.property-tax-calc {
  margin-top: 1.5rem;
  padding: 1.5rem;
  text-align: center;
}
.ptax-result {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 800;
  color: var(--amber);
  margin: 0.5rem 0;
}
.ptax-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---------- AI Opportunities ---------- */
#ai-opportunities {
  background: var(--bg-secondary);
}
.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.ai-card {
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}
.ai-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.ai-card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}
.ai-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.ai-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.ai-savings {
  display: inline-block;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Property Tax Roadmap ---------- */
#tax-roadmap {
  background: var(--bg-primary);
}
.roadmap-timeline {
  position: relative;
  max-width: 700px;
  margin: 2.5rem auto 0;
  padding-left: 2rem;
}
.roadmap-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--green));
}
.roadmap-step {
  position: relative;
  padding: 0 0 2.5rem 2rem;
}
.roadmap-step::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: translateX(-6px);
}
.roadmap-step:last-child { padding-bottom: 0; }
.roadmap-step h4 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}
.roadmap-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.services-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.services-col h4 {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid;
}
.services-col.essential h4 { border-color: var(--green); color: var(--green); }
.services-col.optional h4  { border-color: var(--amber); color: var(--amber); }
.service-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.service-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.essential .service-dot { background: var(--green); }
.optional .service-dot  { background: var(--amber); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: 3rem clamp(1rem, 5vw, 4rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.5rem;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 0.4rem;
}
.footer-col a {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- Utility ---------- */
.reveal { opacity: 0; transform: translateY(30px); }
.reveal.visible { opacity: 1; transform: translateY(0); transition: opacity 0.8s ease, transform 0.8s ease; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #7dd3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.divider {
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 1rem 0 1.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .simulator-layout {
    grid-template-columns: 1fr;
  }
  .sim-results {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .levy-explainer {
    grid-template-columns: 1fr;
  }
  .services-toggle {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .fund-cards-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: absolute;
    top: 100%;
    right: 1rem;
    left: auto;
    width: auto;
    min-width: 180px;
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    padding: 0 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
  }
  .nav-links.open {
    max-height: 500px;
    padding: 0.75rem 1.5rem;
    gap: 0.6rem;
    border-color: var(--glass-border);
  }
  .nav-hamburger { display: flex; }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ai-grid {
    grid-template-columns: 1fr;
  }
  .concern-grid {
    grid-template-columns: 1fr;
  }
}

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