:root {
    --bg-dark: #07090c;
    --bg-alt: #161c24;
    --bg-card: rgba(18, 23, 30, 0.6);
    --text-primary: #f2f4f8;
    --text-secondary: #a8b6c9;
    --text-muted: #64748b;
    --accent: #C7A152;
    --accent-rgb: 199, 161, 82;
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   ELEMENTOS REUTILIZABLES (TIPOGRAFÍA & SPACING)
   ========================================================================== */
.section-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.section-tag {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    display: inline-block;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 1.5rem;
}

.text-gold {
    color: var(--accent);
}

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

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(7, 9, 12, 0.65);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-logo {
    width: 120px;
    height: auto;
    object-fit: contain;
}

.brand-sub {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: #fff;
}

.btn-nav-cta {
    background: var(--accent);
    color: #000 !important;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.2);
}

.btn-nav-cta:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 90px;
    background-image: url('Logo/Logo en fondo.png'); /* Fondo de marca por defecto */
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(7,9,12,0.2) 0%, rgba(7,9,12,0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.hero-logo-box {
    margin-bottom: 2rem;
}

.hero-logo {
    width: 380px;
    height: auto;
    filter: drop-shadow(0 0 25px rgba(var(--accent-rgb), 0.25));
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    letter-spacing: -1px;
}

.hero-highlight {
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-primary-landing {
    background: var(--accent);
    color: #000;
    padding: 14px 28px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.25);
}

.btn-primary-landing:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
}

.btn-secondary-landing {
    background: transparent;
    color: #fff;
    border: 1px solid var(--glass-border);
    padding: 14px 28px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-heading);
    font-weight: 500;
    transition: var(--transition-smooth);
}

.btn-secondary-landing:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   SECTIONS: Philosophy, ArchiCore, Portfolio, Process, Contact
   ========================================================================== */
.philosophy-section {
    padding: 3.5rem 0;
    background-color: var(--bg-dark);
}

.archicore-tech-section {
    padding: 3.5rem 0;
    background-color: var(--bg-alt);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.philosophy-p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.philosophy-stats {
    display: flex;
    gap: 32px;
    margin-top: 3rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.p-stat-card {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.philosophy-img-frame {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 12px;
    transform: rotate(2deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.philosophy-img-frame img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    object-fit: cover;
}

/* ==========================================================================
   PORTFOLIO SECTION
   ========================================================================== */
.portfolio-section {
    padding: 3.5rem 0;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

/* Brillo sutil de fondo para portafolio */
.portfolio-section::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 80vh;
    background: radial-gradient(circle, rgba(199,161,82,0.03) 0%, rgba(7,9,12,0) 70%);
    pointer-events: none;
    z-index: 0;
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.portfolio-filters {
    display: flex;
    gap: 8px;
}

.filter-tab {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-tab:hover {
    border-color: var(--text-muted);
    color: #fff;
}

.filter-tab.active {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), 0.3);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.p-item-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

.p-item-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.p-item-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--accent-rgb), 0.25);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.p-img-box {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 75%; /* 4:3 Ratio */
    overflow: hidden;
}

.p-img-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.p-item-card:hover .p-img-box img {
    transform: scale(1.06);
}

.p-cat-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(14, 17, 23, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p-info-box {
    padding: 20px;
}

.p-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-notes {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    height: 45px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ==========================================================================
   PROCESS SECTION
   ========================================================================== */
.process-section {
    padding: 3.5rem 0;
    background-color: var(--bg-alt);
    border-top: 1px solid var(--glass-border);
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 4rem;
}

.timeline-step {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    transition: var(--transition-smooth);
    position: relative;
}

.timeline-step:hover {
    border-color: rgba(var(--accent-rgb), 0.2);
    transform: translateY(-4px);
}

.step-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(var(--accent-rgb), 0.15);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.step-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
    padding: 3rem 0 4rem 0;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

/* Brillo muy tenue para contacto */
.contact-section::before {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, rgba(7,9,12,0) 70%);
    pointer-events: none;
    z-index: 0;
}

.contact-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(7,9,12,0.8) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-icon {
    font-size: 1.5rem;
    background: rgba(var(--accent-rgb), 0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

.contact-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 16px 24px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-smooth);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
    background: #20ba59;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand .footer-logo {
    width: 140px;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.05));
}

.footer-slogan {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-links-col h4 {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

.footer-links-col a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.footer-links-col a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.footer-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Responsive */
@media (max-width: 968px) {
    .philosophy-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .process-timeline {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .portfolio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .contact-card {
        padding: 2rem;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
}

/* Botón hamburguesa (oculto en desktop) */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

.mobile-menu-btn .hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animación del botón a 'X' */
.mobile-menu-btn.active .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .header-container {
        height: 70px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0 24px;
        box-sizing: border-box;
    }
    
    .brand-sub {
        display: none;
    }
    
    .logo-area {
        gap: 8px;
    }
    
    .brand-logo {
        width: 105px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Menú lateral desplegable */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 280px;
        height: 100vh;
        background: rgba(7, 9, 12, 0.75); /* Reducido para que sea semitransparente */
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: 105;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1.05rem;
        width: 80%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255,255,255,0.03);
    }
    
    .btn-nav-cta {
        border-bottom: none !important;
        background: var(--accent) !important;
        color: #000 !important;
        border-radius: var(--border-radius-sm);
        padding: 12px 24px !important;
        font-size: 0.95rem !important;
        width: 80% !important;
        margin-top: 10px;
    }

    /* Evitar que los filtros del portafolio se desborden en móviles */
    .portfolio-filters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        width: 100%;
        margin-top: 10px;
    }
}
