/* =============================================
   archetype.works - Glitch Luxury Aesthetic
   ============================================= */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #0A0A0A;
    color: #FFFFFF;
    font-family: 'Lora', serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- SVG Defs (hidden) --- */
.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* =============================================
   Global Overlays
   ============================================= */

/* Scan lines */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(255, 255, 255, 0.04) 2px,
        rgba(255, 255, 255, 0.04) 3px
    );
}

/* Noise overlay */
.noise-overlay {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 99;
    pointer-events: none;
    animation: noiseShift 0.8s steps(8) infinite;
}

@keyframes noiseShift {
    0% { transform: translate(0, 0); }
    12.5% { transform: translate(-5%, -5%); }
    25% { transform: translate(3%, -8%); }
    37.5% { transform: translate(-7%, 2%); }
    50% { transform: translate(5%, 5%); }
    62.5% { transform: translate(-3%, 8%); }
    75% { transform: translate(7%, -2%); }
    87.5% { transform: translate(-2%, 3%); }
    100% { transform: translate(0, 0); }
}

/* Dead pixels */
.dead-pixels {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 101;
    pointer-events: none;
}

.dead-pixel {
    position: absolute;
    width: 2px;
    height: 2px;
    display: block;
}

.dead-pixel.red { background: #FF0000; }
.dead-pixel.green { background: #00FF00; }
.dead-pixel.blue { background: #0000FF; }

/* =============================================
   Navigation
   ============================================= */

/* Monogram */
.monogram {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 200;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 28px;
    color: #FFFFFF;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: inline-block;
    line-height: 1;
}

/* Section indicators */
.section-indicators {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    transition: background 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.dot.active {
    background: #FFFFFF;
    border-color: #FFFFFF;
}

/* =============================================
   Frames (Sections)
   ============================================= */

.frame {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

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

.frame-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Flash overlay for section transitions */
.flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.flash-overlay.flash-red { background: #FF0000; opacity: 0.05; }
.flash-overlay.flash-blue { background: #0000FF; opacity: 0.05; }

/* Collage layers */
.collage-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.collage-bg {
    z-index: 0;
    filter: grayscale(100%);
}

.collage-overlay {
    z-index: 1;
    mix-blend-mode: screen;
    opacity: 0.3;
}

/* Displacement blocks */
.displacement-block {
    position: absolute;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(6px);
    mix-blend-mode: overlay;
}

/* =============================================
   Scene 1: Opening Frame
   ============================================= */

.frame-opening .frame-bg {
    background: #0A0A0A;
}

.marble-hall {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, #2E2E2E 0%, #0A0A0A 25%, #1A1A1A 50%, #2E2E2E 75%, #0A0A0A 100%),
        linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.02) 30%, rgba(255,255,255,0.02) 32%, transparent 32%),
        linear-gradient(-45deg, transparent 30%, rgba(255,255,255,0.02) 30%, rgba(255,255,255,0.02) 32%, transparent 32%);
    background-size: 100% 100%, 60px 60px, 60px 60px;
}

.marble-hall::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(46, 46, 46, 0.6) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(26, 26, 26, 0.8) 0%, transparent 50%),
        linear-gradient(180deg, transparent 60%, rgba(10, 10, 10, 0.9) 100%);
}

.marble-hall::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 40%;
    background: linear-gradient(to top,
        rgba(46, 46, 46, 0.4) 0%,
        rgba(46, 46, 46, 0.15) 30%,
        transparent 100%
    );
    clip-path: polygon(10% 100%, 20% 0%, 25% 100%, 35% 0%, 40% 100%, 50% 0%, 55% 100%, 65% 0%, 70% 100%, 80% 0%, 90% 100%);
    opacity: 0.3;
}

/* Hero lionfish */
.hero-fish {
    position: absolute;
    z-index: 1;
}

.lionfish {
    width: 45vw;
    max-width: 550px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 30px rgba(0, 206, 209, 0.2));
    animation: fishDrift 12s ease-in-out infinite;
}

@keyframes fishDrift {
    0%, 100% { transform: translate(-50%, -50%) translateX(0) translateY(0); }
    25% { transform: translate(-50%, -50%) translateX(15px) translateY(-8px); }
    50% { transform: translate(-50%, -50%) translateX(-10px) translateY(5px); }
    75% { transform: translate(-50%, -50%) translateX(8px) translateY(-3px); }
}

/* Opening content */
.opening-content {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.site-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(48px, 8vw, 96px);
    letter-spacing: -0.03em;
    color: #FFFFFF;
    position: relative;
    z-index: 5;
}

/* Glitch text effect */
.glitch-text {
    position: relative;
    text-shadow:
        -2px 0 #FF0000,
        2px 0 #0000FF,
        0 0 10px rgba(255, 255, 255, 0.1);
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.glitch-text::before {
    color: #FF0000;
    z-index: -1;
    clip-path: inset(0 0 65% 0);
    transform: translateX(-2px);
    opacity: 0.7;
}

.glitch-text::after {
    color: #0000FF;
    z-index: -1;
    clip-path: inset(65% 0 0 0);
    transform: translateX(2px);
    opacity: 0.7;
}

/* Chevron */
.chevron-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    animation: chevronPulse 2s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes chevronPulse {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.3; transform: translateX(-50%) translateY(8px); }
}

/* =============================================
   Glitch Barriers
   ============================================= */

.glitch-barrier {
    position: relative;
    width: 100%;
    height: 12px;
    background:
        repeating-linear-gradient(
            90deg,
            #FF0000 0px,
            #00FF00 1px,
            #0000FF 2px,
            #0A0A0A 3px,
            #FFFFFF 4px,
            #0A0A0A 5px
        );
    opacity: 0.4;
    z-index: 10;
    overflow: hidden;
}

.glitch-barrier::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        rgba(255, 0, 0, 0.3) 2px,
        rgba(0, 255, 0, 0.3) 4px,
        rgba(0, 0, 255, 0.3) 6px,
        transparent 8px
    );
    animation: barrierShift 3s linear infinite;
}

