/* Core Reset & Variables */
:root {
    --color-bg: #FFFFFF;
    --color-bg-light: #F4F4F4;
    --color-text: #333333;
    --color-primary: #D4AF37; /* Mustard Gold */
    --color-secondary: #434c5e; /* Dark Grey */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Raleway', sans-serif;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
    /* Firefox Support */
    scrollbar-color: var(--color-primary) #1a1a17;
    scrollbar-width: thin;
}

/* Chrome, Edge, Safari Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: #1a1a17;
}

::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 50px;
    border: 2px solid #1a1a17; /* Adds elegant internal padding */
    transition: background-color var(--transition-speed) ease;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #bfa025;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: 50px;
    text-transform: uppercase;
}

/* Header Navbar */
.navbar {
    position: sticky;
    top: 0;
    background-color: var(--color-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    height: 48px;
    width: auto;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1.1;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.logo-subtitle {
    font-size: 0.75rem;
    letter-spacing: 2.5px;
    color: var(--color-secondary);
    font-family: var(--font-body);
    font-weight: 600;
    margin-top: 2px;
}

.logo-new { color: var(--color-primary); }
.logo-openbox { color: var(--color-secondary); }

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--color-secondary);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--color-primary);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #1a1a17;
    color: #fff;
    padding: 0 20px;
    z-index: 1; /* Establishes stacking context so negative child z-index doesn't fall behind <body> */
    
    /* New SVG Blueprint Parallax */
    background-image: url('../images/gallery/blueprint_bg.svg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.3); /* Lighter overlay for SVG crispness */
    z-index: -1;
}

/* =========================================
   Premium Entrance Animation 
   ========================================= */
@keyframes premiumFadeUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 2px;
    opacity: 0;
    animation: premiumFadeUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0; 
    animation: premiumFadeUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    animation-delay: 0.3s;
}

.hero-buttons {
    opacity: 0; 
    animation: premiumFadeUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    animation-delay: 0.6s;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 3px;
    font-size: 0.75rem;
    z-index: 10;
    opacity: 0;
    animation: premiumFadeUp 1.2s ease forwards 1s; /* Retrasado para dar tiempo a leer */
}

.scroll-indicator:hover {
    color: var(--color-primary);
}

.scroll-text {
    margin-bottom: 10px;
    opacity: 0.7;
    transition: opacity var(--transition-speed);
}

.scroll-indicator:hover .scroll-text {
    opacity: 1;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    width: 100%;
    height: 15px;
    background-color: var(--color-primary);
    position: absolute;
    top: -15px;
    left: 0;
    animation: scrollDrop 1.8s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollDrop {
    0% { top: -15px; opacity: 1; }
    50% { top: 50px; opacity: 1; }
    50.1% { opacity: 0; }
    100% { top: 50px; opacity: 0; }
}


.btn {
    display: inline-block;
    padding: 15px 30px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 1rem;
    border-radius: 4px;
    transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease;
    cursor: pointer;
}

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

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background-color: #bfa025;
}

/* Value Props Grid */
.container-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    padding: 40px 30px;
    border: 1px solid #e2e8f0;
    background-color: var(--color-bg);
    transition: transform var(--transition-speed) ease;
}

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

.card h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-secondary);
    margin-bottom: 15px;
}

.card p {
    color: #666;
}

/* Clean Square Grid Portfolio (Architectural Style) */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.masonry-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1; /* Enforce Square */
    border-radius: 4px;
    background: #111;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

.masonry-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.25);
}

/* Removed Asymmetric Spans for a Clean Square Grid */

.masonry-item img, .masonry-item picture {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.masonry-item:hover img {
    transform: scale(1.08); /* Zoom sutil y elegante de arquitectura */
}

/* Efecto Oscurecido Editoríal con gradiente suave inferior */
.masonry-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15,15,15,0.9) 0%, rgba(15,15,15,0.2) 40%, rgba(255,255,255,0) 100%);
    display: flex;
    align-items: flex-end; /* Alineación vanguardista estilo revista */
    padding: 25px;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.masonry-item:hover .masonry-overlay {
    opacity: 1;
}

.masonry-overlay span {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* Responsive Asymmetric Contraints */
/* Responsive Square Grid */
@media(max-width: 1024px) {
    .masonry-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
}
@media(max-width: 600px) {
    .masonry-grid { 
        grid-template-columns: 1fr; 
        gap: 20px;
    }
}

/* Process Section */
.process-steps {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 220px;
    text-align: left;
    position: relative;
    padding: 20px;
}

.step-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--color-primary);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 10px;
}

.step h3 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.step p {
    color: #555;
    font-size: 0.95rem;
}

