/* PROJECT TEMPLATE STYLES */
/* Extends the main design system from style.css */

/* Hero Section - Full-height split layout */
.project-hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 45% 55%;
    position: relative;
}

.hero-image-panel {
    background-size: cover;
    background-position: center;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 4rem;
    color: #ffffff;
}

.hero-image-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.project-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 6vw, 6rem);
    font-style: italic;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.hero-meta {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.9;
}

.hero-text-panel {
    background: var(--bg-dark);
    padding: 8rem 6%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-intro {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 600px;
}

/* Scroll-triggered animations */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--easing), transform 0.8s var(--easing);
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s var(--easing) 0.2s, transform 0.6s var(--easing) 0.2s;
}

.scroll-slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Premium Reveal Animations */
.scroll-reveal-up {
    opacity: 0;
    transform: translateY(60px) scale(1.02);
    filter: blur(10px);
    transition: opacity 1s var(--easing), transform 1s var(--easing), filter 1s var(--easing);
}

.scroll-reveal-up.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    clip-path: inset(0 100% 0 0);
    transition: opacity 1.2s var(--easing), transform 1.2s var(--easing), clip-path 1.2s var(--easing);
}

.scroll-reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
    clip-path: inset(0 0 0 0);
}

.scroll-reveal-right {
    opacity: 0;
    transform: translateX(60px);
    clip-path: inset(0 0 0 100%);
    transition: opacity 1.2s var(--easing), transform 1.2s var(--easing), clip-path 1.2s var(--easing);
}

.scroll-reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
    clip-path: inset(0 0 0 0);
}

/* Project Section Layouts */
.project-section {
    padding: 10rem 8%;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.project-section.dark-bg {
    background: var(--text-main);
    color: #ffffff;
}

.section-header {
    margin-bottom: 6rem;
}

.section-label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 600;
    line-height: 1.2;
    font-style: italic;
}

/* =========================================
   SECTIONAL STICKY COLLAGE ARCHITECTURE
   ========================================= */

body.project-template-page {
    display: block !important;
    overflow-x: visible;
}

.story-section {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Left Side: Media Stage */
.media-stage {
    width: 55%;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    background-color: #ececec;
    /* Loading color */
    overflow: hidden;
    z-index: 1;
}

.collage-grid {
    position: absolute;
    inset: 0;
    padding: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-auto-rows: 220px;
    grid-auto-flow: dense;
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s var(--easing), visibility 1s var(--easing), transform 1s var(--easing);
    transform: scale(1.05);
}

.collage-grid.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.collage-item {
    border-radius: 12px;
    overflow: hidden;
    background-color: #ddd;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s var(--easing);
}

.collage-item:hover {
    transform: scale(1.02);
    z-index: 10;
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.collage-item img.loaded {
    opacity: 1;
}

/* Grid Variations for Collage Feel */
.collage-item.wide {
    grid-column: span 2;
}

.collage-item.tall {
    grid-row: span 2;
}

.collage-item.big {
    grid-column: span 2;
    grid-row: span 2;
}

/* Right Side: Content Block */
.content-block {
    width: 45%;
    flex-shrink: 0;
    padding: 10rem 6rem;
    background-color: #ffffff;
    z-index: 2;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .story-section {
        flex-direction: column;
    }

    .media-stage {
        position: relative;
        height: 70vh;
        flex: none;
    }

    .content-block {
        padding: 4rem 2rem;
        flex: none;
        border-left: none;
    }
}

/* TYPOGRAPHY & TEXT COLUMN */
.project-header {
    margin-bottom: 6rem;
}

.student-names {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.main-title {
    font-family: var(--font-serif);
    font-size: 4rem;
    line-height: 0.95;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.sub-title {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 90%;
}

.project-narrative {
    max-width: 65ch;
    /* Optimal reading width */
}

.text-block {
    margin-bottom: 4rem;
}

.text-block h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
}

.text-block p {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 1.5rem;
}

.divider-small {
    width: 50px;
    height: 1px;
    background-color: var(--accent);
    margin: 4rem 0;
}

.download-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--text-main);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.download-btn:hover {
    background: var(--accent);
}

.project-footer {
    margin-top: 8rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .layout-visuals {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding: 4rem 2rem;
        gap: 4rem;
    }

    .layout-content {
        padding: 4rem 2rem;
    }

    .visual-item {
        width: 100%;
        align-self: center;
        margin-top: 0;
    }
}

/* Image Slider Component */
.image-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.slider-track {
    display: flex;
    transition: transform 0.5s var(--easing);
}

.slider-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.slider-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.slider-controls {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.slider-btn:hover {
    background: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

.slider-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.slider-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-dot.active {
    background: #ffffff;
    transform: scale(1.3);
}

/* Parallax Section */
.parallax-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.parallax-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    padding: 3rem;
}

.parallax-content h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-style: italic;
    margin-bottom: 2rem;
}

.parallax-content p {
    font-size: 1.3rem;
    line-height: 1.7;
    opacity: 0.95;
}

/* Gallery Grid for Deliverables */
.deliverables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.deliverable-item {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.4s var(--easing);
}

.deliverable-item:hover {
    transform: translateY(-8px);
}

.deliverable-item img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(20%);
    transition: filter 0.5s ease;
}

.deliverable-item:hover img {
    filter: grayscale(0%);
}

.deliverable-caption {
    padding: 1.5rem;
    background: var(--bg-card);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* Responsive */
@media(max-width: 1024px) {
    .project-hero {
        grid-template-columns: 1fr;
    }

    .hero-image-panel {
        position: relative;
        height: 60vh;
    }

    .two-col-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .col-sticky {
        position: static;
    }

    .project-section {
        padding: 6rem 5%;
    }
}

@media(max-width: 768px) {
    .hero-text-panel {
        padding: 4rem 5%;
    }

    .project-intro {
        font-size: 1.2rem;
    }

    .deliverables-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2.5rem;
    }
}