/* ==========================================================================
   ZARF — Premium UI Enhancements
   Additive layer — loads after main.css
   ========================================================================== */


/* ==========================================================================
   1. MOBILE NAV DRAWER — Complete Redesign
   ========================================================================== */

/* Backdrop overlay */
.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background 0.4s ease-out;
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
}
.mobile-menu-backdrop.is-visible {
    background: rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* Drawer — slides from right */
.mobile-menu {
    display: block !important;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 85%;
    max-width: 380px;
    z-index: 999;
    background: #0B0B0B;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-left: 1px solid rgba(201, 168, 76, 0.08);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
    visibility: hidden;
}
.mobile-menu.is-open {
    transform: translateX(0);
    visibility: visible;
}

/* Drawer header area */
.mobile-menu::before {
    content: 'ZARF';
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--color-text);
    padding: var(--space-8) var(--space-8) var(--space-6);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

/* Nav items */
.mobile-menu .mobile-nav {
    padding: var(--space-4) 0;
}
.mobile-menu .mobile-nav ul {
    gap: 0;
}
.mobile-menu .mobile-nav li {
    border-bottom: 1px solid rgba(201, 168, 76, 0.06);
}
.mobile-menu .mobile-nav a {
    display: block;
    padding: var(--space-6) var(--space-8);
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--color-text-secondary);
    letter-spacing: 0.04em;
    transition: color 0.25s ease-out, padding-left 0.25s ease-out, background 0.25s ease-out;
    position: relative;
}
.mobile-menu .mobile-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 60%;
    background: var(--color-gold);
    transition: width 0.25s ease-out;
    border-radius: 0 2px 2px 0;
}
.mobile-menu .mobile-nav a:hover,
.mobile-menu .mobile-nav a:active {
    color: var(--color-text);
    padding-left: calc(var(--space-8) + 8px);
    background: rgba(201, 168, 76, 0.04);
}
.mobile-menu .mobile-nav a:hover::before,
.mobile-menu .mobile-nav a:active::before {
    width: 3px;
}

/* CTA in drawer */
.mobile-menu .mobile-nav .mobile-cta {
    color: var(--color-gold) !important;
    margin-top: var(--space-4);
    border-bottom: none;
}

/* Staggered entry for menu items */
.mobile-menu.is-open .mobile-nav li {
    animation: menuItemSlide 0.35s ease-out both;
}
.mobile-menu.is-open .mobile-nav li:nth-child(1) { animation-delay: 0.08s; }
.mobile-menu.is-open .mobile-nav li:nth-child(2) { animation-delay: 0.13s; }
.mobile-menu.is-open .mobile-nav li:nth-child(3) { animation-delay: 0.18s; }
.mobile-menu.is-open .mobile-nav li:nth-child(4) { animation-delay: 0.23s; }
.mobile-menu.is-open .mobile-nav li:nth-child(5) { animation-delay: 0.28s; }

@keyframes menuItemSlide {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Hamburger upgrade — thinner, wider */
.hamburger span {
    width: 22px;
    height: 1px;
    background: var(--color-text);
}
.hamburger {
    gap: 6px;
}


/* ==========================================================================
   2. HERO SECTION — Cinematic Upgrade
   ========================================================================== */

/* Light sweep — slow elegant beam */
.hero-light-sweep {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
.hero-light-sweep::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 168, 76, 0.03) 40%,
        rgba(201, 168, 76, 0.06) 50%,
        rgba(201, 168, 76, 0.03) 60%,
        transparent 100%
    );
    transform: rotate(15deg);
    animation: lightSweep 8s ease-in-out infinite;
}

@keyframes lightSweep {
    0%   { left: -40%; opacity: 0; }
    15%  { opacity: 1; }
    50%  { left: 120%; opacity: 1; }
    65%  { opacity: 0; }
    100% { left: 120%; opacity: 0; }
}

/* Hero parallax depth layer */
.hero {
    perspective: 1000px;
}
.hero-content {
    will-change: transform;
}

/* Refined hero text entrance */
.hero-content[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
.hero-content[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Film grain texture overlay — very subtle */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    mix-blend-mode: overlay;
}

/* Vignette on hero */
.hero-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(10, 10, 10, 0.4) 100%);
    pointer-events: none;
}

/* Scroll indicator upgrade */
.hero-scroll-indicator {
    opacity: 0;
    animation: scrollIndicatorFade 1s ease-out 1.5s forwards;
}
@keyframes scrollIndicatorFade {
    to { opacity: 1; }
}


/* ==========================================================================
   3. PRODUCT CARDS — Premium Hover
   ========================================================================== */

/* Tilt perspective container */
.product-card {
    transform-style: preserve-3d;
    transition:
        transform 0.4s cubic-bezier(0.33, 1, 0.68, 1),
        box-shadow 0.4s cubic-bezier(0.33, 1, 0.68, 1);
    will-change: transform;
    border: 1px solid rgba(201, 168, 76, 0);
}
.product-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(201, 168, 76, 0.06);
    border-color: rgba(201, 168, 76, 0.08);
}

