/* ============================
   YaFacturo Landing - Style
   ============================ */

:root {
    --sky: #0EA5E9;
    --sky-light: #38BDF8;
    --sky-dark: #0284C7;
    --eme: #10B981;
    --eme-light: #34D399;
    --vio: #A78BFA;
    --vio-light: #C4B5FD;
    --amber: #F59E0B;
    --dark: #0F172A;
    --dark-2: #111827;
    --slate: #1E293B;
    --slate-light: #334155;
    --slate-lighter: #475569;
    --text: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border: #334155;
    --card-bg: #1E293B;
    --card-hover: #263347;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --shadow: 0 4px 6px -1px rgba(0,0,0,.3), 0 2px 4px -2px rgba(0,0,0,.2);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.4), 0 4px 6px -4px rgba(0,0,0,.3);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

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

a { color: var(--sky-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--sky); }

.me-1 { margin-right: 0.25rem; }

/* ============================
   NAV
   ============================ */
.nav-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background .3s;
}
.nav-bar.scrolled { background: rgba(15, 23, 42, 0.95); }

.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 1.25rem; color: var(--text);
}
.nav-logo:hover { color: var(--text); }
.nav-logo-img { height: 32px; width: auto; }

.nav-links {
    display: flex; gap: 32px;
}
.nav-link {
    color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
    transition: color .2s; position: relative;
}
.nav-link:hover { color: var(--text); }
.nav-link::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--sky);
    transition: width .2s;
}
.nav-link:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.btn-acceder {
    display: inline-flex; align-items: center; padding: 8px 20px;
    background: var(--sky); color: #fff; border-radius: 8px;
    font-size: 0.9rem; font-weight: 600; transition: all .2s;
}
.btn-acceder:hover { background: var(--sky-dark); color: #fff; transform: translateY(-1px); }

.nav-hamburger {
    display: none; background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 5px; padding: 4px;
}
.nav-hamburger span {
    display: block; width: 24px; height: 2px; background: var(--text);
    transition: all .3s;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile {
    display: none; flex-direction: column; padding: 16px 24px 24px;
    background: rgba(15, 23, 42, 0.98); border-top: 1px solid var(--border);
}
.nav-mobile.show { display: flex; }
.nav-mobile-link {
    padding: 12px 0; color: var(--text-secondary); font-size: 1rem;
    border-bottom: 1px solid var(--border);
}
.nav-mobile-link:hover { color: var(--text); }
.btn-acceder-mobile {
    display: block; text-align: center; margin-top: 16px;
    padding: 12px; background: var(--sky); color: #fff;
    border-radius: 8px; font-weight: 600;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
}

/* ============================
   HERO
   ============================ */
.hero {
    padding: 140px 0 80px; position: relative; overflow: hidden;
    min-height: 90vh; display: flex; align-items: center;
}
.hero-container {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    align-items: center; position: relative; z-index: 2;
}
.hero-title {
    font-size: 3.5rem; font-weight: 800; line-height: 1.1;
    letter-spacing: -0.02em; margin-bottom: 24px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--sky-light), var(--eme-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.2rem; color: var(--text-secondary);
    max-width: 480px; margin-bottom: 32px; line-height: 1.7;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-primary-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px; background: linear-gradient(135deg, var(--sky), var(--sky-dark));
    color: #fff; border-radius: 10px; font-weight: 600; font-size: 1rem;
    transition: all .2s; box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}
.btn-primary-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4); color: #fff; }
.btn-primary-cta.btn-lg { padding: 16px 36px; font-size: 1.1rem; }

.btn-secondary-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px; background: transparent; color: var(--text);
    border: 1px solid var(--border); border-radius: 10px;
    font-weight: 500; font-size: 1rem; transition: all .2s;
}
.btn-secondary-cta:hover { border-color: var(--sky); color: var(--sky-light); }

