/* Cinematic Frame & Visual Narrative Design System */

:root {
    --color-film-black: #080808;
    --color-warm-sepia: #2B231D;
    --color-dusty-ivory: #EBE6DF;
    --color-muted-charcoal: #1F1F1F;
    --color-cinematic-beige: #D5CBB9;
    --color-soft-shadow: #333333;
    
    --color-vintage-amber: #C68E58;
    --color-cinematic-red: #8B2626;
    --color-analog-blue: #3E4C5E;
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lora', serif;
    --font-sans: 'Inter', sans-serif;
    
    --transition-slow: 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    --transition-medium: 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

body {
    background-color: var(--color-film-black);
    color: var(--color-dusty-ivory);
    font-family: var(--font-body);
    margin: 0;
    cursor: none;
}

/* Required Lenis Core CSS for Chrome/Safari Stability */
html.lenis, html.lenis body {
    height: auto;
}
.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}
.lenis.lenis-stopped {
    overflow: hidden;
}
.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6, .cinematic-title {
    font-family: var(--font-heading);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Custom Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--color-vintage-amber);
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-cinematic-beige);
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.hover-target:hover ~ .cursor-outline {
    width: 60px;
    height: 60px;
    border-color: var(--color-vintage-amber);
}

/* Film Grain Overlay */
.film-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9990;
    opacity: 0.05;
    background-image: url('../images/grain.png');
    animation: noise 1s steps(2) infinite;
}

@keyframes noise {
    0%, 100% { 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%); }
}

/* Navigation - Film Frame Inspired */
.cinematic-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 4rem 4rem 4rem; /* Extra bottom padding for the gradient fade */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(8, 8, 8, 0.95) 0%, rgba(8, 8, 8, 0.6) 40%, transparent 100%);
    pointer-events: none; /* Prevent the invisible part of gradient from blocking clicks */
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-dusty-ivory);
    text-decoration: none;
    letter-spacing: 0.2em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    pointer-events: auto;
}

.menu-trigger {
    background: none;
    border: none;
    color: var(--color-dusty-ivory);
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    pointer-events: auto;
}



/* Fullscreen Menu */
.fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-film-black);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    clip-path: circle(0% at 90% 10%);
    transition: clip-path var(--transition-slow);
}

.fullscreen-menu.active {
    clip-path: circle(150% at 90% 10%);
}

.menu-links {
    list-style: none;
    padding: 0;
    text-align: center;
}

.menu-links li {
    margin: 0.4rem 0;
    overflow: hidden;
}

.menu-links a {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-dusty-ivory);
    text-decoration: none;
    display: block;
    transform: translateY(100%);
    transition: transform var(--transition-medium);
}

.fullscreen-menu.active .menu-links a {
    transform: translateY(0);
}

.menu-links a:hover {
    color: var(--color-vintage-amber);
    font-style: italic;
}

/* Hero Section */
.hero-scene {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transform: scale(1.1);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-title .char {
    display: inline-block;
    transform: translateY(100%);
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-weight: 300;
    letter-spacing: 0.3em;
    font-size: 1rem;
    color: var(--color-cinematic-beige);
    opacity: 0;
}

/* Light Leak */
.light-leak {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(198, 142, 88, 0.15) 0%, transparent 40%);
    pointer-events: none;
    z-index: 5;
    mix-blend-mode: screen;
}

/* Story Section */
.story-section {
    padding: 10rem 0;
    position: relative;
}

.story-text-wrapper {
    font-size: 2.5rem;
    line-height: 1.4;
    font-style: italic;
    color: var(--color-cinematic-beige);
}

.story-image {
    width: 100%;
    height: 80vh;
    object-fit: cover;
    filter: sepia(0.2) grayscale(0.2);
}

/* Gallery Hover Interactions */
.gallery-item {
    position: relative;
    overflow: hidden;
    display: block;
    cursor: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease;
    filter: brightness(0.8) contrast(1.2);
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(1) contrast(1);
}

.gallery-caption {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.btn-cinematic {
    display: inline-block;
    padding: 1rem 3rem;
    border: 1px solid var(--color-dusty-ivory);
    color: var(--color-dusty-ivory);
    text-decoration: none;
    font-family: var(--font-sans);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
}

.btn-cinematic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-vintage-amber);
    transition: left 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: -1;
}

.btn-cinematic:hover::before {
    left: 0;
}

/* Footer */
.cinematic-footer {
    padding: 6rem 0 2rem;
    border-top: 1px solid var(--color-soft-shadow);
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.footer-copy {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--color-cinematic-beige);
    opacity: 0.7;
}

/* LightGallery Customizations */
.lg-backdrop {
    background-color: rgba(8, 8, 8, 0.95);
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .menu-links a {
        font-size: 1.8rem;
    }
    .cinematic-nav {
        padding: 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .menu-links a {
        font-size: 1rem;
        line-height: 1.2;
    }
    .fullscreen-menu {
        padding-top: 60px;
        align-items: center;
    }
    .menu-links li {
        margin: 0.8rem 0;
    }
    .story-text-wrapper {
        font-size: 1.2rem;
    }
}
