:root {
    color-scheme: dark;
    --bg: #0f172a;
    --surface: #172236;
    --line: #29374d;
    --text: #f1f5f9;
    --muted: #a0aec0;
    --accent: #38bdf8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.65 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 5px;
}

header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #0f172af2;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.nav-wrap,.footer-wrap {
    max-width: 1160px;
    margin: auto;
    padding: 17px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-weight: 750;
    font-size: 23px;
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    letter-spacing: -1px;
}

.brand>span:last-child {
    color: var(--accent);
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid #38bdf877;
    border-radius: 9px;
    color: var(--accent);
    margin-right: 10px;
    font-size: 20px;
}

nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

nav a {
    font-size: 14px;
    color: var(--muted);
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

nav a:hover,nav a[aria-current] {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-size: 22px;
    padding: 3px 12px;
}

main {
    width: 100%;
    max-width: 1160px;
    margin: auto;
    padding: 0 28px 80px;
    flex: 1;
}

.hero {
    padding: 105px 0 90px;
    background: radial-gradient(ellipse at 75% 40%,#164e6333,transparent 58%);
}

.eyebrow,.section-head>span {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 650;
    color: var(--accent);
}

h1,h2,h3,p {
    margin: 0;
}

h1 {
    font-size: clamp(48px,8vw,98px);
    letter-spacing: -.065em;
    line-height: 1.04;
    margin: 18px 0 22px;
}

h1 em {
    font-style: normal;
    color: var(--accent);
}

h2 {
    font-size: 25px;
    letter-spacing: -.025em;
}

h3 {
    font-size: 22px;
    letter-spacing: -.02em;
}

p {
    color: var(--muted);
    max-width: 650px;
}

.hero p,.page-head p {
    font-size: 19px;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #40516a;
    border-radius: 9px;
    padding: 11px 20px;
    font-weight: 650;
    font-size: 14px;
    transition: background .15s,transform .15s;
}

.button:hover {
    background: #26364b;
    transform: translateY(-2px);
}

.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #082032;
}

.primary:hover {
    background: #7dd3fc;
}

.coffee {
    background: #ffdd00;
    color: #111;
    border-color: #ffdd00;
}

.coffee:hover {
    background: #ffe85c;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 20px;
}

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

.tile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

a.tile {
    transition: transform .2s,border-color .2s;
}

a.tile:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.art {
    height: 210px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 20%,#28456b,#121a2d 65%,#0b1020);
}

.moon {
    position: absolute;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: #c2d9ed;
    opacity: .22;
    box-shadow: 0 0 65px #8db4ee;
    top: 22px;
    right: 16%;
}

.game-title {
    font: italic 42px Georgia,serif;
    letter-spacing: -2px;
    position: relative;
    color: #d4e5f6;
    text-shadow: 0 4px 20px #000;
}

.code-art {
    background: linear-gradient(135deg,#102a42,#172236);
    font: 70px monospace;
    color: #38bdf8aa;
}

.tile-body {
    padding: 25px;
}

.tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .5px;
    background: #23374c;
    color: #a8defa;
    border: 1px solid #35516b;
    padding: 3px 9px;
    border-radius: 5px;
    margin-bottom: 12px;
}

.tile h3 {
    margin-bottom: 8px;
}

.more {
    display: inline-block;
    color: var(--accent);
    font-size: 14px;
    margin-top: 18px;
}

.page-head {
    padding: 80px 0 50px;
}

.page-head h1 {
    font-size: clamp(45px,7vw,78px);
}

.prose {
    max-width: 850px;
}

.prose h2 {
    margin: 28px 0 10px;
}

.prose p {
    margin-bottom: 20px;
}

.prose .cards {
    margin: 20px 0;
}

.empty {
    padding: 35px;
    border: 1px dashed var(--line);
    border-radius: 14px;
}

.empty p {
    margin: 10px 0 20px;
}

.back {
    display: inline-block;
    margin: 28px 0;
    color: var(--accent);
    font-size: 14px;
}

.game-hero {
    padding: 75px 30px;
    background: radial-gradient(ellipse at 65% 5%,#314b70,#131c30 70%);
    text-align: center;
    border-radius: 16px;
}

.game-hero h1 {
    font-family: Georgia,serif;
    font-weight: 400;
    font-style: italic;
    letter-spacing: -.05em;
}

.game-hero p {
    margin: 0 auto 20px;
}

.game-hero .eyebrow {
    color: #b4cde8;
}

footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

footer a {
    color: #ffdd00;
}

.skip {
    position: absolute;
    left: 8px;
    top: -100px;
    background: var(--accent);
    color: #000;
    padding: 8px;
    z-index: 10;
}

.skip:focus {
    top: 8px;
}

@media(max-width:720px) {
    .nav-wrap,.footer-wrap {
        padding: 15px 20px;
    }
    main {
        padding: 0 20px 55px;
    }
    .menu-toggle {
        display: block;
    }
    .nav-wrap {
        flex-wrap: wrap;
        gap: 12px;
    }
    nav {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px 22px;
    }
    nav[data-collapsed="true"] {
        display: none;
    }
    .hero {
        padding: 65px 0;
    }
    .cards {
        grid-template-columns: 1fr;
    }
    .section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
    .page-head {
        padding: 55px 0 35px;
    }
    .art {
        height: 185px;
    }
    .game-hero {
        padding: 50px 15px;
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        transition: none!important;
    }
}
