:root {
    --color-bg: #f5f7fa;
    --color-surface: #ffffff;
    --color-primary: #1e88e5;
    --color-primary-dark: #0b1f3a;
    --color-success: #2e7d32;
    --color-warning: #f9a825;
    --color-danger: #c62828;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.12);
    --spacing: 24px;
    --blue-950: #0b1f3a;
    --blue-700: #1e88e5;
    --green-700: #2e7d32;
    --gray-50: #f5f7fa;
    --gray-100: #eef2f6;
    --gray-200: #d9e1ea;
    --gray-500: #6b7280;
    --gray-900: #1f2937;
    --white: #ffffff;
    --shadow-soft: 0 20px 60px rgba(11, 31, 58, 0.11);
    --shadow-card: 0 14px 34px rgba(15, 23, 42, 0.08);
    --radius-xl: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --max: 1200px;
    --wide: 1400px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-primary);
    background: linear-gradient(to bottom, #ffffff 0%, var(--color-bg) 100%);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

html,
body.page-map {
    min-height: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
    overflow: hidden;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    border-bottom: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    transition: box-shadow 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 44px rgba(11, 31, 58, 0.08);
}

.page-map .site-header {
    position: fixed;
    z-index: 700;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 34px rgba(11, 31, 58, 0.08);
}

.page-map .nav-wrap {
    min-height: 64px;
}

.page-map .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.page-map .brand-copy small {
    display: none;
}

.page-map .site-footer {
    display: none;
}

.nav-wrap,
.section-grid,
.section-head,
.notice-band,
.footer-wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(145deg, var(--blue-950), #153d6a 55%, var(--blue-700));
    box-shadow: 0 12px 28px rgba(11, 31, 58, 0.24);
    font-size: 0.82rem;
    font-weight: 800;
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
}

.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-copy strong {
    color: var(--blue-950);
    font-size: 1rem;
    letter-spacing: 0;
}

.brand-copy small {
    color: var(--gray-500);
    font-size: 0.74rem;
    font-weight: 600;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
}

.site-nav a {
    border-radius: 999px;
    padding: 10px 13px;
    color: #39465a;
    font-size: 0.9rem;
    font-weight: 650;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.site-nav a:hover {
    color: var(--blue-950);
    background: rgba(30, 136, 229, 0.08);
    transform: translateY(-1px);
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.header-actions .btn {
    min-height: 42px;
    padding-inline: 16px;
}

.nav-cta-secondary {
    background: rgba(255, 255, 255, 0.76);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    background: var(--white);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 99px;
    background: var(--blue-950);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0 20px;
    font-size: 0.93rem;
    font-weight: 750;
    white-space: nowrap;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, #0b1f3a, #1e88e5);
    box-shadow: 0 16px 34px rgba(11, 31, 58, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 10px 20px rgba(30, 136, 229, 0.25);
}

.btn-secondary {
    color: var(--blue-950);
    border-color: rgba(11, 31, 58, 0.13);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.hero {
    position: relative;
    max-width: none;
    margin: 0;
    padding: 120px 0 80px;
}

.hero .section-grid {
    width: 100%;
    max-width: var(--max);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(115deg, rgba(11, 31, 58, 0.05), transparent 42%),
        radial-gradient(circle at 78% 28%, rgba(46, 125, 50, 0.12), transparent 20rem);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.62fr);
    align-items: center;
    gap: 52px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue-700);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--green-700);
    box-shadow: 0 0 0 6px rgba(46, 125, 50, 0.12);
}

.hero h1 {
    max-width: 760px;
    margin: 18px 0 18px;
    color: var(--blue-950);
    font-size: clamp(3.2rem, 5vw, 3.5rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-subtitle {
    max-width: 520px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 600;
}

.hero-copy {
    max-width: 520px;
    margin: 16px 0 0;
    color: var(--text-secondary);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.hero-panel {
    position: relative;
    padding: 24px;
    border: 1px solid rgba(217, 225, 234, 0.9);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
        linear-gradient(135deg, rgba(30, 136, 229, 0.12), rgba(46, 125, 50, 0.08));
    box-shadow: var(--shadow-soft);
}

.panel-topline,
.territory-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing);
}

.panel-topline {
    color: var(--gray-500);
    font-size: 0.85rem;
    font-weight: 700;
}

.panel-topline strong {
    color: var(--green-700);
}

.territory-card {
    min-height: 184px;
    margin-top: 18px;
    padding: 24px;
    border-radius: 24px;
    color: var(--white);
    background:
        linear-gradient(135deg, rgba(11, 31, 58, 0.96), rgba(15, 61, 101, 0.94)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 22px);
    overflow: hidden;
}

.territory-card small,
.floating-card small {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.78rem;
    font-weight: 750;
}

.territory-card strong {
    display: block;
    max-width: 260px;
    font-size: 1.55rem;
    line-height: 1.1;
}

.status-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 10px rgba(74, 222, 128, 0.18);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.metric-grid div {
    padding: 16px;
    border: 1px solid rgba(217, 225, 234, 0.72);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
}

.metric-grid strong {
    display: block;
    color: var(--blue-950);
    font-size: 1.35rem;
}

.metric-grid span {
    color: var(--gray-500);
    font-size: 0.78rem;
    font-weight: 700;
}

.feature-section,
.delivery-section {
    padding: 72px 0;
}

.section-head {
    display: grid;
    gap: 16px;
    margin-bottom: 30px;
}

.section-head h2,
.delivery-copy h2,
.map-sidebar h2,
.notice-band h2 {
    max-width: 760px;
    margin: 0;
    color: var(--blue-950);
    font-size: clamp(2rem, 4vw, 3.15rem);
    line-height: 1.03;
    letter-spacing: 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

.feature-card {
    min-height: 250px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: none;
    opacity: 0;
    transform: translateY(18px);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, opacity 360ms ease;
}

.feature-card.is-visible,
.delivery-item.is-visible,
.map-shell.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    border-color: rgba(30, 136, 229, 0.26);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    background: rgba(30, 136, 229, 0.1);
}

.card-icon::before {
    content: "";
    width: 22px;
    height: 22px;
    border: 3px solid var(--blue-700);
    border-radius: 7px;
}

.card-icon-service::before,
.card-icon-resident::before {
    border-radius: 50%;
}

.card-icon-notice::before {
    border-radius: 4px;
    transform: rotate(45deg);
}

.card-icon-land::before {
    border-color: var(--green-700);
    border-radius: 50% 50% 50% 4px;
    transform: rotate(-45deg);
}

.card-icon-docs::before {
    width: 18px;
    border-radius: 3px;
}

.feature-card h3 {
    margin: 24px 0 10px;
    color: var(--blue-950);
    font-size: 1.18rem;
}

.feature-card p,
.delivery-copy p {
    margin: 0;
    color: var(--gray-500);
}

.map-section {
    width: 100%;
    max-width: var(--max);
    margin: 80px auto;
    padding: 0 24px;
}

.map-shell {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    min-height: 480px;
    border: 0;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 360ms ease, transform 360ms ease;
}

.map-sidebar {
    padding: 32px;
    border-right: 1px solid rgba(217, 225, 234, 0.8);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.map-sidebar h2 {
    margin-top: 14px;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.layer-list {
    display: grid;
    gap: 10px;
    margin-top: 30px;
}

.layer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 0 14px;
    color: #334155;
    background: var(--white);
    cursor: pointer;
    font-weight: 750;
}

.layer::after {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--gray-200);
}

.layer.active {
    color: var(--blue-950);
    border-color: rgba(30, 136, 229, 0.32);
    background: rgba(30, 136, 229, 0.07);
}

.layer.active::after {
    background: var(--green-700);
}

.map-preview {
    position: relative;
    width: 100%;
    min-height: 480px;
    height: 480px;
    background:
        linear-gradient(90deg, rgba(11, 31, 58, 0.05) 1px, transparent 1px),
        linear-gradient(0deg, rgba(11, 31, 58, 0.05) 1px, transparent 1px),
        linear-gradient(135deg, #eef6ff, #f8fbf8 48%, #ffffff);
    background-size: 44px 44px, 44px 44px, cover;
    overflow: hidden;
}

.map-grid {
    position: absolute;
    inset: 7%;
    border: 1px solid rgba(30, 136, 229, 0.18);
    border-radius: 30px;
    background:
        linear-gradient(45deg, transparent 48%, rgba(46, 125, 50, 0.16) 49% 51%, transparent 52%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
}

.map-road {
    position: absolute;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 0 0 1px rgba(11, 31, 58, 0.06), 0 14px 36px rgba(11, 31, 58, 0.08);
}

.road-a {
    width: 75%;
    left: 12%;
    top: 30%;
    transform: rotate(-15deg);
}

.road-b {
    width: 68%;
    left: 18%;
    top: 58%;
    transform: rotate(17deg);
}

.road-c {
    width: 54%;
    left: 35%;
    top: 44%;
    transform: rotate(74deg);
}

.map-pin {
    position: absolute;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50% 50% 50% 8px;
    background: var(--blue-700);
    box-shadow: 0 12px 26px rgba(30, 136, 229, 0.26);
    transform: rotate(-45deg);
}

.map-pin i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--white);
}

.pin-one {
    left: 33%;
    top: 26%;
}

.pin-two {
    left: 64%;
    top: 48%;
    background: var(--green-700);
}

.pin-three {
    left: 45%;
    top: 69%;
    background: var(--blue-950);
}

.floating-card {
    position: absolute;
    max-width: 280px;
    border: 1px solid rgba(217, 225, 234, 0.82);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 46px rgba(11, 31, 58, 0.14);
    backdrop-filter: blur(12px);
}

.floating-card small {
    color: var(--gray-500);
}

.floating-card strong {
    color: var(--blue-950);
    line-height: 1.2;
}

.floating-search {
    left: 34px;
    bottom: 34px;
}

.floating-info {
    right: 34px;
    top: 34px;
}

.delivery-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 44px;
    align-items: start;
}

.delivery-copy p {
    max-width: 560px;
    margin-top: 18px;
}

.delivery-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.delivery-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 84px;
    border: 1px solid rgba(217, 225, 234, 0.84);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 360ms ease, transform 360ms ease;
}

.delivery-item span {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background:
        linear-gradient(135deg, var(--green-700), #47a04b);
    box-shadow: 0 8px 18px rgba(46, 125, 50, 0.18);
}

.delivery-item strong {
    color: var(--blue-950);
    font-size: 0.98rem;
}

.notice-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 72px;
    padding: 34px;
    border-radius: 28px;
    color: var(--white);
    background:
        linear-gradient(135deg, rgba(11, 31, 58, 0.98), rgba(16, 57, 96, 0.96)),
        linear-gradient(90deg, rgba(30, 136, 229, 0.3), transparent);
    box-shadow: var(--shadow-soft);
}

.notice-band .eyebrow,
.notice-band h2 {
    color: var(--white);
}

.notice-band .eyebrow::before {
    background: #4ade80;
}

.notice-band h2 {
    max-width: 720px;
    margin-top: 10px;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.site-footer {
    border-top: 1px solid rgba(217, 225, 234, 0.8);
    background: rgba(255, 255, 255, 0.78);
}

.footer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 28px 0;
}

.footer-wrap strong {
    color: var(--blue-950);
}

.footer-wrap p {
    margin: 4px 0 0;
    color: var(--gray-500);
}

.footer-link {
    color: var(--blue-700);
    font-weight: 800;
}

@media (max-width: 980px) {
    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 10px);
        left: 20px;
        right: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--gray-200);
        border-radius: 20px;
        background: var(--white);
        box-shadow: var(--shadow-soft);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        border-radius: 12px;
    }

    .header-actions {
        display: none;
    }

    .hero-grid,
    .delivery-grid,
    .map-shell {
        grid-template-columns: 1fr;
    }

    .map-sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(217, 225, 234, 0.8);
    }

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

