/* --- 1. Global & Variables --- */
:root {
    --bg-deep: #050505;
    --text-main: #ececec;
    --text-muted: #777777;
    
    /* The "Electric" Accent */
    --accent: #ffffff; 
    --accent-interaction: #d4ff3f; 
    
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --easing: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Hide default cursor to use our custom one */
    cursor: none; 
}

/* Film Grain Animation */
body::after {
    content: "";
    position: fixed;
    top: -50%; left: -50%; right: -50%; bottom: -50%;
    width: 200%; height: 200vh;
    background: transparent url('https://grainy-gradients.vercel.app/noise.svg') repeat 0 0;
    background-repeat: repeat;
    animation: bg-animation .2s infinite;
    opacity: 0.04;
    pointer-events: none;
    z-index: 999;
}

@keyframes bg-animation {
    0% { transform: translate(0,0) }
    10% { transform: translate(-5%,-5%) }
    20% { transform: translate(-10%,5%) }
    30% { transform: translate(5%,-10%) }
    40% { transform: translate(-5%,15%) }
    50% { transform: translate(-10%,5%) }
    60% { transform: translate(15%,0) }
    70% { transform: translate(0,10%) }
    80% { transform: translate(-15%,0) }
    90% { transform: translate(10%,5%) }
    100% { transform: translate(5%,0) }
}

section {
    padding: 120px 5%;
    max-width: 1600px;
    margin: 0 auto;
}

/* --- 2. Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
    color: var(--text-main);
}

h1 { font-size: clamp(3.5rem, 8vw, 6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; margin-bottom: 40px; }
h3 { font-family: var(--font-body); font-size: 1.5rem; font-weight: 500; }
p { color: var(--text-muted); font-size: 1.1rem; max-width: 60ch; }
a { text-decoration: none; color: inherit; cursor: none; }

/* --- 3. Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 5%;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-logo { 
    font-family: var(--font-display); 
    font-size: 1.5rem; 
    font-weight: 500;
}

.nav-links { display: flex; gap: 50px; }

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    transition: color 0.4s var(--easing);
}

.nav-links a:hover, .nav-links a.active { color: var(--text-main); }
.nav-cta { display: none; } /* Hidden in nav, cleaner look */

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* --- 4. Hero --- */
#hero {
    min-height: 100vh;
    padding: 0 5%;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-video-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    opacity: 0.5;
}

#hero-video {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
}

.video-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0.4) 50%, rgba(5,5,5,1) 100%);
    z-index: 1;
}

.hero-content { 
    z-index: 2; 
    width: 100%; 
    max-width: 1200px; 
    position: relative;
}

.hero-text-wrapper {
    position: relative;
    z-index: 3;
}

.hero-title {
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    color: var(--text-main);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-skills {
    color: var(--accent-interaction);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.hero-cta-container {
    margin-top: 3rem;
}

/* --- 5. Text Reveals --- */
.reveal-holder {
    position: relative;
    overflow: hidden;
    display: block;
    margin-bottom: 1rem;
}

.reveal-text {
    display: block;
    transform: translateY(110%);
    transition: transform 1.2s var(--easing);
}

.reveal-text.is-visible { transform: translateY(0); }

/* --- 6. Buttons --- */
.cta-button {
    display: inline-block;
    background: transparent;
    color: var(--text-main);
    padding: 20px 40px;
    border: 1px solid rgba(255,255,255,0.2);
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 15px;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--text-main);
    color: var(--bg-deep);
}

.cta-button.secondary { border: none; border-bottom: 1px solid rgba(255,255,255,0.2); }
.cta-button.secondary:hover { background: transparent; color: var(--accent-interaction); border-color: var(--accent-interaction); }

/* --- About Section --- */
#about {
    position: relative;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: start;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    color: var(--text-main);
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: none;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 40px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
}

.highlight-item {
    text-align: center;
}

.highlight-item h3 {
    font-size: 2.5rem;
    color: var(--accent-interaction);
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.highlight-item p {
    color: var(--text-main);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-intro {
    color: var(--text-main);
    font-size: 1.3rem;
    line-height: 1.6;
    max-width: 800px;
    margin-bottom: 60px;
    opacity: 0.9;
}

/* --- 7. Services Grid --- */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    border-top: 1px solid rgba(255,255,255,0.1);
    border-left: 1px solid rgba(255,255,255,0.1);
}

.service-card {
    border-right: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 60px 40px;
    transition: background 0.3s ease;
}

.service-card:hover { background: rgba(255,255,255,0.03); }

.service-features li {
    list-style: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.service-features li:before { content: "+"; color: var(--accent-interaction); margin-right: 10px; }

/* --- 8. Projects (The Editorial Look) --- */
.project-filters { margin-bottom: 60px; }
.filter-btn {
    background: none; border: none; color: var(--text-muted);
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em;
    margin-right: 30px; cursor: none;
}
.filter-btn.active { color: var(--text-main); border-bottom: 1px solid var(--accent-interaction); }

.project-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
}

.project-card {
    background: var(--bg-deep);
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    /* Removed 3D tilt properties */
}

.project-media { width: 100%; height: 100%; }

.project-media img, .project-media video {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--easing), filter 0.5s ease;
    filter: grayscale(100%);
}

