:root {
    --home-brand: var(--brand-color);
    --home-brand-2: var(--brand-color-alt);
    --home-brand-3: var(--brand-color-hover);
    --home-brand-soft: rgba(var(--brand-rgb), 0.16);
    --home-brand-soft-2: rgba(var(--brand-rgb), 0.26);
    --home-line: var(--tone-08);
    --home-line-strong: var(--tone-14);
    --home-text: var(--text-primary);
    --home-text-soft: var(--text-secondary);
    --home-text-dim: var(--palette-017);
    --home-surface: var(--palette-101);
    --home-surface-2: var(--palette-109);
    --home-shadow-lg: 0 24px 70px var(--shade-34);
    --home-shadow-md: 0 16px 40px var(--palette-071);
    --fx-x: 50%;
    --fx-y: 50%;
    --fx-x-soft: 50%;
    --fx-y-soft: 50%;
}

.min-vh-420 {
    min-height: 420px;
}

.hero-height {
    min-height: 100vh;
    min-height: calc(100vh - 70px);
}

.hero-v2 {
    position: relative;
    background-color: var(--palette-001);
    isolation: isolate;
    overflow: hidden;
}

.hero-v2__bg,
.hero-v2__shade {
    position: absolute;
    inset: 0;
}

.hero-v2__bg {
    background-image: var(--bg-low);
    background-size: cover;
    background-position: center center;
    transform: scale(1.04);
    filter: var(--hero-bg-filter);
}

.hires-bg.is-hd .hero-v2__bg {
    background-image: var(--bg-high);
}

.hero-v2__shade {
    background:
        radial-gradient(circle at 15% 25%, rgba(var(--brand-rgb), .38), transparent 24%),
        linear-gradient(90deg, var(--palette-176) 0%, var(--palette-174) 38%, var(--palette-172) 70%, var(--palette-173) 100%),
        linear-gradient(180deg, var(--palette-171) 0%, var(--palette-175) 100%);
}

.hero-v2__content {
    max-width: 760px;
    padding: 2rem 0 8rem;
}

.hero-v2__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(var(--brand-rgb), .22);
    border: 1px solid rgba(var(--brand-accent-rgb), .18);
    color: var(--brand-text-soft-alt);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .76rem;
    font-weight: 700;
}

.hero-v2__title {
    font-size: clamp(3.2rem, 7vw, 6.4rem);
    line-height: .9;
    letter-spacing: -.05em;
    font-weight: 900;
    color: var(--tone-100);
    text-shadow: 0 16px 40px var(--palette-079);
}

.hero-v2__subtitle {
    max-width: 42rem;
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    line-height: 1.75;
    color: var(--palette-147);
}

.hero-v2__stats .col-6,
.hero-v2__stats .col-12 {
    min-width: 0;
}

.hero-v2__stat {
    padding: 16px 16px;
    border-radius: 22px;
    border: 1px solid var(--tone-08);
    background:
        linear-gradient(180deg, var(--tone-06), var(--tone-02)),
        var(--tone-03);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-v2__stat-value {
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 800;
    color: var(--tone-100);
}

.hero-v2__stat-label {
    margin-top: 6px;
    color: var(--palette-134);
    font-size: .85rem;
}

@media (max-width: 1200px) {
    .hero-v2 {
        min-height: auto;
    }

    .hero-v2__content {
        max-width: none;
        padding: 2rem 0;
    }
}

@media (max-width: 576px) {
    .hero-v2__title {
        font-size: 2.7rem;
    }

    .hero-v2__stat {
        border-radius: 18px;
        height: -webkit-fill-available;
    }
}


.home-kicker,
.home-section-kicker,
.home-card-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-text-soft);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.home-kicker {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(var(--brand-accent-rgb), .18);
    background: rgba(var(--brand-rgb), .16);
}

.home-glass-card {
    border: 1px solid var(--home-line);
    border-radius: 30px;
    background: linear-gradient(180deg, var(--tone-045), var(--tone-02)),
    var(--home-surface);
    backdrop-filter: blur(16px);
    box-shadow: var(--home-shadow-lg);
    overflow: auto;
}

.home-feature-card::before,
.home-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--tone-08), transparent 35%, rgba(var(--brand-rgb), .10));
    pointer-events: none;
    opacity: .75;
}

.home-badge-brand {
    background: linear-gradient(135deg, var(--home-brand-2), var(--home-brand)) !important;
    color: var(--palette-057) !important;
}

