/* style.css - Minimalist Cinematic Aesthetic */

@font-face {
    font-family: 'Futura Bold';
    src: url('assets/Futura-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ABC Diatype';
    src: url('assets/ABCDiatype-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #e9e8e6;
    --text-color: #1a1a1a;
    --accent-red: #CC0000;
    /* Darkened 20% toward maroon */
    --grid-gap: 1rem;
    --line-color: rgba(26, 26, 26, 0.85);
}

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

html {
    background-color: var(--bg-color);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.home-body {
    height: 100vh;
    overflow: hidden;
}

/* Base link styling */
a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    font-weight: 400;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

a:hover {
    color: var(--accent-red);
}

body,
a,
button {
    cursor: none;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    font-size: 1.4rem;
    /* 40% larger than 0.95rem */
    font-weight: 700;
    color: var(--text-color);
    /* Black/dark by default */
    transform: translate(-50%, -50%);
    transition: color 0.2s, mix-blend-mode 0.2s;
    display: none;
    /* hidden until mouse moves */
}

.custom-cursor.hover {
    color: white;
    mix-blend-mode: difference;
    /* Keeps the inversion effect on images if needed, or just white */
}

/* Specific styling for project title hover */
.custom-cursor.title-hover {
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 1.87rem;
    /* 15% smaller than the 2.2rem standard title */
    color: white;
    mix-blend-mode: difference;
    text-transform: uppercase;
    white-space: nowrap;
    text-align: center;
}

.top-nav a {
    font-weight: 700;
}

/* Removed asterisk for active page */

.site-wrapper {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 2.5rem;
    /* Surrounding padding */
}

.top-nav {
    position: absolute;
    top: 2.5rem;
    left: 2.5rem;
    z-index: 10;
}

.top-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.top-nav li {
    opacity: 0;
    transform: translateY(-20px);
    animation: navReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.top-nav li:nth-child(1) {
    animation-delay: 0.1s;
    transform: translateY(0);
    opacity: 1;
    animation: none;
}

/* glimpse anchor */
.top-nav li:nth-child(2) {
    animation-delay: 0.2s;
}

.top-nav li:nth-child(3) {
    animation-delay: 0.3s;
}

.top-nav li:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes navReveal {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-nav a {
    text-transform: lowercase;
    opacity: 0.6;
    font-size: 0.85rem;
    /* Reduced by 10% */
}

.top-nav a.active {
    opacity: 1;
    color: var(--text-color);
    /* Make active page black */
}

.top-nav a:hover {
    opacity: 1;
    color: var(--accent-red);
}

/* MAIN IMAGE AREA */
.content {
    grid-row: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
    /* Let clicks pass through if needed */
}

.image-container {
    width: 46vw;
    /* 20% larger than 38.4vw */
    max-width: 720px;
    height: auto;
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
    /* Box shadow removed */
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* hover effect removed */

.hero-image,
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    filter: sepia(10%) contrast(105%) saturate(85%);
    /* Subtle cinematic grade */
}

/* PROJECT CARD HOVER VIDEOS */
.hover-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    background-color: #000;
    /* Prevent still image from showing through mismatching aspect ratios */
}

.hover-video-iframe iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    /* Slight scale to hide Vimeo crop edges */
}

.project-card:hover .hover-video-iframe {
    opacity: 1;
    /* Fade video in on hover */
}

/* BOTTOM SECTION */
.bottom-section {
    background-color: transparent;
    margin-left: -2.5rem;
    margin-right: -2.5rem;
    margin-bottom: -2.5rem;
    padding: 1.25rem 2.5rem;
    /* Reduced padding by 50% for snug fit */
    display: block;
    z-index: 10;
}

.footer-bottom {
    margin-top: 1.5rem;
    /* Increased margin for more space above email */
    pointer-events: auto;
}

.contact-email {
    position: relative;
    display: inline-block;
    color: var(--text-color);
    font-size: 0.85rem;
    text-transform: lowercase;
    opacity: 0.6;
}

.contact-email::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--text-color);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.contact-email:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}


/* GLIMPSE HUGE TEXT SECTION */
.glimpse-text-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    text-decoration: none;
    /* purely visual framing */
}

.divider {
    display: none;
    /* Hide the divider lines entirely */
}

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@1,400;1,500&family=Manrope:wght@600;700;800&display=swap');

.glimpse-marquee {
    display: flex;
    justify-content: space-between;
    width: 85%;
    /* Widened for dramatic spacing */
    margin: 0 auto;
    font-family: 'ABC Diatype', sans-serif;
    font-weight: 400;
    /* Regular weight */
    color: var(--accent-red);
    /* Reverted back to previous red */
    font-size: 3.9vw;
    /* 20% larger than previous 3.25vw */
    line-height: 1;
    overflow: hidden;
    animation: spreadLetters 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spreadLetters {
    0% {
        width: 40%;
    }

    100% {
        width: 100%;
    }
}

.glimpse-marquee .asterisk-i {
    position: relative;
    display: inline-block;
    text-transform: lowercase;
}

.glimpse-marquee .asterisk-i::after {
    content: '*';
    position: absolute;
    top: -0.1em;
    left: 55%;
    transform: translateX(-50%);
    font-size: 0.85em;
    /* Slightly smaller asterisk */
    color: var(--accent-red);
    line-height: 1;
}

.glimpse-marquee span {
    display: inline-block;
}

/* Stagger animation removed in favor of single width spread animation */

/* RESPONSIVENESS */
@media (max-width: 768px) {
    .site-wrapper {
        padding: 1.5rem;
    }

    .top-nav {
        top: 1.5rem;
        left: 1.5rem;
    }

    .bottom-section {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        margin-bottom: -1.5rem;
        padding: 1.25rem 1.5rem;
    }

    .image-container {
        width: 60vw;
    }

    .glimpse-marquee {
        font-size: 8vw;
    }
    
    .info-text p {
        font-size: 1.2rem;
        white-space: normal;
        line-height: 1.4;
        padding: 0 1rem;
    }
}

.content-grid {
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 12rem 0 8rem 0;
    /* Reduced top and bottom padding significantly */
    /* Slim side padding to push to edges */
    z-index: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.content-grid::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 4rem;
    width: 100%;
    margin-bottom: 2rem;
    /* Reduced bottom negative space */
    padding: 0;
    /* Breathing room */
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Reduced vertical gap by 20% compared to previous */
        gap: 10rem 12vw;
    }
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: auto;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(10%) contrast(105%) saturate(85%);
}

