:root {
    color-scheme: light;
    --sosg-page: #f6f7fb;
    --sosg-surface: #fff;
    --sosg-text: #101828;
    --sosg-muted: #667085;
    --sosg-border: #e4e7ec;
    --sosg-primary: #c91858;
    --sosg-primary-hover: #a91149;
    --sosg-primary-soft: #fff0f5;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.sosg-home {
    min-width: 320px;
    margin: 0;
    background: var(--sosg-page);
    color: var(--sosg-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.sosg-home .sosg-site-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(14px);
}

.home-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.home-hero { padding: 34px 0 24px; }

.home-feature {
    position: relative;
    min-height: 540px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 28px;
    background: #0b131c url("/assets/images/games/jssg/hero.jpg") center / cover no-repeat;
    box-shadow: 0 28px 70px rgba(16, 24, 40, .18);
}

.home-feature::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5, 12, 20, .98) 0%, rgba(7, 15, 24, .88) 35%, rgba(7, 15, 24, .18) 72%, rgba(7, 15, 24, .04) 100%);
    content: "";
}

.home-feature-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(600px, 58%);
    min-height: 540px;
    padding: 70px;
    color: #fff;
}

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin: 0 0 22px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
    color: #fbd1df;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-feature h1 {
    margin: 0 0 16px;
    font-size: clamp(46px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -.045em;
}

.home-feature-copy {
    max-width: 520px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, .74);
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.75;
}

.home-tags,
.home-actions,
.game-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.home-tags { margin-bottom: 32px; gap: 8px; }

.home-tag {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .84);
    font-size: 13px;
    font-weight: 650;
}

.home-actions { gap: 12px; }

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 12px;
    background: rgba(255, 255, 255, .09);
    color: #fff;
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.home-button:hover,
.home-button:focus-visible {
    border-color: rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .15);
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}

.home-button-primary {
    border-color: var(--sosg-primary);
    background: var(--sosg-primary);
}

.home-button-primary:hover,
.home-button-primary:focus-visible {
    border-color: var(--sosg-primary-hover);
    background: var(--sosg-primary-hover);
}

.games-section { padding: 64px 0 72px; scroll-margin-top: 82px; }

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 30px;
}

.section-heading h2 {
    margin: 0 0 6px;
    font-size: clamp(28px, 4vw, 38px);
    letter-spacing: -.035em;
}

.section-heading p {
    max-width: 600px;
    margin: 0;
    color: var(--sosg-muted);
    line-height: 1.65;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.game-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--sosg-border);
    border-radius: 20px;
    background: var(--sosg-surface);
    box-shadow: 0 10px 28px rgba(16, 24, 40, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}

.game-card:hover {
    box-shadow: 0 18px 38px rgba(16, 24, 40, .1);
    transform: translateY(-3px);
}

.game-card-cover {
    display: block;
    width: 100%;
    height: 280px;
    background: #eaecf0;
    object-fit: cover;
    object-position: center 28%;
}

.game-card-body { padding: 20px; }

.game-card-meta {
    justify-content: space-between;
    margin-bottom: 9px;
    gap: 10px;
}

.game-card h3 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--sosg-text);
    font-size: 19px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-type {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--sosg-primary-soft);
    color: var(--sosg-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
}

.game-card-copy {
    min-height: 44px;
    margin: 0 0 18px;
    color: var(--sosg-muted);
    font-size: 14px;
    line-height: 1.55;
}

.game-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    border: 1px solid var(--sosg-primary);
    border-radius: 11px;
    background: var(--sosg-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.game-card-action:hover,
.game-card-action:focus-visible {
    border-color: var(--sosg-primary-hover);
    background: var(--sosg-primary-hover);
    color: #fff;
    outline: none;
}

.home-empty {
    grid-column: 1 / -1;
    padding: 42px;
    border: 1px dashed #d0d5dd;
    border-radius: 18px;
    background: #fff;
    color: var(--sosg-muted);
    text-align: center;
}

.home-footer {
    border-top: 1px solid var(--sosg-border);
    background: #fff;
}

.home-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 108px;
    color: var(--sosg-muted);
    font-size: 13px;
    gap: 20px;
}

.home-footer-brand { display: flex; align-items: center; gap: 12px; }
.home-footer-brand img { width: auto; height: 30px; }
.home-footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.home-footer-links a { color: #475467; font-weight: 650; text-decoration: none; }
.home-footer-links a:hover { color: var(--sosg-primary); }

@media (max-width: 900px) {
    .home-feature,
    .home-feature-content { min-height: 500px; }
    .home-feature-content { width: 70%; padding: 46px; }
    .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .home-shell { width: min(100% - 28px, 1180px); }
    .home-hero { padding-top: 18px; }
    .home-feature {
        display: flex;
        min-height: 590px;
        align-items: flex-end;
        border-radius: 22px;
        background-position: 66% center;
    }
    .home-feature::after {
        background: linear-gradient(0deg, rgba(5, 12, 20, .99) 0%, rgba(5, 12, 20, .88) 48%, rgba(5, 12, 20, .18) 82%);
    }
    .home-feature-content {
        justify-content: flex-end;
        width: 100%;
        min-height: auto;
        padding: 32px 24px 28px;
    }
    .home-feature h1 { font-size: 42px; }
    .home-eyebrow { margin-bottom: 14px; }
    .home-feature-copy { margin-bottom: 20px; font-size: 15px; }
    .home-tags { margin-bottom: 22px; }
    .home-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .home-button { width: 100%; }
    .games-section { padding: 48px 0 56px; }
    .section-heading { display: block; }
    .games-grid { gap: 14px; }
    .game-card-body { padding: 15px; }
    .game-card-cover { height: 190px; }
    .game-card h3 { font-size: 16px; }
    .game-card-copy { display: none; }
    .game-card-action { margin-top: 14px; }
    .home-footer-inner { align-items: flex-start; flex-direction: column; padding: 28px 0; }
}

@media (max-width: 420px) {
    .game-card-cover { height: 160px; }
}

@media (max-width: 340px) {
    .games-grid { grid-template-columns: 1fr; }
    .game-card-cover { height: 180px; }
    .game-card-copy { display: block; min-height: 0; }
}
