/* Base & Utilities */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8f5;
}
::-webkit-scrollbar-thumb {
    background: #c4c4cc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9e9ea9;
}

/* Selection */
::selection {
    background: #ffc9bc;
    color: #1f1f26;
}

/* Header scroll state */
header.scrolled {
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(196, 196, 204, 0.3);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

header.scrolled .font-serif {
    color: #1f1f26 !important;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    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; }

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

#mobileMenu:not(.open) {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

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

/* Hero image hover */
.hero-img-container:hover .hero-img {
    transform: scale(1.02);
}

.hero-img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating card animation */
.float-card {
    animation: float 6s ease-in-out infinite;
}

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

/* Service card hover glow */
.group:hover .service-glow {
    opacity: 1;
}

.service-glow {
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* Focus visible */
*:focus-visible {
    outline: 2px solid #ffa28a;
    outline-offset: 2px;
}

/* Reduce motion */
@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;
    }
}

/* Mobile menu button active state */
#menuBtn.active #menuIcon line:first-child {
    transform: rotate(45deg);
    transform-origin: center;
}
#menuBtn.active #menuIcon line:nth-child(2) {
    opacity: 0;
}
