/*
Theme Name: Steam Studio
Theme URI: https://steam.studio
Author: Steam Studio
Author URI: https://steam.studio
Description: Full-Service Creative Agency & Production Studio
Version: 2.8
*/

/* =========================================
   1. RESET & VARIABLES
   ========================================= */
:root {
    --bg-color: #050505; /* Rich Black */
    --text-color: #ffffff;
    --gray-color: #888888;
    --border-color: #333333;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: auto !important;
    overflow-x: hidden !important;
    width: 100vw;
}

/* LENIS UTILS */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* FIX FOR SPLIT TEXT ANIMATIONS */
.word {
    display: inline-block;
    white-space: nowrap;
}

/* =========================================
   2. STICKY MENU
   ========================================= */
.sticky-menu {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 99999;
    pointer-events: none;
    mix-blend-mode: difference;
}

.menu-items {
    display: flex;
    gap: 25px;
    pointer-events: auto;
}

.menu-btn {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    color: #fff !important;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    background: transparent !important;
    border: none !important;
    display: inline-block;
}
.menu-btn:hover { opacity: 1; }

/* =========================================
   3. HERO SECTION
   ========================================= */
#hero-section {
    height: 100vh; 
    height: 100dvh;
    position: relative;
    background-color: #fff;
    z-index: 1;
    overflow: hidden;
}

.canvas-container {
    position: relative; 
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================
   4. AGENCY SECTION
   ========================================= */
.agency-section {
    position: relative;
    z-index: 2;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding-bottom: 10vh;
    min-height: 100vh;
}

/* --- INTRO BLOCK --- */
.agency-intro {
    padding: 20vh 5vw 10vh 5vw; 
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.intro-text-block { 
    margin-top: 0;
}

.intro-headline {
    font-size: clamp(2rem, 5vw, 4rem); 
    line-height: 1.1;
    font-weight: 400;
    margin-bottom: 30px;
    color: #fff;
    letter-spacing: -0.02em;
}

.intro-subhead {
    font-size: clamp(1rem, 2vw, 1.8rem);
    color: var(--gray-color);
    font-weight: 300;
    line-height: 1.4;
    max-width: 800px;
    margin: 0 auto;
}

/* --- SERVICES GRID --- */
.services-wrapper {
    padding: 5vh 5vw;
    border-top: 1px solid var(--border-color);
    max-width: 1400px;
    margin: 0 auto;
}

.services-header-block {
    margin-bottom: 100px;
    text-align: left;
    padding-left: 20px;
}

.section-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-color);
    display: block;
    margin-bottom: 20px;
}

.section-headline {
    font-size: 6rem;
    line-height: 0.9;
    font-weight: 500;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -2px;
    color: #fff;
    word-break: normal;
    overflow-wrap: break-word;
}

/* --- SCATTER GRID --- */
.scatter-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    position: relative;
}

.service-category {
    margin-bottom: 60px;
    opacity: 1; 
    position: relative;
}

/* --- FIXED GRID PLACEMENT --- */
.service-category:nth-child(1) { grid-column: 1 / span 4; }
.service-category:nth-child(2) { grid-column: 7 / span 5; margin-top: 150px; }
.service-category:nth-child(3) { grid-column: 2 / span 4; margin-top: 50px; }
.service-category:nth-child(4) { grid-column: 8 / span 4; margin-top: 0px; }

/* REPLACED nth-child selector with class to prevent layout breaking */
.service-category.video-production { 
    grid-column: 3 / span 8; 
    margin-top: 120px; 
}

/* --- SERVICE ITEMS --- */
.category-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
    position: relative;
}

.category-line {
    position: absolute;
    bottom: -1px; left: 0;
    width: 0%; height: 1px;
    background-color: #fff;
}

