/* ═══════════════════════════════════════════════════════════════════════════
   world-scream.css — SCENE 05 · the film before the first kill

   A black room, one still, one red rule, and a case file you have to open
   yourself. Restraint is the horror device: no gore, no jump scares, and no
   looping flicker.
   ═══════════════════════════════════════════════════════════════════════════ */

.world--scream {
    position: relative;
    min-height: 100svh;
    background: oklch(5% 0.004 20);
    color: var(--c-scream-bone);
}

/* ── the room ──────────────────────────────────────────────────────────── */
.sc__room { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.sc__backdrop { position: absolute; inset: -4%; display: block; }
.sc__backdrop img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.42) saturate(0.35) blur(3px);
    opacity: 0.55;
    scale: 1.04;
}
.sc__haze {
    position: absolute; inset: 0;
    background:
        radial-gradient(62% 48% at 62% 42%, oklch(30% 0.02 30 / 0.35) 0%, transparent 70%),
        linear-gradient(180deg, oklch(5% 0.004 20 / 0.92) 0%, oklch(5% 0.004 20 / 0.55) 42%, oklch(5% 0.004 20 / 0.96) 100%);
}
.sc__room::after {
    content: ''; position: absolute; inset: 0;
    background-image: var(--noise);
    opacity: 0.09;
    mix-blend-mode: screen;
}
.sc__bars {
    position: absolute; left: 0; right: 0; height: 34px;
    background: oklch(3% 0.002 20);
    opacity: 0.9;
}
.sc__bars--top { top: 0; }
.sc__bars--bottom { bottom: 0; }

/* ── the world's chrome: a slate ───────────────────────────────────────── */
.world--scream .scene-bar {
    border-bottom: 1px solid oklch(45% 0.17 22 / 0.55);
    background: oklch(5% 0.004 20 / 0.7);
    backdrop-filter: blur(6px);
}
.world--scream .scene-bar__id { color: oklch(58% 0.008 60); }
.world--scream .tool { color: oklch(70% 0.006 60); }
.world--scream .tool:hover { color: var(--c-scream-bone); border-color: oklch(45% 0.17 22 / 0.7); }
.world--scream .tool[data-on='true'] { color: oklch(56% 0.19 22); }

/* ── stage ─────────────────────────────────────────────────────────────── */
.sc__stage {
    position: relative; z-index: 10;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: clamp(var(--space-6), 5vh, var(--space-12)) var(--page-gutter) var(--space-12);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
    gap: clamp(var(--space-6), 4vw, var(--space-10));
    align-items: start;
}

.sc__head { grid-column: 1 / -1; }
.sc__id {
    font-family: var(--font-mono); font-size: var(--text-2xs);
    letter-spacing: var(--tracking-caps); text-transform: uppercase;
    color: oklch(62% 0.008 60);
}
.sc__title {
    margin: var(--space-2) 0 var(--space-2);
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: clamp(3rem, 8.6vw, 7rem);
    line-height: 0.86;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--c-scream-bone);
    animation: sc-flicker 1000ms steps(1, end) 1 both;
}
@keyframes sc-flicker {
    0% { opacity: 0.15; }
    8% { opacity: 1; }
    14% { opacity: 0.35; }
    22% { opacity: 1; }
    30% { opacity: 0.7; }
    100% { opacity: 1; }
}
.sc__sub {
    display: inline-flex; align-items: center; gap: var(--space-3);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: oklch(78% 0.01 60);
}
.sc__sub::before {
    content: ''; width: 46px; height: 1px; background: oklch(45% 0.17 22);
}

