/* --- 1. CORE VARIABLES --- */
:root {
    --bg: #F2F2F0;
    --surface: #ffffff;
    --text: #0a0a0a;
    --text-light: #666666;
    --line: rgba(0, 0, 0, 0.08);

    --font-hero: 'Playfair Display', serif;
    /* New Font */
    --font-display: 'Syne', sans-serif;
    --font-body: 'Manrope', sans-serif;

    --container: 1400px;
    --ease-out: cubic-bezier(0.165, 0.84, 0.44, 1);

    --accent: #ff964f;
}

::selection {
    background: var(--accent);
    color: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
    width: 0px;
}

/* --- 2. UTILITIES --- */
.u-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 5vw;
    position: relative;
}

.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.04;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    /* REMOVED: filter: contrast(170%) brightness(100%); -> Major Performance Killer */
}

/* Magnetic Button */
.magnetic-wrap {
    display: inline-block;
    position: relative;
}

.u-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background: #111;
    color: #fff;
    border-radius: 60px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
}

.u-btn span {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.u-btn::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transition: top 0.3s var(--ease-out);
    border-radius: 50%;
    z-index: 1;
}

.u-btn:hover::before {
    top: 0;
    border-radius: 0;
}

/* Cursor */
@media (pointer: fine) {
    body {
        cursor: none;
    }

    .cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 10px;
        height: 10px;
        background: var(--text);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: width 0.3s, height 0.3s, opacity 0.3s;
    }

    .cursor.hovered {
        width: 60px;
        height: 60px;
        background: transparent;
        border: 1px solid var(--text);
        opacity: 0.5;
    }

    .cursor.video-hover {
        width: 100px;
        height: 100px;
        background: #fff;
        mix-blend-mode: difference;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .cursor.video-hover::after {
        content: 'PLAY';
        font-size: 12px;
        color: #000;
        font-weight: 800;
    }

    .cursor.photo-hover {
        width: 80px;
        height: 80px;
        background: #fff;
        mix-blend-mode: difference;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .cursor.photo-hover::after {
        content: 'DRAG';
        font-size: 10px;
        color: #000;
        font-weight: 700;
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preloader-text {
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
}

.preloader-text span {
    display: inline-block;
    transform: translateY(100%);
}

/* Nav */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(244, 244, 242, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

/* --- HERO --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 140px;
    padding-bottom: 80px;
}

.hero-title {
    /* CHANGE 1: Font Family Update */
    font-family: var(--font-hero);
    font-size: clamp(3.5rem, 8vw, 8rem);
    font-style: italic;
    /* Optional: Italic looks great with Playfair */
    letter-spacing: -0.02em;
    line-height: 1;
    font-weight: 500;
    margin-bottom: 50px;
    color: var(--text);
}

.word-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.char-wrap {
    display: inline-block;
    transform: translateY(110%);
}

.hero-sub {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-desc {
    max-width: 400px;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-light);
    opacity: 0;
}

.hero-img-container {
    width: 100%;
    height: 65vh;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    opacity: 0;
    transform: scale(0.95);
}

.hero-img {
    width: 100%;
    height: 120%;
    object-fit: cover;
}

/* --- BRAND CAROUSEL (NEW) --- */
.brand-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    overflow: hidden;
}

.marquee-track {
    display: flex;
    gap: 80px;
    width: fit-content;
    animation: scroll 30s linear infinite;
}

.brand-item {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #ccc;
    white-space: nowrap;
    transition: color 0.3s;
}

.brand-item:hover {
    color: var(--accent);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-container {
    width: 100vw;
    overflow: hidden;
    position: relative;
}

.marquee-text-track {
    display: flex;
    width: max-content;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: #111;
    animation: scroll 20s linear infinite;
    /* REMOVED: gap: 40px; */
}

/* REMOVED: padding-right on spans to fix whitespace consistency */
.marquee-text-track span {
    padding-right: 0;
}

/* --- SERVICES --- */
.services {
    padding: 120px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
}

.section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.service-card {
    padding: 70px 40px;
    border-right: 1px solid var(--line);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.service-card:last-child {
    border-right: none;
}

.service-card:hover {
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    transform: translateY(-10px);
    z-index: 2;
}

.service-num {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 500;
    line-height: 1.1;
    margin-top: auto;
}

.service-icon-svg {
    width: 54px;
    height: 54px;
    margin-bottom: 30px;
    stroke: var(--text);
    stroke-width: 1.2;
    fill: none;
    transition: transform 0.4s ease;
}

.service-card:hover .service-icon-svg {
    transform: scale(1.1) rotate(-5deg);
    stroke-width: 1.5;
    stroke: var(--accent);
}

/* --- STACKED VIDEO CARDS (UPDATED) --- */
.fs-video-section {
    background-color: var(--bg);
    padding-bottom: 10vh;
    position: relative;
}

.fs-stack-container {
    width: 100%;
    position: relative;
}

.fs-card {
    position: sticky;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Centered */
    background-color: var(--bg);
    padding: 0;
    /* Removed padding */
    box-sizing: border-box;
}

.fs-card:nth-child(1) {
    top: 0px;
    z-index: 1;
}

.fs-card:nth-child(2) {
    top: 0px;
    z-index: 2;
}

.fs-card:nth-child(3) {
    top: 0px;
    z-index: 3;
}

/* Updated Video Wrap to be bigger and cleaner */
.fs-card-video-wrap {
    width: 90vw;
    max-width: 1600px;
    height: 85vh;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform-origin: center top;
    will-change: transform;
}

.fs-card-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 0.7s ease-out;
}

.fs-card:hover .fs-card-bg {
    transform: scale(1);
}

/* --- PHOTOS (UPDATED TO CAROUSEL) --- */
.photo-section {
    padding: 120px 0;
    background: #fff;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

/* New Carousel Container */
.photo-carousel {
    display: flex;
    gap: 40px;
    overflow-x: auto;
    padding: 50px 5vw;
    /* Padding for scroll area */
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}

/* Hide Scrollbar */
.photo-carousel::-webkit-scrollbar {
    display: none;
}

.photo-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    flex-shrink: 0;
    /* Prevent squishing */
    width: 400px;
    height: 600px;
    /* Fixed size for carousel */
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.photo-item:hover img {
    transform: scale(1.05);
}

/* --- "AMBIENT CINEMA" LIGHTBOX --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    /* Fallback */
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 1. Ambient Background (The Blur) */
.lb-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    filter: blur(40px) brightness(0.4);
    transform: scale(1.2);
    z-index: 1;
    transition: opacity 0.5s ease;
}

/* 2. Floating Close Button (Top Right) */
.lightbox-close-wrap {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 10005;
}

.lightbox-close-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.lightbox-close-btn:hover {
    background: #fff;
    color: #000;
    transform: scale(1.1);
}

/* 3. Main Content Container */
.lb-container {
    width: 80%;
    height: 70%;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.96);
}

.lb-container img,
.lb-container video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    outline: none;
}

/* 4. Minimalist Floating UI */
.lb-ui-header {
    position: absolute;
    top: 40px;
    left: 5vw;
    z-index: 10005;
    color: #fff;
}

.lb-ui-footer {
    position: absolute;
    bottom: 40px;
    left: 5vw;
    width: 90vw;
    z-index: 10005;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    color: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 20px;
}

.lb-cat {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(10px);
}

.lb-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 4rem);
    font-weight: 500;
    line-height: 1;
    opacity: 0;
    transform: translateY(15px);
}

