/* ===== Custom Styles for Daniel's Welding Service ===== */

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

/* Custom selection color */
::selection {
    background-color: #528139;
    color: #fefdf8;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

/* ===== Reveal on Scroll ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

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

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

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(31, 52, 24, 0.08);
    padding-top: 0;
    padding-bottom: 0;
}

#navbar.scrolled .font-serif {
    color: #1f3418;
}

#navbar.scrolled a:not(.px-5) {
    color: #305023;
}

/* ===== Service Cards ===== */
.service-card {
    border: 1px solid rgba(61, 100, 43, 0.08);
}

.service-card:hover {
    border-color: rgba(61, 100, 43, 0.15);
}

/* ===== Gallery Images ===== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    animation: fadeIn 0.3s ease-out;
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(61, 100, 43, 0.1);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ===== Form Styles ===== */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(82, 129, 57, 0.15);
}

/* ===== Button Hover Effects ===== */
button[type="submit"]:active {
    transform: translateY(0) !important;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* ===== Focus visible for accessibility ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #528139;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Subtle pattern for hero overlay ===== */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(ellipse at 30% 50%, rgba(82, 129, 57, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

#hero > .relative {
    z-index: 2;
}
