/* ============================================
   FastMapr — Design System
   Concept: Coastal tech / nautical modern
   Primary: Deep teal (ocean, navigation)
   Accent: Warm amber (sunshine, Florida)
   ============================================ */

/* --- Design Tokens --- */
:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f6f5f1;
  --color-surface: #faf9f6;
  --color-surface-2: #ffffff;
  --color-surface-offset: #f0eee9;
  --color-surface-offset-2: #e8e5de;
  --color-surface-dynamic: #dedbd4;
  --color-divider: #e2dfd9;
  --color-border: #d6d2ca;

  /* Text */
  --color-text: #1a1d24;
  --color-text-muted: #5c6068;
  --color-text-faint: #9ca0a8;
  --color-text-inverse: #f9f8f4;

  /* Primary — Deep Teal (ocean/navigation) */
  --color-primary: #0d6e6a;
  --color-primary-hover: #0a5552;
  --color-primary-active: #07403e;
  --color-primary-highlight: #c8e4e1;
  --color-primary-surface: #e8f3f1;

  /* Accent — Amber (sunshine/Florida) */
  --color-accent: #e89100;
  --color-accent-hover: #d07a00;
  --color-accent-active: #b56800;
  --color-accent-highlight: #fdf0d5;
  --color-accent-surface: #fef7e8;

  /* Blue */
  --color-blue: #2563eb;
  --color-blue-hover: #1d4ed8;
  --color-blue-highlight: #dbeafe;

  /* Status */
  --color-success: #15803d;
  --color-success-highlight: #dcfce7;
  --color-warning: #b45309;
  --color-warning-highlight: #fef3c7;
  --color-error: #be123c;
  --color-error-highlight: #ffe4e6;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(13, 110, 106, 0.06);
  --shadow-md: 0 4px 16px rgba(13, 110, 106, 0.08);
  --shadow-lg: 0 16px 48px rgba(13, 110, 106, 0.12);
  --shadow-xl: 0 24px 64px rgba(13, 110, 106, 0.16);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 1080px;
  --content-wide: 1280px;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Inter', sans-serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;
}

/* Dark mode */
[data-theme='dark'] {
  --color-bg: #0f1419;
  --color-surface: #161c24;
  --color-surface-2: #1c242e;
  --color-surface-offset: #1a2028;
  --color-surface-offset-2: #212832;
  --color-surface-dynamic: #2a323e;
  --color-divider: #252d38;
  --color-border: #2e3744;

  --color-text: #d4dae4;
  --color-text-muted: #7a8290;
  --color-text-faint: #4f5663;
  --color-text-inverse: #1a1d24;

  --color-primary: #2dd4bf;
  --color-primary-hover: #14b8a6;
  --color-primary-active: #0d9488;
  --color-primary-highlight: #134e4a;
  --color-primary-surface: #0d3a37;

  --color-accent: #fbbf24;
  --color-accent-hover: #f59e0b;
  --color-accent-active: #d97706;
  --color-accent-highlight: #422006;
  --color-accent-surface: #2a1f08;

  --color-blue: #60a5fa;
  --color-blue-hover: #3b82f6;
  --color-blue-highlight: #1e3a5f;

  --color-success: #4ade80;
  --color-success-highlight: #14532d;
  --color-warning: #fbbf24;
  --color-warning-highlight: #422006;
  --color-error: #f87171;
  --color-error-highlight: #4c0519;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0f1419;
    --color-surface: #161c24;
    --color-surface-2: #1c242e;
    --color-surface-offset: #1a2028;
    --color-surface-offset-2: #212832;
    --color-surface-dynamic: #2a323e;
    --color-divider: #252d38;
    --color-border: #2e3744;
    --color-text: #d4dae4;
    --color-text-muted: #7a8290;
    --color-text-faint: #4f5663;
    --color-text-inverse: #1a1d24;
    --color-primary: #2dd4bf;
    --color-primary-hover: #14b8a6;
    --color-primary-active: #0d9488;
    --color-primary-highlight: #134e4a;
    --color-primary-surface: #0d3a37;
    --color-accent: #fbbf24;
    --color-accent-hover: #f59e0b;
    --color-accent-active: #d97706;
    --color-accent-highlight: #422006;
    --color-accent-surface: #2a1f08;
    --color-blue: #60a5fa;
    --color-blue-hover: #3b82f6;
    --color-blue-highlight: #1e3a5f;
    --color-success: #4ade80;
    --color-success-highlight: #14532d;
    --color-warning: #fbbf24;
    --color-warning-highlight: #422006;
    --color-error: #f87171;
    --color-error-highlight: #4c0519;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.6);
  }
}

