/* Custom styles for Rework — Wood & Stained Glass */

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

/* Selection color */
::selection {
    background-color: rgba(74, 222, 128, 0.3);
    color: #f0fdf4;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1f2e;
}
::-webkit-scrollbar-thumb {
    background: #16354e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #214460;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Scroll reveal animations — progressive enhancement, only when JS is available */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered children */
.stagger-children .reveal[data-reveal] {
    transition-delay: calc(var(--i, 0) * 0.08s);
}

/* Navbar transition */
#navbar.scrolled {
    box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}

/* Form select arrow */
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='%237493b0' stroke-width='2' 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 12px center;
    padding-right: 36px;
}

/* Map contrast fix for dark theme */
iframe[title*="Google Maps"] {
    background: #0f2a3e;
}
