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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Background layers - these handle the image transitions */
.background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease;
}

.bg-layer-1 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
                      url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2071&q=80');
    z-index: 1;
}

.bg-layer-2 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
                      url('https://images.unsplash.com/photo-1684914081701-6c406dfa320a?q=80&w=3744&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D=80');
    z-index: 2;
    opacity: 0;
}

/* Single overlay for all content - this stays perfectly positioned */
.content-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.1s ease, transform 0.1s ease;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    pointer-events: all;
    position: relative;
}

.logo-container {
    margin-bottom: 2rem;
    position: relative;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    max-width: 500px;
    height: auto;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
    transition: opacity 0.2s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.logo-white {
    opacity: 1;
}

.logo-black {
    opacity: 0;
}

.tagline {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-weight: 300;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
}

.nav-link:hover,
.nav-link:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    outline: none;
}

/* Content sections start after the hero transition completes */
.content-sections {
    position: relative;
    z-index: 5;
    margin-top: 180vh; /* Increased to push content down until transition finishes */
    background: white;
}

.section {
    padding: 5rem 0;
    position: relative;
    background: white;
}

.section:nth-child(even) {
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #2c3e50;
}

h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.portfolio-placeholder:hover {
    transform: translateY(-3px);
}

.portfolio-placeholder h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.portfolio-placeholder p {
    color: #666;
    font-style: italic;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    align-items: start;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #555;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2c3e50;
}

.contact-form button {
    padding: 1rem;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover,
.contact-form button:focus {
    background: #1a252f;
    outline: none;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .nav-link {
        transition: none;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        transform: none;
    }
    
    .service-item,
    .portfolio-placeholder {
        transition: none;
    }
    
    .service-item:hover,
    .portfolio-placeholder:hover {
        transform: none;
    }
    
    .contact-form input,
    .contact-form select,
    .contact-form textarea,
    .contact-form button {
        transition: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tagline {
        font-size: 1.4rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }
    
    .logo {
        max-width: 350px;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 280px;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .service-item,
    .contact-info,
    .contact-form {
        padding: 1.5rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus indicators for better accessibility */
*:focus {
    outline: 2px solid #2c3e50;
    outline-offset: 2px;
}