/* Base styles and custom properties */
:root {
    --color-terracotta: #d45533;
    --color-terracotta-light: #f3bba8;
    --color-sand: #faedcf;
    --color-cream: #FDF8F0;
}

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

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

body {
    overflow-x: hidden;
}

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

/* Scroll reveal base - content is VISIBLE by default (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Hero animations - only run if JS is available and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .hero-tag {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
    }
    
    .hero-title-line {
        animation: slideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    }
    
    .hero-title-line:nth-child(1) { animation-delay: 0.2s; }
    .hero-title-line:nth-child(2) { animation-delay: 0.35s; }
    .hero-title-line:nth-child(3) { animation-delay: 0.5s; }
    .hero-title-line:nth-child(4) { animation-delay: 0.65s; }
    
    .hero-sub {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both;
    }
    
    .hero-cta {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.95s both;
    }
}

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

/* Nav styles */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

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

#mobile-menu:not(.active) {
    opacity: 0;
    pointer-events: none;
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #d45533, #e09f3f);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Thin line decoration */
.deco-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #d45533, transparent);
}

/* Selection color */
::selection {
    background: #f3bba8;
    color: #6b271c;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d45533;
    outline-offset: 2px;
}

/* Image loading placeholder */
img {
    background-color: #f5f0e8;
}
