/* ========================================
   Toys from the Attic — Custom Styles
   Classic & Elegant · Plum + Amber
======================================== */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #fde68a;
    color: #6c1a2e;
}

/* ---------- Scroll Reveal (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

/* Fallback: always visible if JS is disabled or prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Floating Cards Animation ---------- */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

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

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

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

#navbar.scrolled {
    background: rgba(253, 244, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(108, 26, 46, 0.08);
}

#navbar.scrolled .font-serif {
    color: #6c1a2e;
}

#navbar.scrolled a:not([class*="bg-"]) {
    color: #801a30;
}

/* ---------- Mobile Menu ---------- */
#mobileMenu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(108, 26, 46, 0.08);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ---------- Card Hover Effects ---------- */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ---------- Button Focus ---------- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ---------- Image aspect ratios ---------- */
img {
    max-width: 100%;
    height: auto;
}

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

::-webkit-scrollbar-track {
    background: #fdf4f6;
}

::-webkit-scrollbar-thumb {
    background: #be2744;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9c1a36;
}

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

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

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

/* ---------- Map container ---------- */
iframe {
    filter: saturate(0.8) contrast(1.05);
    transition: filter 0.3s ease;
}

iframe:hover {
    filter: saturate(1) contrast(1);
}
