/* ═══════════════════════════════════════════════════════════════════════════════
   EPISODE ONE — ARCHIVE / FILING CABINET
   archive.css
   ═══════════════════════════════════════════════════════════════════════════════ */

.cabinet-wrap {
    position: relative;
    padding: 0;
    background: #fff;
    min-height: 100vh;
}

.cabinet-glow {
    display: none;
}

/* ── Cabinet shell ───────────────────────────────────────────────────────────── */
.cabinet {
    position: relative;
    background: #fff;
    border: none;
    border-radius: 0;
    min-height: 100vh;
    box-shadow: none;
}

.cabinet::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        180deg,
        rgba(0,0,0,0.008) 0px,
        rgba(0,0,0,0.008) 1px,
        transparent 1px, transparent 5px
    );
    pointer-events: none;
    z-index: 10;
}

/* ── Cabinet top strip ───────────────────────────────────────────────────────── */
.cabinet-top {
    background: linear-gradient(180deg, #2e2e2e 0%, #242424 100%);
    border-bottom: 1px solid #111;
    padding: 12px 40px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.cabinet-rivets {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rivet {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #888, #444);
    border: 1px solid #666;
    flex-shrink: 0;
}

.cabinet-brand {
    flex: 1; text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 11px; letter-spacing: 4px;
    text-transform: uppercase; color: #888;
}

/* ── Drawer handle ───────────────────────────────────────────────────────────── */
.cabinet-handle-row {
    background: linear-gradient(180deg, #2a2a2a 0%, #222 100%);
    border-bottom: 3px solid #D4AF37;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.handle {
    flex: 1; height: 10px;
    background: linear-gradient(180deg, #555 0%, #333 50%, #444 100%);
    border-radius: 5px; border: 1px solid #666;
    position: relative; max-width: 240px;
}

.handle::after {
    content: '';
    position: absolute;
    top: 2px; left: 10px; right: 10px; height: 2px;
    background: rgba(255,255,255,0.15);
    border-radius: 1px;
}

.cabinet-title {
    font-family: 'Courier New', monospace;
    font-size: 16px; letter-spacing: 6px;
    text-transform: uppercase; color: #D4AF37;
    text-shadow: 0 0 24px rgba(212,175,55,0.3);
    flex: 1; text-align: center;
}

/* ── Folder tabs ─────────────────────────────────────────────────────────────── */
.cabinet-tabs-row {
    display: flex;
    padding: 0 32px;
    background: #f0f0f0;
    border-bottom: 2px solid #1a1a1a;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    position: relative;
    align-items: flex-end;
}

.cabinet-tabs-row::-webkit-scrollbar { display: none; }

.tab {
    padding: 14px 24px 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px; letter-spacing: 2px;
    text-transform: uppercase; color: #777;
    cursor: pointer;
    border-top: 2px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    white-space: nowrap;
    background: #e0e0e0;
    border-radius: 4px 4px 0 0;
    margin-top: 12px;
    transition: color 0.15s, background 0.15s, box-shadow 0.15s;
    position: relative;
    user-select: none;
    box-shadow:
        2px 0 4px rgba(0,0,0,0.1),
        inset 0 -2px 4px rgba(0,0,0,0.06);
}

.tab:hover { color: #333; background: #e8e8e8; }

.tab.active {
    color: #1a1a1a;
    background: #fff;
    border-top: 2px solid #D4AF37;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    box-shadow:
        0 -2px 8px rgba(0,0,0,0.08),
        2px 0 4px rgba(0,0,0,0.06);
    z-index: 2;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0; height: 2px;
    background: #fff;
    z-index: 3;
}

/* ── Cabinet body ────────────────────────────────────────────────────────────── */
.cabinet-body {
    position: relative;
    min-height: calc(100vh - 160px);
    perspective: 900px;
    perspective-origin: 50% -30%;
    overflow: hidden;
}

/* ── Stacked depth layers ────────────────────────────────────────────────────── */
.stack-layer {
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 100%;
    pointer-events: none;
}

.stack-layer-1 {
    background: #f5f5f5;
    transform: translateY(10px);
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
    z-index: 1;
}

.stack-layer-2 {
    background: #f8f8f8;
    transform: translateY(6px);
    border-top: 1px solid #e4e4e4;
    z-index: 2;
}

.stack-layer-3 {
    background: #fafafa;
    transform: translateY(3px);
    border-top: 1px solid #e8e8e8;
    z-index: 3;
}

/* ── Gold edge accent ────────────────────────────────────────────────────────── */
.folder-edge {
    position: absolute;
    left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, #D4AF37 0%, #B8960C 100%);
    z-index: 6;
}

/* ── Folder main ─────────────────────────────────────────────────────────────── */
.folder-main {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 5;
    background: #fff;
    display: flex;
    min-height: calc(100vh - 160px);
    transform-origin: top center;
    animation: folderTowardScreen 0.55s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.folder-hidden {
    display: none !important;
}

@keyframes folderTowardScreen {
    0% {
        opacity: 0;
        transform: rotateX(40deg) translateZ(-60px) translateY(-20px) scale(0.94);
    }
    40% {
        opacity: 1;
        transform: rotateX(8deg) translateZ(10px) translateY(-4px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: rotateX(0deg) translateZ(0) translateY(0) scale(1);
    }
}

/* ── Folder layout ───────────────────────────────────────────────────────────── */
.folder-left {
    flex: 0 0 55%;
    padding: 64px 56px 64px 72px;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.folder-right {
    flex: 1;
    padding: 48px 40px;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.folder-right--text {
    justify-content: center;
    align-items: flex-start;
    padding: 64px 56px;
    background: #f5f5f5;
}

/* ── Folder typography ───────────────────────────────────────────────────────── */
.folder-eyebrow {
    font-family: 'Courier New', monospace;
    font-size: 10px; letter-spacing: 4px;
    text-transform: uppercase; color: #B8960C;
    margin-bottom: 14px;
}

.folder-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.6rem; font-weight: 300;
    color: #1a1a1a; line-height: 1.1;
    margin-bottom: 20px;
}

.folder-desc {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 15px; font-weight: 300;
    color: #666; line-height: 1.9;
    flex: 1; margin-bottom: 36px;
}

.folder-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem; font-weight: 300;
    font-style: italic; color: #888;
    line-height: 1.7;
    border-left: 2px solid #D4AF37;
    padding-left: 24px;
}

/* ── Folder meta ─────────────────────────────────────────────────────────────── */
.folder-meta {
    display: flex; gap: 32px;
    margin-bottom: 32px;
    padding-top: 24px;
    border-top: 1px solid #e8e8e8;
}

.folder-meta-item {
    display: flex; flex-direction: column; gap: 6px;
}

.folder-meta-label {
    font-family: 'Courier New', monospace;
    font-size: 9px; letter-spacing: 2px;
    text-transform: uppercase; color: #aaa;
}

.folder-meta-value {
    font-family: 'Courier New', monospace;
    font-size: 15px; color: #333;
}

/* ── Folder action button ────────────────────────────────────────────────────── */
.folder-action {
    font-family: 'Courier New', monospace;
    font-size: 10px; letter-spacing: 2px;
    text-transform: uppercase; color: #1a1a1a;
    border: 1px solid rgba(26,26,26,0.2);
    padding: 14px 32px;
    display: inline-block; cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    align-self: flex-start;
    background: transparent;
}

.folder-action:hover {
    background: rgba(0,0,0,0.04);
    border-color: #1a1a1a;
    letter-spacing: 3px;
    text-decoration: none;
    color: #1a1a1a;
}

/* ── Poster stack ────────────────────────────────────────────────────────────── */
.poster-stack {
    position: relative;
    width: 240px; height: 360px;
    margin: 8px auto;
}

.poster-card {
    position: absolute;
    width: 224px;
    border: 1px solid #ddd;
    border-radius: 1px;
    background: #e8e8e8;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-size: 10px; color: #999;
    text-align: center; padding: 4px;
    transition: transform 0.3s ease;
    text-decoration: none;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

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

.poster-card:nth-child(1) { height: 336px; top: 0; left: 16px; z-index: 5; background: #efefef; border-color: #ddd; }
.poster-card:nth-child(2) { height: 328px; top: 6px; left: 10px; z-index: 4; transform: rotate(-2deg); background: #e8e8e8; }
.poster-card:nth-child(3) { height: 320px; top: 12px; left: 5px; z-index: 3; transform: rotate(-4deg); background: #e2e2e2; }
.poster-card:nth-child(4) { height: 312px; top: 18px; left: 0; z-index: 2; transform: rotate(-6deg); background: #dcdcdc; }

.poster-stack:hover .poster-card:nth-child(2) { transform: rotate(-6deg) translateX(-14px); }
.poster-stack:hover .poster-card:nth-child(3) { transform: rotate(-11deg) translateX(-24px); }
.poster-stack:hover .poster-card:nth-child(4) { transform: rotate(-16deg) translateX(-34px); }

/* ── Default poster card ─────────────────────────────────────────────────────── */
.poster-card--default {
    border-color: #D4AF37 !important;
    background: #1a1a1a !important;
}

.poster-card-default {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px;
    background: linear-gradient(
        135deg,
        #1a1a1a 0%,
        #2a2218 50%,
        #1a1a1a 100%
    );
    position: relative;
    overflow: hidden;
}

/* Gold shimmer top */
.poster-card-default::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
}

/* Gold shimmer bottom */
.poster-card-default::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
}

.poster-card-default-eyebrow {
    font-family: 'Courier New', monospace;
    font-size: 8px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #D4AF37;
    opacity: 0.9;
}

.poster-card-default-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 300;
    color: #f0ece4;
    text-align: center;
    line-height: 1.3;
}

.poster-card-default-sub {
    font-family: 'Courier New', monospace;
    font-size: 7px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #555;
}

/* Gold corner accents on default card */
.poster-card--default::before {
    content: '';
    position: absolute;
    top: 8px; left: 8px;
    width: 14px; height: 14px;
    border-top: 1px solid #D4AF37;
    border-left: 1px solid #D4AF37;
    z-index: 10;
}

.poster-card--default::after {
    content: '';
    position: absolute;
    bottom: 8px; right: 8px;
    width: 14px; height: 14px;
    border-bottom: 1px solid #D4AF37;
    border-right: 1px solid #D4AF37;
    z-index: 10;
}

.folder-count {
    font-family: 'Courier New', monospace;
    font-size: 10px; letter-spacing: 2px;
    color: #bbb; text-align: center;
}

/* ── Cabinet footer ──────────────────────────────────────────────────────────── */
.cabinet-footer {
    background: #1a1a1a;
    border-top: 3px solid #D4AF37;
    padding: 12px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cabinet-footer-text {
    font-family: 'Courier New', monospace;
    font-size: 9px; letter-spacing: 2px;
    text-transform: uppercase; color: #666;
}

/* ── Join the Room ───────────────────────────────────────────────────────────── */
.archive-join {
    padding: 80px 72px;
    text-align: center;
    border-top: 1px solid #e8e8e8;
    background: #fff;
}

.archive-join-eyebrow {
    font-family: 'Courier New', monospace;
    font-size: 9px; letter-spacing: 3px;
    text-transform: uppercase; color: #B8960C;
    margin-bottom: 14px;
}

.archive-join-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem; font-weight: 300;
    color: #1a1a1a; line-height: 1.1;
    margin-bottom: 16px;
}

.archive-join-desc {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px; font-weight: 300;
    color: #666; line-height: 1.8;
    max-width: 400px;
    margin: 0 auto 32px;
}

.archive-join-btn {
    font-family: 'Courier New', monospace;
    font-size: 10px; letter-spacing: 3px;
    text-transform: uppercase;
    padding: 14px 40px;
    background: #1a1a1a; color: #D4AF37;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s, letter-spacing 0.2s;
}

.archive-join-btn:hover {
    background: #2a2a2a;
    color: #D4AF37;
    letter-spacing: 4px;
    text-decoration: none;
}

/* ── Mobile ──────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .folder-main {
        flex-direction: column;
        position: relative;
    }

    .folder-left {
        padding: 32px 28px;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
        flex: none;
    }

    .folder-right {
        padding: 32px 28px;
        flex: none;
    }

    .folder-title { font-size: 2.2rem; }

    .cabinet-tabs-row { padding: 0 16px; }

    .tab { padding: 10px 16px 8px; font-size: 9px; }

    .poster-stack { width: 160px; height: 240px; }
    .poster-card { width: 148px; }
    .poster-card:nth-child(1) { height: 222px; }
    .poster-card:nth-child(2) { height: 216px; }
    .poster-card:nth-child(3) { height: 210px; }
    .poster-card:nth-child(4) { height: 204px; }

    .archive-join { padding: 48px 24px; }
    .archive-join-title { font-size: 2rem; }
}