/* ============================================================
   Decks of Dexterity — Home (redesign)
   Standalone stylesheet so the legacy card pages keep working.
   ============================================================ */

:root {
    --bg: #0a0a0a;
    --bg-soft: #141414;
    --fg: #ffffff;
    --fg-dim: rgba(255, 255, 255, 0.7);
    --accent: #ff0000;
    --accent-hot: #ff0000;
    --header-h: 110px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    color: var(--fg);
    font-family: 'Archivo Black', 'Arial Black', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    background: #000 url('../img/background.png') no-repeat center center fixed;
    /* Modern browsers pick the WebP automatically (smaller); legacy fall back to PNG above. */
    background-image: image-set(
        url('../img/background.webp') type('image/webp'),
        url('../img/background.png')  type('image/png')
    );
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    padding-top: calc(var(--header-h) + 60px);
}

a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(10, 10, 10, 0.95);
    background-clip: padding-box;
    border-bottom: 20px solid rgba(0, 0, 0, 0.5);
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0;
}

.site-logo img {
    height: 112px;
    display: block;
    image-rendering: -webkit-optimize-contrast;
}

.site-tagline {
    color: #fff;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding-left: 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    line-height: 1.2;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Nav buttons mirror the .buttonRow style from the leaderboards page */
.site-nav a {
    background-color: black;
    color: white;
    border: 4px solid white;
    padding: 10px 20px;
    font-size: 18px;
    font-family: 'Archivo Black', sans-serif;
    cursor: pointer;
    transform: skew(-10deg);
    transition: transform 0.2s, background-color 0.2s;
    display: inline-block;
}

.site-nav a span { display: inline-block; }

.site-nav a:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: skew(-10deg) scale(1.1) rotate(-1deg);
}

.site-nav a:active {
    transform: skew(-10deg) scale(0.95);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    min-width: 44px;
    width: auto;
    height: 44px;
    padding: 0 14px;
    gap: 10px;
    cursor: pointer;
    font-size: 22px;
    font-family: 'Archivo Black', sans-serif;
    transform: skew(-10deg);
    transition: background-color 0.15s, transform 0.15s;
}
.nav-toggle:hover  { background: rgba(255, 255, 255, 0.1); transform: skew(-10deg) scale(1.05); }
.nav-toggle:active { transform: skew(-10deg) scale(0.95); }
.nav-toggle .nav-toggle-label {
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Home link in the nav drawer — only visible when the hamburger is active. */
.site-nav-home { display: none; }

/* ---------- Carousel ---------- */

.hero {
    position: relative;
    width: 100%;
    height: 720px;
    overflow: hidden;
    background: rgba(10, 10, 10, 0.95);
    background-clip: padding-box;
    border: 20px solid #000;
    box-shadow: 0 0 0 20px rgba(0, 0, 0, 0.5);
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    animation: kenburns 16s ease-in-out infinite alternate;
}

.slide.active .slide-bg { animation-play-state: running; }

@keyframes kenburns {
    0%   { transform: scale(1.05) translate(0, 0); }
    100% { transform: scale(1.15) translate(-1.5%, -1%); }
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.30) 40%,
        rgba(0, 0, 0, 0.85) 100%
    );
}

/* Triangle of extra shading anchored to the lower-left to keep title/blurb
   text readable over busy backgrounds */
.slide-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    clip-path: polygon(0 0, 0 100%, 50% 100%);
    pointer-events: none;
}

.slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0 8% 90px;
    max-width: 900px;
}

.slide-eyebrow {
    color: #fff;
    font-size: 14px;
    letter-spacing: 4px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.slide-title {
    position: relative;
    display: inline-block;
    z-index: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    margin: 0 0 20px;
    padding: 4px 10px;
    color: #fff;
    -webkit-text-stroke: 8px #000;
    paint-order: stroke fill;
}

.slide-title::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #ff0000 0%, #a30000 100%);
    background-clip: padding-box;
    border: 12px solid rgba(0, 0, 0, 0.5);
    transform: skew(-20deg);
    z-index: -1;
}

