/* ================================================
   postp.day - Retro Broadcast Studio / 1970s Editing Suite
   Horizontal Filmstrip Layout
   ================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-deep: #1E1A17;
    --panel-surface: #2A2420;
    --text-primary: #E8DCC8;
    --accent-amber: #D4A853;
    --accent-rust: #C45B3E;
    --blob-olive: #6B7B52;
    --blob-mauve: #8B6B73;
    --ui-brass: #9A8B6F;

    --font-headline: 'DM Serif Display', serif;
    --font-body: 'Source Sans 3', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

html {
    overflow: hidden;
    height: 100%;
    background: var(--bg-deep);
}

body {
    height: 100%;
    overflow: hidden;
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
}

/* --- Film Grain Overlay --- */
#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    animation: grainFlicker 0.6s steps(6) infinite;
}

@keyframes grainFlicker {
    0% { transform: translate(0, 0); }
    16.6% { transform: translate(-5px, -3px); }
    33.3% { transform: translate(3px, 5px); }
    50% { transform: translate(-3px, 2px); }
    66.6% { transform: translate(5px, -5px); }
    83.3% { transform: translate(-2px, 4px); }
    100% { transform: translate(0, 0); }
}

/* --- Reel Counter --- */
#reel-counter {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 100;
    cursor: pointer;
}

.counter-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ui-brass);
    letter-spacing: 0.15em;
    opacity: 0.85;
    transition: color 0.3s ease;
}

#reel-counter:hover .counter-text {
    color: var(--accent-amber);
}

/* --- Scroll Arrow Affordances --- */
#scroll-arrows {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 90;
    transition: opacity 1.5s ease;
}

#scroll-arrows.hidden {
    opacity: 0;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: var(--ui-brass);
    opacity: 0.5;
    animation: arrowPulse 2s ease-in-out infinite;
}

.arrow-left {
    left: 24px;
}

.arrow-right {
    right: 24px;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* --- VU Meter Scrubber Bar --- */
#vu-scrubber {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(30, 26, 23, 0.92);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 16px;
    border-top: 1px solid rgba(154, 139, 111, 0.15);
}

.vu-track {
    flex: 1;
    display: flex;
    gap: 3px;
    align-items: center;
    height: 20px;
}

.vu-segment {
    flex: 1;
    height: 100%;
    background: rgba(154, 139, 111, 0.12);
    border-radius: 1px;
    transition: background 0.25s ease;
}

.vu-segment.active {
    background: var(--accent-amber);
    box-shadow: 0 0 6px rgba(212, 168, 83, 0.3);
}

.vu-segment.hot {
    background: var(--accent-rust);
    box-shadow: 0 0 8px rgba(196, 91, 62, 0.4);
}

.vu-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--ui-brass);
    letter-spacing: 0.1em;
    white-space: nowrap;
    opacity: 0.7;
}

/* --- Filmstrip Container --- */
#filmstrip {
    display: flex;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

#filmstrip::-webkit-scrollbar {
    display: none;
}

/* --- Panel Base --- */
.panel {
    flex: 0 0 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    background: var(--panel-surface);
    overflow: hidden;
    padding-bottom: 60px;
}

.panel + .panel {
    border-left: 3px solid var(--bg-deep);
}

.panel-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    padding: 80px 60px 80px 60px;
}

/* --- Bokeh Circles --- */
.panel-bokeh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    transition: transform 0.3s ease-out;
}

/* Panel 001 Bokeh */
.panel-001 .b1 { width: 110px; height: 110px; top: 8%; left: 70%; background: radial-gradient(circle, rgba(212,168,83,0.12) 0%, transparent 70%); }
.panel-001 .b2 { width: 80px; height: 80px; top: 25%; left: 82%; background: radial-gradient(circle, rgba(107,123,82,0.10) 0%, transparent 70%); }
.panel-001 .b3 { width: 120px; height: 120px; top: 55%; left: 75%; background: radial-gradient(circle, rgba(212,168,83,0.08) 0%, transparent 70%); }
.panel-001 .b4 { width: 60px; height: 60px; top: 15%; left: 60%; background: radial-gradient(circle, rgba(139,107,115,0.10) 0%, transparent 70%); }
.panel-001 .b5 { width: 90px; height: 90px; top: 70%; left: 65%; background: radial-gradient(circle, rgba(107,123,82,0.08) 0%, transparent 70%); }
.panel-001 .b6 { width: 50px; height: 50px; top: 40%; left: 90%; background: radial-gradient(circle, rgba(196,91,62,0.07) 0%, transparent 70%); }
.panel-001 .b7 { width: 100px; height: 100px; top: 80%; left: 85%; background: radial-gradient(circle, rgba(212,168,83,0.09) 0%, transparent 70%); }
.panel-001 .b8 { width: 70px; height: 70px; top: 5%; left: 88%; background: radial-gradient(circle, rgba(107,123,82,0.11) 0%, transparent 70%); }
.panel-001 .b9 { width: 45px; height: 45px; top: 48%; left: 78%; background: radial-gradient(circle, rgba(139,107,115,0.08) 0%, transparent 70%); }
.panel-001 .b10 { width: 85px; height: 85px; top: 35%; left: 68%; background: radial-gradient(circle, rgba(212,168,83,0.06) 0%, transparent 70%); }