.category-name { font-size: 1.6rem; font-weight: 500; margin: 0; display: block; color: #fff; }
.category-desc { font-size: 0.95rem; color: var(--gray-color); margin-top: 5px; display: block; font-weight: 300; }

.service-list-ul { list-style: none; padding: 0; margin: 0; }

.service-li {
    padding: 8px 0;
    font-size: 1.1rem;
    color: #ccc;
    font-weight: 300;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: default;
    display: flex;
    align-items: center;
}

.service-li:hover { color: #fff; padding-left: 10px; }
.service-li::before {
    content: '—';
    margin-right: 10px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}
.service-li:hover::before { opacity: 1; transform: translateX(0); }

.video-grid-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* --- CTA BUTTON --- */
.closing-cta {
    margin-top: 150px;
    text-align: center;
    padding: 100px 0 50px 0;
    border-top: 1px solid var(--border-color);
}
.closing-text { font-size: clamp(2rem, 3vw, 3rem); font-weight: 300; margin-bottom: 30px; color: #fff; }

.cta-button {
    display: inline-block; 
    padding: 15px 40px; 
    border: 1px solid #fff; 
    color: #fff;
    text-decoration: none; 
    text-transform: uppercase; 
    font-size: 0.9rem; 
    letter-spacing: 1px;
    transition: background 0.3s ease, color 0.3s ease; 
    background: transparent;
    border-radius: 0px; 
}
.cta-button:hover { background: #fff; color: #000; }

/* =========================================
   5. FOOTER
   ========================================= */
.site-footer {
    padding: 10vh 5vw 5vh 5vw;
    background-color: #ffffff;
    color: #000000;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.footer-cta-label {
    display: inline-block; 
    transform-origin: left center;
    font-weight: 700;
    font-size: 1rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5vh;
}

.footer-email {
    font-size: 8vw;
    line-height: 0.8;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    text-align: right;
    display: block;
    margin-bottom: 0;
}

.footer-divider { width: 100%; height: 1px; background: #000; margin-bottom: 5vh; }

.footer-bottom { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 20px; 
    padding-top: 0;
}

.footer-col { display: flex; flex-direction: column; }
.footer-label { font-size: 0.8rem; font-weight: 700; color: #999; margin-bottom: 15px; }
.footer-text { font-size: 1rem; color: #000; line-height: 1.4; }
.footer-text a { color: #000; text-decoration: none; border-bottom: 1px solid #ccc; }


/* =========================================
   6. MEDIA QUERIES
   ========================================= */
@media (max-width: 1024px) {
    .scatter-grid { display: block; }
    .service-category { 
        grid-column: span 1 !important; 
        margin-top: 0 !important; 
        margin-bottom: 40px;
        width: 100%;
    }
    .section-headline { font-size: 4rem; }
    .video-grid-list { display: block; }
}

@media (max-width: 768px) {
    .sticky-menu { top: 20px; left: 20px; }
    .menu-items { gap: 15px; }
    a.menu-btn { font-size: 12px; }

    .intro-headline { font-size: clamp(2rem, 7vw, 3rem); padding: 0 10px; }
    .intro-subhead { padding: 0 10px; }
    .section-headline { font-size: 12vw; margin-bottom: 20px; }
    .services-header-block { margin-bottom: 50px; }
    
    .service-list-ul { height: 0; overflow: hidden; opacity: 0; }
    .category-header { cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding-right: 10px; }
    .category-header::after { content: '+'; font-size: 1.5rem; font-weight: 300; transition: transform 0.3s ease; }
    .category-header.active::after { transform: rotate(45deg); }
    
    .service-category { margin-bottom: 30px; }
	.closing-text {
        font-size: 1.4rem !important; /* Forces text smaller on mobile */
        line-height: 1.3;
    }
    .cta-button { width: 100%; box-sizing: border-box; }

    .footer-top { flex-direction: column; }
    .footer-email { font-size: 12vw; text-align: left; margin-top: 20px; }
    .footer-bottom { grid-template-columns: 1fr; gap: 40px; }
}

@media (min-width: 1200px) { 
    .footer-email { font-size: 90px; max-width: 1200px; } 
}

/* =========================================
   7. DRAGGABLE VIDEO SECTION (NEW)
   ========================================= */

/* UTILITIES */
.hide-on-mobile { display: block; }
.hide-on-desktop { display: none; }

/* DESKTOP WRAPPER */
.draggable-video-wrapper {
    position: relative;
    grid-column: 1 / -1; /* Full width */
    width: 100%;
    height: 90vh; /* Taller to accommodate massive box */
    background-color: var(--bg-color);
    overflow: hidden;
    margin-bottom: 120px;
    margin-top: 60px;
    cursor: grab;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.draggable-video-wrapper:active {
    cursor: grabbing;
}

.draggable-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* CANVAS */
#video-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    will-change: contents; /* GPU OPTIMIZATION */
}

/* DRAG PROXIES (The Windows) */
.drag-proxy {
    position: absolute;
    background: rgba(255, 0, 0, 0.0);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    will-change: transform; /* GPU OPTIMIZATION */
}

/* FROSTED TABS */
.drag-tab {
    position: absolute;
    top: -30px; 
    left: -1px; 
    
    /* Frosted Glass Effect */
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Sleek Borders */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: none;
    
    /* Typography */
    color: #e0e0e0;
    padding: 6px 16px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    
    pointer-events: none; 
    white-space: nowrap;
    
    transition: width 0.3s ease;
}


/* 5 BOX LAYOUT */

/* ITEM 1: MAIN SHOWREEL */
.drag-proxy.item-1 { 
    width: 65vw; 
    height: 75vh; 
    top: 10%; 
    left: 17.5%; 
    z-index: 20; 
}

/* FILLERS */
.drag-proxy.item-2 { 
    width: 15vw; 
    height: 40vh; 
    top: 25%; 
    left: -5%; 
    z-index: 5;
}

.drag-proxy.item-3 { 
    width: 25vw; 
    height: 25vh; 
    top: 70%; 
    left: 80%; 
    z-index: 6;
}

.drag-proxy.item-4 { 
    width: 20vw; 
    height: 15vh; 
    top: 5%; 
    left: 85%; 
    z-index: 4;
}

.drag-proxy.item-5 { 
    width: 18vw; 
    height: 22vh; 
    top: 75%; 
    left: 10%; 
    z-index: 8; 
}


.drag-instruction {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gray-color);
    font-size: 0.8rem;
    letter-spacing: 2px;
    pointer-events: none;
    z-index: 5;
    text-transform: uppercase;
}

/* MOBILE CREATIVE SECTION */
.mobile-creative-section {
    padding: 5vh 5vw;
    margin-bottom: 80px;
    grid-column: 1 / -1;
}

.mobile-image-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
    
    /* DISABLE SAVING ON MOBILE */
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -o-user-select: none;
    user-select: none;
    -webkit-touch-callout: none; /* iOS Safari */
    pointer-events: none; /* Disables all interaction */
    
    /* GPU OPTIMIZATION */
    will-change: transform;
}

.mobile-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    mix-blend-mode: difference;
    pointer-events: none;
}

.mobile-overlay-text h3 {
    font-size: 3rem;
    line-height: 1;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    font-weight: 700;
}

/* =========================================
   8. PERFORMANCE OPTIMIZATIONS (GPU)
   ========================================= */
.drag-proxy, 
.mobile-img, 
.service-category {
    will-change: transform; 
    transform: translateZ(0); 
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
}

/* MEDIA QUERIES FOR TOGGLING */
@media (max-width: 1024px) {
    .hide-on-mobile { display: none !important; }
    .hide-on-desktop { display: block !important; }
}