.home-badge-soft {
    background: var(--tone-08) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--tone-08);
}

.home-state-pill {
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    min-height: 42px;
    color: var(--palette-033);
    border: 1px solid rgba(var(--brand-accent-rgb), .22);
    background: linear-gradient(135deg, rgba(var(--brand-rgb), .22), rgba(var(--brand-rgb), .10));
}

.home-section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.1;
    font-weight: 800;
    color: var(--tone-100);
}

.home-section-text {
    max-width: 42rem;
    color: var(--home-text-soft);
    font-size: 1rem;
    line-height: 1.7;
}

.home-feature-card {
    position: relative;
    padding: 24px;
}

.home-feature-card:hover,
.home-gallery-card:hover,
.home-image-card:hover {
    transform: translateY(-4px);
}

.home-feature-icon {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    font-size: 1.35rem;
    color: var(--palette-044);
    background: linear-gradient(135deg, rgba(var(--brand-rgb), .34), rgba(var(--brand-rgb), .14));
    box-shadow: 0 12px 26px rgba(var(--brand-rgb), .18);
}

.home-feature-title {
    font-size: 1.25rem;
    font-weight: 750;
    color: var(--tone-100);
    margin-bottom: 10px;
}

.home-feature-text {
    color: var(--home-text-soft);
    margin: 0;
    line-height: 1.7;
}

.home-image-card {
    background: var(--palette-004);
    border: 1px solid var(--home-line);
    box-shadow: var(--home-shadow-lg);
    min-height: 500px;
    transition-duration: 0.25s;
}


.home-image-card__title {
    font-size: clamp(2rem, 4vw, 3.4rem);
    text-shadow: 0 8px 24px var(--palette-080);
    line-height: .98;
    font-weight: 800;
    max-width: 12ch;
    color: var(--tone-100);
}

.home-image-card__text {
    max-width: 34rem;
    color: var(--palette-146);
    font-size: 1.03rem;
    line-height: 1.7;
}

.home-inline-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--tone-08);
    border: 1px solid var(--tone-08);
    color: var(--tone-100);
    font-weight: 600;
}

.home-glass-panel {
    padding: 20px;
    border-radius: 24px;
    border: 1px solid var(--tone-10);
    background:
        linear-gradient(180deg, var(--tone-06), var(--tone-02)),
        var(--palette-203);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.home-panel-line {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--palette-051);
    padding: 11px 0;
    border-bottom: 1px solid var(--tone-07);
}

.home-panel-line > i {
    width: 20px;
    text-align: center;
}

.home-panel-line:last-child {
    border-bottom: 0;
}

.home-chart-wrap {
    height: 290px;
}

.home-highlight-card {
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(var(--brand-rgb), .32), var(--palette-074));
    border: 1px solid rgba(var(--brand-accent-rgb), .26);
}

.home-highlight-card__value {
    color: var(--tone-100);
    font-size: 1.95rem;
    line-height: 1;
    font-weight: 800;
}

.home-highlight-card__value span {
    color: var(--home-text-soft);
    font-size: .95rem;
    font-weight: 500;
}

.home-progress {
    height: 9px;
    background: var(--tone-08);
    border-radius: 999px;
}

.home-progress__bar {
    background: linear-gradient(90deg, var(--home-brand-2), var(--home-brand));
    border-radius: 999px;
}

.home-metric-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--tone-06);
    background: var(--tone-035);
}

.home-metric-card__icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: var(--tone-100);
}

.home-metric-card__icon--soft {
    background: var(--palette-082);
    border: 1px solid var(--palette-083);
}

.home-metric-card__icon--brand {
    background: rgba(var(--brand-rgb), .20);
    border: 1px solid rgba(var(--brand-rgb), .36);
}

.home-metric-card__value {
    font-size: 1.4rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--tone-100);
    margin: 2px 0;
}

.home-gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--home-line);
    box-shadow: var(--home-shadow-md);
    background: var(--tone-02);
}

.home-gallery-card__img {
    aspect-ratio: 1 / 1.08;
    object-fit: cover;
    transition: transform .55s ease;
}

.home-gallery-card:hover .home-gallery-card__img {
    transform: scale(1.06);
}

.home-gallery-card__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, var(--tone-12) 40%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .8s ease;
}

.home-gallery-card:hover .home-gallery-card__shine {
    transform: translateX(120%);
}