/* Phone mockup */
.phone-frame {
    width: 280px; margin: 0 auto;
    background: var(--slate); border-radius: 32px;
    border: 3px solid var(--slate-light);
    overflow: hidden; box-shadow: var(--shadow-lg);
    position: relative;
}
.phone-frame-small { width: 260px; }
.phone-notch {
    width: 120px; height: 24px; margin: 0 auto;
    background: var(--dark); border-radius: 0 0 16px 16px;
}
.wa-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; background: #075E54;
}
.wa-header-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--sky); display: flex; align-items: center;
    justify-content: center; font-weight: 700; font-size: 0.8rem; color: #fff;
}
.wa-header-info { flex: 1; }
.wa-header-name { font-size: 0.85rem; font-weight: 600; color: #fff; }
.wa-header-status { font-size: 0.7rem; color: rgba(255,255,255,.7); }

.wa-chat {
    background: #0B141A; padding: 12px; min-height: 320px;
    display: flex; flex-direction: column; gap: 8px;
    overflow-y: auto; max-height: 380px;
}
.wa-msg {
    max-width: 85%; padding: 8px 12px; border-radius: 8px;
    font-size: 0.8rem; line-height: 1.4; animation: msgAppear .3s ease;
    white-space: pre-line;
}
.wa-msg-user {
    align-self: flex-end; background: #005C4B; color: #fff;
    border-bottom-right-radius: 2px;
}
.wa-msg-bot {
    align-self: flex-start; background: #1F2C34; color: #E9EDEF;
    border-bottom-left-radius: 2px;
}

.hero-gradient-bg {
    position: absolute; top: -50%; right: -20%; width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(14,165,233,.15) 0%, transparent 70%);
    pointer-events: none; z-index: 1;
}

@media (max-width: 768px) {
    .hero { padding: 100px 0 60px; min-height: auto; }
    .hero-container { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { margin: 0 auto 24px; }
    .hero-ctas { justify-content: center; }
    .hero-mockup { order: -1; }
    .phone-frame { width: 240px; }
    .wa-chat { min-height: 260px; max-height: 300px; }
}

/* ============================
   SECTION HEADER
   ============================ */
.section-header {
    text-align: center; margin-bottom: 48px;
}
.section-header h2 {
    font-size: 2.2rem; font-weight: 700; margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.section-header p {
    color: var(--text-secondary); font-size: 1.1rem;
}

/* ============================
   FEATURES
   ============================ */
.features { padding: 100px 0; background: var(--dark-2); }

.features-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.feature-card {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    transition: all .3s; cursor: default;
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--slate-lighter);
    background: var(--card-hover);
    box-shadow: var(--shadow-lg);
}
.feature-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: 16px;
}
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

@media (max-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 480px) { .features-grid { grid-template-columns: 1fr; } }

/* ============================
   WHATSAPP SECTION
   ============================ */
.whatsapp-section { padding: 100px 0; }

.wa-split {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    align-items: center;
}
.wa-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; background: rgba(37, 211, 102, 0.15);
    color: #25D366; border-radius: 20px; font-size: 0.85rem;
    font-weight: 600; margin-bottom: 20px;
}
.wa-info h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 12px; }
.wa-desc { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 8px; }
.wa-desc-detail { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; }

.wa-commands { display: flex; flex-direction: column; gap: 8px; }
.wa-cmd-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; background: var(--slate);
    border-radius: 8px; border: 1px solid var(--border);
    transition: border-color .2s;
}
.wa-cmd-item:hover { border-color: #25D366; }
.wa-cmd-code {
    font-family: 'Courier New', monospace; font-weight: 700;
    color: #25D366; font-size: 0.85rem; min-width: 110px;
}
.wa-cmd-desc { color: var(--text-secondary); font-size: 0.85rem; }

@media (max-width: 768px) {
    .wa-split { grid-template-columns: 1fr; gap: 40px; }
    .wa-mockup-section { order: -1; }
}

/* ============================
   PRICING
   ============================ */
.pricing { padding: 100px 0; background: var(--dark-2); }

.pricing-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
    max-width: 960px; margin: 0 auto;
}
.pricing-card {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px;
    display: flex; flex-direction: column; transition: all .3s;
}
.pricing-card.popular {
    border-color: var(--sky); position: relative;
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.15);
    transform: scale(1.02);
}
.pricing-popular-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--sky); color: #fff; padding: 4px 16px;
    border-radius: 20px; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.pricing-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.pricing-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }
