:root {
    /* Paleta extraída de la imagen de FacturaFácil Ecuador */
    --color-primary: #5670ee;
    --color-primary-dark: #415f7d;
    --color-secondary: #32bb91;
    --color-secondary-dark: #2a9d7a;
    --color-accent: #eea529;
    --color-accent-dark: #d48a1c;
    --color-bg: #f4f7fb;
    --color-surface: #ffffff;
    --color-text: #1a3261;
    --color-text-muted: #415f7d;
    --color-border: #d4e0f7;
    --shadow-sm: 0 1px 2px 0 rgb(26 50 97 / 0.05);
    --shadow: 0 4px 6px -1px rgb(26 50 97 / 0.1), 0 2px 4px -2px rgb(26 50 97 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(26 50 97 / 0.12), 0 8px 10px -6px rgb(26 50 97 / 0.1);
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --max-width: 72rem;
    --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.125rem;
}

.logo__img {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
}

.logo__text {
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.125rem;
    flex-wrap: wrap;
}

.logo__super {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: #1a3261;
    font-weight: 900;
    font-size: 0.65em;
    letter-spacing: 0.04em;
    padding: 0.2em 0.5em;
    border-radius: 0.35em;
    margin-right: 0.25rem;
    text-transform: uppercase;
}

.logo__ec {
    color: var(--color-primary);
}

.nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
}

.nav__link {
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.2s;
}

.nav__link:hover {
    color: var(--color-primary);
}

.nav__link--cta {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
}

.nav__link--cta:hover {
    background: var(--color-primary-dark);
    color: white;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 1.75rem;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 0.15rem;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.menu-toggle span:nth-child(1) { width: 100%; }
.menu-toggle span:nth-child(2) { width: 75%; }
.menu-toggle span:nth-child(3) { width: 50%; }

/* Hero */
.hero {
    padding: 3rem 0 4rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--color-bg) 100%);
    overflow: hidden;
}

