/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #171717;
}
::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f05a1a;
}

/* Selection */
::selection {
    background: rgba(240, 90, 26, 0.3);
    color: #fff;
}

/* Navigation */
.nav {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

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

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

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

.mobile-menu-link {
    position: relative;
}

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

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

/* Reveal Animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* Stagger children */
.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }
.reveal-up:nth-child(5) { transition-delay: 0.4s; }

/* 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, #f05a1a, #ff7a3f);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Gallery Hover */
.group:hover img {
    transform: scale(1.1);
}

/* Button Ripple Effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Decorative line animation */
@keyframes growLine {
    from { height: 0; }
    to { height: 100%; }
}

/* Floating animation for accent card */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

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

/* Pulse for CTA */
@keyframes pulse-coral {
    0%, 100% { box-shadow: 0 0 0 0 rgba(240, 90, 26, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(240, 90, 26, 0); }
}

.cta-pulse:hover {
    animation: pulse-coral 1.5s ease-out infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

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

/* Print styles */
@media print {
    .nav, .mobile-menu, .cta-pulse {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
