:root {
    --bg-dark: #050507;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --primary-glow: rgba(56, 189, 248, 0.5);
    /* Cyan/Blue tint for "Intelligence" */
    --accent: #38bdf8;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --font-head: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.5;
    /* Slightly tighter line height */
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.container {
    max-width: 1100px;
    /* Slightly tighter container */
    margin: 0 auto;
    padding: 0 20px;
}

/* Background Glow */
.glow-bg {
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Glass Header - Compact */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 7, 0.85);
    /* Darker for legibility of dark logo */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.8rem 0;
    /* Reduced padding */
}

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

.logo {
    height: 105px;
    /* Increased by another 50% (70px * 1.5) */
    width: auto;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    /* Tighter gap */
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
}

/* Buttons */
.btn {
    padding: 0.6rem 1.4rem;
    /* Compact buttons */
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    cursor: pointer;
}


.btn-Contacto {
    /* Alias seguro: si queda algún botón con esta clase, que se vea como un .btn-primary */
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    background: var(--text-main);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--primary-glow);
}


.btn-primary {
    background: var(--text-main);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

/* Hero Section - Compact */
.hero {
    min-height: 75vh;
    /* Reduced from 100vh */
    display: flex;
    align-items: center;
    padding-top: 70px;
    padding-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
    /* Reduced gap */
}

.hero-text {
    padding-right: 1rem;
}

.hero-title {
    font-family: var(--font-head);
    font-size: 3.2rem;
    /* Reduced from 4rem */
    line-height: 1.1;
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
}

.hero-lema {
    font-size: 1.25rem;
    /* Reduced from 1.5rem */
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

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

.hero-desc {
    margin-bottom: 2rem;
    font-size: 1rem;
    /* Reduced from 1.1rem */
    color: #cbd5e1;
    border-left: 2px solid var(--accent);
    padding-left: 0.8rem;
    line-height: 1.4;
}

.cta-group {
    display: flex;
    gap: 0.8rem;
}

.hero-img {
    width: 100%;
    max-width: 420px;
    /* Smaller image */
    border-radius: 20px;
    filter: drop-shadow(0 0 30px rgba(56, 189, 248, 0.2));
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    /* Reduced float distance */
    100% {
        transform: translateY(0px);
    }
}

/* General Section Formatting - Compact */
.section-padding {
    padding: 3.5rem 0;
    /* Drastically reduced from 6rem */
}

.section-title {
    font-family: var(--font-head);
    font-size: 2rem;
    /* Reduced */
    margin-bottom: 2rem;
    /* Reduced */
    text-align: center;
}

/* Flip Cards - Compact */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    /* Tighter */
}

.flip-card {
    background-color: transparent;
    height: 200px;
    /* Reduced height */
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    /* Faster flip */
    transform-style: preserve-3d;
    border-radius: 12px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.flip-card-front {
    background-color: var(--bg-card);
    border: 1px solid var(--border-glass);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    /* Darker image for better text contrast if needed */
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    padding: 1rem;
    text-align: left;
}

.card-overlay h3 {
    font-family: var(--font-head);
    font-size: 1.1rem;
}

.flip-card-back {
    background: #1e293b;
    color: white;
    transform: rotateY(180deg);
    padding: 1.5rem;
    border: 1px solid var(--accent);
}

.flip-card-back h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-family: var(--font-head);
    font-size: 1.1rem;
}

.flip-card-back p {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Stats - Compact */
.stats-section {
    padding-top: 1rem;
    /* Pull closer to cards */
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 cols on desktop */
    gap: 1rem;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-head);
    margin-bottom: 0.2rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Chart Placeholder - Compact */
.chart-placeholder {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    height: 60px;
    /* Reduced height */
    padding-top: 10px;
    margin-bottom: 15px;
    /* Space for caption */
}

.chart-card .stat-number {
    display: none;
    /* Hide number for chart card */
}

.chart-caption {
    position: absolute;
    bottom: 0.8rem;
    width: 100%;
    left: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Process - Compact */
.process-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    flex: 1;
    text-align: center;
    padding: 0 0.5rem;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 40px;
    /* Smaller */
    height: 40px;
    background: var(--bg-dark);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.step h3 {
    margin-bottom: 0.3rem;
    font-family: var(--font-head);
    font-size: 1rem;
}

.step p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border-glass);
    margin-top: 20px;
}

/* Contact - Compact */
.contact-section {
    padding-top: 2rem;
    /* Pull up */
    padding-bottom: 3rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h2 {
    font-family: var(--font-head);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

#btnContacto {
    margin-top: 1.5rem;
}

.contact-link {
    display: inline-block;
    font-size: 1.2rem;
    color: var(--accent);
    margin: 1rem 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Tighter form */
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    /* Compact inputs */
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.form-note {
    /* Mensaje de estado del formulario (por defecto, neutro) */
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    /* Evita 'saltos' de layout cuando el texto ocupa 2 líneas */
    min-height: 2.4em;
    /* Transición suave cuando cambia el color */
    transition: color 0.2s ease;
}

/* Estados del mensaje (se aplican desde JavaScript) */
.form-note.note-ok {
    color: #4ade80;
    /* verde */
}

.form-note.note-error {
    color: #f87171;
    /* rojo */
}

.form-note.note-warning {
    color: #f5c542;
    /* amarillo */
}

/* Footer */
footer {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-glass);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================= */
/* CONTACT SECTION – MANIFESTO */
/* ============================= */

.contact-manifesto {
    margin-bottom: 48px;
    /* separación fuerte antes de “Háblanos” */
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 300;
    /* light */
    font-style: italic;
    /* italic */
}

/* Anula cualquier <strong> dentro del manifiesto */
.contact-manifesto strong {
    font-weight: inherit;
    color: inherit;
}

/* Título del bloque contacto */
.contact-title {
    margin-top: 0;
    margin-bottom: 16px;
}



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

.footer-logo {
    height: 105px;
    width: auto;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }


    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 4rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-desc {
        border-left: none;
        padding-left: 0;
    }

    .cta-group {
        justify-content: center;
    }

    .header-content .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .process-steps {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .step {
        width: 100%;
        max-width: 300px;
    }

    .step-line {
        display: none;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Modal Contacto ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .55);
    z-index: 9999;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    width: min(520px, 100%);
    background: #111;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.modal-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

#contactFormModal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Separación clara entre renglones */
    margin-top: 10px;
}

#contactFormModal label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Espacio entre label e input */
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

#contactFormModal input,
#contactFormModal textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;

    /* Efecto 3D / Bordes definidos */
    background: rgba(0, 0, 0, 0.3);
    /* Fondo más oscuro para profundidad */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 1px solid rgba(0, 0, 0, 0.5);
    /* Sombra interna simulada */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Luz inferior */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Profundidad hacia adentro */

    color: #fff;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#contactFormModal input:focus,
#contactFormModal textarea:focus {
    border-color: var(--accent);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(56, 189, 248, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.modal .btn-primary,
.modal .btn-secondary {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .18);
    cursor: pointer;
}

.modal .btn-primary {
    background: rgba(255, 255, 255, 0.05);
    /* Apagado por defecto */
    color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.modal .btn-primary.ready {
    background: var(--text-main);
    /* Blanco brillante */
    color: var(--bg-dark);
    /* Texto oscuro */
    box-shadow: 0 0 15px var(--primary-glow);
    border-color: transparent;
    cursor: pointer;
    transform: translateY(-1px);
}

.modal .btn-secondary {
    background: transparent;
}

.status {
    margin-top: 10px;
    font-size: 14px;
    opacity: .9;
}

/* Ajuste: si algún botón reutiliza .contact-link, que no se vea como un link simple */
button.contact-link {
    appearance: none;
    border: 0;
    background: var(--text-main);
    color: var(--bg-dark);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
}

button.contact-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--primary-glow);
}