/* Custom styles and overrides */
html {
    scroll-behavior: smooth;
}

/* Smooth reveal animations for below-fold content */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    
    .reveal.active {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #db4276, #c42558);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #c42558, #a31642);
}

/* Selection color */
::selection {
    background-color: #fce7eb;
    color: #841638;
}

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

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

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Print styles */
@media print {
    nav,
    .animate-bounce,
    .animate-float {
        display: none;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Navbar scroll effect */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Button hover effects */
button:hover,
a:hover {
    transform: translateY(-2px);
}

button:active,
a:active {
    transform: translateY(0);
}

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

input:focus,
textarea:focus {
    outline: none;
    border-color: #db4276;
    box-shadow: 0 0 0 3px rgba(219, 66, 118, 0.1);
}

/* Loading state for buttons */
button:disabled,
a:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: 2.5rem;
    }
    
    .font-serif:nth-child(2) {
        font-size: 2rem;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .bg-gradient-to-br {
        background: ButtonFace !important;
    }
    
    .text-burgundy-600 {
        color: LinkText;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .group:hover .group-hover\:scale-110 {
        transform: scale(1);
    }
    
    .group:hover .group-hover\:translate-x-1 {
        transform: translateX(0);
    }
}
