/* Base & Reset */
*, *::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: rgba(168, 230, 207, 0.3);
    color: #0A1628;
}

/* Typography refinements */
font-serif {
    font-family: 'Crimson Pro', Georgia, serif;
}

font-sans {
    font-family: 'Inter', system-ui, sans-serif;
}

/* Hero animations */
.hero-eyebrow {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title-line {
    animation: slideUp 0.9s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
    transform: translateY(100%);
}

.hero-title-line:nth-child(1) { animation-delay: 0.3s; }
.hero-title-line:nth-child(2) { animation-delay: 0.45s; }
.hero-title-line:nth-child(3) { animation-delay: 0.6s; }
.hero-title-line:nth-child(4) { animation-delay: 0.75s; }
.hero-title-line:nth-child(5) { animation-delay: 0.9s; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), 
                transform 0.8s cubic-bezier(0.23, 1, 0.32, 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; }

/* Section eyebrow animations */
.about-eyebrow,
.services-eyebrow,
.experience-eyebrow {
    animation: fadeUp 0.6s ease forwards;
    opacity: 0;
}

/* Service cards */
.service-card {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.5s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(10, 22, 40, 0.1);
}

/* Floating card animation */
.absolute.bottom-12.left-0 {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Navbar transitions */
#navbar.scrolled {
    background: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

#navbar.scrolled .menu-line {
    background: #0A1628;
}

/* Mobile menu */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.active .mobile-link {
    animation: fadeUp 0.5s ease forwards;
    opacity: 0;
}

#mobile-menu.active .mobile-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.active .mobile-link:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu.active .mobile-link:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu.active .mobile-link:nth-child(4) { animation-delay: 0.25s; }

/* Menu button animation */
.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) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

/* Nav links underline effect */
.nav-link {
    position: relative;
}

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

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

/* Image hover effects */
.overflow-hidden img {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* Form focus states */
input:focus,
textarea:focus {
    background: white;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Decorative dot pattern */
.dot-pattern {
    background-image: radial-gradient(circle, rgba(168, 230, 207, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(10, 22, 40, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(10, 22, 40, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title-line {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
