/* The landing page, in the game's own colours and type. */

@font-face {
    font-family: "Railhue Inter";
    src: url("/fonts/inter-semibold.otf") format("opentype");
    font-weight: 600;
    font-display: swap;
}

:root {
    --backdrop: #1a222d;
    --board: #10161e;
    --panel: #202935;
    --panel-hover: #2a3544;
    --line: #3a4759;
    --line-strong: #66758c;
    --text: #e8edf4;
    --soft: #8e9bae;
    --accent: #2fa37a;
    --accent-hover: #38b789;
    --ink: #07130e;
    --corner: 2px;
    --face: "Railhue Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--backdrop);
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Small capitals: the name of a section, a button, a number's unit. */
.caps {
    font: 600 12px/1.2 var(--face);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.soft {
    color: var(--soft);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 24px;
    border: 1px solid var(--line);
    border-radius: var(--corner);
    background: var(--panel);
    color: var(--text);
    font: 600 12px/1 var(--face);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
}

.button:hover {
    background: var(--panel-hover);
    border-color: var(--line-strong);
}

.button.accent {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--ink);
}

.button.accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.button.small {
    height: 36px;
    padding: 0 16px;
}

:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* Top bar. */
.top {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 72px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
    text-decoration: none;
    font: 600 20px/1 var(--face);
    letter-spacing: 0.16em;
}

.brand img {
    width: 36px;
    height: 36px;
    border-radius: var(--corner);
}

.top nav {
    display: flex;
    gap: 24px;
}

.top nav a {
    color: var(--soft);
    text-decoration: none;
}

.top nav a:hover {
    color: var(--text);
}

/* Opening. */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
    padding: 64px 0 72px;
}

.hero h1 {
    margin: 14px 0 18px;
    font: 600 48px/1.08 var(--face);
    letter-spacing: -0.015em;
}

.hero p {
    max-width: 30em;
    margin: 0 0 28px;
    color: var(--soft);
    font-size: 18px;
}

.hero .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.frame {
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--corner);
    background: var(--board);
}

.frame img {
    width: 100%;
    border-radius: 1px;
}

/* A section, under a ruled heading. */
section {
    padding: 0 0 64px;
}

.head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.head h2 {
    margin: 0;
}

.head a {
    color: var(--soft);
    text-decoration: none;
}

.head a:hover {
    color: var(--text);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.steps h3 {
    margin: 16px 0 6px;
    color: var(--accent);
}

.steps p {
    margin: 0;
    color: var(--soft);
}

.lists {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
}

/* The rows of a list, as the game draws them. */
.rows {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rows > li > a,
.rows > li > div {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: var(--corner);
    background: var(--panel);
    text-decoration: none;
}

.rows > li > a:hover {
    background: var(--panel-hover);
    border-color: var(--line-strong);
}

.rows .rank {
    width: 20px;
    color: var(--soft);
    font: 600 14px/1 var(--face);
}

.rows .name {
    flex: 1;
    min-width: 0;
    font: 600 14px/1.3 var(--face);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rows .name small {
    display: block;
    margin-top: 5px;
    color: var(--soft);
    font: 600 12px/1 var(--face);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rows .counts {
    text-align: right;
    white-space: nowrap;
}

.rows .counts span {
    display: block;
}

.rows .counts span + span {
    margin-top: 5px;
    color: var(--soft);
}

.rows .quiet {
    justify-content: center;
    background: none;
    color: var(--soft);
}

.make {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--corner);
    background: var(--panel);
}

.make h2 {
    margin: 0 0 6px;
    font: 600 24px/1.2 var(--face);
}

.make p {
    margin: 0;
    color: var(--soft);
}

footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 24px 0 40px;
    border-top: 1px solid var(--line);
    color: var(--soft);
    font-size: 14px;
}

footer a {
    color: var(--soft);
}

footer a:hover {
    color: var(--text);
}

/* A page of plain reading, such as the privacy notes. */
.prose {
    max-width: 680px;
    padding: 48px 0 64px;
}

.prose h1 {
    margin: 0 0 8px;
    font: 600 36px/1.1 var(--face);
}

.prose h2 {
    margin: 36px 0 8px;
    font: 600 18px/1.3 var(--face);
}

.prose p,
.prose li {
    color: #c3ccd9;
}

.prose ul {
    padding-left: 20px;
}

@media (max-width: 820px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
        padding: 40px 0 56px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .steps {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .steps .frame {
        max-width: 340px;
    }

    .lists {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
    }

    .make {
        flex-direction: column;
        align-items: flex-start;
    }

    .top nav {
        display: none;
    }
}
