/* ========================
   PLAY PAGE STYLES
   Sidebar + two-column shell live in assets/components/sidebar/ and
   assets/css/app-shell.css (shared with Home/About/Notes).
======================== */

:root {
    --divider-light: #C3C6D3;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Skip navigation ── */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 9999;
    background: #0a1833;
    color: #fff;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    border-radius: 4px;
}
.skip-link:focus { left: 8px; }

body {
    font-family: 'Satoshi Variable', 'Satoshi', sans-serif;
    background: #ffffff;
}

/* ========================
   PLAY HERO
======================== */
.play-hero {
    /* Horizontal centering is handled by the shared .app-shell__main column
       (assets/css/app-shell.css) above 1140px; below that, the
       @media (max-width: 1140px) override further down takes over. */
    padding: 0 0 72px;
}

.play-tagline {
    font-family: 'Satoshi Variable', 'Satoshi', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.3;
    color: #0a1833;
    width: 100%;
}

/* ========================
   FILTER TABS
======================== */
.play-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.play-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 24px;
    font-family: 'Satoshi', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #0a1833;
    background: none;
    border: 1px solid var(--divider-light);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.play-filter-btn.is-active {
    background: #000000;
    color: #fcfcfd;
    border-color: #000000;
}

.play-filter-btn:hover:not(.is-active) {
    background: rgba(0, 0, 0, 0.05);
}

/* ========================
   ILLUSTRATION GRID
======================== */
.play-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
    padding: 0 0 120px;
}

.play-card {
    position: relative;
    aspect-ratio: 393 / 492;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.play-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.play-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.play-card:hover img { transform: scale(1.05); }

/* ── Card carousel dots ── */
.play-card__dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 2;
    pointer-events: none;
}

.play-card__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: background 0.25s, transform 0.25s;
    flex-shrink: 0;
}

.play-card__dot.is-active {
    background: #ffffff;
    transform: scale(1.3);
}

/* Grey-tone dots for cards with a white/light background image, where white dots are invisible */
.play-card--light .play-card__dot {
    background: rgba(10,24,51,0.25);
}

.play-card--light .play-card__dot.is-active {
    background: rgba(10,24,51,0.55);
}

/* ========================
   LOGO DESIGN GRID
======================== */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 0 0 120px;
}

.logo-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #E0E2EA;
    margin-right: -1px;
    margin-bottom: -1px;
}

/* Mono image — default */
.logo-cell__mono,
.logo-cell__color {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.logo-cell__mono img,
.logo-cell__color img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Color image — hidden until hover */
.logo-cell__color {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo-cell:hover .logo-cell__color {
    opacity: 1;
}

/* No color version — keep mono on hover */
.logo-cell--mono-only:hover .logo-cell__color { opacity: 0; }

/* Reveal animation — same as play cards */
.logo-cell {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.logo-cell.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================
   SECTION VISIBILITY
======================== */
.play-section { display: block; }
.play-section.play-grid { display: grid; }   /* Override block for illustration grid */
.play-section.logo-grid { display: grid; }   /* Override block for logo grid */
.play-section.is-hidden { display: none; }

/* Card backgrounds */
.play-card { background: #f5f5f5; }

/* ========================
   T-SHIRT DESIGN (placeholder)
======================== */
#section-tshirts {
    padding: 80px 0 120px;
    text-align: center;
    color: rgba(10,24,51,0.3);
    font-size: 16px;
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 1140px) {
    .play-hero { padding: 0 0 56px; }
    .play-grid { padding: 0 0 80px; }
    .logo-grid { padding: 0 0 80px; }
    .site-footer { padding-left: 60px; padding-right: 60px; }
}

@media (max-width: 768px) {
    .play-hero { padding: 0 0 40px; }
    .play-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 0 0 64px;
    }
    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 0 64px;
    }
}

@media (max-width: 480px) {
    .play-grid { grid-template-columns: 1fr; }
    .logo-grid { grid-template-columns: 1fr; }
}

/* Footer styles → footer.css (loaded via footer-loader.js) */

/* ════════════════════════════════
   PLAY LIGHTBOX
   ════════════════════════════════ */
#play-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(60px) saturate(0.4);
    -webkit-backdrop-filter: blur(60px) saturate(0.4);
    align-items: center;
    justify-content: center;
}
#play-lightbox.open { display: flex; }

/* Close */
.plb-close {
    position: fixed;
    top: 28px;
    right: 32px;
    width: 40px;
    height: 40px;
    background: rgba(10,24,51,0.06);
    border: none;
    border-radius: 4px;
    color: rgba(10,24,51,0.5);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 10;
}
.plb-close:hover { background: rgba(10,24,51,0.12); color: rgba(10,24,51,0.9); }