.project-card:hover .project-media img,
.project-card:hover .project-media video {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.project-info {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 30px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s var(--easing);
    pointer-events: none; /* Let clicks pass through to image */
}

.project-card:hover .project-info { opacity: 1; transform: translateY(0); }

.project-badge {
    position: absolute; top: 20px; right: 20px;
    background: var(--text-main); color: var(--bg-deep);
    padding: 5px 10px; font-size: 0.7rem; letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- 9. Pricing --- */
.pricing-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}
.pricing-card {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 50px;
    position: relative;
}
.pricing-card.featured { border-color: var(--accent-interaction); background: rgba(212, 255, 63, 0.02); }
.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-interaction);
    color: var(--bg-deep);
    padding: 5px 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 20px;
}
.price {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 20px 0;
    color: var(--text-main);
}
.package-features li { list-style: none; margin-bottom: 10px; color: var(--text-muted); }

/* --- 10. Contact Form --- */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 15px 0;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--accent-interaction);
}

.cta-button.full-width {
    width: 100%;
    margin-top: 20px;
}

/* --- 11. Lightbox --- */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox-media-container { 
    max-width: 90%; 
    max-height: 90%; 
    position: relative;
    overflow: hidden;
}
.lightbox img, .lightbox video { 
    max-height: 90vh; 
    max-width: 100%; 
    transition: transform 0.4s var(--easing), opacity 0.3s ease;
}

/* Lightbox animation classes */
.lightbox-media-container.slide-next img,
.lightbox-media-container.slide-next video {
    transform: translateX(100%);
    opacity: 0;
}

.lightbox-media-container.slide-prev img,
.lightbox-media-container.slide-prev video {
    transform: translateX(-100%);
    opacity: 0;
}

.lightbox-media-container.slide-active img,
.lightbox-media-container.slide-active video {
    transform: translateX(0);
    opacity: 1;
}

.close-btn { 
    position: absolute; 
    top: 30px; 
    right: 30px; 
    background: none; 
    border: none; 
    color: white; 
    font-size: 30px; 
    cursor: pointer; 
    z-index: 10002;
}
.lightbox-arrow { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    background: none; 
    border: none; 
    color: white; 
    font-size: 40px; 
    cursor: pointer; 
    padding: 20px; 
    z-index: 10002;
}
.prev { left: 20px; } .next { right: 20px; }

/* --- 12. Custom Cursor --- */
.cursor-dot {
    width: 8px; height: 8px;
    background-color: var(--accent-interaction);
    position: fixed; top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10001; pointer-events: none;
}

.cursor-outline {
    width: 40px; height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: fixed; top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000; pointer-events: none;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body.hovering .cursor-outline {
    width: 60px; height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

/* --- 13. Footer --- */
footer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 3rem 5%;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.social-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-interaction);
}

/* --- 14. Loading States --- */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--accent-interaction);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- 15. Mobile Optimizations --- */
@media (max-width: 768px) {
    .project-container { grid-template-columns: 1fr; }
    
    /* Mobile Navigation */
    .nav-links { 
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-deep);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    h1 { font-size: 3rem; }
    
    /* Disable custom cursor on mobile */
    .cursor-dot, .cursor-outline { display: none; }
    body, a, button { cursor: auto; }
    
    /* Improved mobile spacing */
    section {
        padding: 80px 5%;
    }
    
    .service-card {
        padding: 40px 20px;
    }
    
    .pricing-card {
        padding: 30px 20px;
    }
    
    /* Stack project filters vertically on mobile */
    .project-filters {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-btn {
        margin-right: 0;
        text-align: left;
        padding: 10px 0;
    }
    
    /* About section adjustments */
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-text p {
        font-size: 1.1rem;
    }
    
    .about-highlights {
        padding: 30px 20px;
        flex-direction: row;
        justify-content: space-around;
        flex-wrap: wrap;
    }
    
    .highlight-item {
        flex: 1;
        min-width: 120px;
    }
    
    .highlight-item h3 {
        font-size: 2rem;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal-text {
        transform: none !important;
        transition: none !important;
    }
    
    body::after {
        animation: none;
    }
}