/* STACKING CARDS LAYOUT */
/* Replaces previous sticky work styles */

.stacking-work-container {
    background-color: #000;
    /* Fallback */
    padding-bottom: 0;
    /* Important for clean ending */
}

/* BASE CARD STYLE */
.stacking-card {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    overflow: hidden;
    transform-origin: center top;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    /* scroll-snap removed - now handled by GSAP */
}

@media (max-width: 768px) {

    /* Disable sticky behaviors on mobile for standard scrolling */
    .stacking-card {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        display: block;
        /* Stack vertically */
        margin-bottom: 2rem;
    }

    .stacking-work-container {
        padding: 2rem 0;
    }

    /* Ensure images show */
    .card-visual {
        height: 300px !important;
        width: 100% !important;
    }

    .card-content {
        width: 100% !important;
        height: auto !important;
        padding: 2rem !important;
    }

    .card-split {
        flex-direction: column-reverse;
        /* Image on top, text below */
        display: flex;
    }
}

/* COLOR VARIANTS */
.card-black {
    background-color: #000000;
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.card-black .card-title,
.card-black .card-meta,
.card-black p {
    color: #ffffff !important;
}

.card-red {
    background-color: #6366F1;
    /* Updated to Soft Indigo */
    color: #ffffff;
}

.card-red .card-title,
.card-red .card-meta,
.card-red p {
    color: #ffffff !important;
}

.card-white {
    background-color: #ffffff;
    color: #000000;
}

/* LAYOUT: SPLIT SCREEN (Standard) */
.card-split {
    display: flex;
    width: 100%;
    height: 100%;
}

.card-content {
    width: 40%;
    padding: 4rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.card-visual {
    width: 60%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-out;
}

/* Parallax Effect Helper: Image starts slightly zoomed/transformed */
.stacking-card:hover .card-visual img {
    transform: scale(1.05);
}

/* LAYOUT: CENTER CTA */
.center-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
}

/* TYPOGRAPHY */
.card-title {
    font-family: 'Inter', sans-serif;
    font-size: 5rem;
    font-weight: 800;
    line-height: 0.9;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.card-meta {
    font-family: 'Inter', monospace;
    font-size: 1.1rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    display: block;
}

.card-btn-arrow {
    display: inline-block;
    margin-top: 2rem;
    font-size: 2rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid currentColor;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    transition: all 0.3s ease;
}

.card-btn-arrow:hover {
    background: currentColor;
    color: inherit;
    /* Requires mix-blend-mode or specific handling if not simple */
}

/* Specific button hover for better contrast */
.card-black .card-btn-arrow:hover {
    background: #fff;
    color: #000;
}

.card-red .card-btn-arrow:hover {
    background: #fff;
    color: #FF4400;
}

.card-white .card-btn-arrow:hover {
    background: #000;
    color: #fff;
}

/* CTA Styles */
.cta-title {
    font-size: 8rem;
    font-weight: 900;
    line-height: 0.8;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.center-layout:hover .cta-title {
    transform: scale(1.05);
    /* User requested scale up */
}

.cta-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* RESPONSIVE */
@media (max-width: 1024px) {

    /* Disable sticky behavior and allow natural stacking */
    .stacking-card {
        position: relative !important;
        height: auto !important;
        min-height: auto;
        margin-bottom: 2rem;
        padding-bottom: 0;
    }

    /* Stack vertically: image on top, content below */
    .card-split {
        flex-direction: column;
        height: auto;
    }

    .card-content {
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 2rem 1.5rem;
        flex: none;
    }

    .card-visual {
        width: 100%;
        height: 300px;
        flex: none;
        min-height: 300px;
    }

    .card-visual img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .card-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .card-meta {
        font-size: 0.85rem;
    }

    .cta-title {
        font-size: 3.5rem;
    }

    .stacking-work-container {
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {
    .card-title {
        font-size: 2rem;
    }

    .card-meta {
        font-size: 0.75rem;
    }

    .card-content {
        padding: 1.5rem 1rem;
    }

    .cta-title {
        font-size: 2.5rem;
    }
}

/* MOBILE: CRITICAL FIXES FOR HOMEPAGE EMPTY SPACE */
@media (max-width: 480px) {

    /* Remove ALL fixed/min heights on smallest screens */
    .stacking-card {
        min-height: unset !important;
        height: auto !important;
        margin-bottom: 1.5rem;
    }

    .stacking-work-container {
        padding: 1rem 0;
    }

    /* Drastically reduce padding - desktop 80px becomes 20-24px */
    .card-content {
        padding: 1.25rem 1rem !important;
        min-height: unset !important;
    }

    /* Image wrapper: use aspect-ratio instead of fixed height */
    .card-visual {
        width: 100%;
        aspect-ratio: 4/3;
        /* Consistent frame */
        height: auto !important;
        min-height: unset !important;
    }

    .card-visual img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    /* Tighter typography */
    .card-title {
        font-size: 1.75rem !important;
        line-height: 1.15;
        margin-bottom: 0.5rem;
    }

    .card-meta {
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
    }

    .card-content p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem !important;
    }

    /* CTA card: no empty space */
    .cta-link {
        padding: 2rem 1rem;
        min-height: unset;
    }

    .cta-title {
        font-size: 2rem;
    }
}