/* Custom styles for Bateman & Co. */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f7f7f6;
}

::-webkit-scrollbar-thumb {
    background: #d6d6cf;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b3b3a8;
}

/* Selection color */
::selection {
    background-color: #e85d4a;
    color: #1a1a18;
}

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

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

/* Prevent layout shift */
img, video, svg {
    display: block;
}

/* Print styles */
@media print {
    nav, .mobile-menu, #contactForm, iframe {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .reveal, .reveal-left, .reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .service-card {
        padding: 1.5rem;
    }
    
    .stat-item {
        padding-right: 1rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card {
        border-width: 2px;
    }
    
    .nav-link::after {
        height: 3px;
    }
}

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

/* Loading states */
button:disabled,
input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hover states for interactive elements */
a, button {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Form validation styles */
input:invalid:not(:placeholder-shown):not(:focus),
textarea:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #dc2626;
}

input:valid:not(:placeholder-shown):not(:focus) {
    border-color: #16a34a;
}

/* Tooltip styles */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background-color: #1a1a18;
    color: #f7f7f6;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* Accessibility: skip to content */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1a1a18;
    color: #f7f7f6;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

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

/* Image placeholder fallback */
img:not([src]):not([srcset]) {
    background-color: #ecece9;
}

/* Aspect ratio utilities */
.aspect-custom-3-4 {
    aspect-ratio: 3 / 4;
}

.aspect-custom-4-3 {
    aspect-ratio: 4 / 3;
}