@media (max-width: 680px) {
    .nav-wrap,
    .section-grid,
    .section-head,
    .notice-band,
    .footer-wrap {
        width: min(calc(100vw - 28px), var(--max));
    }

    .hero {
        padding: 128px 16px 64px;
    }

    .hero h1 {
        font-size: clamp(3.1rem, 16vw, 4.4rem);
    }

    .hero-actions,
    .notice-band,
    .footer-wrap {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .hero-panel,
    .notice-band {
        border-radius: 22px;
        padding: 20px;
    }

    .metric-grid,
    .card-grid,
    .delivery-list {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: auto;
    }

    .map-shell {
        min-height: 0;
        border-radius: 20px;
    }

    .map-preview {
        min-height: 480px;
    }

    .floating-card {
        max-width: calc(100% - 40px);
    }

    .floating-search {
        left: 20px;
        bottom: 20px;
    }

    .floating-info {
        right: 20px;
        top: 20px;
    }
}

.route-page {
    min-height: calc(100vh - 78px);
    padding: 150px 20px 80px;
    background:
        radial-gradient(circle at 15% 20%, rgba(30, 136, 229, 0.12), transparent 26rem),
        linear-gradient(180deg, #ffffff, #f5f7fa);
}

.route-hero {
    width: min(100%, 980px);
    margin: 0 auto;
    border: 1px solid rgba(217, 225, 234, 0.9);
    border-radius: 30px;
    padding: clamp(28px, 5vw, 58px);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.route-hero h1 {
    max-width: 760px;
    margin: 18px 0 14px;
    color: var(--blue-950);
    font-size: clamp(2.4rem, 6vw, 4.9rem);
    line-height: 1;
    letter-spacing: 0;
}

.route-hero p {
    max-width: 680px;
    margin: 0;
    color: var(--gray-500);
    font-size: 1.08rem;
}

.citizen-form {
    display: grid;
    gap: 14px;
    max-width: 440px;
    margin-top: 26px;
}

.citizen-form label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.citizen-form input {
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 12px 13px;
}

.route-alert {
    margin-top: 18px;
    border-radius: 14px;
    padding: 12px;
    color: #9d1f1f;
    background: rgba(198, 40, 40, 0.1);
    font-weight: 800;
}

.citizen-lot-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.citizen-lot-card {
    display: block;
    border: 1px solid rgba(217, 225, 234, 0.9);
    border-radius: 16px;
    padding: 15px;
    background: #fff;
}

.citizen-lot-card strong {
    display: block;
    color: var(--blue-950);
}

.citizen-lot-card span {
    color: var(--gray-500);
    font-weight: 750;
}

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