/* PMBMP Grid Layout - Minimal 4-Box Design */

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

body {
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #ffffff;
    background-image: linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.75)), url('assets/background_main.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #000000;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    overflow-y: auto;
    /* Allow vertical scroll */
    min-height: 100vh;
    position: relative;
}

/* ... skipped ... */

/* Main Container */
.pmbmp-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
    /* Allow growth */
    height: auto;
    position: relative;
}

/* Removed Pink Background */
body::before {
    display: none;
}

/* Remove body::after angular shape */
body::after {
    display: none;
}

/* Remove pmbmp-container::before angular shape */
.pmbmp-container::before {
    display: none;
}

/* Remove logo-strip::before */
.logo-strip::before {
    display: none;
}

/* Grain Texture Overlay - kept but subtle on white */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    opacity: 0.2;
    /* Reduced opacity for white bg */
    pointer-events: none;
}

/* Page Transition Overlay - Removed by user request */


/* Main Container */
.pmbmp-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Content Window for Grid - Aligns to Bottom */
/* Content Window for Grid */
.content-window {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Changed from flex-end to allow scrolling flow */
    padding: 120px 60px 60px 60px;
    /* Increased top padding for breathing room */
    position: relative;
    z-index: 10;
    min-height: 100vh;
    /* Ensure full height */
}

/* T For Troels Layout Styling */
.troels-layout {
    width: 100%;
    margin-bottom: 40px;
    margin-top: auto;
    /* Pushes content to bottom of first view */
    font-family: 'Jost', sans-serif;
    /* Ensuring specific font */
    color: #000000;
}

.troels-super-header {
    font-size: 14px;
    margin-bottom: 5px;
    /* Adjust spacing as needed */
    padding-left: 0;
}

/* Top Info Bar */
.troels-top-bar {
    display: grid;
    grid-template-columns: 8% 1fr 1fr 1fr;
    column-gap: 40px;
    margin-bottom: 2rem;
    font-size: 20px;
    /* Larger for Links */
    line-height: 1.4;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    padding-top: 10px;
}

/* ... */

/* Bottom Grid */
.troels-bottom-grid {
    display: grid;
    grid-template-columns: 8% 1fr 1fr 1fr;
    column-gap: 40px;
    font-size: 13px;
    /* Reset for Bio text */
    line-height: 1.5;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    padding-top: 20px;
}

.troels-top-bar .label,
.troels-bottom-grid .label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 4px;
}

.col-intro p,
.col-contact p,
.col-details p {
    margin: 0;
    font-size: 13px;
}

.col-contact a {
    color: #000000;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}

/* Hero Heading */
/* Hero Heading */
/* Hero Heading */
/* Hero Heading */
.troels-hero-heading {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Helvetica Neue Bold style */
    font-size: clamp(60px, 12vw, 180px);
    /* Adjusted size for longer word */
    font-weight: 700;
    /* Bold */
    line-height: 1;
    margin: 4rem 0;
    letter-spacing: -0.04em;
    /* Tight tracking like reference */
    white-space: nowrap;
    color: #000;
    /* Deep black */
    opacity: 1;
    min-height: 1em;
}

.troels-hero-heading::after {
    content: '_';
    animation: blinkCursor 1s step-end infinite;
    opacity: 1;
}

@keyframes blinkCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Animate Top Bar Columns */
.troels-top-bar>div {
    opacity: 0;
    animation: fadeInDown 0.8s ease-out forwards;
}

.troels-top-bar>div:nth-child(1) {
    animation-delay: 0.1s;
}

.troels-top-bar>div:nth-child(2) {
    animation-delay: 0.2s;
}

.troels-top-bar>div:nth-child(3) {
    animation-delay: 0.3s;
}

.troels-top-bar>div:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* Bottom Grid */


/* Specific larger labels for bottom grid */
.troels-bottom-grid .label {
    font-size: 16px !important;
    /* Increased from 11px */
    margin-bottom: 2px;
    /* Closer to text */
}



.troels-bottom-grid p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Specific styling for the 'Email for details' text */
.pm-details {
    margin-top: 1.5rem;
    position: relative;
    display: inline-block;
}

/* Arrow decoration removed */
.pm-details::before {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.main-description {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.6;
    color: #ffffff;
    max-width: 600px;
    animation: fadeIn 0.8s ease-out 0.5s forwards;
    opacity: 0;
}



/* Back to Home Button */
.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333333;
    padding: 8px 16px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #ffffff;
    z-index: 100;
}

.back-button:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: #666666;
}

/* Grid Container - Single Strip at Bottom */
.grid-container {
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    background-color: transparent;
}

/* Individual Box Styling - Strip with Dividers */
.grid-box {
    position: relative;
    border: none;
    border-right: 1px solid #000000;
    background-color: #ffffff;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    color: #000000;
    animation: slideUp 0.7s ease-out forwards;
    opacity: 0;
}

/* Remove border from last box */
.grid-box:last-child {
    border-right: none;
}

/* Staggered animation delays for each box */
.grid-box:nth-child(1) {
    animation-delay: 0.7s;
}

.grid-box:nth-child(2) {
    animation-delay: 0.85s;
}

.grid-box:nth-child(3) {
    animation-delay: 1s;
}

