/* ===== Base & Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(200, 150, 62, 0.3);
    color: #f3e8ff;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #080510;
}
::-webkit-scrollbar-thumb {
    background: #5b21b6;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* ===== Floating Card Animations ===== */
@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(0.5deg); }
}
@keyframes float-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-0.5deg); }
}
@keyframes float-3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(0.3deg); }
}
@keyframes float-4 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(-0.3deg); }
}

.floating-card-1 { animation: float-1 5s ease-in-out infinite; }
.floating-card-2 { animation: float-2 6s ease-in-out infinite 0.5s; }
.floating-card-3 { animation: float-3 4.5s ease-in-out infinite 1s; }
.floating-card-4 { animation: float-4 5.5s ease-in-out infinite 0.3s; }

/* ===== Reveal Animations (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Default visible state for reduced-motion or no-JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

#navbar.scrolled {
    background: rgba(8, 5, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(200, 150, 62, 0.1), 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* ===== Menu Toggle Animation ===== */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(3px) rotate(45deg);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-3px) rotate(-45deg);
    width: 1.25rem;
}

/* ===== Product Card Hover Glow ===== */
.group:hover .group-hover\:text-amber-300 {
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
}

/* ===== Button Ripple Effect ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Map Dark Mode Fix ===== */
iframe[src*="google.com/maps"] {
    filter: invert(90%) hue-rotate(180deg) brightness(0.9) contrast(1.1);
}

/* ===== Focus States ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.15;
    }
}
