/* --- 1. CORE VARIABLES & FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700;900&family=Playfair+Display:ital,wght@0,400;1,500&display=swap');

:root {
    --onyx: #0B0D10;
    --platinum: #EDEDED;
    --steel: #9AA0A6;
    --bronze: #C2A24D;
    --body-bg: #0E1013;
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Inter', serif;
}

/* --- 2. GLOBAL RESET & SCROLLING --- */
html, body {
    scroll-behavior: auto !important; /* Lenis handles smoothing */
    background-color: var(--body-bg);
    overflow-x: hidden;
}

/* Grain Overlay */
body::after {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.05; pointer-events: none; z-index: 9999;
}

.font-canela { font-family: var(--font-secondary); }
.font-inter { font-family: var(--font-primary); }

/* --- 3. HEADER & NAVIGATION (RE-ENHANCED) --- */
#main-header {
    transform: translateY(-100%);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), background 0.5s ease;
}

#main-header.is-visible {
    transform: translateY(0);
}

/* Header Link Hover Effect */
.nav-link {
    position: relative;
    padding-bottom: 4px;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--bronze);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Fixed Header Button Styling */
.magnetic-content {
    display: inline-block;
    transition: all 0.3s ease;
}

/* --- 4. CLIENT LOGO MARQUEE (UPDATED) --- */
.vertical-track {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    /* Speed: 10s is fast, 15s is medium, 20s is slow */
    will-change: transform;
}

/* Ensure the logos look uniform */
.client-logo-v {
    width: 100%; /* Fill the 1/2 width of the container */
    height: 160px;
    flex-shrink: 0;
    @apply bg-white/[0.03] border border-white/5 rounded-2xl flex items-center justify-center p-6 grayscale opacity-40 transition-all duration-500 hover:grayscale-0 hover:opacity-100 hover:border-[#C2A24D]/30;
}

/* --- Logo Text Alignment --- */

/* The main title needs more 'air' to match the longer subtitle */
.logo-main {
    letter-spacing: 0.12em; /* Adjusted to stretch the shorter text */
    display: block;
    width: 100%;
    white-space: nowrap;
}

/* The subtitle is long, so we use a tighter tracking */
.logo-sub {
    font-size: 10px; /* Keep it small */
    letter-spacing: 0.12em; /* Tighter spacing so it doesn't overflow */
    display: block;
    width: 100%;
    white-space: nowrap;
    text-transform: uppercase;
}

/* Media query for desktop size adjustment */
@media (min-width: 768px) {
    .logo-sub {
        font-size: 9px;
        letter-spacing: 0.24em;
    }
}

/* --- 5. MODERN SERVICE CARDS --- */
.service-card-modern {
    @apply relative p-[1px] rounded-2xl overflow-hidden bg-white/5 cursor-pointer transition-all duration-500;
}

.card-inner {
    @apply bg-[#121417]/80 backdrop-blur-md p-8 rounded-[15px] h-full transition-all duration-500 border border-transparent;
}

.service-card-modern:hover .card-inner {
    transform: translateY(-8px);
    background: rgba(194, 162, 77, 0.05);
    border-color: rgba(194, 162, 77, 0.3);
}

/* --- 6. AGENCY FORM STYLING --- */
.contact-input {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0.5rem;
    width: 100%;
    color: white;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    border-radius: 0;
}

.contact-input:focus {
    border-color: var(--bronze);
    background: rgba(194, 162, 77, 0.03);
    padding-left: 1rem;
}

.contact-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.2em;
}

/* --- 7. LENIS CORE --- */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* --- 8. HERO & REVEALS --- */
.hero-reveal {
    opacity: 0;
    will-change: transform, opacity;
}

#night-vision-video {
    filter: brightness(1.0) contrast(1.2);
}

/* Custom Thick Heading Style */
/* --- 8. HERO REFINEMENT (MOBILE FRIENDLY) --- */
.hero-text-thick {
    font-family: var(--font-primary);
    font-weight: 900; /* 1000 can sometimes glitch on mobile, 900 is safer/thickest */
    line-height: 2.1; /* Increased from 0.8 for mobile readability */
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    word-break: break-word; /* Prevents long words from leaking off-screen */
}

/* Desktop specific adjustments */
@media (min-width: 768px) {
    .hero-text-thick {
        line-height: 0.85;
        letter-spacing: -0.01em;
    }
}

.hero-sub-thick {
    font-weight: 700;
    letter-spacing: 0.3em; /* Slightly tighter for mobile screens */
    font-size: 0.75rem;
}

@media (min-width: 768px) {
    .hero-sub-thick {
        letter-spacing: 0.5em;
        font-size: 1.25rem;
    }
}

/* target the arrow when the parent link is hovered */
.footer-huge-link:hover .arrow-rotate {
    /* -45 degrees turns a horizontal arrow into a diagonal "growth" arrow */
    transform: rotate(-45deg);
}

/* Ensure the arrow rotates from its center for a smooth look */
.arrow-rotate {
    transform-origin: center;
    will-change: transform;
}

/* --- MOBILE DRAWER ANIMATION (FIXED) --- */

/* Aligning the container ID to your HTML (#mobile-menu) */
body.menu-open #mobile-menu {
    pointer-events: auto;
}

/* Fade in the dark overlay */
body.menu-open #drawer-overlay {
    opacity: 1;
}

/* Slide in the drawer content */
body.menu-open #drawer-content {
    transform: translateX(0);
}

/* Hamburger to "X" Animation */
#mobile-menu-toggle {
    cursor: pointer;
}

body.menu-open #mobile-menu-toggle .line-1 {
    transform: translateY(4px) rotate(45deg);
    background-color: var(--bronze); /* Optional: change color when open */
}

body.menu-open #mobile-menu-toggle .line-2 {
    transform: translateY(-4px) rotate(-45deg);
    width: 24px; /* Make it full width to match line-1 */
    background-color: var(--bronze);
}

/* Link Entrance Animation */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: block; /* Ensure they are stackable */
}

body.menu-open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger the links */
body.menu-open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
body.menu-open .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
body.menu-open .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
body.menu-open .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }
body.menu-open .mobile-nav-link:nth-child(5) { transition-delay: 0.5s; }

#mobile-menu-toggle span {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Top bar rotate */
body.menu-open #mobile-menu-toggle span:first-child {
    transform: translateY(4px) rotate(45deg);
}

/* Bottom bar rotate */
body.menu-open #mobile-menu-toggle span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* Ensure 3D containers don't capture mouse clicks meant for buttons */
#owl-3d-container, #service-bg-particles {
    pointer-events: none;
    user-select: none;
}

/* Allow interaction only if you want mouse-tracking on the owl */
#owl-3d-container {
    pointer-events: auto;
}

canvas {
    display: block;
    outline: none;
}

/* Prevent layout shift/flicker by always showing the scrollbar gutter */
html {
    scrollbar-gutter: stable both-edges;
}

/* Ensure Lenis doesn't fight with the body overflow */
html.lenis, html.lenis body {
    height: auto;
}

/* Optional: If you want to hide the ugly native scrollbar entirely
   while keeping smooth scroll, use this: */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

