/* Additional custom styles and utilities */

/* Smooth scroll offset for fixed navigation */
html {
    scroll-padding-top: 80px;
}

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

/* Print styles */
@media print {
    .hero,
    .cta-section,
    #contact {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .nav-scrolled {
        background: #fff !important;
    }
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card {
        border: 2px solid #2C2C2C;
    }
    
    .nav-link {
        font-weight: 700;
    }
}

/* Selection color */
::selection {
    background-color: #B85A44;
    color: #FDFBF7;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent layout shift on images */
img[width][height] {
    aspect-ratio: attr(width) / attr(height);
}

/* Custom focus ring for buttons */
button,
a.btn-primary,
a.btn-secondary {
    position: relative;
}

button:focus-visible,
a.btn-primary:focus-visible,
a.btn-secondary:focus-visible {
    outline: 3px solid #B85A44;
    outline-offset: 2px;
}

/* Loading state for form */
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Accessibility: Skip to content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #B85A44;
    color: #FDFBF7;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .service-card {
        padding: 1.75rem;
    }
    
    .about-image {
        margin-bottom: 2rem;
    }
}

/* Small mobile adjustments */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.875rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}