@keyframes barrierShift {
    0% { transform: translateX(0); }
    100% { transform: translateX(33.33%); }
}

.glitch-barrier-final {
    height: 32px;
    opacity: 0.6;
    animation: barrierFlicker 0.5s steps(3) infinite;
}

@keyframes barrierFlicker {
    0% { opacity: 0.6; }
    33% { opacity: 0.3; }
    66% { opacity: 0.7; }
    100% { opacity: 0.6; }
}

/* =============================================
   Tetra Schools
   ============================================= */

.tetra-school {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 5;
}

.tetra {
    position: absolute;
    display: block;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 2px solid transparent;
    border-bottom: 5px solid;
    border-bottom-color: #FF4136;
    filter: drop-shadow(0 0 3px rgba(0, 206, 209, 0.5));
    animation: tetraSwim 18s linear infinite;
    top: 50%;
}

.tetra::after {
    content: '';
    position: absolute;
    top: 2px;
    left: -10px;
    width: 8px;
    height: 3px;
    background: linear-gradient(90deg, #00CED1, #FF4136);
    border-radius: 50%;
}

.school-1 .tetra:nth-child(1) { animation-delay: 0s; top: 20%; }
.school-1 .tetra:nth-child(2) { animation-delay: -3s; top: 35%; }
.school-1 .tetra:nth-child(3) { animation-delay: -6s; top: 50%; }
.school-1 .tetra:nth-child(4) { animation-delay: -9s; top: 65%; }
.school-1 .tetra:nth-child(5) { animation-delay: -12s; top: 30%; }
.school-1 .tetra:nth-child(6) { animation-delay: -15s; top: 55%; }

.school-2 .tetra:nth-child(1) { animation-delay: -1s; top: 25%; }
.school-2 .tetra:nth-child(2) { animation-delay: -4s; top: 45%; }
.school-2 .tetra:nth-child(3) { animation-delay: -7s; top: 60%; }
.school-2 .tetra:nth-child(4) { animation-delay: -10s; top: 35%; }
.school-2 .tetra:nth-child(5) { animation-delay: -13s; top: 70%; }

.school-process {
    z-index: 1;
}

.school-process .tetra:nth-child(1) { animation-delay: 0s; top: 70%; }
.school-process .tetra:nth-child(2) { animation-delay: -2.5s; top: 75%; }
.school-process .tetra:nth-child(3) { animation-delay: -5s; top: 80%; }
.school-process .tetra:nth-child(4) { animation-delay: -7.5s; top: 72%; }
.school-process .tetra:nth-child(5) { animation-delay: -10s; top: 78%; }
.school-process .tetra:nth-child(6) { animation-delay: -12.5s; top: 85%; }
.school-process .tetra:nth-child(7) { animation-delay: -15s; top: 68%; }
.school-process .tetra:nth-child(8) { animation-delay: -17s; top: 82%; }

@keyframes tetraSwim {
    0% {
        transform: translateX(calc(100vw + 20px)) translateY(0);
    }
    10% {
        transform: translateX(calc(80vw)) translateY(-5px);
    }
    25% {
        transform: translateX(calc(60vw)) translateY(3px);
    }
    40% {
        transform: translateX(calc(40vw)) translateY(-7px);
    }
    60% {
        transform: translateX(calc(20vw)) translateY(4px);
    }
    80% {
        transform: translateX(calc(5vw)) translateY(-2px);
    }
    100% {
        transform: translateX(-30px) translateY(0);
    }
}

/* =============================================
   Scene 2: Concept Frame
   ============================================= */

.frame-concept .frame-bg {
    background: #0A0A0A;
}

.fashion-silhouettes {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 40%, rgba(46, 46, 46, 0.7) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(26, 26, 26, 0.9) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(46, 46, 46, 0.5) 0%, transparent 45%),
        linear-gradient(160deg, #0A0A0A 0%, #1A1A1A 30%, #0A0A0A 60%, #2E2E2E 80%, #0A0A0A 100%);
}

.fashion-silhouettes::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 5%;
    width: 55%;
    height: 80%;
    background:
        linear-gradient(180deg, rgba(46, 46, 46, 0.3) 0%, transparent 30%),
        radial-gradient(ellipse at 50% 30%, rgba(128, 128, 128, 0.1) 0%, transparent 60%);
    clip-path: polygon(30% 0%, 70% 0%, 85% 25%, 75% 50%, 80% 75%, 65% 100%, 35% 100%, 20% 75%, 25% 50%, 15% 25%);
}

