/* Custom styles for Brian Souva Land Surveying website */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #8f1433;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b11338;
}

/* Selection color */
::selection {
    background: #d41c4a;
    color: white;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(15, 15, 26, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Hero animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Service card hover image effect */
.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 200px;
    height: 200px;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #d41c4a, #ff7496);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse animation for CTA */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 28, 74, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(212, 28, 74, 0);
    }
}

.cta-pulse {
    animation: pulse-glow 2s infinite;
}

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

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

/* Form focus states */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(212, 28, 74, 0.1);
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Image lazy load placeholder */
img[loading="lazy"] {
    transition: opacity 0.3s ease;
}

/* Print styles */
@media print {
    nav, #back-to-top, button {
        display: none !important;
    }
    section {
        page-break-inside: avoid;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .hero-content > * {
        animation-duration: 0.6s;
    }
}

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