.home-cta {
    position: relative;
    padding: 42px 24px;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(var(--brand-accent-rgb), .18);
    background: radial-gradient(circle at top left, var(--palette-196), transparent 26%),
    linear-gradient(135deg, var(--home-brand-2), var(--home-brand-3));
    box-shadow: var(--home-shadow-lg);
}

.home-cta__title {
    color: var(--tone-100);
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.02;
    font-weight: 800;
}

.home-cta__text {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    color: var(--palette-168);
    font-size: 1.05rem;
}

.home-modal .modal-content {
    background: var(--palette-006);
    color: var(--tone-100);
    border: 1px solid var(--tone-08);
    border-radius: 24px;
}

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

.home-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.home-reveal-delay-1 {
    transition-delay: .08s;
}

.home-reveal-delay-2 {
    transition-delay: .16s;
}

/* ===== HERO FX ===== */

.hero-v2::before {
    content: "";
    position: absolute;
    inset: -10%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at var(--fx-x) var(--fx-y), var(--palette-085), transparent 18%),
        radial-gradient(circle at calc(var(--fx-x-soft) + 10%) calc(var(--fx-y-soft) + 8%), var(--palette-195), transparent 22%);
    transition: opacity .25s ease;
    animation: heroAmbientPulse 8s ease-in-out infinite;
}

.hero-v2__bg {
    transition: transform .45s ease-out, filter .35s ease;
    will-change: transform;
}

.hero-v2__shade {
    transition: background .25s ease;
}

/* ===== GLASS SHIMMER ===== */

.hero-v2__stat,
.home-glass-panel,
.home-image-card,
.home-gallery-card,
.home-feature-card {
    position: relative;
    overflow: hidden;
}

.hero-v2__stat::after,
.home-glass-panel::after,
.home-image-card::after,
.home-gallery-card::after,
.home-feature-card::after {
    content: "";
    position: absolute;
    top: -20%;
    left: -120%;
    width: 60%;
    height: 140%;
    pointer-events: none;
    transform: rotate(16deg);
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--tone-00) 20%,
        var(--tone-08) 48%,
        var(--tone-18) 52%,
        var(--tone-00) 80%,
        transparent 100%
    );
    animation: glassSweep 9s linear infinite;
    opacity: .65;
}

.home-glass-panel::after {
    animation-duration: 10.5s;
    opacity: .55;
}

.home-gallery-card::after {
    animation-duration: 12s;
    opacity: .45;
}

/* ===== EDGE GLOW ===== */

.hero-v2__stat,
.home-glass-panel,
.home-feature-card {
    box-shadow:
        0 20px 60px var(--palette-077),
        inset 0 1px 0 var(--tone-04),
        0 0 0 1px var(--tone-02),
        0 0 0 rgba(var(--brand-rgb), 0);
}

.hero-v2__stat::before,
.home-glass-panel::before,
.home-feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    padding: 1px;
    background: linear-gradient(
        135deg,
        var(--palette-165),
        var(--tone-03) 30%,
        var(--palette-188) 65%,
        var(--tone-08)
    );
    -webkit-mask:
        linear-gradient(var(--tone-100) 0 0) content-box,
        linear-gradient(var(--tone-100) 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: .9;
}

/* ===== FLOAT / HOVER ===== */

.home-image-card,
.home-feature-card,
.home-gallery-card,
.home-glass-panel,
.hero-v2__stat {
    transition:
        transform .28s ease,
        box-shadow .28s ease,
        border-color .28s ease;
    will-change: transform;
}

.home-image-card:hover,
.home-feature-card:hover,
.home-gallery-card:hover,
.home-glass-panel:hover,
.hero-v2__stat:hover {
    transform: translateY(-4px);
    box-shadow:
        0 26px 70px var(--palette-078),
        inset 0 1px 0 var(--tone-04),
        0 0 0 1px var(--tone-02),
        0 0 32px rgba(var(--brand-rgb), .12);
}


.home-image-card__img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    opacity: .86;
    transition: transform .7s ease, filter .4s ease;
}

.home-image-card:hover .home-image-card__img {
    transform: scale(1.06);
    filter: saturate(1.06);
}


/* ===== BUTTON FX ===== */

.bm-btn-brand,
.hero-v2 .btn-outline-light,
#next-game-section .btn {
    position: relative;
    overflow: hidden;
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        background .22s ease;
}

