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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    overflow-x: hidden;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Animations */
.hero-title {
    animation: slideUp 1s ease forwards;
    animation-delay: 0.2s;
}

.hero-subtitle {
    animation: slideUp 1s ease forwards;
    animation-delay: 0.1s;
}

.hero-desc {
    animation: slideUp 1s ease forwards;
    animation-delay: 0.3s;
}

.hero-cta {
    animation: slideUp 1s ease forwards;
    animation-delay: 0.4s;
}

.hero-info {
    animation: slideUp 1s ease forwards;
    animation-delay: 0.5s;
}

.hero-image {
    animation: fadeIn 1.2s ease forwards;
    animation-delay: 0.3s;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.02);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Line Animation */
.scroll-line {
    animation: scrollDown 1.5s ease infinite;
}

@keyframes scrollDown {
    0% {
        top: -50%;
    }
    100% {
        top: 150%;
    }
}

/* Service Cards */
.service-card {
    transition: transform 0.5s ease;
}

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

/* Gallery Items */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 60, 52, 0);
    transition: background 0.5s ease;
}

.gallery-item:hover::after {
    background: rgba(26, 60, 52, 0.1);
}

/* Navbar */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(26, 60, 52, 0.1);
}

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

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

/* Menu Lines Animation */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* About Image */
.about-image {
    animation: fadeIn 1.2s ease forwards;
}

/* Custom Selection */
::selection {
    background: rgba(26, 60, 52, 0.2);
    color: #1a3c34;
}

/* Focus Styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 1px currentColor;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
}
