/* --- VISUAL IDENTITY & COLORS --- */
:root {
    /* Palette from Playbook [cite: 123-128] */
    --teal: #008080;
    --coral: #FF6B6B;
    --black: #000000;
    --off-white: #F4F4F9;
    --white: #ffffff;

    /* "Tactile Snap" Physics [cite: 67] */
    --snap-ease: cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* Theme Variables (Permanent Dark Mode) */
    --bg-main: #000000;
    --text-main: #FFFFFF;
    --header-bg: transparent;
    --card-bg: #1e1e1e;
    --text-muted: #bbb;
    --text-dim: #aaa;
    --footer-text: #777;
    --feed-overlay-bg: rgba(0, 0, 0, 0.85);
}

/* body.dark-mode removed -> Permanent Dark Mode */

body {
    /* "Clean, readable sans-serif" [cite: 141] */
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.4;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html {
    scroll-padding-top: 100px;
    overflow-x: hidden;
    /* Helper for Anchor Links [cite: 2] */
}

/* --- NAVIGATION --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    box-sizing: border-box;
    background-color: #000;
    z-index: 10000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Menu open state - header transparent so teal shows through, text turns white */
body.menu-open header,
body.menu-open header.scrolled,
body.menu-open header.header-transparent {
    background-color: transparent !important;
    box-shadow: none !important;
}

body.menu-open .brand-name,
body.menu-open .brand-dot,
body.menu-open .logo-sub,
body.menu-open #menu-toggle {
    color: #fff !important;
}

/* Transparent header state - only used on homepage at top */
header.header-transparent {
    background-color: transparent;
    box-shadow: none;
}

/* Scrolled state - solid black with shadow */
header.scrolled {
    background-color: #000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo {
    /* Container layout if needed, otherwise just cursor */
    cursor: pointer;
    text-decoration: none;
    /* Font styles inherited but specific parts handled below */
}

.brand-name {
    font-weight: 800;
    font-size: 36px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.brand-dot {
    font-weight: 800;
    font-size: 36px;
    color: var(--teal);
}

.logo:hover .brand-name {
    color: var(--coral);
}

.logo-sub {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-top: -2px;
    /* Pull it up slightly */
    font-weight: 500;
    transition: color 0.3s ease;
}

.logo:hover .logo-sub {
    color: var(--white);
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    margin-left: 40px;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}


nav a:hover {
    color: var(--coral);
}

/* --- MOBILE NAV (NEW) --- */
#menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    z-index: 101;
    position: relative;
}

#mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 50vh;
    height: 50dvh;
    background: var(--teal);
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 20px;
    overflow: hidden;
    box-sizing: border-box;
}

#mobile-menu-overlay.active {
    transform: translateY(0);
}

/* Hide the X close button - MENU toggles instead */
#menu-close {
    display: none;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    text-align: right;
    width: 100%;
    padding-right: 0;
}

.mobile-link {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.2s ease;
    text-align: right;
}

.mobile-link:hover {
    color: var(--black);
}

/* Secondary mobile menu links */
.mobile-secondary-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

.mobile-link-secondary {
    font-family: 'Helvetica Neue', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
    text-align: right;
}

