/* ==========================================================================
   SQUARE PANELS HOME STYLESHEET
   File: css/pages/home.css
   ========================================================================== */

/* --- HERO SECTION --- */
.hero-curtain-section {
    position: sticky; top: 0;
    height: 100vh; width: 100%;
    z-index: 0;
    margin-top: calc(var(--header-height) * -1); /* Pull under header */
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}

.hero-bg-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.hero-bg-video video, .hero-bg-video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; opacity: 0.4; z-index: 2; }

.hero-content { position: relative; z-index: 5; text-align: center; }

.hero-scroll-prompt {
    margin-top: 20px;
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0.8;
}

/* --- GLOBAL SECTION LAYERING --- */
.z-overlap {
    position: relative; z-index: 10;
    background-color: var(--bg-color);
    box-shadow: 0 -30px 60px rgba(0,0,0,0.8);
}

.section-border-top {
    width: 100%; height: 1px;
    background: rgba(255,255,255,0.1);
    position: absolute; top: 0; left: 0;
}
.section-border-top::after {
    content: ''; position: absolute; top: 0; left: 0;
    width: 0%; height: 1px; background: var(--accent);
    transition: width 1.5s ease;
}
.z-overlap.is-visible .section-border-top::after { width: 100%; }


/* --- MANIFESTO SCROLL --- */
.manifesto-scroll-section {
    height: 350vh; 
    background-color: #050505;
    position: relative;
    z-index: 20; 
}

.manifesto-sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.manifesto-content-layer {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.man-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
    margin-bottom: 0;
}

.man-line {
    display: block;
    font-size: clamp(3rem, 7vw, 7rem);
    font-weight: 800;
    line-height: 1.1; 
    color: #fff;
    letter-spacing: -0.04em;
    white-space: nowrap;
    margin-bottom: 2vh; 
    transform: translateZ(0);
    will-change: transform, opacity, filter;
}
.man-line:last-child { margin-bottom: 0; }
#man-line-2 { color: #333; }

.man-desc-container {
    position: relative; 
    margin-top: 6vh;    
    width: 100%;
    max-width: 600px;
    text-align: center;
    opacity: 0; 
    z-index: 3;
    will-change: opacity, transform;
}

.man-paragraph {
    font-size: 1.15rem;
    color: #999;
    line-height: 1.6;
}
.man-paragraph strong { color: #fff; font-weight: 600; }

@media (max-width: 768px) {
    .manifesto-scroll-section { height: 250vh; }
    .man-line { white-space: normal; margin-bottom: 10px; }
    .man-desc-container { margin-top: 40px; }
}


/* --- TEXTURE SCANNER SECTION --- */
.scanner-section {
    height: 300vh; /* 3 Slides x scroll distance */
    background: #000;
    position: relative;
    cursor: crosshair; 
}

.scanner-sticky-wrapper {
    position: sticky; top: 0;
    height: 100vh; width: 100%;
    overflow: hidden;
}

.scanner-slide {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Base Slide */
.slide-1 { z-index: 1; }

/* Masked Slides (Hidden initially via clip-path) */
.slide-2 { 
    z-index: 2; 
    clip-path: circle(0% at 50% 50%); /* Default start point */
    will-change: clip-path;
}

.slide-3 { 
    z-index: 3; 
    clip-path: circle(0% at 50% 50%);
    will-change: clip-path;
}

/* Visuals */
.scan-visual {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
}
.scan-visual img { width: 100%; height: 100%; object-fit: cover; }
.scan-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
}

/* Text Content - UNIFIED LOCATION (Desktop & Mobile) */
.scan-content {
    position: absolute;
    z-index: 10;
    width: 100%;
    max-width: 600px;
    
    bottom: 0;
    left: 0;
    padding: 60px 5vw; 
    
    color: #fff;
    opacity: 0; 
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;

    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    text-align: left;
}

/* Active Text State */
.scanner-slide.active .scan-content {
    opacity: 1;
    transform: translateY(0);
}

/* Typography */
.scan-label {
    font-family: monospace;
    color: var(--accent);
    margin-bottom: 20px;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}
.scan-title { font-size: 3.5rem; line-height: 1; margin-bottom: 20px; font-weight: 800; }
.scan-desc { font-size: 1.1rem; color: #ccc; line-height: 1.6; max-width: 450px; }


/* Progress Bar */
.scan-progress-bar {
    position: absolute; bottom: 0; left: 0;
    width: 100%; height: 4px;
    background: rgba(255,255,255,0.1);
    z-index: 20;
}
.scan-progress-fill {
    height: 100%; width: 0%;
    background: var(--accent);
}

@media (max-width: 1024px) {
    .scan-content {
        max-width: 100%; 
        padding: 80px 30px 40px 30px;
    }
    .scan-title { font-size: 2.5rem; }
}


/* --- COLLECTION TRIPTYCH SECTION --- */
.triptych-section {
    background: #000;
    position: relative;
    height: 100vh; 
}

.triptych-sticky-wrapper {
    width: 100%; height: 100%;
}

.triptych-track {
    display: flex;
    width: 100%;
    height: 100%;
}

.trip-col {
    position: relative;
    flex: 1; /* Start equal width on desktop */
    height: 100%;
    overflow: hidden;
    transition: flex 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    border-right: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}
.trip-col:last-child { border-right: none; }

/* HOVER STATE (Desktop Only) */
@media (min-width: 1025px) {
    .triptych-track:hover .trip-col { flex: 1; } /* Reset */
    .triptych-track .trip-col:hover { flex: 2.5; } /* Grow active */
    
    .trip-body {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    }
    .trip-col:hover .trip-body {
        max-height: 200px;
        opacity: 1;
        margin-top: 20px;
    }
}


.trip-bg {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
}
.trip-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
    filter: brightness(0.7);
}
.trip-col:hover .trip-bg img {
    transform: scale(1.1);
    filter: brightness(0.9);
}

.trip-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent 60%);
}

/* Content */
.trip-content {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    padding: 60px 40px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.trip-num {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 20px;
    display: block;
}

.trip-title {
    font-size: 3rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    line-height: 1;
    margin-bottom: 0;
    transition: margin-bottom 0.4s ease;
}
.trip-period { color: var(--accent); }

.trip-desc {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 20px;
    max-width: 400px;
}

.btn-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.1em;
}
.btn-line::after {
    content: ''; display: block; width: 30px; height: 1px; background: var(--accent);
    transition: width 0.3s;
}
.btn-line:hover::after { width: 50px; }


/* MOBILE LAYOUT - PINNED HORIZONTAL SCROLL */
@media (max-width: 1024px) {
    .triptych-section {
        height: 400vh; /* 4x Height to allow scroll distance */
    }

    .triptych-sticky-wrapper {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow: hidden;
    }

    .triptych-track {
        display: flex;
        width: 300vw; /* 3 Panels */
        height: 100%;
        will-change: transform;
    }

    .trip-col {
        width: 100vw;
        height: 100vh;
        flex: 0 0 100vw; 
        border-right: 1px solid rgba(255,255,255,0.1);
        transition: none; 
    }
    
    /* Text Always Visible on Mobile */
    .trip-body {
        max-height: none;
        opacity: 1;
        margin-top: 20px;
        display: block;
    }
    
    .trip-title { font-size: 2.5rem; }
}