/* ============================================
   pencloser.com - Horizontal Filmstrip Gallery
   Colors: #0A0A0F, #FF00AA, #00FFD1, #8B00FF,
           #E0E0E0, #8A8A9A, #F5F0E8, #0D0D2B
   Fonts: Cormorant Garamond, IBM Plex Mono
   ============================================ */

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

html {
    overflow: hidden;
    height: 100%;
}

body {
    background-color: #0A0A0F;
    color: #E0E0E0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.7;
    height: 100%;
    overflow: hidden;
}

/* ============================================
   Filmstrip Container
   ============================================ */

.filmstrip {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

/* ============================================
   Frames - Each 100vw x 100vh
   ============================================ */

.frame {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #0A0A0F;
}

/* ============================================
   Circuit Trace Backgrounds
   ============================================ */

.circuit-traces {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
    transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.circuit-traces svg {
    width: 100%;
    height: 100%;
}

.circuit-traces svg path {
    fill: none;
    stroke: #00FFD1;
    stroke-width: 1;
}

.circuit-traces svg circle {
    fill: #00FFD1;
}

.frame:hover .circuit-traces {
    opacity: 0.4;
}

/* ============================================
   Sprocket Dividers
   ============================================ */

.sprocket-divider {
    flex: 0 0 8px;
    width: 8px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    background-color: #0A0A0F;
    padding: 20px 0;
}

.sprocket-hole {
    width: 6px;
    height: 10px;
    border-radius: 1px;
    background-color: rgba(0, 255, 209, 0.2);
}

/* ============================================
   Frame 1 - Title with Full-bleed Image
   ============================================ */

.frame-1 {
    background-color: #0A0A0F;
}

.frame-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.frame-1-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-1-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
}

.neon-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(3rem, 7vw, 7rem);
    letter-spacing: -0.02em;
    color: #FF00AA;
    text-shadow:
        0 0 20px rgba(255, 0, 170, 0.4),
        0 0 60px rgba(255, 0, 170, 0.15),
        0 0 100px rgba(255, 0, 170, 0.08);
    margin-bottom: 0.2em;
}

.frame-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00FFD1;
}

/* ============================================
   Vintage Photo Treatment
   ============================================ */