.fashion-silhouettes::after {
    content: '';
    position: absolute;
    top: 5%;
    right: 10%;
    width: 35%;
    height: 70%;
    background:
        linear-gradient(200deg, rgba(46, 46, 46, 0.25) 0%, transparent 40%),
        radial-gradient(ellipse at 40% 50%, rgba(128, 128, 128, 0.08) 0%, transparent 50%);
    clip-path: polygon(40% 0%, 80% 5%, 95% 30%, 85% 55%, 90% 80%, 60% 100%, 25% 95%, 10% 65%, 20% 35%);
}

.coral-fragments {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 70% 70%, rgba(0, 206, 209, 0.04) 0%, transparent 30%),
        radial-gradient(circle at 30% 80%, rgba(0, 206, 209, 0.03) 0%, transparent 25%);
}

.concept-content {
    padding: 0 8%;
}

.concept-text-zone {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: 38%;
    max-width: 500px;
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(40px, 5vw, 72px);
    letter-spacing: -0.03em;
    color: #FFFFFF;
    margin-bottom: 24px;
}

.metadata {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #808080;
    display: block;
    margin-bottom: 16px;
}

.metadata-bottom {
    margin-top: 24px;
    margin-bottom: 0;
}

.body-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: #B0B0B0;
    margin-bottom: 16px;
}