/* Panel 002 Bokeh */
.panel-002 .b1 { width: 100px; height: 100px; top: 10%; left: 15%; background: radial-gradient(circle, rgba(139,107,115,0.10) 0%, transparent 70%); }
.panel-002 .b2 { width: 75px; height: 75px; top: 30%; left: 8%; background: radial-gradient(circle, rgba(212,168,83,0.08) 0%, transparent 70%); }
.panel-002 .b3 { width: 115px; height: 115px; top: 60%; left: 20%; background: radial-gradient(circle, rgba(107,123,82,0.09) 0%, transparent 70%); }
.panel-002 .b4 { width: 55px; height: 55px; top: 18%; left: 40%; background: radial-gradient(circle, rgba(196,91,62,0.06) 0%, transparent 70%); }
.panel-002 .b5 { width: 95px; height: 95px; top: 75%; left: 35%; background: radial-gradient(circle, rgba(212,168,83,0.07) 0%, transparent 70%); }
.panel-002 .b6 { width: 65px; height: 65px; top: 45%; left: 5%; background: radial-gradient(circle, rgba(139,107,115,0.11) 0%, transparent 70%); }
.panel-002 .b7 { width: 80px; height: 80px; top: 85%; left: 12%; background: radial-gradient(circle, rgba(107,123,82,0.08) 0%, transparent 70%); }
.panel-002 .b8 { width: 50px; height: 50px; top: 5%; left: 45%; background: radial-gradient(circle, rgba(212,168,83,0.10) 0%, transparent 70%); }
.panel-002 .b9 { width: 90px; height: 90px; top: 50%; left: 42%; background: radial-gradient(circle, rgba(196,91,62,0.06) 0%, transparent 70%); }
.panel-002 .b10 { width: 70px; height: 70px; top: 22%; left: 30%; background: radial-gradient(circle, rgba(107,123,82,0.07) 0%, transparent 70%); }
.panel-002 .b11 { width: 40px; height: 40px; top: 68%; left: 48%; background: radial-gradient(circle, rgba(139,107,115,0.09) 0%, transparent 70%); }
.panel-002 .b12 { width: 105px; height: 105px; top: 38%; left: 25%; background: radial-gradient(circle, rgba(212,168,83,0.06) 0%, transparent 70%); }

/* Panel 003 Bokeh */
.panel-003 .b1 { width: 90px; height: 90px; top: 12%; left: 10%; background: radial-gradient(circle, rgba(212,168,83,0.09) 0%, transparent 70%); }
.panel-003 .b2 { width: 70px; height: 70px; top: 60%; left: 85%; background: radial-gradient(circle, rgba(107,123,82,0.10) 0%, transparent 70%); }
.panel-003 .b3 { width: 110px; height: 110px; top: 30%; left: 50%; background: radial-gradient(circle, rgba(139,107,115,0.07) 0%, transparent 70%); }
.panel-003 .b4 { width: 60px; height: 60px; top: 75%; left: 20%; background: radial-gradient(circle, rgba(196,91,62,0.08) 0%, transparent 70%); }
.panel-003 .b5 { width: 80px; height: 80px; top: 5%; left: 70%; background: radial-gradient(circle, rgba(212,168,83,0.06) 0%, transparent 70%); }
.panel-003 .b6 { width: 45px; height: 45px; top: 50%; left: 40%; background: radial-gradient(circle, rgba(107,123,82,0.11) 0%, transparent 70%); }
.panel-003 .b7 { width: 100px; height: 100px; top: 85%; left: 60%; background: radial-gradient(circle, rgba(139,107,115,0.07) 0%, transparent 70%); }
.panel-003 .b8 { width: 55px; height: 55px; top: 20%; left: 90%; background: radial-gradient(circle, rgba(212,168,83,0.08) 0%, transparent 70%); }

