/* Home tokens (--home-*) viven en design-system/tokens.css */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body.home-v2 {
    margin: 0;
    color: var(--home-text);
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.16), transparent 32rem),
        radial-gradient(circle at 88% 30%, rgba(34, 197, 94, 0.11), transparent 28rem),
        var(--home-bg);
    overflow-x: hidden;
}

.home-v2 *,
.home-v2 *::before,
.home-v2 *::after {
    box-sizing: border-box;
}

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

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 1rem;
    color: var(--home-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.home-eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
}

.home-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 2rem;
    margin-bottom: 2rem;
}

.home-section-heading h2 {
    max-width: 760px;
    margin: 0;
    color: var(--home-text);
    font-family: "Oswald", sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
}

.home-section-heading p {
    max-width: 480px;
    margin: 0;
    color: var(--home-muted);
    line-height: 1.7;
}

.home-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10000;
    padding: 0.8rem 1rem;
    color: #04120a;
    background: var(--home-primary);
    border-radius: 10px;
    font-weight: 800;
    transform: translateY(-160%);
}

.home-skip-link:focus {
    transform: translateY(0);
}

.home-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.home-header.is-scrolled,
.home-header.is-menu-open {
    background: rgba(5, 11, 20, 0.88);
    border-color: var(--home-line);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.26);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.home-navbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.home-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
    color: var(--home-text);
    text-decoration: none;
    font-family: "Oswald", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.home-brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #05200e;
    background: linear-gradient(135deg, #d5ffe4, var(--home-primary));
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(121, 242, 166, 0.25);
}

.home-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    flex: 1;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-nav-link,
.home-nav-search {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 0.8rem;
    color: var(--home-muted);
    background: transparent;
    border: 0;
    border-radius: 10px;
    text-decoration: none;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

.home-nav-link:hover,
.home-nav-search:hover,
.home-nav-link[aria-current="page"] {
    color: var(--home-text);
    background: rgba(255, 255, 255, 0.07);
}

.home-nav-play {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.75rem 1.1rem;
    color: #04120a;
    background: var(--home-primary);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 900;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.18);
    transition: transform 160ms ease, background-color 160ms ease;
}

.home-nav-play:hover {
    color: #04120a;
    background: #a5f7c3;
    transform: translateY(-2px);
}

.home-menu-toggle {
    width: 46px;
    height: 46px;
    display: none;
    place-items: center;
    color: var(--home-text);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--home-line);
    border-radius: 12px;
    cursor: pointer;
}

.home-hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-items: end;
    isolation: isolate;
    overflow: hidden;
}

.home-hero-media {
    position: absolute;
    inset: 0;
    z-index: -3;
}

.home-hero-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 58%;
    filter: saturate(0.88) contrast(1.06);
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(3, 8, 15, 0.96) 0%, rgba(3, 8, 15, 0.72) 44%, rgba(3, 8, 15, 0.18) 75%),
        linear-gradient(0deg, var(--home-bg) 0%, transparent 42%),
        linear-gradient(180deg, rgba(3, 8, 15, 0.55), transparent 30%);
}

.home-hero::after {
    content: "";
    position: absolute;
    width: 42rem;
    height: 42rem;
    right: -18rem;
    bottom: -20rem;
    z-index: -1;
    background: radial-gradient(circle, rgba(121, 242, 166, 0.2), transparent 68%);
    pointer-events: none;
}

.home-hero-content {
    padding-block: 150px 110px;
}

.home-hero-copy {
    max-width: 780px;
}

.home-hero h1 {
    margin: 0;
    max-width: 820px;
    color: #fff;
    font-family: "Oswald", sans-serif;
    font-size: clamp(3.4rem, 8.2vw, 7.4rem);
    line-height: 0.92;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.home-hero h1 span {
    color: var(--home-primary);
}

.home-hero-lead {
    max-width: 650px;
    margin: 1.6rem 0 0;
    color: #d3dceb;
    font-size: clamp(1rem, 2vw, 1.24rem);
    line-height: 1.65;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.home-button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.85rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 13px;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.home-button:hover {
    transform: translateY(-2px);
}

.home-button-primary {
    color: #03130a;
    background: var(--home-primary);
    box-shadow: 0 12px 35px rgba(34, 197, 94, 0.2);
}

.home-button-primary:hover {
    color: #03130a;
    background: #a5f7c3;
}

.home-button-secondary {
    color: #fff;
    background: rgba(8, 17, 29, 0.58);
    border-color: rgba(255, 255, 255, 0.28);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.home-button-secondary:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.46);
}

.home-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 2.3rem 0 0;
    padding: 0;
    color: #d7e0ed;
    list-style: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.home-hero-meta li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.home-hero-meta i {
    color: var(--home-primary);
}

.home-section {
    padding-block: clamp(72px, 10vw, 128px);
}

.home-section-compact {
    padding-block: 52px;
}

.home-featured-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1.25rem;
}

