/* Tennistico hub — landing page layout.
   Built on top of styles.css (variables, header, language switch, skip link). */

:root {
    --hub-ink: #0f172a;
    --hub-muted: #5b6472;
    --hub-line: #e4e7ec;
    --hub-surface: #ffffff;
    --hub-wash: #f6f8fb;
    --logo-blue: #0079d2;
    --logo-orange: #d1581f;
    --logo-green: #2c7530;
    --logo-navy: #073b86;
}

body.hub-page {
    background:
        radial-gradient(1100px 480px at 50% -180px, #eaf1ff 0%, rgba(234, 241, 255, 0) 70%),
        var(--hub-wash);
}

main {
    max-width: 780px;
    padding: 0 18px 8px;
}

/* ------------------------------------------------------------------ hero */
.hero {
    text-align: center;
    padding: 6px 4px 26px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--logo-navy);
    background: #e8eefc;
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 14px;
}

.hero-title {
    font-size: 38px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--hub-ink);
}

.hero-sub {
    margin: 10px auto 0;
    max-width: 46ch;
    font-size: 16px;
    line-height: 1.5;
    color: var(--hub-muted);
}

/* ------------------------------------------------------------------ cards */
.games {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 18px 16px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-line);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    overflow: hidden;
}

.game-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--logo-blue);
}

.game-card[data-game="connections"]::before {
    background: linear-gradient(90deg, var(--logo-orange) 0 50%, var(--logo-green) 50% 100%);
}

@media (hover: hover) {
    a.game-card:hover {
        transform: translateY(-2px);
        border-color: #cfd8e6;
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
    }
}

a.game-card:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 3px;
}

.game-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.game-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--logo-blue);
    border-radius: 999px;
    padding: 4px 10px;
}

.game-badge--connections {
    background: var(--logo-orange);
}

.game-badge--soon {
    background: #98a2b3;
}

.game-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--hub-muted);
    background: var(--hub-wash);
    border: 1px solid var(--hub-line);
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
}

.game-status.is-done {
    color: #1c6b3a;
    background: #e8f6ee;
    border-color: #bfe6cf;
}

.game-status.is-progress {
    color: #8a4a10;
    background: #fdf2e5;
    border-color: #f3d7b4;
}

.game-name {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--hub-ink);
    margin-top: 2px;
}

.game-desc {
    font-size: 14px;
    line-height: 1.45;
    color: var(--hub-muted);
    flex: 1;
}

.game-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1d4ed8;
}

.game-cta svg {
    transition: transform 0.18s ease;
}

@media (hover: hover) {
    a.game-card:hover .game-cta svg {
        transform: translateX(3px);
    }
}

.game-card--soon {
    grid-column: 1 / -1;
    background: transparent;
    border-style: dashed;
    box-shadow: none;
    opacity: 0.72;
}

.game-card--soon::before {
    display: none;
}

.game-card--soon .game-name {
    color: var(--hub-muted);
}

/* ------------------------------------------------------------------ footer */
.hub-note {
    margin: 22px auto 0;
    text-align: center;
    font-size: 12.5px;
    color: #7a8494;
    max-width: 42ch;
    line-height: 1.5;
}

.hub-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 26px 16px 30px;
    font-size: 12px;
    font-weight: 500;
    color: #8a93a2;
    background: transparent;
    border: 0;
    margin: 0;
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 620px) {
    .games {
        grid-template-columns: 1fr;
    }
    .hero {
        padding-bottom: 20px;
    }
    .hero-title {
        font-size: 31px;
    }
    .hero-sub {
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    main {
        padding: 0 12px 8px;
    }
    .hero-title {
        font-size: 27px;
    }
    .game-card {
        padding: 16px 14px 14px;
    }
    .game-name {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-card,
    .game-cta svg {
        transition: none;
    }
}