/* Gold divider line animation in card */
.product-card-info {
    position: relative;
}
.product-card-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--space-6);
    right: var(--space-6);
    height: 1px;
    background: var(--color-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
    opacity: 0.5;
}
.product-card:hover .product-card-info::before {
    transform: scaleX(1);
}

/* Card image subtle overlay on hover */
.product-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 10, 10, 0.7) 0%,
        rgba(10, 10, 10, 0.1) 40%,
        rgba(201, 168, 76, 0.03) 100%
    );
    opacity: 0;
    transition: opacity 0.5s ease-out;
    pointer-events: none;
    z-index: 1;
}
.product-card:hover .product-card-image::after {
    opacity: 1;
}

/* CTA arrow animation */
.product-card-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}
.product-card-cta span {
    display: inline-block;
    transition: transform 0.3s ease-out;
}
.product-card:hover .product-card-cta span {
    transform: translateX(4px);
}


/* ==========================================================================
   4. BUTTONS — Luxury Micro-interactions
   ========================================================================== */

/* Primary button glow */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition:
        background 0.3s ease-out,
        transform 0.25s ease-out,
        box-shadow 0.3s ease-out;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
    border-radius: inherit;
}
.btn-primary:hover::before {
    opacity: 1;
}
.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 24px rgba(201, 168, 76, 0.25);
}
.btn-primary:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.2);
}

/* Ghost button underline sweep */
.btn-ghost {
    position: relative;
    transition:
        color 0.3s ease-out,
        border-color 0.3s ease-out,
        background 0.3s ease-out,
        transform 0.25s ease-out;
}
.btn-ghost:hover {
    transform: translateY(-1px);
}
.btn-ghost:active {
    transform: translateY(0);
}


/* ==========================================================================
   5. LINKS — Underline Reveal Animation
   ========================================================================== */

/* Nav links and footer links — underline from left */
.footer-col a,
.nav-list a {
    position: relative;
}
.footer-col a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold);
    transition: width 0.3s ease-out;
}
.footer-col a:hover::after {
    width: 100%;
}


/* ==========================================================================
   6. SECTION DEPTH & LAYERING
   ========================================================================== */

/* Alternating section depth */
.collection-section,
.notes-education,
.journal-section,
.faq-section,
.perfume-hero,
.archive-grid-section {
    position: relative;
}

/* Subtle top edge glow between sections */
.story-section::before,
.waitlist-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 168, 76, 0.15) 30%,
        rgba(201, 168, 76, 0.25) 50%,
        rgba(201, 168, 76, 0.15) 70%,
        transparent 100%
    );
}

/* Section backgrounds — refined depth */
.story-section {
    background:
        linear-gradient(180deg, #111111 0%, #0E0E0E 100%);
}
.waitlist-section {
    background:
        linear-gradient(180deg, #111111 0%, #0D0D0D 100%);
}

/* Brand promise strip — elevated */
.brand-promise {
    background: rgba(20, 20, 20, 0.5);
    position: relative;
}


/* ==========================================================================
   7. HEADER — Refined Scroll Behavior
   ========================================================================== */

.zarf-header {
    transition: background 0.4s ease-out, border-color 0.4s ease-out, box-shadow 0.4s ease-out;
}
.zarf-header.is-scrolled {
    background: rgba(10, 10, 10, 0.95);
    border-bottom-color: rgba(201, 168, 76, 0.12);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Logo subtle hover */
.logo-text {
    transition: letter-spacing 0.4s ease-out;
}
.header-logo:hover .logo-text {
    letter-spacing: 0.2em;
}


/* ==========================================================================
   8. SCROLL ANIMATIONS — Refined Timing
   ========================================================================== */

/* Smoother, slower reveal */
[data-animate] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s cubic-bezier(0.33, 1, 0.68, 1), transform 0.8s cubic-bezier(0.33, 1, 0.68, 1);
}
[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger — wider delays for breathing room */
[data-animate="stagger"] [data-animate-item] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s cubic-bezier(0.33, 1, 0.68, 1), transform 0.7s cubic-bezier(0.33, 1, 0.68, 1);
}
[data-animate="stagger"].is-visible [data-animate-item]:nth-child(1) { transition-delay: 0ms; }
[data-animate="stagger"].is-visible [data-animate-item]:nth-child(2) { transition-delay: 120ms; }
[data-animate="stagger"].is-visible [data-animate-item]:nth-child(3) { transition-delay: 240ms; }
[data-animate="stagger"].is-visible [data-animate-item]:nth-child(4) { transition-delay: 360ms; }
[data-animate="stagger"].is-visible [data-animate-item]:nth-child(5) { transition-delay: 480ms; }
[data-animate="stagger"].is-visible [data-animate-item]:nth-child(6) { transition-delay: 600ms; }


/* ==========================================================================
   9. NOTES PYRAMID — Upgraded
   ========================================================================== */

.notes-level {
    transition: border-color 0.3s ease-out, background 0.3s ease-out;
}
.notes-level:hover {
    border-color: rgba(201, 168, 76, 0.4);
    background: rgba(26, 26, 26, 0.8);
}


/* ==========================================================================
   10. WAITLIST FORM — Premium Feel
   ========================================================================== */

.form-group input {
    transition: border-color 0.3s ease-out, box-shadow 0.3s ease-out;
}
.form-group input:focus {
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.08);
}

/* Social proof counter — subtle glow */
.waitlist-count {
    text-shadow: 0 0 20px rgba(201, 168, 76, 0.3);
}


/* ==========================================================================
   11. SINGLE PERFUME PAGE — Depth
   ========================================================================== */

.perfume-image-main {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(201, 168, 76, 0.06);
}
.perfume-image-main::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

/* Fragrance notes — hover */
.note-row {
    transition: background 0.25s ease-out;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
    border-radius: var(--radius-sm);
}
.note-row:hover {
    background: rgba(201, 168, 76, 0.04);
}


/* ==========================================================================
   12. JOURNAL CARDS — Consistent Premium
   ========================================================================== */

.journal-card {
    border: 1px solid rgba(201, 168, 76, 0);
    transition: transform 0.35s ease-out, box-shadow 0.35s ease-out, border-color 0.35s ease-out;
}
.journal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    border-color: rgba(201, 168, 76, 0.06);
}


