/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --white: #ffffff;
    --off-white: #e8e8e8;
    --gray-light: #111111;
    --gray-medium: #888888;
    --gray-dark: #333333;
    --accent: #00d4ff;
    --accent-dim: rgba(0, 212, 255, 0.15);
    --accent-glow: rgba(0, 212, 255, 0.6);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--off-white);
    background: var(--black);
}

/* Header */
.header {
    background: var(--black);
    border-bottom: 1px solid #1a1a1a;
    padding: 0.75rem 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.header-left, .header-right {
    width: 120px;
    display: flex;
    align-items: center;
}

.header-right {
    justify-content: flex-end;
}

.header-tag {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--accent);
    text-transform: uppercase;
}

.logo {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--white);
    text-align: center;
    flex: 1;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--gray-medium);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    text-decoration: none;
}

.icon-btn:hover {
    color: var(--white);
}

/* Navigation */
.nav {
    background: #0a0a0a;
    border-bottom: 1px solid #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-list {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 3rem;
    list-style: none;
    padding: 0.85rem 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-medium);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
}

.nav-link.active {
    color: var(--accent);
}

/* Hero Text */
.hero-text {
    padding: 5rem 2rem 4rem;
    text-align: center;
    background: var(--black);
}

.overline {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-headline {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--gray-medium);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Map */
.map-section {
    width: 100%;
    background: #050505;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
}

#airport-map {
    width: 100%;
    height: 560px;
}

/* Leaflet popup overrides */
.leaflet-popup-content-wrapper {
    background: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    color: var(--off-white);
}

.leaflet-popup-tip {
    background: #0d0d0d;
}

.leaflet-popup-content {
    margin: 14px 18px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.popup-code {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
    line-height: 1.2;
}

.popup-city {
    font-size: 0.85rem;
    color: var(--gray-medium);
    margin-top: 2px;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.popup-link {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    border: 1px solid #333;
    padding: 5px 12px;
    border-radius: 2px;
    transition: border-color 0.2s, color 0.2s;
}

.popup-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Custom map marker */
.airport-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 8px var(--accent-glow), 0 0 20px rgba(0, 212, 255, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
}

.airport-dot:hover {
    transform: scale(1.4);
}

/* Airport Grid Section */
.section {
    padding: 5rem 2rem;
}

.grid-section {
    background: #050505;
}

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--white);
    margin-bottom: 2.5rem;
}

.airport-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    background: #1a1a1a;
    border: 1px solid #1a1a1a;
}

.airport-card {
    background: #0a0a0a;
    padding: 1.5rem;
    text-decoration: none;
    transition: background 0.2s;
    display: block;
}

.airport-card:hover {
    background: #111111;
}

.airport-card:hover .card-code {
    color: var(--accent);
}

.card-code {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--white);
    line-height: 1.2;
    transition: color 0.2s;
}

.card-city {
    font-size: 0.78rem;
    color: var(--gray-medium);
    letter-spacing: 0.05em;
    margin-top: 4px;
    text-transform: uppercase;
}

.card-domain {
    font-size: 0.7rem;
    color: #444;
    letter-spacing: 0.03em;
    margin-top: 6px;
}

/* Footer */
.footer {
    background: var(--black);
    border-top: 1px solid #1a1a1a;
    text-align: center;
    padding: 3rem 2rem;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.footer-sub {
    font-size: 0.8rem;
    color: var(--gray-medium);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.footer-copy {
    font-size: 0.75rem;
    color: #444;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.4rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .header-tag {
        display: none;
    }

    .nav-list {
        gap: 1.2rem;
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
    }

    .nav-link {
        font-size: 0.7rem;
    }

    #airport-map {
        height: 400px;
    }

    .section {
        padding: 3rem 1rem;
    }

    .airport-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

.definition-section {
    background: #0a0a0a;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
    padding: 2rem 0;
}
.definition-text {
    color: #888;
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 800px;
}
.definition-link {
    color: #00d4ff;
    text-decoration: none;
}
.definition-link:hover {
    text-decoration: underline;
}

/* Search input */
.search-input {
    width: 100%;
    max-width: 500px;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    margin-bottom: 2rem;
    display: block;
    outline: none;
    transition: border-color 0.2s;
}
.search-input:focus {
    border-color: var(--accent);
}
.search-input::placeholder {
    color: #555;
}

/* Owned vs unowned grid cards */
.airport-card.owned {
    border-color: #00d4ff;
    color: #00d4ff;
}
.airport-card.owned .card-code {
    color: #00d4ff;
}
.airport-card.owned:hover {
    background: #0a1520;
}
.airport-card.unowned {
    color: #555;
    cursor: default;
    pointer-events: none;
}
.airport-card.unowned .card-code {
    color: #444;
}
.airport-card.unowned:hover {
    border-color: #222;
}
.card-country {
    font-size: 0.7rem;
    color: #333;
    letter-spacing: 0.05em;
    margin-top: 4px;
    text-transform: uppercase;
}
