/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

:root {
    --primary-color: #ffffff;
    --text-color: #ffffff;
    --accent-color: #3b82f6;
    /* A nice accessible blue */
    --overlay-color: rgba(0, 0, 0, 0.6);
    --transition-speed: 0.3s;
}

body,
html {
    height: 100%;
    margin: 0;
    overflow-y: hidden;
    /* Hide scrollbar for snapping container, but allow container to scroll */
}

/* Scroll Snap Container */
.container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Sections */
.fullscreen-section {
    height: 100vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    scroll-snap-align: start;
    text-align: center;
    color: var(--text-color);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-color);
    z-index: 1;
}

.content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.home-logo {
    display: block;
    max-width: 234px;
    width: 100%;
    height: auto;
    margin: 0 auto 1.5rem auto;
    filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.5));
}

/* Background Images */
#home {
    background-image: none;
    background-color: #000;
}

#home.home-webgl-fallback {
    background-image: url('Assets/bg.jpg');
}

#services {
    background-image: url('Assets/OurServices.jpg');
}

#why-us {
    background-image: url('Assets/GetinTouch.png');
}

#portfolio {
    background-image: url('Assets/OurPortafolio.jpg');
}

#contact {
    background-image: url('Assets/GetInTouch.png');
}

/* Typography */
h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -1px;
}

h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

p {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
    transition: all var(--transition-speed) ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background-color: #d84748;
    border-color: #d84748;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(216, 71, 72, 0.35);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-logo {
    height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Burger Menu (Hidden on Desktop) */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-links {
        position: absolute;
        right: 0px;
        height: 100vh;
        top: 0;
        background-color: rgba(0, 0, 0, 0.95);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .nav-links li {
        margin: 2rem 0;
    }

    .burger {
        display: block;
        z-index: 101;
    }

    .burger.toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .burger.toggle .line2 {
        opacity: 0;
    }

    .burger.toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* 3D Model Viewer */
#model-container {
    width: 380px;
    height: 320px;
    margin: 0.5rem auto 1.5rem auto;
    position: relative;
    z-index: 2;
}

#model-container canvas {
    border-radius: 16px;
    cursor: grab;
}

#model-container canvas:active {
    cursor: grabbing;
}

/* Why Us Section */
.why-us-section {
    height: auto;
    min-height: 100vh;
    padding: 7rem 0 4rem;
}

.why-us-section .content {
    width: min(1100px, 92vw);
    max-width: 1100px;
}

.why-us-intro {
    max-width: 840px;
    margin: 0 auto 2rem;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 1rem;
    text-align: left;
    margin-bottom: 2.2rem;
}

.why-us-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 1.2rem;
    backdrop-filter: blur(4px);
}

.why-us-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.why-us-item p {
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.55;
}

@media screen and (max-width: 768px) {
    .why-us-section {
        padding: 6rem 0 3.5rem;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
    }
}

/* Home Hero Parallax (scoped) */
#home {
    position: relative;
    overflow: hidden;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 10vh;
}

#home-model-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

#home-model-canvas canvas {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

#home .overlay {
    background: transparent;
    z-index: 2;
}

#home .content {
    z-index: 3;
}

#home .home-parallax-layer {
    will-change: transform;
}

.home-orientation-permission-btn {
    margin-top: 0.85rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    z-index: 4;
}

.home-orientation-permission-btn:hover {
    background: rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce), screen and (max-width: 767px) {
    #home .home-parallax-layer {
        will-change: auto;
        transform: none !important;
    }
}
