:root {
    /* Brand Guide Palette Proimet - Luxury Minimalist */
    --color-primary-red: #D32F2F;
    --color-steel-blue: #141414; /* Used as Black Accent */
    --color-black: #050505;
    --color-gray-medium: #6E6E73;
    --color-gray-light: #D2D2D7;
    --color-bg-luxury: #F5F5F7; /* Luxury light grey background */
    --color-white: #FFFFFF;
    --color-gold: #B3925A; /* Elegant gold */
    --mobile-gutter: 24px;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg-luxury);
    color: var(--color-black);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
}

p {
    color: var(--color-gray-medium);
}

/* Navbar */
.navbar {
    background: var(--color-bg-luxury);
    padding: 1.5rem 5%;
}

.header-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.logo-container {
    margin-bottom: 0;
}

.logo-img {
    height: 95px; /* Más grande para que se vea bien */
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 3rem;
    justify-content: center;
    text-align: center;
}

.nav-links a {
    color: var(--color-black);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 2px;
    transition: color 0.4s ease, transform 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-gold);
    transform: translateY(-2px);
}

/* Hero Split (3 columns) */
.hero-split {
    display: flex;
    flex-direction: row;
    height: 55vh; /* Altura de banner */
    width: 100%;
}

.hero-img {
    flex: 1;
    background-size: cover;
    background-position: center;
    position: relative;
    border-right: 3px solid var(--color-bg-luxury);
    transition: box-shadow 0.4s ease;
}

.hero-img:last-child {
    border-right: none;
}

.hero-img:hover {
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.6);
    z-index: 10;
}

.hero-img::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.15); /* Minimal overlay */
}

/* Intro Section */
.intro-hero {
    padding: 7rem 6% 5rem;
}

.intro-hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.intro-text-area h1 {
    font-size: 4.8rem;
    color: var(--color-steel-blue);
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    line-height: 1;
}

.intro-text-area h2 {
    font-size: 1.8rem;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-style: italic;
}

.proimet-acronym {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-black);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.intro-text-area p {
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.pilares-cards {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.pilar {
    flex: 1;
    min-width: 180px;
    padding: 1.5rem 1.5rem;
}

.pilar h3 {
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
}

.pilar p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.card-primary {
    background-color: var(--color-steel-blue);
}
.card-primary h3, .card-primary p {
    color: var(--color-white);
}

.card-secondary {
    background-color: var(--color-white);
    border: 1px solid rgba(179, 146, 90, 0.3); /* Subtle gold border */
}
.card-secondary h3 {
    color: var(--color-steel-blue);
}

.card-accent {
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(5, 5, 5, 0.98));
}

.card-accent h3,
.card-accent p {
    color: var(--color-white);
}

.intro-images-area {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 1.5rem;
}

.intro-images-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-fit: cover;
    transition: box-shadow 0.4s ease;
    position: relative;
    z-index: 1;
}

.intro-images-area img:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.img-tall {
    min-height: 350px;
    height: 100%;
}

.img-stack {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
}

/* Values Icons Section */
.values-section {
    padding: 2rem 5% 7rem;
    text-align: center;
}

.values-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.value-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
}

.value-graphic {
    position: relative;
    width: 90px;
    height: 90px;
}

.value-img-mask {
    width: 60px;
    height: 90px;
    background-size: cover;
    background-position: center;
    border-radius: 0 45px 45px 0;
    position: absolute;
    left: 20px;
    z-index: 2;
    filter: grayscale(100%) contrast(1.2);
}

.value-circle {
    width: 80px;
    height: 80px;
    background-color: var(--color-steel-blue);
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 5px;
    z-index: 1;
}

.value-item h3 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-black);
    padding-top: 10px;
}

/* Projects Section */
.projects-section {
    padding: 0;
    width: 100%;
}

.section-heading-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5rem;
}

.section-icon {
    height: 40px;
    margin-bottom: 1rem;
    opacity: 0.9; /* matching elegant flat tone */
}

.section-title {
    font-size: 4rem;
    color: var(--color-steel-blue);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
}

.grid-cell {
    aspect-ratio: 1; /* For squares scaling seamlessly */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12%; /* Escala usando padding porcentual para evitar cortes horizontales de texto */
    box-sizing: border-box;
}

.img-cell {
    padding: 0;
    position: relative;
    z-index: 1;
}

.img-cell:hover {
    z-index: 10;
}

.img-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    transition: box-shadow 0.4s ease;
}