/* --- Type Scale --- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 7vw, 6rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

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

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role='list'], ol[role='list'] {
  list-style: none;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.15;
  font-family: var(--font-display);
  font-weight: 700;
}

p, li, figcaption {
  text-wrap: pretty;
  max-width: 72ch;
}

::selection {
  background: rgba(45, 212, 191, 0.25);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@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;
  }
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

a, button, [role='button'], [role='link'], input, textarea, select {
  transition: color var(--transition-interactive), background var(--transition-interactive),
    border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-interactive);
  cursor: pointer;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn--primary:active {
  background: var(--color-primary-active);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-text-faint);
}

.btn--ghost:active {
  background: var(--color-surface-offset-2);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.text-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.text-link:hover {
  text-decoration: underline;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: var(--color-primary-surface);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow var(--transition-interactive);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-3) var(--space-6);
  gap: var(--space-6);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
}

.logo__icon {
  flex-shrink: 0;
}

.nav {
  display: flex;
  gap: var(--space-6);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  text-decoration: none;
}

.nav__link:hover {
  color: var(--color-text);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

/* --- Hero --- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: var(--space-16);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: clamp(var(--space-16), 8vw, var(--space-32)) var(--space-6) clamp(var(--space-12), 6vw, var(--space-24));
  min-height: 80vh;
}

.hero__content {
  display: flex;
  flex-direction: column;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  background: linear-gradient(in oklab, var(--color-text), var(--color-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 56ch;
}

.hero__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
}

.hero__stats {
  display: flex;
  gap: var(--space-12);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat__num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.hero__visual {
  position: relative;
  height: 480px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.map-preview {
  width: 100%;
  height: 100%;
}

.map-badge {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}

.map-badge svg {
  color: var(--color-accent);
}

/* --- Sections --- */
.section {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) var(--space-6);
  scroll-margin-top: 80px;
}

.section--alt {
  background: var(--color-surface);
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-16);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.section__desc {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

/* --- Demo Map --- */
.demo-map-wrapper {
  max-width: var(--content-wide);
  margin: 0 auto;
  background: var(--color-surface-2);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
  align-items: center;
}

.control-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.control-label {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.toggle-group {
  display: flex;
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}

.toggle-btn {
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
}

.toggle-btn.active {
  background: var(--color-surface-2);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.filter-chips {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.chip {
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
  cursor: pointer;
}

.chip.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.chip:hover:not(.active) {
  border-color: var(--color-text-faint);
  color: var(--color-text);
}

.demo-map {
  width: 100%;
  height: 500px;
}

/* --- Demo Layout (map + side panel) --- */
.demo-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  min-height: 500px;
}

.demo-layout .demo-map {
  height: 560px;
  border-right: 1px solid var(--color-divider);
}

/* --- POI Side Panel --- */
.poi-panel {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  max-height: 560px;
  overflow: hidden;
}

.poi-panel__header {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}

.input--search {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
}

.poi-panel__list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2);
}

.poi-panel__list::-webkit-scrollbar {
  width: 6px;
}

.poi-panel__list::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

.poi-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-interactive);
  border-left: 3px solid transparent;
}

.poi-item:hover {
  background: var(--color-surface-offset);
}

.poi-item--active {
  background: var(--color-primary-surface);
  border-left-color: var(--color-primary);
}

.poi-item__icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.poi-item__body {
  flex: 1;
  min-width: 0;
}

.poi-item__name {
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poi-item__address {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poi-panel__empty {
  padding: var(--space-8);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* --- Edit Mode --- */
.control-group--right {
  margin-left: auto;
}

.control-group--right .btn {
  font-size: var(--text-xs);
}

#edit-toggle.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

.poi-panel__edit {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-3);
}

.poi-table-wrapper {
  overflow-x: auto;
}

.poi-table {
  width: 100%;
  font-size: var(--text-xs);
  border-collapse: collapse;
}

.poi-table th {
  text-align: left;
  padding: var(--space-2);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  border-bottom: 1px solid var(--color-divider);
}

.poi-table td {
  padding: 2px;
  border-bottom: 1px solid var(--color-divider);
}

.poi-table input {
  width: 100%;
  padding: var(--space-1) var(--space-2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: var(--text-xs);
  color: var(--color-text);
  font-family: var(--font-body);
}

.poi-table input:focus {
  border-color: var(--color-primary);
  background: var(--color-surface-2);
  outline: none;
  box-shadow: 0 0 0 2px var(--color-primary-highlight);
}

.poi-table input[type="number"] {
  font-family: monospace;
  width: 80px;
}

.poi-panel__hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  text-align: center;
}

/* --- Chip counts --- */
.chip-count {
  display: inline-block;
  margin-left: var(--space-1);
  padding: 0 6px;
  font-size: 10px;
  font-weight: 600;
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}

.chip.active .chip-count {
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-text-inverse);
}

/* --- Case Studies --- */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  max-width: var(--content-wide);
  margin: 0 auto;
}

.case-study-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}

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

.case-study-card__image {
  height: 200px;
  background: var(--color-surface-offset);
  position: relative;
}

.case-study-card__map-preview {
  width: 100%;
  height: 100%;
}

.case-study-card__body {
  padding: var(--space-6);
}

.case-study-card__tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.case-study-card__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.case-study-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.case-study-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
}

.case-study-card__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
}

