/* ========== RESET & BASE ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a26;
    --border: #1e1e2e;
    --text: #e4e4ef;
    --text-muted: #8888a0;
    --primary: #00C853;
    --primary-light: #00E676;
    --green: #00C853;
    --orange: #FDCB6E;
    --red: #fd7979;
    --gradient: linear-gradient(135deg, #00C853, #00E676);
    --gradient-text: linear-gradient(135deg, #00E676, #69F0AE);
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: 0 0 8px 8px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 9999;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

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

/* ========== NAV ========== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}
.nav.scrolled {
    padding: 10px 0;
    border-bottom-color: var(--border);
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 8px;
    transition: var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--bg-card); }
.nav-link-active { color: var(--primary); }
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}
.mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}
.mobile-menu a:hover { background: var(--bg-card); }

/* ========== BUTTONS ========== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--gradient);
    color: #000;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: var(--transition);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,200,83,0.3); }
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: var(--transition);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost {
    padding: 8px 16px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition);
}
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ========== HERO ========== */
.hero {
    position: relative;
    padding: 160px 0 80px;
    text-align: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}
.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}
.glow-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    left: 20%;
}
.glow-2 {
    width: 400px;
    height: 400px;
    background: #00E676;
    bottom: -50px;
    right: 15%;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(0, 200, 83, 0.08);
    border: 1px solid rgba(0, 200, 83, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
}
.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
}
.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== STATS ========== */
.stats-section {
    padding: 40px 0 60px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: center;
}
.stat-item {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.stat-value {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}
.stat-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ========== FEATURES ========== */
.features-section {
    padding: 60px 0 80px;
}
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.feature-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}
.feature-card:hover {
    border-color: rgba(0, 200, 83, 0.3);
    transform: translateY(-2px);
}
.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 200, 83, 0.1);
    border-radius: 10px;
    color: var(--primary);
    margin-bottom: 16px;
}
.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ========== EXPLORER ========== */
.explorer-section {
    border-top: 1px solid var(--border);
}
.explorer-header {
    padding: 32px 0 20px;
}
.explorer-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.results-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}
.explorer-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.explorer-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.toolbar-select {
    width: auto;
    min-width: 180px;
}
.view-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.view-btn {
    padding: 7px 10px;
    color: var(--text-muted);
    background: var(--bg-card);
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
}
.view-btn + .view-btn { border-left: 1px solid var(--border); }
.view-btn:hover { color: var(--text); }
.view-btn-active { color: var(--primary); background: rgba(0,200,83,0.08); }
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.explorer-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    height: 75vh;
    min-height: 500px;
    border-top: 1px solid var(--border);
}

/* Filter Sidebar */
.filter-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.filter-toggle-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}
.filter-controls {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.filter-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.filter-input,
.filter-select {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    transition: var(--transition);
}
.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.1);
}
.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%238888a0' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}
.filter-select option {
    background: var(--bg);
    color: var(--text);
}

/* Property List */
.property-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.property-list::-webkit-scrollbar {
    width: 6px;
}
.property-list::-webkit-scrollbar-track {
    background: transparent;
}
.property-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.property-card {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 6px;
}
.property-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border);
}
.property-card-active {
    background: var(--bg-card-hover);
    border-color: var(--primary) !important;
}
.property-name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.property-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.property-meta svg {
    flex-shrink: 0;
}
.property-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}
.property-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--orange);
}
.property-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(0, 200, 83, 0.08);
    border: 1px solid rgba(0, 200, 83, 0.15);
    border-radius: 100px;
    font-size: 0.7rem;
    color: var(--primary);
    white-space: nowrap;
}

.load-more-btn {
    width: calc(100% - 16px);
    margin: 8px;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.load-more-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Map */
.map-container {
    position: relative;
}
/* Leaflet dark popup */
.dark-popup .leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    color: var(--text) !important;
    font-family: 'Inter', sans-serif !important;
    box-shadow: var(--shadow) !important;
}
.dark-popup .leaflet-popup-tip {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
}
.dark-popup .leaflet-popup-content {
    margin: 14px 16px !important;
    font-size: 0.85rem;
    line-height: 1.5;
}
.dark-popup .leaflet-popup-close-button {
    color: var(--text-muted) !important;
    font-size: 20px !important;
}
.dark-popup .leaflet-popup-close-button:hover {
    color: var(--text) !important;
}
.popup-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    line-height: 1.3;
}
.popup-location {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.popup-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}
.popup-rating {
    font-size: 0.8rem;
    color: var(--orange);
    margin-bottom: 10px;
}
.popup-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.popup-summary {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.5;
    border-top: 1px solid var(--border);
    padding-top: 8px;
}
/* Leaflet controls dark theme */
.leaflet-control-zoom a {
    background: var(--bg-card) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover {
    background: var(--bg-card-hover) !important;
}
.leaflet-control-attribution {
    background: rgba(10, 10, 15, 0.7) !important;
    color: var(--text-muted) !important;
    font-size: 0.65rem !important;
}
.leaflet-control-attribution a { color: var(--text-muted) !important; }
/* Marker cluster dark theme */
.marker-cluster div {
    background: rgba(0, 200, 83, 0.7);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.marker-cluster span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #000;
}
.marker-cluster-small { background: rgba(0, 200, 83, 0.15); }
.marker-cluster-small div { background: rgba(0, 200, 83, 0.6); }
.marker-cluster-medium { background: rgba(0, 200, 83, 0.2); }
.marker-cluster-medium div { background: rgba(0, 200, 83, 0.7); }
.marker-cluster-large { background: rgba(0, 200, 83, 0.25); }
.marker-cluster-large div { background: rgba(0, 200, 83, 0.8); }

/* ========== DATA TABLE ========== */
.table-container {
    border-top: 1px solid var(--border);
}
.table-scroll {
    overflow-x: auto;
    max-height: 65vh;
    overflow-y: auto;
}
.table-scroll::-webkit-scrollbar { height: 6px; width: 6px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    white-space: nowrap;
}
.data-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}
.data-table th {
    background: var(--bg-card);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}
