@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #050505;
    --bg-light: #0d0d0d;
    --bg-lighter: #141414;
    --text-primary: #f5f5f5; /* Softer off-white for luxury feel */
    --text-secondary: #888888;
    --border-color: #222222;
    --accent-color: #d4af37; /* Champagne Gold accent */
    --font-heading: 'Playfair Display', serif; /* Editorial serif */
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.7s; /* Slower, cinematic transitions */
    --nav-height: 90px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    /* Subtle Film Grain Texture Overlay */
    position: relative;
    cursor: none; /* Hide default cursor for ultra-premium feel */
}

a, button {
    cursor: none;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 12px; height: 12px;
    background-color: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    /* Transformation handled heavily by JS translate3d */
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center; justify-content: center;
    mix-blend-mode: difference;
}

.custom-cursor.hovered {
    width: 40px; height: 40px;
    background-color: rgba(255,255,255,0.1);
    border: 1px solid var(--text-primary);
    mix-blend-mode: normal;
}

.custom-cursor.view-mode {
    width: 110px; height: 110px;
    background-color: var(--text-primary);
    mix-blend-mode: normal;
    border: none;
}

.custom-cursor span {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--bg-color);
    letter-spacing: 0.15em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-cursor.view-mode span {
    opacity: 1;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--text-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400; /* Serif looks more premium with lighter weights */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.15em;
    margin-bottom: 5rem;
    text-align: center;
    position: relative;
}

/* Decorative line under titles */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
}

.title-left {
    text-align: left;
}
.title-left::after {
    left: 0;
    transform: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.bg-darker { background-color: var(--bg-color); }
.bg-dark { background-color: var(--bg-light); }
.bg-darkest { background-color: #030303; }

/* Multi-page styling */
.page-content {
    /* padding-top: var(--nav-height); Removed to allow animated headers to hit the top */
    min-height: calc(100vh - 150px);
}
.page-header {
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--bg-lighter);
    position: relative;
    margin-bottom: 4rem;
}
.page-header h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: 0.2em;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: background-color 0.3s ease, border-bottom 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

#navbar.inner-navbar {
    background-color: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 5%;
    max-width: 1600px;
    margin: 0 auto;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.15em;
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    position: relative;
}

/* Navbar link hover underline animation */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--text-primary);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.25rem;
    position: relative;
}
.social-links a:hover {
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   ANIMATION UTILITY CLASSES 
   ========================================= */

/* Base transition setup for intersection observer */
.animate-on-scroll {
    opacity: 0;
    visibility: hidden;
    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1); /* Ultra smooth ease-out */
    will-change: transform, opacity;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* Fade Up */
.fade-up { transform: translateY(50px); }
/* Fade In */
.fade-in { transform: scale(0.95); }
/* Fade Left */
.fade-left { transform: translateX(50px); }
/* Fade Right */
.fade-right { transform: translateX(-50px); }

/* Stagger delay classes (can also use data-delay inline) */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }


/* =========================================
   INDEX/HOME SPECIFIC STYLES
   ========================================= */

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.4) contrast(1.2);
    animation: slowZoom 20s linear infinite alternate;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
}

.hero-content {
    z-index: 10;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6.5rem);
    letter-spacing: 0.15em;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
    opacity: 0;
    animation: fadeUpKey 1s 0.5s forwards ease-out;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.3rem);
    letter-spacing: 0.3em;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeUpKey 1s 0.8s forwards ease-out;
}

.location-tag {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeInKey 1s 1.2s forwards ease-out;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeInKey 1s 1.5s forwards ease-out, bounceKey 2s 1.5s infinite ease-in-out;
}

/* Section 2: Split Callout (Home) */
.split-callout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.split-text h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}
.split-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}
.split-img-wrapper {
    position: relative;
    padding: 2rem 0 0 2rem;
}
.split-img-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    height: 80%;
    border: 1px solid var(--border-color);
    z-index: 0;
}
.split-img-wrapper img {
    position: relative;
    z-index: 1;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}
.split-img-wrapper:hover img {
    filter: grayscale(0%);
}

