/* --- PROJECT DETAILS REFINEMENTS --- */

.project-detail-page {
    background: #050505;
    color: #fff;
    overflow-x: hidden;
}

#project-main,
#dynamic-sections,
.feature-section,
.project-brief-section,
.project-cta-section,
.next-project-section {
    overflow-x: clip;
}

/* Hero Section Refinements */
.project-hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5vw;
    overflow: hidden;
    text-align: center;
}

.hero-bg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 140%;
    z-index: 1;
}

.hero-parallax-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
    display: block;
}

video.hero-parallax-img {
    /* Ensure video covers background */
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(5, 5, 5, 1) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
}

#hero-title {
    font-size: clamp(3rem, 10vw, 9rem) !important;
    line-height: 0.95;
    max-width: 12ch;
    margin: 0 auto;
    text-wrap: balance;
}

.hero-header {
    margin-bottom: 4rem;
}

.meta-label {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.hero-meta-brief {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: left;
}

@media (min-width: 768px) {
    .hero-meta-brief {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.info-block .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
    display: block;
    margin-bottom: 0.5rem;
}

.info-block .value {
    font-family: var(--font-display);
    font-size: 1.2rem;
    text-transform: uppercase;
}

/* Brief Section */
.project-brief-section {
    padding: 15rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brief-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8vw;
    align-items: flex-start;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr 1fr;
        margin-top: 2.5rem;
    }
}

.results-grid.results-grid-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-card {
    border-left: 1px solid var(--accent-color);
    padding-left: 1.5rem;
}

.result-num-wrapper {
    display: flex;
    align-items: baseline;
}

.result-num {
    font-family: var(--font-display);
    font-size: 3rem;
    line-height: 1;
}

.result-suffix {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-left: 5px;
}

.result-text {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-card.fact-card {
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left-width: 3px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.result-kicker {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-color);
}

.result-fact {
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1.2;
    text-transform: uppercase;
    color: #fff;
}

@media (min-width: 768px) {
    .result-text {
        font-size: 0.9rem;
    }
}

/* Feature Sections */
.feature-section {
    padding: 10rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 5vw;
    align-items: center;
}

.feature-content,
.feature-media,
.title-column,
.info-column {
    min-width: 0;
}

.feature-section.reverse .feature-grid {
    direction: ltr;
}

.feature-section.reverse .feature-content {
    order: 2;
}

.feature-section.reverse .feature-media {
    order: 1;
}

.rich-text .content-p:last-child,
.rich-text .content-list:last-child {
    margin-bottom: 0;
}

.content-list {
    margin: 0 0 2rem 1.2rem;
    color: #aaa;
    line-height: 1.7;
}

.content-list li + li {
    margin-top: 0.75rem;
}

.media-inner {
    width: 100%;
    aspect-ratio: 4/5;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
}

.media-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.media-inner:hover img {
    transform: scale(1.05);
}

/* Parallax Section */
.parallax-section {
    height: 80vh;
    width: 100%;
    overflow: hidden;
    position: relative;
    margin: 5rem 0;
}

.parallax-container {
    height: 140%;
    width: 100%;
    position: absolute;
    top: -20%;
}

.parallax-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.parallax-caption {
    position: absolute;
    bottom: 4rem;
    left: 5vw;
    z-index: 2;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 2rem;
    backdrop-filter: blur(10px);
}

/* Media Masonry */
.media-masonry {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.masonry-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.masonry-item:nth-child(even) {
    margin-top: 5rem;
}

/* Video Section */
.video-section {
    padding: 10rem 0;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #111;
    overflow: hidden;
    border-radius: 8px;
}

.video-wrapper video,
.video-wrapper iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-caption {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
    text-align: center;
}

.video-link-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    min-height: 320px;
    text-decoration: none;
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.25);
}

.video-link-poster,
.video-link-placeholder {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    display: block;
}

.video-link-placeholder {
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    background: linear-gradient(135deg, rgba(255, 42, 0, 0.18), rgba(255, 255, 255, 0.03));
}

.video-link-overlay {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.4rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.22));
    color: #fff;
}

.video-link-overlay strong {
    font-size: 1.2rem;
    line-height: 1.4;
}

.video-link-badge,
.video-link-action {
    width: fit-content;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.video-link-badge {
    color: var(--accent-color);
}

.video-link-action {
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
}

/* Next Project Section */
.next-project-section {
    padding: 10rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
    background: #050505;
}

.next-project-link {
    text-align: center;
    text-decoration: none;
    color: #fff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.next-project-link .label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 8px;
    color: #666;
    margin-bottom: 2rem;
}

.next-project-link .title {
    font-family: var(--font-display);
    font-size: 10vw;
    line-height: 0.9;
    text-transform: uppercase;
    transition: color 0.4s ease;
}

.next-project-link:hover .title {
    color: var(--accent-color);
}

.next-arrow {
    font-size: 4rem;
    margin-top: 2rem;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.next-project-link:hover .next-arrow {
    transform: translateX(40px);
}

/* Container */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 1024px) {

    .brief-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .hero-meta-brief {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-title {
        font-size: 15vw !important;
        line-height: 1.1;
    }

    .next-project-link .title {
        font-size: 15vw;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 10vw !important;
    }

    #hero-title {
        font-size: clamp(4.2rem, 7.1vw, 8rem) !important;
    }
}

@media (max-width: 768px) {
    .results-grid.results-grid-facts {
        grid-template-columns: 1fr;
    }

    .media-masonry {
        grid-template-columns: 1fr;
    }

    .masonry-item:nth-child(even) {
        margin-top: 0;
    }

    .project-brief-section {
        padding: 8rem 0;
    }
}

/* --- UNIFORM SHOWCASE SCROLLER --- */
.curved-showcase-section {
    padding: 6rem 0 4rem;
    overflow: hidden;
    position: relative;
    background: #050505;
    z-index: 2;
}

.showcase-title-wrapper {
    margin-bottom: 3rem;
}

.curved-showcase-controls {
    position: absolute;
    top: 4.5rem;
    right: 5vw;
    z-index: 25;
    display: flex;
    gap: 0.75rem;
}

.showcase-nav {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-nav:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

/* Horizontal scroll strip */
.curved-showcase-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 5vw 1.5rem;
    cursor: grab;
    position: relative;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.curved-showcase-container::-webkit-scrollbar {
    display: none;
}

.curved-showcase-container:active {
    cursor: grabbing;
}

.curved-showcase-container.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
}

/* Uniform card sizing */
.showcase-item {
    flex: 0 0 500px;
    height: 650px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #111;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
    scroll-snap-align: center;
    position: relative;
}

.showcase-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.curved-showcase-container.is-dragging .showcase-item {
    pointer-events: none;
}

.showcase-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: transform 0.5s ease;
}

