/* ==========================================================================
   Game Hub – Base Styles
   CI: Poppins, #c9f7a5, #000000 (duotone)
   Matching: juergenkoller.software + store.juergenkoller.software
   WCAG 2.1 AA compliant
   ========================================================================== */

/* --- Fonts (self-hosted, DSGVO-konform) --- */
@font-face { font-family: 'Poppins'; font-weight: 300; font-style: normal; font-display: swap; src: url('/static/fonts/poppins-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 400; font-style: normal; font-display: swap; src: url('/static/fonts/poppins-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-style: normal; font-display: swap; src: url('/static/fonts/poppins-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-style: normal; font-display: swap; src: url('/static/fonts/poppins-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-style: normal; font-display: swap; src: url('/static/fonts/poppins-latin-700-normal.woff2') format('woff2'); }

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #000;
    background-color: #c9f7a5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Accessibility --- */
.skip-to-main {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    background: #000;
    color: #c9f7a5;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}
.skip-to-main:focus {
    left: 0;
    outline: 2px solid #000;
    outline-offset: 2px;
}

*:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Header --- */
.site-header {
    background-color: rgba(201, 247, 165, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo img {
    height: 3rem;
    width: auto;
    filter: invert(1);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}
.nav-link:hover { text-decoration: underline; }
.nav-link--active { text-decoration: underline; }

/* Mobile menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #000;
    transition: all 0.3s ease;
}
.hamburger span + span { margin-top: 6px; }

@media (max-width: 767px) {
    .hamburger { display: flex; }
    .header-nav { display: none; }
    .header-nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 80%;
        max-width: 24rem;
        background: #c9f7a5;
        z-index: 60;
        padding: 2rem 1.5rem;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        align-items: flex-start;
        gap: 0.5rem;
    }
    .mobile-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 55;
    }
}

/* --- Footer --- */
.site-footer {
    background-color: #c9f7a5;
    margin-top: auto;
}

.footer-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-link {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}
.footer-link:hover { text-decoration: underline; }

/* --- Main Content --- */
main { flex: 1; }

.container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* --- Typography --- */
h1 { font-size: 2rem; font-weight: 600; line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.btn-primary {
    background: #000;
    color: #c9f7a5;
    border-color: #000;
}
.btn-primary:hover {
    background: #333;
    color: #c9f7a5;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #000;
    border-color: #000;
}
.btn-secondary:hover {
    background: rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

/* --- Cards --- */
.card {
    background: rgba(0,0,0,0.05);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.card:hover {
    background: rgba(0,0,0,0.08);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.game-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.game-card__icon {
    font-size: 2.5rem;
}

.game-card__title {
    font-size: 1.25rem;
    font-weight: 600;
}

.game-card__desc {
    font-size: 0.875rem;
    opacity: 0.7;
    line-height: 1.6;
}

.game-card__meta {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
}

/* --- Game Grid --- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 3rem 1rem;
}
.hero p {
    font-size: 1.125rem;
    opacity: 0.7;
    max-width: 40rem;
    margin: 0 auto 2rem;
}

/* --- Session Code Input --- */
.code-input-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.code-input {
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.3em;
    padding: 0.75rem 1rem;
    border: 2px solid #000;
    border-radius: 8px;
    width: 12rem;
    min-height: 44px;
    background: rgba(0,0,0,0.05);
    color: #000;
}
.code-input:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* --- Store Banner (Cross-Promotion) --- */
.store-banner {
    background: rgba(0,0,0,0.05);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 3rem;
    text-align: center;
}

.store-banner__title {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.store-banner__text {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* --- Utilities --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* --- Language Switcher --- */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0;
}
.lang-sep {
    color: #000;
    padding: 0 0.25rem;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