/* Prev / Next — on sides, never over image */
.plb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(10,24,51,0.05);
    border: none;
    border-radius: 4px;
    color: rgba(10,24,51,0.4);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 10;
}
.plb-nav:hover { background: rgba(10,24,51,0.1); color: rgba(10,24,51,0.85); }
.plb-prev { left: 20px; }
.plb-next { right: 20px; }
.plb-nav.hidden { opacity: 0; pointer-events: none; }

/* Centre content */
.plb-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: calc(100vw - 160px);
    max-height: 100vh;
    padding: 80px 0 48px;
}

/* Image */
.plb-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: transparent;
    padding: 0;
    position: relative;
    z-index: 0;
}
.plb-img-wrap img {
    max-height: 65vh;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: opacity 0.25s ease, transform 0.25s ease;
    position: relative;
    z-index: 1;
}
.plb-img-wrap img.loading {
    opacity: 0;
    transform: scale(0.97);
}

/* Stack effect — ghost cards behind main image */
.plb-img-wrap.plb-stacked::before,
.plb-img-wrap.plb-stacked::after {
    content: '';
    position: absolute;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    z-index: 0;
}
.plb-img-wrap.plb-stacked::before {
    inset: 16px;
    transform: rotate(3deg) translate(10px, 6px);
    z-index: -1;
}
.plb-img-wrap.plb-stacked::after {
    inset: 16px;
    transform: rotate(-2.5deg) translate(-8px, 10px);
    z-index: -2;
}

@keyframes stackPop {
    0%   { transform: rotate(3deg) translate(10px, 6px) scale(1); }
    40%  { transform: rotate(5deg) translate(16px, 10px) scale(1.015); }
    100% { transform: rotate(3deg) translate(10px, 6px) scale(1); }
}
.plb-img-wrap.plb-stack-pop::before {
    animation: stackPop 0.3s ease-out forwards;
}

/* Caption — museum placard style */
.plb-caption {
    margin-top: 28px;
    text-align: center;
    max-width: 520px;
}
.plb-title {
    font-family: 'Satoshi Variable', 'Satoshi', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(10,24,51,0.5);
    margin-bottom: 6px;
}
.plb-desc {
    font-family: 'Satoshi Variable', 'Satoshi', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(10,24,51,0.35);
}

/* Carousel dots */
.plb-dots {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    align-items: center;
}
.plb-dot {
    width: 5px;
    height: 5px;
    background: rgba(10,24,51,0.2);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.plb-dot.active {
    background: rgba(10,24,51,0.7);
    transform: scale(1.3);
}

@media (max-width: 768px) {
    .plb-inner { max-width: calc(100vw - 80px); padding: 64px 0 40px; }
    .plb-prev { left: 8px; }
    .plb-next { right: 8px; }
    .plb-img-wrap img { max-height: 55vh; }
}

/* ========================
   DARK MODE
======================== */
[data-theme="dark"] body { background: #0f131b; }
[data-theme="dark"] .play-tagline { color: #ffffff; }
[data-theme="dark"] .play-filter-btn { color: #ffffff; border-color: #4B5563; }
[data-theme="dark"] .play-filter-btn.is-active { background: #ffffff; color: #0f131b; border-color: #ffffff; }
[data-theme="dark"] .play-filter-btn:hover:not(.is-active) { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .play-card { background: #1f2430; }
[data-theme="dark"] .logo-cell { background: #1f2430; border-color: #4B5563; }

[data-theme="dark"] #play-lightbox { background: rgba(15,19,27,0.75); }
[data-theme="dark"] .plb-close { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); }
[data-theme="dark"] .plb-close:hover { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.9); }
[data-theme="dark"] .plb-nav { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.4); }
[data-theme="dark"] .plb-nav:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); }
[data-theme="dark"] .plb-img-wrap.plb-stacked::before,
[data-theme="dark"] .plb-img-wrap.plb-stacked::after { background: #1f2430; }
[data-theme="dark"] .plb-title { color: rgba(255,255,255,0.5); }
[data-theme="dark"] .plb-desc { color: rgba(255,255,255,0.35); }
[data-theme="dark"] .plb-dot { background: rgba(255,255,255,0.2); }
[data-theme="dark"] .plb-dot.active { background: rgba(255,255,255,0.7); }

/* ── Focus-visible states ── */
.play-filter-btn:focus-visible,
.plb-close:focus-visible,
.plb-nav:focus-visible,
.plb-dot:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
