:root {
    --hq-bg: #121714;
    --hq-bg-soft: #1a221d;
    --hq-ink: #e8ebdf;
    --hq-muted: #aeb6a6;
    --hq-olive: #3d5334;
    --hq-olive-bright: #6e8d46;
    --hq-sand: #d7c69a;
    --hq-orange: #d87735;
    --hq-line: rgba(233, 238, 221, 0.14);
    --hq-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: "Rajdhani", "Segoe UI", sans-serif;
    color: var(--hq-ink);
    background: radial-gradient(circle at 20% 10%, rgba(109, 141, 70, 0.15), transparent 40%),
                radial-gradient(circle at 90% 20%, rgba(216, 119, 53, 0.12), transparent 35%),
                var(--hq-bg);
    line-height: 1.35;
}

a {
    color: inherit;
    text-decoration: none;
}

.hq-wrap {
    position: relative;
    overflow: clip;
}

.hq-wrap::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.25;
    z-index: -1;
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

.topline {
    border-bottom: 1px solid var(--hq-line);
    background: linear-gradient(90deg, rgba(61, 83, 52, 0.45), rgba(18, 23, 20, 0.95));
    font-size: 0.95rem;
}

.topline .container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    flex-wrap: wrap;
}

.topline strong {
    color: var(--hq-sand);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.main-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(10px);
    background: rgba(18, 23, 20, 0.82);
    border-bottom: 1px solid var(--hq-line);
}

.main-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.9rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brand img {
    width: 38px;
    height: 38px;
}

.brand-title {
    font-family: "Orbitron", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 1rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--hq-muted);
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--hq-ink);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.58rem 1rem;
    border: 1px solid rgba(216, 119, 53, 0.5);
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #ffe2cb;
    background: linear-gradient(145deg, #d87735, #bc6024);
}

.hero {
    position: relative;
    padding: 6rem 0 5rem;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(95deg, rgba(7, 10, 8, 0.82) 15%, rgba(7, 10, 8, 0.45) 60%, rgba(7, 10, 8, 0.8) 100%),
                url("../assets/ops-night-1.jpg") center/cover no-repeat;
    z-index: -2;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 65%, var(--hq-bg) 100%);
    z-index: -1;
}

.hero-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1.25fr 1fr;
    align-items: end;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid rgba(215, 198, 154, 0.35);
    border-radius: 999px;
    background: rgba(17, 22, 18, 0.66);
    padding: 0.4rem 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
    color: var(--hq-sand);
}

.badge span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #8dbe57;
    box-shadow: 0 0 0 6px rgba(141, 190, 87, 0.2);
}

.hero h1 {
    margin: 1rem 0;
    font-family: "Orbitron", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: clamp(2.1rem, 5vw, 4rem);
    max-width: 15ch;
}

.hero p {
    max-width: 55ch;
    color: #dde5d2;
    font-size: clamp(1.04rem, 2.2vw, 1.2rem);
}

.hero-actions {
    margin-top: 1.45rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.1rem;
    border-radius: 0.35rem;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.87rem;
}

.btn-primary {
    color: #fff4eb;
    background: linear-gradient(145deg, #d87735, #b85a22);
}

.btn-secondary {
    border-color: rgba(215, 198, 154, 0.5);
    color: var(--hq-sand);
    background: rgba(10, 14, 11, 0.65);
}

.hero-panel {
    border: 1px solid var(--hq-line);
    border-radius: 1rem;
    background: rgba(10, 13, 10, 0.72);
    box-shadow: var(--hq-shadow);
    overflow: hidden;
}

.hero-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid var(--hq-line);
    padding: 0.9rem 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--hq-sand);
    font-size: 0.83rem;
}

.hero-panel ul {
    list-style: none;
    margin: 0;
    padding: 0.85rem 1.1rem 1rem;
}

.hero-panel li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
    padding: 0.65rem 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.hero-panel li:last-child {
    border-bottom: 0;
}

.hero-panel small {
    color: var(--hq-muted);
}

.section {
    padding: 4rem 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.section-head h2 {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-size: clamp(1.4rem, 3.4vw, 2.5rem);
}

.section-head p {
    margin: 0;
    max-width: 60ch;
    color: var(--hq-muted);
}

.cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
    border: 1px solid var(--hq-line);
    border-radius: 0.9rem;
    padding: 1.15rem;
    background: linear-gradient(160deg, rgba(24, 31, 27, 0.84), rgba(11, 15, 12, 0.8));
    transition: transform 220ms ease, border-color 220ms ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(110, 141, 70, 0.75);
}

.card h3 {
    margin: 0 0 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 1.03rem;
}

.card p {
    margin: 0;
    color: var(--hq-muted);
}

.zones-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
}

.zones-map {
    border-radius: 1rem;
    border: 1px solid var(--hq-line);
    min-height: 300px;
    overflow: hidden;
    position: relative;
}

.zones-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.95);
}

.zones-map::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(10, 14, 11, 0.8) 100%);
}

