/* Stark, luxury variables and premium animations for Burn Your Life */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&family=JetBrains+Mono:wght@100..800&family=Work+Sans:wght@100..900&display=swap');

:root {
    --transition-speed: 0.4s;
    --ease-premium: cubic-bezier(0.25, 1, 0.5, 1);
}

/* Custom Scrollbars */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}
.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* Custom Animations */
@keyframes strike-match {
    0% {
        transform: rotate(-10deg) translate(-20px, 10px);
        opacity: 0.8;
    }
    30% {
        transform: rotate(5deg) translate(5px, -5px);
        filter: brightness(2);
    }
    50% {
        transform: rotate(0deg) translate(0, 0);
        filter: brightness(1.5);
    }
    100% {
        transform: rotate(0deg);
        filter: brightness(1);
    }
}

@keyframes flicker-flame {
    0%, 100% {
        transform: scale(1) rotate(-1deg);
        border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
    }
    20% {
        transform: scale(0.95, 1.05) rotate(1deg);
    }
    40% {
        transform: scale(1.05, 0.95) rotate(-2deg);
        opacity: 0.9;
    }
    60% {
        transform: scale(0.98, 1.02) rotate(1.5deg);
    }
    80% {
        transform: scale(1.02, 0.98) rotate(-0.5deg);
        opacity: 0.95;
    }
}

@keyframes flame-glow {
    0%, 100% {
        box-shadow: 0 0 20px 5px rgba(254, 214, 91, 0.2), 0 0 40px 10px rgba(245, 158, 11, 0.1);
    }
    50% {
        box-shadow: 0 0 25px 8px rgba(254, 214, 91, 0.3), 0 0 50px 15px rgba(245, 158, 11, 0.2);
    }
}

@keyframes spark-particles {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--dx), var(--dy)) scale(0);
        opacity: 0;
    }
}

/* Custom Interactive States & Visual Elements */
.candle-wick {
    width: 2px;
    height: 12px;
    background: #1c1b1b;
    margin: 0 auto;
    position: relative;
    border-radius: 1px;
}
.dark .candle-wick {
    background: #e5e2e1;
}

.candle-flame {
    width: 14px;
    height: 28px;
    background: linear-gradient(to bottom, #ffffff 0%, #ffe088 25%, #735c00 90%);
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
    animation: flicker-flame 1.5s infinite ease-in-out, flame-glow 1.5s infinite ease-in-out;
    transform-origin: center bottom;
    filter: blur(0.5px);
}

.candle-flame::after {
    content: '';
    width: 6px;
    height: 12px;
    background: #3b82f6;
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
    opacity: 0.8;
}

/* Match striking animation during checkout */
.match-stick {
    width: 80px;
    height: 6px;
    background: #d7ccc8;
    position: relative;
    transform-origin: right center;
    border-radius: 2px;
}
.match-head {
    width: 12px;
    height: 10px;
    background: #d32f2f;
    border-radius: 50%;
    position: absolute;
    right: -4px;
    top: -2px;
}
.striking {
    animation: strike-match 1.2s forwards var(--ease-premium);
}

/* Noise overlay for raw, textured feel */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    content: "";
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
    background: 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");
}

/* Sound visualization bars */
.visualizer-bar {
    width: 3px;
    height: 4px;
    background-color: currentColor;
    transition: height 0.1s ease;
    border-radius: 1px;
}

/* Smoother transitions for theme toggle */
html {
    scroll-behavior: smooth;
    transition: background-color var(--transition-speed) var(--ease-premium), color var(--transition-speed) var(--ease-premium);
}

body {
    transition: background-color var(--transition-speed) var(--ease-premium), color var(--transition-speed) var(--ease-premium);
}

/* Custom button states */
.btn-outline-hover {
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn-outline-hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: currentColor;
    z-index: -1;
    transition: height 0.3s var(--ease-premium);
}
.btn-outline-hover:hover::after {
    height: 100%;
}

/* Discovery builder grid */
.builder-slot {
    border: 1px dashed rgba(0, 0, 0, 0.2);
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease-premium);
    position: relative;
}
.dark .builder-slot {
    border-color: rgba(255, 255, 255, 0.2);
}
.builder-slot.active {
    border-style: solid;
    border-color: currentColor;
    background: rgba(0, 0, 0, 0.05);
}
.dark .builder-slot.active {
    background: rgba(255, 255, 255, 0.05);
}

/* Spark particle styling */
.spark-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ff9800;
    border-radius: 50%;
    pointer-events: none;
    animation: spark-particles 0.6s forwards ease-out;
}

/* ─── Scrolling Marquee Ticker ─────────────────────────────── */
@keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

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

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-wrap {
    overflow: hidden;
    white-space: nowrap;
}

/* ─── Scroll Reveal Entrance Animations ───────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease-premium), transform 0.7s var(--ease-premium);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.7s var(--ease-premium), transform 0.7s var(--ease-premium);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.7s var(--ease-premium), transform 0.7s var(--ease-premium);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered delays for grid children */
.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.15s; }
.reveal-delay-3 { transition-delay: 0.25s; }
.reveal-delay-4 { transition-delay: 0.35s; }
.reveal-delay-5 { transition-delay: 0.45s; }

/* ─── Ambient Status Pulse ────────────────────────────────── */
@keyframes status-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.85); }
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    animation: status-pulse 2s ease-in-out infinite;
}

/* ─── Cursor Crosshair on Product Cards ──────────────────── */
[data-quickview-product] {
    cursor: crosshair;
}

/* ─── Product card image subtle parallax feel ─────────────── */
[data-quickview-product] .aspect-square img:first-child {
    will-change: transform;
}

/* ─── Image blend overlay shimmer ────────────────────────── */
@keyframes shimmer-pass {
    0%   { left: -60%; }
    100% { left: 120%; }
}

.shimmer-host {
    position: relative;
    overflow: hidden;
}

.shimmer-host::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255,255,255,0.06) 50%,
        transparent 100%
    );
    animation: shimmer-pass 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}
