/* --- AGENCY DS - ELITE REFINEMENTS V24 (Mobile Process Text Fix) --- */

:root {
    --bg-color: #0d0d0d;
    --text-color: #e0e0e0;
    --accent-color: #00E5FF;
    /* TURQUOISE */
    --lightbox-bg: #ffffff;
    --lightbox-text: #1a1a1a;
}

/* GLOBAL SCROLLBAR HIDE */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* FORCE HIDDEN SCROLLBAR */
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-overflow-scrolling: touch;
}

/* THREE.JS CONTAINER */
#webgl-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
    opacity: 1;
}

/* OVERLAYS */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    transition: opacity 1s ease-out;
}

/* SCROLL CONTENT */
.scroll-view {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}

.scroll-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

#target-content {
    z-index: 20;
    pointer-events: auto;
}

#target-spool {
    z-index: 30;
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
}

.spool-sprite {
    position: absolute;
    top: -200px;
    left: -200px;
    width: 400px;
    height: 400px;
    background-image: url('assets/images/sprite.webp');
    background-size: 5000% 200%;
    transition: transform 0.1s linear;
    pointer-events: none;
}

@media (max-width: 768px) {
    .spool-sprite {
        width: 250px;
        height: 250px;
        top: -125px;
        left: -125px;
    }
}

/* TYPOGRAPHY */
h1,
h2,
h3,
.heading-font {
    font-family: 'Italiana', serif;
    font-weight: 400;
    text-transform: uppercase;
}

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

/* GLOBAL TEXT REVEAL */
.scroll-container p,
.scroll-container h1,
.scroll-container h2,
.scroll-container h3,
.reveal-text {
    color: rgba(255, 255, 255, 0.15);
    transition: color 0.8s ease-out, opacity 0.8s ease-out;
}

.in-view {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* HIGHLIGHT */
.highlight-text {
    color: var(--accent-color);
    font-size: 1.4rem;
    font-family: 'Italiana';
    margin: 40px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 20px 0;
    text-align: center;
    opacity: 0.2;
}

.highlight-text.in-view {
    opacity: 1 !important;
    color: var(--accent-color) !important;
}

/* NARROW ABOUT NARRATIVE */
.about-narrative {
    max-width: 600px;
    margin: 30px auto 0 auto;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-narrative p {
    margin-bottom: 20px;
}

/* NAV */
.nav-container {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 200;
    pointer-events: none;
    display: flex;
    justify-content: center;
}

.navbar {
    width: 100%;
    max-width: 1400px;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* NAV LOGO SHINE WRAPPER */
.nav-logo-wrapper {
    position: relative;
    display: inline-block;
    overflow: hidden;
    pointer-events: auto;
}

/* LOGO IMG STYLING */
.nav-logo-img {
    height: 80px;
    width: auto;
    display: block;
    mix-blend-mode: difference;
}

@media (min-width: 768px) {
    .nav-logo-img {
        height: 160px;
    }
}

/* MASKED SHINE EFFECT */
.nav-logo-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
    transform: skewX(-25deg);
    animation: metalShine 5s infinite;
    pointer-events: none;
    mix-blend-mode: overlay;

    /* MASKING */
    -webkit-mask-image: url('assets/images/nav_logo.webp');
    mask-image: url('assets/images/nav_logo.webp');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

@keyframes metalShine {
    0% {
        left: -150%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.contact-link {
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Italiana', serif;
    font-size: 2rem;
    color: #fff;
    pointer-events: auto;
    mix-blend-mode: difference;
    transition: opacity 0.3s;
}

.contact-link:hover {
    opacity: 0.7;
}

/* LANG SELECT */
.lang-select {
    background: transparent;
    border: none;
    font-family: 'Italiana', serif;
    font-size: 1rem;
    color: #fff;
    cursor: pointer;
    mix-blend-mode: difference;
    margin-left: 20px;
    outline: none;
    text-transform: uppercase;
    padding: 5px;
    pointer-events: auto;
}

.lang-select option {
    background: #000;
    color: #fff;
    font-family: sans-serif;
}

/* SECTIONS */
.wrap-section {
    position: absolute;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 5%;
    box-sizing: border-box;
}

.content-box {
    max-width: 1200px;
    width: 100%;
    position: relative;
}

/* HERO LOGO (SIMPLE) */
.main-logo-hero {
    width: 80%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto 40px auto;
}

/* FOOTER VFX */
.footer-vfx-wrapper {
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    z-index: 1;
    pointer-events: none;
    padding-top: 20px;
    display: flex;
    justify-content: center;
    mix-blend-mode: overlay;
    opacity: 0.2;
    transition: opacity 0.5s ease;
    height: auto;
    overflow: visible;
}

.vfx-header {
    font-family: 'Italiana', serif;
    font-size: 15vw;
    font-weight: 400;
    width: 100%;
    color: #fff;
    margin: 0;
    padding: 0;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    mix-blend-mode: normal;
    display: block;
}

/* SERVICES GRID */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    text-align: left;
    position: relative;
    z-index: 2;
}

.service-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    transition: all 0.3s;
}

.service-card:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.02);
}

.service-card h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    opacity: 0.5;
    transition: opacity 0.5s;
}

