/* Base Styles & Custom Properties */
:root {
    --color-terracotta-50: #fdf0eb;
    --color-terracotta-100: #fbe0d4;
    --color-terracotta-300: #ef9f82;
    --color-terracotta-400: #e5744e;
    --color-terracotta-500: #d95a2e;
    --color-terracotta-600: #c44520;
    --color-terracotta-700: #a3341b;
    --color-sand-50: #fdfbf7;
    --color-sand-100: #faf5eb;
    --color-sand-200: #f4e9d0;
    --color-sand-300: #ebd8ad;
    --color-sand-400: #dfc282;
    --color-sand-500: #d4ab64;
    --color-navy-800: #1a2744;
    --color-navy-900: #0f1a2e;
    --color-navy-950: #080f1c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-sand-100);
}
::-webkit-scrollbar-thumb {
    background: var(--color-terracotta-300);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-terracotta-500);
}

/* Selection */
::selection {
    background: var(--color-terracotta-200);
    color: var(--color-navy-900);
}

/* Navbar */
#navbar {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: all duration-500;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.98);
    border-bottom-color: var(--color-sand-200);
    box-shadow: 0 1px 20px rgba(15, 26, 46, 0.06);
}

.nav-logo-text {
    transition: color 0.3s ease;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-terracotta-600);
    transition: width 0.3s ease;
}

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

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-terracotta-600), var(--color-terracotta-400));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Process Steps */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--color-terracotta-500);
    transition: width 0.8s ease;
}

.process-step:hover::after {
    width: 100%;
}

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

/* Form Inputs */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(196, 69, 32, 0.1);
}

/* Button Hover Effects */
button,
a[href^="tel"] {
    position: relative;
    overflow: hidden;
}

/* Smooth Image Loading */
img {
    image-rendering: auto;
    will-change: auto;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--color-terracotta-500);
    outline-offset: 2px;
}

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

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

/* Scroll Reveal - Progressive Enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.hidden {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet and Desktop */
@media (min-width: 768px) {
    .service-card:hover {
        transform: translateY(-6px);
    }
}

/* Large Desktop */
@media (min-width: 1280px) {
    .service-card:hover {
        transform: translateY(-8px);
    }
}
