/* Custom styles for 2 & A Half Sisters Bakery */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0c0c0e;
}
::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

/* Selection color */
::selection {
    background: rgba(240, 82, 82, 0.3);
    color: #f6f6f7;
}

/* Floating card animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}
@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-0.5deg); }
}
@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
@keyframes scrollLine {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.floating-card-1 { animation: float1 6s ease-in-out infinite; }
.floating-card-2 { animation: float2 7s ease-in-out infinite 1s; }
.floating-card-3 { animation: float3 5s ease-in-out infinite 0.5s; }

.scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Navbar styles */
.nav-scrolled {
    background: rgba(5, 5, 6, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(63, 63, 70, 0.5);
}

.nav-scrolled .menu-line {
    background: #e3e3e5 !important;
}

/* Mobile menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Menu link hover */
.mobile-link {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Button focus states */
a:focus-visible, button:focus-visible {
    outline: 2px solid #f05252;
    outline-offset: 2px;
    border-radius: 9999px;
}

/* Image aspect ratio fallback */
[data-aspect-ratio] {
    position: relative;
}
[data-aspect-ratio]::before {
    content: '';
    display: block;
    padding-top: var(--aspect-padding, 100%);
}
[data-aspect-ratio] > img {
    position: absolute;
    inset: 0;
}

/* Thin line decorations */
.line-decoration {
    position: relative;
}
.line-decoration::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 1px;
    background: #f05252;
}

/* Subtle texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

body > *:not(script) {
    position: relative;
    z-index: 2;
}

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

/* Card hover glow effect */
.group:hover .group-hover\:border-coral-500\/30 {
    border-color: rgba(240, 82, 82, 0.3);
    box-shadow: 0 0 40px rgba(240, 82, 82, 0.08);
}

/* Map filter for dark theme */
.dark-map {
    filter: grayscale(1) invert(1) contrast(0.8) brightness(0.6);
}
