/* monopole.city - Mid-century municipal master plan */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    color: #1d2d3d;
    background: #f4f1de;
    overflow-x: hidden;
    line-height: 1.75;
    font-size: 16px;
}

/* Navigation */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid rgba(38, 70, 83, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 100;
}

.nav-brand {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #264653;
    letter-spacing: 0.08em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
}

.nav-link {
    font-family: 'Inconsolata', monospace;
    font-size: 12px;
    color: #5a6a7a;
    text-decoration: none;
    letter-spacing: 0.04em;
    padding-bottom: 4px;
    transition: color 200ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: #1d2d3d;
}

.nav-underline {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #e76f51;
    transition: transform 300ms ease, width 300ms ease;
}

/* Sections */
.section {
    position: relative;
}

.section-heading {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 36px;
    color: #1d2d3d;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 40px;
    text-align: center;
}

.section-heading-light {
    color: #f4f1de;
}

/* Section 1: Cover */
.section-cover {
    height: 100vh;
    background: #264653;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 56px;
    gap: 24px;
}

.cover-title {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 56px;
    color: #e9c46a;
    letter-spacing: 0.12em;
    text-align: center;
}

.cover-subtitle {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #e9c46a;
    letter-spacing: 0.2em;
    opacity: 0.7;
}

.city-diagram {
    max-width: 60vh;
    max-height: 60vh;
}

.draw-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: drawPath 0.5s ease forwards;
}

.draw-path:nth-child(1) { animation-delay: 0s; }
.draw-path:nth-child(2) { animation-delay: 0.15s; }
.draw-path:nth-child(3) { animation-delay: 0.3s; }
.draw-path:nth-child(4) { animation-delay: 0.45s; }
.draw-path:nth-child(5) { animation-delay: 0.6s; }
.draw-path:nth-child(6) { animation-delay: 0.75s; }
.draw-path:nth-child(7) { animation-delay: 0.9s; }
.draw-path:nth-child(8) { animation-delay: 1.05s; }
.draw-path:nth-child(9) { animation-delay: 1.5s; }
.draw-path:nth-child(10) { animation-delay: 1.8s; }
.draw-path:nth-child(11) { animation-delay: 2.1s; }
.draw-path:nth-child(12) { animation-delay: 2.4s; }

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

/* Section 2: Districts */
.section-districts {
    background: #f4f1de;
    padding: 100px 32px 80px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.district-card {
    border: 1px solid rgba(38, 70, 83, 0.2);
    background: #ffffff;
    overflow: hidden;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.district-card:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-stripe {
    height: 12px;
}

.card-icon {
    display: block;
    margin: 20px auto 12px;
}

.card-title {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #1d2d3d;
    text-align: center;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    padding: 0 16px;
}

.card-desc {
    font-size: 14px;
    color: #5a6a7a;
    text-align: center;
    padding: 0 20px 24px;
    line-height: 1.65;
}

/* Fade card animation */
.fade-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.fade-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section 3: Infrastructure */
.section-infrastructure {
    background: #264653;
    padding: 100px 32px 80px;
}

.map-container {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    overflow-x: auto;
}

.transit-map {
    max-width: 100%;
    height: auto;
}

.map-legend {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.legend-label {
    font-family: 'Inconsolata', monospace;
    font-size: 13px;
    color: #f4f1de;
    letter-spacing: 0.04em;
}

.legend-dot-teal {
    background: #2a9d8f;
}

/* Section 4: Statistics */
.section-statistics {
    background: #f4f1de;
    padding: 100px 32px 80px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 0 auto 48px;
    border: 1px solid rgba(38, 70, 83, 0.2);
}

.stat-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    border: 1px solid rgba(38, 70, 83, 0.1);
}

.stat-number {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 56px;
    color: #264653;
    line-height: 1;
}

.stat-label {
    font-family: 'Inconsolata', monospace;
    font-size: 14px;
    color: #5a6a7a;
    letter-spacing: 0.04em;
    margin-top: 8px;
}

/* Bar chart */
.bar-chart-container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    align-items: center;
}

.bar-label {
    font-family: 'Inconsolata', monospace;
    font-size: 13px;
    color: #1d2d3d;
    letter-spacing: 0.04em;
    text-align: right;
}

.bar-track {
    height: 20px;
    background: rgba(38, 70, 83, 0.06);
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 0 2px 2px 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 800ms ease-out;
}

.bar-fill.animated {
    transform: scaleX(1);
}

/* Section 5: Charter */
.section-charter {
    background: #ffffff;
    padding: 100px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.charter-rule {
    border: none;
    height: 1px;
    background: rgba(38, 70, 83, 0.2);
    width: 100%;
    max-width: 600px;
}

.charter-statement {
    font-family: 'Lato', sans-serif;
    font-size: 22px;
    color: #1d2d3d;
    text-align: center;
    max-width: 600px;
    line-height: 1.8;
}

.charter-domain {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #264653;
    letter-spacing: 0.08em;
}

.charter-year {
    font-family: 'Inconsolata', monospace;
    font-size: 13px;
    color: #5a6a7a;
    letter-spacing: 0.1em;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .cover-title {
        font-size: 36px;
    }

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

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

    .stat-number {
        font-size: 40px;
    }

    .bar-row {
        grid-template-columns: 100px 1fr;
    }

    .section-heading {
        font-size: 28px;
    }
}
