/* ==========================================================================
   NIDO PROJECT PAGE SYSTEM - ALIGNED STATIC VIEWPORT
   ========================================================================== */

:root {
    --site-max-width: 1700px;
    --site-gutter: 80px;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: #1a1a1a;
    background-color: #F5F1E5;
    -webkit-font-smoothing: antialiased;
}

/* --- FIXED NAVBAR --- */
.navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999 !important;
    background: #F5F1E5;
}

.nav-container {
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 40px var(--site-gutter) 0 var(--site-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 200 !important;
    font-size: 1.4rem;
    letter-spacing: 3px;
    color: #1a1a1a !important;
    text-decoration: none;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: #1a1a1a !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   DESKTOP STATIC VIEWPORT PRESENTATION (min-width: 1024px)
   ========================================================================== */
@media (min-width: 1024px) {
    html, body {
        height: 100vh;
        overflow: hidden; /* Locks page scroll */
    }

    .logo a {
        font-size: 2rem !important;
    }

    .nav-links {
        gap: 40px !important;
    }

    .nav-links a {
        font-size: 0.85rem !important;
    }

    /* Main Deck Flex Wrapper */
    .deck-wrapper {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 60px;
        width: 100vw;
        height: 100vh;
        max-width: var(--site-max-width);
        margin: 0 auto;
        padding: 120px var(--site-gutter) 50px var(--site-gutter);
    }

    /* Bundled Image Gallery Deck Container */
    .project-gallery-deck {
        flex: 1 1 auto;
        max-width: 1000px;
        height: calc(100vh - 190px);
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        cursor: pointer;
        user-select: none;
    }

    /* Standard Slides (Slides 2 through 7) */
    .slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        opacity: 0;
        visibility: hidden;
        z-index: 1;
        transition: opacity 0.65s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.65s;
        pointer-events: none;
    }

    /* Asymmetric Stacking: Active slide immediately tops stack and fades cleanly */
    .slide.active {
        opacity: 1;
        visibility: visible;
        z-index: 3;
        pointer-events: auto;
    }

    .slide img {
        max-width: 1000px;
        width: 100%;
        max-height: 100%;
        height: auto;
        object-fit: contain;
        object-position: left center;
        display: block;
    }

    /* First Image: Maximum Scale, Left-Aligned with Logo & Gutter */
    .slide.slide-hero,
    .slide:first-child {
        position: fixed;
        top: 110px;
        left: 0;
        right: 0;
        margin: 0 auto;
        width: 100%;
        max-width: var(--site-max-width);
        padding: 0 var(--site-gutter);
        height: calc(100vh - 180px);
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .slide.slide-hero.active {
        z-index: 4;
    }

    .slide.slide-hero img,
    .slide:first-child img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        object-position: left center;
    }

    /* Deck Counter & Subtle Prompt */
    .deck-counter {
        position: absolute;
        bottom: -32px;
        left: 0;
        font-size: 0.7rem;
        letter-spacing: 2px;
        color: #999;
        z-index: 20;
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
    }

    .deck-hint {
        margin-left: 10px;
        font-size: 0.62rem;
        letter-spacing: 1.5px;
        color: #bbb;
        opacity: 0.85;
        transition: opacity 0.6s ease;
    }

    .deck-hint.fade-out {
        opacity: 0;
        pointer-events: none;
    }

    /* Right Column: Project Meta & Staggered Text Entrance */
    .project-info-pane {
        flex: 0 0 380px;
        max-width: 380px;
        max-height: calc(100vh - 190px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: left;
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s, 
                    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s,
                    visibility 0.8s 0.15s;
    }

    .project-info-pane.visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .page-header {
        margin: 0;
    }

    .subtitle {
        display: block;
        text-transform: uppercase;
        letter-spacing: 0.18em;
        color: #888;
        font-size: 0.65rem;
        margin-bottom: 6px;
    }

    .project-title {
        font-size: 1.65rem;
        font-weight: 300;
        letter-spacing: 0.04em;
        line-height: 1.25;
        margin-bottom: 8px;
        color: #1a1a1a;
    }

    .photo-credit {
        margin-bottom: 14px;
    }

    .lead-text {
        font-size: 0.8rem;
        font-weight: 300;
        line-height: 1.6;
        letter-spacing: 0.015em;
        color: #333;
        margin-bottom: 10px;
    }

    .feature-list {
        list-style: none;
        margin-bottom: 0;
        padding-left: 0;
    }

    .feature-list li {
        font-size: 0.76rem;
        font-weight: 300;
        line-height: 1.5;
        letter-spacing: 0.015em;
        color: #222;
        margin-bottom: 8px;
        position: relative;
        padding-left: 14px;
    }

    .feature-list li::before {
        content: "•";
        position: absolute;
        left: 0;
        color: #888;
    }

    /* Pinned Footer Bar */
    .footer-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: transparent !important;
        padding: 0 !important;
        pointer-events: none;
        z-index: 10;
    }

    .footer-container {
        max-width: var(--site-max-width);
        margin: 0 auto;
        padding: 0 var(--site-gutter) 24px var(--site-gutter);
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 1.5rem;
    }

    .footer-container p,
    .footer-copy {
        margin: 0;
        color: #aaa !important;
        font-size: 0.65rem;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        pointer-events: auto;
    }

    .footer-socials,
    .footer-links {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        font-size: 0.65rem;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        pointer-events: auto;
    }

    .footer-socials a,
    .footer-links a {
        color: #aaa !important;
        text-decoration: none !important;
        transition: color 0.2s ease;
    }

    .footer-dot,
    .footer-links .dot {
        color: #aaa;
        opacity: 0.45;
        user-select: none;
    }

    .footer-socials a:hover,
    .footer-links a:hover {
        color: #1a1a1a !important;
        text-decoration: none !important;
    }
}

/* ==========================================================================
   MOBILE & TABLET FALLBACK (< 1024px)
   ========================================================================== */
@media (max-width: 1023px) {
    html, body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .nav-container {
        padding: 24px 20px;
    }

    .deck-wrapper {
        padding: 90px 20px 40px 20px;
        display: flex;
        flex-direction: column;
    }

    .project-gallery-deck {
        display: contents;
    }

    .slide:first-child,
    .slide.slide-hero {
        position: static;
        width: 100%;
        height: auto;
        max-width: 100%;
        margin: 0 0 28px 0;
        display: block;
        z-index: auto;
        order: 1;
    }

    .slide:first-child img,
    .slide.slide-hero img {
        width: 100%;
        max-width: 1000px;
        height: auto;
        max-height: none;
        object-fit: initial;
        object-position: left;
        display: block;
        margin: 0;
    }

    .project-info-pane {
        order: 2;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        margin-bottom: 36px;
    }

    .project-title {
        font-size: 1.9rem;
        margin-bottom: 12px;
    }

    .subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.15em;
        margin-bottom: 10px;
    }

    .lead-text {
        font-size: 0.92rem;
        line-height: 1.65;
        margin-bottom: 14px;
    }

    .feature-list {
        padding-left: 20px;
        margin-bottom: 28px;
    }

    .feature-list li {
        font-size: 0.88rem;
        margin-bottom: 10px;
    }

    .deck-counter {
        display: none;
    }

    .slide:not(:first-child) {
        order: 3;
        display: block;
        width: 100%;
        margin-bottom: 36px;
    }

    .slide:not(:first-child) img {
        width: 100%;
        max-width: 1000px;
        height: auto;
        display: block;
        margin: 0;
    }

    .footer-bar {
        order: 4;
        background: #1a1a1a;
        padding: 60px 20px;
        text-align: center;
    }

    .footer-container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 1.25rem;
    }

    .footer-container p,
    .footer-copy {
        margin: 0;
        color: #888 !important;
        font-size: 0.7rem;
        letter-spacing: 1.5px;
        text-transform: uppercase;
    }

    .footer-socials,
    .footer-links {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.7rem;
        letter-spacing: 1.5px;
        text-transform: uppercase;
    }

    .footer-socials a,
    .footer-links a {
        color: #888 !important;
        text-decoration: none !important;
        transition: color 0.2s ease;
    }

    .footer-dot,
    .footer-links .dot {
        color: #666;
        user-select: none;
    }

    .footer-socials a:hover,
    .footer-links a:hover {
        color: #ffffff !important;
        text-decoration: none !important;
    }
}