@font-face {
    font-family: 'Minecraft';
    src: url('./fonts/Minecraft.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Minecraft';
    src: url('./fonts/Minecraft-Bold.otf') format('opentype');
    font-weight: 700;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --ink: #f7efff;
    --muted: #d1bddf;
    --accent: #cd9aff;
    --page: #110a1e;
    --edge: #533c6f;
    --font: 'Minecraft', 'Courier New', monospace;
}

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

body {
    margin: 0;
    min-height: 100svh;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font);
    display: flex;
    flex-direction: column;
}

.site-header {
    position: relative;
    z-index: 1;
    padding: 1.125rem clamp(1.125rem, 4.5vw, 4.25rem);
    background: #0e0918;
    border-bottom: 1px solid #3b2a51;
}

nav {
    display: flex;
    justify-content: flex-end;
    gap: .625rem;
}

.nav-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: .55rem 1.15rem;
    border: 1px solid var(--edge);
    background: #1e1430;
    color: var(--ink);
    box-shadow: inset 0 -3px #130d21;
    text-decoration: none;
    font: 400 1rem / 1 var(--font);
    cursor: pointer;
    transition: background-color 120ms, border-color 120ms, color 120ms;
}

.nav-download {
    background: #402561;
    border-color: #8a61bc;
    color: #f2ddff;
    box-shadow: inset 0 -3px #2c1b48;
}

.nav-control:hover { background: #503174; border-color: var(--accent); }
.nav-control:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.download-status {
    position: fixed;
    inset: 5.65rem clamp(1.125rem, 4.5vw, 4.25rem) auto auto;
    margin: 0;
    padding: .9rem 1rem;
    border: 1px solid #8a61bc;
    background: #291b40;
    color: var(--ink);
    box-shadow: 0 8px 24px #0007;
    font-size: .875rem;
}

.download-status p { margin: 0; }

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    flex: 1;
    place-items: center;
    overflow: hidden;
    padding: 3.5rem 1.25rem 6.5rem;
    min-height: 36rem;
    background:
        radial-gradient(ellipse at 50% 37%, #382052 0%, #241536 39%, transparent 74%),
        var(--page);
}

.hero::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: '';
    background-image: linear-gradient(to right, #c196fa24 1px, transparent 1px),
                      linear-gradient(to bottom, #c196fa24 1px, transparent 1px);
    background-position: center top;
    background-size: 22px 22px;
    mask-image: linear-gradient(#000 0%, #0007 58%, transparent 100%);
}

.terrain {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    z-index: -1;
    height: clamp(9rem, 32vh, 21rem);
    background:
        repeating-linear-gradient(90deg, transparent 0 22px, #110a1e70 22px 24px),
        linear-gradient(180deg, #402663 0%, #241636 45%, #110a1e 100%);
    clip-path: polygon(
        0 31%, 6% 31%, 6% 39%, 10% 39%, 10% 51%, 17% 51%, 17% 58%,
        22% 58%, 22% 68%, 30% 68%, 30% 77%, 36% 77%, 36% 83%,
        52% 83%, 52% 76%, 63% 76%, 63% 63%, 69% 63%, 69% 54%,
        74% 54%, 74% 45%, 80% 45%, 80% 28%, 84% 28%, 84% 19%,
        90% 19%, 90% 8%, 95% 8%, 95% 0, 100% 0, 100% 100%, 0 100%
    );
    opacity: .65;
}

.hero-copy { text-align: center; width: min(100%, 78rem); }

h1 {
    margin: 0;
    font: 700 clamp(2.35rem, 6.7vw, 6.875rem) / .9 var(--font);
    letter-spacing: .015em;
    text-shadow: 4px 5px #0b0615;
    text-wrap: balance;
}

h1 span { display: block; }
h1 span + span {
    color: var(--accent);
    font-size: 1.16em;
    margin-top: .12em;
}

.hero-copy p {
    margin: clamp(1.25rem, 3.1vw, 2.25rem) 0 0;
    color: var(--muted);
    font-size: clamp(.9rem, 1.8vw, 1.125rem);
    line-height: 1.6;
    text-wrap: balance;
}

@media (max-width: 40rem) {
    .hero { min-height: 28rem; padding-block: 3rem 4.5rem; }
    h1 { line-height: .98; text-shadow: 3px 3px #0b0615; }
    h1 span + span { margin-top: .08em; }
    .terrain { opacity: .5; }
}

@media (prefers-reduced-motion: reduce) { .nav-control { transition: none; } }
