:root {
    --brand-primary: #adc8d1;
    --brand-navy: #151d26;
    --brand-white: #f3efe7;
    --brand-gray: #bdc5cb;
    --brand-border: #3a4752;
    --brand-background: #10161d;
    --brand-surface: #1b252f;
}

body {
    margin: 0;
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    background: var(--brand-background);
    color: var(--brand-white);
    line-height: 1.65;
}

/* === Links === */
a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s;
}

    a:hover,
    a:focus {
        color: var(--brand-white);
        text-decoration: underline;
    }

/* === Header and Navigation === */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75em clamp(0.85rem, 3vw, 2rem);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    background: var(--brand-navy);
    position: sticky;
    top: 0;
    z-index: 1000;
}

#logo-container {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

#logo {
    height: 40px;
    width: 40px;
    border-radius: 8px;
    /*background: var(--brand-white);*/
}

#site-title {
    font-size: 1.5em;
    font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--brand-primary);
}

nav#navbar {
    flex: 0 0 auto;
}

nav#navbar ul {
    display: flex;
    gap: 2em;
    list-style: none;
    margin: 0;
    padding: 0;
}

    nav#navbar ul li a {
        font-size: 1.1em;
        font-family: inherit;
        font-weight: 500;
        padding: 0.5em 0.2em;
        border-bottom: 2px solid transparent;
        transition: border-color 0.2s, color 0.2s;
        color: var(--brand-primary);
    }

        nav#navbar ul li a.active {
            border-bottom: 2px solid var(--brand-primary);
            color: var(--brand-primary);
        }

        nav#navbar ul li a:hover,
        nav#navbar ul li a:focus {
            color: var(--brand-primary);
        }

/* === Hamburger === */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5em;
    z-index: 1100;
}

    .hamburger span {
        display: block;
        width: 28px;
        height: 3px;
        background: var(--brand-primary);
        border-radius: 2px;
        transition: all 0.3s;
    }

    .hamburger.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.open span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

/* === Responsive Nav === */
@media (max-width: 900px) {
    nav#navbar ul {
        flex-direction: column;
        background: var(--brand-navy);
        position: absolute;
        top: 100%;
        right: 0;
        width: 220px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.18);
        padding: 1rem;
        gap: 0.65rem;
        display: none;
    }

    nav#navbar.open ul {
        display: flex;
    }

    .hamburger {
        display: flex;
        position: absolute;
        right: 0.85rem;
        top: 50%;
        transform: translateY(-50%);
    }

}

.back-button {
    color: var(--brand-primary);
    transition: color 0.2s;
}

    .back-button:hover,
    .back-button:focus {
        color: var(--brand-primary);
        text-decoration: underline;
    }

/* === Hero === */
#home {
    position: relative;
    isolation: isolate;
    min-height: clamp(24rem, 60vh, 38rem);
    display: grid;
    place-items: center;
    text-align: center;
}

#hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#hero-image {
    object-fit: cover;
}

.hero-overlay {
    background: linear-gradient(180deg, #10161d52, #10161def);
}

.hero-text {
    padding: 3rem 1rem;
}

.hero-text h1 {
    margin: 0;
    font-size: clamp(2rem, 6vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.hero-text p {
    margin: 1rem 0 1.75rem;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
}

.hero-actions,
.plugin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
}

.hero-actions {
    justify-content: center;
}

.hero-secondary,
.plugin-actions a:not(.button) {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* === Sections and cards === */
main section[id] {
    scroll-margin-top: 5rem;
}

.content-section {
    box-sizing: border-box;
    width: min(68rem, calc(100% - 2rem));
    margin: clamp(2rem, 6vw, 4.5rem) auto;
    padding: clamp(1rem, 4vw, 2.5rem);
    background: var(--brand-navy);
    border: 1px solid var(--brand-border);
    border-radius: 1rem;
}

.content-section h2 {
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -0.035em;
    margin: 0 0 1.35rem;
}

#games {
    padding: 0;
    background: transparent;
    border: 0;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.game-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 1rem;
}

.game-card > img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.game-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.game-card h3,
.text-block h3:first-child {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.35;
}

.game-card p {
    color: var(--brand-gray);
    margin: 0.6rem 0 1rem;
}

.game-card details {
    margin-bottom: 1rem;
}

.game-card summary {
    cursor: pointer;
    color: var(--brand-primary);
}

.game-card .button {
    margin-top: auto;
}

.content-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.text-block {
    flex: 2 1 23rem;
    min-width: 0;
}

.image-block {
    flex: 1 1 12rem;
    display: flex;
    justify-content: center;
}

.image-block img {
    max-width: 220px;
    width: 100%;
    height: auto;
    border-radius: 0.65rem;
}

.section-divider {
    border: 0;
    border-top: 1px solid var(--brand-border);
    margin: 1.5rem 0;
}

.plugin-actions:last-child {
    margin-bottom: 0;
}

.button {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0.65rem 1rem;
    background: var(--brand-primary);
    color: var(--brand-background);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.button:hover,
.button:focus-visible {
    background: #d1e1e5;
    color: var(--brand-background);
    text-decoration: none;
}

/* === Contact Form === */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.7em;
    margin-top: 1.5em;
    max-width: 400px;
}

    .contact-form label {
        font-weight: 600;
        color: var(--brand-primary);
        font-family: inherit;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.6em;
        border: 1.5px solid var(--brand-border);
        border-radius: 5px;
        font-size: 1em;
        font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
        background: var(--brand-surface);
        color: var(--brand-white);
        transition: border-color 0.2s, box-shadow 0.2s;
    }

        .contact-form input:focus,
        .contact-form textarea:focus {
            border-color: var(--brand-primary);
            outline: none;
            box-shadow: 0 0 0 2px var(--brand-primary);
        }

    .contact-form .button {
        align-self: flex-start;
        margin-top: 0.5em;
    }

/* === Footer === */
footer {
    background: var(--brand-navy);
    padding: 2em 1em 1em 1em;
    text-align: center;
    border-top: 1px solid var(--brand-border);
    margin-top: 2em;
}

    footer .social-links {
        display: flex;
        justify-content: center;
        gap: 0.65rem;
        margin-bottom: 0.7em;
    }

        footer .social-links a {
            color: var(--brand-primary);
            font-size: 1.2em;
            display: inline-flex;
            align-items: center;
            transition: color 0.2s;
        }

            footer .social-links a:hover,
            footer .social-links a:focus {
                color: var(--brand-primary);
            }

    footer svg {
        vertical-align: middle;
        margin-right: 0.3em;
    }

    footer p {
        color: var(--brand-gray);
        font-size: 0.98em;
        margin-top: 0.5em;
    }

@media (max-width: 640px) {
    .game-grid {
        grid-template-columns: 1fr;
    }

    #site-title {
        font-size: clamp(0.82rem, 4vw, 1.15rem);
    }
}

:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 3px;
}
