/* Trojan Supply — Custom Styles */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::-webkit-scrollbar-track {
    background: #0d0b09;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #5c574e;
}

/* Selection */
::selection {
    background: rgba(200, 98, 57, 0.3);
    color: #f7f7f6;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Image loading placeholder */
img {
    background-color: #1a1714;
}

/* Navbar glass effect when scrolled */
.navbar-scrolled {
    background: rgba(13, 11, 9, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(71, 65, 57, 0.5);
}

/* Scroll reveal base state — visible by default for accessibility */
.scroll-reveal {
    opacity: 1;
    transform: none;
}

/* Scroll reveal animation — progressive enhancement only */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.is-visible {
        animation: revealUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delays */
.scroll-reveal:nth-child(1) { animation-delay: 0s; }
.scroll-reveal:nth-child(2) { animation-delay: 0.1s; }
.scroll-reveal:nth-child(3) { animation-delay: 0.2s; }
.scroll-reveal:nth-child(4) { animation-delay: 0.3s; }
.scroll-reveal:nth-child(5) { animation-delay: 0.4s; }
.scroll-reveal:nth-child(6) { animation-delay: 0.5s; }

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #f0d48a, #c9a22e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Coral glow effect */
.coral-glow {
    box-shadow: 0 0 40px rgba(200, 98, 57, 0.15);
}

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

/* Mobile menu transition */
#mobileMenu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* Form input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #1a1714 inset !important;
    -webkit-text-fill-color: #f7f7f6 !important;
}

/* Map filter override */
iframe[title="Trojan Supply location map"] {
    filter: invert(90%) hue-rotate(180deg) brightness(0.95) contrast(1.1);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    h1 {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }
}

/* Print styles */
@media print {
    nav, #contactForm, .scroll-reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
