/* Custom styles — overrides and enhancements beyond Tailwind */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Hero floating animation for stat cards */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(var(--rot, 0deg)); }
    50% { transform: translateY(-12px) rotate(var(--rot, 0deg)); }
}

.stat-card {
    animation: float-slow 5s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation-delay: -1.5s;
    --rot: -3deg;
}

.stat-card:nth-child(3) {
    animation-delay: -3s;
    --rot: 2deg;
}

/* Subtle pattern overlay for sections */
section::before {
    content: '';
    pointer-events: none;
}

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

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

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

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

/* Selection color */
::selection {
    background: #FFE0DA;
    color: #27272A;
}

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

/* Mobile menu line animation */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Gallery hover overlay */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,15,17,0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 12px;
    pointer-events: none;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item {
    position: relative;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .stat-card {
        animation: none;
    }
    .service-card,
    .gallery-item img,
    .nav-link::after,
    a,
    button {
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}
