/* ============================================
   MITA Ingeniería - Estilos principales
   Paleta: #0B0F14, #101826, #E8EEF6, #A9B7C6, #20C6C8, #2E74FF
   Tipografías: Space Grotesk, Inter
   ============================================ */

/* ==================== RESET Y BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores */
    --bg-primary: #0B0F14;
    --bg-surface: #101826;
    --text-primary: #E8EEF6;
    --text-secondary: #A9B7C6;
    --border: rgba(255, 255, 255, 0.10);
    --accent-mita: #20C6C8;
    --accent-secondary: #2E74FF;
    
    /* Tipografía */
    --font-title: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Espaciado */
    --container-max: 1200px;
    --section-padding: 120px;
    --section-padding-mobile: 60px;
    
    /* Transiciones */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== PROGRESS BAR ==================== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-mita), var(--accent-secondary));
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(11, 15, 20, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}

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

.header-logo {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.logo-text {
    font-family: var(--font-title);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.menu-toggle.active .hamburger {
    background-color: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

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

.nav-list {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--accent-mita);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-mita);
    transition: width var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-cta {
    background-color: var(--accent-mita);
    color: var(--bg-primary);
}

.btn-cta:hover,
.btn-cta:focus {
    background-color: #1ab0b2;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(32, 198, 200, 0.25);
}

.btn-submit {
    width: 100%;
    background-color: var(--accent-mita);
    color: var(--bg-primary);
    padding: 14px 28px;
    font-size: 16px;
}

.btn-submit:hover,
.btn-submit:focus {
    background-color: #1ab0b2;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(32, 198, 200, 0.25);
}

.btn-scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.btn-scroll-top:hover {
    background-color: var(--accent-mita);
    color: var(--bg-primary);
    transform: translateY(-4px);
}

/* ==================== SECTIONS ==================== */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-title {
    font-family: var(--font-title);
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    position: relative;
    padding-left: 20px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, var(--accent-mita), transparent);
    border-radius: 2px;
}

.section-subtitle {
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-mita);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-intro {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 800px;
}

/* Separador técnico entre secciones */
.section-divider {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(32, 198, 200, 0.2) 50%, transparent);
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: rgba(32, 198, 200, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(32, 198, 200, 0.4);
}

/* ==================== HERO ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    position: relative;
    overflow: hidden;
}

/* Grid técnico de fondo - estilo plano hidráulico */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(to right, rgba(32, 198, 200, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(32, 198, 200, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}

/* Líneas de flujo hidráulico - flow lines técnicas */
.hero::after {
    content: '';
    position: absolute;
    top: 15%;
    right: -5%;
    width: 700px;
    height: 500px;
    background-image: url("data:image/svg+xml,%3Csvg width='700' height='500' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 50 150 Q 200 100 350 150 T 650 150' stroke='rgba(32,198,200,0.06)' stroke-width='1' fill='none'/%3E%3Cpath d='M 50 200 Q 200 170 350 200 T 650 200' stroke='rgba(37,99,235,0.05)' stroke-width='1' fill='none'/%3E%3Cpath d='M 50 250 Q 200 220 350 250 T 650 250' stroke='rgba(32,198,200,0.04)' stroke-width='1' fill='none'/%3E%3Cpath d='M 100 300 Q 250 280 400 300 T 650 300' stroke='rgba(37,99,235,0.03)' stroke-width='1' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

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

.hero-title {
    font-family: var(--font-title);
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-mita));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 56px;
    line-height: 1.7;
}

.hero-text p {
    margin-bottom: 16px;
}

.hero-areas {
    padding: 32px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    border-top: 2px solid var(--accent-mita);
    position: relative;
}

.hero-areas::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--accent-mita);
    box-shadow: 0 0 12px rgba(32, 198, 200, 0.6);
}

.areas-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    list-style: none;
}

.area-item {
    position: relative;
    padding-left: 24px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.area-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 2px;
    background-color: var(--accent-mita);
}

/* ==================== SERVICIOS (TABS) ==================== */
.servicios {
    background-color: var(--bg-surface);
}

.tabs {
    margin-top: 48px;
}

.tabs-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 48px;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition);
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-mita);
    box-shadow: 0 0 8px rgba(32, 198, 200, 0.5);
    transition: width var(--transition);
}

.tab-btn:hover::after {
    width: 100%;
}

.tab-btn.active::after {
    width: 100%;
}

