/* ===== TOKENS ===== */
:root {
    --navy:       #0A1628;
    --navy-mid:   #0F2040;
    --navy-card:  #132035;
    --blue:       #2563EB;
    --blue-light: #3B82F6;
    --mint:       #10D9A0;
    --mint-dim:   rgba(16, 217, 160, 0.12);
    --white:      #FFFFFF;
    --off-white:  #F0F4FF;
    --muted:      #7A8EAD;
    --border:     rgba(255,255,255,0.07);
    --border-lit: rgba(37,99,235,0.4);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius:    12px;
    --radius-lg: 20px;
    --ease:      cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s var(--ease);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--navy);
    color: var(--off-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    margin-bottom: 60px;
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--mint);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-align: center;
}

.section-title.left {
    text-align: left;
}

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

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 22, 40, 0.98);
    border-color: rgba(37, 99, 235, 0.2);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 64px;
}

.brand {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    margin-right: auto;
}

.brand-brackets {
    color: var(--mint);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--white);
}

.btn-nav {
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--blue);
    color: white;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-nav:hover {
    background: var(--blue-light);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--off-white);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== LANG SWITCHER ===== */
.lang-switcher {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--off-white);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.lang-current:hover {
    border-color: var(--blue);
}

.lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-arrow {
    font-size: 0.6rem;
    color: var(--muted);
    transition: transform 0.2s;
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    min-width: 140px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    z-index: 200;
    list-style: none;
}

.lang-switcher.open .lang-dropdown {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 7px;
    transition: background 0.15s, color 0.15s;
    font-family: var(--font-sans);
    text-align: left;
}

.lang-option:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--white);
}

.lang-option.active {
    color: var(--mint);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--blue);
    color: white;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    background: var(--blue-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.35);
}

.btn-ghost {
    background: transparent;
    color: var(--off-white);
    border: 1px solid var(--border-lit);
}

.btn-ghost:hover {
    border-color: var(--blue-light);
    color: white;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

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

/* grid background */
.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.hero-bg-grid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 60% 50%, rgba(37,99,235,0.08) 0%, transparent 70%),
                radial-gradient(ellipse 50% 40% at 10% 80%, rgba(16,217,160,0.06) 0%, transparent 60%);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--mint);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--white);
    margin-bottom: 24px;
}

.hero-title .highlight {
    color: var(--mint);
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 480px;
    margin-bottom: 36px;
    line-height: 1.7;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

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

.stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* Terminal */
.hero-terminal {
    background: #0D1B2A;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 32px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(37,99,235,0.1);
    overflow: hidden;
    animation: float 5s ease-in-out infinite;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #0A1628;
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red    { background: #FF5F57; }
.dot.yellow { background: #FEBC2E; }
.dot.green  { background: #28C840; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
    margin-left: 8px;
}

.terminal-body {
    padding: 20px 24px;
    min-height: 320px;
    position: relative;
}

.terminal-code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.75;
    color: #ABB2BF;
    white-space: pre;
}

.cursor {
    display: inline-block;
    color: var(--mint);
    font-family: var(--font-mono);
    animation: blink 1s step-end infinite;
    font-size: 0.82rem;
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1;
}

.hero-scroll span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--muted);
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--muted), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* ===== SERVICIOS ===== */
.servicios {
    background: var(--navy-mid);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.servicio-card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.servicio-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--mint));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.servicio-card:hover {
    border-color: rgba(37, 99, 235, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.servicio-card:hover::after {
    transform: scaleX(1);
}

.card-number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.card-icon {
    font-size: 1.6rem;
    color: var(--blue-light);
    margin-bottom: 16px;
}

.servicio-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.servicio-card p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-tags li {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--mint-dim);
    color: var(--mint);
    border: 1px solid rgba(16, 217, 160, 0.2);
}

/* ===== STACK ===== */
.stack {
    background: var(--navy);
}

.stack-groups {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.stack-group {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.group-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mint);
    width: 100px;
    flex-shrink: 0;
    padding-top: 8px;
}

.stack-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    padding: 8px 18px;
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--off-white);
    font-weight: 500;
    transition: var(--transition);
    cursor: default;
}

