/* ── Custom Properties ── */
:root {
    --terracotta-500: #d96032;
    --terracotta-600: #c24a22;
    --sand-400: #e8d5b8;
    --warm-900: #433c34;
    --warm-700: #6e6152;
    --warm-500: #a89885;
    --warm-200: #ebe7e0;
    --warm-100: #f5f3ef;
    --warm-50: #faf9f7;
}

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

body {
    overflow-x: hidden;
}

/* ── Navbar ── */
#navbar.scrolled {
    background: rgba(250, 249, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(67, 60, 52, 0.08);
}

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

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

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* ── Hamburger Animation ── */
#mobileMenuBtn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#mobileMenuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobileMenuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ── Service Cards ── */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* ── Float Animation ── */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ── Reduced 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; }
    .animate-float { animation: none; }
}

/* ── Selection ── */
::selection {
    background: rgba(217, 96, 50, 0.2);
    color: var(--warm-900);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--warm-100);
}
::-webkit-scrollbar-thumb {
    background: var(--warm-300);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--warm-400);
}