/* ── the still ─────────────────────────────────────────────────────────── */
.sc__still {
    position: relative;
    margin: 0;
    border: 1px solid oklch(45% 0.17 22 / 0.5);
    background: oklch(3% 0.002 20);
    padding: 8px;
}
.sc__still img {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 56vh;
    object-fit: cover;
    filter: contrast(1.04) saturate(0.92);
}
.sc__still-cap {
    display: flex; justify-content: space-between;
    padding: 8px 2px 0;
    font-family: var(--font-mono);
    font-size: var(--text-3xs);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: oklch(74% 0.008 60);
}
.sc__still-cap span:first-child { color: oklch(70% 0.16 22); }

/* ── the case file ─────────────────────────────────────────────────────── */
.sc__file { display: grid; gap: var(--space-4); }
.sc__files { display: grid; gap: 0; border-top: 1px solid oklch(92% 0.012 80 / 0.16); }
.sc__tab {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: var(--space-3);
    min-height: var(--control-md);
    padding: 0 var(--space-3);
    border-bottom: 1px solid oklch(92% 0.012 80 / 0.12);
    border-left: 2px solid transparent;
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: left;
    color: oklch(62% 0.008 60);
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out),
                background-color var(--dur-fast) var(--ease-out);
}
.sc__tab span { color: oklch(64% 0.008 60); font-size: var(--text-3xs); }
.sc__tab:hover { color: var(--c-scream-bone); background: oklch(100% 0 0 / 0.03); }
.sc__tab[aria-pressed='true'] {
    color: var(--c-scream-bone);
    border-left-color: oklch(45% 0.17 22);
    background: oklch(100% 0 0 / 0.04);
}
.sc__tab[aria-pressed='true'] span { color: oklch(72% 0.16 22); }

.sc__panels { min-height: 190px; }
.sc__panel { animation: panel-in var(--dur-base) var(--ease-out) both; }
@keyframes panel-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
.sc__quote {
    margin: 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    line-height: 1.22;
    color: var(--c-scream-bone);
}
.sc__safe {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.sc__door { font-family: var(--font-prose); font-size: var(--text-lg); color: oklch(82% 0.01 60); }
.sc__cta {
    display: inline-flex; align-items: center; justify-content: center;
    margin-top: var(--space-4);
    min-height: var(--control-lg);
    padding: 0 var(--space-5);
    background: oklch(45% 0.17 22);
    color: oklch(96% 0.01 80);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color var(--dur-fast) var(--ease-out);
}
.sc__cta:hover { background: oklch(50% 0.18 22); }

/* ── entry device: bars, then a slit ───────────────────────────────────── */
.entry--teaser { background: oklch(4% 0.003 20); }
.entry--teaser .entry__word {
    font-family: var(--font-ui);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-scream-bone);
}
.entry--teaser .entry__letterbox span {
    position: absolute; left: 0; right: 0; height: 0;
    background: oklch(2% 0.002 20);
    animation: bar-in 1.2s var(--ease-scene) forwards;
}
.entry--teaser .entry__letterbox span:first-child { top: 0; }
.entry--teaser .entry__letterbox span:last-child { bottom: 0; }
@keyframes bar-in {
    0% { height: 0; }
    40% { height: 22vh; }
    100% { height: 0; }
}
.entry--teaser .entry__field {
    position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
    translate: -50% 0;
    background: oklch(45% 0.17 22);
    animation: slit-open 1.6s var(--ease-scene) forwards;
}
@keyframes slit-open {
    0% { transform: scaleY(0); opacity: 0; }
    35% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1) scaleX(40); opacity: 0; }
}

/* ── narrow ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .sc__stage { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding-bottom: var(--space-10); }
    .sc__title { font-size: clamp(2.6rem, 14vw, 4rem); }
    .sc__files { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sc__tab {
        grid-template-columns: auto minmax(0, 1fr);
        border-left: 0;
        border-bottom-width: 2px;
        padding: 0 8px;
        font-size: var(--text-3xs);
        min-height: var(--control-lg);
    }
    .sc__tab[aria-pressed='true'] { border-left-color: transparent; border-bottom-color: oklch(45% 0.17 22); }
    .sc__panels { min-height: 0; }
}
