/* ==============================
   🔤 FONT DECLARATIONS
   ============================== */
@font-face {
    font-family: 'Montserrat';
    src: url('/fonts/Montserrat-Regular.woff2') format('woff2'),
         url('/fonts/Montserrat-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('/fonts/Manrope-Bold.woff2') format('woff2'),
         url('/fonts/Manrope-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==============================
   🏁 GENERAL RESET & BASE STYLES
   ============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    height: 100%;
    background: black;
    font-family: "Montserrat", sans-serif;
}

/* Only hide overflow on pages with video sliders */
.slider-page body,
.slider-page html {
    overflow: hidden;
}

/* Accessible utility class for content meant only for assistive technologies */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================
   🎥 VIDEO & SLIDER STYLING
   ========================== */
/* 🎥 Prevent Flickering: Videos Load Only When Ready */
video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}

/* 🚫 Disable Picture-in-Picture Controls */
video::-webkit-media-controls-picture-in-picture-button {
    display: none !important;
}

video::-moz-media-controls-picture-in-picture-button {
    display: none !important;
}

.slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slides {
    display: flex;
    height: 100%;
    transition: transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.slide {
    position: relative;
    min-width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.slide video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 1;
    transition: opacity 0.5s ease-in;
}

.overlay {
    position: relative;
    z-index: 2;
}

/* ============================
   📝 OVERLAY & TEXT STYLING
   ============================ */
.overlay {
    position: absolute;
    bottom: 20%;
    left: 10%;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate3d(0, 0, 0);
    will-change: opacity, transform;
    transition: opacity 0.3s ease-in-out;
}

.overlay .page-count {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(12pt, 1.2vw, 1.3vw);
    font-weight: 600;
    color: white;
    position: relative;
}

/* 🔹 Overlay Title */
.overlay h1 {
    font-family: "Manrope", sans-serif;
    font-size: clamp(12pt, 10vw, 180px);
    font-weight: 700;
    text-transform: lowercase;
    letter-spacing: -0.01em;
    color: white;
    margin-bottom: 10px;
    text-shadow: 3px 3px 10px black;
}

/* 🔹 Overlay Description */
.overlay p {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(12pt, 0.9vw, 1vw);
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.5;
    display: flex;
    align-items: center;
    color: white;
}

/* 🔹 Overlay Spacing & Opacity Control */
.overlay p .service {
    opacity: 1;
}

.overlay p .client,
.overlay p .industry {
    opacity: 0.75;
}

.overlay p .industry:last-child {
    opacity: 1;
}

.overlay p .spacer {
    display: block;
    width: 100%;
    height: 0;
}

.overlay p .industry {
    display: inline;
    white-space: nowrap;
}

.overlay p .industry:first-of-type {
    margin-left: 0;
}

.overlay p .industry.last {
    margin-left: 0.3em;
}

/* ============================
   📍 STATIC ELEMENTS & NAVIGATION
   ============================ */
.static-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* 🔹 Logo */
.logo {
    position: fixed;
    top: 5%;
    left: 10%;
    pointer-events: auto;
    z-index: 100;
    text-decoration: none;
}

/* 🔹 Navigation */
nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: auto;
    user-select: none;
}

nav button {
    background: none;
    border: none;
    color: white;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: clamp(12pt, 0.8rem, 0.9rem);
    cursor: pointer;
    padding: 10px;
    margin: 0 20px;
    writing-mode: sideways-lr;
    pointer-events: auto;
    opacity: 0.8;
    transition: opacity 0.3s;
    user-select: none;
}

nav button:hover {
    opacity: 1;
}

/* 🔹 Right-aligned Image Control */
.right-aligned {
    object-position: right center;
}

.bottom-aligned {
    object-position: bottom center;
}

/* 🔹 About & Footer Links */
.about-link,
footer {
    position: fixed;
    pointer-events: auto;
    z-index: 100;
}

.about-link {
    top: 5%;
    right: 5%;
}

/* Dropdown Container */
.dropdown-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.about-main-link {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(12pt, 0.8rem, 0.9rem);
    color: white;
    text-decoration: none;
    margin-right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* Dropdown Toggle Button */
.dropdown-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.8rem;
    line-height: 1;
    transition: opacity 0.3s ease;
    opacity: 0.7;
}

.dropdown-toggle:hover {
    opacity: 1;
}

.dropdown-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 10px 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.dropdown-menu[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(12pt, 0.8rem, 0.9rem);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.dropdown-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.about-link a,
footer a {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(12pt, 0.8rem, 0.9rem);
    color: white;
    text-decoration: none;
}

/* ============================
   🏛 ABOUT PAGE STYLING
   ============================ */
.about-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}


.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    /* Aspect ratio hint for layout stability */
    aspect-ratio: 16 / 9;
}

.about-content {
    position: absolute;
    bottom: 20%;
    left: 10%;
    max-width: 60%;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    line-height: 1.6;
    z-index: 1;
    color: white;
}

