/* ===== Custom Styles for Urban Roots by J and H ===== */

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

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

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

/* ===== Hero Animations ===== */
.hero-subtitle {
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-subtitle,
h1,
.hero-cta {
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
}

h1 {
    animation-delay: 0.4s;
}

.hero-cta {
    animation-delay: 0.6s;
}

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

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .reveal.revealed {
        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; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ===== Service Cards ===== */
.service-card {
    transition: background-color 0.4s ease;
}

.service-card:hover {
    background-color: #fef7f7;
}

.service-card:hover svg {
    transform: scale(1.1);
}

.service-card svg {
    transition: transform 0.4s ease, color 0.3s ease;
}

/* ===== Gallery ===== */
.gallery-item {
    cursor: default;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Navbar ===== */
#navbar.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(128, 0, 32, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ===== Mobile Menu ===== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #800020;
    transition: width 0.3s ease;
}

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

/* ===== Form Styles ===== */
input:focus,
textarea:focus,
select:focus {
    border-bottom-color: #800020 !important;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23800020' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 1.5rem;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Utility ===== */
.section-label {
    display: block;
}
