/* ============================================
   MOBILE HERO — VANTA.JS BACKGROUND
   ============================================ */

.ks-mobile-vanta-bg {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.8;
}

@media (max-width: 767px) {
    .ks-glass-overlay-text {
        display: none !important;
    }

    .ks-mobile-vanta-bg {
        display: block;
    }
}

/* ============================================
   BANNER DRAWING EFFECT
   ============================================ */

.ks-banner-content {
    position: relative;
    z-index: 2;
}

/* ============================================
   SERVICES MASONRY - FULL WIDTH LAYOUT
   ============================================ */

.ks-services-masonry {
    padding: 10rem 0;
    background: #000;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.ks-services-header {
    text-align: center;
    max-width: 100%;
    margin: 0 auto 8rem;
    padding: 0 2rem;
}

.ks-services-header .ks-section-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

.ks-masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
    max-width: 2400px;
    margin: 0 auto;
    grid-auto-rows: minmax(200px, auto);
}

@media (min-width: 768px) {
    .ks-masonry-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: minmax(220px, auto);
    }
}

@media (min-width: 1200px) {
    .ks-masonry-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: minmax(240px, auto);
    }
}

@media (min-width: 1600px) {
    .ks-masonry-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-auto-rows: minmax(250px, auto);
        gap: 2.5rem;
    }
}

@media (min-width: 2000px) {
    .ks-masonry-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-auto-rows: minmax(280px, auto);
        gap: 3rem;
        padding: 0 4rem;
    }
}

/* Masonry Item - SQUARE */
.ks-masonry-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.8s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateZ(0);
    will-change: transform, box-shadow, border-color;
    height: 100%;
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Size Variations - MASONRY EFFECT */
.ks-masonry-large {
    grid-row: span 2;
}

.ks-masonry-medium {
    grid-row: span 2;
}

.ks-masonry-small {
    grid-row: span 1;
}

@media (max-width: 767px) {

    .ks-masonry-large,
    .ks-masonry-medium,
    .ks-masonry-small {
        grid-row: span 2;
    }
}

/* Image Container - BACKGROUND CONTAIN */
.ks-masonry-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    transform: scale(1.1); /* Mobile-first slight zoom */
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.ks-masonry-image picture {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.ks-masonry-image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Colored Overlays - Different for each service */
.ks-masonry-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.9) 100%);
    opacity: 0.7; /* Mobile-first revealed */
    transition: opacity 0.6s ease;
    mix-blend-mode: multiply;
}