/* Panel 004 Bokeh (minimal - 3-4 faint amber) */
.panel-004 { background: var(--bg-deep); }
.panel-004 .b1 { width: 100px; height: 100px; top: 20%; left: 30%; background: radial-gradient(circle, rgba(212,168,83,0.05) 0%, transparent 70%); }
.panel-004 .b2 { width: 80px; height: 80px; top: 60%; left: 70%; background: radial-gradient(circle, rgba(212,168,83,0.04) 0%, transparent 70%); }
.panel-004 .b3 { width: 120px; height: 120px; top: 40%; left: 15%; background: radial-gradient(circle, rgba(212,168,83,0.06) 0%, transparent 70%); }
.panel-004 .b4 { width: 60px; height: 60px; top: 75%; left: 50%; background: radial-gradient(circle, rgba(212,168,83,0.04) 0%, transparent 70%); }

/* --- Hero Panel (001) --- */
.hero-content {
    align-items: center;
    justify-content: space-between;
}

.hero-text {
    flex: 0 0 55%;
    padding-right: 40px;
}

.hero-title {
    font-family: var(--font-headline);
    font-weight: 400;
    font-size: clamp(2.2rem, 7vw, 4.8rem);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideUp 0.8s ease-out 0.2s forwards;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.35rem);
    color: var(--accent-amber);
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeSlideUp 0.6s ease-out 0.6s forwards;
}

.hero-blob {
    flex: 0 0 40%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Blob Shapes --- */
.blob {
    position: relative;
    animation: blobBreathe 12s ease-in-out infinite;
}

.blob-hero {
    width: 380px;
    height: 380px;
    background: linear-gradient(135deg, rgba(212,168,83,0.25), rgba(107,123,82,0.20));
    clip-path: polygon(30% 0%, 70% 5%, 95% 25%, 100% 60%, 85% 90%, 55% 100%, 20% 95%, 0% 70%, 5% 35%);
}

.blob-concept {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, var(--blob-mauve), var(--panel-surface));
    clip-path: polygon(25% 2%, 75% 8%, 98% 30%, 92% 70%, 80% 95%, 40% 100%, 10% 85%, 0% 55%, 8% 20%);
}

.blob-tri-1 {
    width: 220px;
    height: 220px;
    background: rgba(212,168,83,0.20);
    clip-path: polygon(35% 0%, 80% 10%, 100% 50%, 85% 90%, 40% 100%, 5% 75%, 0% 30%);
}

.blob-tri-2 {
    width: 180px;
    height: 180px;
    background: rgba(107,123,82,0.25);
    clip-path: polygon(20% 5%, 70% 0%, 95% 40%, 90% 85%, 50% 100%, 10% 80%, 0% 35%);
    animation-delay: -4s;
}

.blob-tri-3 {
    width: 200px;
    height: 200px;
    background: rgba(139,107,115,0.22);
    clip-path: polygon(40% 0%, 85% 15%, 100% 55%, 80% 95%, 30% 100%, 0% 70%, 10% 20%);
    animation-delay: -8s;
}

.blob-closing {
    width: 200px;
    height: 200px;
    background: linear-gradient(140deg, rgba(154,139,111,0.15), rgba(42,36,32,0.5));
    clip-path: polygon(30% 5%, 75% 0%, 100% 35%, 95% 75%, 65% 100%, 20% 90%, 0% 55%, 10% 15%);
}

@keyframes blobBreathe {
    0% { clip-path: polygon(30% 0%, 70% 5%, 95% 25%, 100% 60%, 85% 90%, 55% 100%, 20% 95%, 0% 70%, 5% 35%); }
    33% { clip-path: polygon(28% 2%, 72% 3%, 97% 27%, 98% 58%, 83% 88%, 53% 98%, 18% 93%, 2% 68%, 7% 33%); }
    66% { clip-path: polygon(32% 1%, 68% 7%, 93% 23%, 100% 62%, 87% 92%, 57% 100%, 22% 97%, 0% 72%, 3% 37%); }
    100% { clip-path: polygon(30% 0%, 70% 5%, 95% 25%, 100% 60%, 85% 90%, 55% 100%, 20% 95%, 0% 70%, 5% 35%); }
}