.service-card.in-view h3 {
    opacity: 1;
}

/* PROCESS */
.process-horizontal-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-top: 80px;
    gap: 0;
    height: 700px;
    position: relative;
    z-index: 2;
}

.process-column {
    position: relative;
    width: 20%;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 40px;
}

.process-column:last-child {
    border-right: none;
}

.p-num {
    font-family: 'Italiana';
    font-size: 3rem;
    transform: rotate(90deg);
    margin-bottom: 60px;
    color: rgba(255, 255, 255, 0.1);
    transition: color 1s ease;
}

.process-column.in-view .p-num {
    color: #fff;
}

.p-content {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: rgba(255, 255, 255, 0.1);
    text-align: left;
    height: 500px;
    font-size: 1rem;
    line-height: 2;
    letter-spacing: 2px;
}

.p-content.in-view {
    color: #fff;
}

.p-content h3 {
    font-size: 1.4rem;
    border-left: 2px solid var(--accent-color);
    padding-left: 15px;
    margin-left: 15px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.2) !important;
}

.p-content.in-view h3 {
    color: #fff !important;
}

/* WORKS */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
    position: relative;
    z-index: 2;
}

.work-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease, filter 0.5s ease;
    filter: grayscale(100%) opacity(0.8);
}

.work-item:hover img {
    transform: scale(1.1);
    opacity: 1;
    filter: url(#ink-filter) grayscale(0%);
}

.work-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.work-item:hover .work-info {
    opacity: 1;
}

.work-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #fff;
}

/* STATS */
.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    border-top: 1px solid #222;
    padding-top: 40px;
    position: relative;
    z-index: 2;
}

.stat-item h3 {
    font-size: 3rem;
    color: #fff;
    margin: 0;
    font-variant-numeric: tabular-nums;
    opacity: 0.2;
}

.stat-item.in-view h3 {
    opacity: 1;
}

.stat-item p {
    color: var(--accent-color);
    font-size: 0.8rem;
    letter-spacing: 2px;
    opacity: 0.2;
}

.stat-item.in-view p {
    opacity: 1;
}

/* FOOTER CONTENT */
.address-grid {
    display: flex;
    gap: 80px;
    justify-content: center;
    text-align: left;
    margin-bottom: 60px;
    margin-top: 150px;
    position: relative;
    z-index: 2;
}

.huge-email {
    position: relative;
    z-index: 2;
    font-size: 5vw;
    color: rgba(255, 255, 255, 0.2);
    display: block;
    margin-top: 50px;
    transition: color 0.3s;
    text-align: center;
}

.huge-email.in-view {
    color: #fff;
}

.huge-email:hover {
    color: var(--accent-color) !important;
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lb-content {
    width: 90%;
    max-width: 900px;
    text-align: center;
    color: var(--lightbox-text);
    background: transparent;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
}

.lb-close {
    position: fixed;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    cursor: pointer;
    color: #000;
    transition: transform 0.3s;
    font-family: 'Italiana';
}

.lb-close:hover {
    transform: rotate(90deg);
}

.lb-img {
    max-width: 400px;
    height: auto;
    margin-bottom: 30px;
    border-radius: 0;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.lb-img.active {
    display: inline-block;
}

#lb-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #000;
    letter-spacing: -1px;
}

#lb-desc {
    font-family: 'EB Garamond', serif;
    font-size: 1.3rem;
    line-height: 1.8;
    color: #333 !important;
    text-align: justify;
    columns: 2;
    gap: 60px;
}

#lb-desc p,
#lb-desc h3 {
    color: #1a1a1a !important;
    opacity: 1 !important;
}

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500&display=swap');

/* RESPONSIVE */
@media (max-width: 768px) {
    #lb-desc {
        columns: 1;
    }

    /* PROCESS FIX: No scroll, shrink text */
    .process-horizontal-container {
        overflow-x: hidden;
        height: 600px;
        padding-bottom: 20px;
        justify-content: space-between;
    }

    .process-column {
        min-width: 0;
        width: 19%;
        flex-shrink: 1;
        padding-top: 20px;
        overflow: visible;
        /* Prevent clipping */
    }

    .p-content {
        font-size: 0.6rem;
        line-height: 1.2;
        letter-spacing: 0;
        width: 100%;
        overflow: visible;
        /* VISIBILITY FIX */
        color: rgba(255, 255, 255, 0.7) !important;
        /* Force visible */
        opacity: 1 !important;
    }

    .p-content.in-view {
        color: #fff !important;
    }

    .p-num {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

    .about-narrative {
        max-width: 90%;
        text-align: left;
        font-size: 1rem !important;
    }

    .footer-vfx-wrapper {
        height: auto;
        top: -10px;
        opacity: 0.15;
    }

    .address-grid {
        margin-top: 100px;
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    /* MOBILE TEXT SAFETY */
    h2,
    .heading-font {
        font-size: 2rem !important;
    }

    .hero-desc {
        font-size: 1rem !important;
    }

    .service-card {
        padding: 20px !important;
    }

    .work-info h3 {
        font-size: 1.2rem !important;
    }

    .stat-item h3 {
        font-size: 2.5rem !important;
    }
}