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

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.15);
    --accent: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --bg: #06090f;
    --bg-elevated: #0d1321;
    --bg-card: #131b2e;
    --bg-card-hover: #192440;
    --bg-surface: #1a2540;
    --text: #f0f2f7;
    --text-secondary: #c8ceda;
    --text-dim: #5a6a85;
    --border: rgba(136, 150, 176, 0.12);
    --border-hover: rgba(136, 150, 176, 0.25);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 4px 24px rgba(0,0,0,0.25);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.35);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 1.05rem;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: #60a5fa; }
::selection { background: rgba(59, 130, 246, 0.3); }

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible, .reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== ICON SYSTEM ===== */
.icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; flex-shrink: 0;
}
.icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 32px; height: 32px; }
.icon-xl { width: 40px; height: 40px; }

.icon-badge {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
}
.icon-badge .icon { width: 28px; height: 28px; }
.icon-badge.blue { background: rgba(59, 130, 246, 0.12); color: var(--primary); }
.icon-badge.green { background: rgba(16, 185, 129, 0.12); color: var(--accent); }
.icon-badge.purple { background: rgba(139, 92, 246, 0.12); color: var(--purple); }
.icon-badge.amber { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.icon-badge.red { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.icon-badge.cyan { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }

/* ===== NAV ===== */
#navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2.5rem; height: 60px;
    background: rgba(6, 9, 15, 0.82);
    backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}
.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.3rem; font-weight: 700;
    display: flex; align-items: center; gap: 0.6rem;
    letter-spacing: -0.02em;
}
.nav-brand .icon { color: var(--primary); }
.nav-links { display: flex; list-style: none; gap: 0.25rem; }
.nav-links a {
    color: var(--text-secondary); font-size: 0.88rem; font-weight: 500;
    padding: 0.4rem 0.85rem; border-radius: var(--radius-xs);
    transition: all var(--transition);
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-links a.active { color: var(--text); background: rgba(59, 130, 246, 0.12); }

/* ===== HERO ===== */
#hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 5rem 2.5rem 3rem;
    position: relative; overflow: hidden;
    text-align: center;
}
#hero::before {
    content: ''; position: absolute; top: -40%; right: -20%;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
    pointer-events: none;
}
/* Globe canvas */
#globe-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; opacity: 0.35; pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 500px; }
.hero-label {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 1rem; border-radius: 100px;
    background: var(--primary-glow); border: 1px solid rgba(59,130,246,0.2);
    font-size: 0.85rem; font-weight: 500; color: var(--primary);
    margin-bottom: 1.5rem;
}
.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.4rem; line-height: 1.08; margin-bottom: 1.25rem;
    letter-spacing: -0.035em; font-weight: 700;
}
.highlight {
    background: linear-gradient(270deg, #a78bfa, #3b82f6, #c084fc, #6366f1);
    background-size: 300% 300%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

.hero-content h1 .typing-cursor {
    display: inline-block; width: 3px; height: 0.85em;
    background: #a78bfa; margin-left: 4px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}
@keyframes blink {
    50% { opacity: 0; }
}
.hero-content p { color: var(--text); font-size: 1.15rem; margin-bottom: 2rem; line-height: 1.75; }
/* Concept map (formerly hero map) */
.concept-map {
    width: 100%; height: 420px;
    border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    margin: 2.5rem 0 3rem;
}

/* Sector list items */
.sector-item {
    padding: 0.7rem 1rem; margin-bottom: 0.35rem;
    border-radius: var(--radius-xs);
    border-left: 3px solid transparent;
    font-size: 1.05rem; line-height: 1.7;
    cursor: default;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sector-item:hover {
    background: rgba(34, 211, 238, 0.15);
    border-left-color: #22d3ee;
    transform: scale(1.05) translateX(10px);
    color: #22d3ee;
    text-shadow: 0 0 6px rgba(34,211,238,0.3);
}

.btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.85rem 2.2rem;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff; border: none;
    border-radius: var(--radius-sm); font-size: 1rem; font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer; transition: all var(--transition);
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4); }

.btn-secondary {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    background: var(--bg-card); color: var(--text-secondary);
    border: 1px solid var(--border); border-radius: var(--radius-xs);
    font-size: 0.9rem; cursor: pointer; transition: all var(--transition);
}
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text); border-color: var(--border-hover); }

