@font-face {
    font-family: "Geist Pixel Square";
    src: url("assets/fonts/GeistPixel-Square.woff2") format("woff2");
    font-display: swap;
}
@font-face {
    font-family: "Geist Pixel Triangle";
    src: url("assets/fonts/GeistPixel-Triangle.woff2") format("woff2");
    font-display: swap;
}

/* Sampled from the logo. */
:root {
    color-scheme: dark;
    --bg: #070304;
    --panel: #120708;
    --red: #f50101;
    --red-hot: #ea0d08;
    --red-dim: #a22721;
    --red-deep: #3a0c0e;
    --pink: #fcdaf5;
    --text: #f3e9ea;
    --text-dim: #b7a3a6;

    --font-ui: "Geist Pixel Square", ui-monospace, monospace;
    --font-display: "Geist Pixel Triangle", ui-monospace, monospace;

    --gutter: 16px;
    --col: 820px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: none;
    overflow-x: hidden;
}

/* A worn tape: faint scanlines and a dark edge over everything. */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    background:
        repeating-linear-gradient(to bottom, rgb(0 0 0 / 0.22) 0 1px, transparent 1px 3px),
        radial-gradient(ellipse at center, transparent 55%, rgb(0 0 0 / 0.55) 100%);
}

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

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

.pixel {
    image-rendering: pixelated;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    min-height: min(100svh, 820px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 48px var(--gutter) 56px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 40%, rgb(162 39 33 / 0.28), transparent 65%);
}

/* The boot logo strip: 17 cells of 157x159 at the game's 10 fps, held on the last. */
.logo {
    --s: 2;
    width: calc(157px * var(--s));
    height: calc(159px * var(--s));
    background: url("assets/thunderbloods-logo-pixelated_animated.png") 0 0 / calc(2669px * var(--s))
        calc(159px * var(--s)) no-repeat;
    image-rendering: pixelated;
    animation: strike 1.7s steps(16) 0.4s forwards;
}

@media (min-width: 560px) and (min-height: 640px) {
    .logo {
        --s: 3;
    }
}

@keyframes strike {
    to {
        background-position: calc(-2512px * var(--s)) 0;
    }
}

/* Lands on the bolt, frame 2, where the game's boot screen plays its thunder. */
.flash {
    position: fixed;
    inset: 0;
    z-index: 11;
    pointer-events: none;
    background: var(--pink);
    opacity: 0;
    animation: flash 0.9s 0.6s ease-out;
}

@keyframes flash {
    0% {
        opacity: 0;
    }
    4% {
        opacity: 0.55;
    }
    12% {
        opacity: 0.1;
    }
    18% {
        opacity: 0.35;
    }
    100% {
        opacity: 0;
    }
}

.tagline {
    margin: 0;
    max-width: 30ch;
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 1.45;
    letter-spacing: 0.04em;
}

.tagline em {
    font-style: normal;
    color: var(--red);
}

/* ── Sections ─────────────────────────────────────────────────────────── */

main {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: calc(var(--col) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 16px var(--gutter) 80px;
}

.panel {
    border: 2px solid var(--red-dim);
    background: var(--panel);
    box-shadow: 6px 6px 0 var(--red-deep);
    padding: 32px 36px;
}

h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 20px;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: normal;
    letter-spacing: 0.1em;
    color: var(--red);
}

/* A bolt ahead of every heading, the logo's one mark. */
h2::before {
    content: "";
    flex: none;
    width: 14px;
    height: 24px;
    background: var(--red);
    clip-path: polygon(40% 0, 100% 0, 62% 42%, 100% 42%, 18% 100%, 38% 55%, 0 55%);
}

p {
    margin: 0 0 16px;
}

p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: 22px;
    color: var(--pink);
}

.dim {
    color: var(--text-dim);
}

/* A dashed pixel rule, broken at the centre by the heading bolt. */
hr {
    position: relative;
    height: 2px;
    margin: 36px 0;
    border: 0;
    overflow: visible;
    background: repeating-linear-gradient(to right, var(--red-dim) 0 8px, transparent 8px 16px);
}

/* The gap is painted in panel colour, so this assumes the rule sits on a .panel. */
hr::before,
hr::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

hr::before {
    width: 46px;
    height: 2px;
    background: var(--panel);
}

hr::after {
    width: 14px;
    height: 24px;
    background: var(--red);
    clip-path: polygon(40% 0, 100% 0, 62% 42%, 100% 42%, 18% 100%, 38% 55%, 0 55%);
}

/* ── First game ───────────────────────────────────────────────────────── */

.game {
    padding: 0;
    overflow: hidden;
}

.game-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 32px 16px;
    background:
        linear-gradient(to bottom, rgb(7 3 4 / 0.2), rgb(18 7 8 / 0.95)),
        url("assets/cencon_domes_wide_shot.png") center 35% / cover no-repeat;
    image-rendering: pixelated;
    border-bottom: 2px solid var(--red-dim);
}

.game-art img {
    width: 218px;
    height: auto;
}

@media (min-width: 560px) {
    .game-art img {
        width: 436px;
    }
}

.game-body {
    padding: 28px 36px 36px;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 14px;
    letter-spacing: 0.25em;
    color: var(--text-dim);
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.btn {
    display: inline-block;
    min-width: 200px;
    padding: 14px 28px;
    border: 2px solid var(--red);
    background: var(--red);
    color: #000;
    font-family: var(--font-ui);
    font-size: 19px;
    letter-spacing: 0.12em;
    text-align: center;
    text-decoration: none;
    box-shadow: 4px 4px 0 var(--red-deep);
}

.btn:hover,
.btn:focus-visible {
    background: var(--pink);
    border-color: var(--pink);
    color: #000;
    outline: none;
}

.btn:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

.btn.ghost {
    background: transparent;
    color: var(--text);
}

.btn.ghost:hover,
.btn.ghost:focus-visible {
    background: transparent;
    color: var(--pink);
}

/* ── Footer ───────────────────────────────────────────────────────────── */

footer {
    padding: 24px var(--gutter) 48px;
    text-align: center;
    font-size: 14px;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}

@media (prefers-reduced-motion: reduce) {
    .logo {
        animation: none;
        background-position: calc(-2512px * var(--s)) 0;
    }
    .flash {
        display: none;
    }
}

@media (max-width: 560px) {
    html,
    body {
        font-size: 16px;
    }
    .panel {
        padding: 22px 20px;
        box-shadow: 4px 4px 0 var(--red-deep);
    }
    .game {
        padding: 0;
    }
    .game-body {
        padding: 22px 20px 26px;
    }
    .tagline {
        font-size: 20px;
    }
    h2 {
        font-size: 21px;
    }
    .btn {
        width: 100%;
        min-width: 0;
    }
}