.about-content h1 {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(1.25rem, 4vw, 2rem);
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .about-content h1 {
        font-size: 1.25rem;
    }
}

.about-content p {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(12pt, 1rem, 1rem);
    font-weight: 400;
}

.dots-container {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
    isolation: isolate;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-image: none !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    opacity: 0.7 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    mix-blend-mode: normal !important;
    isolation: isolate;
    -moz-appearance: none;
    color-interpolation: sRGB;
    color-interpolation-filters: sRGB;
}

/* Firefox-specific fix for dots */
@-moz-document url-prefix() {
    .dot {
        opacity: 0.9 !important;
        background: rgba(255, 255, 255, 1) !important;
    }
}

.dot.active {
    width: 16px;
    height: 16px;
    background-image: none !important;
    background: rgb(255, 255, 255) !important;
    background-color: rgb(255, 255, 255) !important;
    opacity: 1 !important;
}

.dot.adjacent {
    background-image: none !important;
    background: rgb(255, 255, 255) !important;
    background-color: rgb(255, 255, 255) !important;
    opacity: 0.85 !important;
}

/* ============================
   📱 RESPONSIVE DESIGN (MOBILE)
   ============================ */

@media (max-width: 768px) and (orientation: portrait) {
    .about-content {
        max-width: 90vw; /* Wider text box */
        min-width: 300px;
        max-height: 75vh; /* More space for scrolling */
        top: 10vh;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        overflow-y: auto;
        scrollbar-width: none;
        padding: 20px;
        scroll-padding-top: 0;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Smaller heading in portrait */
    .about-content h1 {
        font-size: 1.1rem !important;
    }
}


@media (max-width: 1024px) and (orientation: landscape) {
    .about-content {
        max-width: 98vw; /* Nearly full width for landscape */
        min-width: 300px;
        max-height: 70vh; /* Smaller height so it fits on screen */
        top: 0 !important;
        bottom: auto;
        left: 50% !important; /* Override desktop left: 10% */
        transform: translateX(-50%);
        overflow-y: auto;
        scrollbar-width: none;
        padding: 8px; /* Minimal padding for landscape */
        scroll-padding-top: 0;
        -webkit-overflow-scrolling: touch;
        margin-top: 20px; /* More space from top */
        margin-left: 0 !important; /* Remove any inherited left margin */
        margin-right: 0 !important; /* Remove any inherited right margin */
    }
    
    /* Smaller heading in landscape */
    .about-content h1 {
        font-size: 1rem !important;
    }
}

    
    /* Hide scrollbar for webkit browsers too */
    .about-content::-webkit-scrollbar {
        display: none;
    }

    .overlay .page-count {
        visibility: hidden;
    }

    .overlay p {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .overlay p .service,
    .overlay p .client {
        display: inline-block;
        white-space: nowrap;
    }

    .overlay p .spacer {
        display: block;
        width: 100%;
        height: 0;
        margin-top: 5px;
    }
    
    .overlay p .industry {
        display: inline;
        white-space: nowrap;
    }
    
    .overlay p .industry:first-of-type {
        margin-left: 0;
    }

    footer.lets-talk {
        top: 10%; /* Move it near the top */
        right: 5%; /* Align with "About" */
        left: auto; /* Override the left position */
        bottom: auto; /* Remove the bottom alignment */
        text-align: right;
    }

    /* Homepage - Fix bottom nav and dots overlap in landscape */
    @media (orientation: landscape) {
        footer.lets-talk {
            bottom: 15%;
            left: 10%;
            top: auto;
            right: auto;
        }

        .dots-container {
            bottom: 8%;
        }
    }

/* ============================
   PAGE-SPECIFIC STYLES
   ============================ */

/* Projection Designer Page Styles */
.methodology-page .methodology-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 120px 5% 60px;
}

.methodology-page .background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.methodology-page .methodology-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2;
}

.methodology-page .methodology-content-wrapper {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 800px;
    color: white;
    text-align: left;
    padding: 2rem;
    border-radius: 8px;
    margin: 0 auto;
}

.methodology-page .methodology-content-wrapper h1 {
    font-family: "Manrope", sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.methodology-page .methodology-content h2,
.methodology-page .methodology-content h3 {
    font-family: "Manrope", sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 2rem 0 1rem 0;
}

.methodology-page .methodology-content p {
    font-family: "Montserrat", sans-serif;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Credits Page Specific Styles */
.credits-container {
    padding: 120px 10% 60px;
    max-width: 1200px;
    margin: 0 auto;
    color: white;
}

.credits-content h1 {
    font-family: "Manrope", sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 2rem;
}

.credits-list {
    list-style: none;
    padding: 0;
}

.credit-item {
    display: grid;
    grid-template-columns: 100px 1fr 2fr;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: clamp(1rem, 1.5vw, 1.1rem);
}

.credit-year {
    font-weight: 600;
}

.credit-role {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

.credit-production {
    font-weight: 400;
}

.credit-details {
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .credit-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
