/* Shared layout for commercial & music video project pages (pages/content/...) */

body.content-detail-page {
    position: relative;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: none;
    box-sizing: border-box;
    background-color: #070707;
    color: rgba(255, 255, 255, 0.92);
    background-image: linear-gradient(
        180deg,
        #050505 0%,
        #0a0a0c 42%,
        #070707 100%
    );
}

body.content-detail-page *,
body.content-detail-page *::before,
body.content-detail-page *::after {
    box-sizing: border-box;
}

.content-detail-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    max-width: 90rem;
    margin: 0 auto;
    padding: 0.65rem clamp(1rem, 3vw, 1.5rem) 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.content-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #f5e6b8;
    text-decoration: none;
    letter-spacing: 0.05em;
}

.content-detail-back:hover {
    color: #ffff8f;
}

.content-detail-fullscreen {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(8, 8, 8, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.content-detail-fullscreen:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(20, 20, 20, 0.75);
    color: #fff;
}

.content-detail-fullscreen:focus-visible {
    outline: 2px solid rgba(255, 248, 143, 0.85);
    outline-offset: 3px;
}

.content-detail-fullscreen svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.content-detail-scroll-hint {
    display: none;
}

.content-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.88fr);
    gap: clamp(1.25rem, 3vw, 2.25rem);
    align-items: start;
    max-width: 90rem;
    margin: 0 auto;
    padding: 1.35rem clamp(1rem, 3vw, 1.5rem) 3.5rem;
}

.content-detail-video-wrap {
    width: 100%;
    min-width: 0;
}

.content-detail-video-frame {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    aspect-ratio: 16 / 9;
    background: #121214;
}

.content-detail-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.content-detail-sidebar {
    min-width: 0;
    padding: 0.15rem 0 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: clamp(1rem, 2.5vw, 1.75rem);
}

.content-detail-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.85rem, 4.5vw, 2.65rem);
    letter-spacing: 0.1em;
    margin: 0 0 0.4rem;
    color: #fff;
    font-weight: 400;
    line-height: 1.12;
}

.content-detail-brand {
    margin: 0 0 1.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
}

.content-detail-crew-scroll {
    max-height: min(52vh, 28rem);
    overflow-y: auto;
    padding-right: 0.35rem;
    margin-right: -0.15rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.content-detail-crew-scroll::-webkit-scrollbar {
    width: 6px;
}

.content-detail-crew-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
}

.content-detail-crew-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.content-detail-crew-scroll .crew-list {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.72;
    color: rgba(255, 255, 255, 0.86);
}

.content-detail-crew-scroll .crew-list strong {
    color: rgba(255, 255, 255, 0.96);
    font-weight: 600;
}

.content-detail-crew-scroll .crew-list .underline {
    text-decoration: underline;
    text-decoration-color: rgba(245, 230, 184, 0.5);
    text-underline-offset: 3px;
}

@media (max-width: 960px) {
    /* style.css locks html with overflow:hidden for content-detail; that clips the page when
       crew is full-height below the video. Allow document scroll so the full crew is reachable. */
    html:has(body.content-detail-page) {
        height: auto;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        scroll-behavior: smooth;
    }

    body.content-detail-page {
        overflow-x: hidden;
        overflow-y: visible;
    }

    .content-detail-layout {
        grid-template-columns: 1fr;
    }

    .content-detail-sidebar {
        border-left: none;
        padding-left: 0;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .content-detail-crew-scroll {
        max-height: none;
        overflow-y: visible;
    }

    .content-detail-scroll-hint {
        display: block;
        text-align: center;
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
        font-size: 0.6875rem;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.42);
        margin: 0.65rem 0 0;
        padding: 0 0.75rem;
    }

    .content-detail-scroll-hint a {
        color: inherit;
        text-decoration: none;
        border-bottom: 1px solid rgba(245, 230, 184, 0.35);
        padding-bottom: 0.1rem;
    }

    .content-detail-scroll-hint a:hover,
    .content-detail-scroll-hint a:focus-visible {
        color: #f5e6b8;
        border-bottom-color: rgba(245, 230, 184, 0.65);
    }

    .content-detail-scroll-hint a:focus-visible {
        outline: 2px solid rgba(255, 248, 143, 0.75);
        outline-offset: 3px;
    }

    #crew-credits {
        scroll-margin-top: calc(var(--site-header-offset, 6.75rem) + 0.75rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .content-detail-fullscreen {
        transition: none;
    }

    html:has(body.content-detail-page) {
        scroll-behavior: auto;
    }
}
