/**
 * Graystone Chambers - Custom Styles
 * 
 * Additional custom styles that complement Tailwind CSS
 * 
 * @package GraystoneChambers
 */

/* ===================================
   Base Styles & Typography
   =================================== */

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

/* Custom selection color */
::selection {
    background-color: rgba(194, 178, 128, 0.3);
    color: #1f2937;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid #c2b280;
    outline-offset: 2px;
}

/* ===================================
   Navigation Enhancements
   =================================== */

/* Hide Alpine.js elements until loaded */
[x-cloak] {
    display: none !important;
}

/* Sticky header shadow on scroll */
header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ===================================
   Button Styles
   =================================== */

/* Button hover lift effect */
.btn-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

/* ===================================
   Card Styles
   =================================== */

/* Card hover effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

/* ===================================
   Form Styles
   =================================== */

/* Form input focus transitions */
input,
textarea,
select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Custom checkbox styling */
input[type="checkbox"]:checked {
    background-color: #c2b280;
    border-color: #c2b280;
}

/* ===================================
   Animation Classes
   =================================== */

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Staggered animation delays */
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }
.animate-delay-500 { animation-delay: 500ms; }

/* Pulse animation for CTA buttons */
@keyframes pulse-gold {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(194, 178, 128, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(194, 178, 128, 0);
    }
}

.pulse-gold {
    animation: pulse-gold 2s infinite;
}

/* ===================================
   Image Effects
   =================================== */

/* Image zoom on hover */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s ease;
}

.img-zoom:hover img {
    transform: scale(1.05);
}

/* ===================================
   Loading States
   =================================== */

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===================================
   Scroll Indicator
   =================================== */

/* Scroll down indicator animation */
@keyframes bounce-slow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.scroll-indicator {
    animation: bounce-slow 2s infinite;
}

/* ===================================
   Testimonial Cards
   =================================== */

/* Quote decoration */
.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 80px;
    font-family: 'Playfair Display', serif;
    color: rgba(194, 178, 128, 0.2);
    line-height: 1;
}

/* ===================================
   Responsive Utilities
   =================================== */

/* Hide scrollbar but keep functionality */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    header,
    footer,
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* ===================================
   Accessibility Improvements
   =================================== */

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    padding: 1rem;
    background: #c2b280;
    color: #1f2937;
    z-index: 100;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-secondary {
        border: 2px solid #000;
    }
    
    a {
        text-decoration: underline;
    }
}