/* Make card title red, credits gray */
.card-details {
    margin-top: 1rem;
    text-align: left;
}

.card-title {
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
    font-style: normal;
    font-size: 2.2rem;
    /* Much larger, matching the visual weight */
    font-weight: 400;
    /* Normal weight */
    color: #060233;
    /* Deep navy blue, similar to reference */
    text-transform: uppercase;
    letter-spacing: normal;
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.project-card .card-title {
    display: none;
    /* Hide standard text below images explicitly as requested */
}

.video-grid .card-credits {
    display: none;
    /* Hidden on grids, handled explicitly on project.html */
}

.card-credits {
    font-size: 0.85rem;
    font-weight: 400;
    color: #666;
    line-height: 1.4;
}

/* Update general body to allow scrolling on video page and info page */
body:has(.content-grid, .project-page-layout, .info-content) {
    overflow: auto;
}

/* INFO PAGE STYLES */
body:has(.info-content) .site-wrapper {
    background-color: var(--bg-color);
    isolation: isolate;
}

.info-content {
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.info-text {
    width: 100%;
    position: relative;
    z-index: 10;
    color: white;
    mix-blend-mode: difference;
}

.info-text p {
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
    font-style: normal;
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1.1;
    margin: 0;
    white-space: nowrap;
    /* Forces one line rendering */
}

.info-text .email-link {
    display: block;
    margin-top: 2rem;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.info-text .email-link:hover {
    color: var(--accent-red);
}

/* INDIVIDUAL PROJECT PAGE STYLES */
.project-page-layout {
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8rem 4vw 16rem 4vw;
    /* align padding with grid margins for consistency */
    width: 100%;
    box-sizing: border-box;
}

.fullscreen-video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 80vh;
    /* keep it elegantly readable */
    overflow: hidden;
    margin-bottom: 2rem;
}

.fullscreen-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    /* Crucial: stops iframe from swallowing mousemove events */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: auto;
    /* Captures interactions instead of iframe */
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 2rem;
    cursor: none;
    /* Inherit global none */
}

.custom-video-controls {
    display: flex;
    gap: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-overlay:hover .custom-video-controls {
    opacity: 1;
    /* Show minimal controls on hover */
}

.control-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: none;
    padding: 0.5rem;
}

.control-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: color 0.3s;
}

.control-btn:hover svg {
    color: var(--accent-red);
}

.project-page-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    margin-bottom: 5rem;
    padding: 1.5rem 0;
    /* Space out the lines */
}

.film-stills-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5vw;
    width: 100%;
    align-items: center;
}

.still-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: none;
    /* Let custom asterisk take over */
}

.still-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(10%) contrast(105%) saturate(85%);
    transition: filter 0.5s ease;
}

.still-wrapper:hover img {
    filter: sepia(0%) contrast(110%) saturate(100%);
}

/* LIGHTBOX STYLES */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 10, 10, 0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    right: -2rem;
    color: white;
    font-size: 2rem;
    font-weight: 300;
    background: transparent;
    border: none;
    padding: 1rem;
    cursor: pointer;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--accent-red);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 3rem;
    font-weight: 200;
    background: transparent;
    border: none;
    padding: 2rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.lightbox-arrow:hover {
    color: var(--accent-red);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: -5vw;
}

.lightbox-next {
    right: -5vw;
}

@media (max-width: 768px) {
    .lightbox-arrow {
        font-size: 2rem;
        padding: 1rem;
    }

    .lightbox-prev {
        left: -10vw;
    }

    .lightbox-next {
        right: -10vw;
    }

    .lightbox-close {
        right: 0;
        top: -4rem;
    }
}

/* INFO PAGE BTS HOVER OVERLAY */
#bts-hover-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    /* MUST be none to not block top-nav */
    z-index: 1;
    /* Behind text z-10 */
    overflow: hidden;
}

.bts-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: white;
    text-transform: uppercase;
    mix-blend-mode: difference;
    pointer-events: none;
    z-index: 2;
    letter-spacing: normal;
}

/* MOBILE OVERRIDES AT BOTTOM FOR MAX SPECIFICITY */
@media (max-width: 768px) {
    .info-text p {
        font-size: 1.4rem !important;
        white-space: normal !important;
        line-height: 1.4 !important;
        padding: 0 1rem !important;
    }

    .glimpse-marquee {
        font-size: 14vw !important;
        width: 100% !important;
        animation: none !important; /* Disable spread animation on mobile to prevent overflow */
    }

    .bottom-section {
        margin-left: -1.5rem !important;
        margin-right: -1.5rem !important;
        margin-bottom: -1.5rem !important;
        padding: 1.25rem 1.5rem !important;
        width: 100vw !important; /* Force width */
        box-sizing: border-box !important;
    }
}