:root {
    --bg: #050505;
    --surface: #0a0a0a;
    --border: #1a1a1a;
    --text: #fafafa;
    --text-secondary: #888;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --radius: 12px;
    --transition-fast: 0.2s;
    --transition-med: 0.3s;
}
[data-theme="light"] {
    --bg: #ffffff;
    --surface: #f5f5f5;
    --border: #e0e0e0;
    --text: #111111;
    --text-secondary: #555;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background var(--transition-med), color var(--transition-med);
}
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Skip link */
.skip-link {
    position: absolute; top: -100%; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: white; padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px; font-size: 0.9rem; font-weight: 600;
    text-decoration: none; z-index: 200;
    transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }

/* Nav */
nav {
    position: fixed; top: 0; width: 100%;
    padding: 1.25rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: background var(--transition-med);
}
[data-theme="light"] nav { background: rgba(255,255,255,0.85); }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
.nav-center { display: flex; gap: 2rem; align-items: center; list-style: none; }
.nav-center li { display: contents; }
.nav-center a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color var(--transition-fast); }
.nav-center a:hover { color: var(--text); }
.nav-right { display: flex; gap: 0.75rem; align-items: center; }
.theme-toggle {
    background: none; border: 1px solid var(--border); border-radius: 8px;
    color: var(--text); cursor: pointer; padding: 0.4rem 0.6rem; font-size: 1rem;
    transition: border-color var(--transition-fast);
}
.theme-toggle:hover { border-color: var(--accent); }
.menu-toggle {
    display: none; background: none; border: none; color: var(--text);
    font-size: 1.5rem; cursor: pointer; padding: 0.25rem;
}

.btn {
    display: inline-block; padding: 0.75rem 1.75rem;
    background: var(--accent); color: white; border: none; border-radius: 8px;
    font-size: 0.95rem; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: all var(--transition-fast);
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); background: var(--accent-glow); }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }

section { padding: 6rem 2rem; max-width: 1100px; margin: 0 auto; }

/* Hero */
.hero {
    min-height: 100vh; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
    padding-top: 5rem; position: relative; overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99,102,241,0.15), transparent);
}
.hero-bg::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 80% 50% at 60% -10%, rgba(139,92,246,0.12), transparent);
    animation: heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
[data-theme="light"] .hero-bg {
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99,102,241,0.08), transparent);
}
[data-theme="light"] .hero-bg::before {
    background: radial-gradient(ellipse 80% 50% at 60% -10%, rgba(139,92,246,0.06), transparent);
}
.hero > *:not(.hero-bg):not(.scroll-hint) { position: relative; z-index: 1; }
.hero-badge {
    display: inline-block; padding: 0.4rem 1rem;
    background: var(--accent-glow); border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px; font-size: 0.8rem; color: var(--accent-hover); margin-bottom: 2rem;
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800;
    line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1.5rem; max-width: 800px;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.2rem; color: var(--text-secondary); max-width: 550px; margin-bottom: 2.5rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* Scroll hint arrow */
.scroll-hint {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    z-index: 1; animation: bounce 2s infinite;
}
.scroll-hint svg { width: 24px; height: 24px; stroke: var(--text-secondary); }
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* Section labels */
.section-label {
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.1em; color: var(--accent); margin-bottom: 1rem;
}
.section-title { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; }
.section-subtitle { color: var(--text-secondary); font-size: 1.1rem; max-width: 600px; margin-bottom: 3rem; }

/* Expandable cards */
.areas-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem;
}
.area-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; transition: border-color var(--transition-fast), box-shadow var(--transition-med), transform var(--transition-med);
}
.area-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}
.area-header {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.5rem 2rem; cursor: pointer; user-select: none;
    background: none; border: none; width: 100%;
    color: inherit; font: inherit; text-align: left;
}
.area-header:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--radius); }
.area-icon {
    font-size: 1.75rem; flex-shrink: 0;
    transition: transform var(--transition-med);
}
.area-card:hover .area-icon { transform: scale(1.15); }
.area-header h3 { font-size: 1.05rem; font-weight: 600; flex: 1; }
.area-toggle { font-size: 1.25rem; color: var(--text-secondary); transition: transform var(--transition-med); }
.area-card.open .area-toggle { transform: rotate(45deg); }
.area-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.area-card.open .area-body { max-height: 500px; }
.area-body-inner { padding: 0 2rem 1.5rem; }
.area-body-inner p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 0.75rem; }
.area-body-inner ul { list-style: none; padding: 0; }
.area-body-inner li {
    color: var(--text-secondary); font-size: 0.9rem;
    padding: 0.35rem 0; padding-left: 1.25rem; position: relative;
}
.area-body-inner li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* Steps */
.steps {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem; counter-reset: step;
}
.step { position: relative; padding: 2rem; }
.step::before {
    counter-increment: step; content: counter(step);
    display: block; width: 40px; height: 40px; line-height: 40px; text-align: center;
    background: var(--accent-glow); border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px; font-weight: 700; color: var(--accent-hover); margin-bottom: 1.25rem;
}
.step h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.step p { color: var(--text-secondary); font-size: 0.95rem; }

