/* === Custom Styles for Calm Connections === */

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

/* Custom selection color */
::selection {
    background-color: rgba(123, 74, 107, 0.2);
    color: #3A2533;
}

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(247, 240, 244, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 74, 107, 0.08);
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #7B4A6B, #D4821A);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
}
.mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Menu toggle animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.menu-open .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
body.menu-open .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* Service card hover */
.service-card {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}

/* Intersection observer animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }
.fade-up-delay-5 { transition-delay: 0.5s; }
.fade-up-delay-6 { transition-delay: 0.6s; }

/* Parallax subtle effect on hero images */
.hero-float-1 {
    animation: float 6s ease-in-out infinite;
}
.hero-float-2 {
    animation: float 8s ease-in-out infinite reverse;
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237B4A6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #7B4A6B;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-up { opacity: 1; transform: none; transition: none; }
    .hero-float-1, .hero-float-2 { animation: none; }
    .service-card { transition: none; }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 3.5rem;
    }
    .service-card {
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2.75rem;
    }
    section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