.slide-blurb {
    font-family: 'Archivo Black', sans-serif;
    font-weight: normal;
    font-size: clamp(16px, 1.4vw, 20px);
    color: #fff;
    max-width: 600px;
    line-height: 1.5;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.slide-cta {
    margin-top: 28px;
    display: inline-block;
    padding: 10px 22px;
    background-color: #000;
    color: #fff;
    border: 4px solid #fff;
    font-family: 'Archivo Black', sans-serif;
    font-size: 18px;
    letter-spacing: 2px;
    transform: skew(-10deg);
    transition: transform 0.2s, background-color 0.2s;
    cursor: pointer;
}

.slide-cta span { display: inline-block; }

.slide-cta:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: skew(-10deg) scale(1.1) rotate(-1deg);
}

.slide-cta:active {
    transform: skew(-10deg) scale(0.95);
}

/* Trailer slide: text on left, video on right (background + overlay like the
   other slides) */

.trailer-split {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 5%;
    padding: 0 6% 90px;
}

.trailer-text {
    flex: 0 1 38%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    align-self: stretch;
    padding-bottom: 0;
}

.trailer-video {
    flex: 1 1 56%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trailer-video .video-wrap {
    position: relative;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 15px solid #000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 15px rgba(0, 0, 0, 0.5);
}

.trailer-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Click-to-play poster (used until the user clicks Play) */
.video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    cursor: pointer;
    background-color: #000;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: filter 0.2s ease;
}

.video-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
}

.video-poster:hover { filter: brightness(1.1); }

.video-poster .play-icon {
    position: relative;
    z-index: 1;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    border: 4px solid #fff;
    border-radius: 50%;
    font-size: 38px;
    padding-left: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    transition: background 0.15s ease, transform 0.15s ease;
}

.video-poster:hover .play-icon {
    background: var(--accent);
    color: #000;
    transform: scale(1.06);
}

.video-poster .play-label {
    position: relative;
    z-index: 1;
    letter-spacing: 3px;
    font-size: 16px;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* ---------- Carousel controls ---------- */

.car-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) skew(-10deg);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.4);
    border: 3px solid #fff;
    color: #fff;
    font-size: 24px;
    font-family: inherit;
    cursor: pointer;
    z-index: 5;
    transition: background 0.15s ease, transform 0.15s ease;
}

.car-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) skew(-10deg) scale(1.1);
}

.car-btn:active {
    transform: translateY(-50%) skew(-10deg) scale(0.95);
}

.car-prev { left: 24px; }
.car-next { right: 24px; }

.car-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 5;
}

.car-dot {
    width: 20px;
    height: 20px;
    background: #fff;
    background-clip: padding-box;
    border: 4px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.15s ease;
}

.car-dot:hover { transform: scale(1.2); }
.car-dot.active {
    background: #7cfc00;
    border-color: rgba(124, 252, 0, 0.25);
    box-shadow: 0 0 8px #7cfc00, 0 0 18px rgba(124, 252, 0, 0.6);
}

/* ---------- Quick-link card row (ported from the legacy homepage) ---------- */

.quick-cards {
    width: 100%;
    margin-top: 60px;
    color: #fff;
    text-align: center;
    font-family: 'Archivo Black', sans-serif;
}

/* Legacy card layout was authored against content-box; opt out of the
   home.css * { box-sizing: border-box } reset for everything in here. */
.quick-cards,
.quick-cards * { box-sizing: content-box; }

.quick-cards .cardbar       { background-color: rgba(0, 0, 0, 0.6); }
.quick-cards .cardbarHeader { background-color: rgba(0, 0, 0, 0.3); }

