:root {
    --bg-light: #FFFFFF;
    --bg-dark: #0A0A0A;
    --text-main: #000000;
    --text-muted: #888;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --frame-color: #000000;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: var(--font-sans);
    margin: 0;
    overflow-x: hidden;
}

/* THE FRAME SYSTEM */
.site-frame {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 1px solid var(--frame-color);
    pointer-events: none;
    z-index: 100;
}

.corner-label {
    position: fixed;
    font-family: var(--font-mono);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    z-index: 101;
    color: var(--text-main);
}

.top-left { top: 20px; left: 20px; }
.top-right { top: 20px; right: 20px; }
.bottom-left { bottom: 20px; left: 20px; }
.bottom-right { bottom: 20px; right: 20px; }

/* NAVIGATION TRIPARTITE (NEW ISO) */
.nav-split {
    position: fixed;
    top: 40px;
    left: 80px;
    right: 80px;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    align-items: center;
    z-index: 105;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.2em;
}

.nav-group-left { display: flex; gap: 3rem; justify-content: flex-start; }
.nav-group-right { display: flex; gap: 3rem; justify-content: flex-end; }

.nav-logo-center {
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.4em;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

.nav-logo-center:hover { opacity: 0.7; }

/* ─── LANG TOGGLE ─────────────────────────────────────────── */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 32px;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.3;
    transition: opacity 0.2s;
    padding: 2px 0;
    color: inherit;
}

.lang-btn.active { opacity: 1; }
.lang-btn:hover { opacity: 0.7; }

.lang-sep {
    font-size: 8px;
    opacity: 0.2;
}


/* BURGER MENU & MOBILE OVERLAY */
.burger-icon {
    display: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 1000;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--bg-dark);
    color: var(--bg-light);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    text-align: center;
    font-weight: 800;
}

.mobile-menu-content a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

.mobile-menu-content a:hover {
    opacity: 0.7;
}

.mobile-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 30px;
    cursor: pointer;
    font-family: var(--font-mono);
}

/* WORK NAVIGATION REMOVED PER BRIEF */

/* LAB & INSIGHTS SPLIT SYSTEM */
.lab-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
    overflow: hidden;
    background: white;
}

.split-side {
    height: 100%;
    overflow-y: auto;
    padding: 160px 80px 80px 80px;
    scrollbar-width: none;
    position: relative;
}

.split-side::-webkit-scrollbar { display: none; }

.split-side:first-child { border-right: none; }

.section-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.3em;
    opacity: 0.4;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-tag::after {
    content: "";
    width: 30px;
    height: 1px;
    background: currentColor;
}

.lab-item { margin-bottom: 60px; }
.lab-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center center; margin-bottom: 1.5rem; }

.insight-item { margin-bottom: 80px; }
.insight-item img { 
    width: 100%; 
    max-width: 280px; 
    aspect-ratio: 1 / 1; 
    object-fit: cover; 
    margin-bottom: 1.5rem; 
    border: 1px solid rgba(0,0,0,0.05);
}

/* HORIZONTAL WORK GALLERY REDESIGN */
.work-section {
    padding: 0;
    background: var(--bg-light);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

.work-gallery-container {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    cursor: crosshair;
}

/* Lower the main title and container */
.work-section {
    padding-top: 15vh;
}

.work-gallery-container h1, 
.work-section h1 {
    margin-top: 5vh !important;
    margin-left: 5vw !important;
}

/* Ensure the fixed top menu doesn't fight with the title */
.fixed.top-0.left-0.w-full {
    background: transparent;
    pointer-events: none;
    z-index: 100;
}
.fixed.top-0.left-0.w-full > * {
    pointer-events: auto;
}

/* RE-CENTER GALLERY AS TITLES ARE NOW ABOVE */
.work-gallery-wrapper {
    display: flex;
    align-items: center; /* Center to ensure visibility of full height */
    height: 100%;
    padding: 0 10vw;
    width: max-content;
    will-change: transform;
    margin-top: 10vh; /* Move down slightly to clear main title */
}

.work-gallery-item {
    position: relative;
    flex-shrink: 0;
    margin-right: 10vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 32vw; /* Reduced from 42vw to ensure height fits on screen */
    max-height: 55vh; /* Safety limit for height */
    opacity: 0;
    animation: stagger-up 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--index, 0) * 0.1s);
}

