@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500&display=swap');

:root {
    /* Colors */
    --bg-primary: #fcfcfc;
    --bg-secondary: #f4f4f4;
    --text-primary: #121212;
    --text-secondary: #666666;
    --accent: #000;
    --border: rgba(0, 0, 0, 0.08);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.75);
    
    /* Spacing */
    --section-padding: 10rem 5%;
    --container-width: 1400px;
    
    /* Shadows */
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.04);
    --shadow-elevated: 0 20px 50px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-smooth: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}


h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}


/* --- Layout Utils --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding);
}

.flex { display: flex; }
.grid { display: grid; }

/* --- Components --- */

/* Top Bar */
.top-bar {
    width: 100%;
    height: 40px;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    z-index: 1001;
    position: relative;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.top-bar .social-icons {
    display: flex;
    gap: 1.5rem;
}

.top-bar .social-icons a {
    color: #fff;
    opacity: 0.6;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

.top-bar .social-icons a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* Navbar */
nav {
    position: fixed;
    top: 3.5rem;
    left: 5%;
    right: 5%;
    width: 90%;
    height: 72px;
    max-height: 72px;
    padding-left: 1rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 100px;
    box-shadow: 
        var(--shadow-soft),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    will-change: width, height, top, left, right;
}

.logo-wrap {
    flex: 1;
    display: flex;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    letter-spacing: 0.1em;
}


.nav-links {
    display: flex;
    align-items: center;
    justify-items: center;
    gap: 2.5rem;
}



.nav-links a {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.materials-wrapper {
    align-items: center;
    gap: 5rem;
}

.materials-text {
    flex: 1;
}

.materials-image-container {
    flex: 1.2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.materials-image-container img {
    width: 100%;
    border-radius: 24px;
    height: 300px;
    object-fit: cover;
}

.materials-image-container img:last-child {
    margin-top: 3rem;
}

.close-menu {

    display: none;
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.close-menu:hover {
    opacity: 1;
}


/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.8rem;
    z-index: 1001;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.logo img {
    height: 48px;
    width: 48px;
    object-fit: contain;
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-secondary);
}

/* Hero */
.hero {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 5% 5rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 10;
    width: 100%;
}

.hero h1 {
    font-size: clamp(3.5rem, 10vw, 8.5rem);
    line-height: 0.85;
    letter-spacing: -0.05em;
    margin-bottom: 2.5rem;
    font-weight: 800;
}

.hero-floating-card p {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Expertise Parallax */
.expertise-parallax {
    padding-bottom: 0;
}

/* Immersive Parallax Sections */
.parallax-fullscreen {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border);
}

.parallax-fullscreen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(75deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

.parallax-fullscreen::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.08;
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.parallax-fullscreen.alt-align {
    justify-content: flex-end;
    padding-right: 10%;
}

.parallax-fullscreen.alt-align::before {
    background: radial-gradient(circle at center, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
}

.parallax-content-immersive {
    position: relative;
    z-index: 10;
    color: #fff;
    max-width: 800px;
    padding: 4rem;
}

.tagline {
    font-family: 'Outfit';
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: #fff;
    opacity: 0.6;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.parallax-content-immersive h2 {
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 0.85;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    font-weight: 800;
}

.parallax-content-immersive p {
    font-size: 1.25rem;
    margin-bottom: 3.5rem;
    opacity: 0.8;
    max-width: 480px;
    font-weight: 300;
}

.parallax-cta-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5rem;
    border-radius: 60px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
    margin-right: 5%;
}

@media (max-width: 768px) {
    .parallax-fullscreen {
        height: auto;
        min-height: 100vh;
        background-attachment: scroll; /* Fixed bg is buggy on mobile */
        padding: 6rem 5%;
    }
    
    .parallax-fullscreen.alt-align {
        justify-content: center;
        padding-right: 5%;
    }

    .parallax-content-immersive {
        padding: 2rem 0;
        text-align: center;
    }

    .parallax-content-immersive p {
        margin-inline: auto;
    }

    .parallax-cta-group {
        justify-content: center;
    }

    .glass-card {
        padding: 3rem 2rem;
        border-radius: 40px;
        margin-right: 0;
    }
}

/* Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .parallax-item {
        height: 60vh;
    }
    .parallax-content h3 {
        font-size: 2.2rem;
    }
    .parallax-content p {
        font-size: 1rem;
    }
    .parallax-content {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sticky Showcase */
.showcase {
    position: relative;
}

.showcase-row {
    display: flex;
    gap: 4rem;
    margin-bottom: 10rem;
    align-items: center;
}

.showcase-row:nth-child(even) {
    flex-direction: row-reverse;
}

.showcase-text {
    flex: 1;
}

.showcase-text h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.showcase-image {
    flex: 1.2;
    height: 600px;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Stats */
.stats {
    background: var(--text-primary);
    color: #fff;
    border-radius: 60px;
    padding: 6rem 5%;
    margin: 4rem 2rem;
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-item h3 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.stat-item p {
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
}

/* Engineering Workflow */
.workflow-step {
    padding: 2rem;
    position: relative;
}

.step-num {
    display: block;
    font-family: 'Outfit';
    font-size: 3rem;
    font-weight: 700;
    opacity: 0.1;
    margin-bottom: -1.5rem;
}

.workflow-step h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

/* Material List */
.material-list {
    list-style: none;
}

.material-list li {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.material-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

/* Gallery Expanded */
.gallery-card {
    height: 400px;
    position: relative;
    cursor: pointer;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 3rem;
    opacity: 0;
    transition: var(--transition-smooth);
}

.gallery-card:hover img {
    transform: scale(1.1);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    color: #fff;
    font-size: 1.5rem;
}

/* Footer */
footer {
    padding: 6rem 5% 2rem;
    background: #fff;
    border-top: 1px solid var(--border);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col a {
    display: block;
    margin-bottom: 0.8rem;
    opacity: 0.6;
}

.footer-col a:hover {
    opacity: 1;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Mobile Responsive Refinement */
@media (max-width: 1024px) {
    :root {
        --h1-size: 2.8rem;
        --h2-size: 2rem;
    }

    nav {
        width: 95%;
        left: 2.5%;
        right: 2.5%;
        top: 3rem;
    }

    .top-bar {
        height: auto;
        padding: 0.5rem 0;
    }

    .top-bar-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .hero {
        padding: 80px 5% 4rem;
        min-height: 100dvh;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: #fff;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .showcase-row, .showcase-row:nth-child(even) {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        margin-bottom: 6rem;
    }

    .showcase-text h2 {
        font-size: 2.4rem;
    }

    .showcase-image {
        height: 400px;
        width: 100%;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }

    .menu-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        background: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: -20px 0 60px rgba(0,0,0,0.1);
        z-index: 999;
    }
    .nav-links.active { right: 0; }
    .close-menu { display: block; }
    .nav-links a { color: var(--text-primary); font-size: 1.2rem; }
    .btn-primary.desktop-only { display: none; }
}

@media (max-width: 600px) {
    :root {
        --h1-size: 2.2rem;
        --h2-size: 1.8rem;
    }

    .hero {
        padding-top: 80px;
    }

    .hero-content h1 {
        font-size: var(--h1-size);
    }

    .stats {
        flex-direction: column;
        gap: 3rem;
        margin: 4rem 1rem;
        padding: 4rem 5%;
    }

    .stat-item h3 {
        font-size: 3rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .hero-content .flex {
        flex-direction: column;
    }

    /* Materials Overlapping Layout */
    .materials .flex {
        flex-direction: column;
        gap: 3rem;
    }

    .materials .flex > div {
        width: 100%;
    }

    .materials-image-container {
        display: block !important;
        position: relative;
        height: 480px;
        margin-top: 16rem;
        padding-bottom: 2rem;
    }

    .materials-image-container img:first-child {
        width: 85% !important;
        height: 380px !important;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
        border-radius: 32px;
        transform: rotate(-2deg);
        box-shadow: var(--shadow-elevated);
    }

    .materials-image-container img:last-child {
        width: 75% !important;
        height: 320px !important;
        position: absolute;
        bottom: 0;
        right: 0;
        z-index: 2;
        border-radius: 32px;
        transform: rotate(3deg) translateY(20px);
        box-shadow: var(--shadow-elevated);
        margin-top: 0 !important;
        border: 8px solid #fff;
    }

    .btn {
        width: 100%;
    }
}


/* --- Marquee Section --- */
.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1rem 0;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-content {
    display: flex;
    gap: 6rem;
    width: max-content;
    will-change: transform;
}

.marquee-item {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    opacity: 0.25;
    transition: var(--transition-smooth);
    user-select: none;
}

.marquee-item:hover {
    opacity: 0.8;
    color: var(--accent);
    transform: scale(1.05);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .marquee-item {
        font-size: 1.5rem;
        gap: 3rem;
    }
    .marquee-content {
        gap: 3.5rem;
        animation-duration: 25s;
    }
}

/* --- Internal Page & Animation Fixes --- */
.stagger-reveal > * {
    opacity: 0;
    transform: translateY(30px);
}

.stagger-reveal.visible > * {
    animation: staggerReveal 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.stagger-reveal.visible > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-reveal.visible > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-reveal.visible > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-reveal.visible > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-reveal.visible > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes staggerReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix for fixed header overlap on internal pages */
.about-page, .services-page, .contact-page, .portfolio-page, .get-quote-page {
    padding-top: 100px;
}

@media (max-width: 768px) {
    .about-page, .services-page, .contact-page, .portfolio-page, .get-quote-page {
        padding-top: 80px;
    }
}

/* Premium Image Hover Effects */
.group:hover img {
    transform: scale(1.05);
}

.group img {
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Service Card Refinement */
.services-page .group {
    background: #000; /* Dark base for better image blend */
}

.services-page .group img {
    opacity: 0.7;
    transition: all 1s ease;
}

.services-page .group:hover img {
    opacity: 1;
    transform: scale(1.1);
}

/* Smooth Scroll for the whole page */
html {
    scroll-behavior: smooth;
}

/* Form Styling Refinement */
input:focus, textarea:focus, select:focus {
    border-color: var(--accent) !important;
    background: #fff !important;
}

/* Mobile Touch Fixes */
@media (max-width: 1024px) {
    /* Services Page detail visibility */
    .services-page .group .translate-y-4 {
        transform: translateY(0);
    }
    
    .services-page .group .opacity-0 {
        opacity: 1;
    }
    
    .services-page .group img {
        opacity: 0.9;
    }

    /* Portfolio Page detail visibility */
    .portfolio-page .group .opacity-0 {
        opacity: 1;
    }
    
    .portfolio-page .group .translate-y-8 {
        transform: translateY(0);
    }
    
    .portfolio-page .group .absolute.inset-0.bg-black\/40 {
        background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    }
}

/* Section Header Refinement */
.section-header {
    margin-bottom: 5rem;
    max-width: 700px;
}

.section-header h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

/* Custom Scrollbar for Premium Feel */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #000;
}


