/* =========================================
   VARIABLES & GLOBALS - MODO BRUTALISTA / MUTIS
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;600;900&display=swap');

:root {
    /* Colors - Pure B&W */
    --bg-dark: #000000;
    --bg-light: #ffffff;
    
    --text-light: #ffffff;
    --text-dark: #000000;
    --text-muted: #aaaaaa;
    
    --accent: #ffffff;
    --accent-inverted: #000000;
    
    /* Grosso Colors - Gradient */
    --color-violet: #8B00FF;
    --color-magenta: #FF00FF;
    --color-cyan: #00F0FF;
    
    /* Layout */
    --container-w: 1300px;
    --section-pad: 8rem 2rem;
    --section-pad-sm: 4rem 2rem;
    
    /* Animations & Shadows */
    --transition-fast: 0.15s ease-out;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Brutalist Borders */
    --border-thick: 3px solid #000000;
    --border-light: 3px solid #ffffff;
    
    /* Typography */
    --font-heading: 'Anton', sans-serif;
    --font-body: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background: var(--bg-dark);
}

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

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

/* =========================================
   TYPOGRAPHY
========================================= */
h1, h2, h3, h4, .logo-text, .badge {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 1px;
}

h1 { font-size: clamp(4rem, 10vw, 9rem); line-height: 0.9; margin-bottom: 2rem; }
h2 { font-size: clamp(3rem, 7vw, 6rem); line-height: 0.95; margin-bottom: 2rem; }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); margin-bottom: 0.5rem; }
h4 { font-size: 1.5rem; margin-bottom: 0.5rem; }

p { font-size: 1.1rem; }
.lead-text { font-size: 1.5rem; font-weight: 600; color: inherit; max-width: 800px; }

/* Brutalist Text Stroke Effect - Black text with white outline */
.text-outline {
    color: var(--text-dark);
    background-color: transparent;
    -webkit-text-stroke: 2px var(--text-light);
}

.text-accent { color: var(--accent); }
.text-white { color: #fff; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* Spacing Utils */
.mt { margin-top: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-3 { margin-bottom: 3rem; }

/* =========================================
   LAYOUT UTILS
========================================= */
.container {
    max-width: var(--container-w);
    margin: 0 auto;
    width: 100%;
}

.section { padding: var(--section-pad); }
.padding-sm { padding: var(--section-pad-sm); }
.dark-bg, .light-bg { 
    /* Gradient background with Violet, Magenta and Cyan */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(139, 0, 255, 0.4), rgba(255, 0, 255, 0.35), rgba(0, 240, 255, 0.3), rgba(0, 0, 0, 0.4));
    color: var(--text-light); 
}

.grid { display: grid; gap: 3rem; }
.two-cols { grid-template-columns: 1fr 1fr; }
.align-center { align-items: center; }

/* =========================================
   BRUTALIST BADGE & COMPONENTS
========================================= */
.badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: var(--border-light);
    color: var(--text-light);
    background: transparent;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    transition: var(--transition-fast);
}

/* =========================================
   BRUTALIST BUTTONS
========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    text-transform: uppercase;
    text-decoration: none;
    border: var(--border-light);
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: var(--border-light);
}

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

.btn-outline {
    background: transparent;
    color: var(--text-light);
}

.btn-outline:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-lg {
    padding: 1.5rem 4rem;
    font-size: 2rem;
}

/* =========================================
   NAVBAR
========================================= */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 1.5rem 2rem;
    z-index: 1000;
    transition: var(--transition-fast);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(139, 0, 255, 0.4), rgba(255, 0, 255, 0.35), rgba(0, 240, 255, 0.3), rgba(0, 0, 0, 0.4));
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

header.scrolled {
    padding: 1rem 2rem;
    border-bottom: var(--border-light);
}

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

.logo {
    display: flex;
    flex-direction: column;
    line-height: 0.9;
}

.logo-gross, .logo-agencia {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-light);
}

/* =========================================
   HERO
========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 150px 2rem 4rem;
    position: relative;
    background: var(--bg-dark);
    border-bottom: var(--border-light);
}

.hero-video-bg {
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    opacity: 0.3;
    background-image: url('../img/portada.jpeg');
    background-size: cover;
    background-position: center;
    z-index: 0;
    /* User wants color images now, removing grayscale if any */
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.hero h1 span.text-outline {
    display: block;
}

.hero-actions {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.hero .logo {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    z-index: 10;
}

.contact-top {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    z-index: 10;
}

/* =========================================
   CASOS DE ÉXITO (CARDS)
========================================= */
.cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-top: 4rem;
    gap: 0; /* No gaps, images stuck together */
    border: var(--border-light); /* Outer border */
}

.product-card {
    position: relative;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    height: 400px;
    border-right: var(--border-light);
    border-bottom: var(--border-light);
}
/* Subdue the last border on a row maybe, but keeping it simple */

.card-img {
    flex: 1; /* Take up all space except ribbon */
    background-size: cover;
    background-position: center;
    /* Images in color */
    z-index: 1;
    position: relative;
}

.img-overlay {
    display: none; /* Removing overlay so color is pure */
}

