html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #f2f7fb;
    background: var(--lst-bg, #0a2d47);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

.site-header {
    background: linear-gradient(180deg, color-mix(in srgb, var(--lst-primary, #0d4f82) 96%, #000 4%), color-mix(in srgb, var(--lst-primary, #0d4f82) 78%, #000 22%));
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.site-header__inner,
.site-footer__inner,
.site-main {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header__inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.custom-logo-link img {
    display: block;
    max-height: 58px;
    width: auto;
}

.site-logo-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    font-size: 1.6rem;
    font-weight: 850;
}

.site-logo-text span {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 38px;
    color: var(--lst-primary, #0d4f82);
    background: #fff;
    border-radius: 6px;
}

.site-nav {
    flex: 1;
}

.site-nav ul {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a,
.login-button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 750;
}

.site-nav a {
    color: #dcebf6;
    border: 1px solid transparent;
}

.site-nav a:hover,
.login-button:hover,
.btn:hover {
    border-color: rgba(255,255,255,.26);
}

.login-button {
    color: #fff;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
}

.hero-shell {
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(360px, 1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    padding: 74px 0 54px;
}

.eyebrow,
.card-kicker {
    margin: 0 0 10px;
    color: var(--lst-accent, #f28c28);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.hero-copy h1 {
    margin: 0 0 18px;
    max-width: 760px;
    font-size: clamp(1.8rem, 3.6vw, 3rem);
    line-height: 1.06;
    overflow-wrap: anywhere;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: #c7d7e2;
    font-size: 1.12rem;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn-primary {
    color: #111;
    background: var(--lst-accent, #f28c28);
}

.btn-ghost {
    color: #fff;
    border: 1px solid rgba(255,255,255,.24);
    background: rgba(255,255,255,.08);
}

.ops-preview {
    position: relative;
    z-index: 1;
    min-height: 430px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    background: #111c25;
    box-shadow: 0 28px 70px rgba(0,0,0,.36);
}

.ops-toolbar {
    display: flex;
    gap: 8px;
    padding: 14px;
    background: #26323c;
}

.ops-toolbar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--lst-accent, #f28c28);
}

.ops-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    min-height: 380px;
}

.map-pane {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(rgba(42,105,70,.25) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42,105,70,.25) 1px, transparent 1px),
        radial-gradient(circle at 62% 46%, rgba(211,47,47,.34), transparent 0 16%, transparent 17%),
        linear-gradient(135deg, #274533, #172a36 52%, #26303a);
    background-size: 36px 36px, 36px 36px, auto, auto;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.map-tiles {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 0;
    display: grid;
    grid-template-columns: repeat(3, 256px);
    grid-template-rows: repeat(3, 256px);
    width: 768px;
    height: 768px;
    opacity: .76;
    filter: saturate(.72) contrast(1.08) brightness(.72);
    transform: translate(-50%, -50%) scale(1.06);
}

.map-tiles img {
    display: block;
    width: 256px;
    height: 256px;
}

.map-attribution {
    position: absolute;
    right: 8px;
    bottom: 6px;
    z-index: 4;
    padding: 2px 6px;
    color: rgba(255,255,255,.78);
    background: rgba(0,0,0,.46);
    border-radius: 4px;
    font-size: .68rem;
    text-decoration: none;
}

.map-pane::before,
.map-pane::after {
    content: "";
    position: absolute;
    z-index: 2;
    pointer-events: none;
    background: rgba(55,145,220,.62);
    border-radius: 999px;
}

.map-pane::before {
    width: 82%;
    height: 6px;
    left: 8%;
    top: 28%;
    transform: rotate(-18deg);
}

.map-pane::after {
    width: 58%;
    height: 5px;
    right: 8%;
    bottom: 26%;
    transform: rotate(28deg);
}

.unit {
    position: absolute;
    z-index: 3;
    padding: 6px 10px;
    color: #111;
    border-radius: 4px;
    font-size: .84rem;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(0,0,0,.28);
}

.unit-green { left: 18%; top: 54%; background: #4caf50; }
.unit-yellow { right: 16%; top: 24%; background: #ffca28; }
.unit-red { right: 26%; bottom: 18%; color: #fff; background: #d93025; }

.dispatch-pane {
    padding: 18px;
    background: #18222c;
    border-left: 1px solid rgba(255,255,255,.12);
}

.dispatch-pane strong {
    display: block;
    margin-bottom: 10px;
    color: #fff;
}

.dispatch-pane p {
    color: #becbd5;
    line-height: 1.5;
}

.status-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: 22px;
}

.status-row span {
    display: grid;
    place-items: center;
    min-height: 32px;
    color: #111;
    font-weight: 900;
}

.status-row span:nth-child(1) { background: #d93025; }
.status-row span:nth-child(2) { background: #ffca28; }
.status-row span:nth-child(3) { background: #43a047; }
.status-row span:nth-child(4) { background: #1e88e5; }

.info-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr .8fr;
    gap: 18px;
    padding: 10px 0 50px;
}

.info-card,
.start-console,
.content-card {
    background: color-mix(in srgb, var(--lst-panel, #123b5b) 86%, #000 14%);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 18px 44px rgba(0,0,0,.2);
}

.info-card h2,
.section-heading h2,
.content-card h1 {
    margin: 0 0 12px;
    color: #fff;
}

.info-card p,
.content-card {
    color: #c7d7e2;
    line-height: 1.65;
}

.news-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.news-list li {
    display: grid;
    gap: 4px;
}

.news-list time {
    color: var(--lst-accent, #f28c28);
    font-size: .82rem;
    font-weight: 800;
}

.news-list a,
.link-card a {
    color: #fff;
    text-decoration: none;
}

.link-card {
    display: grid;
    align-content: start;
    gap: 10px;
}

.link-card a {
    display: block;
    padding: 12px 14px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    font-weight: 800;
}

.start-console {
    margin-bottom: 54px;
}

.section-heading {
    margin-bottom: 18px;
}

.missing-plugin {
    padding: 18px;
    color: #fff;
    background: rgba(217,48,37,.24);
    border: 1px solid rgba(217,48,37,.45);
    border-radius: 8px;
}

.content-page {
    padding: 48px 0;
}

.site-footer {
    border-top: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.18);
}

.site-footer__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #b7c8d4;
}

@media (max-width: 980px) {
    .site-header__inner,
    .hero-shell,
    .info-grid,
    .ops-grid {
        grid-template-columns: 1fr;
    }

    .site-header__inner {
        display: grid;
        padding: 14px 0;
    }

    .site-nav ul {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .hero-shell {
        min-height: 0;
        padding-top: 42px;
    }

    .dispatch-pane {
        border-left: 0;
        border-top: 1px solid rgba(255,255,255,.12);
    }
}

@media (max-width: 620px) {
    .site-header__inner,
    .site-footer__inner,
    .site-main {
        width: min(100% - 24px, 1200px);
    }

    .hero-actions,
    .site-footer__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    .login-button {
        width: 100%;
    }
}

/* Native motion helpers */
.reveal-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tilt-card {
    transform-style: preserve-3d;
    transition: transform .22s ease, box-shadow .22s ease;
}

.tilt-card.is-tilting {
    box-shadow: 0 30px 70px rgba(0,0,0,.34);
}

.hero-shell {
    perspective: 1200px;
}

.ops-preview {
    will-change: transform;
}

.unit {
    animation: unitPulse 2.4s ease-in-out infinite;
}

.unit-yellow {
    animation-delay: .4s;
}

.unit-red {
    animation-delay: .8s;
}

.ops-toolbar span {
    animation: toolbarBlink 2.8s ease-in-out infinite;
}

.ops-toolbar span:nth-child(2) {
    animation-delay: .35s;
}

.ops-toolbar span:nth-child(3) {
    animation-delay: .7s;
}

@keyframes unitPulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.03); }
}

@keyframes toolbarBlink {
    0%, 100% { opacity: .45; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }

    .reveal-up {
        opacity: 1;
        transform: none;
    }
}