/* BALANCED STAGGERED OFFSETS - For centered alignment */
.stagger-up { --stagger-offset: -8vh; }
.stagger-down { --stagger-offset: 8vh; }
.stagger-center { --stagger-offset: 0; }

@keyframes stagger-up {
    from {
        opacity: 0;
        transform: translateY(15vh);
    }
    to {
        opacity: 1;
        transform: translateY(var(--stagger-offset, 0));
    }
}

.work-gallery-item .media-container {
    width: 100%;
    aspect-ratio: 16 / 11;
    background: #f0f0f0;
    overflow: hidden;
    position: relative;
    clip-path: inset(0% 0% 0% 0%);
    transition: clip-path 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-gallery-item:hover .media-container {
    clip-path: inset(2% 2% 2% 2%);
}

.work-gallery-item img {
    width: 100%;
    height: 130%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: filter 1.2s ease;
    position: absolute;
    top: -15%;
    left: 0;
    will-change: transform;
}

.work-gallery-item:hover img {
    filter: grayscale(0%) contrast(1);
}

.work-info {
    margin-top: 2.5rem;
    position: relative;
    z-index: 2;
    padding-left: 5px;
}

.work-category {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 0.8rem;
}

.work-caption {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: left;
    width: 100%;
    display: flex;
    align-items: baseline;
    gap: 1.5rem; /* Space between title and category */
}

.work-caption h3 {
    font-size: 0.7rem !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 0;
    flex-shrink: 0;
}

.work-caption p {
    font-size: 0.6rem !important;
    text-transform: uppercase;
    opacity: 0.5;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.work-caption p.font-light {
    display: none; /* Hide long description in gallery view to match Detroit */
}

.work-title {
    font-size: 6vw;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 0.85;
    margin: 0;
    color: transparent;
    -webkit-text-stroke: 1px var(--text-main);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    white-space: nowrap;
}

.work-gallery-item:hover .work-title {
    color: var(--text-main);
    -webkit-text-stroke: 1px transparent;
    transform: translateX(10px);
}

/* SECTION HEADER */
.work-header {
    position: fixed;
    top: 140px;
    left: 80px;
    z-index: 10;
    pointer-events: none;
}

.work-header h1 {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.6em;
    text-transform: uppercase;
    margin: 0;
    opacity: 0.2;
}

/* SPLIT SECTIONS (LAB & INSIGHTS) */
.split-section {
    display: flex;
    min-height: 100vh;
    border-top: 1px solid #eee;
}

.split-col {
    width: 50%;
    padding: 80px;
    border-right: 1px solid #eee;
}

/* STUDIO SECTION ISO */
.studio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 160px 80px;
}

/* RESPONSIVE LAB SPLIT */
@media (max-width: 1024px) {
    .lab-split-container {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        scroll-behavior: smooth;
    }
    .lab-split-container::-webkit-scrollbar {
        display: none;
    }
    .split-side {
        width: 100vw;
        height: 100vh;
        flex-shrink: 0;
        scroll-snap-align: start;
        overflow-y: auto;
        padding: 120px 40px 40px 40px;
    }
    .split-side:first-child {
        border-bottom: none;
        border-right: none;
    }
    .split-side:nth-child(2) {
        padding-top: 120px; /* Restored since it's back at the top */
    }
}

@media (max-width: 768px) {
    .split-side, .split-side:nth-child(2) {
        padding: 120px 20px 40px 20px;
    }
    .nav-split {
        left: 20px;
        right: 20px;
        top: 30px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .nav-group-left, .nav-group-right {
        display: none;
    }
    .burger-icon {
        display: block;
    }
    .nav-logo-center {
        letter-spacing: 0.2em;
    }
    .work-section {
        padding: 120px 20px 40px 20px;
    }
    .work-gallery-item {
        width: 80vw;
    }
    .work-nav-container {
        left: 20px;
        right: 20px;
    }
    .studio-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 120px 20px 40px 20px;
    }
}
