/* =========================================================
   STK DYNAMIC HOMEPAGE
   Loaded after style.css
========================================================= */

/* Overview statistics */

.home-overview {
    padding: 55px 30px;

    background: #080808;

    border-top: 1px solid #292929;
    border-bottom: 1px solid #292929;
}

.home-overview-grid {
    width: min(1100px, 100%);
    margin: 0 auto;

    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;
}

.home-overview-grid article {
    padding: 25px 18px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.05),
            rgba(255, 255, 255, 0)
        ),
        #111;

    border: 1px solid #555;
    border-radius: 9px;

    text-align: center;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.home-overview-grid article:hover {
    transform: translateY(-5px);

    border-color: white;
}

.home-overview-grid strong,
.home-overview-grid span {
    display: block;
}

.home-overview-grid strong {
    margin-bottom: 8px;

    font-size: 2.5rem;
}

.home-overview-grid span {
    font-size: 0.66rem;
    font-weight: bold;
    letter-spacing: 1.4px;

    opacity: 0.58;
}

/* Dynamic match additions */

.home-data-message {
    min-height: 24px;
    margin: 0 0 24px;

    text-align: center;

    opacity: 0.6;
}

.home-match-tournament {
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;

    opacity: 0.65;
}

.home-status.live {
    color: #ff8f8f;

    border-color: #ff6868;

    animation:
        homeLivePulse
        1.4s
        ease-in-out
        infinite;
}

.home-status.final {
    color: #91ffac;

    border-color: #5bbd70;
}

@keyframes homeLivePulse {
    0%,
    100% {
        box-shadow:
            0 0 0
            rgba(255, 80, 80, 0);
    }

    50% {
        box-shadow:
            0 0 16px
            rgba(255, 80, 80, 0.35);
    }
}

.home-match-stream {
    display: inline-block;

    margin-top: 13px;
    padding: 10px 14px;

    background: white;
    color: black;

    border: 1px solid white;

    text-decoration: none;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}

.home-match-stream:hover {
    background: transparent;
    color: white;
}

.home-empty-state {
    width: min(900px, 100%);
    margin: 0 auto 25px;
    padding: 40px 20px;

    background: rgba(10, 10, 10, 0.86);

    border: 1px dashed #666;
    border-radius: 10px;

    text-align: center;

    opacity: 0.7;
}

/* Dynamic featured players */

.dynamic-featured-player {
    background-size: cover;
    background-position: center;

    border: 1px solid #555;
}

.dynamic-featured-player
.featured-player-image {
    object-fit: cover;
    object-position: center top;
}

.home-player-placeholder {
    width: 100%;
    min-height: 280px;

    display: flex;
    justify-content: center;
    align-items: center;

    background:
        linear-gradient(
            rgba(255, 255, 255, 0.05),
            rgba(0, 0, 0, 0.85)
        ),
        #181818;

    color: white;

    font-size: 4rem;
    font-weight: bold;
}

/* Sponsors */

.home-sponsors {
    padding: 95px 30px;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.9),
            rgba(0, 0, 0, 0.97)
        ),
        url("images/stkbackround.png");

    background-size: cover;
    background-position: center;

    text-align: center;
}

.home-sponsors > h2 {
    margin: 9px 0 18px;

    font-size: clamp(
        2.4rem,
        6vw,
        4rem
    );
}

.home-sponsors-grid {
    width: min(1100px, 100%);
    margin: 0 auto 32px;

    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;
}

.home-sponsor-card {
    min-height: 190px;

    display: flex;
    justify-content: center;
    align-items: center;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.05),
            rgba(255, 255, 255, 0)
        ),
        #111;

    border: 1px solid #555;
    border-radius: 10px;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease;
}

.home-sponsor-card:hover {
    transform: translateY(-6px);

    border-color: white;
}

.home-sponsor-card a {
    width: 100%;
    height: 100%;
    padding: 22px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    color: white;

    text-decoration: none;
}