/* Base Ribbon: Black with white text and a white top border */
.card-content {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 1.5rem;
    border-top: var(--border-light);
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-content h3 { font-size: 2rem; line-height: 1; margin-bottom: 0.2rem; }
.card-content p { font-family: var(--font-body); font-weight: 600; font-size: 1rem; text-transform: uppercase; color: inherit; }

/* Alternating Ribbon for evens: White with black text */
.product-card:nth-child(even) .card-content {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* =========================================
   PROPUESTA DE VALOR
========================================= */
.value-list { display: grid; gap: 2rem; margin-top: 3rem; }
.value-list li {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    border-top: var(--border-light);
    padding-top: 1.5rem;
}

.value-list i {
    font-size: 2.5rem;
    color: var(--text-light);
}

.value-list strong {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.value-list p { color: var(--text-light); }

.image-wrapper {
    position: relative;
    border: var(--border-light);
    overflow: hidden;
    aspect-ratio: 4/5;
    background: #ccc;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background-image: url('../img/portada piramides.png');
    background-size: cover;
    background-position: center;
    transition: 0.5s ease;
}
.image-placeholder:hover { transform: scale(1.05); }

/* =========================================
   TIMELINE (PROCESO)
========================================= */
.timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.timeline-step {
    border-top: var(--border-light);
    padding-top: 1.5rem;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--text-dark); /* Black text... */
    -webkit-text-stroke: 2px var(--text-light); /* ...with white outline */
    line-height: 1;
    margin-bottom: 1rem;
}

/* =========================================
   DIFERENCIAL & CONTEXTO
========================================= */
.banner-diferencial {
    border-top: var(--border-light);
    border-bottom: var(--border-light);
}

.diff-pillars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    text-align: left;
}

.pillar {
    border-left: var(--border-light);
    padding-left: 1.5rem;
}

.context-box {
    border: var(--border-light);
    padding: 4rem;
    background: transparent;
}
.context-box i { font-size: 3rem; margin-bottom: 1rem; }

/* =========================================
   CLIENTES (LOGOS)
========================================= */
.logos-container {
    overflow: hidden;
    padding: 3rem 0;
    position: relative;
    width: 100%;
    margin-top: 2rem;
}

/* Shadow effect on edges */
.logos-container::before,
.logos-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.logos-container::before {
    left: 0;
    background: linear-gradient(to right, #050505, transparent);
}

.logos-container::after {
    right: 0;
    background: linear-gradient(to left, #050505, transparent);
}

.logos-track {
    display: flex;
    width: calc(250px * 12); /* Based on (logo width + gap) * total logos (original + duplicate) */
    animation: scroll 40s linear infinite;
    gap: 6rem;
    align-items: center;
}

.logos-track img {
    height: 80px; /* Increased size */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    opacity: 1; /* Full opacity for color logos */
}

.logos-track img:hover {
    transform: scale(1.1);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-250px * 6)); } /* Move by half the total width */
}

/* =========================================
   FOOTER
========================================= */
.footer {
    border-top: var(--border-light);
    padding: 3rem 2rem;
    background: var(--bg-dark);
    color: var(--bg-light);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-contact-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-contact-info a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 2px solid var(--text-light);
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-contact-info a:hover {
    background: var(--text-light);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

/* =========================================
   ANIMATIONS (SCROLL)
========================================= */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* =========================================
   CASOS DEL ÉXITO - NEW GRID
========================================= */
.cases-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 4rem;
    gap: 2rem;
}

.case-card {
    position: relative;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    height: auto;
    cursor: pointer;
    border: var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 0, 255, 0.3);
}

.case-img {
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    z-index: 1;
    position: relative;
    cursor: pointer;
}

.case-img:hover {
    opacity: 0.9;
}

.case-content {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 2rem 1.5rem;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    border-top: var(--border-light);
}

.case-content h3 {
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.case-content p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.95rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* =========================================
   IMAGE GALLERY MODAL
========================================= */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 2rem;
}

.image-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 80%;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zoomIn 0.3s ease;
    background: transparent;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border: 3px solid white;
}

.modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 3rem;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s ease;
    padding: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    transform: scale(1.2);
    color: var(--color-cyan);
}

/* Gallery Navigation Arrows */
.gallery-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: var(--text-light);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 1rem;
    transition: all 0.2s ease;
    z-index: 9999;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 2rem;
}

.gallery-nav.next {
    right: 2rem;
}

.gallery-counter {
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-light);
    font-size: 1.2rem;
    background: transparent;
    padding: 0.5rem 1.5rem;
    border: none;
    z-index: 9999;
}

/* =========================================
   MEDIA QUERIES
========================================= */
@media (max-width: 900px) {
    .two-cols, .timeline, .diff-pillars { grid-template-columns: 1fr; }
    .timeline-step, .pillar { border-top: var(--border-light); border-left: none; padding-top: 1.5rem; padding-left: 0; }
    h1 { font-size: 4rem; }
    h2 { font-size: 3rem; }
    .btn { width: 100%; text-align: center; }
}
@media (max-width: 768px) {

    .hero {
        padding: 100px 1.5rem 3rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        text-align: center;
    }

    .hero .logo {
        position: static;
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 10px;
    }

    .logo img {
        height: 65px !important;
    }

    .contact-top {
        position: static;
        display: inline-block;
        margin: 10px auto 20px auto;
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .hero-content {
        width: 100%;
        margin-top: 10px;
    }

    h1 {
        font-size: 2.8rem;
        line-height: 1;
    }

    .hero-actions {
        margin-top: 2rem;
        width: 100%;
    }

    .btn {
        width: 100%;
        font-size: 1rem;
        padding: 0.9rem 1.2rem;
    }
}