@font-face {
    font-family: Inter;
    src: url("inter-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

@font-face {
    font-family: "Space Grotesk";
    src: url("space-grotesk-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --background: #080e16;
    --panel: #111d2a;
    --border: #304255;
    --text: #f1f6ff;
    --muted: #becbdc;
    --accent: #89efd2;
    --accent-ink: #08221b;
    --warm: #ffd29d;
    --display: "Space Grotesk", system-ui, sans-serif;
    font-family: Inter, system-ui, sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: white; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; }
h2 { font-size: clamp(1.7rem, 4vw, 2.45rem); letter-spacing: -.04em; }
h3 { font-size: clamp(1.45rem, 3vw, 2.1rem); letter-spacing: -.035em; }
p { margin: 0; }

.shell { width: min(100% - 3rem, 75rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--border); }
.header-inner, .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    min-height: 4.75rem;
}
.header-inner nav { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.5rem; }
.header-inner nav > a:not(.button) { color: var(--text); text-decoration: none; font-weight: 600; }
.header-inner nav > a:not(.button):hover { text-decoration: underline; }
.brand {
    color: var(--text);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font: 700 1.4rem/1 var(--display);
    letter-spacing: -.055em;
}
.brand > span:last-child { color: var(--accent); }
.brand-mark {
    display: inline-block;
    width: 1.15rem;
    height: 1.15rem;
    margin-inline-end: .65rem;
    border: 2px solid var(--accent);
    border-radius: .26rem .5rem .26rem .5rem;
    transform: rotate(-24deg);
}
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .65rem;
    width: fit-content;
    min-height: 3rem;
    padding: .7rem 1.15rem;
    border: 1px solid transparent;
    border-radius: .5rem;
    background: var(--accent);
    color: var(--accent-ink);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: #c5ffed; color: var(--accent-ink); }
.button-small { min-height: 2.65rem; padding: .45rem .9rem; }
.button-outline { color: var(--text); background: transparent; border-color: var(--border); }
.skip-link { position: absolute; inset: .6rem auto auto .6rem; z-index: 4; padding: .65rem 1rem; background: var(--panel); }
.skip-link:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }

.home { padding-block: clamp(1.5rem, 4vw, 3rem) 4rem; }
.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: center;
    min-height: clamp(25rem, 46vw, 35rem);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    background: #10242b;
}
.hero-image, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { z-index: -2; object-fit: cover; object-position: 63% center; }
.hero::after { content: ""; z-index: -1; background: linear-gradient(90deg, #070f18 0%, #070f18ed 25%, #070f1878 61%, #070f180d 100%); }
.hero-copy { max-width: 45rem; padding: clamp(1.4rem, 6vw, 4.75rem); }
.eyebrow { font-size: .79rem; color: var(--accent); font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 6.3rem); letter-spacing: -.075em; margin-block: .65rem 1.15rem; }
.hero-copy > p:not(.eyebrow) { max-width: 29rem; font-size: clamp(1rem, 2vw, 1.25rem); color: #e3edf6; }
.hero .button { margin-top: 1.6rem; }
.games { margin-top: clamp(2rem, 6vw, 4.5rem); scroll-margin-top: 1rem; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; margin-top: 1.25rem; }
.game {
    display: flex;
    flex-direction: column;
    align-items: start;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: .85rem;
    padding: clamp(1.15rem, 3.7vw, 2rem);
    background: var(--panel);
}
.game-horizon { background: radial-gradient(ellipse at top right, #26332a, transparent 65%), var(--panel); }
.game-horizon .eyebrow { color: var(--warm); }
.game h3 { margin-block: .55rem .7rem; }
.game > p:not(.eyebrow), .account-banner p, .client-banner p, .muted { color: var(--muted); }
.text-link { margin-top: auto; padding-top: 1.15rem; font-weight: 650; }
.account-banner, .client-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-top: clamp(2rem, 6vw, 4rem);
    border-block: 1px solid var(--border);
    padding-block: 1.75rem;
}
.account-banner p, .client-banner p { max-width: 42rem; margin-top: .55rem; }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); }
.footer-inner { min-height: 4.5rem; font-size: .9rem; }

.account-main { width: min(100% - 2rem, 35rem); margin-inline: auto; padding-block: clamp(1.5rem, 5vw, 3.5rem); }
.account-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 1rem; padding: clamp(1rem, 4vw, 2.2rem); }
.account-panel h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); letter-spacing: -.045em; }
.account-panel h1 + p { margin-top: .7rem; }
.account-panel form, .account-panel .after-form { margin-top: 1.4rem; }
.account-panel .after-form { color: var(--muted); }
.fields { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field label, fieldset legend { font-weight: 700; }
.field input {
    width: 100%;
    padding: .65rem .75rem;
    min-height: 2.85rem;
    color: var(--text);
    background: #09121e;
    border: 1px solid #5c7086;
    border-radius: .4rem;
    font: inherit;
}
.field .code { max-width: 13rem; letter-spacing: .15em; }
.field input[aria-invalid="true"] { border-color: var(--warm); }
.field-error { color: var(--warm); font-size: .92rem; }
.hint { color: var(--muted); font-size: .9rem; }
.check { display: flex; align-items: flex-start; gap: .7rem; cursor: pointer; }
.check input { flex: none; width: 1.15rem; height: 1.15rem; margin: .25rem 0 0; accent-color: var(--accent); }
.captcha-status { cursor: default; }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.captcha { border: 1px solid var(--border); border-radius: .5rem; padding: .9rem; margin: 0; min-inline-size: 0; }
.captcha legend { padding-inline: .35rem; }
.captcha .hint, .captcha .field, .captcha .challenge-controls { margin-top: .65rem; }
.challenge-controls { display: grid; justify-items: start; gap: .55rem; }
.challenge-controls img { display: block; border-radius: .3rem; width: min(100%, 15rem); height: auto; }
.challenge-controls audio { width: min(100%, 18rem); }
.notice { border-left: 3px solid var(--accent); padding: .7rem .9rem; margin-top: 1rem; background: #17342e; }
.notice-error { border-color: var(--warm); background: #3c2924; }
.account-panel .sign-out { border-top: 1px solid var(--border); padding-top: 1.25rem; }

@media (max-width: 42rem) {
    .shell { width: min(100% - 2rem, 75rem); }
    .header-inner, .footer-inner { padding-block: .85rem; }
    .header-inner nav { gap: .45rem .85rem; font-size: .88rem; }
    .hero::after { background: linear-gradient(90deg, #070f18f7 0%, #070f18d4 54%, #070f1866 100%); }
    .game-grid { grid-template-columns: 1fr; }
}

@media (forced-colors: active) {
    .button, .brand-mark { border: 1px solid ButtonText; }
}