.pill:hover {
    border-color: var(--blue-light);
    color: var(--white);
    background: rgba(37, 99, 235, 0.1);
}

/* ===== PROCESO ===== */
.proceso {
    background: var(--navy-mid);
}

.proceso-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}

.proceso-steps::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 60px;
    right: 60px;
    height: 1px;
    background: linear-gradient(90deg, var(--blue) 0%, var(--mint) 100%);
    opacity: 0.3;
}

.proceso-step {
    padding: 0 24px;
    padding-top: 0;
}

.step-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--mint);
    background: var(--navy-mid);
    display: inline-block;
    padding: 8px 0;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    font-weight: 700;
}

.step-num::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mint);
    margin-right: 8px;
    vertical-align: middle;
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.step-content p {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.7;
}

/* ===== CONTACTO ===== */
.contacto {
    background: var(--navy);
}

.contacto-inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
}

.contacto-texto .section-eyebrow {
    text-align: left;
    display: block;
    margin-bottom: 16px;
}

.contacto-desc {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.7;
    margin-top: 20px;
    margin-bottom: 36px;
}

.contacto-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.contact-link i {
    width: 18px;
    color: var(--blue-light);
}

.contact-link:hover {
    color: var(--white);
}

/* Form */
.contacto-form {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--off-white);
    letter-spacing: 0.02em;
}

.contacto-form input,
.contacto-form select,
.contacto-form textarea {
    background: var(--navy);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--off-white);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
}

.contacto-form input::placeholder,
.contacto-form textarea::placeholder {
    color: #3A4D62;
}

.contacto-form select {
    cursor: pointer;
    color: var(--off-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A8EAD' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.contacto-form select option {
    background: var(--navy-card);
}

.contacto-form input:focus,
.contacto-form select:focus,
.contacto-form textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.form-nota {
    font-size: 0.75rem;
    color: var(--muted);
    text-align: center;
}

/* ===== WHATSAPP CTA ===== */
.wa-cta-box {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.wa-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #25D366;
}

.wa-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
}

.wa-desc {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.6;
    max-width: 320px;
    margin-top: -8px;
}

.btn-wa {
    background: #25D366;
    color: #0A1628;
    font-weight: 700;
    font-size: 1rem;
    gap: 10px;
    padding: 15px 28px;
    border-radius: var(--radius);
    transition: var(--transition);
    width: 100%;
    justify-content: center;
}

.btn-wa:hover {
    background: #20bc59;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.btn-wa i {
    font-size: 1.2rem;
}

.wa-number {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted);
}

.wa-badges {
    display: flex;
    gap: 12px;
    margin-top: -4px;
}

.wa-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--muted);
    background: var(--navy);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 20px;
}

.wa-badge i {
    color: var(--mint);
    font-size: 0.7rem;
}

/* ===== FOOTER ===== */
.footer {
    padding: 28px 0;
    border-top: 1px solid var(--border);
    background: var(--navy);
}

.footer-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--muted);
    margin-right: auto;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--muted);
    font-size: 1.1rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--mint);
}

/* ===== ANIMACIONES ===== */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

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

.reveal {
    opacity: 0;
    transform: translateY(20px);
}

.reveal.visible {
    animation: fadeUp 0.6s var(--ease) forwards;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .servicios-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .proceso-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    .proceso-steps::before { display: none; }
}

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

    .nav-menu, .btn-nav { display: none; }
    .hamburger { display: flex; }

    .nav-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0; right: 0;
        background: var(--navy-mid);
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-terminal {
        animation: none;
    }

    .hero-stats {
        gap: 20px;
    }

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

    .stack-group {
        flex-direction: column;
        gap: 12px;
    }

    .proceso-steps {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contacto-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .footer-copy { margin: 0; }

    .section-title { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