.showcase-item:hover img {
    transform: scale(1.05);
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    cursor: zoom-out;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
    z-index: 1003;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 1002;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Meta info overlay on card */
.showcase-item-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.35s ease;
    pointer-events: none;
}

.showcase-item:hover .showcase-item-meta {
    opacity: 1;
    transform: translateY(0);
}

.showcase-hint {
    margin-top: 1rem;
    text-align: center;
    color: #7d7d7d;
    font-size: 0.75rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

@media (max-width: 1024px) {
    .showcase-item {
        flex: 0 0 380px;
        height: 500px;
    }
}

@media (max-width: 768px) {
    .curved-showcase-section {
        padding: 4rem 0 2rem;
    }

    .curved-showcase-container {
        gap: 0.75rem;
        padding: 0.5rem 4vw 1rem;
    }

    .showcase-item {
        flex: 0 0 280px;
        height: 380px;
        border-radius: 8px;
    }

    .showcase-title-wrapper {
        margin-bottom: 1.5rem;
    }

    .curved-showcase-controls {
        top: 3rem;
        right: 4vw;
    }

    .showcase-nav {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .lightbox-prev {
        left: 0.75rem;
    }

    .lightbox-next {
        right: 0.75rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .showcase-item {
        flex: 0 0 220px;
        height: 300px;
    }
}

.feature-section {
    padding: 5rem 0;
}

.project-hero {
    height: auto;
    min-height: 100vh;
    padding: 8rem 5vw 4rem;
}

.hero-bg-media { transform: none !important; }

/* --- PROJECT DETAIL MOBILE FIXES --- */
@media (max-width: 768px) {
    .project-hero {
        min-height: 80vh;
        padding: 6rem 5vw 3rem;
    }

    .hero-meta-brief {
        padding: 1.25rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.03);
        backdrop-filter: blur(10px);
    }

    #hero-title {
        font-size: clamp(2.5rem, 12vw, 5rem) !important;
    }

    .hero-header {
        margin-bottom: 2rem;
    }

    .project-brief-section {
        padding: 5rem 0;
    }

    .brief-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .feature-section {
        padding: 3rem 0;
    }

    .feature-section.reverse .feature-content,
    .feature-section.reverse .feature-media {
        order: unset;
    }

    .media-inner {
        aspect-ratio: 16/10;
    }

    .parallax-section {
        height: 50vh;
        margin: 2rem 0;
    }

    .next-project-section {
        padding: 6rem 0;
    }

    .next-project-link .title {
        font-size: 12vw;
    }

    .next-arrow {
        font-size: 2.5rem;
    }

    .video-section {
        padding: 3rem 0;
    }

    .video-link-card,
    .video-link-poster,
    .video-link-placeholder {
        min-height: 240px;
    }

    /* Touch device cursor fix */
    .project-detail-page * {
        cursor: auto !important;
    }

    .project-detail-page .cursor-dot,
    .project-detail-page .cursor-outline {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .project-hero {
        min-height: 70vh;
        padding: 5rem 4vw 2rem;
    }

    #hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem) !important;
    }

    .project-brief-section {
        padding: 3rem 0;
    }

    .next-project-section {
        padding: 4rem 0;
    }

    .result-num {
        font-size: 2.5rem;
    }

    .result-suffix {
        font-size: 1.2rem;
    }
}

/* --- PROJECT PAGE UX UPGRADE --- */
.hero-summary {
    max-width: 720px;
    margin: 1.5rem auto 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.1rem;
    line-height: 1.7;
}

.project-hero .hero-actions {
    justify-content: center;
    margin-top: 1.5rem;
}

.project-cta-section {
    padding: 6rem 0 2rem;
}

.project-cta-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 1.5rem;
    align-items: center;
    padding: clamp(1.2rem, 2.5vw, 2rem);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 59, 0, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-cta-copy .section-title {
    max-width: 14ch;
}

.project-cta-actions {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.project-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 1rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 0.8rem;
    font-weight: 700;
}

.project-cta-btn.primary {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 14px 28px rgba(255, 59, 0, 0.22);
}

.project-cta-btn.secondary {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

@media (max-width: 768px) {
    .hero-summary {
        font-size: 1rem;
        line-height: 1.6;
    }

    .project-cta-section {
        padding: 4rem 0 1rem;
    }

    .project-cta-card {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .project-cta-actions {
        width: 100%;
    }

    .project-cta-btn {
        width: 100%;
    }
}
