:root {
    --bg-color: #000000;
    --text-color: #FFFFFF;
    --font-main: 'Space Grotesk', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    height: 600vh;
}

/* --- CANVAS & BG --- */
#canvas-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 1; pointer-events: none;
    transition: opacity 0.5s ease; 
}

.grain-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 50; opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* --- TIMELINE RAIL --- */
.timeline-track {
    position: absolute; top: 0; left: 5vw; width: 2px; height: 100%;
    background: rgba(255, 255, 255, 0.15); z-index: 40;
}
.marker {
    position: absolute; left: -9px; display: flex; align-items: center; gap: 15px;
    font-family: 'Courier New', monospace; color: #fff;
}
.marker::before { content: ''; display: block; width: 20px; height: 1px; background: #fff; }

/* --- TEXT LAYOUTS --- */
.text-block {
    position: absolute;
    z-index: 20; 
    max-width: 450px;
    opacity: 0; 
    transform: translateY(30px);
    padding: 0 20px; 
    box-sizing: border-box;
}

/* Default Desktop Positions */
.center-top {
    top: 15vh; left: 50%; transform: translateX(-50%);
    text-align: center; width: 100%; max-width: 900px;
    opacity: 1; 
}

/* Safety Margins: 18% pushes text away from center cube */
.left-side { 
    left: 18%; 
    text-align: left; 
}

.right-side { 
    right: 18%; 
    text-align: right; 
}

.center-bottom {
    left: 50%; transform: translateX(-50%);
    text-align: center; width: 100%; max-width: 700px;
}

/* Typography */
.brand-name { font-size: 0.9rem; letter-spacing: 0.2em; opacity: 0.7; margin-bottom: 20px; }
.hero-title { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; margin: 0 0 20px 0; text-transform: uppercase; }
.hero-sub { font-size: 1.2rem; font-weight: 300; opacity: 0.8; }

.tag { display: block; font-family: 'Courier New', monospace; font-size: 0.8rem; margin-bottom: 10px; color: #666; }
h2 { font-size: 2.8rem; margin: 0 0 20px 0; font-weight: 400; text-transform: uppercase; }

.clean-list { list-style: none; padding: 0; margin: 0; }
.clean-list li {
    font-size: 1.3rem; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.2);
    font-weight: 300;
}

.client-row { margin-bottom: 40px; }
.client-row h3 { font-size: 2.2rem; margin: 0; font-weight: 400; }
.client-row p { margin: 5px 0 0 0; opacity: 0.6; font-family: 'Courier New', monospace; }

/* --- GALLERY SECTION --- */
.gallery-wrapper {
    position: absolute;
    top: 500vh; 
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 30;
    background: transparent; 
    overflow: hidden;
    display: flex;
    justify-content: center;
}

#gallery-canvas-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 35;
}

.gallery-header {
    position: absolute;
    top: 5%; 
    text-align: center;
    z-index: 40;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.gallery-header .tag {
    font-family: 'Courier New', monospace;
    color: #888; 
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.gallery-header h2 {
    font-family: var(--font-main);
    color: #FFFFFF;
    font-size: 4rem; 
    font-weight: 400;
    text-transform: uppercase;
    margin-top: 5px;
    letter-spacing: -0.02em;
}

/* ========================================= */
/* TABLET RESPONSIVE (1024px)                */
/* ========================================= */
@media (max-width: 1200px) {
    .left-side { left: 8%; }  
    .right-side { right: 8%; }
    .hero-title { font-size: 3.5rem; }
    h2 { font-size: 2.2rem; }
}

/* ========================================= */
/* MOBILE RESPONSIVE (768px) - FIXED         */
/* ========================================= */
@media (max-width: 768px) {
    /* 1. Hide Sidebar Timeline */
    .timeline-track { display: none; }

    /* 2. GLASS CARD EFFECT: Solves overlap readability */
    .text-block {
        width: 90%;
        max-width: none;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) translateY(30px);
        text-align: center !important; 
        padding: 30px 20px;
        
        /* Semi-transparent black background with blur */
        background: rgba(10, 10, 15, 0.75);
        backdrop-filter: blur(8px); 
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 16px;
    }

    /* 3. Vertical Spacing: Spread sections out more */
    .center-top { top: 12vh; background: transparent; border: none; backdrop-filter: none; } /* Hero text stays clean */
    
    section.left-side[style*="top: 130vh"] { top: 100vh !important; }
    section.right-side[style*="top: 160vh"] { top: 170vh !important; }
    section.left-side[style*="top: 280vh"] { top: 250vh !important; }
    section.right-side[style*="top: 310vh"] { top: 320vh !important; }
    
    .center-bottom { top: 400vh !important; background: transparent; border: none; }

    /* 4. Mobile Typography Scale Down */
    h2 { font-size: 2rem; }
    .hero-title { font-size: 2.5rem; margin-bottom: 15px; }
    .hero-sub { font-size: 1rem; width: 100%; margin: 0 auto; line-height: 1.4; }
    
    .gallery-header { top: 8%; }
    .gallery-header h2 { font-size: 2.2rem; }
}