/* Custom styles for Las Delicias de la Harina */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6d28d9;
}

/* Selection color */
::selection {
    background: #f59e0b;
    color: #3b0764;
}

/* Reveal animations - progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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);
    }
    
    /* Stagger children */
    .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;
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(76, 29, 149, 0.08);
}

/* Hero gradient animation */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Pulse animation for dot */
@keyframes softPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.animate-pulse {
    animation: softPulse 2s ease-in-out infinite;
}

/* Hover card lift */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(76, 29, 149, 0.15);
}

/* Image hover zoom */
img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Button ripple effect */
button, a {
    position: relative;
    overflow: visible;
}

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

/* Ensure all text has proper contrast */
.text-plum-600 {
    color: #6d28d9;
}

.text-plum-700 {
    color: #4c1d95;
}

.text-plum-800 {
    color: #26004d;
}

/* Form styles */
input, textarea {
    border: 2px solid #e9d5ff;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
    color: #3b0764;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

input::placeholder, textarea::placeholder {
    color: #a855f7;
    opacity: 0.6;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #4c1d95;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(76, 29, 149, 0.3);
    z-index: 100;
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
