:root {
    --bg-primary: #090d16;
    --bg-secondary: #111827;
    --bg-card: #161f33;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --error: #ef4444;
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    max-width: 100%;
}

body {
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

img,
pre,
code {
    max-width: 100%;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 1000;
    padding: 18px 0;
    background: rgba(9, 13, 22, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 14px 0;
    background: rgba(9, 13, 22, 0.98);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.logo-icon {
    color: var(--accent);
    font-family: monospace;
}

.logo span:last-child {
    color: var(--accent);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-links .btn-nav {
    background: var(--accent);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
}

.nav-links .btn-nav:hover {
    background: var(--accent-hover);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

.full-width {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 120px 0 72px;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 50%);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 40px;
    align-items: center;
}

.hero-content,
.hero-visual {
    min-width: 0;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 18px;
    max-width: 100%;
}

.hero h1 {
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 18px;
    overflow-wrap: break-word;
}

.hero p {
    color: var(--text-secondary);
    font-size: clamp(0.98rem, 2.5vw, 1.125rem);
    margin-bottom: 28px;
    max-width: 560px;
    overflow-wrap: break-word;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 36px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.metric {
    min-width: 0;
}

.metric strong {
    display: block;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.metric span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Ventana de código */
.code-window {
    background: #0d1322;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.window-header {
    background: #151e32;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.window-title {
    margin-left: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.window-body {
    padding: 18px;
    font-family: monospace;
    font-size: 0.8rem;
    line-height: 1.65;
    overflow-x: auto;
    color: #e2e8f0;
    width: 100%;
}

.kw { color: #c084fc; }
.cls { color: #38bdf8; }
.fn { color: #60a5fa; }
.str { color: #34d399; }
.num { color: #fbbf24; }

/* Secciones generales */
.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 48px;
}

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

.section-header h2 {
    font-size: clamp(1.65rem, 4.5vw, 2.3rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Grid de Servicios */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 26px;
    border-radius: var(--radius);
    transition: var(--transition);
    min-width: 0;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.4);
}

.card-icon {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* Pasos / Metodología */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.step {
    background: var(--bg-primary);
    padding: 26px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    min-width: 0;
}

.step-num {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.85;
    display: block;
    margin-bottom: 12px;
}

.step h4 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* Planes */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pricing-card.featured {
    border: 2px solid var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.popular-tag {
    position: absolute;
    top: -13px;
    right: 20px;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
}

.pricing-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.pricing-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.price {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.price span {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin-bottom: 28px;
    flex-grow: 1;
}

.pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.pricing-features li::before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
    margin-right: 10px;
}

/* Contacto */
.contact-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 40px;
    align-items: start;
}

.contact-info,
.contact-form-wrapper {
    min-width: 0;
}

.contact-info h2 {
    font-size: clamp(1.65rem, 4vw, 2.2rem);
    margin-bottom: 14px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.detail-item {
    margin-bottom: 16px;
    overflow-wrap: break-word;
}

.detail-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.detail-item span {
    color: var(--accent);
    font-weight: 500;
}

.contact-form-wrapper {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    color: #6ee7b7;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    color: #fca5a5;
}

/* Footer */
.footer {
    padding: 48px 0 28px;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 10px;
    max-width: 400px;
    font-size: 0.9rem;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Tablet y Móvil */
@media (max-width: 900px) {
    .hero-grid,
    .contact-container {
        grid-template-columns: minmax(0, 1fr);
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 6px 0;
    }

    .nav-links .btn-nav {
        text-align: center;
    }
}

/* Celulares pequeños / estándar (ej. 375px - 430px) */
@media (max-width: 480px) {
    .hero {
        padding: 104px 0 56px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-metrics {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .section {
        padding: 60px 0;
    }
}