/* Custom styles for Sally's Jewelry & Antiques */

:root {
    --color-luxury-900: #0d0a14;
    --color-luxury-800: #150f20;
    --color-plum-200: #e9d5ff;
    --color-plum-300: #d8b4fe;
    --color-plum-400: #c084fc;
    --color-plum-500: #a855f7;
    --color-plum-700: #7e22ce;
    --color-plum-800: #6b21a8;
    --color-plum-900: #581c87;
    --color-plum-950: #3b0a6b;
    --color-amber-300: #fcd34d;
    --color-amber-400: #fbbf24;
    --color-amber-500: #f59e0b;
    --color-amber-600: #d97706;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--color-luxury-900);
    color: #ffffff;
    font-family: 'Raleway', system-ui, sans-serif;
    overflow-x: hidden;
}

/* Scroll reveal base - always visible, JS enhances with animation */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Only apply hidden state when JS is active and motion is preferred */
.js-enabled .scroll-reveal {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .js-enabled .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .js-enabled .scroll-reveal:not(.revealed) {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar styles */
#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(13, 10, 20, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(251, 191, 36, 0.1);
}

/* Mobile menu */
#mobileMenu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Mobile menu animations */
.menu-line {
    transition: transform 0.3s ease, width 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 24px;
    margin-left: 0;
}

.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

/* Gold shimmer on hover for CTA buttons */
.bg-gradient-to-r.from-amber-500.to-amber-600 {
    position: relative;
    overflow: hidden;
}

.bg-gradient-to-r.from-amber-500.to-amber-600::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.bg-gradient-to-r.from-amber-500.to-amber-600:hover::before {
    left: 100%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--color-plum-700), var(--color-amber-600));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--color-plum-600), var(--color-amber-500));
}

/* Selection color */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #ffffff;
}

/* Image placeholder fallback */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .bg-gradient-to-r.from-amber-500.to-amber-600::before {
        display: none;
    }
}

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--color-amber-400);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Ensure all text has sufficient contrast */
.text-plum-200, .text-plum-300, .text-plum-400 {
    color: inherit;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded, img:not([loading="lazy"]) {
    opacity: 1;
}