.home-feature-card {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: end;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius-lg);
    color: #fff;
    text-decoration: none;
    box-shadow: var(--home-shadow);
}

.home-feature-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.home-feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(3, 8, 15, 0.98), rgba(3, 8, 15, 0.12) 72%);
}

.home-feature-card:hover img {
    transform: scale(1.045);
}

.home-feature-content {
    width: 100%;
    padding: clamp(1.4rem, 4vw, 2.5rem);
}

.home-feature-kicker {
    display: inline-flex;
    padding: 0.38rem 0.65rem;
    color: #05200e;
    background: var(--home-primary);
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-feature-card h3 {
    margin: 0.9rem 0 0.55rem;
    color: #fff;
    font-family: "Oswald", sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
}

.home-feature-card p {
    max-width: 600px;
    margin: 0;
    color: #d5deeb;
    line-height: 1.6;
}

.home-feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.2rem;
    color: var(--home-primary);
    font-weight: 900;
}

.home-catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) 1.2fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.home-search {
    position: relative;
}

.home-search i {
    position: absolute;
    top: 50%;
    left: 1rem;
    color: var(--home-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.home-search input {
    width: 100%;
    min-height: 50px;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    color: var(--home-text);
    background: var(--home-surface);
    border: 1px solid var(--home-line);
    border-radius: 13px;
    font: inherit;
}

.home-search input::placeholder {
    color: #8493aa;
}

.home-filters {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    overflow-x: auto;
    padding: 3px 3px 8px;
    scrollbar-width: thin;
}

.home-filter {
    min-height: 44px;
    flex: 0 0 auto;
    padding: 0.65rem 0.9rem;
    color: var(--home-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--home-line);
    border-radius: 99px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
}

.home-filter:hover,
.home-filter[aria-pressed="true"] {
    color: #03130a;
    background: var(--home-primary);
    border-color: var(--home-primary);
}

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

.home-game-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--home-text);
    background: linear-gradient(160deg, rgba(16, 29, 48, 0.98), rgba(8, 17, 29, 0.98));
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius);
    text-decoration: none;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.home-game-card:hover {
    color: var(--home-text);
    border-color: rgba(121, 242, 166, 0.55);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
    transform: translateY(-7px);
}

.home-game-card[hidden] {
    display: none;
}

.home-game-media {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: #101d30;
}

.home-game-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(8, 17, 29, 0.82), transparent 72%);
}

.home-game-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 420ms ease;
}

.home-game-card:hover .home-game-media img {
    transform: scale(1.055);
}

.home-game-icon,
.home-game-badge {
    position: absolute;
    z-index: 1;
}

.home-game-icon {
    left: 1rem;
    bottom: 0.9rem;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #04120a;
    background: var(--home-primary);
    border: 3px solid rgba(3, 8, 15, 0.76);
    border-radius: 13px;
}