/* ==========================================================================
   13. FAQ — Smooth Accordion
   ========================================================================== */

.faq-item {
    transition: background 0.3s ease-out;
    padding: 0 var(--space-3);
    margin: 0 calc(var(--space-3) * -1);
    border-radius: var(--radius-sm);
}
.faq-item[open] {
    background: rgba(201, 168, 76, 0.03);
}
.faq-question {
    transition: color 0.25s ease-out;
}
.faq-item:hover .faq-question {
    color: var(--color-text);
}


/* ==========================================================================
   14. 404 PAGE — Cinematic
   ========================================================================== */

.error-code {
    background: linear-gradient(135deg, rgba(201,168,76,0.2) 0%, rgba(201,168,76,0.05) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ==========================================================================
   15. FOOTER — Refined
   ========================================================================== */

.zarf-footer {
    position: relative;
}
.zarf-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 168, 76, 0.12) 30%,
        rgba(201, 168, 76, 0.2) 50%,
        rgba(201, 168, 76, 0.12) 70%,
        transparent 100%
    );
}

/* Footer logo hover */
.footer-logo {
    transition: letter-spacing 0.4s ease-out;
    display: inline-block;
}
.footer-logo:hover {
    letter-spacing: 0.2em;
}


/* ==========================================================================
   16. MOBILE RESPONSIVE REFINEMENTS
   ========================================================================== */

@media (max-width: 768px) {
    /* Better spacing on mobile */
    .collection-section,
    .notes-education,
    .journal-section,
    .faq-section {
        padding: var(--space-16) 0;
    }

    .waitlist-section,
    .story-section {
        padding: var(--space-16) 0;
    }

    /* Larger tap targets on mobile */
    .btn {
        padding: var(--space-4) var(--space-8);
        min-height: 48px;
    }

    .filter-link {
        padding: var(--space-3) var(--space-4);
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Hero mobile — reduce padding */
    .hero {
        padding: var(--space-24) var(--space-6);
        min-height: 90vh;
    }

    /* Section titles — slightly smaller on mobile */
    .section-title {
        font-size: var(--text-3xl);
    }

    /* Product card — no tilt on mobile */
    .product-card:hover {
        transform: translateY(-2px);
    }

    /* Disable light sweep on mobile */
    .hero-light-sweep::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 0.12em;
    }

    .hero-tagline {
        font-size: var(--text-base);
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Tablet specific */
@media (min-width: 769px) and (max-width: 1024px) {
    .collection-grid {
        gap: var(--space-6);
    }
    .perfume-hero-layout {
        gap: var(--space-8);
    }
}


/* ==========================================================================
   17. REDUCED MOTION — Graceful Degradation
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .hero-light-sweep::before {
        animation: none;
        display: none;
    }

    .hero::after {
        display: none;
    }

    .product-card-info::before {
        transition: none;
        transform: scaleX(1);
        opacity: 0.2;
    }

    .mobile-menu {
        transition: none;
    }

    .mobile-menu.is-open .mobile-nav li {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .mobile-menu-backdrop {
        transition: none;
    }

    @keyframes menuItemSlide {
        from, to { opacity: 1; transform: none; }
    }
}