.vintage-photo {
    width: 100%;
    height: 100%;
    filter: saturate(0.3) contrast(1.2) sepia(0.15);
    transition: filter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vintage-photo:hover {
    filter: saturate(0.8) contrast(1.1) sepia(0);
}

.photo-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   Frame 2 - Split Layout
   ============================================ */

.frame-2 {
    background-color: #0D0D2B;
}

.frame-split {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.frame-split-left {
    flex: 0 0 50%;
    height: 100%;
    overflow: hidden;
}

.frame-split-right {
    flex: 0 0 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.text-block {
    max-width: 480px;
    position: relative;
    padding-left: 24px;
    border-left: 2px solid transparent;
    transition: border-color 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.text-block:hover {
    border-left-color: #FF00AA;
}

.frame-heading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
    color: #FF00AA;
    margin-bottom: 1em;
}

.frame-body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.7;
    color: #E0E0E0;
    margin-bottom: 1.2em;
}

.frame-body:last-child {
    margin-bottom: 0;
}

/* ============================================
   Frame 3 - Three Horizontal Strips
   ============================================ */

.frame-3 {
    background-color: #0A0A0F;
}

.frame-strips {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.strip {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 255, 209, 0.1);
}

.strip:last-child {
    border-bottom: none;
}

.strip .vintage-photo {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.strip-label {
    position: absolute;
    bottom: 12px;
    right: 24px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00FFD1;
    z-index: 2;
}

/* ============================================
   Frame 4 - Centered Text over Circuit Traces
   ============================================ */

.frame-4 {
    background-color: #0D0D2B;
}

.frame-4 .circuit-traces {
    opacity: 0.12;
}

.frame-4:hover .circuit-traces {
    opacity: 0.35;
}

.frame-centered-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    width: 100%;
    max-width: 720px;
}

.text-block-centered {
    text-align: center;
    padding-left: 0;
    border-left: none;
}

.text-block-centered:hover {
    border-left-color: transparent;
}

.large-text {
    font-size: 22px;
    line-height: 1.8;
}

.large-text em {
    font-style: italic;
    color: #FF00AA;
}

/* ============================================
   Frame 5 - Polaroid Grid
   ============================================ */

.frame-5 {
    background-color: #0A0A0F;
}

.polaroid-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 32px;
    padding: 48px;
    width: 100%;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.polaroid {
    background-color: #F5F0E8;
    border-radius: 2px;
    padding: 12px 12px 40px 12px;
    box-shadow: 4px 4px 0 #0D0D2B;
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

.polaroid:hover {
    transform: translateY(-8px) translateZ(20px);
    box-shadow: 8px 12px 24px rgba(255, 0, 170, 0.15);
}

.polaroid-image {
    width: 100%;
    aspect-ratio: 6 / 5;
    overflow: hidden;
    border-radius: 1px;
    background-color: #1a1a1a;
}

.polaroid-image .photo-svg {
    filter: saturate(0.3) contrast(1.2) sepia(0.15);
    transition: filter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.polaroid:hover .polaroid-image .photo-svg {
    filter: saturate(0.8) contrast(1.1) sepia(0);
}

.polaroid-caption {
    display: block;
    margin-top: 10px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 13px;
    color: #1A1A1A;
    text-align: center;
}

/* ============================================
   Frame 6 - Closing Word
   ============================================ */

.frame-6 {
    background-color: #0A0A0F;
}

.frame-closing {
    position: relative;
    z-index: 1;
    text-align: center;
}

.closing-word {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(5rem, 15vw, 18rem);
    letter-spacing: -0.03em;
    color: #FF00AA;
    text-shadow:
        0 0 30px rgba(255, 0, 170, 0.3),
        0 0 80px rgba(255, 0, 170, 0.12),
        0 0 150px rgba(255, 0, 170, 0.06);
    transition: text-shadow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.frame-6:hover .closing-word {
    text-shadow:
        0 0 40px rgba(255, 0, 170, 0.5),
        0 0 100px rgba(255, 0, 170, 0.2),
        0 0 200px rgba(255, 0, 170, 0.1);
}

/* ============================================
   Progress Bar
   ============================================ */

.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(255, 0, 170, 0.15);
    z-index: 100;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background-color: #FF00AA;
    transition: width 0.1s linear;
}

/* ============================================
   Frame Counter
   ============================================ */

.frame-counter {
    position: fixed;
    bottom: 16px;
    right: 24px;
    z-index: 100;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 11px;
    color: #8A8A9A;
    transition: opacity 0.15s ease;
}

.counter-current {
    color: #E0E0E0;
}

.counter-total {
    color: #8A8A9A;
}

/* ============================================
   Color Wash Transition Overlay
   ============================================ */

.color-wash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #8B00FF;
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    transition: opacity 0.1s ease;
}

.color-wash.active {
    opacity: 0.15;
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .polaroid,
    .text-block,
    .vintage-photo,
    .polaroid-image .photo-svg,
    .circuit-traces,
    .closing-word,
    .frame-counter,
    .color-wash {
        transition: none;
    }

    .polaroid:hover {
        transform: none;
    }

    .filmstrip {
        scroll-behavior: auto;
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
    .frame-split {
        flex-direction: column;
    }

    .frame-split-left,
    .frame-split-right {
        flex: 0 0 50%;
    }

    .frame-split-right {
        padding: 24px;
    }

    .polaroid-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 16px;
        padding: 24px;
    }

    .frame-centered-text {
        padding: 24px;
    }

    .large-text {
        font-size: 18px;
    }
}