/*
    The site's look, in one file.

    The palette is taken from the game's own artwork -- the wooden planks of its menus and the
    green of its maps -- rather than chosen. It is a 1996 game and the site should look like it
    knows that, without pretending to be a DOS screen: the type is modern and readable, the
    layout is a single column that works on a telephone, and the only pixel art is the game's.

    No framework. This is four pages of text and one form; a stylesheet somebody can read start to
    finish is worth more here than a grid system.
*/

:root {
    --drewno: #3a2417;
    --drewno-jasne: #6b4426;
    --drewno-ciemne: #241209;
    --pergamin: #f2e8d5;
    --pergamin-ciemny: #e0d2b8;
    --atrament: #2a1d12;
    --atrament-cichy: #6a5843;
    --zielen: #4a7c2f;
    --zielen-jasna: #6fa844;
    --czerwien: #a33b2b;

    --szerokosc: 56rem;
    --promien: 3px;
}

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

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

body {
    margin: 0;
    background: var(--drewno-ciemne);
    color: var(--atrament);
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    font-size: 1.0625rem;
    line-height: 1.65;
}


/* ---------------------------------------------------------------- layout */

/*
    A column, so the footer is at the bottom of the window on a short page rather than halfway
    down it with the page's own background showing underneath. min-height alone only makes the
    box tall; it does not tell the parts inside where to go.
*/
.strona {
    max-width: var(--szerokosc);
    margin: 0 auto;
    background: var(--pergamin);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 3rem rgba(0, 0, 0, 0.55);
}

main {
    flex: 1;
    padding: 0 1.5rem;
}

section {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--pergamin-ciemny);
}

section:last-child {
    border-bottom: 0;
}


/* ---------------------------------------------------------------- header */

header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--drewno);
    background-image:
        repeating-linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.045) 0,
            rgba(255, 255, 255, 0.045) 1px,
            transparent 1px,
            transparent 14px
        );
    border-bottom: 3px solid var(--drewno-ciemne);
}

.godlo {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.godlo .tytul {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--pergamin);
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}

.godlo .rok {
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    color: var(--drewno-jasne);
    filter: brightness(1.7);
}

header nav {
    display: flex;
    gap: 1.5rem;
}

header nav a {
    color: var(--pergamin-ciemny);
    text-decoration: none;
    font-size: 0.98rem;
    letter-spacing: 0.03em;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

header nav a:hover,
header nav a:focus-visible {
    color: #fff;
    border-bottom-color: var(--zielen-jasna);
}

/* ---------------------------------------------------------------- tekst */

h1 {
    font-size: clamp(2rem, 6vw, 2.9rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
}

/*
    Blazor's FocusOnNavigate puts the keyboard on the h1 after every navigation, which is right --
    it is how somebody using a screen reader is told the page changed -- and it does it by giving
    the heading tabindex="-1", which makes the browser draw a focus ring round the title of every
    page. The ring is removed only for that case: a heading is never reached by tabbing, so there
    is no keyboard user who loses anything, and every control that can be tabbed to still shows
    where the focus is.
*/
h1[tabindex="-1"]:focus {
    outline: none;
}

h2 {
    font-size: 1.5rem;
    margin: 0 0 0.9rem;
}

h3 {
    font-size: 1.15rem;
    margin: 0 0 0.5rem;
}

p {
    margin: 0 0 1.1rem;
}

.wstep {
    font-size: 1.18rem;
    line-height: 1.6;
    color: var(--atrament);
}

.cicho {
    color: var(--atrament-cichy);
    font-size: 0.95rem;
}

.podpowiedz {
    color: var(--atrament-cichy);
    font-size: 0.9rem;
    margin: 0.4rem 0 0;
}

a {
    color: #8a4a1e;
}

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

code {
    font-family: "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
    font-size: 0.92em;
    background: var(--pergamin-ciemny);
    padding: 0.1em 0.35em;
    border-radius: var(--promien);
}

.lista {
    margin: 0 0 1.2rem;
    padding-left: 1.2rem;
}

.lista li {
    margin-bottom: 0.45rem;
}

/* ---------------------------------------------------------------- przyciski */

.przyciski {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 0;
}

.przycisk {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    background: var(--zielen);
    color: #fff;
    font-family: inherit;
    font-size: 1.02rem;
    text-decoration: none;
    border: 0;
    border-bottom: 3px solid #35591f;
    border-radius: var(--promien);
    cursor: pointer;
}

.przycisk:hover,
.przycisk:focus-visible {
    background: var(--zielen-jasna);
    color: #fff;
}

.przycisk:active {
    transform: translateY(1px);
    border-bottom-width: 2px;
}

.przycisk.cichy {
    background: transparent;
    color: #8a4a1e;
    border: 1px solid var(--pergamin-ciemny);
    border-bottom-width: 3px;
}

.przycisk.cichy:hover {
    background: var(--pergamin-ciemny);
    color: var(--atrament);
}

/* ---------------------------------------------------------------- obrazki

   The screenshots are 320x200, which is what VGA mode 13h was, and those pixels were not square:
   on a 4:3 display each was a sixth taller than wide, and the artwork was drawn to be seen that
   way. Shown 1:1 the whole game looks squashed. The aspect-ratio below puts back the stretch the
   hardware used to apply, and image-rendering keeps the pixels crisp instead of letting the
   browser smooth away the art.
*/

figure {
    margin: 0;
}

.duze img,
.galeria img {
    width: 100%;
    aspect-ratio: 4 / 3;
    image-rendering: pixelated;
    display: block;
    border: 3px solid var(--drewno);
    border-radius: var(--promien);
    background: #000;
}

.duze {
    margin-top: 2rem;
}

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--atrament-cichy);
}