/* Grid cards */
.grid-3 {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem;
}
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem; transition: border-color var(--transition-fast), box-shadow var(--transition-med), transform var(--transition-med);
}
.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}
.card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Cases */
.case-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem; transition: border-color var(--transition-fast), box-shadow var(--transition-med), transform var(--transition-med);
}
.case-card:hover {
    border-color: rgba(99,102,241,0.3);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}
.case-label {
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.75rem;
}
.case-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 1rem; }
.case-flow {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    font-size: 0.9rem; color: var(--text-secondary);
}
.case-flow .arrow { color: var(--accent); font-weight: 600; }
.case-result {
    margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border);
    font-size: 0.9rem; color: var(--accent-hover); font-weight: 600;
}

/* Social proof */
.proof-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem; text-align: center; margin-top: 3rem;
}
.proof-stat { font-size: 2.5rem; font-weight: 800; color: var(--accent-hover); }
.proof-label { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.25rem; }

/* Pricing card */
.pricing-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 3rem; max-width: 550px;
    margin: 0 auto; text-align: center;
    transition: border-color var(--transition-med), box-shadow var(--transition-med);
}
.pricing-card:hover {
    border-color: rgba(99,102,241,0.3);
    box-shadow: 0 0 30px rgba(99,102,241,0.1);
}
.pricing-price { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.25rem; }
.pricing-price em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.pricing-sub { color: var(--text-secondary); font-size: 1rem; margin-bottom: 2rem; }
.pricing-features { list-style: none; padding: 0; text-align: left; margin-bottom: 2rem; }
.pricing-features li {
    padding: 0.6rem 0; font-size: 0.95rem; color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    padding-left: 1.75rem; position: relative;
}
.pricing-features li::before {
    content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700;
}
.pricing-features li:last-child { border-bottom: none; }

/* Guarantee */
.guarantee {
    text-align: center; padding: 3rem 2rem; margin-top: 3rem;
    background: var(--accent-glow); border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--radius);
}
.guarantee-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.guarantee h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.guarantee p { color: var(--text-secondary); font-size: 0.95rem; max-width: 500px; margin: 0 auto; }

/* Tech logos */
.tech-logos {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 3rem; align-items: flex-start; margin-top: 3rem;
}
.tech-logo {
    display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
    transition: transform var(--transition-fast);
}
.tech-logo:hover { transform: translateY(-4px); }
.tech-logo img { height: 64px; width: 64px; object-fit: contain; }
.tech-logo span { font-size: 0.95rem; font-weight: 600; color: var(--text); }