.quick-cards .cardContainer {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.quick-cards .card {
    display: inline-block;
    padding: 0;
    transition: transform .2s;
    transform: rotate(1deg);
    width: 256px;
    height: 384px;
    margin: 0 10px;
    background: rgba(0, 0, 0, 0.6);
    z-index: 0;
    opacity: 1;
    box-shadow: 5px 10px 20px 0 rgba(0, 0, 0, 0.5);
    vertical-align: top;
}

.quick-cards .cardWhiteBorder,
.quick-cards .cardYellowBorder {
    display: inline-block;
    margin: 10px;
    width: 236px;
    height: 364px;
    transform: rotate(-1deg);
}

.quick-cards .cardWhiteBorder  { background: #fff; }
.quick-cards .cardYellowBorder { background: yellow; }

.quick-cards .cardInner {
    overflow: hidden;
    color: #fff;
    display: inline-block;
    background: #000;
    margin: 10px;
    padding: 0 5px;
    width: 206px;
    height: 344px;
    transform: rotate(-0.5deg);
}

.quick-cards .cardImage {
    width: 100%;
    height: 212px;
    overflow: hidden;
}

.quick-cards .cardImage img {
    margin: -14px 0 0 0;
}

.quick-cards .cardTitle {
    width: 100%;
    height: 24px;
    font-size: 22px;
    vertical-align: middle;
}

.quick-cards .cardDesc {
    width: 96%;
    margin: auto;
    height: 104px;
    font-size: 17px;
    display: table-cell;
    vertical-align: middle;
}

.quick-cards .card:hover  { transform: rotate(-1deg) scale(1.2); }
.quick-cards .card:active { transform: rotate(1deg)  scale(0.95); }

/* Skewed banner (used on Card Index page for class section headers) */
.quick-cards .banner {
    position: relative;
    display: block;
    width: 100%;
    padding: 40px 0;
    color: #fff;
    text-align: center;
}
.quick-cards .banner::before {
    content: '';
    position: absolute;
    inset: 20px 0;
    background: #ff0000;
    transform: skew(-20deg);
    outline: 10px solid rgba(0, 0, 0, 0.2);
    outline-offset: -10px;
    z-index: -1;
}
.quick-cards .bannerTitle {
    width: 100%;
    font-size: 28px;
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.8);
}
.quick-cards .bannerSubtitle {
    width: 100%;
    font-size: 20px;
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.8);
}

/* Filter button row — pinned secondary header below the main one.
   Pages with this row should add the `has-subnav` class to <body> so the page
   content gets extra top padding to clear the fixed bar. */
.quick-cards .buttonRow {
    position: fixed;
    top: calc(var(--header-h) + 24px);
    left: 0;
    right: 0;
    z-index: 90;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 14px 24px;
    background: rgba(10, 10, 10, 0.95);
    background-clip: padding-box;
    border-top:    12px solid rgba(0, 0, 0, 0.5);
    border-bottom: 12px solid rgba(0, 0, 0, 0.5);
}

/* Inner wrapper that holds the links — lives in flex flow on wide screens,
   becomes a dropdown panel below the bar on narrow ones. */
.quick-cards .subnav-links {
    display: contents;
}

body.has-subnav { padding-top: calc(var(--header-h) + 180px); }

.quick-cards .buttonRow a { text-decoration: none; }
.quick-cards .buttonRow button {
    background-color: black;
    color: white;
    border: 4px solid white;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    font-family: 'Archivo Black', sans-serif;
    transform: skew(-10deg);
}
.quick-cards .buttonRow button:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: skew(-10deg) scale(1.1) rotate(-1deg);
}
.quick-cards .buttonRow button:active {
    transform: skew(-10deg) scale(0.95);
}

/* Hamburger toggle — declared with an element selector (button.subnav-toggle)
   so its specificity (0,2,1) matches .buttonRow button. The base .buttonRow
   button rule would otherwise win on the toggle and inflate it with the
   row-button padding/border. */