/* ---------------------------------------------------------------- karty */

.karty {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.5rem;
}

.karty article {
    background: var(--pergamin-ciemny);
    padding: 1.25rem;
    border-radius: var(--promien);
    border-left: 4px solid var(--zielen);
}

.karty p {
    margin: 0;
    font-size: 0.97rem;
}

/* ---------------------------------------------------------------- formularz */

.pole {
    margin-bottom: 1.4rem;
}

.pole label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.pole input,
.pole select,
.pole textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--atrament);
    background: #fff;
    border: 1px solid #b9a888;
    border-radius: var(--promien);
}

.pole textarea {
    resize: vertical;
    min-height: 9rem;
}

.pole input:focus-visible,
.pole select:focus-visible,
.pole textarea:focus-visible {
    outline: 2px solid var(--zielen);
    outline-offset: 1px;
}

/* Blazor marks these itself when validation fails. */
.pole .invalid {
    border-color: var(--czerwien);
}

.validation-message {
    display: block;
    margin-top: 0.35rem;
    color: var(--czerwien);
    font-size: 0.92rem;
}

.blad {
    padding: 0.9rem 1.1rem;
    background: #f6dcd6;
    border-left: 4px solid var(--czerwien);
    border-radius: var(--promien);
}

.udalo-sie {
    padding: 1.5rem;
    background: #e2eed7;
    border-left: 4px solid var(--zielen);
    border-radius: var(--promien);
}

.udalo-sie h2 {
    margin-top: 0;
}

/*
    The honeypot: off screen rather than display:none, because the bots worth catching read the
    markup and skip anything obviously hidden. A person never reaches it -- tabindex="-1" keeps
    the keyboard away and aria-hidden keeps a screen reader from announcing it.
*/
.pole-www {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------------------------------------------------------------- stopka */

footer {
    padding: 2rem 1.5rem 2.5rem;
    background: var(--drewno);
    color: var(--pergamin-ciemny);
    border-top: 3px solid var(--drewno-ciemne);
    font-size: 0.95rem;
}

footer p {
    margin: 0 0 0.6rem;
    max-width: 44rem;
}

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

footer a {
    color: var(--zielen-jasna);
}

footer .cicho {
    color: #b09a7e;
    font-size: 0.88rem;
}

/* ---------------------------------------------------------------- telefon */

@media (max-width: 34rem) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    header nav {
        gap: 1.1rem;
    }

    .przyciski .przycisk {
        flex: 1 1 auto;
        text-align: center;
    }
}