.mobile-link-secondary:hover {
    color: var(--black);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 27px;
    margin-left: 30px;
    padding: 5px;
    color: var(--text-main);
    transition: transform 0.2s var(--snap-ease);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 60px;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* --- CAPABILITIES & PITCH --- */
.capabilities {
    background-color: var(--bg-main);
    padding: 60px 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.cap-list {
    font-family: 'Courier New', Courier, monospace;
    /* Technical font */
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--white);
    margin-bottom: 30px;
    text-transform: uppercase;
    /* Single Line & Scroll */
    white-space: nowrap;
    overflow: hidden;
    padding-left: 20px;
    padding-right: 20px;
    /* Hide Scrollbar */
    scrollbar-width: none;
    /* Firefox */
}

.cap-track {
    display: inline-block;
    white-space: nowrap;
}

/* Hide duplicate text on desktop */
.cap-duplicate {
    display: none;
}

/* Hoverable words */
.cap-word {
    transition: color 0.2s ease;
    cursor: default;
}

.cap-word:hover {
    color: var(--coral);
}

.cap-list::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.cap-sep {
    color: var(--teal);
    margin: 0 10px;
}

.cap-pitch {
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    /* Or Editorial choice */
    font-size: 24px;
    line-height: 1.4;
    color: var(--text-muted);
    /* Dark Grey #bbb via var */
    font-weight: 400;
}

/* Overlay removed per user request, but kept class just in case or for potential re-use */
.hero-overlay {
    /* Removed content */
    display: none;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1;
    transition: opacity 0.4s ease;
    isolation: isolate;
    mix-blend-mode: difference;
}

.hero-content.menu-open {
    opacity: 0;
}

h1 {
    font-size: clamp(40px, 7vw, 100px);
    line-height: 1.05;
    letter-spacing: -3px;
    font-weight: 800;
    max-width: 900px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    animation: snapUp 0.9s var(--snap-ease) forwards;
    animation-delay: 0.2s;
}

/* X-ray blend mode effect for hero title */
.hero h1 {
    color: #fff;
}

.hero-sub {
    font-size: 22px;
    max-width: 600px;
    line-height: 1.5;
    color: #fff;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.6s;
    font-weight: 400;
}

/* --- WORK SHOWCASE (GRID) --- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    gap: 20px;
    padding: 0 60px 100px 60px;
    margin-top: 60px;
    /* Reduced from 120px since Capabilities section provides buffer */
}

.project-item {
    position: relative;
    margin-bottom: 40px;
    display: block;
    text-decoration: none;
    color: inherit;
}

.media-container {
    background: var(--card-bg);
    aspect-ratio: 16/9;
    width: 100%;
    overflow: hidden;
    margin-bottom: 15px;
    transition: transform 0.4s var(--snap-ease);
    cursor: pointer;
    /* Placeholder styling until assets arrive */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #ddd;
    font-size: 40px;
}

.media-container:hover {
    transform: scale(0.985);
}

/* --- INTERACTIVE CARD (Focus Trade) --- */
.interactive-card .media-container {
    position: relative;
    /* Reset simple hover scale if we want specific scale on video, or keep it. 
       The brief asked for "Scale up slightly (transform: scale(1.03))" on HOVER.
       The existing .media-container:hover scales DOWN (0.985). 
       We should probably override this for interactive-card. */
    transform: none !important;
    /* We'll handle scaling on the video itself or the container in a specific way if needed, 
       but let's follow the specific instruction: "Video... Scale up slightly". */
    overflow: hidden;
}

.interactive-card .media-container:hover {
    transform: none;
    /* Disable the generic click-shrink effect for these specific cards if it conflicts, or adapt it. */
}

/* Video: Default State */
.card-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.5s ease;
    z-index: 1;
}

/* Overlay Tint */
.card-tint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 2;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

/* Text: Default State */
.card-text {
    position: relative;
    z-index: 3;
    color: #fff;
    font-weight: 800;
    font-size: 40px;
    opacity: 1;
    filter: blur(0px);
    transition: all 0.5s ease;
    mix-blend-mode: difference;
}

/* --- HOVER STATE --- */
.interactive-card:hover .card-video {
    filter: grayscale(0%);
    transform: scale(1.05);
    /* User requested 1.05 this time */
}

.interactive-card:hover .card-text {
    color: #fff;
    opacity: 1;
    filter: blur(0px);
    transition: all 0.4s ease;
}

.interactive-card:hover .card-tint {
    /* Optional: fade out tint if we want full brightness video */
    opacity: 0;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 5px;
}

.project-title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.project-cat {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* --- ABOUT SECTION --- */
.about-section {
    background-color: var(--black);
    color: var(--white);
    padding: 120px 60px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    max-width: 1400px;
}

.about-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--teal);
    font-weight: 700;
    margin-bottom: 20px;
}