.hero__container {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #e8eefc;
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.hero__title {
    font-size: 2.25rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

.text-primary {
    color: var(--color-primary);
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 36rem;
    margin-bottom: 1.75rem;
}

.hero__cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
    text-align: center;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(50, 187, 145, 0.35);
}

.btn--primary:hover {
    box-shadow: 0 6px 20px rgba(50, 187, 145, 0.45);
}

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

.btn--secondary:hover {
    background: var(--color-bg);
}

.btn--calendly {
    background: white;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn--calendly:hover {
    background: #eef2fe;
}

.btn--full {
    width: 100%;
}

.btn__icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.hero__trust {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
}

.hero__visual {
    display: flex;
    justify-content: center;
}

.dashboard-card {
    width: 100%;
    max-width: 22rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.dashboard-card__header {
    display: flex;
    gap: 0.375rem;
    padding: 1rem;
    background: #eef2fe;
    border-bottom: 1px solid var(--color-border);
}

.dashboard-card__header span {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
}

.dashboard-card__header span:nth-child(1) { background: var(--color-accent); }
.dashboard-card__header span:nth-child(2) { background: var(--color-primary); }
.dashboard-card__header span:nth-child(3) { background: var(--color-secondary); }

.dashboard-card__body {
    padding: 1.25rem;
}

.dashboard-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.dashboard-card__row:last-of-type {
    border-bottom: none;
}

.dashboard-card__label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.dashboard-card__value {
    font-size: 0.9375rem;
    font-weight: 700;
}

.status--ok {
    color: var(--color-secondary-dark);
}

.dashboard-card__bar {
    height: 0.5rem;
    background: #e8eefc;
    border-radius: 9999px;
    margin-top: 1rem;
    overflow: hidden;
}

.dashboard-card__bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 9999px;
}

/* Logos */
.logos {
    padding: 2rem 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.logos__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}

.logos__title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.logos__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.logo-item {
    padding: 0.625rem 1.25rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-weight: 700;
    color: var(--color-text);
}

/* Sections */
.benefits,
.steps {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    max-width: 42rem;
    margin: 0 auto 2.5rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.section-title--light {
    color: white;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.0625rem;
}

.benefits__grid {
    display: grid;
    gap: 1.25rem;
}

.benefit-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.benefit-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.benefit-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    font-weight: 800;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.benefit-card__icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.benefit-card__icon--sri {
    background: #e8eefc;
    color: var(--color-primary);
}

.benefit-card__icon--iess {
    background: #e0f7f1;
    color: var(--color-secondary-dark);
}

.benefit-card__icon--mdt {
    background: #fef3d9;
    color: var(--color-accent-dark);
}

.benefit-card__icon--support {
    background: #e8eefc;
    color: var(--color-primary);
}

.benefit-card__icon--cloud {
    background: #e0f7f1;
    color: var(--color-secondary-dark);
}

.benefit-card__icon--reports {
    background: #fef3d9;
    color: var(--color-accent-dark);
}

.benefit-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.benefit-card__text {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

/* Steps */
.steps {
    background: var(--color-surface);
}

.steps__grid {
    display: grid;
    gap: 1.25rem;
}

.step-card {
    position: relative;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.step-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--color-primary);
    color: white;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.step-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step-card__text {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

/* Documents */
.documents {
    padding: 4rem 0;
    background: linear-gradient(180deg, var(--color-bg) 0%, #ffffff 100%);
}

.documents__grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.document-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.document-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.document-card--highlight {
    border-color: var(--color-secondary);
    background: linear-gradient(180deg, #ffffff 0%, #f0fcf7 100%);
}

.document-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: #e8eefc;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.document-card__icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.document-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.document-card__text {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.compare {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 3rem;
}

.compare__title {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.25rem;
}

.compare__table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compare__row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.compare__row--head {
    display: none;
}

.compare__feature {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.compare__option {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
}

.compare__option::before {
    content: attr(data-label);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.compare__option--brand {
    background: #f0fcf7;
    border-left: 3px solid var(--color-secondary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 0.5rem 0.75rem;
}

.compare__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    flex-wrap: wrap;
    font-size: 0.9em;
}

.compare__yes,
.compare__no,
.compare__partial {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.compare__yes::after {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--color-secondary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    order: -1;
}

.compare__no::after {
    content: "✕";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: #e0e0e0;
    color: #666;
    border-radius: 50%;
    font-size: 0.75rem;
    order: -1;
}

.compare__partial::after {
    content: "~";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    order: -1;
}

.licensing__title {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.25rem;
}

.licensing__grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.licensing-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.licensing-card--highlight {
    border-color: var(--color-primary);
    background: linear-gradient(180deg, #ffffff 0%, #eef2fe 100%);
}

.licensing-card__name {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.licensing-card__desc {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.documents__cta {
    text-align: center;
}

/* CTA section */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1a3261 0%, #415f7d 100%);
}

.cta-section__container {
    display: grid;
    gap: 2.5rem;
    align-items: start;
}

.cta-section__text {
    color: #d4e0f7;
    margin-top: 0.75rem;
    font-size: 1.0625rem;
}

.cta-section__contact {
    margin-top: 1.5rem;
}

.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #7aeebf;
    font-weight: 700;
    font-size: 1.125rem;
    transition: color 0.2s;
}

.whatsapp-link:hover {
    color: #a8f5d6;
}

.whatsapp-link svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Form */
.lead-form {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
    color: #8ca0c2;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(86, 112, 238, 0.15);
}

.form-input--textarea {
    resize: vertical;
    min-height: 6rem;
}

.form-input.is-invalid {
    border-color: #e74c3c;
}

.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.form-error {
    display: none;
    color: #c0392b;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
}

.form-input.is-invalid + .form-error {
    display: block;
}

.form-note {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: 0.875rem;
}

.form-group--divider {
    margin-bottom: 1.25rem;
}

.form-or {
    display: block;
    text-align: center;
    margin-top: 0.875rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* WhatsApp float button */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.75rem;
    height: 3.75rem;
    background: #25d366;
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}

.whatsapp-float svg {
    width: 1.875rem;
    height: 1.875rem;
}

/* Footer */
.footer {
    padding: 2.5rem 0;
    background: #1a3261;
    color: #d4e0f7;
}

.footer__container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer__tagline {
    margin-top: 0.5rem;
    font-size: 0.9375rem;
}

.footer__contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer__contact a {
    color: #a4b8ec;
    transition: color 0.2s;
}

.footer__contact a:hover {
    color: white;
}

.footer__copy {
    text-align: center;
    font-size: 0.875rem;
    color: #8ca0c2;
    border-top: 1px solid #415f7d;
    padding-top: 1.5rem;
}

.logo--footer .logo__text {
    color: white;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: #1a3261;
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    z-index: 100;
    white-space: nowrap;
}

.toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (min-width: 640px) {
    .hero__title {
        font-size: 2.75rem;
    }

    .hero__cta {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .benefits__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .documents__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .licensing__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer__container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }

    .nav {
        display: flex;
    }

    .hero {
        padding: 4.5rem 0 5.5rem;
    }

    .hero__container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .hero__title {
        font-size: 3.25rem;
    }

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

    .benefits__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .documents__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .compare__table {
        display: grid;
        gap: 0.5rem;
    }

    .compare__row {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        align-items: center;
        gap: 1rem;
        background: var(--color-bg);
        border: none;
        border-radius: var(--radius);
        padding: 0.875rem 1rem;
    }

    .compare__row--head {
        display: grid;
        background: var(--color-primary);
        color: white;
    }

    .compare__feature {
        font-size: 0.9375rem;
        font-weight: 500;
        padding-bottom: 0;
        border-bottom: none;
    }

    .compare__option {
        flex-direction: row;
        justify-content: center;
    }

    .compare__option::before {
        content: none;
    }

    .compare__option--brand {
        background: transparent;
        border-left: none;
        padding: 0;
        border-radius: 0;
    }

    .licensing__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cta-section__container {
        grid-template-columns: 1fr 1fr;
        gap: 3.5rem;
    }

    .lead-form {
        padding: 2rem;
    }
}

@media (max-width: 767px) {
    .nav.is-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 4rem;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow);
    }
}