.lb-meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    transform: translateY(10px);
}

.lb-meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
}

.lb-meta-val {
    font-size: 0.95rem;
    color: #fff;
}

/* --- ABOUT & FOOTER --- */
.about-section {
    padding: 150px 0;
    background: var(--bg);
    position: relative;
    z-index: 10;
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: start;
}

.big-text {
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    line-height: 1.2;
    font-family: var(--font-display);
    font-weight: 500;
}

.bio-text {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.1rem;
    margin-top: 20px;
}

footer {
    padding: 120px 0 60px;
    text-align: center;
    position: relative;
    z-index: 10;
    background: var(--bg);
}

.footer-cta {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 9rem);
    color: transparent;
    -webkit-text-stroke: 1px var(--text);
    text-decoration: none;
    line-height: 0.9;
    margin-bottom: 80px;
    display: block;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 100%);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    transition: background-size 0.8s var(--ease-out);
    cursor: pointer;
}

.footer-cta:hover {
    background-size: 100% 100%;
}

.contact-row {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.contact-item span {
    display: block;
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.contact-item a {
    text-decoration: none;
    color: var(--text);
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    .service-grid {
        grid-template-columns: 1fr;
        border-top: 1px solid var(--line);
    }

    .service-card {
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding: 50px 20px;
        min-height: auto;
    }

    .photo-item {
        width: 300px;
        height: 450px;
    }

    /* Adjust carousel item size for mobile */
    .photo-carousel {
        padding: 30px 20px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .footer-cta {
        -webkit-text-stroke: 0px;
        color: var(--text);
    }

    .fs-card-video-wrap {
        height: 60vh;
        width: 95%;
    }

    .fs-card:nth-child(2) {
        top: 20px;
    }

    .fs-card:nth-child(3) {
        top: 40px;
    }

    .lb-container {
        width: 100%;
        height: 50%;
    }

    .lb-ui-footer {
        flex-wrap: wrap;
        gap: 20px;
    }
}

/* --- WORK SHOWCASE (ZIG-ZAG) --- */
.work-section {
    padding: 120px 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.work-grid {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* Row Container */
.work-row {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 80vh;
    text-decoration: none;
    color: inherit;
    gap: 5%;
}

/* Image Container */
.work-visual {
    width: 60%;
    height: 80vh;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    /* Removed overlay behavior, image is standalone */
}

.work-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.work-row:hover .work-visual img {
    transform: scale(1.05);
}

/* Detail Container */
.work-detail {
    width: 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

/* Alternating Layout */
.work-row:nth-child(even) {
    flex-direction: row-reverse;
}

.work-row:nth-child(even) .work-detail {
    align-items: flex-end;
    text-align: right;
}

/* Typography */
.work-title {
    font-family: var(--font-display);
    font-size: 5rem;
    /* Big title */
    color: var(--text);
    font-weight: 500;
    line-height: 0.9;
    margin-top: 10px;
    transition: color 0.3s;
}

.work-row:hover .work-title {
    color: var(--accent);
}

.work-cat {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Mobile */
@media (max-width: 900px) {
    .work-grid {
        gap: 60px;
    }

    .work-row {
        flex-direction: column !important;
        /* Stack vertically */
        min-height: auto;
        gap: 20px;
    }

    .work-visual {
        width: 100%;
        height: 60vh;
    }

    .work-detail {
        width: 100%;
        align-items: flex-start !important;
        text-align: left !important;
    }

    .work-title {
        font-size: 3rem;
    }
}

/* --- LOGO MARQUEE (NEW) --- */
.logo-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    overflow: hidden;
}

.logo-marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.logo-track {
    display: flex;
    gap: 80px;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    /* Fixed height for logos */
    flex-shrink: 0;
}

.logo-item img {
    height: 100%;
    width: auto;
    object-fit: contain;
    max-width: 200px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

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