.about-text h2 {
    font-size: 48px;
    line-height: 1.1;
    margin: 0 0 40px 0;
    letter-spacing: -1.5px;
}

.about-text p {
    font-size: 20px;
    line-height: 1.6;
    color: #ccc;
    max-width: 700px;
    margin-bottom: 30px;
}

.bio-small {
    font-size: 16px;
    color: #888;
    margin-top: 60px;
    border-top: 1px solid #333;
    padding-top: 30px;
}

.bio-link {
    color: #888;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.bio-link:hover {
    color: var(--coral);
}

/* --- FOOTER --- */
.footer {
    padding: 150px 60px 60px 60px;
    text-align: center;
}

.big-link {
    font-size: clamp(40px, 8vw, 120px);
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -4px;
    transition: color 0.3s ease;
}

.big-link:hover {
    color: var(--coral);
}

/* Footer social links */
.footer-social {
    margin-top: 50px;
    font-size: 14px;
    text-align: center;
}

.footer-social a {
    color: var(--text-main);
    opacity: 0.6;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-social a:hover {
    opacity: 1;
}

.footer-divider {
    color: var(--text-main);
    opacity: 0.4;
    margin: 0 15px;
}

/* --- PROJECT DETAIL PAGE --- */
.project-detail {
    padding-top: 200px;
    /* More space for fixed header */
    padding-bottom: 100px;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 60px;
    padding-right: 60px;
    animation: fadeIn 0.5s ease;
}

.detail-header {
    margin-bottom: 60px;
}

.detail-cat {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--teal);
    font-weight: 700;
    margin-bottom: 20px;
}

.detail-title {
    font-size: clamp(40px, 6vw, 80px);
    line-height: 1;
    font-weight: 800;
    margin: 0;
}

.detail-media {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--card-bg);
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--text-dim);
}

/* Iframe container for responsive embeds */
.embed-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.detail-desc {
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-muted);
}

.detail-meta {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 2;
    border-top: 1px solid var(--text-dim);
    padding-top: 20px;
}

/* --- FEED VIEW (Optional/Alternate Grid) --- */
.feed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    width: 100%;
    margin-top: 100px;
}

.feed-item {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.feed-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.feed-item:hover .feed-overlay {
    opacity: 1;
    mix-blend-mode: difference;
}

.feed-title {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 18px;
    text-align: center;
    padding: 20px;
}

/* --- UTILS --- */
.hidden {
    display: none !important;
}

/* --- ANIMATIONS --- */
@keyframes snapUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {

    .work-grid,
    .about-grid,
    .detail-info {
        grid-template-columns: 1fr;
    }

    .feed-grid {
        margin-top: 80px;
    }

    .feed-item {
        aspect-ratio: 1/1;
    }

    /* Mobile scroll-to-color effect for feed */
    .feed-video {
        filter: grayscale(100%);
        transition: filter 0.4s ease, transform 0.5s ease;
    }

    .feed-item.in-focus .feed-video {
        filter: grayscale(0%);
        transform: scale(1.03);
    }

    /* Feed titles always visible on mobile */
    .feed-overlay {
        opacity: 1 !important;
        background: transparent;
        align-items: center;
        justify-content: center;
        padding: 0;
        mix-blend-mode: difference;
    }

    .feed-title {
        color: #fff;
        font-size: 14px;
        text-shadow: none;
        text-align: center;
        padding: 0;
    }

    /* Ensure proper centering */
    .feed-item {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    header {
        padding: 15px 20px;
        width: 100%;
        height: 70px;
    }

    #mobile-menu-overlay {
        padding: 0 20px 20px 20px;
    }

    .hero,
    .work-grid,
    .about-section,
    .footer,
    .project-detail {
        padding: 40px 20px;
    }

    h1 {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .hero-sub {
        font-size: 18px;
    }

    .cap-pitch {
        font-size: 18px;
        max-width: 100%;
    }

    /* Ticker animation for capabilities */
    .cap-list {
        overflow: hidden;
        padding: 0;
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    }

    .cap-track {
        animation: ticker 18s linear infinite;
    }

    /* Show duplicate text for seamless ticker loop on mobile */
    .cap-duplicate {
        display: inline;
    }

    /* Disable hover effect on mobile (touch devices) */
    .cap-word:hover {
        color: var(--white);
    }

    .about-text h2 {
        font-size: 28px;
    }

    .about-text p {
        font-size: 16px;
    }

    .bio-small {
        font-size: 14px;
    }

    .brand-name,
    .brand-dot {
        font-size: 28px;
    }

    .logo-sub {
        display: block;
        font-size: 9px;
        letter-spacing: 1.5px;
    }

    /* Mobile Nav Logic */
    .desktop-links {
        display: none;
    }

    #menu-toggle {
        display: block;
    }

    /* Mobile Video Sizing */
    .hero-video {
        height: 100vh;
        height: 100svh;
        object-fit: cover !important;
    }

    .hero {
        height: 100vh;
        height: 100svh;
    }

    .work-grid .media-container,
    .feed-item {
        width: 100%;
        height: 60vh;
        aspect-ratio: auto !important;
    }

    .card-video,
    .feed-video {
        object-fit: cover;
    }

    .card-text {
        font-size: 28px;
    }

    /* VOGUE WORLD video left-alignment fix */
    #project-vogue .card-video {
        object-position: left center;
    }

    /* Mobile scroll-to-color effect */
    .interactive-card .card-video {
        filter: grayscale(100%);
        transition: filter 0.4s ease, transform 0.5s ease;
    }

    .interactive-card.in-focus .card-video {
        filter: grayscale(0%);
        transform: scale(1.03);
    }

    .interactive-card.in-focus .card-tint {
        opacity: 0;
    }

    .interactive-card.in-focus .card-text {
        color: #fff;
        mix-blend-mode: difference;
    }

    .project-title {
        font-size: 16px;
    }

    .project-cat {
        font-size: 11px;
    }

    .visual-break {
        padding: 60px 0;
    }
}