/* Section 3: Showreel */
.video-container {
    position: relative;
    padding-bottom: 42.1875%; /* 21:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #111;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.video-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(255,255,255,0.05);
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =========================================
   PREMIUM EDITORIAL SHOWCASE (PORTFOLIO SPECIFIC)
   ========================================= */

.editorial-showcase {
    display: flex;
    flex-direction: column;
    gap: 15rem;
    padding: 6rem 0;
}

.editorial-row {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    cursor: none;
}

.editorial-row.reverse {
    justify-content: flex-end;
}

.editorial-row.center-aligned {
    flex-direction: column;
    justify-content: center;
}

.editorial-img-wrapper {
    position: relative;
    overflow: hidden;
}

.editorial-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1), filter 1.5s ease;
}

.editorial-row:hover .editorial-img-wrapper img {
    transform: scale(1.04);
    filter: grayscale(0%);
}

.editorial-text {
    position: absolute;
    z-index: 10;
    pointer-events: none; /* Let cursor pass through to image */
}

.editorial-text.right-aligned {
    right: 5%;
    text-align: right;
}

.editorial-text.left-aligned {
    left: 5%;
    text-align: left;
}

.editorial-text.overlapping {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.project-category {
    font-family: var(--font-body);
    color: var(--accent-color);
    letter-spacing: 0.3em;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.project-title {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 8vw, 7rem);
    line-height: 0.9;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.editorial-row:hover .project-title {
    transform: translateY(-10px);
}

.project-details {
    font-family: var(--font-body);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    opacity: 0.8;
}


/* Section 4: Mini Portfolio Grid (Home) */
.mini-portfolio {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.mini-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
}
.mini-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.8s ease, filter 0.8s ease;
}
.mini-item:hover img {
    transform: scale(1.1);
    filter: grayscale(0%);
}
.mini-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.mini-item:hover .mini-overlay {
    opacity: 1;
}
.mini-overlay span {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.1em;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}
.mini-item:hover .mini-overlay span {
    transform: translateY(0);
}

/* Section 5: Stats Banner */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.stat-item h3 {
    font-size: 3.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.stat-item p {
    color: var(--text-secondary);
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Section 6: CTA Banner */
.cta-banner {
    text-align: center;
    padding: 10rem 0;
}
.cta-banner h2 {
    font-size: 4rem;
    margin-bottom: 2rem;
}
.btn-primary {
    display: inline-block;
    padding: 1.2rem 3rem;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
    cursor: pointer;
}
.btn-primary:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}

/* Contact Page specific styles */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    padding-right: 2rem;
}

.contact-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.info-item i {
    font-size: 2rem;
    color: var(--text-secondary);
}

.info-item a {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.info-item a:hover {
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Footer (Global) */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
    background-color: var(--bg-light);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
}

/* Keyframe Animations */
@keyframes fadeUpKey {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInKey {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes bounceKey {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}
@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* Responsive Design overrides */
@media (max-width: 1024px) {
    .split-callout { grid-template-columns: 1fr; }
    .split-img-wrapper { padding: 0; margin-top: 2rem; }
    .split-img-wrapper::before { display: none; }
    .mini-portfolio { grid-template-columns: repeat(2, 1fr); }
    .stats-banner { grid-template-columns: repeat(2, 1fr); gap: 4rem; }
    .contact-grid { grid-template-columns: 1fr; gap: 4rem; }
    .contact-info { padding-right: 0; }
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 40vw;
    }
}

@media (max-width: 768px) {
    .custom-cursor { display: none !important; } /* Disable custom cursor on mobile */
    body { cursor: auto; }
    a, button { cursor: pointer; }
    
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        flex-direction: column;
        background: rgba(0,0,0,0.95);
        backdrop-filter: blur(10px);
        align-items: center;
        justify-content: center;
        transition: left 0.4s ease;
    }
    .nav-links.mobile-active { left: 0; }
    .social-links { display: none; }
    .mobile-menu-btn { display: block; }
    .section-title { font-size: 2rem; }
    .cta-banner h2 { font-size: 2.5rem; }
    
    .editorial-showcase { gap: 6rem; padding: 2rem 0; }
    .editorial-img-wrapper { width: 100% !important; height: 50vh !important; }
    .editorial-text { position: relative !important; left: 0 !important; right: 0 !important; top: 0 !important; transform: none !important; text-align: left !important; padding: 2rem 0; }
    .project-title { font-size: 2.5rem; text-shadow: none; }
}
