/* =========================================
   1. VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* Colors - Luxury Palette */
    --color-ivory: #F9F8F4;
    /* Slightly warmer, more organic than pure white */
    --color-sand: #EBE5D9;
    --color-charcoal: #0F0F0F;
    /* "Rich Black" - deeper */
    --color-charcoal-light: #2A2A2A;
    --color-gold: #C6A87C;
    /* "Pale Gold" - less yellow, more metallic */
    --color-gold-light: #E3D4BC;
    --color-gray-400: #888888;
    /* Neutral Gray */
    --color-gray-500: #555555;

    /* Typography */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;

    /* Spacing & Layout */
    --container-width: 1400px;
    /* Wider for editorial look */
    --header-height: 90px;
}

/* Utilities */
.bg-rich-black {
    background-color: var(--color-charcoal);
}

.text-gold {
    color: var(--color-gold);
}

.mix-blend-overlay {
    mix-blend-mode: overlay;
}

/* =========================================
   2. BASE STYLES
   ========================================= */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--color-ivory);
    color: var(--color-charcoal);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: 1.7;
    /* Increased for readability */
}

/* FILM GRAIN OVERLAY */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    /* Thinner */
}

::-webkit-scrollbar-track {
    background: var(--color-ivory);
}

::-webkit-scrollbar-thumb {
    background: #D1D1D1;
    border-radius: 3px;
}

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

/* Selection */
::selection {
    background: var(--color-charcoal);
    color: var(--color-gold);
}

/* =========================================
   3. TYPOGRAPHY UTILITIES
   ========================================= */
.font-serif {
    font-family: var(--font-serif);
}

.font-sans {
    font-family: var(--font-sans);
}

/* Fluid Type & Editorial Styles */
h1 {
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 1;
    font-weight: 300;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    font-weight: 300;
}

h3 {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    line-height: 1.2;
    font-weight: 400;
}

.text-tracking-xl {
    letter-spacing: 0.25em;
}

/* =========================================
   4. NAVIGATION & HEADER
   ========================================= */
#main-nav {
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    background: transparent;
    border-bottom: 1px solid transparent;
}

/* Hide Nav specifically on Hero Page initially */
.hero-page #main-nav {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}

#main-nav.scrolled {
    background: rgba(249, 248, 244, 0.9);
    /* High opacity glass */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* =========================================
   5. BUTTONS & INTERACTIVE
   ========================================= */
.btn-primary {
    display: inline-block;
    background-color: var(--color-charcoal);
    color: white;
    padding: 1.1rem 2.8rem;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid var(--color-charcoal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: white;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: -1;
}

.btn-primary:hover {
    color: var(--color-charcoal);
    border-color: var(--color-charcoal);
}

.btn-primary:hover::after {
    height: 100%;
}

.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--color-charcoal);
    padding: 1.1rem 2.8rem;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border: 1px solid var(--color-charcoal);
    transition: all 0.5s ease;
}

.btn-outline:hover {
    background-color: var(--color-charcoal);
    color: white;
}

/* Hover Underline Animation */
.hover-underline {
    position: relative;
    text-decoration: none;
    padding-bottom: 4px;
}

.hover-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    right: 0;
    /* Animate from right to left on exit */
    background-color: var(--color-gold);
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-underline:hover::after {
    width: 100%;
    left: 0;
    right: auto;
    /* Animate from left to right on enter */
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    background: white;
}

/* =========================================
   6. ANIMATIONS & UTILITIES
   ========================================= */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.fade-in-up {
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(60px);
    will-change: opacity, transform;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* Product Image interactions */
.product-card-img-container {
    overflow: hidden;
}

.product-card-img {
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.group:hover .product-card-img {
    transform: scale(1.05);
    /* Softer zoom */
}

/* Marquee */
.marquee-container {
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    overflow: hidden;
}

.marquee-track {
    animation: scrollText 60s linear infinite;
    /* Slower */
}

@keyframes scrollText {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Parallax Utilities */
.parallax-wrapper {
    overflow: hidden;
    position: relative;
}

.parallax-img {
    will-change: transform;
    min-height: 120%;
    /* Extra height for movement */
    object-position: center;
}

/* Staggered Text Reveals */
.reveal-text {
    overflow: hidden;
    display: block;
}

.reveal-text span {
    display: block;
    transform: translateY(100%);
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform;
}

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

/* Loader */
#loader-overlay {
    transition: opacity 1s ease, visibility 1s ease;
}

body.loaded #loader-overlay {
    opacity: 0;
    visibility: hidden;
}

/* Toast Animation */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translate3d(-50%, -100%, 0);
    }

    100% {
        opacity: 1;
        transform: translate3d(-50%, 0, 0);
    }
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Liquid Gold Sheen Animation */
@keyframes shimmerLoop {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

.animate-gold-sheen {
    background: linear-gradient(110deg,
            var(--color-gold) 20%,
            #FBF6E9 40%,
            var(--color-gold) 60%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmerLoop 8s linear infinite;
    will-change: background-position;
}