/* Contact Form Container */
.tally-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer Redesign */
.footer {
    background-color: #1a1a17; /* Very dark warm gray matching the image */
    color: #fff;
    padding: 60px 20px 20px;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col-left {
    flex: 1;
    min-width: 300px;
    text-align: left;
}
.footer-col-left .logo {
    margin-bottom: 15px;
}

.footer-col-left .logo-title {
    font-size: 1.5rem;
    letter-spacing: 1px;
    font-family: var(--font-heading);
    font-weight: 500;
}

.footer-col-left .logo-subtitle {
    color: #999;
}

.footer-col-left .logo-openbox { color: #fff; }
.footer-desc {
    color: #999;
    font-size: 0.85rem;
    max-width: 320px;
    line-height: 1.5;
}
.footer-col-center {
    flex: 1;
    text-align: center;
    min-width: 250px;
}
.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
}
.footer-nav a {
    color: #999;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}
.footer-nav a:hover {
    color: var(--color-primary);
}
.footer-col-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    min-width: 200px;
}
.social-icons {
    display: flex;
    gap: 15px;
}
.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #333;
    color: #999;
    transition: all 0.3s ease;
}
.social-icons a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.social-icons svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-bottom p {
    color: #666;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   Drafting Crosshair (Header & Footer only)
   ========================================= */
header:hover, footer:hover { cursor: crosshair; } /* Fallback */
header:hover, footer:hover { cursor: none; }
header a, footer a, header button, footer button, .logo { cursor: pointer; }

#cad-cursor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 105000;
    opacity: 0;
    transition: opacity 0.2s ease;
}
#cad-cursor-container.active {
    opacity: 1; /* Revelar solo en zonas activas */
}
.cad-line-x, .cad-line-y {
    position: absolute;
    background-color: rgba(212, 175, 55, 0.6);
    pointer-events: none;
}
.cad-line-x { height: 1px; width: 100vw; left: 0; }
.cad-line-y { width: 1px; height: 100vh; top: 0; }

.cad-center {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 1.5px solid rgba(212, 175, 55, 1);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width 0.1s, height 0.1s;
}

.cad-coords {
    position: absolute;
    color: #D4AF37;
    font-size: 11px;
    font-family: monospace;
    pointer-events: none;
    background: rgba(10,10,10,0.8);
    border: 1px solid #444;
    padding: 3px 6px;
    transform: translate(15px, 15px);
    letter-spacing: 1.5px;
}

/* =========================================
   Vanguard Lightbox Modal (Previsualización)
   ========================================= */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    transform: scale(0.95);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 100000;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--color-primary);
    transform: scale(1.1) rotate(90deg);
}

.lightbox-caption {
    margin-top: 25px;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Floating WhatsApp (Official Web Vector) */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 50%;
    filter: drop-shadow(0 5px 15px rgba(37, 211, 102, 0.4));
}

.whatsapp-float img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    /* Eliminado el border-radius: 50% para evitar que corte la colita inferior izquierda del globo WhatsApp */
}

.whatsapp-float:hover {
    transform: scale(1.15) translateY(-5px);
}

/* Botón Hamburger Movil */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2000;
    padding: 10px;
    margin-left: auto;
}

.mobile-menu-btn .bar {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

/* Responsive */
@media(max-width: 768px) {
    .mobile-menu-btn { display: block; }
    
    .nav-links {
        position: fixed;
        inset: 0;
        background: linear-gradient(rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0.98)), url('../images/gallery/mobile_menu_bg.png') center/cover no-repeat;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        z-index: 1000;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.4s ease;
    }
    
    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
    }
    
    .nav-links a {
        font-size: 2.2rem;
        letter-spacing: 4px;
        color: #ffffff; /* Letras super nítidas y blancas para contrastar sobre imagen */
        text-transform: uppercase;
        font-weight: 500;
        transform: translateY(20px);
        opacity: 0;
        transition: transform 0.4s ease, opacity 0.4s ease, color 0.3s ease;
    }
    
    .nav-links a:hover {
        color: var(--color-primary); /* Efecto hover dorado para seguir la estética web */
    }
    
    .nav-links.active a {
        transform: translateY(0);
        opacity: 1;
    }
    
    /* Staggered text entrance */
    .nav-links.active a:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active a:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active a:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active a:nth-child(4) { transition-delay: 0.4s; }

    /* Animated Hamburger to "X" */
    .mobile-menu-btn.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mobile-menu-btn.active .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Desactivar efecto Crosshair CAD en móviles y tablets porque carecen de puntero/mouse */
    #cadContainer { display: none !important; }
    header:hover, footer:hover { cursor: auto !important; }

    .hero-content h1 { font-size: 2.5rem; }
    .masonry-item:nth-child(1), .masonry-item:nth-child(2) { grid-column: span 1; grid-row: span 1; }
    .process-steps { flex-direction: column; }
    .footer-top { flex-direction: column; text-align: center; gap: 30px; }
    .footer-col-left { text-align: center; }
    .footer-desc { margin: 0 auto; }
    .footer-col-right { justify-content: center; }
}