.data-table th:hover { color: var(--primary); }
.data-table th .sort-arrow { margin-left: 4px; font-size: 0.7rem; }
.data-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 0.82rem;
    color: var(--text-muted);
}
.table-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}
.table-pagination span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

/* ========== UPLOAD ========== */
.upload-section {
    padding: 80px 0;
    border-top: 1px solid var(--border);
}
.section-sub {
    text-align: center;
    color: var(--text-muted);
    max-width: 550px;
    margin: -28px auto 40px;
    font-size: 0.95rem;
    line-height: 1.6;
}
.upload-area {
    max-width: 600px;
    margin: 0 auto;
    padding: 48px 32px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}
.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(0, 200, 83, 0.03);
}
.upload-icon {
    color: var(--text-muted);
    margin-bottom: 16px;
}
.upload-text {
    font-size: 1rem;
    margin-bottom: 8px;
}
.upload-browse {
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
}
.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}
/* Column mapper */
.column-mapper {
    max-width: 600px;
    margin: 24px auto 0;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.column-mapper h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}
.mapper-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.mapper-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.mapper-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mapper-row label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.mapper-row select {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
}
.mapper-actions {
    display: flex;
    gap: 12px;
}

/* ========== AI AGENT ========== */
.ai-section {
    padding: 80px 0;
    border-top: 1px solid var(--border);
}
.ai-chat {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.ai-messages {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ai-messages::-webkit-scrollbar { width: 6px; }
.ai-messages::-webkit-scrollbar-track { background: transparent; }
.ai-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.ai-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.ai-message-user {
    flex-direction: row-reverse;
}
.ai-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}
.ai-message-bot .ai-avatar {
    background: var(--gradient);
    color: #000;
}
.ai-message-user .ai-avatar {
    background: var(--border);
    color: var(--text);
}
.ai-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.6;
    max-width: 80%;
}
.ai-message-bot .ai-bubble {
    background: var(--bg);
    border: 1px solid var(--border);
}
.ai-message-user .ai-bubble {
    background: rgba(0, 200, 83, 0.1);
    border: 1px solid rgba(0, 200, 83, 0.2);
}
.ai-bubble em {
    color: var(--primary);
    font-style: normal;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
}
.ai-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.ai-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
}
.ai-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.1);
}
.ai-send {
    padding: 10px 16px;
    border-radius: 8px;
}
.ai-typing {
    display: inline-flex;
    gap: 4px;
    padding: 12px 16px;
}
.ai-typing span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* ========== CTA ========== */
.cta-section {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(180deg, transparent, rgba(0, 200, 83, 0.03), transparent);
}
.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.cta-section p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto 32px;
    line-height: 1.7;
}
.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== FOOTER ========== */
footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}
.footer-brand p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col h5 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.footer-col a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition);
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========== ANIMATIONS ========== */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .explorer-layout { grid-template-columns: 300px 1fr; }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions { display: none; }
    .mobile-toggle { display: flex; }
    .hero { padding: 120px 0 60px; }
    .hero-title { font-size: 2rem; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .stat-value { font-size: 1.4rem; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .explorer-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    .filter-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .filter-toggle-bar { display: flex; }
    .filter-controls { display: none; }
    .filter-controls.open { display: flex; }
    .property-list { max-height: 250px; }
    .map-container { height: 60vh; min-height: 400px; }
}

/* Live data-freshness indicator above the stats grid */
.freshness-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1100px;
    margin: 0 auto 18px;
    padding: 0 6px;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-size: 0.78rem;
    flex-wrap: wrap;
}
.freshness-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(0, 200, 83, 0.12);
    color: #00C853;
    border: 1px solid rgba(0, 200, 83, 0.3);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.freshness-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00C853;
    box-shadow: 0 0 0 4px rgba(0, 200, 83, 0.22);
    animation: freshness-pulse 2.5s ease-in-out infinite;
}
.freshness-time {
    color: var(--text-muted, #888);
    letter-spacing: 0.04em;
}
@keyframes freshness-pulse {
    0%,100% { box-shadow: 0 0 0 4px rgba(0, 200, 83, 0.22); }
    50%     { box-shadow: 0 0 0 7px rgba(0, 200, 83, 0.0); }
}
@media (max-width: 540px) {
    .freshness-bar { justify-content: center; }
    .freshness-time { display: none; }
}

/* Hero plays — three concrete jobs the buyer can hire this dataset for */
.hero-plays {
    list-style: none;
    margin: 18px 0 28px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.hero-play {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border, #2a2a35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text, #cdd0d6);
    font-size: 0.78rem;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s;
}
.hero-play::before {
    content: "→";
    color: #00C853;
    font-weight: 700;
    font-family: ui-sans-serif, system-ui, sans-serif;
}
.hero-play:hover {
    border-color: rgba(0, 200, 83, 0.4);
    background: rgba(0, 200, 83, 0.06);
}
@media (max-width: 640px) {
    .hero-plays { flex-direction: column; align-items: center; }
    .hero-play  { width: max-content; max-width: 100%; }
}

/* For-developers block — curl + MCP snippet card */
.dev-section {
    padding: 64px 0;
    border-top: 1px solid var(--border, #2a2a35);
    background: var(--bg-card, #13131a);
}
.dev-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: center;
}
@media (max-width: 880px) {
    .dev-grid { grid-template-columns: 1fr; gap: 28px; }
}
.dev-copy h2 {
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    font-weight: 800;
    margin: 8px 0 12px;
    letter-spacing: -0.01em;
}
.dev-copy p {
    color: var(--text-muted, #888);
    line-height: 1.6;
    margin-bottom: 18px;
}
.dev-copy a { color: #00C853; }
.dev-eyebrow {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #00C853;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}
.dev-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.dev-snippets {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.dev-snippet {
    background: #0c0f12;
    border: 1px solid var(--border, #2a2a35);
    border-radius: 10px;
    overflow: hidden;
}
.dev-snippet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border, #2a2a35);
    background: rgba(255, 255, 255, 0.02);
}
.dev-snippet-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted, #888);
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.dev-snippet-copy {
    background: transparent;
    border: 1px solid var(--border, #2a2a35);
    color: var(--text-muted, #888);
    border-radius: 5px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.dev-snippet-copy:hover {
    color: #00C853;
    border-color: #00C853;
}
.dev-snippet pre {
    margin: 0;
    padding: 14px 16px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #cdd6f4;
    white-space: pre;
}

/* Inline pricing teaser — single-line tier table */
.pricing-strip {
    padding: 28px 0;
    border-top: 1px solid var(--border, #2a2a35);
    border-bottom: 1px solid var(--border, #2a2a35);
    background: rgba(255, 255, 255, 0.015);
}
.pricing-strip-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}
.pricing-strip-tier {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.pricing-strip-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #00C853;
}
.pricing-strip-value {
    font-size: 0.86rem;
    color: var(--text, #cdd0d6);
    white-space: nowrap;
}
.pricing-strip-sep {
    width: 1px;
    height: 28px;
    background: var(--border, #2a2a35);
}
.pricing-strip-cta {
    margin-left: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #00C853;
    text-decoration: none;
    white-space: nowrap;
}
.pricing-strip-cta:hover { text-decoration: underline; }
@media (max-width: 720px) {
    .pricing-strip-inner { gap: 14px; }
    .pricing-strip-sep   { display: none; }
}

/* FAQ — collapsible Q&As before the CTA */
.dataset-faq {
    padding: 80px 0 60px;
}
.dataset-faq-title {
    text-align: center;
    font-size: clamp(1.6rem, 2.8vw, 2rem);
    font-weight: 800;
    margin: 0 0 36px;
    letter-spacing: -0.01em;
}
.dataset-faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.faq-item {
    background: var(--bg-card, #13131a);
    border: 1px solid var(--border, #2a2a35);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    transition: border-color 0.15s;
}
.faq-item[open] {
    border-color: rgba(0, 200, 83, 0.35);
}
.faq-item summary {
    padding: 14px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.96rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--text, #cdd0d6);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    font-size: 1.25rem;
    line-height: 1;
    color: var(--text-muted, #888);
    flex-shrink: 0;
    transition: transform 0.15s;
}
.faq-item[open] summary::after {
    content: "−";
    color: #00C853;
}
.faq-item p {
    margin: 0;
    padding: 0 20px 18px;
    color: var(--text-muted, #999);
    line-height: 1.6;
    font-size: 0.92rem;
}
