/* HQ Finish Carpentry — Custom Styles */

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdfcfa;
}
::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #14532d;
}

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

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
#mobile-menu.open {
    max-height: 400px;
}

/* Button ripple */
.btn-primary {
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}
.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

/* Image zoom */
.img-zoom {
    overflow: hidden;
}
.img-zoom img {
    transition: transform 0.5s ease;
    display: block;
}
.img-zoom:hover img {
    transform: scale(1.05);
}

/* Grid pattern background */
.grid-pattern {
    background-image:
        linear-gradient(rgba(22, 101, 52, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 101, 52, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Navbar scroll state */
#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(22, 101, 52, 0.08);
}

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

/* Form transitions */
input, select, textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Print styles */
@media print {
    nav, #contact, footer, .reveal {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