/* FAQ */
.faq-list { max-width: 700px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 1.25rem 0; background: none; border: none;
    color: var(--text); font: inherit; font-size: 1rem; font-weight: 600;
    cursor: pointer; text-align: left;
}
.faq-question:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq-icon { color: var(--text-secondary); transition: transform var(--transition-med); font-size: 1.25rem; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-item.open .faq-answer { max-height: 200px; }
.faq-answer p {
    padding-bottom: 1.25rem; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7;
}

/* ROI Calculator */
.roi-calc {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2.5rem; max-width: 500px;
}
.roi-calc label {
    display: block; font-size: 0.9rem; font-weight: 500;
    color: var(--text-secondary); margin-bottom: 0.5rem;
}
.roi-calc input[type="range"] { width: 100%; margin-bottom: 0.25rem; accent-color: var(--accent); }
.roi-value { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 1.5rem; }
.roi-result {
    padding: 1.5rem; background: var(--accent-glow); border: 1px solid rgba(99,102,241,0.2);
    border-radius: 8px; text-align: center;
}
.roi-result .big { font-size: 2rem; font-weight: 800; color: var(--accent-hover); }
.roi-result p { color: var(--text-secondary); font-size: 0.85rem; margin-top: 0.25rem; }

/* Contact form */
.contact-form {
    max-width: 500px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%; padding: 0.85rem 1rem;
    background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
    color: var(--text); font-family: inherit; font-size: 0.95rem;
    transition: border-color var(--transition-fast);
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form .btn { width: 100%; text-align: center; }
.form-status { text-align: center; font-size: 0.9rem; color: var(--accent-hover); min-height: 1.5rem; }

/* CTA */
.cta-section {
    text-align: center; padding: 5rem 2rem;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; margin: 4rem auto; max-width: 1100px;
}
.cta-section h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
.cta-section p { color: var(--text-secondary); margin-bottom: 2rem; font-size: 1.05rem; }

/* WhatsApp floating */
.whatsapp-float {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 99;
    width: 56px; height: 56px; border-radius: 50%;
    background: #25d366; color: white; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(37,211,102,0.4);
    transition: transform var(--transition-fast);
    text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float svg { width: 28px; height: 28px; fill: white; }

/* Sticky mobile CTA */
.sticky-cta {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    padding: 0.75rem 1rem; background: var(--bg);
    border-top: 1px solid var(--border); z-index: 98; text-align: center;
}
.sticky-cta .btn { width: 100%; }

/* Scroll animations */
.fade-in {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Stagger children */
.stagger-children > * {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.stagger-children.visible > * { opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.6s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.7s; }

footer {
    text-align: center; padding: 3rem 2rem;
    color: var(--text-secondary); font-size: 0.85rem; border-top: 1px solid var(--border);
}
footer a { color: var(--text-secondary); text-decoration: none; }
footer a:hover { color: var(--accent); }

@media (max-width: 768px) {
    nav { padding: 1rem; }
    .menu-toggle { display: block; }
    .nav-center {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(20px); padding: 1.5rem 2rem; gap: 1rem;
        border-bottom: 1px solid var(--border);
    }
    [data-theme="light"] .nav-center { background: rgba(255,255,255,0.95); }
    .nav-center.open { display: flex; }
    section { padding: 4rem 1.25rem; }
    .hero { min-height: 90vh; }
    .sticky-cta { display: block; }
    .whatsapp-float { bottom: 5.5rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .fade-in { opacity: 1; transform: none; }
    .stagger-children > * { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

/* ── Equipo Cotizador case card ────────────────────────────────────────── */

.case-card-highlight {
    border-color: var(--accent);
    background: var(--accent-glow);
}
.case-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}
.case-link:hover {
    color: var(--accent-hover);
}

/* ── Cotizador page styles ────────────────────────────────────────────── */

.cotizador-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}
.cotizador-hero > div {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}
.cotizador-hero h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}
.cotizador-hero p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.cotizador-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem auto;
    max-width: 1000px;
}
.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 90px;
}
.flow-icon { font-size: 1.5rem; }
.flow-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.flow-arrow { color: var(--accent); font-size: 1.2rem; font-weight: 700; }

.cotizador-equipos {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.equipos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
.equipo-tag {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.equipo-tag:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.cotizador-numbers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.agentes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}
.agente-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.agente-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.agente-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .cotizador-hero { grid-template-columns: 1fr; }
    .cotizador-numbers { grid-template-columns: repeat(2, 1fr); }
    .cotizador-flow { gap: 0.25rem; }
    .flow-step { min-width: 70px; padding: 0.5rem 0.75rem; }
    .flow-label { font-size: 0.65rem; }
    .flow-arrow { font-size: 0.9rem; }
}
