:root {
    --bg: #000;
    --surface: #0d0d0d;
    --line: #2a2a2a;
    --text: #F0EAD6;
    --muted: #b8b2a0;
    --accent: #0EB1D2;
    --accent-hover: #34E4EA;
    --display: 'East Sea Dokdo', cursive;
    --mono: 'Roboto Mono', monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--mono);
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

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

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

a:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 3px;
    border-radius: 4px;
}

.wrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */

.site-header {
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-family: var(--display);
    font-weight: normal;
    font-size: 2em;
    line-height: 1;
}

.brand:hover {
    color: var(--text);
    text-decoration: none;
}

.brand img {
    width: 44px;
    height: 44px;
}

.site-nav {
    display: flex;
    gap: 24px;
}

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

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--accent);
}

/* Hero */

.hero {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-top: 60px;
    padding-bottom: 60px;
}

.hero-logo {
    flex: 0 0 260px;
}

.hero h1 {
    font-family: var(--display);
    font-weight: normal;
    font-size: 5.5em;
    line-height: 0.9;
    letter-spacing: 2px;
    margin: 0 0 10px;
}

.tagline {
    font-size: 1.3em;
    font-weight: bold;
    margin: 0 0 15px;
}

.lead {
    font-size: 1.05em;
    color: var(--muted);
    margin: 0 0 25px;
    max-width: 60ch;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-block;
    padding: 12px 22px;
    border: 2px solid var(--accent);
    border-radius: 8px;
    background: var(--accent);
    color: var(--bg);
    transition: background-color 0.15s, color 0.15s;
}

.btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--bg);
    text-decoration: none;
}

.btn.alt {
    background: transparent;
    color: var(--accent);
}

.btn.alt:hover {
    background: var(--accent);
    color: var(--bg);
}

/* Sections */

.section {
    padding-top: 50px;
    padding-bottom: 50px;
    text-align: center;
}

.section h2,
.page-title {
    font-family: var(--display);
    font-weight: normal;
    font-size: 4em;
    line-height: 1;
    letter-spacing: 2px;
    margin: 0 0 10px;
}

.section-lead {
    color: var(--muted);
    margin: 0 auto 30px;
    max-width: 60ch;
}

.more {
    margin-top: 30px;
}

/* Game and crew cards */

.games,
.team-members {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.game,
.team-member {
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    transition: border-color 0.15s, transform 0.15s;
}

.game:hover,
.game:focus-within {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.game img {
    width: 120px;
    height: 120px;
    border-radius: 20px;
}

.game h3,
.team-member h3 {
    font-size: 1.3em;
    margin: 15px 0 5px;
    color: var(--accent);
}

.game p,
.team-member p {
    margin: 10px 0;
}

.role {
    color: var(--muted);
    font-size: 0.95em;
}

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    margin: 0 auto;
    border-radius: 50%;
    border: 2px solid var(--accent);
    font-family: var(--display);
    font-size: 4.5em;
    line-height: 1;
    color: var(--text);
    background: radial-gradient(circle at 30% 30%, #123a44, var(--bg));
}

/* 404 */

.not-found {
    padding-top: 80px;
    padding-bottom: 80px;
    text-align: center;
}

.not-found img {
    width: 200px;
}

.not-found .buttons {
    justify-content: center;
}

/* Footer */

.site-footer {
    margin-top: auto; /* Pushes footer to the bottom of the viewport */
    border-top: 1px solid var(--line);
    padding: 30px 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.9em;
}

.social {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 15px;
}

.social a {
    display: flex;
    padding: 8px;
    border-radius: 50%;
    color: var(--text);
    transition: color 0.15s;
}

.social a:hover {
    color: var(--accent);
}

.social svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.site-footer p {
    margin: 5px 0;
}

@media (max-width: 760px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 30px;
        padding-bottom: 30px;
        gap: 20px;
    }
    .hero-logo {
        flex-basis: auto;
        width: 180px;
    }
    .hero h1 {
        font-size: 4em;
    }
    .hero .buttons {
        justify-content: center;
    }
    .lead {
        margin-left: auto;
        margin-right: auto;
    }
    .section h2,
    .page-title {
        font-size: 3.2em;
    }
}

@media (max-width: 420px) {
    .brand span {
        display: none; /* Logo only on small phones */
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .game,
    .btn {
        transition: none;
    }
    .game:hover,
    .game:focus-within {
        transform: none;
    }
}