.zone-list {
    display: grid;
    gap: 0.8rem;
}

.zone {
    border: 1px solid var(--hq-line);
    border-left: 4px solid var(--hq-olive-bright);
    border-radius: 0.6rem;
    background: rgba(15, 20, 16, 0.8);
    padding: 0.9rem 1rem;
}

.zone h3 {
    margin: 0 0 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.zone p {
    margin: 0;
    color: var(--hq-muted);
}

.theaters-section {
    padding-top: 1rem;
}

.theaters-shell {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

.world-map-wrap {
    position: relative;
    border: 1px solid var(--hq-line);
    border-radius: 1rem;
    background: radial-gradient(circle at 20% 20%, rgba(110, 141, 70, 0.2), rgba(17, 23, 19, 0.92) 50%),
                linear-gradient(180deg, rgba(17, 22, 18, 0.86), rgba(9, 12, 10, 0.9));
    min-height: 360px;
    overflow: hidden;
    box-shadow: var(--hq-shadow);
}

.world-theater-map {
    width: 100%;
    min-height: 360px;
}

.world-theater-map .leaflet-tile-pane {
    filter: hue-rotate(46deg) saturate(0.75) brightness(0.72) contrast(1.08);
}

.world-theater-map .leaflet-control-zoom a {
    background: rgba(13, 18, 14, 0.9);
    color: var(--hq-sand);
    border-color: rgba(215, 198, 154, 0.2);
}

.map-credit {
    margin: 0.42rem 0 0;
    color: #9ead96;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.map-theater-marker {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid #21301d;
    box-shadow: 0 0 0 7px rgba(95, 124, 71, 0.24);
    background: #5f7c47;
    transition: box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.map-theater-marker.is-inactive {
    background: #7c8a6d;
    box-shadow: 0 0 0 7px rgba(124, 138, 109, 0.24);
}

.map-theater-marker.is-active,
.map-theater-marker.is-selected {
    background: #d87735;
    box-shadow: 0 0 0 8px rgba(216, 119, 53, 0.28);
    border-color: #5a2c13;
}

.theater-brief {
    border: 1px solid var(--hq-line);
    border-radius: 1rem;
    background: linear-gradient(170deg, rgba(24, 31, 27, 0.9), rgba(12, 16, 13, 0.95));
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.brief-label {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hq-sand);
    font-size: 0.82rem;
}

.theater-brief h3 {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theater-brief p {
    margin: 0;
    color: var(--hq-muted);
}

.theater-status {
    width: fit-content;
    border: 1px solid rgba(215, 198, 154, 0.4);
    border-radius: 999px;
    padding: 0.22rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.theater-status.is-active {
    color: #dff0c8;
    border-color: rgba(141, 190, 87, 0.7);
    background: rgba(79, 109, 46, 0.35);
}

.theater-status.is-inactive {
    color: #f0d8c8;
    border-color: rgba(216, 119, 53, 0.5);
    background: rgba(85, 44, 24, 0.3);
}

.theater-status.is-neutral {
    color: #d8e1cd;
    border-color: rgba(169, 190, 140, 0.44);
    background: rgba(52, 72, 40, 0.28);
}

.theater-modal-btn {
    margin-top: auto;
    width: fit-content;
}

.reset-map-btn {
    width: fit-content;
}

.theater-jump-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.2rem;
}

.theater-jump-btn {
    border: 1px solid rgba(215, 198, 154, 0.25);
    border-radius: 0.45rem;
    background: rgba(10, 13, 11, 0.7);
    color: var(--hq-ink);
    font: inherit;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.5rem;
    cursor: pointer;
}

.theater-jump-btn:hover,
.theater-jump-btn:focus-visible {
    border-color: rgba(141, 190, 87, 0.68);
}

.theater-jump-btn.is-selected {
    border-color: rgba(216, 119, 53, 0.7);
    background: rgba(86, 49, 27, 0.42);
}

.theaters-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
}

.theaters-modal.is-open {
    display: grid;
    place-items: center;
}

.theaters-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 9, 0.72);
    backdrop-filter: blur(6px);
}

.theaters-modal-panel {
    position: relative;
    width: min(1040px, 94vw);
    max-height: 86vh;
    overflow: auto;
    border: 1px solid var(--hq-line);
    border-radius: 1rem;
    background: linear-gradient(160deg, rgba(21, 28, 23, 0.98), rgba(12, 16, 13, 0.98));
    box-shadow: var(--hq-shadow);
    padding: 1.1rem;
}

.theaters-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.theaters-modal-head h2 {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: "Orbitron", sans-serif;
    font-size: 1.2rem;
}

.theaters-modal-close {
    border: 1px solid rgba(215, 198, 154, 0.4);
    border-radius: 999px;
    padding: 0.42rem 0.8rem;
    background: rgba(11, 15, 12, 0.65);
    color: var(--hq-sand);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.theaters-modal-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mission-card {
    border: 1px solid var(--hq-line);
    border-left: 4px solid #4d6442;
    border-radius: 0.8rem;
    background: rgba(18, 23, 20, 0.72);
    padding: 0.95rem;
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease;
}

.mission-card:hover,
.mission-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(215, 198, 154, 0.45);
}

.mission-card.is-active {
    border-left-color: #8dbe57;
}

.mission-card.is-inactive {
    border-left-color: #d87735;
}

.mission-card h3 {
    margin: 0 0 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1rem;
}

.mission-card p {
    margin: 0;
    color: var(--hq-muted);
}

.mission-status-row {
    margin-top: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.media-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.media-item {
    border-radius: 0.8rem;
    border: 1px solid var(--hq-line);
    overflow: hidden;
    position: relative;
    min-height: 220px;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item span {
    position: absolute;
    left: 0.7rem;
    bottom: 0.7rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(8, 10, 8, 0.72);
    border: 1px solid rgba(233, 238, 221, 0.2);
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
}

.deploy-section {
    padding-top: 2rem;
}

.deploy-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.deploy-card {
    border: 1px solid var(--hq-line);
    border-left: 4px solid #4d6442;
    border-radius: 0.8rem;
    background: linear-gradient(160deg, rgba(25, 33, 28, 0.84), rgba(12, 16, 13, 0.92));
    padding: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.deploy-card.is-active {
    border-left-color: #8dbe57;
}

.deploy-card.is-inactive {
    border-left-color: #d87735;
}

.deploy-card h3 {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1rem;
}

.deploy-card p {
    margin: 0;
    color: var(--hq-muted);
}

.deploy-card .btn {
    margin-top: auto;
    width: fit-content;
}

.franchising-section {
    padding-top: 1rem;
}

.franchise-shell {
    border: 1px solid rgba(215, 198, 154, 0.28);
    border-radius: 1rem;
    padding: 1.4rem;
    background: linear-gradient(132deg, rgba(52, 71, 42, 0.78), rgba(20, 26, 21, 0.92));
    display: grid;
    grid-template-columns: 1.4fr auto;
    gap: 1rem;
    align-items: center;
}

.passport-section {
    padding-top: 1rem;
}

.passport-shell {
    border: 1px solid rgba(215, 198, 154, 0.28);
    border-radius: 1rem;
    padding: 1.35rem;
    background: linear-gradient(132deg, rgba(37, 63, 88, 0.5), rgba(20, 26, 21, 0.92));
    display: grid;
    grid-template-columns: 1.35fr auto;
    gap: 1rem;
    align-items: center;
}

.passport-shell h2 {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.passport-shell p {
    margin: 0.45rem 0 0;
    color: #dce7e8;
}

.passport-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.passport-actions .btn {
    width: 100%;
}

.franchise-shell h2 {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.franchise-shell p {
    margin: 0.45rem 0 0;
    color: #dce7ce;
}

.franchise-list {
    margin: 0.8rem 0 0;
    padding-left: 1.1rem;
    color: #e7eddc;
}

.franchise-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.franchise-actions .btn {
    width: 100%;
}

.franchise-modal {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: none;
}

.franchise-modal.is-open {
    display: grid;
    place-items: center;
}

.franchise-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 9, 0.74);
    backdrop-filter: blur(6px);
}

.franchise-modal-panel {
    position: relative;
    width: min(900px, 94vw);
    max-height: 88vh;
    overflow: auto;
    border: 1px solid var(--hq-line);
    border-radius: 1rem;
    background: linear-gradient(160deg, rgba(21, 28, 23, 0.98), rgba(12, 16, 13, 0.98));
    box-shadow: var(--hq-shadow);
    padding: 1.1rem;
}

.franchise-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.franchise-modal-head h2 {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.franchise-form {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.franchise-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.78rem;
    color: var(--hq-sand);
}

.franchise-form input,
.franchise-form textarea {
    border: 1px solid rgba(215, 198, 154, 0.26);
    border-radius: 0.45rem;
    background: rgba(11, 15, 12, 0.78);
    color: var(--hq-ink);
    font: inherit;
    padding: 0.62rem 0.68rem;
}

.franchise-form textarea {
    resize: vertical;
}

.franchise-form-wide {
    grid-column: 1 / -1;
}

.franchise-form-actions {
    display: flex;
    justify-content: flex-start;
}

.site-footer {
    border-top: 1px solid var(--hq-line);
    padding: 1.2rem 0 2rem;
    color: var(--hq-muted);
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1020px) {
    .hero-grid,
    .zones-grid,
    .theaters-shell,
    .passport-shell,
    .franchise-shell {
        grid-template-columns: 1fr;
    }

    .cards,
    .deploy-grid,
    .theaters-modal-grid,
    .media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .main-nav .container {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .hero {
        padding-top: 5rem;
    }

    .cards,
    .deploy-grid,
    .theaters-modal-grid,
    .media-grid {
        grid-template-columns: 1fr;
    }

    .theater-jump-list {
        grid-template-columns: 1fr;
    }

    .franchise-form {
        grid-template-columns: 1fr;
    }
}
