/* Shawna and Sue's Dice & Knacks — Custom Styles */

/* Base resets */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #040a14;
    color: #e8e0d0;
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #fff;
}

/* Focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid #d4a017;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth image loading */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Gold gradient utility */
.gold-gradient {
    background: linear-gradient(135deg, #ffd11a 0%, #f5c518 30%, #d4a017 60%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Gold border with gradient */
.gold-border {
    position: relative;
    border-radius: 1rem;
}

.gold-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 209, 26, 0.4), rgba(184, 134, 11, 0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Dice dot pattern background */
.dice-pattern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Ccircle cx='15' cy='15' r='3' fill='rgba(212,160,23,0.04)'/%3E%3Ccircle cx='45' cy='15' r='3' fill='rgba(212,160,23,0.04)'/%3E%3Ccircle cx='15' cy='45' r='3' fill='rgba(212,160,23,0.04)'/%3E%3Ccircle cx='45' cy='45' r='3' fill='rgba(212,160,23,0.04)'/%3E%3Ccircle cx='30' cy='30' r='3' fill='rgba(212,160,23,0.06)'/%3E%3C/svg%3E");
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4a017, #b8860b);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffd11a, #d4a017);
}

/* Card hover lift */
.card-luxury {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-luxury:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(212, 160, 23, 0.12);
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(3deg);
    }
}

.float-anim {
    animation: float 4s ease-in-out infinite;
}

.float-anim-delay {
    animation: float 4s ease-in-out 1.5s infinite;
}

/* Shimmer text animation */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.shimmer-text {
    background: linear-gradient(90deg, #d4a017 0%, #ffd11a 25%, #ffd11a 50%, #d4a017 75%, #b8860b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* Scroll reveal — progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Reduced motion — ensure content is always visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .float-anim, .float-anim-delay {
        animation: none;
    }

    .shimmer-text {
        animation: none;
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(4, 10, 20, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.15);
}

/* Mobile menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-link {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Button ripple effect */
.btn-gold {
    position: relative;
    overflow: hidden;
}

.btn-gold::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-gold:hover::after {
    opacity: 1;
}

/* Image lazy fade */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Map dark theme override */
iframe[style*="invert"] {
    border-radius: 0.75rem;
}

/* Responsive typography scaling */
@media (min-width: 1024px) {
    html {
        font-size: 16px;
    }
}
