/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-color: #e6e6e6; 
    --bg-accent: #f2f2f2;
    --text-main: #111111; 
    --text-muted: #666666;
    --accent-orange: #ff3c00;
    --line-color: rgba(0,0,0,0.1);
    --font-display: 'Oswald', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-elegant: 'Italiana', serif;
}

html.lenis { height: auto; } 
.lenis.lenis-smooth { scroll-behavior: auto; } 
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; } 
.lenis.lenis-stopped { overflow: hidden; } 
.lenis.lenis-scrolling iframe { pointer-events: none; } 

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* =========================================
   2. CUSTOM CURSOR
   ========================================= */
.cursor-dot, .cursor-circle {
    position: fixed; top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: difference;
}
.cursor-dot { width: 8px; height: 8px; background: #fff; }
.cursor-circle {
    width: 40px; height: 40px;
    border: 1px solid rgba(255,255,255,0.8);
    transition: width 0.2s, height 0.2s, background 0.2s;
}
body.hovering .cursor-circle {
    width: 60px; height: 60px;
    background: rgba(255,255,255,1);
    border-color: #fff;
}

/* =========================================
   3. TEXTURES & OVERLAYS
   ========================================= */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScyMDAlJyBoZWlnaHQ9JzIwMCUnPjxmaWx0ZXIgaWQ9J25vaXNlJz48ZmVUdXJidWxlbmNlIHR5cGU9J2ZyYWN0YWxOb2lzZScgYmFzZUZyZXF1ZW5jeT0nMC42NScgbbnVtT2N0YXZlcz0nMScgc3RpdGNoVGlsZXM9J3N0aXRjaCcvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIGZpbHRlcj0ndXJsKCNub2lzZSknIG9wYWNpdHk9JzAuMDUnLz48L3N2Zz4=');
    pointer-events: none; z-index: 9000; opacity: 0.4;
}
.bg-grid {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(var(--line-color) 1px, transparent 1px), linear-gradient(90deg, var(--line-color) 1px, transparent 1px);
    background-size: 50px 50px; pointer-events: none; z-index: -1; opacity: 0.5;
}

/* =========================================
   4. NAVIGATION & MOBILE MENU
   ========================================= */
.hud-nav {
    position: fixed; top: 0; left: 0; width: 100%; height: 80px;
    z-index: 1000; display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.3s, backdrop-filter 0.3s;
}
.nav-logo-mini {
    font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: 2px;
    opacity: 0; color: var(--text-main);
}
.main-nav a {
    text-decoration: none; color: var(--text-main); margin-left: 30px;
    text-transform: uppercase; font-size: 0.85rem; font-weight: 600; letter-spacing: 1px;
    font-family: monospace;
}

/* Hamburger */
.mobile-menu-toggle { display: none; width: 30px; height: 20px; cursor: pointer; position: relative; z-index: 5002; }
.mobile-menu-toggle span {
    display: block; width: 100%; height: 2px; background: #000;
    position: absolute; left: 0; transition: 0.3s;
}
.mobile-menu-toggle span:first-child { top: 0; }
.mobile-menu-toggle span:last-child { bottom: 0; }
.mobile-menu-toggle.active span:first-child { top: 9px; transform: rotate(45deg); }
.mobile-menu-toggle.active span:last-child { bottom: 9px; transform: rotate(-45deg); }

/* Mobile Overlay */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: #e6e6e6; z-index: 5001; display: flex;
    justify-content: center; align-items: center;
    transform: translateY(-100%); transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}
