/* ============================================
   RT App — Discover
   Scoped to .rtd-*. cqw sizing against the 375px device (px / 375 * 100).
   Source: P1+2 RT App › Discover Page › "Full page" + "Scroll State".
   ============================================ */

.rt-scroll.rtd-scroll {
    --rtd-dom: #0d0a2e;
    --rtd-dim: rgba(255, 255, 255, 0.6);
    --p: 0;
    background: #000;
    display: block;
    padding-bottom: 44cqw;
    position: relative;
}

/* ---------- Sticky header: stays put, tints to the dominant colour as you scroll ---------- */
.rtd-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 26.133cqw;
    margin-bottom: -26.133cqw;
    background: color-mix(in srgb, var(--rtd-dom) calc(var(--p) * 100%), transparent);
}

.rtd-header-row {
    display: flex;
    align-items: center;
    gap: 2.133cqw;
    padding: 3.2cqw 4.267cqw 0;
    height: 9.067cqw;
    box-sizing: content-box;
}

.rtd-title {
    margin: 0;
    margin-right: auto;
    font-family: var(--rt-font-medium);
    font-weight: 500;
    font-size: 7.467cqw;
    line-height: 9.067cqw;
    letter-spacing: 0;
}

.rtd-avatar,
.rtd-search-btn {
    width: 8.533cqw;
    height: 8.533cqw;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.rtd-avatar {
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

/* Search CTA that fades in as the in-page search bar scrolls away */
.rtd-search-btn {
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    opacity: var(--p);
    pointer-events: none;
}

.rtd-search-btn .rt-icon {
    width: 4.267cqw;
    height: 4.267cqw;
    font-size: 4.267cqw;
    display: block;
}

.rtd-scroll[data-collapsed] .rtd-search-btn {
    pointer-events: auto;
    cursor: pointer;
}

/* ---------- Hero ---------- */
.rtd-hero {
    position: relative;
    padding: 27cqw 0 0;
}

/* Dominant-colour wash (always there) with the key art over it; the art fades
   out on scroll, leaving only the wash. */
.rtd-hero-bg {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 76cqw;
    pointer-events: none;
    background: linear-gradient(180deg, var(--rtd-dom) 0%, var(--rtd-dom) 55%, #000 100%);
}

.rtd-hero-art {
    position: absolute;
    inset: 0;
    background: url('rt-disc-hero.jpg') 70% 0 / auto 100% no-repeat;
    opacity: calc(1 - var(--p));
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 98%);
    mask-image: linear-gradient(180deg, #000 30%, transparent 98%);
}

.rtd-hero > *:not(.rtd-hero-bg) {
    position: relative;
    z-index: 2;
}

.rtd-search,
.rtd-tile,
.rtd-dsp,
.rtd-card {
    position: relative;
    cursor: pointer;
}

/* Pressed state: lighten whatever was tapped by 10% white */
.rtd-search::after,
.rtd-tile::after,
.rtd-dsp::after,
.rtd-card-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0);
    pointer-events: none;
    transition: background 0.08s ease;
}

.rtd-search:active::after,
.rtd-tile:active::after,
.rtd-dsp:active::after,
.rtd-card:active .rtd-card-poster::after {
    background: rgba(255, 255, 255, 0.1);
}

.rtd-search {
    display: flex;
    align-items: center;
    gap: 2.133cqw;
    margin: 0 4.267cqw;
    height: 13.333cqw;
    padding: 0 4.267cqw;
    border-radius: 4.267cqw;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-family: var(--rt-font-medium);
    font-size: 4.267cqw;
    letter-spacing: 0.267cqw;
    color: rgba(255, 255, 255, 0.6);
    opacity: calc(1 - var(--p) * 1.6);
}

.rtd-search .rt-icon {
    width: 4.8cqw;
    height: 4.8cqw;
    font-size: 4.8cqw;
    display: block;
    flex-shrink: 0;
}

.rtd-tiles {
    display: flex;
    gap: 2.133cqw;
    margin: 4.267cqw 4.267cqw 0;
    opacity: calc(1 - var(--p) * 1.6);
}

.rtd-tile {
    flex: 1;
    height: 21cqw;
    border-radius: 4.267cqw;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.4cqw;
    font-family: var(--rt-font-medium);
    font-size: 3.733cqw;
    letter-spacing: 0.267cqw;
}

.rtd-tile .rt-icon {
    width: 5.867cqw;
    height: 5.867cqw;
    font-size: 5.867cqw;
    display: block;
}

/* ---------- DSP banners ---------- */
.rtd-dsp {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 9cqw 4.267cqw 0;
    height: 21.867cqw;
    padding: 0 4.267cqw;
    border-radius: 4.267cqw;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.12)),
        var(--bg) center / cover no-repeat;
}

