/* 
   Corporate Premium Design System (WOO Inspired)
   Colors: Cream, Charcoal, Muted Red
   Typography: Outfit (Sans-Serif)
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

:root {
    /* Color Palette (SIE Manual) */
    --bg-primary: #F5F3F0; /* Keeping a light background for readability */
    --bg-secondary: #E8E4DF;
    --text-primary: #1D1D1B; /* Color 02 */
    --text-secondary: #4A4A4A;
    --accent: #96262C; /* Color 01 (Institucional) */
    --accent-hover: #7A1E23;
    --color-grey: #968C90; /* Color 03 */
    --color-steel: #415364; /* Color 04 */
    --white: #FFFFFF;
    --border: rgba(29, 29, 27, 0.1);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 12px;
    --radius-lg: 24px;
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 8vw, 6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }

p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 60ch;
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section-padding {
    padding: var(--space-lg) 0;
}

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

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(245, 243, 240, 0.9); /* var(--bg-primary) with transparency */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    margin-right: auto; /* This ensures the logo stays on the left */
}

.logo img {
    height: 45px;
    display: block;
}

.footer-logo-img {
    height: 60px;
    margin-bottom: 1.5rem;
    display: block;
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    list-style: none;
    margin: 0 var(--space-md);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    transition: var(--transition);
    opacity: 0.7;
}

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

.btn-contact {
    background: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.btn-contact:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

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

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background-color: #000;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 1000px;
    padding: 0 var(--space-md);
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    animation: fadeInUp 1s var(--transition) forwards;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    opacity: 0;
    animation: fadeInUp 1s var(--transition) 0.2s forwards;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Bento Grid --- */
.section-title {
    padding: var(--space-xl) 0 var(--space-lg);
}

.section-title h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: var(--space-xs);
}

.section-title p {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-header {
    margin-bottom: var(--space-lg);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(380px, auto);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.bento-item {
    position: relative;
    padding: var(--space-md);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: var(--accent);
    color: var(--white);
    text-align: center;
}

.bento-icon {
    width: 160px;
    height: 160px;
    margin-bottom: auto; /* Pushes the icon to the top if flex-end is used, or just gives it space */
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Makes the icon white to match the text */
}

.bento-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft);
}

.bento-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    z-index: 2;
    color: var(--white);
}

.bento-item p {
    font-size: 0.9375rem;
    opacity: 0.9;
    z-index: 2;
    color: rgba(255, 255, 255, 0.9);
}

.bento-item.large {
    grid-column: span 2;
}

/* Portafolio Section */
.proyectos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.proyecto-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.proyecto-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.proyecto-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.proyecto-item:hover img {
    transform: scale(1.05);
}

/* Nosotros Section */
.nosotros-section {
    background-color: var(--surface);
}

.text-center {
    text-align: center;
}

.text-center p {
    margin-left: auto;
    margin-right: auto;
}

.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    align-items: center;
}

.nosotros-content {
    /* Removed centering to align left within grid */
}

.nosotros-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    max-width: none;
}

.distingue-title {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.distingue-list {
    list-style: none;
    padding-left: 0;
}

.distingue-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.distingue-list li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1.1;
}

.nosotros-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 900px) {
    .nosotros-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* Footer */
footer {
    background-color: var(--white);
    padding: var(--space-xl) 0 var(--space-md);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-info p {
    font-size: 1rem;
    max-width: 30ch;
}

.footer-links h4 {
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--color-grey);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* --- Mobile Responsiveness --- */
.desktop-only {
    display: inline-block;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 10px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--space-lg);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: var(--transition);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }
    
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content {
        padding-top: var(--space-xl);
    }
    
    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }
    
    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        text-align: center;
    }
    
    .footer-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}
