/* Useful.gg — homepage browse grid and ranked rows
   Adapted from the MW4.GG home layout, using the Vice Sunset theme. */

/* Hero: text on the left, launch timer on the right, art pinned to the top
   so heads and sky are not cropped under the nav. */
.hero-cinematic {
    align-items: center;
    justify-content: flex-start;
    min-height: clamp(24rem, 38vw, 32rem);
    padding: calc(var(--nav-height) + 1.75rem) 0 2.5rem;
    overflow: hidden;
    text-align: left;
}

.hero-cinematic .hero-ambient {
    top: var(--nav-height);
}

.hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% top;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 6, 12, 0.9) 0%, rgba(8, 6, 12, 0.62) 30%, rgba(8, 6, 12, 0.12) 58%, rgba(8, 6, 12, 0.42) 100%),
        linear-gradient(180deg, rgba(8, 6, 12, 0.2) 0%, rgba(8, 6, 12, 0.02) 46%, var(--bg-black) 100%);
}

.hero-cinematic::before {
    display: none;
}

.hero-cinematic-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.hero-copy {
    min-width: 0;
    max-width: 40rem;
}

.hero-kicker {
    margin: 0 0 0.55rem;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--neon-pink-bright);
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 3.6vw, 3rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--text-white);
}

.hero-title-line {
    white-space: nowrap;
}

.hero-title .accent {
    display: block;
    color: var(--neon-pink);
}

.hero-cinematic .countdown-wrap {
    flex-shrink: 0;
    align-items: flex-end;
    margin: 0;
    text-align: right;
}

.hero-cinematic .countdown-label {
    background: none;
    color: #ffd0e4;
    -webkit-text-fill-color: #ffd0e4;
}

@media (max-width: 860px) {
    .hero-cinematic {
        min-height: 0;
        padding: calc(var(--nav-height) + 1.35rem) 0 1.75rem;
    }

    .hero-cinematic-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 0 1rem;
    }

    .hero-cinematic .countdown-wrap {
        align-items: flex-start;
        text-align: left;
    }

    .hero-media {
        object-position: 62% top;
    }

    .hero-title {
        font-size: clamp(1.7rem, 8vw, 2.4rem);
    }

    .hero-title-line {
        white-space: normal;
    }
}

/* Same content width as the MW4.GG homepage (.home .container). */
.home-stack .container,
body:has(.home-stack) .footer .container {
    max-width: 1400px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.home-stack {
    display: grid;
    gap: 1.15rem;
    padding: 1.5rem 0 3rem;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(122, 59, 255, 0.06), transparent 70%),
        var(--bg-darker);
    border-top: 1px solid var(--border);
}

.home-panel {
    min-width: 0;
    padding: 1rem 1rem 1.05rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.section-head__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-white);
}

.section-head__sub {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.section-head__link {
    flex-shrink: 0;
    margin-top: 0.15rem;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--neon-pink-bright);
    text-decoration: none;
    white-space: nowrap;
}

.section-head__link:hover {
    color: var(--text-white);
}

.home-main-grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 1100px) {
    .home-main-grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.9fr);
        align-items: start;
    }
}

.home-browse-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

@media (min-width: 560px) {
    .home-browse-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.home-browse-card {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 5.4rem;
    padding: 0.85rem 5.4rem 0.85rem 0.95rem;
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    color: inherit;
    text-decoration: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.home-browse-card:hover {
    background: #1c1528;
    border-color: rgba(255, 45, 120, 0.45);
}

.home-browse-card__copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.home-browse-card__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-white);
}

.home-browse-card__desc {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--text-secondary);
}

.v3-cat__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.15rem;
    padding: 0 0.35rem;
    font-family: var(--font-display);
    font-size: 0.66rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    line-height: 1;
    color: #fff;
    background: var(--gradient-vice-90);
    border-radius: var(--radius-sm);
}

.home-browse-card__art {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 5.2rem;
    height: 100%;
    padding-right: 0.85rem;
    color: var(--neon-pink-bright);
    pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 42%);
}

.home-browse-card__art svg {
    width: 2.4rem;
    height: 2.4rem;
    transition: transform 0.35s ease;
}

.home-browse-card:hover .home-browse-card__art svg {
    transform: scale(1.08);
}

.home-browse-card--photo {
    padding-right: 6.8rem;
}

img.home-browse-card__art {
    display: block;
    width: 7.6rem;
    height: 100%;
    padding: 0;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

.home-browse-card:hover img.home-browse-card__art {
    transform: scale(1.04);
}

.home-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.15rem;
}

