*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    background: #E8645B;
    color: white;
    font-weight: 600;
    border-radius: 0 0 0.5rem 0.5rem;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile menu */
.mobile-nav-link {
    position: relative;
    text-decoration: none;
}

.mobile-nav-link:active {
    color: #E8645B;
}

/* Hero */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, white, transparent);
    z-index: 1;
}

/* Section padding */
.section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E8645B, #f0877e);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

/* Area cards */
.area-card {
    position: relative;
}

/* Testimonials */
#testimonials {
    position: relative;
}

/* CTA */
#cta {
    position: relative;
    overflow: hidden;
}

#cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

#cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 40;
    width: 48px;
    height: 48px;
    background: #E8645B;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(232, 100, 91, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #d4524a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 100, 91, 0.5);
}

.back-to-top:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 100, 91, 0.4);
}

/* Reveal animations — progressive enhancement, hidden by default for JS-less */
.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s 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; }
}

/* Form */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

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

/* Print */
@media print {
    .site-header,
    .back-to-top,
    #mobile-menu-btn {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    body {
        color: #111827;
        background: white;
    }
}

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