/* --- Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: var(--content-wide);
  margin: 0 auto;
}

.feature-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}

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

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-primary-surface);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.feature-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.feature-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Wizard --- */
.wizard {
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.wizard__progress {
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface-offset);
}

.progress-track {
  height: 4px;
  background: var(--color-surface-dynamic);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(in oklab, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
}

.progress-step {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-faint);
  transition: color var(--transition-interactive);
}

.progress-step.active {
  color: var(--color-primary);
}

.wizard__step {
  display: none;
  padding: var(--space-8);
}

.wizard__step.active {
  display: block;
}

.wizard__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.wizard__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

/* --- Choice Cards --- */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.choice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-interactive);
}

.choice-card:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-surface);
}

.choice-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-surface);
  box-shadow: var(--shadow-sm);
}

.choice-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: var(--space-1);
}

.choice-label {
  font-size: var(--text-sm);
  font-weight: 600;
}

.choice-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.choice-card--toggle.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-surface);
}

/* --- Location Inputs --- */
.location-inputs {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.location-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--space-2);
  align-items: center;
}

.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-sm);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}

.input::placeholder {
  color: var(--color-text-faint);
}

.remove-location {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: var(--text-sm);
}

/* --- Wizard Nav --- */
.wizard__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-6);
}

/* --- Wizard Map --- */
.wizard-map {
  width: 100%;
  height: 360px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
}

.wizard-summary {
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}

.wizard-summary__item {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-divider);
}

.wizard-summary__item:last-child {
  border-bottom: none;
}

.wizard-summary__label {
  color: var(--color-text-muted);
}

.wizard-summary__value {
  font-weight: 500;
}

/* --- Contact Form --- */
.contact-form {
  background: var(--color-surface-offset);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-top: var(--space-6);
}

.contact-form__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.contact-form__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.contact-form .input {
  margin-bottom: var(--space-3);
}

.form-success {
  background: var(--color-success-highlight);
  color: var(--color-success);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  margin-top: var(--space-3);
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: var(--content-wide);
  margin: 0 auto;
}

.pricing-card {
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}

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

.pricing-card--featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pricing-card__name {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.pricing-card__price {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.pricing-card__period {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
}

.pricing-card__setup {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.pricing-card__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.pricing-card__features li {
  font-size: var(--text-sm);
  position: relative;
  padding-left: var(--space-6);
}

.pricing-card__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230d6e6a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain;
}

[data-theme='dark'] .pricing-card__features li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232dd4bf' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.pricing-note {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-8);
}

/* --- CTA Section --- */
.cta-section {
  padding: clamp(var(--space-16), 8vw, var(--space-24)) var(--space-6);
}

.cta-box {
  text-align: center;
  background: linear-gradient(in oklab, var(--color-primary), var(--color-primary-active));
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-12), 6vw, var(--space-20));
  max-width: var(--content-wide);
  margin: 0 auto;
}

.cta-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text-inverse);
  margin-bottom: var(--space-4);
}

.cta-desc {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-8);
  max-width: 56ch;
  margin-inline: auto;
}

.cta-box .btn--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #1a1d24;
}

.cta-box .btn--primary:hover {
  background: var(--color-accent-hover);
}

/* --- Footer --- */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  padding: var(--space-16) var(--space-6) var(--space-8);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-12);
  max-width: var(--content-wide);
  margin-inline: auto;
  margin-bottom: var(--space-12);
}

.footer__brand {
  max-width: 320px;
}

.logo--footer {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.footer__location {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.footer__heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.footer__link {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-1) 0;
}

.footer__link:hover {
  color: var(--color-primary);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}

.footer__bottom p {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* --- Leaflet overrides --- */
.leaflet-container {
  font-family: var(--font-body);
  background: var(--color-surface-offset);
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.leaflet-popup-content {
  margin: var(--space-4);
  font-size: var(--text-sm);
}

.leaflet-popup-content h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.leaflet-popup-content p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0;
}

.leaflet-control-zoom a {
  border-radius: var(--radius-sm) !important;
}

.leaflet-control-attribution {
  font-size: 10px;
  background: color-mix(in oklab, var(--color-surface) 80%, transparent);
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
    padding-top: var(--space-12);
    min-height: auto;
  }

  .hero__content {
    align-items: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__visual {
    height: 400px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .header__inner {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-3);
  }

  .hero {
    padding-inline: var(--space-4);
  }

  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--space-4);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .location-row {
    grid-template-columns: 1fr;
  }

  .remove-location {
    justify-self: end;
  }

  .demo-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .demo-map {
    height: 360px;
  }

  .demo-layout {
    grid-template-columns: 1fr;
  }

  .demo-layout .demo-map {
    height: 360px;
    border-right: none;
    border-bottom: 1px solid var(--color-divider);
  }

  .poi-panel {
    max-height: 300px;
  }

  .case-studies-grid {
    grid-template-columns: 1fr;
  }

  .wizard__step {
    padding: var(--space-6);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer__links {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-2);
  }

  .cta-box {
    padding: var(--space-8);
  }
}
