/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/

:root {
    --ink: #0d1117;
    --ink-soft: #1e2530;
    --surface: #f5f3ee;
    --surface-warm: #ede9e0;
    --accent: #d94f2b;
    --accent-soft: #f5b8a3;
    --accent-pale: #fdf0eb;
    --teal: #1a7a5e;
    --teal-pale: #e0f2ec;
    --amber: #c47a15;
    --amber-pale: #fdf3e0;
    --blue: #1a5fa8;
    --blue-pale: #e4eef9;
    --text-muted: #6b7280;
    --border: rgba(13, 17, 23, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Instrument Sans", sans-serif;
    background: var(--surface);
    color: var(--ink);
    overflow-x: hidden;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 3rem;
    background: rgba(245, 243, 238, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: "Syne", sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

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

.nav-links a {
    font-size: 0.88rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

.btn-nav {
    background: var(--ink);
    color: var(--surface);
    border: none;
    padding: 0.55rem 1.2rem;
    border-radius: 6px;
    font-family: "Instrument Sans", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
}

.btn-nav:hover {
    opacity: 0.8;
}

/* HERO */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-bg-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image:
        linear-gradient(var(--ink) 1px, transparent 1px),
        linear-gradient(90deg, var(--ink) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem 4rem 5rem 5rem;
    position: relative;
    z-index: 2;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-pale);
    border: 1px solid var(--accent-soft);
    color: var(--accent);
    border-radius: 20px;
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 500;
    width: fit-content;
    margin-bottom: 2rem;
    animation: fadeUp 0.6s ease both;
}

.hero-tag::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

h1 {
    font-family: "Syne", sans-serif;
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    animation: fadeUp 0.6s 0.1s ease both;
}

h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero-sub {
    margin-top: 1.5rem;
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 440px;
    animation: fadeUp 0.6s 0.2s ease both;
}

.hero-search {
    margin-top: 2.5rem;
    display: flex;
    gap: 0;
    max-width: 460px;
    animation: fadeUp 0.6s 0.3s ease both;
}

.hero-search input {
    flex: 1;
    padding: 0.9rem 1.1rem;
    border: 2px solid var(--ink);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-family: "Instrument Sans", sans-serif;
    font-size: 0.95rem;
    background: white;
    outline: none;
}

.hero-search input::placeholder {
    color: #aaa;
}

.btn-search {
    background: var(--accent);
    color: white;
    border: 2px solid var(--accent);
    padding: 0 1.5rem;
    border-radius: 0 8px 8px 0;
    font-family: "Syne", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-search:hover {
    background: #b83d1e;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2.5rem;
    animation: fadeUp 0.6s 0.4s ease both;
}

.stat-item {
}

.stat-num {
    font-family: "Syne", sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.hero-right {
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s 0.2s ease both;
}

/* HERO MAP MOCK */
.map-container-hero {
    position: absolute;
    inset: 0;
    background: #1a2332;
    overflow: hidden;
}

.map-svg-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.map-popup-hero {
    position: absolute;
    bottom: 15%;
    right: 8%;
    background: white;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    width: 220px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    animation: popIn 0.5s 0.8s ease both;
    font-size: 0.8rem;
    z-index: 10;
}

.popup-addr {
    font-family: "Syne", sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.popup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0;
}

.popup-label {
    color: #666;
}

.popup-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
}

.badge-high {
    background: #fee2e2;
    color: #dc2626;
}

.badge-med {
    background: #fef3c7;
    color: #d97706;
}

.badge-low {
    background: #dcfce7;
    color: #16a34a;
}

.badge-mod {
    background: #dbeafe;
    color: #2563eb;
}

.popup-pin {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background: var(--accent);
    border-radius: 50% 50% 50% 0;
    transform: translateX(-50%) rotate(-45deg);
    border: 2px solid white;
}

.map-scale-tag {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    color: white;
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-legend {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background: rgba(15, 20, 30, 0.85);
    backdrop-filter: blur(6px);
    color: white;
    font-size: 0.72rem;
    padding: 0.7rem 0.9rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 10;
}

.legend-title {
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.7rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 3px 0;
}

.legend-swatch {
    width: 28px;
    height: 8px;
    border-radius: 2px;
}

/* SECTIONS */
section {
    padding: 6rem 5rem;
}

.section-tag {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

h2 {
    font-family: "Syne", sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

/* RISKS GRID */
.risks-section {
    background: var(--ink);
    color: white;
}

.risks-section h2 {
    color: white;
}

.risks-section .section-tag {
    color: var(--accent-soft);
}

.risks-intro {
    color: rgba(255, 255, 255, 0.6);
    max-width: 540px;
    margin-top: 1rem;
    line-height: 1.7;
}

.risks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: 3.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.risk-card {
    background: rgba(255, 255, 255, 0.04);
    padding: 1.8rem 1.5rem;
    transition: background 0.25s;
    cursor: default;
}

.risk-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.risk-icon {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.risk-card h3 {
    font-family: "Syne", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.risk-card p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.risk-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 1rem;
}

.risk-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.risk-level {
    font-size: 0.72rem;
    font-weight: 600;
}

/* MAP SECTION */
.map-section {
    background: white;
    padding: 0;
}

.map-section-inner {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    min-height: 600px;
}

.map-info {
    padding: 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.map-info p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 1rem;
    max-width: 420px;
}

.features-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.feature-text h4 {
    font-family: "Syne", sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
}

.feature-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

#live-map {
    height: 100%;
    min-height: 600px;
}

/* HEATMAP SHOWCASE */
.showcase-section {
    background: var(--surface-warm);
}

.showcase-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.showcase-header p {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.maps-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.map-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: white;
}

.map-card-img {
    height: 260px;
    position: relative;
    overflow: hidden;
}

.map-card-meta {
    padding: 1.2rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-card-meta h4 {
    font-family: "Syne", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
}

.map-card-meta span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.map-type-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 3px;
}

/* SVG MAP VISUALIZATIONS */
.svg-map {
    width: 100%;
    height: 100%;
    display: block;
}

/* CTA / REGISTER */
.cta-section {
    background: var(--ink);
    color: white;
    text-align: center;
    padding: 7rem 5rem;
}

.cta-section h2 {
    color: white;
    font-size: clamp(2rem, 4vw, 3rem);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1rem;
    font-size: 1.05rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.register-form {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 2.5rem;
}

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

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-family: "Instrument Sans", sans-serif;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-input:focus {
    border-color: var(--accent);
}

.btn-cta {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-family: "Syne", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s,
        transform 0.15s;
    letter-spacing: -0.3px;
}

.btn-cta:hover {
    background: #b83d1e;
    transform: translateY(-1px);
}

.btn-cta:active {
    transform: translateY(0);
}

.form-note {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.5rem;
}

/* ALERT BANNER */
.alert-banner {
    background: linear-gradient(135deg, #7c2d12, #9a3412);
    color: white;
    padding: 1.5rem 5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.alert-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-content h4 {
    font-family: "Syne", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.alert-content p {
    font-size: 0.83rem;
    opacity: 0.75;
    line-height: 1.5;
}

.alert-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
    margin-right: 6px;
    animation: pulse 1.5s infinite;
}

/* FOOTER */
footer {
    background: var(--ink-soft);
    color: rgba(255, 255, 255, 0.4);
    padding: 2.5rem 5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

footer strong {
    color: rgba(255, 255, 255, 0.7);
    font-family: "Syne", sans-serif;
}

/* ANIMATIONS */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

@keyframes scanLine {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(200%);
    }
}
