/* Custom styles that complement Tailwind */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Selection color */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #f0e4d6;
}

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

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

/* Prevent layout shift */
.aspect-square, .aspect-\[4\/5\], .aspect-\[4\/3\] {
    position: relative;
}

/* Subtle grain texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 9999;
}

/* Reduce motion preference */
@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;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .card-hover:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    nav, .animate-bounce, button {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .bg-drip-black, .bg-drip-dark, .bg-drip-charcoal {
        background: white !important;
    }
    
    .text-drip-cream, .text-drip-sand {
        color: black !important;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .btn-primary, .btn-gold {
        border: 2px solid ButtonText;
    }
}

/* Ensure touch targets are large enough on mobile */
@media (max-width: 640px) {
    nav a, nav button, .btn-primary, .btn-gold {
        min-height: 44px;
        min-width: 44px;
    }
}
