/* Sign-in page in the "Field Command" look (see src/css/field-command.css for the game) */
:root {
    --ink: #11140F;
    --field: #1A1F17;
    --rule: #343C2E;
    --paper: #ECE6D3;
    --body: #C9C4B2;
    --muted: #A4AC95;
    --signal: #F2A23A;
    --signal-hover: #FFC370;
    --olive: #6B7A45;
    --sky: #7FB2E0;
    --sea: #1F3A66;
    --sea-2: #22406F;
    --land: #5E7A35;
    --land-2: #66833A;
    --rock: #6E6A5E;
    --display: 'Outfit', sans-serif;
    --mono: 'Space Mono', monospace;
    --stencil: 'Big Shoulders Stencil', sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--mono);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--signal);
}

a:hover {
    color: var(--signal-hover);
}

.bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px 32px;
    padding: 18px 40px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

header.bar {
    border-bottom: 1px solid var(--rule);
}

footer.bar {
    border-top: 1px solid var(--rule);
    padding: 16px 40px;
    font-size: 11px;
    letter-spacing: 0.16em;
}

.bar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
}

.bar nav a {
    color: var(--muted);
    text-decoration: none;
}

.bar nav a:hover {
    color: var(--paper);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    grid-template-columns: repeat(3, 6px);
    gap: 2px;
}

.brand-mark i, .brand-mark b {
    width: 6px;
    height: 6px;
    background: var(--signal);
}

.brand-mark i.olive {
    background: var(--olive);
}

.brand-mark b {
    background: transparent;
}

.wordmark {
    font-family: var(--display);
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 0.14em;
    color: var(--paper);
}

main {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 56px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1360px;
    margin: 0 auto;
    padding: 64px 40px;
}

/* ---------------------------------------------------------------- briefing */

.briefing {
    flex: 1 1 440px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.kicker {
    font-size: 13px;
    letter-spacing: 0.18em;
    color: var(--signal);
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-family: var(--display);
    font-weight: 900;
    font-size: clamp(72px, 10vw, 156px);
    line-height: 0.86;
    letter-spacing: 0.01em;
}

.dissolve {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: -18px;
}

.dissolve i, .dissolve b {
    width: 14px;
    height: 14px;
    background: var(--signal);
}

.dissolve i.olive {
    background: var(--olive);
}

.dissolve b {
    background: transparent;
}

.dissolve .o9 { opacity: 0.9; }
.dissolve .o8 { opacity: 0.8; }
.dissolve .o7 { opacity: 0.7; }
.dissolve .o6 { opacity: 0.6; }
.dissolve .o5 { opacity: 0.5; }
.dissolve .o4 { opacity: 0.4; }
.dissolve .o3 { opacity: 0.3; }

.briefing p {
    margin: 0;
    max-width: 480px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--body);
}

.briefing p strong {
    font-weight: 400;
    color: var(--paper);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 0 26px;
    background: var(--signal);
    color: var(--ink);
    font-family: var(--display);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.15s;
}

.cta:hover {
    background: var(--signal-hover);
    color: var(--ink);
}

.ghost {
    display: inline-flex;
    align-items: center;
    min-height: 52px;
    padding: 0 22px;
    border: 1px solid var(--rule);
    color: var(--paper);
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
}

.ghost:hover {
    background: var(--field);
    color: var(--paper);
}

.fineprint {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.06em;
}

/* ------------------------------------------------------------------- recon */

.brackets {
    position: relative;
}

.brackets::before, .brackets::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--signal);
    border-style: solid;
    pointer-events: none;
    z-index: 1;
}

.brackets::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.brackets::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.recon {
    flex: 1 1 400px;
    min-width: 0;
    max-width: 560px;
    border: 1px solid var(--rule);
    background: var(--field);
}

.recon-head, .recon-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    font-size: 12px;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.recon-head {
    border-bottom: 1px solid var(--rule);
}

.recon-foot {
    border-top: 1px solid var(--rule);
    font-size: 13px;
    align-items: center;
    color: var(--paper);
}

.recon em {
    font-style: normal;
    color: var(--signal);
}

.recon .turn {
    font-family: var(--stencil);
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 0.06em;
    color: var(--signal);
}

.blink {
    animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* the window shows one sector; the map holds two identical sectors and slides by one */
.recon-window {
    margin: 16px;
    aspect-ratio: 8 / 6;
    overflow: hidden;
}

.recon-map {
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: recon-scroll 24s linear infinite;
}

@keyframes recon-scroll {
    from { transform: translateY(0); }
    to { transform: translateY(calc(-50% - 1px)); }
}

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

.sector i {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--stencil);
    font-weight: 900;
    font-style: normal;
    font-size: 18px;
    color: var(--ink);
}

.sector i.s { background-color: var(--sea); }
.sector i.s:nth-child(even) { background-color: var(--sea-2); }
.sector i.g { background-color: var(--land); }
.sector i.g:nth-child(even) { background-color: var(--land-2); }
.sector i.m { background-color: var(--rock); }

.sector i.city::after {
    content: "";
    width: 46%;
    height: 46%;
    background: var(--paper);
    border: 3px solid var(--ink);
    box-sizing: border-box;
}

.sector i.unit {
    box-shadow: inset 0 0 0 2px var(--signal);
    background-image: linear-gradient(var(--signal), var(--signal));
    background-size: 58% 58%;
    background-position: center;
    background-repeat: no-repeat;
}

.sector i.enemy {
    background-image: linear-gradient(var(--sky), var(--sky));
    background-size: 58% 58%;
    background-position: center;
    background-repeat: no-repeat;
}

@media (prefers-reduced-motion: reduce) {
    .recon-map, .blink {
        animation: none;
    }
}

@media (max-width: 640px) {
    .bar, footer.bar {
        padding-left: 16px;
        padding-right: 16px;
    }

    main {
        padding: 40px 16px;
        gap: 40px;
    }
}

/* the generated map from /login.js */
.recon-window {
    position: relative;
}

.login-map {
    display: grid;
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
}

.login-map .land-tile {
    width: var(--tile-size);
    height: var(--tile-size);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-map .unit-view.city {
    border-radius: 0;
    background-color: rgba(236, 230, 211, 0.85);
    background-size: cover;
}
