/* Custom styles for PHP Agency: Arizona */

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

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

::-webkit-scrollbar-track {
    background: #102a43;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #22c55e;
}

/* Selection color */
::selection {
    background: rgba(34, 197, 94, 0.3);
    color: #f0fdf4;
}

/* Navbar scroll effect */
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(51, 78, 104, 0.5);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger children */
    .reveal-grid .reveal:nth-child(1) { transition-delay: 0.1s; }
    .reveal-grid .reveal:nth-child(2) { transition-delay: 0.2s; }
    .reveal-grid .reveal:nth-child(3) { transition-delay: 0.3s; }
    .reveal-grid .reveal:nth-child(4) { transition-delay: 0.4s; }
    .reveal-grid .reveal:nth-child(5) { transition-delay: 0.5s; }
    .reveal-grid .reveal:nth-child(6) { transition-delay: 0.6s; }
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

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

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

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

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #102a43 inset !important;
    -webkit-text-fill-color: #f0fdf4 !important;
}

/* Print styles */
@media print {
    nav, #contact-form, .reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .font-serif, .font-sans {
        font-family: Georgia, serif !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;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --tw-border-opacity: 1;
    }
    
    .border-midnight-800 {
        border-color: #0a1628;
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding: 80px 0;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
}

/* Wide screen optimization */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}

/* Tablet landscape */
@media (max-width: 1024px) and (orientation: landscape) {
    .font-serif.text-4xl {
        font-size: 2.5rem;
    }
}