.home-sponsor-card > img,
.home-sponsor-card a img {
    width: 110px;
    height: 80px;

    margin-bottom: 15px;

    object-fit: contain;
}

.home-sponsor-card h3 {
    margin-bottom: 7px;

    overflow-wrap: anywhere;
}

.home-sponsor-card p {
    font-size: 0.65rem;
    font-weight: bold;
    letter-spacing: 1px;

    opacity: 0.55;
}

.home-sponsor-placeholder {
    width: 78px;
    height: 78px;

    margin: 0 auto 15px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: white;
    color: black;

    border-radius: 50%;

    font-size: 1.8rem;
    font-weight: bold;
}

.home-grid-empty {
    grid-column: 1 / -1;

    margin-bottom: 0;
}

/* Recruitment */

.home-recruitment {
    padding: 60px max(30px, calc((100vw - 1100px) / 2));

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 35px;

    background: white;
    color: black;
}

.home-recruitment h2 {
    margin: 8px 0 12px;

    font-size: clamp(
        2rem,
        5vw,
        3.2rem
    );
}

.home-recruitment p:last-child {
    max-width: 700px;

    line-height: 1.65;

    opacity: 0.72;
}

.home-recruitment .eyebrow {
    color: black;
}

.home-recruitment .join-button {
    flex-shrink: 0;

    background: black;
    color: white;

    border-color: black;
}

.home-recruitment
.join-button:hover {
    background: transparent;
    color: black;
}

/* Responsive */

@media (max-width: 950px) {

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

    .home-recruitment {
        align-items: flex-start;
        flex-direction: column;
    }

}

@media (max-width: 600px) {

    .home-overview,
    .home-sponsors {
        padding-left: 18px;
        padding-right: 18px;
    }

    .home-overview-grid,
    .home-sponsors-grid {
        grid-template-columns: 1fr;
    }

    .home-recruitment {
        padding:
            45px 20px;
    }

    .home-recruitment
    .join-button {
        width: 100%;

        text-align: center;
    }

}

/* =========================
   Homepage Featured News
========================= */

.home-news {
    padding: 95px 30px;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.9),
            rgba(0, 0, 0, 0.97)
        ),
        url("images/stkbackround.png");

    background-size: cover;
    background-position: center;

    text-align: center;
}

.home-news > h2 {
    margin: 9px 0 18px;

    font-size: clamp(
        2.4rem,
        6vw,
        4rem
    );
}

.home-news-grid {
    width: min(1100px, 100%);
    margin: 0 auto 32px;

    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 22px;
}

.home-news-card {
    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.05),
            rgba(255, 255, 255, 0)
        ),
        #111;

    border: 1px solid #555;
    border-radius: 12px;

    text-align: left;

    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease;
}

.home-news-card:hover {
    transform: translateY(-7px);

    border-color: white;

    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.55),
        0 0 20px rgba(255, 255, 255, 0.08);
}

.home-news-image {
    height: 210px;

    overflow: hidden;

    background: #171717;
}

.home-news-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.35s ease;
}

.home-news-card:hover
.home-news-image img {
    transform: scale(1.04);
}

.home-news-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 2px;

    opacity: 0.35;
}

.home-news-content {
    padding: 22px;
}

.home-news-date {
    margin-bottom: 8px;

    font-size: 0.65rem;
    font-weight: bold;
    letter-spacing: 1.2px;

    opacity: 0.55;
}

.home-news-content h3 {
    margin-bottom: 12px;

    font-size: 1.35rem;

    overflow-wrap: anywhere;
}

.home-news-content > p:last-child {
    line-height: 1.65;

    opacity: 0.72;
}

@media (max-width: 950px) {

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

}

@media (max-width: 600px) {

    .home-news {
        padding-left: 18px;
        padding-right: 18px;
    }

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

}