/* ===== SECTIONS ===== */
.section { padding: 8rem 2.5rem; max-width: 1200px; margin: 0 auto; }
.section-dark {
    max-width: 100%;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding-top: 8rem; padding-bottom: 8rem;
}
.section-dark > h2, .section-dark > p,
.section-dark > .layers-container, .section-dark > .analysis-tabs,
.section-dark > .analysis-container, .section-dark > .sandbox-container {
    max-width: 1200px; margin-left: auto; margin-right: auto;
    padding-left: 2.5rem; padding-right: 2.5rem;
}
.section-dark > h2, .section-dark > p { padding-left: 2.5rem; }

h2 {
    font-family: var(--font-heading);
    font-size: 2.4rem; margin-bottom: 0.75rem;
    letter-spacing: -0.03em; font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #c084fc, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
h3 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em; font-weight: 600;
}

/* Cyan keywords */
.kw {
    color: #22d3ee;
    font-weight: 600;
}

/* Section subtitle */
.section-subtitle {
    font-size: 2.5rem; margin: 7rem 0 2rem;
    background: linear-gradient(135deg, #ffffff, #c084fc, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Long description block */
.section-longdesc {
    max-width: 900px; margin-bottom: 1rem;
}
.section-longdesc p {
    font-size: 1.05rem; line-height: 1.85; margin-bottom: 1rem;
    color: var(--text);
}

/* Hero title animation */
@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.25); }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* List hover effects */
.concept-detail li, .raster-info li {
    padding: 0.35rem 0.5rem; border-radius: 6px;
    transition: all 0.25s ease;
    cursor: default;
}
.concept-detail li:hover, .raster-info li:hover {
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
    transform: scale(1.04) translateX(8px);
}
.concept-detail li:hover b, .raster-info li:hover b {
    color: #a5f3fc;
}
.section-desc {
    color: var(--text); font-size: 1.1rem; margin-bottom: 3.5rem;
    max-width: 660px; line-height: 1.8;
}

/* ===== CARDS ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem; margin-bottom: 2rem;
}
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.75rem;
    cursor: pointer; transition: all var(--transition);
    position: relative; overflow: hidden;
}
.card-header {
    display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem;
}
.card-header .icon-badge { margin-bottom: 0; }
.card-title {
    font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; margin: 0;
}
.card-blue { background: linear-gradient(135deg, #2a1496, #063169, #11004f); border-color: rgba(96,165,250,0.3); }
.card-purple { background: linear-gradient(135deg, #323ea2, #122d57, #130835); border-color: rgba(167,139,250,0.3); }
.card-green { background: linear-gradient(135deg, #367e0d, #0d4d0e, #021d05); border-color: rgba(52,211,153,0.3); }
.card-amber { background: linear-gradient(135deg, #eb9352, #782b14, #130835); border-color: rgba(251,191,36,0.3); }
.card-red { background: linear-gradient(135deg, #e9625c, #530101, #000); border-color: rgba(248,113,113,0.3); }
.card-cyan { background: linear-gradient(135deg, #1088ad, #28456b, #11004f); border-color: rgba(34,211,238,0.3); }
.card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(59,130,246,0.04), transparent);
    opacity: 0; transition: opacity var(--transition);
}
.card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--shadow); }
.card:hover::after { opacity: 1; }
.card h3 { margin-bottom: 0.5rem; font-size: 1.05rem; position: relative; z-index: 1; }
#concepts .card h3, #concepts .concept-detail h3 { font-size: 2rem; }
.card p { color: var(--text); font-size: 0.95rem; position: relative; z-index: 1; line-height: 1.65; }

.concept-detail {
    background: linear-gradient(135deg, #323ea2, #122d57, #a78bfa);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: var(--radius); padding: 2rem;
    animation: slideUp 0.3s ease;
}
.concept-detail.detail-blue { background: linear-gradient(135deg, #2a1496, #063169, #11004f); }
.concept-detail.detail-purple { background: linear-gradient(135deg, #323ea2, #122d57, #130835); }
.concept-detail.detail-green { background: linear-gradient(135deg, #367e0d, #0d4d0e, #021d05); }
.concept-detail.detail-amber { background: linear-gradient(135deg, #eb9352, #782b14, #130835); }
.concept-detail.detail-red { background: linear-gradient(135deg, #e9625c, #530101, #000); }
.concept-detail.detail-cyan { background: linear-gradient(135deg, #1088ad, #28456b, #11004f); }
.concept-detail.hidden { display: none; }
.concept-detail h3 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; font-size: 2rem; }
.concept-detail p { font-size: 1rem; }
.concept-detail ul { margin-left: 1.25rem; }
.concept-detail li { margin-bottom: 0.4rem; color: var(--text); font-size: 0.95rem; }
.concept-detail li b { color: #fff; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== MAPS ===== */
.map-container {
    height: 450px; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--border); box-shadow: var(--shadow);
}

