/* ============================================
   Duray Plating — Custom Styles
   ============================================ */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #800020;
    color: white;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes floatDelayed {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(-2deg);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-up-delay {
    animation: fadeInUp 0.8s ease-out 0.15s forwards;
    opacity: 0;
}

.animate-fade-in-up-delayed {
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

.animate-fade-in-up-delayed-2 {
    animation: fadeInUp 0.8s ease-out 0.45s forwards;
    opacity: 0;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: floatDelayed 8s ease-in-out infinite;
    animation-delay: 1s;
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 252, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(128, 0, 32, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #800020;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-nav-link {
    position: relative;
    padding-left: 16px;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #800020;
    opacity: 0.5;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Process Steps
   ============================================ */
.process-step {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.process-step.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
    
    #hero h1 {
        font-size: 2.75rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    #about > div > div {
        gap: 3rem;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.25rem;
    }
    
    #hero .text-3xl {
        font-size: 1.5rem;
    }
}

/* ============================================
   Focus Visible (Accessibility)
   ============================================ */
:focus-visible {
    outline: 2px solid #800020;
    outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar, #mobile-menu, .animate-float, .animate-float-delayed {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
