:root {
    /* Brand Colors - Structural Warmth Palette */
    --primary-color: #F4A261;
    /* Burnt Apiary Gold (Web Safe) */
    --primary-dark: #DDA15E;
    /* Aged Gold */
    --secondary-color: #2F3E46;
    /* Deep Forest Slate (The Structure) */
    --tertiary-color: #5D6D75;
    /* Lighter Slate */

    --bg-light: #EAE4D3;
    /* Raw Linen (The Foundation) */
    --bg-off-white: #FAF3E0;
    /* Unbleached Paper */
    --bg-dark: #1A1A1A;
    /* Deep Charcoal/Near Black */
    --text-dark: #2F3E46;
    /* Deep Forest Slate */
    --text-light: #EAE4D3;
    /* Raw Linen */

    /* Typography */
    --font-heading: 'DM Serif Display', serif;
    /* "Old-world Craftsmanship" */
    --font-body: 'Manrope', sans-serif;
    /* "Industrial/Geometric" */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    color: var(--secondary-color);
}

p {
    margin-bottom: var(--spacing-sm);
    max-width: 65ch;
}

img {
    max-width: 100%;
    display: block;
}

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

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* --- Header & Navigation --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    transition: all var(--transition-smooth);
    background-color: transparent;
    /* Start transparent */
}

.main-header.scrolled {
    background-color: var(--secondary-color);
    /* "Solid Slate" on scroll */
    padding: var(--spacing-xs) 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 80px;
    width: auto;
    /* Hero State: Transparency (Dark overlay) -> filter to White */
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.main-header.scrolled .logo img {
    height: 60px;
    /* Scrolled State: Light Background -> Original SVG Colors (Slate/Gold) */
    filter: none;
}

/* If header is light (scrolled) but logo was white, we keep it white because the header becomes Slate (Dark) */
/* Wait, "Solid Deep Charcoal/Near Black" or "Slate" -> Logo should stay White/Light. */


.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary-color);
    transition: width var(--transition-smooth);
}

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

/* Mobile Menu */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-light);
    transition: all 0.3s;
}

/* --- Buttons: "Structural" --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    /* Geometric sans for UI elements */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-smooth);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Primary: The "CAD Trace" Effect */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
}

/* Secondary: Outline */
.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--text-light);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--secondary-color);
}


/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--text-light);
    text-align: center;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.9), rgba(26, 26, 26, 0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 var(--spacing-sm);
    max-width: 900px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

/* --- Credibility Bar --- */
.credibility-bar {
    background-color: var(--secondary-color);
    padding: var(--spacing-md) 0;
    color: var(--text-light);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-strip {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    opacity: 0.7;
}

/* --- The Hive (Portfolio) --- */
.hive-section {
    padding: var(--spacing-xl) 0;
}

.hive-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-sm);
    /* "Honeycomb" feel - slight stagger handled in larger layout media queries if needed, 
       but standard masonry is robust for "Mosaic" req. */
}

.portfolio-card {
    position: relative;
    aspect-ratio: 4/5;
    /* Taller rectangles */
    overflow: hidden;
    cursor: pointer;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-card:hover img {
    transform: scale(1.05);
}

.portfolio-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-md);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-meta {
    transform: translateY(0);
}


/* --- Vertical Blueprint (Process) --- */
.process-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-off-white);
    position: relative;
    overflow: hidden;
    /* For parallax lines */
}

/* The Beam */
.process-beam {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--tertiary-color);
    transform: translateX(-50%);
    opacity: 0.3;
}

.process-step {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--spacing-xl) 0;
    opacity: 0;
    /* JS will reveal */
}

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

.step-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--bg-light);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    /* Or Hexagon */
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--secondary-color);
}

.step-content {
    width: 40%;
    padding: var(--spacing-md);
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
    /* "Technical" marking */
}

/* --- Mobile First Media Queries --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Add JS toggle logic */
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 80%;
        background: var(--secondary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: flex;
        z-index: 1001;
    }

    .process-beam {
        left: 20px;
    }

    .process-step {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 50px;
    }

    .process-step:nth-child(even) {
        flex-direction: column;
        align-items: flex-start;
    }

    .step-marker {
        left: 20px;
    }

    .step-content {
        width: 100%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    /* Portfolio becomes single column naturally via grid, maybe tighten gaps */
    .portfolio-grid {
        gap: 1rem;
    }
}

/* --- Contact Page Styles --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.contact-info {
    padding: var(--spacing-lg);
    background-color: var(--bg-off-white);
    border-radius: 4px;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    background: transparent;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}