/* Individual colored overlays */
.ks-masonry-item[data-service="0"] .ks-masonry-overlay {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.ks-masonry-item[data-service="1"] .ks-masonry-overlay {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.ks-masonry-item[data-service="2"] .ks-masonry-overlay {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.ks-masonry-item[data-service="3"] .ks-masonry-overlay {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.ks-masonry-item[data-service="4"] .ks-masonry-overlay {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.ks-masonry-item[data-service="5"] .ks-masonry-overlay {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.ks-masonry-item[data-service="6"] .ks-masonry-overlay {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.ks-masonry-item[data-service="7"] .ks-masonry-overlay {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.ks-masonry-item[data-service="8"] .ks-masonry-overlay {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

.ks-masonry-item[data-service="9"] .ks-masonry-overlay {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.3) 0%, rgba(0, 0, 0, 0.9) 100%);
}

/* Content */
.ks-masonry-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    transform: translateY(0); /* Mobile-first revealed */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ks-masonry-number {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 900;
    line-height: 1;
    color: rgba(255, 255, 255, 0.4); /* Mobile-first revealed */
    margin-bottom: 0.5rem;
    transition: color 0.6s ease, transform 0.6s ease;
}

.ks-masonry-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    transform: translateX(0); /* Mobile-first revealed */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ks-masonry-desc {
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 1; /* Mobile-first revealed */
    transform: translateY(0); /* Mobile-first revealed */
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ks-masonry-arrow {
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 1; /* Mobile-first revealed */
    transform: scale(1) rotate(0deg); /* Mobile-first revealed */
    transition: opacity 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55), transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ks-masonry-arrow svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

/* Glow Effect */
.ks-masonry-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover Effects - Desktop Opt-In */
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
    /* Setup initial hidden states */
    .ks-masonry-image { transform: none; }
    .ks-masonry-overlay { opacity: 1; }
    .ks-masonry-content { transform: none; }
    .ks-masonry-number { color: rgba(255, 255, 255, 0.15); }
    .ks-masonry-title { transform: none; }
    .ks-masonry-desc { opacity: 0; transform: translateY(20px); }
    .ks-masonry-arrow { opacity: 0; transform: scale(0) rotate(-45deg); }

    /* Hover rules */
    .ks-masonry-item:hover {
        transform: translateY(-10px) scale(1.02);
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }

    .ks-masonry-item:hover .ks-masonry-image img {
        transform: scale(1.5);
    }

    .ks-masonry-item:hover .ks-masonry-overlay {
        opacity: 0.7;
    }

    .ks-masonry-item:hover .ks-masonry-content {
        transform: translateY(-10px);
    }

    .ks-masonry-item:hover .ks-masonry-number {
        color: rgba(255, 255, 255, 0.4);
        transform: scale(1.05);
    }

    .ks-masonry-item:hover .ks-masonry-title {
        transform: translateX(10px);
    }

    .ks-masonry-item:hover .ks-masonry-desc {
        opacity: 1;
        transform: translateY(0);
    }

    .ks-masonry-item:hover .ks-masonry-arrow {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    .ks-masonry-item:hover .ks-masonry-glow {
        opacity: 1;
        transform: translate(-50%, -50%) scale(2);
    }
}

/* Active/Click Effect */
.ks-masonry-item:active {
    transform: translateY(-5px) scale(0.98);
}

@media (max-width: 1500px) {
    .ks-services-masonry {
        padding: 0 0 5rem;
    }

    .ks-logo-showcase {
        padding: 6rem 0rem;
    }

    .ks-logo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Responsive — Tablet */
@media (max-width: 1024px) {

    .ks-services-grid {
        grid-template-columns: 1fr;
    }

    .ks-service-card {
        border-right: none;
    }

    .ks-logo-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ks-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ks-footer-grid {
        grid-template-columns: 1fr;
    }

    .ks-masonry-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: minmax(200px, auto);
        gap: 1.5rem;
    }

}

/* (Hover force states removed - handled via mobile-first base styles) */

@media (max-width: 1024px) {


    .ks-services-masonry {
        padding: 0 0 5rem;
    }

    .ks-logo-item {
        padding: 2rem 2rem;
    }

    .ks-masonry-content {
        padding: 1.5rem;
    }

    .ks-masonry-number {
        font-size: clamp(2rem, 3.5vw, 3rem);
    }

    .ks-marquee {
        padding: 5rem 0;
    }

    .ks-masonry-title {
        font-size: clamp(2.2rem, 3vw, 2.8rem);
        margin-bottom: 0.5rem;
    }

    .ks-masonry-desc {
        font-size: clamp(0.8rem, 2vw, 1rem);
        margin-bottom: 0.75rem;
    }

}

@media (min-width: 1200px) and (max-width: 1599px) {
    .ks-masonry-item:nth-child(4) {
        grid-row: span 2;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .ks-masonry-item:nth-child(9) {
        grid-row: span 1;
    }
}

@media (min-width: 1025px) and (max-width: 1199px) {
    .ks-masonry-item:nth-child(5) {
        grid-row: span 2;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .ks-masonry-item:nth-child(8) {
        grid-row: span 2;
    }
}

/* Responsive — Mobile */
@media (max-width: 767px) {
    .ks-header-nav {
        display: none;
    }

    .ks-header-menu-toggle {
        display: flex;
    }

    .ks-banner-title {
        font-size: clamp(2rem, 9vw, 5rem);
    }

    .ks-logo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ks-stats-grid {
        grid-template-columns: 1fr;
    }

    .ks-footer-grid {
        text-align: center;
        gap: 2.5rem;
    }

    .ks-footer-links {
        align-items: center;
    }

    .ks-footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .ks-footer-line {
        display: none;
    }

    /* Enhanced Mobile Styles */
    .ks-container {
        padding: 0 1rem;
    }

    .ks-banner-text h1 {
        font-size: clamp(2.8rem, 12vw, 5rem);
        line-height: 1.1;
        text-align: center;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .ks-banner-subtitle {
        font-size: 1rem;
        margin: 1rem 0 2rem;
    }

    .ks-legendary-btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }

    .ks-section-title {
        font-size: clamp(3rem, 10vw, 4.5rem);
    }

    .ks-projects {
        padding: 6rem 0;
    }

    .ks-services-masonry {
        padding: 6rem 0;
    }

    .ks-cta {
        padding: 6rem 0;
    }

    .ks-services-masonry {
        padding: 6rem 0 4rem;
    }

    .ks-services-header {
        margin-bottom: 4rem;
    }

    .ks-logo-showcase {
        padding: 3rem 0rem;
    }

    .ks-marquee {
        padding: 4rem 0;
    }

    .ks-masonry-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(180px, auto);
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .ks-masonry-content {
        padding: 1.5rem;
    }

    .ks-masonry-number {
        font-size: 2rem;
        margin-bottom: 0.25rem;
    }

    .ks-masonry-title {
        font-size: 2.1rem;
        margin-bottom: 0.5rem;
    }

    .ks-masonry-desc {
        opacity: 1;
        transform: translateY(0);
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .ks-masonry-arrow {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@media (max-width: 450px) {
    .ks-logo-item {
        padding: 1rem 2rem;
    }
}

/* ============================================
   RECENT PROJECTS MASONRY - LEGENDARY DESIGN
   ============================================ */

/* LEGENDARY BUTTONS - MINDBLOWING DESIGN */
.ks-legendary-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    margin: 0 0.5rem;
    background: transparent;
    border: none;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.ks-btn-primary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

.ks-btn-secondary {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.ks-legendary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.ks-legendary-btn:hover::before {
    left: 100%;
}

.ks-legendary-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.ks-btn-primary:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

.ks-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.ks-btn-magnetic {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    pointer-events: none;
}

.ks-legendary-btn:hover .ks-btn-magnetic {
    width: 200px;
    height: 200px;
}

.ks-hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    animation: actionsFade 1s ease forwards;
    animation-delay: 1s;
}

@keyframes actionsFade {
    to {
        opacity: 1;
    }
}

/* View All Button - ULTRA MINIMALIST DESIGN */
.ks-view-all-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    min-width: 200px;
}

.ks-view-all-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #fff;
    transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.ks-view-all-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    width: 1px;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%);
    transition: height 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.ks-view-all-btn:hover::before {
    width: 100%;
}

.ks-view-all-btn:hover::after {
    height: 20px;
}

.ks-view-all-btn:hover {
    border-bottom-color: rgba(255, 255, 255, 0.6);
    transform: translateX(10px);
    letter-spacing: 0.1em;
}

.ks-btn-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0.6;
}

.ks-view-all-btn:hover .ks-btn-arrow {
    transform: translateX(10px) rotate(45deg);
    opacity: 1;
}

.ks-section-actions {
    margin-top: 2rem;
    text-align: center;
}

.ks-projects {
    padding: 4rem 0 10rem;
    background: #000;
    overflow: hidden;
    position: relative;
}

.ks-projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
    pointer-events: none;
}

/* Revolutionary Grid */
.ks-projects-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 200px;
    gap: 1.5rem;
    padding: 0 2rem;
    max-width: 2400px;
    margin: 0 auto;
}

@media (min-width: 2000px) {
    .ks-projects-grid {
        padding: 0 4rem;
        gap: 2rem;
        grid-auto-rows: 250px;
    }
}

/* Project Items - Different Sizes */
.ks-project-item {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    cursor: pointer;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.ks-project-item.ks-hover-ready {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.8s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.8s;
}

/* Size Variations - CREATIVE LAYOUT */
.ks-project-item:nth-child(1) {
    grid-column: span 5;
    grid-row: span 2;
}

.ks-project-item:nth-child(2) {
    grid-column: span 4;
    grid-row: span 2;
}

.ks-project-item:nth-child(3) {
    grid-column: span 3;
    grid-row: span 2;
}

.ks-project-item:nth-child(4) {
    grid-column: span 6;
    grid-row: span 3;
}

.ks-project-item:nth-child(5) {
    grid-column: span 6;
    grid-row: span 3;
}

/* Image Container */
.ks-project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: -webkit-fill-available !important;
    height: -webkit-fill-available !important;
    overflow: hidden;
}

.ks-project-image picture {
    display: block;
    width: -webkit-fill-available !important;
    height: -webkit-fill-available !important;
}

.ks-project-image img {
    width: -webkit-fill-available !important;
    height: -webkit-fill-available !important;
    object-fit: cover;
    object-position: top;
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Revolutionary Overlay */
.ks-project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 2;
}

/* Content */
.ks-project-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    z-index: 3;
    transform: translateY(20px);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.ks-project-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.ks-project-year,
.ks-project-category {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ks-project-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}


.ks-project-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transform: translateY(20px) rotate(-45deg);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Hover Effects - MINDBLOWING */
.ks-project-item:hover {
    transform: translateY(-20px) rotateX(5deg) rotateY(5deg) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 50px 100px rgba(0, 0, 0, 0.8),
        0 0 200px rgba(255, 255, 255, 0.1),
        inset 0 0 100px rgba(255, 255, 255, 0.05);
}

.ks-project-item:hover .ks-project-image img {
    transform: scale(1.1) rotateZ(2deg);
}

.ks-project-item:hover .ks-project-overlay {
    opacity: 1;
}

.ks-project-item:hover .ks-project-content {
    transform: translateY(0);
}

.ks-project-item:hover .ks-project-meta {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.ks-project-item:hover .ks-project-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}


.ks-project-item:hover .ks-project-arrow {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
    transition-delay: 0.4s;
}

/* Glow Effect */
.ks-project-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.ks-project-item:hover::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 1;
}

@media (max-width: 1350px) {
    .ks-project-meta {
        gap: 5px;
        flex-wrap: wrap;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .ks-projects-grid {
        grid-template-columns: repeat(8, 1fr);
    }

    .ks-project-item:nth-child(1) {
        grid-column: span 4;
    }

    .ks-project-item:nth-child(2) {
        grid-column: span 4;
    }

    .ks-project-item:nth-child(3) {
        grid-column: span 3;
        grid-row: span 2;
    }

    .ks-project-item:nth-child(4) {
        grid-column: span 5;
        grid-row: span 2
    }

    .ks-project-item:nth-child(5) {
        grid-column: span 8;
    }

    .ks-section-header {
        margin-bottom: 4rem;
    }
}

@media (max-width: 1024px) {
    .ks-project-overlay {
        opacity: 1 !important;
        background: linear-gradient(to top, rgb(0 0 0 / 70%) 0%, rgb(0 0 0 / 50%) 50%, rgba(0, 0, 0, 0) 100%) !important;
    }

    .ks-project-content {
        padding: 1.5rem;
    }

    .ks-project-content,
    .ks-project-meta,
    .ks-project-title {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .ks-project-arrow {
        opacity: 1 !important;
        transform: translateY(0) rotate(0deg) !important;
    }

    /* Disable 3D hover animations for touch devices */
    .ks-project-item:hover {
        transform: none !important;
        box-shadow: none !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }

    .ks-project-item:hover .ks-project-image img {
        transform: none !important;
    }

    .ks-project-item::after,
    .ks-project-item:hover::after {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .ks-projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }

    .ks-project-item {
        grid-column: span 1 !important;
        grid-row: span 2 !important;
    }

    .ks-projects {
        padding: 4rem 0 5rem;
    }

    .ks-projects-grid {
        grid-auto-rows: 150px;
    }
}


/* ============================================
   MODERN SCROLL DOWN INDICATOR
   Minimalist Black & White Design
   ============================================ */

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    opacity: 0;
    animation: fadeInIndicator 1s ease forwards 2.5s;
}

/* Visual only indicator - no click functionality */
.scroll-indicator-visual {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    pointer-events: none;
    opacity: 0;
    animation: fadeInIndicator 1s ease forwards 2.5s;
}

@keyframes fadeInIndicator {
    to {
        opacity: 1;
    }
}

/* Scroll text */
.scroll-text {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #ffffff;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Mouse icon container */
.scroll-mouse {
    position: relative;
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Mouse wheel */
.scroll-wheel {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    background: #ffffff;
    border-radius: 2px;
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(16px);
    }
}

/* Arrow down */
.scroll-arrow {
    width: 12px;
    height: 12px;
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
    animation: arrowBounce 2s ease-in-out infinite;
}

@keyframes arrowBounce {

    0%,
    100% {
        transform: rotate(45deg) translateY(0);
        opacity: 0.5;
    }

    50% {
        transform: rotate(45deg) translateY(8px);
        opacity: 1;
    }
}

/* Hover effects */
.scroll-indicator:hover .scroll-text {
    opacity: 1;
}

.scroll-indicator:hover .scroll-mouse {
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.scroll-indicator:hover .scroll-arrow {
    border-color: rgba(255, 255, 255, 0.8);
}

/* Alternative Style 1: Line with dot */
.scroll-indicator.style-line {
    gap: 0.5rem;
}

.scroll-indicator.style-line .scroll-line-container {
    position: relative;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 100%);
}

.scroll-indicator.style-line .scroll-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    animation: dotMove 2s ease-in-out infinite;
}

@keyframes dotMove {
    0% {
        top: 0;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Alternative Style 2: Minimal text only */
.scroll-indicator.style-minimal {
    gap: 0.8rem;
}

.scroll-indicator.style-minimal .scroll-text {
    writing-mode: horizontal-tb;
    font-size: 0.7rem;
    letter-spacing: 0.4em;
}

.scroll-indicator.style-minimal .scroll-chevron {
    width: 20px;
    height: 20px;
    position: relative;
}

.scroll-indicator.style-minimal .scroll-chevron::before,
.scroll-indicator.style-minimal .scroll-chevron::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.scroll-indicator.style-minimal .scroll-chevron::before {
    left: 0;
    transform: rotate(45deg);
    transform-origin: left center;
}

.scroll-indicator.style-minimal .scroll-chevron::after {
    right: 0;
    transform: rotate(-45deg);
    transform-origin: right center;
}

.scroll-indicator.style-minimal:hover .scroll-chevron::before,
.scroll-indicator.style-minimal:hover .scroll-chevron::after {
    background: rgba(255, 255, 255, 1);
}

/* Alternative Style 3: Circle with arrow */
.scroll-indicator.style-circle {
    gap: 0.5rem;
}

.scroll-indicator.style-circle .scroll-circle {
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.scroll-indicator.style-circle .scroll-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: circlePulse 2s ease-in-out infinite;
}

@keyframes circlePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.scroll-indicator.style-circle .scroll-circle-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    transform: rotate(45deg);
    animation: circleArrowBounce 2s ease-in-out infinite;
}

@keyframes circleArrowBounce {

    0%,
    100% {
        transform: rotate(45deg) translateY(-3px);
    }

    50% {
        transform: rotate(45deg) translateY(3px);
    }
}

.scroll-indicator.style-circle:hover .scroll-circle {
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* Hide on scroll */
.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-to-top:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-5px);
}

.scroll-to-top-arrow {
    width: 12px;
    height: 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.7);
    border-top: 2px solid rgba(255, 255, 255, 0.7);
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.scroll-to-top:hover .scroll-to-top-arrow {
    border-color: rgba(255, 255, 255, 1);
    transform: rotate(45deg) translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .scroll-indicator {
        bottom: 2rem;
    }

    .scroll-text {
        font-size: 0.65rem;
        letter-spacing: 0.25em;
    }

    .scroll-mouse {
        width: 20px;
        height: 35px;
    }

    .scroll-indicator.style-circle .scroll-circle {
        width: 40px;
        height: 40px;
    }
}

@media (max-height: 700px) {
    .scroll-indicator {
        bottom: 1.5rem;
        transform: translateX(-50%) scale(0.85);
    }
}

/* ============================================
   ULTRA MODERN SCROLL TEXT EFFECT
   Minimalist Black & White Design
   ============================================ */

.scroll-text-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    width: 90%;
    max-width: 1400px;
    pointer-events: none;
    mix-blend-mode: difference;
}

/* Main scroll text wrapper */
.scroll-text-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scroll text track */
.scroll-text-track {
    display: flex;
    gap: 8rem;
    white-space: nowrap;
    will-change: transform;
}

/* Individual text items */
.scroll-text-item {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(4rem, 8vw, 10rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #ffffff;
    opacity: 0.15;
    transition: opacity 0.3s ease;
    position: relative;
}

/* Separator dots */
.scroll-text-item::after {
    content: 'â€¢';
    position: absolute;
    right: -4rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    opacity: 0.3;
}

.scroll-text-item:last-child::after {
    display: none;
}

/* Hover effect */
.scroll-text-item:hover {
    opacity: 0.4;
}

/* Vertical lines decoration */
.scroll-text-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.scroll-line {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    opacity: 0;
    animation: lineAppear 1s ease forwards;
}

.scroll-line:nth-child(1) {
    left: 20%;
    animation-delay: 0.2s;
}

.scroll-line:nth-child(2) {
    left: 40%;
    animation-delay: 0.4s;
}

.scroll-line:nth-child(3) {
    left: 60%;
    animation-delay: 0.6s;
}

.scroll-line:nth-child(4) {
    left: 80%;
    animation-delay: 0.8s;
}

@keyframes lineAppear {
    to {
        opacity: 1;
    }
}

/* Glitch effect on scroll */
.scroll-text-item.glitch {
    animation: glitchEffect 0.3s ease;
}

@keyframes glitchEffect {

    0%,
    100% {
        transform: translate(0);
        opacity: 0.15;
    }

    25% {
        transform: translate(-2px, 2px);
        opacity: 0.3;
    }

    50% {
        transform: translate(2px, -2px);
        opacity: 0.2;
    }

    75% {
        transform: translate(-2px, -2px);
        opacity: 0.25;
    }
}

/* Scan line effect */
.scroll-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.5) 50%,
            transparent 100%);
    animation: scanMove 3s linear infinite;
    pointer-events: none;
}

@keyframes scanMove {
    0% {
        top: 0;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Corner brackets decoration */
.scroll-corners {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.corner-bracket {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    animation: cornerFade 1s ease forwards;
}

.corner-bracket.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
    animation-delay: 1s;
}

.corner-bracket.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
    animation-delay: 1.2s;
}

.corner-bracket.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
    animation-delay: 1.4s;
}

.corner-bracket.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
    animation-delay: 1.6s;
}

@keyframes cornerFade {
    to {
        opacity: 1;
    }
}

/* Pixel grid overlay */
.pixel-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px);
    pointer-events: none;
    opacity: 0.5;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1450px) {
    .project-modal-inner-content {
        gap: 0rem;
    }
}

@media (max-width: 1024px) {
    .scroll-text-wrapper {
        height: 150px;
    }

    .scroll-text-item {
        font-size: clamp(3rem, 7vw, 7rem);
    }

    .scroll-text-track {
        gap: 6rem;
    }

    .scroll-text-item::after {
        right: -3rem;
    }
}

@media (max-width: 768px) {
    .scroll-text-wrapper {
        height: 100px;
    }

    .scroll-text-item {
        font-size: clamp(2rem, 6vw, 5rem);
    }

    .scroll-text-track {
        gap: 4rem;
    }

    .scroll-text-item::after {
        right: -2rem;
        font-size: 1.5rem;
    }

    .corner-bracket {
        width: 25px;
        height: 25px;
    }
}

/* ============================================
   Mobile CTA WebGL Canvas Effect (< 1024px)
   ============================================ */
.ks-mobile-cta-canvas {
    display: none;
}

@media (max-width: 1024px) {
    .ks-mobile-cta-canvas {
        display: block;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        overflow: hidden;
    }

    #ks-cta-canvas {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }

    .ks-cta-grid {
        position: absolute;
        inset: -2px;
        z-index: 1;
        background-image:
            linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
        background-size: 72px 72px;
        -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 0%, transparent 78%);
        mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 0%, transparent 78%);
        pointer-events: none;
    }

    .ks-cta-vignette {
        position: absolute;
        inset: 0;
        z-index: 2;
        pointer-events: none;
        background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 62%, rgba(0, 0, 0, 0.96) 100%);
    }

    .ks-cta-grain {
        position: absolute;
        inset: 0;
        z-index: 3;
        pointer-events: none;
        opacity: 0.045;
        mix-blend-mode: overlay;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    }

    #container_SCR {
        position: relative;
        background: #000;
        z-index: 1;
    }

    #container_SCR .cursorCon {
        position: relative;
        z-index: 5;
        /* Sit above the canvas */
    }
}