/* ===== Base & Utilities ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(13, 148, 136, 0.15);
    color: inherit;
}

/* ===== Animations ===== */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scroll-line {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.5);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
}

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ===== Navigation ===== */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-text-color {
    color: #f8fafc;
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-text-color {
    color: #0f172a;
}

.nav-subtext-color {
    color: #94a3b8;
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-subtext-color {
    color: #94a3b8;
}

.nav-logo-color {
    color: #5eead4;
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-logo-color {
    color: #0d9488;
}

.nav-link {
    color: rgba(248, 250, 252, 0.8);
}

.nav-link:hover {
    color: #5eead4;
}

#navbar.scrolled .nav-link {
    color: #64748b;
}

#navbar.scrolled .nav-link:hover {
    color: #0d9488;
}

/* ===== Mobile Menu ===== */
.mobile-menu-link {
    transition: color 0.3s ease;
}

/* ===== Service Cards ===== */
.service-card {
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    transition: border-color 0.5s ease, transform 0.5s ease;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== Focus Styles ===== */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}

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