.quick-cards button.subnav-toggle {
    display: none;
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    width: auto;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    font-size: 18px;
    font-family: 'Archivo Black', sans-serif;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transform: skew(-10deg);
    transition: background-color 0.15s, transform 0.15s;
}
.quick-cards button.subnav-toggle:hover  { background: rgba(255, 255, 255, 0.1); transform: skew(-10deg) scale(1.05); }
.quick-cards button.subnav-toggle:active { transform: skew(-10deg) scale(0.95); }
.quick-cards button.subnav-toggle .subnav-toggle-label {
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Narrow viewports: collapse the subnav into a hamburger drawer. */
@media (max-width: 1700px) {
    .quick-cards .buttonRow {
        justify-content: flex-start;
        padding: 14px 20px;
    }
    .quick-cards button.subnav-toggle { display: inline-flex; }
    .quick-cards .subnav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(10, 10, 10, 0.98);
        background-clip: padding-box;
        border-bottom: 12px solid rgba(0, 0, 0, 0.5);
        padding: 12px 0;
    }
    .quick-cards .buttonRow.open .subnav-links {
        display: flex;
    }
    .quick-cards .subnav-links a {
        display: block;
        width: 100%;
        text-decoration: none;
    }
    .quick-cards .subnav-links button {
        width: 100%;
        transform: none;
        background-color: transparent;
        border: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: left;
        padding: 14px 24px;
        font-size: 16px;
    }
    .quick-cards .subnav-links button:hover  { transform: none; background-color: rgba(255, 255, 255, 0.05); }
    .quick-cards .subnav-links button:active { transform: none; }
}

/* Generic "Click to inspect" label, loading spinner support */
.legacy-prompt {
    margin: 16px 0;
    color: #fff;
    font-size: 18px;
}
.legacy-spinner {
    margin: 40px auto;
    text-align: center;
}

/* When the spinner lives inside the leaderboard's black bar, snug it up so
   the cardbar isn't padded out with empty black space around the loader. */
.quick-cards .cardbar > .legacy-spinner {
    margin: 0 auto;
    padding: 16px 0;
}
.legacy-spinner > div {
    width: 64px;
    height: 64px;
    border: 8px solid lightgray;
    border-top: 8px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Redirect pages: full-width banner across the middle of the viewport,
   matching the leaderboard popup banner style. */
.redirect-page {
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--header-h) - 220px);
}
.redirect-banner {
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    background-clip: padding-box;
    border-top:    20px solid rgba(0, 0, 0, 0.5);
    border-bottom: 20px solid rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: center;
    padding: 56px 24px;
}
.redirect-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(28px, 4vw, 44px);
    margin: 0 0 8px;
    color: #fff;
}
.redirect-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 12px;
}
.redirect-banner .legacy-spinner { margin: 24px auto 36px; }

/* Hide the inline inspect spans — they now feed the leaderboard popup below
   rather than rendering as a tooltip themselves. */
.quick-cards .card .inspect { display: none; }

/* Leaderboard popup: dim backdrop + full-width banner + 2x scaled card on top */
.leaderboard-popup {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    animation: leaderboard-popup-fade 0.2s ease-out;
}

.leaderboard-popup-banner {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 10, 10, 0.95);
    background-clip: padding-box;
    border-top:    20px solid rgba(0, 0, 0, 0.5);
    border-bottom: 20px solid rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 14px 8% 14px calc(25% + 240px);
    font-size: 18px;
    line-height: 1.5;
    text-align: left;
    z-index: 1;
    cursor: default;
    max-height: 76vh;
    overflow-y: auto;
}

.leaderboard-popup-card {
    position: absolute;
    left: 25%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    transform-origin: center center;
    z-index: 2;
    cursor: default;
}

.popup-run-info {
    margin: 0 0 6px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
}

.popup-player-message {
    margin: 0 0 6px;
    font-size: 17px;
    color: #fff;
    font-style: italic;
}

.popup-deck-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Match the homepage carousel arrow style (small squares) and add the same
   -10deg skew as the rest of the button family. */
.popup-deck-nav {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.4);
    border: 3px solid #fff;
    color: #fff;
    font-size: 24px;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    transform: skew(-10deg);
    transition: background 0.15s ease, transform 0.15s ease;
}
.popup-deck-nav:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: skew(-10deg) scale(1.1);
}
.popup-deck-nav:active {
    transform: skew(-10deg) scale(0.95);
}
.popup-deck-nav:disabled {
    opacity: 0.3;
    cursor: default;
    transform: skew(-10deg);
}

.popup-deck-grid {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 0;
    scrollbar-width: none;       /* Firefox */
}
.popup-deck-grid::-webkit-scrollbar { display: none; } /* WebKit */