.tab-btn:hover {
    border-bottom-color: transparent;
    background-color: rgba(32, 198, 200, 0.03);
}

.tab-btn.active {
    border-bottom-color: transparent;
    background-color: rgba(32, 198, 200, 0.05);
}

.tab-number {
    font-family: var(--font-title);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-mita);
}

.tab-title {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.tab-btn:hover .tab-title,
.tab-btn.active .tab-title {
    color: var(--text-primary);
}

.tabs-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respetar preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .servicios::before {
        animation: none;
    }
}

.tab-panel-title {
    font-family: var(--font-title);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.tab-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.tab-section {
    margin-bottom: 32px;
}

.tab-section-title {
    font-family: var(--font-title);
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-mita);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.tab-list li {
    position: relative;
    padding-left: 24px;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
}

.tab-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--accent-mita);
    border-radius: 50%;
}

/* ==================== METODOLOGÍA ==================== */
.metodologia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.metodologia-card {
    padding: 32px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all var(--transition);
    position: relative;
    border-left: 3px solid transparent;
}

.metodologia-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--accent-mita), transparent);
    transition: height var(--transition);
    border-radius: 12px 0 0 12px;
}

.metodologia-card:hover::before {
    height: 100%;
}

.metodologia-card:hover {
    border-color: rgba(32, 198, 200, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(32, 198, 200, 0.1);
}

.metodologia-number {
    font-family: var(--font-title);
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-mita);
    opacity: 0.5;
    margin-bottom: 16px;
}

.metodologia-title {
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.metodologia-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== EXPERIENCIA ==================== */
.experiencia {
    background-color: var(--bg-surface);
}

.proyectos-container {
    margin-top: 48px;
}

.proyectos-subtitle {
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.proyectos-list {
    list-style: none;
    display: grid;
    gap: 16px;
}

.proyecto-item {
    padding: 24px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-mita);
    border-radius: 8px;
    transition: all var(--transition);
}

.proyecto-item:hover {
    border-left-width: 5px;
    transform: translateX(4px);
    background-color: rgba(32, 198, 200, 0.03);
    box-shadow: 0 4px 16px rgba(32, 198, 200, 0.1);
}

.proyecto-name {
    font-family: var(--font-title);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.proyecto-location {
    font-size: 15px;
    color: var(--text-secondary);
}

/* ==================== SOBRE MITA ==================== */
.sobre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.sobre-card {
    padding: 40px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.sobre-card-title {
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-mita);
    margin-bottom: 24px;
}

.sobre-list {
    list-style: none;
    display: grid;
    gap: 16px;
}

.sobre-list li {
    position: relative;
    padding-left: 24px;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
}

.sobre-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--accent-mita);
    border-radius: 50%;
}

/* ==================== CONTACTO ==================== */
.contacto {
    background-color: var(--bg-surface);
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 64px;
    margin-top: 48px;
}

.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-label {
    font-family: var(--font-title);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-mita);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 18px;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a.info-value:hover {
    color: var(--accent-mita);
}

.contacto-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-mita);
    box-shadow: 0 0 0 3px rgba(32, 198, 200, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==================== FOOTER ==================== */
.footer {
    padding: 40px 0;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.footer-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==================== REVEAL ANIMATION ==================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .tabs-nav {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 48px;
        transition: right var(--transition);
        padding: 120px 24px 24px;
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    
    .nav-link {
        font-size: 24px;
    }
    
    .btn-cta {
        font-size: 18px;
        padding: 16px 32px;
    }
    
    .logo-text {
        font-size: 26px;
        letter-spacing: 1.5px;
    }
    
    .hero {
        padding-top: 100px;
        min-height: auto;
    }
    
    .hero::before {
        background-size: 40px 40px;
    }
    
    .hero::after {
        display: none;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-text {
        font-size: 16px;
    }
    
    .areas-list {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .tabs-nav {
        grid-template-columns: 1fr;
    }
    
    .tab-btn {
        padding: 16px;
    }
    
    .tab-panel-title {
        font-size: 24px;
    }
    
    .metodologia-grid {
        grid-template-columns: 1fr;
    }
    
    .sobre-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-scroll-top {
        bottom: 24px;
        right: 24px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    :root {
        --section-padding: 60px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .hero-areas {
        padding: 24px;
    }
    
    .metodologia-card,
    .sobre-card {
        padding: 24px;
    }
}