/* --- Splice Rule (film splicing tape) --- */
.splice-rule {
    position: absolute;
    bottom: 80px;
    left: 60px;
    right: 60px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.splice-tape {
    flex: 1;
    height: 3px;
    background: repeating-linear-gradient(
        -45deg,
        rgba(154,139,111,0.30),
        rgba(154,139,111,0.30) 4px,
        transparent 4px,
        transparent 8px
    );
}

.sprocket {
    width: 16px;
    height: 16px;
    border: 1.5px solid rgba(154,139,111,0.35);
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- Panel 002: Concept --- */
.concept-content {
    gap: 40px;
}

.text-columns {
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-right: 40px;
    justify-content: center;
}

.text-col {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.text-col.visible {
    opacity: 1;
    transform: translateY(0);
}

.text-col-2 {
    padding-left: 24px;
    margin-top: 30px;
}

.text-columns h2 {
    font-family: var(--font-headline);
    font-weight: 400;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    color: var(--accent-amber);
    margin-bottom: 16px;
}

.text-columns p {
    color: var(--text-primary);
}

.concept-blob-area {
    flex: 0 0 42%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.concept-bokeh {
    position: absolute;
}

.cb1 { width: 60px; height: 60px; top: 20%; left: 15%; background: radial-gradient(circle, rgba(212,168,83,0.15) 0%, transparent 70%); }
.cb2 { width: 45px; height: 45px; top: 60%; left: 70%; background: radial-gradient(circle, rgba(139,107,115,0.12) 0%, transparent 70%); }
.cb3 { width: 80px; height: 80px; top: 40%; left: 40%; background: radial-gradient(circle, rgba(107,123,82,0.10) 0%, transparent 70%); }

/* --- Panel 003: Showcase --- */
.showcase-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 60px;
}

.blob-triangle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.blob-triangle .blob:nth-child(1) {
    transform: translateY(-30px);
}
.blob-triangle .blob:nth-child(2) {
    transform: translateY(20px) translateX(-20px);
}
.blob-triangle .blob:nth-child(3) {
    transform: translateY(-10px) translateX(10px);
}

.stage-labels {
    display: flex;
    gap: 60px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.stage-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-amber);
    letter-spacing: 0.2em;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid transparent;
}

.stage-label.typing {
    opacity: 1;
    border-right-color: var(--accent-amber);
    animation: cursorBlink 0.6s step-end infinite;
}

.stage-label.typed {
    opacity: 1;
    border-right-color: transparent;
}

@keyframes cursorBlink {
    0%, 100% { border-right-color: var(--accent-amber); }
    50% { border-right-color: transparent; }
}

/* --- Panel 004: Closing --- */
.closing-content {
    align-items: center;
    justify-content: space-between;
}

.closing-text {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.closing-title {
    font-family: var(--font-headline);
    font-weight: 400;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.closing-underline {
    width: 0;
    height: 3px;
    background: var(--accent-rust);
    margin-bottom: 24px;
    transition: width 1.2s ease-out;
}

.closing-underline.animate {
    width: 200px;
}

.closing-tagline {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--ui-brass);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease 0.8s, transform 0.6s ease 0.8s;
}

.closing-tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

.closing-blob {
    flex: 0 0 30%;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    align-self: flex-end;
    padding-bottom: 20px;
}

.closing-counter {
    position: absolute;
    bottom: 40px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--ui-brass);
    letter-spacing: 0.15em;
    opacity: 0.7;
}

/* --- Animations --- */
@keyframes fadeSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .panel-content {
        padding: 40px 24px 40px 24px;
        flex-direction: column;
    }

    .hero-text {
        flex: none;
        padding-right: 0;
        margin-bottom: 30px;
    }

    .hero-blob {
        flex: none;
    }

    .blob-hero {
        width: 200px;
        height: 200px;
    }

    .text-columns {
        flex: none;
        padding-right: 0;
    }

    .concept-blob-area {
        flex: none;
        min-height: 200px;
    }

    .blob-triangle {
        gap: 20px;
    }

    .blob-tri-1 { width: 140px; height: 140px; }
    .blob-tri-2 { width: 120px; height: 120px; }
    .blob-tri-3 { width: 130px; height: 130px; }

    .stage-labels {
        gap: 30px;
    }

    .closing-text {
        flex: none;
    }

    .closing-blob {
        flex: none;
        align-self: center;
    }

    .splice-rule {
        left: 24px;
        right: 24px;
    }

    #vu-scrubber {
        padding: 0 16px;
    }
}
