/* ===== Custom Styles for Aubergine Vintage Emporium ===== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-serif {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-sans {
    font-family: 'Inter', system-ui, sans-serif;
}

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

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

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

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

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

.floating-card-slow {
    animation: float-slow 6s ease-in-out infinite;
    animation-delay: 2s;
}

/* ===== Scroll Reveal Animations ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Only apply hidden state when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* Staggered delays for grid items */
.reveal:nth-child(1) { transition-delay: 0ms; }
.reveal:nth-child(2) { transition-delay: 100ms; }
.reveal:nth-child(3) { transition-delay: 200ms; }
.reveal:nth-child(4) { transition-delay: 300ms; }
.reveal:nth-child(5) { transition-delay: 400ms; }
.reveal:nth-child(6) { transition-delay: 500ms; }

/* ===== Navbar Scrolled State ===== */
#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08), 0 4px 24px rgba(6, 95, 70, 0.06);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span {
    color: #064e3b !important;
}

/* ===== Smooth Image Loading ===== */
img {
    background-color: #d1fae5;
    transition: opacity 0.3s ease;
}

img[src] {
    opacity: 1;
}

/* ===== Selection Color ===== */
::selection {
    background-color: #065f46;
    color: #fefdf8;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* ===== Form Focus States ===== */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(6, 95, 70, 0.1);
}

/* ===== Button Hover Effects ===== */
button, a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    #hero h1,
    #collection h2,
    #about h2,
    #visit h2 {
        line-height: 1.15;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2rem;
    }

    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    #navbar,
    #mobile-menu,
    .floating-card,
    .reveal {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}