.home-game-badge {
    top: 0.9rem;
    right: 0.9rem;
    padding: 0.4rem 0.65rem;
    color: #fff;
    background: rgba(3, 8, 15, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 99px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.home-game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

.home-game-card h3 {
    margin: 0;
    color: var(--home-text);
    font-family: "Oswald", sans-serif;
    font-size: 1.55rem;
    letter-spacing: 0.01em;
}

.home-game-description {
    flex: 1;
    margin: 0.65rem 0 1rem;
    color: var(--home-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.home-game-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-game-facts li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.58rem;
    color: #cbd6e6;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9px;
    font-size: 0.72rem;
    font-weight: 700;
}

.home-game-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.15rem;
    padding-top: 1rem;
    color: var(--home-primary);
    border-top: 1px solid var(--home-line);
    font-weight: 900;
}

.home-empty-state {
    padding: 2.5rem;
    color: var(--home-muted);
    background: var(--home-surface);
    border: 1px dashed var(--home-line);
    border-radius: var(--home-radius);
    text-align: center;
}

.home-stats-band {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(96, 165, 250, 0.12), transparent 45%),
        linear-gradient(300deg, rgba(121, 242, 166, 0.12), transparent 48%),
        var(--home-surface);
    border-block: 1px solid var(--home-line);
}

.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.home-stat {
    position: relative;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.home-stat + .home-stat::before {
    content: "";
    position: absolute;
    inset: 22% auto 22% 0;
    width: 1px;
    background: var(--home-line);
}

.home-stat-value {
    display: block;
    color: var(--home-primary);
    font-family: "Oswald", sans-serif;
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1;
}

.home-stat-label {
    display: block;
    margin-top: 0.55rem;
    color: var(--home-muted);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.home-cta {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.3fr auto;
    align-items: center;
    gap: 2rem;
    padding: clamp(2rem, 6vw, 4rem);
    background:
        radial-gradient(circle at 90% 20%, rgba(121, 242, 166, 0.19), transparent 24rem),
        linear-gradient(135deg, #13253d, #0a1422);
    border: 1px solid var(--home-line);
    border-radius: var(--home-radius-lg);
    box-shadow: var(--home-shadow);
}

.home-cta h2 {
    margin: 0;
    color: #fff;
    font-family: "Oswald", sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
}

.home-cta p {
    max-width: 650px;
    margin: 1rem 0 0;
    color: var(--home-muted);
    line-height: 1.65;
}

.home-footer {
    padding-block: 56px 28px;
    color: var(--home-muted);
    border-top: 1px solid var(--home-line);
}

.home-footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 2.5rem;
}

.home-footer-brand p {
    max-width: 320px;
    margin: 1rem 0 0;
    line-height: 1.65;
}

.home-footer h2 {
    margin: 0 0 0.9rem;
    color: var(--home-text);
    font-size: 0.84rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.home-footer-links {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-footer a {
    color: var(--home-muted);
    text-decoration: none;
}

.home-footer a:hover {
    color: var(--home-primary);
}

.home-share {
    padding: 0;
    color: var(--home-muted);
    background: none;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.home-share:hover {
    color: var(--home-primary);
}

.home-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--home-line);
    font-size: 0.82rem;
}

.home-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.home-reveal.is-visible {
    opacity: 1;
    transform: none;
}

.home-v2 :where(a, button, input):focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.45);
}

@media (max-width: 1050px) {
    .home-menu-toggle {
        display: grid;
        margin-left: auto;
    }

    .home-nav-play {
        margin-left: 0;
    }

    .home-nav-list {
        position: fixed;
        inset: 76px 0 auto;
        display: grid;
        justify-content: stretch;
        gap: 0.2rem;
        padding: 1rem 20px 1.4rem;
        background: rgba(5, 11, 20, 0.98);
        border-bottom: 1px solid var(--home-line);
        transform: translateY(-130%);
        visibility: hidden;
        transition: transform 200ms ease, visibility 200ms;
    }

    .home-nav-list.is-open {
        transform: translateY(0);
        visibility: visible;
    }

    .home-nav-link,
    .home-nav-search {
        width: 100%;
        justify-content: flex-start;
        padding-inline: 1rem;
    }

    .home-featured-grid,
    .home-games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-catalog-toolbar {
        grid-template-columns: 1fr;
    }

    .home-footer-grid {
        grid-template-columns: 1.4fr repeat(2, 1fr);
    }

    .home-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .home-shell {
        width: min(100% - 28px, 1180px);
    }

    .home-nav-play {
        width: 46px;
        padding: 0;
        font-size: 0;
    }

    .home-nav-play i {
        font-size: 1rem;
    }

    .home-hero-content {
        padding-block: 128px 82px;
    }

    .home-hero::before {
        background:
            linear-gradient(0deg, var(--home-bg) 0%, rgba(3, 8, 15, 0.65) 56%, rgba(3, 8, 15, 0.42)),
            linear-gradient(90deg, rgba(3, 8, 15, 0.72), transparent);
    }

    .home-hero h1 {
        font-size: clamp(3.25rem, 16vw, 5.2rem);
    }

    .home-section-heading {
        display: block;
    }

    .home-section-heading p {
        margin-top: 1rem;
    }

    .home-featured-grid,
    .home-games-grid,
    .home-cta {
        grid-template-columns: 1fr;
    }

    .home-feature-card {
        min-height: 380px;
    }

    .home-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-stat:nth-child(3)::before {
        display: none;
    }

    .home-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-footer-bottom {
        display: grid;
    }
}

@media (max-width: 480px) {
    .home-brand span:last-child {
        display: none;
    }

    .home-actions {
        display: grid;
    }

    .home-button {
        width: 100%;
    }

    .home-hero-meta {
        display: grid;
        gap: 0.7rem;
    }

    .home-featured-grid,
    .home-games-grid,
    .home-footer-grid {
        grid-template-columns: 1fr;
    }

    .home-feature-card {
        min-height: 340px;
    }

    .home-game-media {
        height: 175px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .home-reveal {
        opacity: 1;
        transform: none;
    }

    .home-v2 *,
    .home-v2 *::before,
    .home-v2 *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (forced-colors: active) {
    .home-game-card,
    .home-feature-card,
    .home-cta,
    .home-filter {
        border: 1px solid CanvasText;
    }
}
