/* --- DESIGN SYSTEM VARIABLES --- */
:root {
    --gold: #C5A059;
    --gold-muted: rgba(255, 255, 255, 0.2);
    --ivory: #F9F8F6;
    --charcoal: #0A0A0A;
    --transition-soft: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: all 0.3s ease;
}

/* --- GLOBAL RESET & LUXURY BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--charcoal);
    color: var(--ivory);
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-serif {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
}

/* --- NOISE OVERLAY --- */
/* This creates a subtle cinematic grain over the whole site */
.noise-overlay {
    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.65' 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;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* --- CUSTOM CURSOR --- */
#custom-cursor {
    width: 30px;
    height: 30px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s ease-out, width 0.3s ease, height 0.3s ease, background 0.3s ease;
    transform: translate(-50%, -50%);
}

#custom-cursor.active {
    transform: translate(-50%, -50%) scale(1.5);
    background: rgba(197, 160, 89, 0.1);
    border-color: var(--ivory);
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--charcoal);
}

::-webkit-scrollbar-thumb {
    background: #333;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* --- NAVIGATION --- */
#main-nav.scrolled {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(15px);
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

/* --- TRANSFORMATION SLIDER --- */
/* The key to the "static" reveal is that the inner image has a fixed width of 100vw or the parent's width */
#after-mask {
    width: 50%; /* Controlled by JS */
    will-change: width;
}

#after-mask img {
    width: 100%; 
    height: 100%;
    max-width: none; /* Critical: prevents image from shrinking with the mask */
    object-fit: cover;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 50px;
    height: 100vh;
    cursor: ew-resize;
}

/* --- PORTFOLIO HOVER --- */
.portfolio-filter {
    position: relative;
    padding-bottom: 5px;
    transition: var(--transition-fast);
}

.portfolio-filter.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gold);
}

/* --- FORM ELEMENTS --- */
input, select, textarea {
    color: var(--ivory) !important;
}

input::placeholder, textarea::placeholder {
    color: #555 !important;
    font-size: 10px;
    letter-spacing: 2px;
}

input:focus, textarea:focus {
    outline: none;
}

/* Chrome/Safari/Edge: Remove blue outline and background on autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ivory);
  -webkit-box-shadow: 0 0 0px 1000px var(--charcoal) inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* --- REVEAL ANIMATIONS --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- MOBILE MENU --- */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    transition: var(--transition-soft);
    transform: translateY(20px);
    opacity: 0;
}

#mobile-menu.active .mobile-nav-link {
    transform: translateY(0);
    opacity: 1;
}

/* Staggering mobile menu links */
#mobile-menu.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.active .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.active .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.active .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }
#mobile-menu.active .mobile-nav-link:nth-child(5) { transition-delay: 0.5s; }

/* --- BUTTON SHIMMER EFFECT --- */
#submit-btn {
    position: relative;
    overflow: hidden;
}

#submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(197, 160, 89, 0.2),
        transparent
    );
    transition: all 0.6s;
}

#submit-btn:hover::before {
    left: 100%;
}

/* --- UTILITIES --- */
.tracking-vogue {
    letter-spacing: 0.4em;
}

.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Portfolio Filtering */
.portfolio-item {
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    transform: scale(1);
    opacity: 1;
}

.portfolio-item.hidden-item {
    display: none;
    opacity: 0;
    transform: scale(0.8);
}

.filter-btn {
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

.filter-btn.active {
    color: var(--gold);
}

/* Fix for Video Grid */
.portfolio-video {
    pointer-events: none; /* Allows hover effects to work through the video */
}

/* TRUE MASONRY LOGIC */
#portfolio-grid {
    display: block; /* Overrides previous grid settings */
}

.portfolio-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem; /* Spacing between rows */
    background: #111;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-item img, 
.portfolio-item video {
    display: block;
    width: 100%;
    height: auto; /* This ensures the media is NEVER cut */
    object-fit: contain;
}

/* POPUP ANIMATION */
@keyframes slideDown {
    from { transform: translate(-50%, -20px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.animate-slide-down {
    animation: slideDown 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.glass {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Luxury Dropdown Styling */
.luxury-select {
    cursor: pointer;
}

/* Styles the dropdown list itself on supported browsers */
.luxury-select option {
    background-color: #0A0A0A;
    color: #F9F8F6;
    padding: 20px;
    border: none;
}

/* Red asterisk helper */
input::placeholder {
    color: #555 !important;
}

/* Styling specifically for the placeholder asterisk color if needed */
.text-red-500 {
    color: #ef4444;
}

/* Testimonial Visibility */
.testimonial-slide {
    pointer-events: none;
    transform: translateY(10px);
}

.testimonial-slide.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* WhatsApp Animation */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
    animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Lazy Load Fade-in */
img[data-src] {
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

img.loaded {
    opacity: 1;
}

.portfolio-item {
    cursor: zoom-in;
}

/* Ensure the overlay doesn't block mouse interactions but allows clicks to bubble up */
.portfolio-item div.absolute {
    pointer-events: none; 
}



/* Transformation Thumbnails */
.transform-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.5;
    overflow: hidden;
}

.transform-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.4s ease;
}

.transform-thumb:hover {
    opacity: 1;
    border-color: rgba(197, 160, 89, 0.5);
}

.transform-thumb.active {
    opacity: 1;
    border-color: #C5A059;
    transform: scale(1.1);
}

.transform-thumb.active img {
    filter: grayscale(0%);
}

/* Hide scrollbar for the thumb track */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}