.grid-box:nth-child(4) {
    animation-delay: 1.15s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

.grid-box:hover {
    background-color: #f5f5f5;
}

/* Box Number (Large Background Element) */
.box-number {
    position: absolute;
    top: 50%;
    left: -80px;
    transform: translateY(-50%);
    font-size: 400px;
    font-weight: 700;
    letter-spacing: -10px;
    color: #f5f5f5;
    z-index: 1;
    line-height: 1;
    pointer-events: none;
}

/* Box Title */
.box-title {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1;
    margin: 0;
    color: #000000;
    text-transform: lowercase;
    position: relative;
    z-index: 2;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .logo-strip h1 {
        font-size: 36px;
    }

    .box-title {
        font-size: 28px;
    }
}



/* Scroll Arrow */
.scroll-down-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards, bounce 2s infinite 2s;
}

.scroll-arrow {
    font-size: 24px;
    font-weight: 300;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Video Grid Section - Alex Winker Style */
.video-grid-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 Across */
    gap: 0;
    /* Seamless - No Gap */
    margin-top: 100px;
    width: 100%;
    padding-bottom: 100px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.video-section-header {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #000;
    padding-left: 0;
    /* Re-align with content */
}

.video-item {
    position: relative;
    background-color: #000;
    aspect-ratio: 16 / 10;
    /* Match reference ~1.65 */
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #ffffff;
    /* Thin white border for separation */
}

.video-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.video-item:hover img {
    transform: scale(1.03);
    /* Subtle zoom on hover */
    filter: brightness(0.7);
    /* Darken image on hover for text contrast */
}

/* Hover Overlay Title */
.video-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Clean sans-serif like reference */
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through */
    letter-spacing: 1px;
}

.video-item:hover .video-title {
    opacity: 1;
}

/* Remove old pseudo-elements */
.video-item::after {
    display: none;
}


/* Project Detail Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.98);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow-y: auto;
}

.project-modal.active {
    display: flex;
    opacity: 1;
}

/* Modal Close Button */
.modal-close {
    position: fixed;
    top: 30px;
    right: 40px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 48px;
    font-weight: 300;
    cursor: pointer;
    z-index: 1002;
    transition: opacity 0.2s ease, transform 0.2s ease;
    line-height: 1;
    padding: 0;
    width: 50px;
    height: 50px;
}

.modal-close:hover {
    opacity: 0.7;
    transform: rotate(90deg);
}

/* Modal Content Container */
.modal-content {
    width: 100%;
    max-width: 1400px;
    margin: 80px auto;
    padding: 40px 60px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    align-items: start;
}

/* Project Details Section */
.project-details {
    color: #ffffff;
    font-family: 'Jost', sans-serif;
}

.modal-project-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 30px;
    letter-spacing: 1px;
    color: #ffffff;
}

.modal-credits {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.modal-credits .credit-item {
    margin-bottom: 12px;
}

.modal-credits .credit-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    display: block;
    margin-bottom: 4px;
}

.modal-credits .credit-value {
    font-size: 14px;
    color: #ffffff;
}

/* Video Player Container */
.video-player-container {
    position: relative;
    width: 100%;
}

.video-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    background-color: #000;
    border-radius: 4px;
    overflow: hidden;
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Scrollable Modal Wrapper */
.modal-scroll-wrapper {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Modal Content Container */
.modal-content {
    width: 100%;
    max-width: 1400px;
    margin: 80px auto;
    padding: 40px 60px 100px 60px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto auto;
    gap: 80px;
    align-items: start;
}

/* Stills Section Spanning Full Width */
.project-stills-section {
    grid-column: 1 / -1;
    margin-top: 30px;
}

.stills-heading {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
    font-family: 'Jost', sans-serif;
}

.stills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.still-image {
    position: relative;
    aspect-ratio: 16 / 10;
    background-color: #111;
    overflow: hidden;
    border-radius: 4px;
}

.still-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.still-image:hover img {
    transform: scale(1.05);
}

/* Navigation Arrows */
.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 36px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav-prev {
    left: 40px;
}

.modal-nav-next {
    right: 40px;
}

.modal-nav span {
    line-height: 1;
}

/* Responsive Modal */
@media (max-width: 1024px) {
    .modal-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 40px;
        margin: 60px auto;
    }

    .modal-close {
        top: 20px;
        right: 20px;
        font-size: 36px;
    }

    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .modal-nav-prev {
        left: 20px;
    }

    .modal-nav-next {
        right: 20px;
    }
}

.troels-bottom-grid>div:nth-child(4) {
    animation-delay: 1.1s;
}

/* ------------------------------------- */
/* MOBILE OVERRIDES (MUST BE AT THE END) */
/* ------------------------------------- */
@media (max-width: 768px) {
    .pmbmp-container {
        flex-direction: column;
    }

    .back-home {
        top: 10px;
        right: 20px;
        left: auto;
        transform: none;
    }

    .grid-container,
    .video-grid-section {
        width: 100% !important;
        grid-template-columns: 1fr !important;
        margin-top: 40px !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .video-item {
        aspect-ratio: 16/9;
    }

    .box-title {
        font-size: 24px;
    }

    .grid-box {
        padding: 30px;
    }

    .content-window {
        padding: 40px 20px 20px 20px;
    }

    .modal-content {
        padding: 30px 20px;
        margin: 100px auto 40px;
    }

    .troels-top-bar,
    .troels-bottom-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .troels-top-bar {
        font-size: 16px;
    }

    /* Target the giant "storytellers" hero text specifically */
    .troels-hero-heading {
        font-size: 40px !important;
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
        white-space: normal !important;
        /* Allow it to wrap if its too long */
        word-break: break-word !important;
    }

    .modal-project-title {
        font-size: 20px;
    }

    .modal-nav {
        bottom: 20px;
        top: auto;
        transform: none;
    }

    .modal-nav:hover {
        transform: scale(1.1);
    }

    .modal-nav-prev {
        left: 20px;
    }

    .modal-nav-next {
        right: 20px;
    }
}