.mobile-menu-overlay.active { transform: translateY(0); }
.mobile-links { display: flex; flex-direction: column; text-align: center; gap: 40px; }
.m-link { font-family: var(--font-display); font-size: 3rem; text-transform: uppercase; color: #000; text-decoration: none; }

/* =========================================
   5. HERO SCENE
   ========================================= */
.hero-scene { height: 400vh; position: relative; z-index: 2; background: var(--bg-color); }
.hero-sticky {
    position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden;
    display: flex; justify-content: center; align-items: center;
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    transition: opacity 0.5s linear;
}
.hero-bg-1 { background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?q=80&w=2301&auto=format&fit=crop'); opacity: 1; }
.hero-bg-2 { background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2070&auto=format&fit=crop'); opacity: 0; }
.hero-bg-3 { background-image: url('https://images.unsplash.com/photo-1517581177697-00bbecaddf2d?q=80&w=1974&auto=format&fit=crop'); opacity: 0; }
.hero-bg-4 { background-image: url('https://images.unsplash.com/photo-1506158669146-619067262a00?q=80&w=2070&auto=format&fit=crop'); opacity: 0; }
.hero-bg::after { content: ''; position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(230, 230, 230, 0.3); }

.hero-center { position: relative; z-index: 10; text-align: center; mix-blend-mode: hard-light; }
.main-title {
    font-family: var(--font-display); font-size: 8rem; line-height: 1; font-weight: 700;
    color: #111; letter-spacing: -5px; transform-origin: center top;
}
.subtitle { font-family: var(--font-elegant); font-size: 2rem; margin-top: 10px; color: #000; }

.scroll-hint {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    z-index: 20; color: #000; font-size: 0.8rem; font-weight: 600;
}
.scroll-hint .line { width: 1px; height: 40px; background: #000; animation: pulseLine 2s infinite; }
@keyframes pulseLine { 0% { height: 0; opacity: 0;} 50% { height: 40px; opacity: 1;} 100% { height: 40px; opacity: 0; transform: translateY(40px); } }

/* Hero Service Cards */
.hero-service {
    position: absolute; bottom: 15%; right: 10%; width: 350px;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px);
    padding: 30px; border-left: 3px solid var(--accent-orange);
    opacity: 0; transform: translateY(30px); transition: all 0.6s ease;
    pointer-events: none; z-index: 15; box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    color: #000;
}
.hero-service.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.hero-service-title { font-family: var(--font-display); font-size: 2.2rem; text-transform: uppercase; margin-bottom: 5px; color: #000;}
.hero-service-subtitle { font-family: var(--font-elegant); font-size: 1.1rem; color: #666; margin-bottom: 15px; }
.hero-service-text { font-size: 0.95rem; line-height: 1.6; color: #333; margin-bottom: 20px; }
.hero-btn { text-decoration: underline; color: #000; font-weight: 700; }

/* =========================================
   6. CONTENT WRAPPER
   ========================================= */
.content-wrap {
    position: relative;
    z-index: 2; /* Sits above footer */
    background-color: var(--bg-color); /* Hides footer until end */
    margin-bottom: 80vh; /* Space for footer to reveal */
    box-shadow: 0 50px 50px rgba(0,0,0,0.1);
}

/* =========================================
   7. SECTIONS (Marquee, Manifesto)
   ========================================= */
.clients-section {
    padding: 40px 0; background: #fff; border-bottom: 1px solid var(--line-color);
    overflow: hidden; white-space: nowrap; display: flex; align-items: center;
}
.clients-track { display: flex; animation: scrollLeft 20s linear infinite; gap: 80px; padding: 0 40px; }
.client-logo { font-family: var(--font-display); font-size: 1.5rem; color: #ccc; font-weight: 700; text-transform: uppercase; }
@keyframes scrollLeft { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.manifesto-section { padding: 100px 0; border-bottom: 1px solid var(--line-color); overflow: hidden; }
.scrolling-text {
    white-space: nowrap; font-family: var(--font-display); font-size: 6rem;
    color: transparent; -webkit-text-stroke: 1px rgba(0,0,0,0.1);
    animation: scrollText 30s linear infinite;
}
@keyframes scrollText { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.manifesto-content { padding: 80px 40px; text-align: center; max-width: 1000px; margin: 0 auto; }
.big-text { font-size: 3rem; line-height: 1.2; font-weight: 300; }
.highlight { font-family: var(--font-elegant); border-bottom: 2px solid #000; font-style: italic;}

/* =========================================
   8. NEW DETAILED SERVICES (ZIGZAG)
   ========================================= */
.detailed-services {
    padding: 120px 40px;
    background-color: var(--bg-color);
}
.ds-row {
    display: flex; align-items: center; gap: 60px; margin-bottom: 100px;
}
.ds-row.reverse { flex-direction: row-reverse; }
.ds-row:last-child { margin-bottom: 0; }

.ds-content { flex: 1; padding: 40px; position: relative; }
.ds-image { flex: 1; height: 500px; overflow: hidden; position: relative; }
.ds-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.ds-image:hover img { transform: scale(1.05); }

/* Typography */
.ds-number {
    font-family: var(--font-display); font-size: 8rem; color: rgba(0,0,0,0.03);
    position: absolute; top: -60px; left: 0; line-height: 1; z-index: -1;
}
.ds-icon { font-size: 2rem; color: var(--accent-orange); margin-bottom: 20px; display: block; }
.ds-title { font-family: var(--font-display); font-size: 3rem; margin-bottom: 20px; text-transform: uppercase; }
.ds-text { font-size: 1.1rem; line-height: 1.7; color: var(--text-muted); }

/* =========================================
   9. SPLIT WORKS SECTION (DESKTOP)
   ========================================= */
.split-works-section {
    position: relative;
    background-color: var(--bg-color);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background-image: linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}
.split-wrapper { display: flex; min-height: 100vh; }

.works-list-col {
    width: 50%; padding: 100px 60px;
    border-right: 1px solid rgba(0,0,0,0.1);
    background: rgba(230, 230, 230, 0.6); backdrop-filter: blur(5px);
    z-index: 2;
}
.section-label {
    font-family: 'Manrope', sans-serif; font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 2px; color: #666; margin-bottom: 60px; padding-bottom: 20px;
    border-bottom: 2px solid #000; display: inline-block;
}
.works-menu { display: flex; flex-direction: column; }
.work-link {
    text-decoration: none; padding: 40px 0; border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex; flex-direction: column; /* Changed for mobile stacking */
    justify-content: center; align-items: flex-start; transition: 0.3s;
    cursor: pointer;
}
.w-info { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.w-name { font-family: 'Oswald', sans-serif; font-size: 3.5rem; font-weight: 700; color: #111; text-transform: uppercase; transition: 0.3s; }
.w-meta { font-family: 'Manrope', sans-serif; font-size: 0.9rem; color: #666; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; }

/* Mobile Image (Hidden on Desktop) */
.mobile-project-img {
    display: none; width: 100%; height: 250px; margin-bottom: 20px; overflow: hidden;
}
.mobile-project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }

.works-menu:hover .work-link { opacity: 0.3; }
.works-menu .work-link:hover, .works-menu .work-link.active { opacity: 1; padding-left: 20px; }
.works-menu .work-link:hover .w-name, .works-menu .work-link.active .w-name { -webkit-text-stroke: 1px #000; color: transparent; }

.works-img-col { width: 50%; position: relative; height: auto; }
.image-display {
    position: sticky; top: 0; height: 100vh; width: 100%;
    background-color: #ccc; background-size: cover; background-position: center;
    background-image: url('https://images.unsplash.com/photo-1557804506-669a67965ba0?q=80&w=1974');
}
.image-display::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.1);
}

/* =========================================
   10. BLUEPRINT GRID
   ========================================= */
.blueprint-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #000; border-bottom: 1px solid #000; background: #fff; }
.grid-item {
    padding: 60px 30px; border-right: 1px solid #eee; position: relative;
    height: 350px; display: flex; flex-direction: column; justify-content: space-between;
    transition: background 0.3s; overflow: hidden;
}
.grid-item:last-child { border-right: none; }
.grid-item:hover { background: #111; color: #fff; }
.grid-item h4 { font-size: 1.8rem; font-family: var(--font-display); text-transform: uppercase; position: relative; z-index: 2;}
.grid-item p { position: relative; z-index: 2; }
.grid-item .idx { font-weight: 700; opacity: 0.3; }
.icon-bg { position: absolute; bottom: -20px; right: -20px; font-size: 8rem; color: rgba(0,0,0,0.03); transition: 0.5s; }
.grid-item:hover .icon-bg { color: rgba(255,255,255,0.1); transform: scale(1.2) rotate(-10deg); }

/* =========================================
   11. CONTACT
   ========================================= */
.contact-terminal { background: #e6e6e6; padding: 100px 40px; display: flex; flex-direction: column; align-items: center; }
.invoice-box {
    background: #fff; width: 100%; max-width: 700px; padding: 60px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.05); border: 1px solid #ccc; position: relative;
}
.invoice-box::before { content: ''; position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; border: 2px solid #e6e6e6; pointer-events: none; }
.terminal-header { display: flex; justify-content: space-between; font-family: monospace; border-bottom: 2px dashed #000; padding-bottom: 20px; margin-bottom: 40px; }
.input-group { margin-bottom: 30px; position: relative; z-index: 2;}
.input-group label { display: block; font-size: 0.7rem; font-weight: 700; margin-bottom: 5px; letter-spacing: 1px; color: #888; }
.input-group input { width: 100%; background: #f9f9f9; border: 1px solid #ddd; color: #000; padding: 15px; font-size: 1.1rem; font-family: var(--font-body); transition: 0.3s; }
.input-group input:focus { outline: none; border-color: #000; background: #fff; }
.cyber-btn { background: #000; color: #fff; border: none; padding: 20px 40px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; width: 100%; transition: 0.3s; position: relative; z-index: 2; overflow: hidden; }
.cyber-btn:hover { background: #333; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/* =========================================
   12. FIXED FOOTER (REVEAL)
   ========================================= */
.main-footer {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 80vh;
    background: #111; color: #fff; padding: 80px 40px;
    display: flex; flex-direction: column; justify-content: space-between;
    z-index: 1; /* Behind content */
}
.footer-big { font-family: var(--font-display); font-size: 20vw; line-height: 0.8; opacity: 0.2; text-align: center; margin-bottom: -50px;}
.footer-links { display: flex; justify-content: space-between; font-size: 1rem; color: #888; text-transform: uppercase; letter-spacing: 1px; z-index: 2;}
.footer-links a { color: #fff; text-decoration: none; margin-right: 20px;}

/* =========================================
   13. RESPONSIVE / MOBILE
   ========================================= */
.reveal-up { opacity: 0; transform: translateY(50px); transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1); }
.reveal-up.in-view { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
    /* Restore Cursor */
    * { cursor: auto !important; }
    .cursor-dot, .cursor-circle { display: none !important; }

    /* Nav */
    .main-nav { display: none; }
    .mobile-menu-toggle { display: block; }

    /* Fonts */
    .main-title { font-size: 3.5rem; letter-spacing: -2px;}
    .w-name { font-size: 2rem; }
    .footer-big { font-size: 22vw; margin-bottom: 0; }

    /* Zigzag Services */
    .detailed-services { padding: 60px 20px; }
    .ds-row, .ds-row.reverse { flex-direction: column-reverse; gap: 30px; margin-bottom: 80px; }
    .ds-image { width: 100%; height: 300px; }
    .ds-content { padding: 0; }
    .ds-title { font-size: 2rem; }

    /* Split Works Section - STACKING FIX */
    .split-wrapper { flex-direction: column; }
    .works-list-col { width: 100%; border-right: none; padding: 60px 20px; }
    .works-img-col { display: none; /* Hide sticky image column */ }
    
    /* Reveal Mobile Images */
    .mobile-project-img { display: block; } 
    .works-menu .work-link:hover { padding-left: 0; opacity: 1;}
    .works-menu:hover .work-link { opacity: 1; } /* Disable dimming on mobile */

    /* Layout */
    .blueprint-grid { grid-template-columns: 1fr; }
    .workflow-steps { grid-template-columns: 1fr; }
    .hero-service { width: 90%; right: 5%; bottom: 10%; padding: 20px; }
    
    /* Footer Logic Mobile */
    .main-footer { position: relative; height: auto; z-index: 2; padding: 60px 20px;}
    .content-wrap { margin-bottom: 0; }
}