.bm-btn-brand::after,
.hero-v2 .btn-outline-light::after,
#next-game-section .btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -130%;
    width: 52%;
    height: 100%;
    transform: skewX(-22deg);
    background: linear-gradient(
        90deg,
        transparent,
        var(--palette-166),
        transparent
    );
    transition: left .7s ease;
}

.bm-btn-brand:hover::after,
.hero-v2 .btn-outline-light:hover::after,
#next-game-section .btn:hover::after {
    left: 150%;
}

.bm-btn-brand:hover,
.hero-v2 .btn-outline-light:hover,
#next-game-section .btn:hover {
    transform: translateY(-2px);
}

/* ===== NEXT GAME PREMIUM FX ===== */

.home-image-card {
    isolation: isolate;
}

.home-image-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at var(--fx-x) var(--fx-y), var(--palette-084), transparent 18%),
        radial-gradient(circle at 82% 18%, var(--palette-202), transparent 18%);
    mix-blend-mode: screen;
    opacity: .95;
}

.home-image-card__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, var(--palette-184), var(--palette-187)),
        linear-gradient(90deg, var(--palette-187) 0%, var(--palette-185) 40%, var(--palette-186) 100%);
}

.home-inline-pill,
.home-badge-soft,
.home-badge-brand {
    box-shadow:
        inset 0 1px 0 var(--tone-05),
        0 8px 18px var(--palette-075);
}

/* ===== HERO TITLE / TEXT POLISH ===== */

.hero-v2__title {
    position: relative;
    animation: heroTitleRise .9s cubic-bezier(.2,.8,.2,1) both;
}

.hero-v2__subtitle,
.hero-v2__stats {
    animation: heroFadeUp 1s ease both;
    animation-delay: .12s;
}

.hero-v2__eyebrow {
    animation: heroFadeUp .8s ease both;
}

.hero-v2__stat {
    animation: statFloatIn .8s ease both;
}

.hero-v2__stats .col-6:nth-child(1) .hero-v2__stat,
.hero-v2__stats .col-12:nth-child(1) .hero-v2__stat {
    animation-delay: .12s;
}

.hero-v2__stats .col-6:nth-child(2) .hero-v2__stat,
.hero-v2__stats .col-12:nth-child(2) .hero-v2__stat {
    animation-delay: .20s;
}

.hero-v2__stats .col-6:nth-child(3) .hero-v2__stat,
.hero-v2__stats .col-12:nth-child(3) .hero-v2__stat {
    animation-delay: .28s;
}

/* ===== AMBIENT GRAIN ===== */

.hero-v2__noise {
    position: absolute;
    inset: 0;
    opacity: .05;
    background-image: radial-gradient(var(--palette-167) 0.5px, transparent 0.5px);
    background-size: 8px 8px;
    pointer-events: none;
    animation: noiseShift 10s steps(6) infinite;
}


/* ===== KEYFRAMES ===== */

@keyframes glassSweep {
    0% { left: -140%; }
    100% { left: 170%; }
}

@keyframes heroAmbientPulse {
    0%, 100% { opacity: .85; }
    50% { opacity: 1; }
}

@keyframes heroTitleRise {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(.985);
        filter: blur(6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes heroFadeUp {
    0% {
        opacity: 0;
        transform: translateY(16px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes statFloatIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes noiseShift {
    0% { transform: translate3d(0,0,0); }
    20% { transform: translate3d(-1%,1%,0); }
    40% { transform: translate3d(1%,-1%,0); }
    60% { transform: translate3d(1%,1%,0); }
    80% { transform: translate3d(-1%,-1%,0); }
    100% { transform: translate3d(0,0,0); }
}

/* ===== REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
    .hero-v2::before,
    .hero-v2__noise,
    .hero-v2__stat::after,
    .home-glass-panel::after,
    .home-image-card::after,
    .home-gallery-card::after,
    .home-feature-card::after,
    .hero-v2__title,
    .hero-v2__subtitle,
    .hero-v2__stats,
    .hero-v2__eyebrow,
    .hero-v2__stat {
        animation: none !important;
        transition: none !important;
    }

    .home-image-card:hover,
    .home-feature-card:hover,
    .home-gallery-card:hover,
    .home-glass-panel:hover,
    .hero-v2__stat:hover,
    .bm-btn-brand:hover,
    .hero-v2 .btn-outline-light:hover,
    #next-game-section .btn:hover {
        transform: none !important;
    }
}