.body-text:last-of-type {
    margin-bottom: 0;
}

/* =============================================
   Scene 3: Gallery Frame
   ============================================= */

.frame-gallery .frame-bg {
    background: #0A0A0A;
}

.gallery-bg {
    background:
        linear-gradient(135deg, #1A1A1A 0%, #0A0A0A 40%, #1A1A1A 70%, #0A0A0A 100%);
}

.gallery-content {
    align-items: center;
    padding: 0 5%;
}

.gallery-meta {
    position: absolute;
    top: 40px;
    left: 8%;
}

.triptych {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 2vw;
    width: 100%;
    max-width: 1200px;
}

.triptych-panel {
    flex: 1;
    max-width: 280px;
    height: 55vh;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #1A1A1A;
    border: 1px solid rgba(128, 128, 128, 0.15);
}

.triptych-panel-center {
    flex: 2;
    max-width: 440px;
}

.panel-collage {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
}

.triptych-panel:hover .panel-collage {
    filter: grayscale(0%);
}

.panel-1 {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(46, 46, 46, 0.5) 0%, #1A1A1A 70%),
        linear-gradient(45deg, #0A0A0A, #2E2E2E);
}

.panel-2 {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(46, 46, 46, 0.6) 0%, #1A1A1A 70%),
        linear-gradient(135deg, #0A0A0A, #2E2E2E);
}

.panel-3 {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(46, 46, 46, 0.4) 0%, #1A1A1A 70%),
        linear-gradient(225deg, #0A0A0A, #2E2E2E);
}

.panel-fish {
    width: 80%;
    height: auto;
    position: relative;
    z-index: 2;
}

.panel-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #808080;
    transition: color 0.3s ease;
}

.triptych-panel:hover .panel-label {
    color: #B0B0B0;
}

/* =============================================
   Hover-Lift Pattern
   ============================================= */

.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* =============================================
   Scene 4: Process Frame
   ============================================= */

.frame-process .frame-bg {
    background: #0A0A0A;
}

.geometric-patterns {
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(46, 46, 46, 0.15) 40px, rgba(46, 46, 46, 0.15) 41px),
        repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(46, 46, 46, 0.15) 40px, rgba(46, 46, 46, 0.15) 41px),
        repeating-linear-gradient(45deg, transparent, transparent 56px, rgba(46, 46, 46, 0.08) 56px, rgba(46, 46, 46, 0.08) 57px),
        linear-gradient(135deg, #0A0A0A 0%, #1A1A1A 50%, #0A0A0A 100%);
}

.geometric-patterns::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 15%;
    width: 70%;
    height: 80%;
    background:
        radial-gradient(circle at 30% 30%, rgba(46, 46, 46, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(26, 26, 26, 0.5) 0%, transparent 35%);
}

.process-content {
    padding: 0 8%;
    align-items: flex-start;
}

.display-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(80px, 14vw, 180px);
    letter-spacing: -0.03em;
    color: #FFFFFF;
    line-height: 0.9;
    width: 70%;
    text-shadow:
        -2px 0 #FF0000,
        2px 0 #0000FF,
        0 0 10px rgba(255, 255, 255, 0.1);
}

.display-heading::before {
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.display-heading::after {
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.process-text-zone {
    margin-top: 32px;
    width: 38%;
    max-width: 480px;
}

/* Glitch slice animation */
.glitch-slice {
    animation: none;
}

.glitch-slice.active {
    animation: glitchSlice 0.8s ease-out forwards;
}

@keyframes glitchSlice {
    0% {
        clip-path: inset(0 0 0 0);
        transform: translateX(0);
    }
    10% {
        clip-path: inset(20% 0 60% 0);
        transform: translateX(6px);
    }
    20% {
        clip-path: inset(50% 0 20% 0);
        transform: translateX(-4px);
    }
    30% {
        clip-path: inset(10% 0 70% 0);
        transform: translateX(3px);
    }
    40% {
        clip-path: inset(60% 0 10% 0);
        transform: translateX(-5px);
    }
    50% {
        clip-path: inset(30% 0 40% 0);
        transform: translateX(2px);
    }
    60% {
        clip-path: inset(0 0 0 0);
        transform: translateX(-1px);
    }
    80% {
        clip-path: inset(0 0 0 0);
        transform: translateX(1px);
    }
    100% {
        clip-path: inset(0 0 0 0);
        transform: translateX(0);
    }
}

/* =============================================
   Scene 5: Detail Frame
   ============================================= */

.frame-detail .frame-bg {
    background: #0A0A0A;
}

.detail-bg {
    background:
        radial-gradient(ellipse at 40% 50%, rgba(46, 46, 46, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 40%, rgba(26, 26, 26, 0.7) 0%, transparent 40%),
        linear-gradient(180deg, #1A1A1A 0%, #0A0A0A 40%, #1A1A1A 70%, #0A0A0A 100%);
}

/* Fish scale texture overlay */
.fish-scale-layer {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M0 20 A10 10 0 0 1 10 10 A10 10 0 0 1 20 20' fill='none' stroke='%23FFFFFF' stroke-width='0.5'/%3E%3Cpath d='M-10 20 A10 10 0 0 1 0 10 A10 10 0 0 1 10 20' fill='none' stroke='%23FFFFFF' stroke-width='0.5'/%3E%3Cpath d='M10 20 A10 10 0 0 1 20 10 A10 10 0 0 1 30 20' fill='none' stroke='%23FFFFFF' stroke-width='0.5'/%3E%3Cpath d='M-5 10 A10 10 0 0 1 5 0 A10 10 0 0 1 15 10' fill='none' stroke='%23FFFFFF' stroke-width='0.5'/%3E%3Cpath d='M5 10 A10 10 0 0 1 15 0 A10 10 0 0 1 25 10' fill='none' stroke='%23FFFFFF' stroke-width='0.5'/%3E%3C/svg%3E");
    opacity: 0.06;
    z-index: 1;
}

.detail-content {
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 10%;
}

.detail-meta {
    position: absolute;
    top: 40px;
    left: 8%;
}

.detail-statement {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(32px, 4.5vw, 56px);
    letter-spacing: -0.03em;
    color: #FFFFFF;
    line-height: 1.2;
    max-width: 800px;
}

/* =============================================
   Scene 6: Closing Frame
   ============================================= */

.frame-closing .frame-bg {
    background: #1A1A1A;
}

.closing-bg {
    background: linear-gradient(180deg, #0A0A0A 0%, #1A1A1A 40%, #1A1A1A 70%, #0A0A0A 100%);
}

.closing-betta {
    position: absolute;
    bottom: 15%;
    left: 0;
    width: 35vw;
    max-width: 450px;
    z-index: 1;
    filter: drop-shadow(0 0 25px rgba(0, 206, 209, 0.2));
    animation: bettaDrift 16s ease-in-out infinite;
}

@keyframes bettaDrift {
    0%, 100% { transform: translateX(0) translateY(0); }
    20% { transform: translateX(30px) translateY(-10px); }
    40% { transform: translateX(60px) translateY(5px); }
    60% { transform: translateX(40px) translateY(-15px); }
    80% { transform: translateX(15px) translateY(8px); }
}

.closing-content {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.contact-info {
    margin: 24px 0;
}

.contact-link {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0.1em;
    color: #B0B0B0;
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid rgba(176, 176, 176, 0.2);
    transition: color 0.3s ease, border-color 0.3s ease,
                transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

.contact-link:hover {
    color: #E8E4E0;
    border-color: rgba(232, 228, 224, 0.4);
}

/* =============================================
   Bleed-through Effect
   ============================================= */

.frame::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15%;
    background: linear-gradient(to bottom, transparent, rgba(10, 10, 10, 0.5));
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: screen;
}

.frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15%;
    background: linear-gradient(to top, transparent, rgba(10, 10, 10, 0.5));
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: screen;
}

.frame-opening::before {
    display: none;
}

/* =============================================
   Glitch Text Active Animation (on scroll enter)
   ============================================= */

.glitch-text.glitch-active::before {
    animation: glitchTop 0.6s ease-out;
}

.glitch-text.glitch-active::after {
    animation: glitchBottom 0.6s ease-out;
}

@keyframes glitchTop {
    0% { clip-path: inset(0 0 80% 0); transform: translateX(-6px); }
    15% { clip-path: inset(20% 0 50% 0); transform: translateX(4px); }
    30% { clip-path: inset(40% 0 30% 0); transform: translateX(-3px); }
    45% { clip-path: inset(10% 0 70% 0); transform: translateX(5px); }
    60% { clip-path: inset(55% 0 15% 0); transform: translateX(-2px); }
    80% { clip-path: inset(0 0 65% 0); transform: translateX(1px); }
    100% { clip-path: inset(0 0 65% 0); transform: translateX(-2px); }
}

@keyframes glitchBottom {
    0% { clip-path: inset(80% 0 0 0); transform: translateX(5px); }
    15% { clip-path: inset(50% 0 20% 0); transform: translateX(-3px); }
    30% { clip-path: inset(30% 0 40% 0); transform: translateX(4px); }
    45% { clip-path: inset(70% 0 10% 0); transform: translateX(-5px); }
    60% { clip-path: inset(15% 0 55% 0); transform: translateX(2px); }
    80% { clip-path: inset(65% 0 0 0); transform: translateX(-1px); }
    100% { clip-path: inset(65% 0 0 0); transform: translateX(2px); }
}

/* =============================================
   Panel Glitch on Hover
   ============================================= */

.triptych-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    background:
        linear-gradient(transparent 0%, transparent 30%, rgba(255, 0, 0, 0.05) 30%, rgba(255, 0, 0, 0.05) 32%, transparent 32%, transparent 60%, rgba(0, 0, 255, 0.05) 60%, rgba(0, 0, 255, 0.05) 62%, transparent 62%);
}

.triptych-panel:hover::after {
    animation: panelGlitch 0.2s steps(2) forwards;
}

@keyframes panelGlitch {
    0% { opacity: 1; background-position: 0 0; }
    50% { opacity: 1; background-position: 4px -8px; }
    100% { opacity: 0; }
}

/* =============================================
   Frame visibility states (for scroll triggers)
   ============================================= */

.frame .frame-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.frame.in-view .frame-content {
    opacity: 1;
    transform: translateY(0);
}

/* Opening frame starts visible */
.frame-opening .frame-content {
    opacity: 1;
    transform: translateY(0);
}

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

@media (max-width: 768px) {
    .concept-text-zone {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 85%;
        max-width: none;
        margin: 0 auto;
    }

    .triptych {
        flex-direction: column;
        align-items: center;
        gap: 3vh;
    }

    .triptych-panel,
    .triptych-panel-center {
        max-width: 85vw;
        height: 35vh;
    }

    .process-text-zone {
        width: 85%;
    }

    .display-heading {
        width: 90%;
    }

    .monogram {
        top: 16px;
        left: 16px;
    }

    .section-indicators {
        right: 12px;
    }

    .closing-betta {
        width: 60vw;
        bottom: 10%;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 36px;
    }

    .section-heading {
        font-size: 36px;
    }

    .display-heading {
        font-size: 60px;
    }

    .detail-statement {
        font-size: 28px;
    }

    .body-text {
        font-size: 15px;
    }
}
