/* start-screen.css — The Jovian Humanitarian Conflict
   The title card, and the IFF key it teaches before the first run. */

.title-screen {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px;
    text-align: center;
    /* Translucent, not opaque: the rail is already drifting behind it, and
       seeing what the game looks like is the best thing a title screen does. */
    background: radial-gradient(ellipse at 50% 55%,
        rgba(5, 6, 15, 0.55) 0%,
        rgba(5, 6, 15, 0.88) 70%);
    cursor: pointer;
}

.title-screen h1 {
    margin: 0;
    font-size: clamp(14px, 3.4vw, 30px);
    line-height: 1.6;
    letter-spacing: 0.06em;
    color: var(--aid-pale);
    text-shadow:
        0 0 10px rgba(255, 194, 71, 0.55),
        0 3px 0 rgba(140, 54, 40, 0.9);
}

.subtitle {
    margin: 0;
    font-size: clamp(7px, 1.2vw, 10px);
    color: var(--hostile);
    letter-spacing: 0.14em;
    text-shadow: 0 0 8px rgba(255, 47, 168, 0.5);
}

.controls-hint {
    font-size: 8px;
    line-height: 2.1;
    color: var(--hud-dim);
    letter-spacing: 0.06em;
}

/* ── The IFF key ──
   On the title screen rather than buried in credits on purpose: the game
   punishes a mistake this teaches you how to avoid, so it has to be readable
   before the first run, not after it. */
.iff-key {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-width: 430px;
    padding: 12px 14px;
    border: 1px solid rgba(107, 118, 153, 0.4);
    background: rgba(5, 6, 15, 0.5);
}

.iff-row {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.iff-mark {
    flex: 0 0 auto;
    width: 16px;
    font-size: 12px;
    text-align: center;
}

.iff-mark.aid {
    color: var(--aid);
    /* The same double-blink the transponder squawks in game, so the key is a
       sample of the signal and not just a description of it. */
    animation: squawk 0.5s steps(1, end) infinite;
}

.iff-mark.hostile {
    color: var(--hostile);
}

/* The escort rule. Same warning colour the in-game link and countdown use, so
   the key and the playfield agree about what "urgent" looks like. */
.iff-mark.warn {
    color: var(--hostile);
}

@keyframes squawk {
    0%, 20% { opacity: 1; }
    21%, 32% { opacity: 0.15; }
    33%, 46% { opacity: 1; }
    47%, 100% { opacity: 0.15; }
}

@media (prefers-reduced-motion: reduce) {
    .iff-mark.aid { animation: none; }
}

.iff-text {
    font-size: 7px;
    line-height: 1.9;
    color: var(--hud-text);
    letter-spacing: 0.04em;
}

.start-prompt {
    font-size: 10px;
    color: var(--glass);
    letter-spacing: 0.16em;
    animation: blink 1.1s steps(1, end) infinite;
}

@keyframes blink {
    0%, 55% { opacity: 1; }
    56%, 100% { opacity: 0.15; }
}

/* Keyboardless devices need a real control; PRESS SPACE is not one. */
.touch-start {
    display: none;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--void);
    background: var(--glass);
    border: none;
    padding: 14px 28px;
    cursor: pointer;
}

@media (hover: none) and (pointer: coarse) {
    .start-prompt { display: none; }
    .touch-start { display: block; }
}

.copyright {
    margin: 0;
    font-size: 6px;
    color: var(--hud-dim);
    letter-spacing: 0.1em;
}