/* ===== LAYERS ===== */
.layers-container { display: flex; gap: 2rem; flex-wrap: wrap; }
.layers-container .map-container { flex: 2; min-width: 340px; }
.layers-controls { flex: 1; min-width: 280px; }
.layers-controls h3 { margin-bottom: 1.25rem; font-size: 1.1rem; }
.layer-toggle {
    padding: 0.8rem 0; border-bottom: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 0.2rem;
}
.layer-toggle label {
    font-weight: 500; cursor: pointer;
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 0.95rem;
}
.layer-toggle input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px; border-radius: 4px;
    border: 2px solid var(--text-dim); cursor: pointer;
    position: relative; transition: all var(--transition);
    flex-shrink: 0;
}
.layer-toggle input[type="checkbox"]:checked {
    background: var(--primary); border-color: var(--primary);
}
.layer-toggle input[type="checkbox"]:checked::after {
    content: '';
    position: absolute; left: 4px; top: 1px;
    width: 6px; height: 10px;
    border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.layer-desc { color: var(--text-dim); font-size: 0.82rem; margin-left: 2.5rem; }
.layer-info {
    margin-top: 1.5rem; padding: 1rem 1.25rem;
    background: var(--bg-surface); border-radius: var(--radius-sm);
    font-size: 0.95rem; color: var(--text);
    border: 1px solid var(--border);
}

/* ===== DATA TYPES ===== */
.data-tabs, .analysis-tabs { display: flex; gap: 0.35rem; margin-bottom: 2.5rem; }
.tab, .analysis-tab {
    padding: 0.6rem 1.5rem;
    background: transparent; border: 1px solid var(--border);
    border-radius: 100px; color: var(--text-secondary);
    cursor: pointer; font-size: 0.92rem; font-weight: 500;
    font-family: var(--font-heading);
    transition: all var(--transition);
}
.tab:hover, .analysis-tab:hover { background: rgba(255,255,255,0.03); color: var(--text); }
.tab.active, .analysis-tab.active {
    background: var(--primary); color: #fff;
    border-color: var(--primary); box-shadow: 0 2px 10px rgba(59,130,246,0.25);
}

.draw-container, .raster-demo { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.draw-container .map-container, .raster-demo .map-container { flex: 2; min-width: 340px; }
.draw-controls, .raster-info { flex: 1; min-width: 280px; }
.draw-controls h3, .raster-info h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.draw-buttons { display: flex; gap: 0.4rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.draw-btn {
    padding: 0.55rem 1.1rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-xs); color: var(--text-secondary);
    cursor: pointer; font-size: 0.9rem; font-weight: 500;
    transition: all var(--transition);
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.draw-btn:hover { border-color: var(--border-hover); color: var(--text); }
.draw-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.draw-info { margin-top: 1.25rem; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.9; }
.draw-info p { margin-bottom: 0.25rem; }
.geojson-output { margin-top: 1.25rem; }
.geojson-output h4 { font-family: var(--font-heading); font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--text); }
.geojson-output pre {
    background: var(--bg); padding: 1rem; border-radius: var(--radius-sm);
    font-size: 0.78rem; max-height: 250px; overflow: auto;
    border: 1px solid var(--border); color: var(--accent);
    font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
}

/* ===== PIXEL GRID ===== */
.pixel-grid {
    display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px;
    margin: 1.25rem 0; max-width: 340px;
}
.pixel-grid-large {
    grid-template-columns: repeat(16, 25px); max-width: 100%; gap: 2px;
}
.dem-container {
    display: flex; gap: 2.5rem; flex-wrap: wrap; align-items: flex-start;
}
.dem-container .pixel-grid-large { flex-shrink: 0; }
.dem-info { flex: 1; min-width: 250px; }
.pixel-cell {
    aspect-ratio: 1; border-radius: 3px; cursor: crosshair;
    transition: transform 0.15s, box-shadow 0.15s;
}
.pixel-cell:hover { transform: scale(1.35); z-index: 1; box-shadow: 0 0 8px rgba(0,0,0,0.5); }
.pixel-label { color: var(--text-secondary); font-size: 0.88rem; }
.pixel-value {
    font-weight: 600; color: var(--accent); min-height: 1.5rem;
    font-family: 'Cascadia Code', 'Fira Code', monospace; font-size: 0.88rem;
}
.data-title {
    font-family: 'Outfit', sans-serif; font-size: 2rem; font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #22d3ee, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; margin-bottom: 1rem;
}
.raster-info p { color: var(--text); font-size: 1rem; }
.raster-info ul { margin: 0.75rem 0 1.25rem 1.5rem; }
.raster-info li { margin-bottom: 0.45rem; color: var(--text); font-size: 0.95rem; }

/* ===== COMPARISON TABLE ===== */
.comparison-table { border-radius: var(--radius); border: 1px solid var(--border); }
.comparison-table table { width: 100%; border-collapse: collapse; }
.comparison-table th {
    font-family: var(--font-heading);
    background: var(--bg-surface); color: #fff;
    padding: 0.9rem 1.25rem; text-align: left;
    font-weight: 600; font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
}
.comparison-table td {
    padding: 0.8rem 1.25rem; border-bottom: 1px solid var(--border);
    font-size: 0.95rem; color: var(--text);
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-row {
    transition: all 0.3s ease; cursor: default;
}
.comparison-row:hover {
    background: rgba(34,211,238,0.15);
    transform: scale(1.04);
}
.comparison-row:hover td {
    color: #22d3ee;
    text-shadow: 0 0 8px rgba(34,211,238,0.3);
}

/* ===== ANALYSIS ===== */
.analysis-container { display: flex; gap: 2rem; flex-wrap: wrap; }
.analysis-container .map-container { flex: 2; min-width: 340px; }
.analysis-controls { flex: 1; min-width: 280px; }
.analysis-panel { display: none; }
.analysis-panel.active { display: block; }
.analysis-panel h3 { margin-bottom: 0.6rem; font-size: 1.1rem; }
.analysis-panel > p { color: var(--text); font-size: 0.95rem; }
.analysis-panel label {
    display: block; margin: 1.25rem 0 0.5rem;
    font-size: 0.95rem; color: var(--text);
}
.analysis-panel input[type="range"] {
    width: 100%; height: 4px; -webkit-appearance: none;
    background: var(--border); border-radius: 2px; outline: none;
    margin: 0.5rem 0;
}
.analysis-panel input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 18px;
    background: var(--primary); border-radius: 50%; cursor: pointer;
    box-shadow: 0 0 8px rgba(59,130,246,0.3);
}
.analysis-result {
    margin-top: 1.25rem; padding: 1.1rem 1.25rem;
    background: var(--bg-surface); border-radius: var(--radius-sm);
    font-weight: 500; min-height: 3rem; font-size: 0.95rem;
    border: 1px solid var(--border); border-left: 3px solid var(--accent);
}

/* ===== PROJECTIONS ===== */
.projections-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}
.projection-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    position: relative; overflow: hidden;
}
.projection-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.projection-card.glow-blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa, transparent); }
.projection-card.glow-green::before { background: linear-gradient(90deg, #10b981, #34d399, transparent); }
.projection-card.glow-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24, transparent); }
.projection-card.glow-blue { box-shadow: inset 0 0 40px rgba(59,130,246,0.04); }
.projection-card.glow-green { box-shadow: inset 0 0 40px rgba(16,185,129,0.04); }
.projection-card.glow-amber { box-shadow: inset 0 0 40px rgba(245,158,11,0.04); }
.projection-card h3 {
    font-size: 2rem; font-weight: 800;
    margin-bottom: 0.75rem; line-height: 1.3;
}
.glow-blue h3 { color: #60a5fa; }
.glow-green h3 { color: #34d399; }
.glow-amber h3 { color: #fbbf24; }
.epsg-code {
    font-size: 1.1rem; font-weight: 600; opacity: 0.7;
}
.projection-card p { color: var(--text); font-size: 0.92rem; margin-bottom: 0.5rem; line-height: 1.7; }
.projection-card .detail { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 0.85rem; line-height: 1.65; }
.coord-display {
    font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
    background: var(--bg); padding: 0.65rem 0.85rem; border-radius: var(--radius-xs);
    font-size: 0.85rem; color: var(--accent); border: 1px solid var(--border);
}
.distortion-note {
    margin-top: 2rem; padding: 1.25rem 1.5rem;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15); border-radius: var(--radius-sm);
    color: var(--warning); font-size: 0.95rem; line-height: 1.7;
    display: flex; gap: 0.75rem; align-items: flex-start;
}
.distortion-note .icon { flex-shrink: 0; margin-top: 2px; }

/* ===== SANDBOX ===== */
.sandbox-container { display: flex; gap: 2rem; flex-wrap: wrap; }
.sandbox-container .map-container { flex: 1; min-width: 340px; }
.sandbox-editor { flex: 1; min-width: 340px; display: flex; flex-direction: column; gap: 0.85rem; }
.sandbox-editor h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.snippet-buttons { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.snippet-buttons button {
    padding: 0.4rem 0.85rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 100px; color: var(--text-dim); cursor: pointer;
    font-size: 0.82rem; font-weight: 500;
    transition: all var(--transition);
    display: inline-flex; align-items: center; gap: 0.35rem;
}
.snippet-buttons button:hover { border-color: var(--primary); color: var(--text); background: var(--primary-glow); }
#sandbox-code {
    width: 100%; min-height: 220px; padding: 1.1rem;
    background: var(--bg); color: #a5f3d0; border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
    font-size: 0.85rem; resize: vertical; line-height: 1.6;
    transition: border-color var(--transition);
}
#sandbox-code:focus { outline: none; border-color: rgba(59,130,246,0.4); }
.sandbox-actions { display: flex; gap: 0.5rem; }
.sandbox-output {
    padding: 0.85rem 1rem; background: var(--bg); border-radius: var(--radius-sm);
    font-size: 0.85rem; color: var(--text-dim); min-height: 2.5rem;
    border: 1px solid var(--border);
    font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
}

/* ===== CITY POPUP IMAGES ===== */
.city-popup { text-align: center; min-width: 160px; }
.city-popup img {
    width: 100%; height: 80px; object-fit: cover;
    border-radius: 6px; margin-bottom: 6px; display: block;
}
.city-popup b { font-size: 0.95rem; }
.city-popup span { display: block; font-size: 0.8rem; color: #666; }

/* ===== FOOTER ===== */
footer {
    border-top: 1px solid var(--border);
    color: var(--text-dim); font-size: 0.88rem;
    padding: 3rem 2rem;
}
.footer-main {
    text-align: center; margin-bottom: 2rem;
}
.footer-brand {
    font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 700;
    color: #fff; margin-bottom: 0.5rem;
}
.footer-built {
    font-size: 0.95rem; margin-bottom: 0.35rem;
}
.footer-built a {
    color: #a78bfa; font-weight: 600; text-decoration: none;
}
.footer-built a:hover { text-decoration: underline; color: #c084fc; }
.footer-tech { font-size: 0.85rem; }
.footer-tech a { color: var(--text-secondary); text-decoration: none; }
.footer-tech a:hover { color: #22d3ee; }
.footer-legal {
    max-width: 800px; margin: 0 auto;
    padding-top: 1.5rem; border-top: 1px solid var(--border);
    text-align: center; line-height: 1.7;
}
.footer-legal p { margin-bottom: 0.75rem; font-size: 0.82rem; color: var(--text-dim); }
.footer-legal a { color: var(--text-secondary); text-decoration: none; }
.footer-legal a:hover { color: #22d3ee; }
.footer-legal strong { color: var(--text-secondary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    #navbar { padding: 0 1rem; }
    .nav-links { gap: 0.1rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .nav-links a { padding: 0.35rem 0.55rem; font-size: 0.78rem; white-space: nowrap; }

    #hero { padding: 4rem 1.25rem 2rem; gap: 1.5rem; }
    .hero-content h1 { font-size: 1.8rem; }
    .hero-content p { font-size: 1rem; }
    #globe-canvas { opacity: 0.2; }

    .section, .section-dark { padding-top: 4rem; padding-bottom: 4rem; }
    .section { padding-left: 1.25rem; padding-right: 1.25rem; }
    .section-dark > h2, .section-dark > p,
    .section-dark > .layers-container, .section-dark > .analysis-tabs,
    .section-dark > .analysis-container, .section-dark > .sandbox-container {
        padding-left: 1.25rem; padding-right: 1.25rem;
    }

    h2 { font-size: 1.6rem; }
    .section-desc { font-size: 0.95rem; }
    .section-subtitle { font-size: 1.3rem; }

    .cards-grid { grid-template-columns: 1fr; }
    .card-header { gap: 0.75rem; }
    .card-title { font-size: 1.2rem; }

    .map-container { height: 280px; min-width: 0; }
    .concept-map { height: 320px; }

    .draw-container, .raster-demo { flex-direction: column; gap: 1.25rem; margin-bottom: 2rem; }
    .draw-container .map-container, .raster-demo .map-container { min-width: 0; width: 100%; flex: none; height: 300px; }
    .draw-controls, .raster-info { min-width: 0; width: 100%; }
    .data-title { font-size: 1.5rem; }

    .dem-container { flex-direction: column; gap: 1.5rem; }
    .pixel-grid-large { grid-template-columns: repeat(16, 1fr); width: 100%; max-width: 100%; }
    .dem-info { min-width: 0; }

    .layers-container { flex-direction: column; }
    .layers-container .map-container { min-width: 0; flex: none; height: 300px; }
    .layers-controls { min-width: 0; width: 100%; }

    .analysis-tabs { flex-wrap: wrap; gap: 0.3rem; }
    .analysis-tab { font-size: 0.82rem; padding: 0.5rem 0.75rem; }
    .analysis-container { flex-direction: column; gap: 1.25rem; }
    .analysis-container .map-container { min-width: 0; flex: none; height: 300px; }
    .analysis-controls { min-width: 0; width: 100%; }

    .projections-grid { gap: 1.25rem; }
    .projection-card { padding: 1.25rem; }

    .sandbox-container { flex-direction: column; }
    .sandbox-container .map-container { min-width: 0; flex: none; height: 300px; }
    .sandbox-editor { min-width: 0; width: 100%; }

    .comparison-table { font-size: 0.85rem; }
    .comparison-table th, .comparison-table td { padding: 0.6rem 0.75rem; }

    .draw-buttons { flex-wrap: wrap; }

    .sector-item { padding: 0.75rem 1rem; font-size: 0.95rem; }
}
@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
    .cards-grid { gap: 1rem; }
    .card { padding: 1.25rem; }
    .card-title { font-size: 1.1rem; }
    .icon-badge { width: 40px; height: 40px; }
    .map-container { height: 240px; }
    .pixel-grid-large { grid-template-columns: repeat(16, 1fr); }
    .analysis-tab { font-size: 0.75rem; padding: 0.4rem 0.6rem; }
    .nav-links a { font-size: 0.72rem; padding: 0.3rem 0.45rem; }
    .data-title { font-size: 1.3rem; }
    .section-subtitle { font-size: 1.1rem; margin: 4rem 0 1.5rem; }
}