.img-cell:hover img {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.text-cell {
    background-color: var(--color-bg-luxury);
    text-align: center;
    border-right: 1px solid var(--color-gray-light);
    border-bottom: 1px solid var(--color-gray-light);
    align-items: center;
}

/* Responsive font calculation protects against overflow */
.text-cell h3 {
    font-size: calc(1rem + 0.5vw);
    color: var(--color-steel-blue);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.text-cell p {
    font-size: calc(0.75rem + 0.2vw);
    margin-bottom: 0;
    line-height: 1.7;
    max-width: 30ch;
}

/* Feature Sections */
.feature-band {
    padding: 5rem 6%;
    background: linear-gradient(180deg, #EBEBEF 0%, #F5F5F7 100%);
}

.feature-band-alt {
    background: linear-gradient(180deg, #F5F5F7 0%, #EBEBEF 100%);
}

.feature-band,
.systems-section,
.contact-section,
.footer-callout {
    content-visibility: auto;
    contain-intrinsic-size: 900px;
}

.parallax-showcase {
    width: 100%;
    min-height: 52vh;
    background-image: linear-gradient(rgba(10, 17, 24, 0.22), rgba(10, 17, 24, 0.22)), url("parallax.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.feature-band-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.feature-band-inner.reverse {
    grid-template-columns: 0.9fr 1.1fr;
}

.feature-copy h2 {
    color: var(--color-steel-blue);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-copy p {
    max-width: 650px;
    font-size: 1.02rem;
    line-height: 1.85;
    margin-bottom: 1rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.78rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card-grid,
.feature-list,
.systems-grid {
    display: grid;
    gap: 1.5rem;
}

.feature-card-grid {
    grid-template-columns: repeat(2, 1fr);
}

.mini-card,
.feature-list-item,
.system-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-light);
    padding: 2rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.04);
}

.mini-card span,
.feature-list-item h3,
.system-card h3 {
    display: block;
    color: var(--color-steel-blue);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin-bottom: 0.8rem;
}

.mini-card p,
.feature-list-item p,
.system-card p {
    margin-bottom: 0;
    line-height: 1.8;
}

.feature-list {
    grid-template-columns: 1fr;
}

.systems-section {
    padding: 2rem 6% 7rem;
}

.systems-grid {
    max-width: 1280px;
    margin: 0 auto;
    grid-template-columns: repeat(3, 1fr);
}

.section-title-small {
    font-size: 3rem;
    text-align: center;
}

/* Buttons inside projects */
.btn-outline {
    display: inline-block;
    padding: 0.6rem 1.6rem;
    color: var(--color-steel-blue);
    border: 1px solid var(--color-steel-blue);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    border-radius: 50px; /* Pill layout as in screenshot */
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--color-steel-blue);
    color: var(--color-white);
}

.btn-solid {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: var(--color-steel-blue);
    color: var(--color-white);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: 0; /* Luxury brands avoid pills, use sharp elegant edges */
    cursor: pointer;
    transition: background-color 0.4s ease, transform 0.3s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-solid:hover {
    background-color: var(--color-gold);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(179, 146, 90, 0.3);
}

/* Footer Callout */
.footer-callout {
    background-color: var(--color-steel-blue);
    padding: 6rem 10%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer-callout-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.footer-callout-content p {
    color: var(--color-white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.footer-callout-content strong {
    font-family: var(--font-heading);
    font-weight: 600;
}

.footer-callout::before {
    /* Large Abstract D */
    content: '';
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 35vw;
    height: 35vw;
    border: 4vw solid rgba(255,255,255,0.04);
    border-radius: 0 40vw 40vw 0;
    pointer-events: none;
    z-index: 1;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.3s; }
.stagger-3 { transition-delay: 0.5s; }

/* Contact Split Section */
.contact-split-section {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.contact-image-area {
    width: 50%;
    flex: 1;
}

.contact-image-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contact-section {
    width: 50%;
    flex: 1;
    padding: 7rem 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--color-bg-luxury);
}

.contact-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.contact-logo {
    height: 110px; /* Logo más grande antes de Contact Us */
    margin-bottom: 1.5rem;
}

.contact-header h2 {
    font-family: var(--font-body); /* Montserrat in this section per image */
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-black);
}

.contact-header p {
    max-width: 620px;
    margin: 1rem auto 0;
    font-size: 1rem;
}

.contact-form {
    width: 100%;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1.2rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-gray-light);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    resize: vertical;
    transition: border-bottom 0.3s;
}

.contact-form input::placeholder, .contact-form textarea::placeholder {
    color: var(--color-gray-medium);
    font-weight: 300;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-bottom: 1px solid var(--color-steel-blue);
}

/* Footer Element */
footer {
    background-color: var(--color-steel-blue);
    padding: 3rem 5%;
    text-align: center;
    color: var(--color-white);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.footer-bottom p {
    color: var(--color-white);
    opacity: 0.9;
    font-size: 0.85rem;
}

.developed {
    font-size: 0.75rem;
    font-weight: 300;
}

.socials a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: var(--color-white);
    color: var(--color-steel-blue);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.socials a:hover {
    transform: translateY(-3px);
}

/* General Media Queries */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .intro-hero-content {
        grid-template-columns: 1fr;
    }
    .feature-band-inner,
    .feature-band-inner.reverse,
    .systems-grid {
        grid-template-columns: 1fr;
    }
    .intro-hero { padding-top: 5rem; }
    .hero-split { height: 40vh; }
    .feature-card-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar { padding: 1rem var(--mobile-gutter); }
    .logo-img { height: 65px; }
    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    .logo-container {
        margin-bottom: 0;
    }
    .intro-hero-content,
    .feature-band-inner,
    .systems-grid,
    .footer-callout-content,
    .contact-header,
    .footer-bottom {
        width: 100%;
    }
    .nav-links { gap: 0.4rem 0.6rem; flex-wrap: wrap; justify-content: flex-end; text-align: right; max-width: 55%; }
    .nav-links a { font-size: 0.6rem; letter-spacing: 1px; }
    .hero-split { 
        flex-direction: row; 
        height: 60vh; 
        min-height: auto; 
        overflow-x: auto; 
        scroll-snap-type: x mandatory; 
        scrollbar-width: none; 
        -ms-overflow-style: none; 
    }
    .hero-split::-webkit-scrollbar { display: none; }
    .hero-img { 
        flex: 0 0 100vw; 
        height: 100%; 
        min-height: auto;
        border: none; 
        scroll-snap-align: start; 
    }
    
    .intro-hero { padding: 3rem var(--mobile-gutter) 2.5rem; }
    .intro-text-area h1 { font-size: 2rem; letter-spacing: 1px; line-height: 1.1; margin-bottom: 0.5rem; }
    .proimet-acronym { font-size: 0.75rem; letter-spacing: 1px; margin-bottom: 1.5rem; line-height: 1.5; }
    .intro-text-area h2 { font-size: 1.25rem; margin-bottom: 1rem; }
    .intro-text-area p { margin-bottom: 2rem; font-size: 0.95rem; }
    
    .pilares-cards { flex-direction: column; }
    .pilar { padding: 2rem 1.5rem; }
    
    .intro-images-area { grid-template-columns: 1fr; gap: 1rem; }
    .img-tall { min-height: 350px; }
    .img-stack { gap: 1rem; }
    
    .section-heading-centered { margin-bottom: 2.75rem; }
    .section-title { font-size: 2.3rem; text-align: center; line-height: 1.1; }
    
    .projects-grid {
        display: flex;
        flex-direction: column;
    }
    
    .grid-cell { aspect-ratio: auto; min-height: auto; padding: 2.5rem var(--mobile-gutter); }
    .img-cell { padding: 0; min-height: 240px; }
    
    /* Reorder text and image cells so mobile always shows Image -> Text */
    .grid-cell:nth-child(5) { order: 6; } /* Fila 2: Fase 3 text -> Goes after image */
    .grid-cell:nth-child(6) { order: 5; } /* Fila 2: pro3 img -> Goes before text */
    .grid-cell:nth-child(7) { order: 8; } /* Fila 2: Fase 4 text -> Goes after image */
    .grid-cell:nth-child(8) { order: 7; } /* Fila 2: pro4 img -> Goes before text */

    .text-cell h3 { font-size: 1.45rem; margin-bottom: 0.85rem; }
    .text-cell p { font-size: 0.96rem; line-height: 1.75; max-width: 32ch; }

    .feature-band { padding: 4rem var(--mobile-gutter); }
    .parallax-showcase {
        min-height: 28vh;
        background-attachment: scroll;
    }
    .feature-copy h2 { font-size: 2.3rem; }
    .feature-card-grid,
    .systems-grid {
        grid-template-columns: 1fr;
    }
    .section-title-small { font-size: 2.3rem; }
    .mini-card,
    .feature-list-item,
    .system-card { padding: 1.5rem; }
    
    .systems-section { padding: 1rem var(--mobile-gutter) 4rem; }
    .contact-split-section { flex-direction: column; }
    .contact-image-area, .contact-section { width: 100%; }
    .contact-image-area { height: 350px; } /* Slightly more compact on mobile */
    .contact-section { padding: 4rem var(--mobile-gutter); }
    .contact-logo { height: 85px; }
    .footer-callout { padding: 4rem var(--mobile-gutter); }
    footer { padding: 2.5rem var(--mobile-gutter); }
}
