/* 
   THEME: CINEMATIC ULTRA-PREMIUM (RAY ISHIDO INSPIRED)
   PALETTE:
   --bg: #050505
   --fg: #e0e0e0
   --muted: #808080
   --accent: #d8c27a
*/

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

:root {
    --bg: #050505;
    --fg: #e0e0e0;
    --muted: #888;
    --accent: #d8c27a;
    --border: rgba(255, 255, 255, 0.08);
    --header-height: 100px;
}

/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0 !important;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: 'Manrope', sans-serif;
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    font-weight: 300;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    color: var(--fg);
    line-height: 0.95;
    text-transform: uppercase;
}

/* GIGANTIC TITLES */
.title-xl {
    font-size: clamp(3rem, 8vw, 9rem);
    letter-spacing: -0.03em;
}

.title-lg {
    font-size: clamp(2.5rem, 5vw, 6rem);
    letter-spacing: -0.02em;
}

.title-md {
    font-size: clamp(1.5rem, 3vw, 3.5rem);
    margin-bottom: 2rem;
}

p {
    color: var(--muted);
    font-size: 1rem;
    max-width: 40ch;
    /* Narrow columns for elegance */
    margin-bottom: 2rem;
    font-weight: 300;
}

.text-label {
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: block;
}

/* LAYOUT UTILS */
.container {
    max-width: 1400px;
    width: 90%;
    margin: 0 auto;
}

.full-height {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* HEADER - MINIMALIST & AUTO-CONTRAST */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4vw;
    z-index: 1000;
    background: transparent;
    /* No background to let the mix-blend work cleanly */
    pointer-events: none;
    mix-blend-mode: difference;
    /* MAGIC: Inverts text color based on background */
    color: #fff;
}

.main-header>* {
    pointer-events: auto;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    /* Always white for difference mode to work */
    text-decoration: none;
    letter-spacing: 0.05em;
}

.nav-toggle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    cursor: pointer;
    color: #fff;
    /* Removed individual mix-blend, handled by parent */
}

/* OVERLAY MENU */
.overlay-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.overlay-menu nav {
    display: flex;
    flex-direction: column;
    gap: 2vh;
    text-align: center;
}

.overlay-menu a {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    color: var(--fg);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s;
}

.overlay-menu a:hover {
    color: var(--accent);
}

/* HERO SECTION - SPLIT BLACK / WHITE */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--border);
    /* THE SPLIT */
    background: linear-gradient(90deg, #0b0b0c 50%, #f6f6f4 50%);
}

/* HERO SPLIT LAYOUT */
.hero-split-text {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    z-index: 10;
    mix-blend-mode: difference;
    color: #fff;
}

.hero-half {
    width: 50%;
    display: flex;
    align-items: center;
}

.hero-half.left {
    justify-content: flex-end;
    padding-right: 2vw;
    /* Gap between words */
}

.hero-half.right {
    justify-content: flex-start;
    padding-left: 2vw;
    /* Gap between words */
}

.hero .title-xl {
    margin: 0;
    line-height: 1;
}

.hero-subcontainer {
    position: absolute;
    bottom: 15vh;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 11;
    mix-blend-mode: difference;
    color: #fff;
    pointer-events: none;
}

.hero-bg {
    display: none;
    /* Removed the old placeholder bg */
}

.hero-content {
    /* MAGIC: This ensures text is White on Black side, and Black on White side */
    mix-blend-mode: difference;
    color: #fff;
    z-index: 10;
    width: 100%;
}

.hero .title-xl {
    /* Ensure the split cuts through the words if centered */
    white-space: nowrap;
}

/* SPLIT SECTIONS (Dark Mode Default) */
.split-section {
    display: flex;
    min-height: 50vh;
    width: 100%;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.split-content,
.split-media {
    flex: 1;
    width: 50%;
    /* Fallback */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.split-content {
    flex: 3;
    width: 30%;
    padding: 0 3vw;
    background-color: var(--bg);
    z-index: 2;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.split-media {
    flex: 7 !important;
    width: 70%;
    height: 50vh;
    overflow: hidden;
    background: #0a0a0a;
    border-left: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Alternating layout */
.split-section:nth-child(even) {
    flex-direction: row-reverse;
}

.split-section:nth-child(even) .split-media {
    border-left: none;
    border-right: 1px solid var(--border);
}

.split-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    filter: grayscale(100%) contrast(1.1);
}

.split-section:hover .split-image {
    transform: scale(1.05);
    filter: grayscale(0%) contrast(1);
}

.media-label {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: white;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
}

/* POST PROD - LIGHT THEME OVERRIDE */
#post-production {
    /* Scoped Variables for Light Mode */
    --bg: #f6f6f4;
    --fg: #111111;
    --muted: #444444;
    --border: rgba(0, 0, 0, 0.1);
    --accent: #b09a5b;
    /* Slightly darker gold for visibility on white */

    background-color: var(--bg);
    color: var(--fg);
    border-bottom: none;
    /* Clean bottom */
}

.grid-section {
    padding: 15vh 0;
    /* Background handled by ID scope above */
    border-bottom: 1px solid var(--border);
}

.grid-intro {
    margin-bottom: 10vh;
    padding-left: 5vw;
    border-left: 1px solid var(--accent);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.tech-item {
    aspect-ratio: 1/1;
    padding: 2rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s;
    position: relative;
    background-color: transparent;
}

.tech-item:hover {
    background: rgba(0, 0, 0, 0.03);
    /* Subtle darkening on light theme */
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.tech-item::after {
    content: '+';
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.tech-item:hover::after {
    opacity: 1;
}

.tech-item h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    /* Bolder for light theme */
    letter-spacing: 0.05em;
    color: var(--fg);
}

.tech-item ul {
    font-size: 0.8rem;
    color: var(--muted);
    opacity: 1;
    /* removed opacity for better readability on light */
    list-style: none;
}

/* IMDB SECTION */
.imdb-wrapper {
    padding: 10vh 5vw;
    background: #0a0a0a;
    /* Back to Dark */
    color: white;
}

/* CONTACT */
.contact-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #0b0b0c;
    /* Dark */
}

.contact-link {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #f2f2f2;
    margin: 1rem 0;
    display: block;
    position: relative;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.5s ease;
}

.contact-link:hover::after {
    width: 100%;
}

/* FOOTER */
.main-footer {
    display: flex;
    justify-content: space-between;
    padding: 2rem 5vw;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: #444;
    text-transform: uppercase;
    background-color: #0b0b0c;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .split-section {
        flex-direction: column !important;
        min-height: auto;
    }

    .split-content,
    .split-media {
        width: 100%;
        height: auto;
    }

    .split-content {
        padding: 10vh 5vw;
        flex: auto;
    }

    .split-media {
        height: 60vh;
        flex: auto !important;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .title-xl {
        font-size: 12vw;
    }

    .hero {
        background: linear-gradient(180deg, #0b0b0c 50%, #f6f6f4 50%);
        /* Vertical split on mobile? Or keep horizontal? Let's try vertical for mobile so text doesn't break weirdly */
    }
}

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

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .tech-item {
        aspect-ratio: auto;
        min-height: 250px;
    }

    .overlay-menu a {
        font-size: 2.5rem;
    }

    .hero {
        /* On mobile, standard dark hero usually looks better than tiny split, but let's keep the split spirit */
        background: linear-gradient(180deg, #0b0b0c 50%, #f6f6f4 50%);
    }
}