/* ============================================
   KAH Accounting — Custom Styles
   Clean minimalist | Midnight blue + Mint
   ============================================ */

/* --- Base --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(107, 191, 170, 0.3);
    color: #102a43;
}

/* --- Hero gradient --- */
.hero-gradient {
    background: linear-gradient(
        135deg,
        #0a1929 0%,
        #102a43 25%,
        #1a3a5c 50%,
        #0d2137 75%,
        #0a1929 100%
    );
}

/* --- Hero animations --- */
.hero-elem {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s ease forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.3s; }
.hero-elem:nth-child(3) { animation-delay: 0.5s; }
.hero-elem:nth-child(4) { animation-delay: 0.7s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-line {
    opacity: 0;
    animation: lineReveal 1s ease forwards;
    animation-delay: 1s;
}

.hero-line:nth-child(2) { animation-delay: 1.2s; }

@keyframes lineReveal {
    to { opacity: 1; }
}

/* --- Scroll reveal (below the fold only) --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .service-card {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* Staggered service card delays */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* --- Navbar --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #6bbfaa;
    transition: width 0.3s ease;
}

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

/* Transparent nav text color on hero */
.nav-transparent .nav-link {
    color: #102a43;
}

.nav-transparent .nav-text {
    color: #102a43;
}

/* Scrolled nav */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(16, 42, 67, 0.06);
}

.nav-scrolled .nav-link {
    color: #102a43;
}

.nav-scrolled .nav-text {
    color: #102a43;
}

.nav-scrolled .menu-line {
    background: #102a43;
}

/* --- Mobile menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#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; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* --- Mobile menu button --- */
.menu-line {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

/* --- Custom select --- */
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='%23627d98' stroke-width='1.5' 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 12px center;
    appearance: none;
    -webkit-appearance: none;
}

/* --- Image hover --- */
.service-card img,
section img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover img {
    transform: scale(1.03);
}

/* --- Focus styles --- */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .hero-elem {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .hero-line {
        opacity: 1;
        animation: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .service-card {
        opacity: 1;
        transform: none;
    }
    
    .mobile-link {
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .hero-gradient {
        background: linear-gradient(
            160deg,
            #0a1929 0%,
            #102a43 40%,
            #1a3a5c 70%,
            #0a1929 100%
        );
    }
}
