/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
    --bg-color: #050403;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #E6D5C3; /* Sandy/Ecru */
    --accent-hover: #F5EAE1;
    --glass-bg: rgba(25, 25, 25, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s ease;
}

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

html {
    font-size: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--bg-color);
    scroll-padding-top: 120px; /* Offset for fixed header */
}

/* WebKit Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-left: 1px solid var(--glass-border);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

::-webkit-scrollbar-button {
    display: none; /* Hides default browser arrows */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent-color);
    color: var(--bg-color);
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 5vw;
}

/* ==========================================================================
   Preloader
   ========================================================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color); /* Deep black */
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 1s ease-out, visibility 1s ease-out 1.2s;
}

#preloader.loaded {
    background-color: transparent;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.5s ease-in 0.1s;
}

#preloader.loaded .preloader-content {
    transform: scale(10);
    opacity: 0;
}

#preloader.loaded .preloader-line {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.preloader-logo-img {
    height: 70px;
    /* Removed pulse animation */
}

.preloader-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.preloader-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-color); /* Sandy color */
    animation: loadingLine 1.5s infinite ease-in-out;
}

@keyframes loadingLine {
    0% { left: -100%; }
    50% { left: 0; }
    100% { left: 100%; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

body.no-scroll {
    overflow: hidden;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, .brand-logo {
    font-family: var(--font-heading);
    font-weight: 400;
}

h1 {
    font-size: clamp(2.5rem, 4.5vw, 5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 span {
    font-style: italic;
    color: var(--accent-color);
}

.lead-text {
    font-style: italic;
    font-size: 1.1rem;
    padding: 1.5rem;
    border: 1px solid var(--accent-color);
    margin-bottom: 2rem;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h2 em {
    font-style: italic;
    color: var(--accent-color);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    display: block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 0;
    z-index: 1000;
    transition: all 0.4s ease;
    background: transparent;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(5, 4, 3, 0.98);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 5vw;
    z-index: 1001;
}

.brand-logo {
    transition: opacity var(--transition-fast);
}

body.menu-open .brand-logo {
    opacity: 0;
    pointer-events: none;
}

.brand-logo img {
    height: 90px; /* 20% larger initial logo */
    width: auto;
    transition: height 0.4s ease;
}

.brand-logo img.logo-scrolled {
    display: none;
    height: 28px; /* Much smaller as requested */
}

.navbar.scrolled .brand-logo img.logo-main {
    display: none;
}

.navbar.scrolled .brand-logo img.logo-scrolled {
    display: block;
}

.nav-links {
    display: flex;
    align-items: center; /* Changed from baseline to center for SVG alignment */
    gap: 3rem;
}

.nav-links a {
    font-size: 0.8rem; /* Increased text size */
    text-transform: capitalize; /* Only first letter uppercase */
    letter-spacing: 0.05em; /* Adjusted letter spacing for capitalize */
    position: relative;
    display: inline-block; /* Required for transform to work on a tags */
    transform: translateY(-1px); /* Lift text visually by 1px instead of 2px */
    transition: color var(--transition-fast), transform var(--transition-fast);
}

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

.nav-links a.nav-cta {
    border: 1px solid var(--accent-color);
    padding: 12px 20px 12px; /* Equal padding, baseline should be ok now */
    border-radius: 2px;
    display: inline-block;
    line-height: 1;
}

.nav-links a.nav-cta::after {
    display: none;
}

.nav-links a.nav-cta:hover {
    background: var(--accent-color);
    color: var(--bg-color) !important;
}

/* Mobile Menu */
.menu-btn {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 14px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-btn span {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
}

.menu-btn.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-btn.open span:nth-child(2) {
    transform: translateY(-9px) rotate(-45deg);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

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

.menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.menu-link {
    font-family: var(--font-heading);
    font-size: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.menu-overlay.active .menu-link {
    opacity: 1;
    transform: translateY(0);
}

.menu-overlay.active .menu-link:nth-child(1) { transition-delay: 0.1s; }
.menu-overlay.active .menu-link:nth-child(2) { transition-delay: 0.2s; }
.menu-overlay.active .menu-link:nth-child(3) { transition-delay: 0.3s; }
.menu-overlay.active .menu-link:nth-child(4) { transition-delay: 0.4s; }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: -2;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 1;
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
    transform: scale(1.05);
    transition: clip-path 1.2s cubic-bezier(0.77, 0, 0.175, 1), transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 0;
}

.hero-slide.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: scale(1);
    z-index: 2;
}

.hero-slide.prev {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: scale(1);
    transition: none;
}

.hero-controls-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 40px; /* Increased to push text higher from controls */
    z-index: 10;
}

.slide-label span {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 300;
    font-size: 3.5vw;
    color: transparent;
    -webkit-text-stroke: 1px color-mix(in srgb, var(--accent-color) 40%, transparent);
    text-transform: uppercase;
    text-align: right; /* Right align multiline text */
    letter-spacing: 0.1em;
    display: inline-block; /* allows transform to work */
    line-height: 1.1; /* Tighter line height for large text */
    /* Transition is handled via script.js */
}

.hero-controls-numeric {
    display: flex;
    align-items: center;
    gap: 25px;
}

.slider-arrow {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.slider-arrow:hover {
    color: var(--accent-color);
}

.slider-arrow.prev-slide-btn:hover {
    transform: translateX(-3px);
}

.slider-arrow.next-slide-btn:hover {
    transform: translateX(3px);
}

.hero-controls-numeric span {
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

.progress-line {
    width: 120px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    width: 14.28%;
    background: var(--text-primary);
    transition: left 0.4s ease;
}

.hero-container {
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: relative;
    padding-bottom: 80px;
}

.hero-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(120% 80% at 50% 50%, rgba(5,4,3,0.3) 0%, rgba(5,4,3,0.8) 70%, #050403 100%);
    z-index: -1;
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

/* ==========================================================================
   Marquee
   ========================================================================== */
.partners {
    padding: 30px 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
    background: rgba(255,255,255,0.01);
}

.marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
    white-space: nowrap;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 40s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding-right: 4rem; /* Match gap for seamless loop */
}

.marquee-content span {
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.marquee-content .star {
    font-size: 0.7rem;
    color: var(--accent-color);
}

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

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    padding: 150px 0 50px;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 100px;
    row-gap: 20px;
    align-items: stretch; /* So right-column takes full height */
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.about-image {
    width: calc(100% + 30px);
    margin-left: -30px;
    margin-top: auto; /* Push to bottom if text is taller */
    margin-bottom: -150px; /* Negate the section padding to touch the edge */
}

.about-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0; /* Remove radius to be flush */
    display: block;
}

.about-text {
    padding-top: 10px;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-text p.lead-text {
    font-size: 1.35rem;
    color: #e6d5c3;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.stats-block ul {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stats-block li {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1;
    color: var(--accent-color);
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* ==========================================================================
   Showcase Section
   ========================================================================== */
.showcase {
    padding: 0;
    background-color: var(--bg-color); /* Matches surrounding sections */
}

.gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.gallery-item {
    position: relative;
    overflow: visible; /* Changed from hidden to allow 3D tilt to pop */
    border-radius: 2px;
    perspective: 1200px;
}

/* Staggered layout with equal gaps using transform instead of margin */
@media screen and (min-width: 993px) {
    .gallery-item.fade-up:nth-child(even) {
        transform: translateY(180px); /* 100px offset + 80px fade up initial */
    }
    
    .gallery-item.fade-up.visible:nth-child(even) {
        transform: translateY(100px); /* 100px offset + 0px fade up final */
    }
    
    .gallery {
        padding-bottom: 100px; /* Accommodate the translated items */
    }
}

.item-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.item-image img {
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 120%;
    max-width: none; /* Override global img max-width: 100% */
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    /* Removed transition on transform to prevent fighting with JS parallax */
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    opacity: 1;
}

.item-overlay p {
    color: var(--accent-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 5px;
}



/* ==========================================================================
   Process Section
   ========================================================================== */
.process {
    padding: 50px 0 150px;
    background-color: var(--bg-color); /* Deep black */
}

.process-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    margin-bottom: 80px;
    align-items: start;
}

.section-header {
    max-width: 600px;
}


.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.process-header-wrap {
    position: sticky;
    top: 150px;
    padding-right: 40px;
}

.process-cards-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.process-header-wrap .section-subtitle {
    margin-bottom: 1rem;
    display: block;
}
.process-header-wrap p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

.process-card {
    padding: 30px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    transition: transform var(--transition-smooth), background var(--transition-smooth);
}

.process-card:hover {
    transform: translateY(-10px);
    background: rgba(255,255,255,0.05);
}

.process-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.process-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.process-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 100px 0 50px;
    background-color: #12100E; /* Dark warm grey to alternate */
}

.contact-wrapper {
    text-align: center;
    margin-bottom: 100px;
}

.contact-wrapper h2 {
    font-size: 30px;
}

.cta-button {
    display: inline-block;
    margin-top: 40px;
    padding: 15px 30px 15px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.6rem;
    transition: all 0.4s ease;
    line-height: 1;
}

.cta-button:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 20px;
    align-items: start;
}

.footer-logo {
    height: 55px; /* Increased to make it larger */
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-style: italic;
    font-family: var(--font-heading);
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-col p, .footer-col a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    color: var(--accent-color);
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Animations & Reveal Classes
   ========================================================================== */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-up {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media screen and (max-width: 992px) {
    .split-layout, .footer-grid, .process-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .process-cards-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .process-header-wrap {
        position: relative;
        top: 0;
        padding-right: 0;
    }
}

@media screen and (max-width: 1024px) {
    .about-image, .process-image {
        display: none !important;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .brand-logo img.logo-main {
        display: none !important;
    }
    
    .brand-logo img.logo-scrolled {
        display: block !important;
        opacity: 1 !important;
        height: 35px !important; /* Larger size for mobile */
    }
    
    .nav-container {
        justify-content: space-between;
    }
    
    .hero-container {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
    }
    
    .hero-controls-wrapper {
        align-items: flex-start;
        margin-top: 30px;
    }
    
    .slide-label span {
        text-align: left;
        font-size: 8vw; /* Bigger on mobile */
    }
    
    .menu-btn {
        display: flex;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(5, 4, 3, 0.95); /* Deep dark background */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    margin: auto;
    max-width: 90%;
    max-height: 80vh;
}

.lightbox-content img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 80vh;
}



.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--text-secondary);
    font-size: 40px;
    font-weight: 300;
    transition: color 0.3s;
    cursor: pointer;
    z-index: 2001;
}

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

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 20px;
    color: var(--text-secondary);
    font-weight: 300;
    font-size: 40px;
    transition: color 0.3s;
    user-select: none;
    z-index: 2001;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--accent-color);
}