@media (min-width: 1100px) {
    .home-bottom {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.home-about-panel__copy p {
    margin: 0;
    max-width: 72rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.home-about-panel__copy a {
    color: var(--neon-pink-bright);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.home-rank-list,
.home-news-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.home-news-list .v3-row__name {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.v3-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    min-height: 3rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: inherit;
    text-decoration: none;
    transition: border-color var(--transition-fast);
}

.v3-row:hover {
    border-color: rgba(255, 45, 120, 0.45);
}

.v3-row__thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--gradient-vice);
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.v3-row__thumb:has(img) {
    width: 4.27rem;
    background: #120816;
}

.v3-row__thumb--portrait,
.v3-row__thumb--portrait:has(img) {
    width: 1.8rem;
    height: 2.4rem;
    background: #120816;
}

.v3-row__thumb--portrait img {
    object-position: top center;
}

.v3-row__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.v3-row__copy {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 0.1rem;
}

.v3-row__name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.v3-row__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-white);
}

.home-rank-list .v3-row:has(.vice-vote) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 12rem;
    align-items: center;
    column-gap: 0.55rem;
}

.home-rank-list .v3-row__open {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

#home-radio-ranks .v3-row__thumb,
#home-radio-ranks .v3-row__thumb:has(img) {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 4px;
    background: #120816;
}

.home-rank-list .vice-vote {
    width: 12rem;
    max-width: 100%;
    padding: 1px 2px 2px;
}

.home-rank-list .vice-vote__btn {
    padding: 2px 0 3px;
}

.home-rank-list .vice-vote__mark {
    font-size: 0.95rem;
}

.home-rank-list .vice-vote__btn:hover .vice-vote__mark,
.home-rank-list .vice-vote__btn:focus-visible .vice-vote__mark {
    transform: translateY(-1px) scale(1.08);
}

@media (max-width: 720px) {
    .home-rank-list .v3-row:has(.vice-vote) {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0.28rem;
    }

    .home-rank-list .vice-vote {
        width: 12rem;
        justify-self: start;
    }
}

.v3-row__detail {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.v3-stars {
    --score: 0;
    position: relative;
    display: inline-block;
    width: 4.6rem;
    height: 0.85rem;
    flex-shrink: 0;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.16);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cpath fill='black' d='M12 2.4 14.2 9h6.9l-5.6 4.1 2.1 6.5L12 15.6 6.4 19.6l2.1-6.5L2.9 9h6.9z'/%3E%3Cpath fill='black' transform='translate(24 0)' d='M12 2.4 14.2 9h6.9l-5.6 4.1 2.1 6.5L12 15.6 6.4 19.6l2.1-6.5L2.9 9h6.9z'/%3E%3Cpath fill='black' transform='translate(48 0)' d='M12 2.4 14.2 9h6.9l-5.6 4.1 2.1 6.5L12 15.6 6.4 19.6l2.1-6.5L2.9 9h6.9z'/%3E%3Cpath fill='black' transform='translate(72 0)' d='M12 2.4 14.2 9h6.9l-5.6 4.1 2.1 6.5L12 15.6 6.4 19.6l2.1-6.5L2.9 9h6.9z'/%3E%3Cpath fill='black' transform='translate(96 0)' d='M12 2.4 14.2 9h6.9l-5.6 4.1 2.1 6.5L12 15.6 6.4 19.6l2.1-6.5L2.9 9h6.9z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 24'%3E%3Cpath fill='black' d='M12 2.4 14.2 9h6.9l-5.6 4.1 2.1 6.5L12 15.6 6.4 19.6l2.1-6.5L2.9 9h6.9z'/%3E%3Cpath fill='black' transform='translate(24 0)' d='M12 2.4 14.2 9h6.9l-5.6 4.1 2.1 6.5L12 15.6 6.4 19.6l2.1-6.5L2.9 9h6.9z'/%3E%3Cpath fill='black' transform='translate(48 0)' d='M12 2.4 14.2 9h6.9l-5.6 4.1 2.1 6.5L12 15.6 6.4 19.6l2.1-6.5L2.9 9h6.9z'/%3E%3Cpath fill='black' transform='translate(72 0)' d='M12 2.4 14.2 9h6.9l-5.6 4.1 2.1 6.5L12 15.6 6.4 19.6l2.1-6.5L2.9 9h6.9z'/%3E%3Cpath fill='black' transform='translate(96 0)' d='M12 2.4 14.2 9h6.9l-5.6 4.1 2.1 6.5L12 15.6 6.4 19.6l2.1-6.5L2.9 9h6.9z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.v3-stars::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: calc(var(--score) / 5 * 100%);
    background: var(--neon-pink);
}

.v3-list__empty {
    margin: 0;
    padding: 0.65rem 0.2rem;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-dim);
}

.v3-list__empty a {
    color: var(--neon-pink-bright);
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 768px) {
    .home-stack .container,
    body:has(.home-stack) .footer .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .home-panel.home-main-grid {
        padding: 0;
        background: transparent;
        border: 0;
    }

    .home-main-grid > section,
    .home-main-grid > aside {
        padding: 0.85rem 0.85rem 0.9rem;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
    }

    .home-browse-card--photo {
        padding-right: 5.6rem;
    }

    img.home-browse-card__art {
        width: 5.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-browse-card:hover .home-browse-card__art svg,
    .home-browse-card:hover img.home-browse-card__art {
        transform: none;
    }
}
