/* Hair by Brooklyn — Custom Styles */

/* Base reset and typography refinements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #faf9f6;
    color: #273a27;
}

/* Selection color */
::selection {
    background-color: rgba(39, 58, 39, 0.15);
    color: #1f2f1f;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid #273a27;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(250, 249, 246, 0.97);
    box-shadow: 0 1px 0 rgba(39, 58, 39, 0.08);
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #273a27;
    transition: width 0.3s ease;
}

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

/* Service card image overlay */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(39, 58, 39, 0.02) 100%);
    pointer-events: none;
    border-radius: inherit;
}

/* Form input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #faf9f6 inset !important;
    -webkit-text-fill-color: #273a27 !important;
}

/* Print styles */
@media print {
    nav, #contact-form, .reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
}

/* 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;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .service-card {
        border: 1px solid ButtonText;
    }
    
    button, a[href^="tel"] {
        border: 1px solid ButtonText;
    }
}

/* Touch device adjustments */
@media (hover: none) and (pointer: coarse) {
    .img-zoom {
        transition: none;
    }
    
    .service-card:hover {
        transform: none;
    }
}

/* Wide screen adjustments */
@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }
}

/* Narrow mobile adjustments */
@media (max-width: 360px) {
    .hero-stat-card {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin-top: 1rem;
    }
}