/* =========================================================
   STK LAUNCH POLISH — HOMEPAGE
========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 10000;

    padding: 10px 14px;

    background: white;
    color: black;

    text-decoration: none;
    font-weight: bold;

    transform: translateY(-160%);

    transition: transform 0.2s ease;
}

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

/* Hero refinement */

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.hero::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -2;

    background:
        radial-gradient(
            circle at center,
            rgba(255, 255, 255, 0.08),
            transparent 42%
        );
}

.hero::after {
    content: "";

    position: absolute;
    inset: auto 0 0;
    z-index: -1;

    height: 170px;

    background:
        linear-gradient(
            to top,
            #080808,
            transparent
        );

    pointer-events: none;
}

.hero h1,
.hero p,
.hero .join-button {
    position: relative;
    z-index: 1;
}

.hero h1 {
    text-wrap: balance;

    animation:
        homeHeroTitleIn
        0.9s
        cubic-bezier(.2, .8, .2, 1)
        both;
}

.hero > p {
    animation:
        homeHeroContentIn
        0.85s
        0.12s
        ease
        both;
}

.hero .join-button {
    animation:
        homeHeroContentIn
        0.85s
        0.24s
        ease
        both;
}

@keyframes homeHeroTitleIn {
    from {
        opacity: 0;
        transform:
            translateY(28px)
            scale(0.97);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}

@keyframes homeHeroContentIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 26px;

    width: 30px;
    height: 48px;

    display: flex;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;

    transform: translateX(-50%);

    opacity: 0.68;
}

.hero-scroll-cue span {
    width: 4px;
    height: 9px;

    margin-top: 9px;

    background: white;
    border-radius: 999px;

    animation:
        homeScrollCue
        1.7s
        ease-in-out
        infinite;
}

@keyframes homeScrollCue {
    0% {
        opacity: 0;
        transform: translateY(0);
    }

    35% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(17px);
    }
}

/* Smooth section entrance */

.reveal-section {
    opacity: 0;
    transform: translateY(34px);

    transition:
        opacity 0.75s ease,
        transform 0.75s cubic-bezier(.2, .8, .2, 1);
}

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

/* Unified section spacing and heading treatment */

.home-match,
.featured-roster,
.home-sponsors,
.home-news {
    position: relative;
}

.home-match > h2,
.featured-roster > h2,
.home-sponsors > h2,
.home-news > h2 {
    text-wrap: balance;
}

.home-match::before,
.featured-roster::before,
.home-sponsors::before,
.home-news::before {
    content: "";

    position: absolute;
    top: 0;
    left: 50%;

    width: min(900px, 80%);
    height: 1px;

    background:
        linear-gradient(
            to right,
            transparent,
            rgba(255, 255, 255, 0.36),
            transparent
        );

    transform: translateX(-50%);
}

/* Better cards */

.home-overview-grid article,
.home-news-card,
.home-sponsor-card,
.dynamic-featured-player,
.home-match-card {
    will-change: transform;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.22);
}

.home-overview-grid article:hover,
.home-news-card:hover,
.home-sponsor-card:hover,
.dynamic-featured-player:hover {
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.07);
}

/* Loading-state polish */

.home-data-message:not(:empty) {
    position: relative;

    width: fit-content;
    margin-left: auto;
    margin-right: auto;

    padding-left: 20px;
}

.home-data-message:not(:empty)::before {
    content: "";

    position: absolute;
    left: 0;
    top: 50%;

    width: 9px;
    height: 9px;

    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: white;
    border-radius: 50%;

    transform: translateY(-50%);

    animation:
        homeLoadingSpin
        0.8s
        linear
        infinite;
}

@keyframes homeLoadingSpin {
    to {
        transform:
            translateY(-50%)
            rotate(360deg);
    }
}

/* Focus accessibility */

a:focus-visible,
button:focus-visible {
    outline: 2px solid white;
    outline-offset: 4px;
}

/* Reduced-motion support */

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

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

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

@media (max-width: 700px) {
    .hero-scroll-cue {
        bottom: 18px;
    }

    .reveal-section {
        transform: translateY(22px);
    }
}
