/* ==========================================================================
   LENIS SMOOTH SCROLL INTEGRATION & BASE SETUP
   ========================================================================== */
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;
}

.lenis.lenis-smooth iframe {
    pointer-events: none;
}

html {
    scroll-behavior: smooth;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* ==========================================================================
   TOP SCROLL PROGRESS INDICATOR
   ========================================================================== */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8 0%, #6366f1 50%, #ec4899 100%);
    z-index: 99999;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
    transition: width 0.08s ease-out;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.portfolio-hero-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    padding: 1.5rem 0 0 0;
}

.hero-header {
    display: grid;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin-inline: auto;
    min-height: 72vh;
    padding: clamp(3.5rem, 7vw, 6rem) clamp(1.5rem, 4vw, 4rem);
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-color: #0a1128;
    box-shadow: 0 20px 60px rgba(10, 17, 40, 0.12);
}

.hero-velaris-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.hero-center-content {
    position: relative;
    z-index: 1;
    text-align: center;
    user-select: none;
}

.brand-title {
    font-size: clamp(3.5rem, 11.5vw, 10.5rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.055em;
    line-height: 0.92;
    margin: 0;
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.trademark {
    font-size: clamp(1.2rem, 3.5vw, 3.2rem);
    font-weight: 800;
    margin-left: 0.4rem;
    margin-top: 0.5rem;
    line-height: 1;
    opacity: 0.9;
}

.brand-tagline {
    font-size: clamp(1rem, 1.35vw, 1.25rem);
    color: rgba(255, 255, 255, 0.88);
    font-weight: 400;
    margin: 2.2rem 0 0 0;
    letter-spacing: -0.015em;
}

/* ==========================================================================
   MARQUEE SECTION
   ========================================================================== */
.marquee-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1400px;
    margin-inline: auto;
    padding: clamp(4rem, 7vw, 6rem) clamp(1.5rem, 4vw, 4rem);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    width: 100%;
}

.marquee-heading {
    text-align: center;
    font-size: clamp(1.6rem, 3.2vw, 2.35rem);
    font-weight: 400;
    color: #111827;
    line-height: 1.35;
    max-width: 950px;
    margin-top: 0;
    margin-bottom: 4rem;
    letter-spacing: -0.025em;
}

.marquee-container {
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: scrollLogos 28s linear infinite;
    will-change: transform;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    margin-right: 3.5rem;
}

.client-logo {
    max-width: 175px;
    height: 48px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.55);
    transition: filter 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.client-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.08);
}

@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.projects-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(3rem, 6vw, 5.5rem) clamp(1.5rem, 4vw, 4rem);
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.section-title {
    font-size: clamp(3rem, 5.5vw, 4.75rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: #111111;
    margin: 0;
}

.section-counter {
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.section-counter span {
    cursor: default;
    transition: color 0.25s ease;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 2.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    text-decoration: none;
    color: inherit;
    opacity: 0;
    transform: translateY(35px) scale(0.98);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3.4;
    border-radius: 20px;
    overflow: hidden;
    background-color: #f1f5f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease;
    will-change: transform;
}

.hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 2;
}

.hover-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 2rem;
    font-weight: 700;
    color: #111111;
    transform: translateY(14px);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.02em;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.hover-logo svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.project-card:hover .image-wrapper {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.08);
}

.project-card:hover .project-image {
    transform: scale(1.05);
    filter: blur(4px) brightness(0.92);
}

.project-card:hover .hover-overlay {
    opacity: 1;
}

.project-card:hover .hover-logo {
    transform: translateY(0);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #4b5563;
    text-transform: uppercase;
    padding: 0 0.5rem;
}

/* ==========================================================================
   ABOUT STUDIO & VIDEO SHOWCASE SECTION
   ========================================================================== */
.about-studio-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(4rem, 7vw, 6.5rem) clamp(1.5rem, 4vw, 4rem);
    color: #111111;
    background-color: #ffffff;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    width: 100%;
}

.studio-heading {
    font-size: clamp(1.6rem, 3.8vw, 2.5rem);
    font-weight: 500;
    line-height: 1.25;
    margin-bottom: 3rem;
    letter-spacing: -0.03em;
    color: #111111;
}

.video-showcase {
    position: relative;
    width: 100%;
    height: clamp(320px, 50vw, 620px);
    border-radius: 28px;
    overflow: hidden;
    margin-bottom: 3.5rem;
    background-color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.video-showcase img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.video-showcase:hover img {
    transform: scale(1.03);
    filter: brightness(0.95);
}

/* Play Button with Radar Pulse */
.play-button {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.play-pulse {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    animation: playPulse 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes playPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.video-showcase:hover .play-button {
    transform: scale(1.12);
}

.play-button svg {
    width: 28px;
    height: 28px;
    margin-left: 4px;
    fill: #111111;
}

/* Stats Grid Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    padding-top: 1rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 600;
    margin: 0 0 0.85rem 0;
    letter-spacing: -0.03em;
    color: #111111;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

.stat-desc {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #555555;
    margin: 0;
    max-width: 260px;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
    .hero-header {
        min-height: 60vh;
        padding: 3.5rem 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 3rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
        row-gap: 2.2rem;
    }

    .play-button {
        width: 64px;
        height: 64px;
    }

    .play-button svg {
        width: 22px;
        height: 22px;
    }

    .hover-logo {
        font-size: 1.4rem;
        padding: 0.6rem 1.2rem;
    }
}