@media (max-width: 600px) {
    .feed-grid {
        grid-template-columns: 1fr;
    }
}

/* Very narrow screens (small phones) */
@media (max-width: 400px) {
    header {
        padding: 12px 15px;
        height: 60px;
    }

    #mobile-menu-overlay {
        padding: 0 15px 20px 15px;
    }

    .brand-name,
    .brand-dot {
        font-size: 24px;
    }

    .logo-sub {
        display: block;
        font-size: 10px;
        letter-spacing: 1px;
    }

    h1 {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .hero-sub {
        font-size: 16px;
    }

    .hero,
    .work-grid,
    .about-section,
    .footer,
    .project-detail {
        padding: 30px 15px;
    }

    .cap-pitch {
        font-size: 16px;
    }

    .about-text h2 {
        font-size: 24px;
    }

    .about-text p {
        font-size: 15px;
    }

    .mobile-link {
        font-size: 18px;
    }

    .mobile-nav-links {
        gap: 15px;
    }

    #menu-close {
        top: 12px;
        right: 15px;
        font-size: 28px;
    }

    #mobile-menu-overlay {
        padding-right: 15px;
    }

    .card-text {
        font-size: 22px;
    }

    .big-link {
        letter-spacing: -2px;
    }
}

/* --- LIGHTBOX --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.lightbox.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
    /* Fallback */
}

.lightbox-content {
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    position: relative;
    background: #000;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    z-index: 2001;
    transition: color 0.2s ease;
}

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

.lightbox-details {
    margin-top: 20px;
    text-align: left;
    color: #fff;
    font-size: 16px;
    line-height: 1.6;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.lightbox-details div {
    opacity: 0.9;
}

/* --- DELTA PAGE UTILS --- */
.embed-wide {
    aspect-ratio: 21/9;
    /* Wider canvas for 5-screen system */
    width: 100%;
    background: #000;
}

.text-bridge {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 60px 0 20px 0;
    color: var(--text-main);
}


.visual-break {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    background: var(--bg-main);
    /* Black */
    padding: 100px 0;
}

.project-label {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
    margin-top: 60px;
}