.popup-deck-card {
    position: relative;
    width: 350px;
    flex: 0 0 350px;
    /* Cards' sprite art has built-in transparent padding — pull each card
       back so they visually overlap and feel tightly packed. */
    margin-right: -100px;
    /* Anchor styling */
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.popup-deck-card:last-child { margin-right: 0; }

.popup-deck-card:hover {
    transform: rotate(-1deg) scale(1.15);
    z-index: 20;
}
.popup-deck-card:active {
    transform: rotate(1deg) scale(1.05);
}

/* Fallback shown when a card sprite is missing: keep the same slot footprint
   as a real card, but render only the name text on a transparent background. */
.popup-deck-card.is-missing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    font-family: 'Archivo Black', sans-serif;
    font-size: 16px;
    text-align: center;
    padding: 12px;
    min-height: 350px;
    white-space: normal;
    word-break: break-word;
}

.popup-deck-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
}

.popup-deck-card .qty {
    display: block;
    width: max-content;
    /* Negative top margin pulls the badge up into the sprite's built-in
       bottom padding so it sits close to the visible card art. */
    margin: -75px auto 0;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 14px;
    font-family: 'Archivo Black', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

/* The cloned card needs to live inside a .quick-cards scope so the legacy
   card styles apply, but the section's own width/margin shouldn't push the
   popup card around. */
.leaderboard-popup-card .quick-cards {
    width: auto;
    margin: 0;
    text-align: center;
    display: inline-block;
}

.leaderboard-popup-card .card {
    /* freeze the entrance/hover animations on the cloned card */
    animation: none !important;
    transition: none !important;
}

.leaderboard-popup-card .card:hover {
    transform: rotate(1deg) !important;
}

@keyframes leaderboard-popup-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Narrow viewports: stack the card above the banner */
@media (max-width: 900px) {
    .leaderboard-popup-banner {
        padding: 60px 6% 60px 6%;
        top: 60%;
        max-height: 50vh;
    }
    .leaderboard-popup-card {
        left: 50%;
        top: 25%;
        transform: translate(-50%, -50%) scale(1.4);
    }
}

/* ---------- Page body (below carousel) ---------- */

.page-body {
    max-width: 960px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.content-section {
    position: relative;
    background: rgba(10, 10, 10, 0.95);
    background-clip: padding-box;
    border: 20px solid rgba(0, 0, 0, 0.5);
    padding: 36px 40px;
    margin-bottom: 32px;
    color: var(--fg);
    transition: transform 0.2s ease;
}

.content-section:nth-of-type(odd)  { transform: translateX(-80px); }
.content-section:nth-of-type(even) { transform: translateX(80px); }

/* Stack sections so the higher ones on the page sit above the lower ones —
   keeps floating cards from a later section from drawing over cards above. */
.content-section:nth-of-type(1) { z-index: 7; }
.content-section:nth-of-type(2) { z-index: 6; }
.content-section:nth-of-type(3) { z-index: 5; }
.content-section:nth-of-type(4) { z-index: 4; }
.content-section:nth-of-type(5) { z-index: 3; }
.content-section:nth-of-type(6) { z-index: 2; }
.content-section:nth-of-type(7) { z-index: 1; }

/* Decorative card hovering off the empty side of each panel — uses the
   pre-rendered art from card_images/. */
.deco-card {
    position: absolute;
    width: 420px;
    /* Source card art is 512×576; declare the ratio so the browser reserves
       the right height before the image loads. Otherwise translateY(-50%)
       computes against 0 height on first paint and the card sits visibly low
       until the image arrives. */
    aspect-ratio: 512 / 576;
    height: auto;
    pointer-events: none;
    z-index: -1;
    filter: drop-shadow(10px 18px 24px rgba(0, 0, 0, 0.6));
    --rot: 0deg;
    animation: deco-float 9s ease-in-out infinite;
    will-change: transform;
}

/* Single card: centered vertically */
.deco-card:only-of-type { top: 50%; }

/* Two cards: stack one near the top, one near the bottom, and offset their
   animation phase so they bob out of sync */
.deco-card:first-of-type:not(:only-of-type) { top: 26%; animation-delay: -1.5s; }
.deco-card:last-of-type:not(:only-of-type)  { top: 74%; animation-delay: -5s; }

/* Odd sections shift LEFT, so the empty space is on the RIGHT */
.content-section:nth-of-type(odd) .deco-card  { right: -440px; --rot: 6deg; }
/* Even sections shift RIGHT, so the empty space is on the LEFT */
.content-section:nth-of-type(even) .deco-card { left: -440px;  --rot: -6deg; }

/* When there are two cards, rotate the second the opposite direction */
.content-section:nth-of-type(odd) .deco-card:last-of-type:not(:only-of-type)  { --rot: -6deg; }
.content-section:nth-of-type(even) .deco-card:last-of-type:not(:only-of-type) { --rot: 6deg; }

@keyframes deco-float {
    0%, 100% { transform: translateY(calc(-50% - 7px)) rotate(var(--rot)); }
    25%      { transform: translateY(-50%)             rotate(calc(var(--rot) + 2deg)); }
    50%      { transform: translateY(calc(-50% + 7px)) rotate(var(--rot)); }
    75%      { transform: translateY(-50%)             rotate(calc(var(--rot) - 2deg)); }
}

.section-clip {
    display: block;
    height: auto;
    width: calc(100% + 80px);
    margin: -36px -40px 48px;
    background: #000;
}

.section-title {
    margin: 0 0 20px;
    font-size: 32px;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-text {
    font-family: 'Archivo Black', sans-serif;
    font-weight: normal;
    font-size: 17px;
    line-height: 1.6;
    color: var(--fg-dim);
    margin: 0 0 16px;
}

.section-text:last-child { margin-bottom: 0; }

.feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 17px;
    color: var(--fg-dim);
}

.feature-list li:last-child { border-bottom: 0; }
.feature-list strong { color: #fff; margin-right: 8px; }

/* Multi-column song list used on the credits page */
.credits-songs {
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
    columns: 3;
    column-gap: 30px;
}
.credits-songs li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    break-inside: avoid;
}
.credits-songs li:last-child { border-bottom: 0; }

@media (max-width: 820px) {
    .credits-songs { columns: 2; }
}
@media (max-width: 520px) {
    .credits-songs { columns: 1; }
}

.site-footer {
    text-align: center;
    color: #fff;
    font-size: 17px;
    padding: 24px 0 0;
}

.credits-cta {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 28px;
}

/* On the credits page itself, social-link rows align to the left of each
   artist's section so they read with the body copy above. */
body.credits-page .credits-cta { justify-content: flex-start; }

.credits-btn {
    display: inline-block;
    background-color: #000;
    color: #fff;
    border: 4px solid #fff;
    padding: 10px 22px;
    font-size: 18px;
    font-family: 'Archivo Black', sans-serif;
    cursor: pointer;
    transform: skew(-10deg);
    transition: transform 0.2s, background-color 0.2s;
    text-decoration: none;
}

.credits-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: skew(-10deg) scale(1.1) rotate(-1deg);
}

.credits-btn:active {
    transform: skew(-10deg) scale(0.95);
}

/* ---------- Responsive ---------- */

@media (max-width: 1700px) {
    .site-nav { display: none; position: absolute; top: var(--header-h); right: 0; left: 0; flex-direction: column; background: rgba(10,10,10,0.98); background-clip: padding-box; padding: 12px 0; gap: 0; border-bottom: 12px solid rgba(0,0,0,0.5); }
    .site-nav.open { display: flex; }
    .site-nav a { width: 100%; padding: 14px 24px; transform: none; border: 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .site-nav a span { transform: none; }
    .site-nav a:hover { transform: none; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-nav-home { display: block; }
    .site-header { padding: 0 16px; }
    .slide-content { padding: 0 6% 16vh; }
    .car-btn { width: 44px; height: 44px; font-size: 18px; }
    .car-prev { left: 10px; }
    .car-next { right: 10px; }
    .trailer-split { flex-direction: column; align-items: stretch; padding: 80px 6% 90px; gap: 20px; }
    .trailer-text { flex: 0 0 auto; align-self: auto; justify-content: flex-start; }
    .trailer-video { flex: 1 1 auto; }
    .content-section:nth-of-type(odd),
    .content-section:nth-of-type(even) { transform: none; }
    .deco-card { display: none; }
}
