/* ==========================================================================
   css/pages/projects.css
   CONTEXT: The "Cinematic Stack" (Phase 6)
   ========================================================================== */

/* 
   ------------------------------
   1. HERO
   ------------------------------
*/
.stack-hero {
    position: relative;
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 60px;
    background-color: var(--bg-color);
    z-index: 20;
}

.text-hero-large {
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 0.9;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--accent);
}

/* 
   ------------------------------
   2. STACK CONTAINER
   ------------------------------
*/
.project-stack-section {
    width: 100%;
    position: relative;
}

.stack-container {
    width: 100%;
}

/* 
   ------------------------------
   3. PROJECT CARD (DESKTOP)
   ------------------------------
*/
.stack-card {
    height: 100vh;
    /* Full screen baby */
    width: 100%;
    position: sticky;
    top: 0;

    background: #000;
    color: #fff;

    display: flex;
    overflow: hidden;

    /* SHADOW: Deep and heavy */
    box-shadow: 0 -30px 90px rgba(0, 0, 0, 0.8);
    will-change: transform, filter;
}

/* LEFT: VISUAL (60%) */
.card-visual {
    width: 60%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    /* OPPOSITIONAL: Starts slightly scaled up? JS handles parallax. */
}

/* RIGHT: INFO (40%) */
.card-info {
    width: 40%;
    height: 100%;
    padding: 80px 60px;
    /* More breathing room */
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #111;
    border-left: 1px solid rgba(255, 255, 255, 0.05);

    will-change: opacity, transform;
}

/* FANCIER TYPOGRAPHY */
.card-num {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--accent);
    /* Accent for the number */
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0.8;
}

.card-num::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.card-title {
    font-size: clamp(3rem, 5vw, 5.5rem);
    /* Bigger */
    text-transform: uppercase;
    line-height: 0.9;
    margin: 0 0 30px 0;
    font-weight: 800;
    /* Bolder */
    letter-spacing: -0.02em;

    /* PREVENT OVERFLOW */
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    max-width: 100%;
}

.card-meta {
    font-size: 1.15rem;
    color: #999;
    line-height: 1.6;
    margin-bottom: 50px;
    max-width: 450px;
    font-weight: 300;
    /* Thinner for contrast */
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
    transition: all 0.3s ease;
}

.card-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    padding-left: 10px;
    /* Slide effect */
}

/* 
   ------------------------------
   4. FOOTER POSITIONING
   ------------------------------
*/
.stack-footer {
    position: relative;
    z-index: 100;
    /* Higher than sticky cards */
    background: #000;
    /* Ensure opaque */
    padding-top: 100px;
    /* Space before content starts */
}

/* 
   ------------------------------
   5. MOBILE (NATIVE BLOCK FLOW)
   ------------------------------
*/
@media (max-width: 1024px) {
    .stack-hero {
        padding-top: 120px;
    }

    .stack-card {
        height: auto;
        position: relative !important;
        /* KILL STICKY */
        top: auto;
        display: block;
        /* Stack visually */
        margin-bottom: 0px;
    }

    .card-visual {
        width: 100%;
        height: 60vh;
        /* Good height for image */
    }

    .card-info {
        width: 100%;
        height: auto;
        padding: 40px 20px 80px 20px;
    }

    .card-title {
        font-size: 2.5rem;
    }

    /* Ensure footer just flows naturally */
    .stack-footer {
        z-index: 1;
        padding-top: 0;
    }
}