.pricing-price {
    font-size: 2.5rem; font-weight: 800; margin-bottom: 4px;
}
.pricing-price .currency { font-size: 1.2rem; vertical-align: top; }
.pricing-price .period { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.pricing-features {
    list-style: none; margin: 24px 0; flex: 1;
    display: flex; flex-direction: column; gap: 10px;
}
.pricing-features li {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.9rem; color: var(--text-secondary);
}
.pricing-features li i { color: var(--eme); font-size: 1rem; }
.pricing-cta {
    display: block; text-align: center; padding: 12px;
    border-radius: 8px; font-weight: 600; font-size: 0.95rem;
    transition: all .2s;
}
.pricing-cta-primary {
    background: var(--sky); color: #fff;
}
.pricing-cta-primary:hover { background: var(--sky-dark); color: #fff; }
.pricing-cta-outline {
    border: 1px solid var(--border); color: var(--text);
}
.pricing-cta-outline:hover { border-color: var(--sky); color: var(--sky-light); }

@media (max-width: 768px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
    .pricing-card.popular { transform: none; }
}

/* ============================
   HOWTO
   ============================ */
.howto { padding: 100px 0; }

.howto-steps {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
    position: relative;
}
.howto-steps::before {
    content: ''; position: absolute; top: 40px; left: 12.5%; right: 12.5%;
    height: 2px; background: linear-gradient(90deg, var(--sky), var(--eme));
    z-index: 0;
}
.howto-step {
    text-align: center; position: relative; z-index: 1;
}
.howto-step-num {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--slate); border: 2px solid var(--sky);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 1.5rem; color: var(--sky);
    transition: all .3s;
}
.howto-step:hover .howto-step-num {
    background: var(--sky); color: #fff;
}
.howto-step h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.howto-step p { font-size: 0.85rem; color: var(--text-secondary); max-width: 220px; margin: 0 auto; }

@media (max-width: 768px) {
    .howto-steps { grid-template-columns: 1fr 1fr; }
    .howto-steps::before { display: none; }
}
@media (max-width: 480px) {
    .howto-steps { grid-template-columns: 1fr; }
}

/* ============================
   FAQ
   ============================ */
.faq { padding: 100px 0; background: var(--dark-2); }

.faq-list { max-width: 720px; margin: 0 auto; }

.faq-item {
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 12px; overflow: hidden; transition: border-color .2s;
}
.faq-item:hover { border-color: var(--slate-lighter); }
.faq-item.open { border-color: var(--sky); }

.faq-question {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; cursor: pointer; background: var(--card-bg);
    font-weight: 500; font-size: 0.95rem; transition: background .2s;
    user-select: none;
}
.faq-question:hover { background: var(--card-hover); }
.faq-question i {
    transition: transform .3s; color: var(--text-muted);
    font-size: 1.1rem; flex-shrink: 0; margin-left: 12px;
}
.faq-item.open .faq-question i { transform: rotate(180deg); color: var(--sky); }

.faq-answer {
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.faq-answer-inner {
    padding: 0 20px 16px; color: var(--text-secondary);
    font-size: 0.9rem; line-height: 1.7;
}

/* ============================
   CTA FINAL
   ============================ */
.cta-final {
    padding: 100px 0; text-align: center;
    background: linear-gradient(135deg, rgba(14,165,233,.08), rgba(16,185,129,.08));
}
.cta-content h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 16px; }
.cta-content p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 32px; }

/* ============================
   FOOTER
   ============================ */
.footer {
    padding: 60px 0 30px; border-top: 1px solid var(--border);
    background: var(--dark);
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
    margin-bottom: 40px;
}
.footer-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 12px;
}
.footer-logo-img { height: 28px; }
.footer-tagline { color: var(--text-muted); font-size: 0.9rem; }

.footer-links h4 {
    font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 16px;
}
.footer-links a {
    display: block; color: var(--text-secondary); font-size: 0.9rem;
    padding: 4px 0; transition: color .2s;
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
    border-top: 1px solid var(--border); padding-top: 20px;
    text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
}
