/* Custom styles for International Iron Works */

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

/* Base font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: rgba(212, 163, 115, 0.3);
    color: #fdf9f3;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #3d3d3d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4a373;
}

/* Scroll reveal animations (progressive enhancement) */
.animate-scroll-reveals .reveal-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-scroll-reveals .reveal-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grid items */
.reveal-item:nth-child(1) { transition-delay: 0.05s; }
.reveal-item:nth-child(2) { transition-delay: 0.1s; }
.reveal-item:nth-child(3) { transition-delay: 0.15s; }
.reveal-item:nth-child(4) { transition-delay: 0.2s; }
.reveal-item:nth-child(5) { transition-delay: 0.25s; }
.reveal-item:nth-child(6) { transition-delay: 0.3s; }
.reveal-item:nth-child(7) { transition-delay: 0.35s; }
.reveal-item:nth-child(8) { transition-delay: 0.4s; }

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(13, 13, 13, 0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 163, 115, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

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

/* Gold shimmer on hover for cards */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Subtle pulse for the hero accent dot */
@keyframes soft-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* Form focus ring animation */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.1);
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal-item {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .animate-scroll-reveals .reveal-item {
        opacity: 1 !important;
        transform: none !important;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .border-sand-700\/20 {
        border-color: rgba(212, 163, 115, 0.4);
    }
    
    .text-sand-400 {
        color: #e9c48e;
    }
}

/* Print styles */
@media print {
    nav, #contact-form, button, .reveal-item {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-luxury-950, .bg-luxury-900 {
        background: white !important;
        color: black !important;
    }
}

/* Custom select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d4a373' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Subtle card glow on hover */
.group:hover .absolute.inset-0 {
    box-shadow: inset 0 0 30px rgba(212, 163, 115, 0.03);
}