.rtd-dsp--tall {
    height: 28.5cqw;
}

.rtd-dsp-title {
    font-family: var(--rt-font-medium);
    font-weight: 500;
    font-size: 5.333cqw;
    line-height: 6.933cqw;
    margin: 0;
}

.rtd-dsp-sub {
    font-family: var(--rt-font-medium);
    font-size: 3.733cqw;
    letter-spacing: 0.267cqw;
    margin-top: 0.4cqw;
}

.rtd-scores {
    display: flex;
    align-items: center;
    gap: 3.2cqw;
    margin-top: 1.6cqw;
    font-family: var(--rt-font-medium);
    font-size: 3.733cqw;
    letter-spacing: 0.267cqw;
}

.rtd-scores span {
    display: inline-flex;
    align-items: center;
    gap: 1.067cqw;
}

.rtd-scores img {
    width: 4.267cqw;
    height: 4.267cqw;
    display: block;
}

.rtd-watch {
    flex-shrink: 0;
    height: 8cqw;
    padding: 0 6.4cqw;
    border-radius: 4cqw;
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: #111;
    font-family: var(--rt-font-medium);
    font-size: 3.733cqw;
    letter-spacing: 0.267cqw;
    text-transform: uppercase;
}

/* Muted variant (title not available to watch yet) */
.rtd-dsp--muted {
    background:
        linear-gradient(90deg, rgba(8, 8, 10, 0.86), rgba(8, 8, 10, 0.78)),
        var(--bg) center / cover no-repeat;
    color: rgba(255, 255, 255, 0.4);
}

.rtd-dsp--muted .rtd-scores img {
    opacity: 0.5;
}

.rtd-dsp--muted .rtd-watch {
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28) inset;
}

/* ---------- Sections & media cards ---------- */
.rtd-section {
    margin-top: 8.533cqw;
}

.rtd-section h2 {
    margin: 0 4.267cqw 3.733cqw;
    font-family: var(--rt-font-medium);
    font-weight: 500;
    font-size: 5.333cqw;
    line-height: 6.933cqw;
    letter-spacing: 0;
}

.rtd-row {
    display: flex;
    gap: 2.133cqw;
    padding: 0 4.267cqw;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    scroll-padding-left: 4.267cqw;
}

.rtd-row::-webkit-scrollbar {
    display: none;
}

.rtd-card {
    flex: 0 0 37.333cqw;
    scroll-snap-align: start;
    border-radius: 4.267cqw;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    overflow: hidden;
}

.rtd-card-poster {
    position: relative;
    height: 55.5cqw;
    border-radius: 4.267cqw;
    overflow: hidden;
}

.rtd-card-poster > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rtd-play {
    position: absolute;
    left: 2.133cqw;
    bottom: 2.133cqw;
    width: 9.6cqw;
    height: 9.6cqw;
    border-radius: 3.2cqw;
    background: rgba(20, 20, 24, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    color: #fff;
}

.rtd-play .rt-icon {
    width: 4.267cqw;
    height: 4.267cqw;
    font-size: 4.267cqw;
    display: block;
}

.rtd-card-meta {
    padding: 2.133cqw 2.667cqw 2.133cqw;
    font-family: var(--rt-font-medium);
    font-size: 3.733cqw;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.82);
}

.rtd-card-scores {
    display: flex;
    align-items: center;
    gap: 2.4cqw;
    height: 5.333cqw;
    padding-bottom: 1.867cqw;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    box-sizing: content-box;
}

.rtd-card-scores span {
    display: inline-flex;
    align-items: center;
    gap: 1.067cqw;
}

.rtd-card-scores img {
    width: 4.267cqw;
    height: 4.267cqw;
    display: block;
}

.rtd-card-count {
    display: flex;
    align-items: center;
    gap: 1.6cqw;
    height: 5.333cqw;
    margin-top: 1.867cqw;
    color: rgba(255, 255, 255, 0.6);
}

.rtd-card-count .rt-icon {
    width: 4.8cqw;
    height: 4.8cqw;
    font-size: 4.8cqw;
    display: block;
}
