/* ==========================================================================
   VARIABLES Y CONFIGURACIÓN BASE
   ========================================================================== */
   :root {
    /* Paleta de Colores */
    --primary: #1E88E5;
    --primary-dark: #1565C0;
    --primary-light: #e3f2fd;
    --secondary: #e3ae2f;
    
    --bg-general: #d9eafc;
    --bg-white: #ffffff;
    --bg-dark: #0f172a; /* Azul corporativo muy oscuro para legal */
    
    --text-main: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    
    /* UI Design Tokens */
    --radius: 12px;
    --radius-btn: 8px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ==========================================================================
   SISTEMA DE GRID Y LAYOUT (Mobile First)
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.bg-white {
    background-color: var(--bg-white);
}

.grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .section {
        padding: 8rem 0;
    }
    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

/* ==========================================================================
   COMPONENTES
   ========================================================================== */
/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn--primary {
    background-color: var(--primary);
    color: #fff;
}

.btn--primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn--outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn--outline:hover {
    background-color: var(--primary-light);
}

.btn--text {
    color: var(--text-secondary);
}

.btn--text:hover {
    color: var(--text-main);
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

/* Tarjetas Base */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

/* ==========================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.header.scrolled {
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.05em;
}

.logo b {
    color: var(--primary);
}

.nav__list {
    display: none; /* Oculto en móvil por simplicidad en landing */
}

@media (min-width: 768px) {
    .nav__list {
        display: flex;
        gap: 2.5rem;
    }
    .nav__link {
        font-weight: 500;
        color: var(--text-secondary);
    }
    .nav__link:hover {
        color: var(--text-main);
    }
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header__actions .btn--text {
    display: none;
}

@media (min-width: 768px) {
    .header__actions .btn--text {
        display: inline-flex;
    }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
/* EFECTO DE FONDO MODERNO PARA EL HERO (Estilo Stripe/Linear) */
.hero {
    position: relative;
    overflow: hidden;
    padding-top: 10rem;
    text-align: center;
    background-color: var(--bg-general);
    
    /* Patrón de cuadrícula tipo "papel milimetrado" muy sutil */
    background-image: 
        linear-gradient(to right, rgba(30, 136, 229, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(30, 136, 229, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Efecto de difuminado en la parte inferior para que la cuadrícula desaparezca suavemente */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--bg-general));
    z-index: 0;
}

/* Resplandor luminoso azul/oro difuminado en el fondo */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 80vh;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.08) 0%, rgba(227, 174, 47, 0.03) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* Asegurar que el contenido del hero esté por encima del fondo decorativo */
.hero__container {
    position: relative;
    z-index: 1;
}

.hero__title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero__buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

@media (min-width: 640px) {
    .hero__buttons {
        flex-direction: row;
    }
    .hero__title {
        font-size: 4rem;
    }
    .hero__subtitle {
        font-size: 1.25rem;
    }
}

.hero__mockup {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    margin: 0 auto;
    transform: perspective(1000px) rotateX(2deg);
}

.mockup-content {
    background: var(--bg-general);
    border-radius: 8px;    
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 500;
    border: 1px dashed #cbd5e1;
}

@media (min-width: 768px) {
    .mockup-content {
        height: 500px;
    }
}

/* ==========================================================================
   FUNCIONALIDADES
   ========================================================================== */
.feature-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-card .card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card .card-text {
    color: var(--text-secondary);
}

/* ==========================================================================
   BANNER LEGAL
   ========================================================================== */
.banner-legal {
    background-color: var(--bg-dark);
    padding: 3rem 0;
}

.banner-legal__text {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.5;
}

/* ==========================================================================
   PRECIOS
   ========================================================================== */
.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.toggle-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.toggle-label.active {
    color: var(--text-main);
}

.toggle-switch {
    width: 56px;
    height: 32px;
    background-color: var(--primary);
    border-radius: 99px;
    position: relative;
    cursor: pointer;
}

.toggle-circle {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 4px;
    left: 4px; /* Simula estado mensual por defecto */
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.badge {
    background: var(--secondary);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 99px;
    margin-left: 0.5rem;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card--highlight {
    border: 2px solid var(--primary);
    transform: scale(1);
    box-shadow: var(--shadow-md);
}

@media (min-width: 1024px) {
    .pricing-card--highlight {
        transform: scale(1.05); /* Sobresale en desktop */
    }
    .pricing-card--highlight:hover {
        transform: scale(1.05) translateY(-4px);
    }
}

.pricing-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 0.25rem 1rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-card__title {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.pricing-card__price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.pricing-card__price .period {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.pricing-card__desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.pricing-card__features {
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.pricing-card__features li {
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.pricing-card__features li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
    margin-right: 0.75rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 2rem;
}

.footer__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .footer__container {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer__brand p {
    color: var(--text-secondary);
    margin: 1.5rem 0;
    max-width: 300px;
}

.footer__contact {
    font-weight: 600;
    color: var(--primary);
}

.footer__links h4 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer__links li {
    margin-bottom: 0.75rem;
}

.footer__links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.footer__bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ==========================================================================
   ESTILOS PARA PÁGINAS INTERNAS (PRODUCTO Y LEGAL)
   ========================================================================== */

/* Cabeceras de página */
.header--internal {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
}

.page-header {
    background-color: var(--primary-light);
    padding: 6rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.page-header__subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   LAYOUT DEL CENTRO LEGAL (SIDEBAR + CONTENT)
   ========================================================================== */
.legal-hub {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 4rem 1.5rem;
    align-items: start;
}

@media (min-width: 768px) {
    .legal-hub {
        grid-template-columns: 250px 1fr;
        gap: 5rem;
    }
}

/* Menú lateral sticky */
.sticky-nav {
    position: sticky;
    top: 100px; /* Debajo del header */
}

.sticky-nav__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 2px solid var(--border-color);
    padding-left: 1.5rem;
}

.sticky-nav__link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Contenido Legal Typograhy */
.legal-content {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.legal-section {
    margin-bottom: 3rem;
    scroll-margin-top: 100px; /* Para que el menú no tape el título al hacer clic */
}

.legal-section h2 {
    font-size: 1.75rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.legal-section h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin: 1.5rem 0 1rem;
}

.legal-section p, 
.legal-section ul {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.legal-section ul {
    padding-left: 1.5rem;
    list-style-type: disc;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

.legal-section strong {
    color: var(--text-main);
}

.legal-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 3rem 0;
}

/* ==========================================================================
   LAYOUT DE PRODUCTO (SHOWCASE & CHANGELOG)
   ========================================================================== */

/* Showcase Z-Pattern */
.showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 6rem;
}

@media (min-width: 860px) {
    .showcase {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }
    .showcase--reverse .showcase__content {
        order: 2;
    }
    .showcase--reverse .showcase__image {
        order: 1;
    }
}

.showcase__content h3 {
    font-size: 2rem;
    margin: 1rem 0 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

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

.mockup-placeholder {
    width: 100%;
    height: 400px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-weight: 600;
    border: 1px dashed #cbd5e1;
    box-shadow: var(--shadow-lg);
}

.bg-light-blue { background-color: var(--primary-light); color: var(--primary-dark); }
.bg-light-gold { background-color: #fef3c7; color: #b45309; }

/* Badges */
.badge-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.badge-tag--alert { background: #fee2e2; color: #b91c1c; }
.badge-tag--new { background: #dcfce7; color: #15803d; }
.badge-tag--update { background: var(--primary-light); color: var(--primary-dark); }
.badge-tag--launch { background: #f3e8ff; color: #7e22ce; }
.badge-tag:not(.badge-tag--alert):not(.badge-tag--new):not(.badge-tag--update):not(.badge-tag--launch) {
    background: var(--bg-general); color: var(--text-secondary); border: 1px solid var(--border-color);
}

/* Línea de tiempo (Changelog) */
.changelog-header {
    margin-bottom: 4rem;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
}

.timeline__item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: -2.65rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    background: var(--primary);
    border: 4px solid var(--bg-general);
    border-radius: 50%;
}

.timeline__date {
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.timeline__content h4 {
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem;
    color: var(--text-main);
}

.timeline__content p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

 /* ESTILOS RESPONSIVE PARA EL LEGAL HEADER */
    
.legal-header-grid {
    display: grid;
    grid-template-columns: 1fr; /* Móvil: 1 sola columna */
    gap: 3rem;
    align-items: center;
}

/* Escritorio: 2 columnas iguales (Mitad imagen, mitad texto) */
@media (min-width: 860px) {
    .legal-header-grid {
        grid-template-columns: 1fr 1fr; 
        gap: 5rem;
    }
}
    
* ==========================================================================
   PRODUCT HERO REFINADO
   ========================================================================== */
.product-hero {
    position: relative;
    padding: 8rem 0 4rem;
    overflow: hidden;
    background-color: var(--bg-general);
    border-bottom: 1px solid var(--border-color);
}

.product-hero__bg {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.08) 0%, rgba(227, 174, 47, 0.03) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   BENTO BOX LAYOUT (Diseño SaaS Moderno)
   ========================================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 860px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: minmax(300px, auto);
    }
}

.bento-card {
    background: var(--bg-white);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.bento-card:hover, .bento-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Tramos de la cuadrícula en Escritorio */
@media (min-width: 860px) {
    .bento-card--large {
        grid-column: span 2; /* Ocupa 2 columnas */
    }
    .bento-card--wide {
        grid-column: span 3; /* Ocupa la fila entera */
    }
}

.bento-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 1rem 0;
    letter-spacing: -0.02em;
}

.bento-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.icon-circle {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   ANIMACIONES CSS PURAS (Láser IA y Gráficos)
   ========================================================================== */

/* Animación del Escáner IA de Tickets */
.bento-card--ai {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
}

.ai-scanner-visual {
    margin-top: 2rem;
    position: relative;
    height: 180px;
    background: var(--bg-general);
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.receipt {
    width: 120px;
    height: 150px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.receipt-line {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
}

.laser-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 15px 5px rgba(30, 136, 229, 0.4);
    animation: scan 3s ease-in-out infinite;
}

@keyframes scan {
    0% { top: 10%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 90%; opacity: 0; }
}

/* Animación de los mini gráficos de la tarjeta Dashboard */
.mini-charts {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 100px;
    padding-top: 20px;
}

.mini-charts .bar {
    width: 24px;
    border-radius: 4px 4px 0 0;
    transform-origin: bottom;
    animation: growBar 1.5s ease-out forwards;
}

@keyframes growBar {
    0% { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

/* Efecto de brillo en la línea de tiempo (Changelog) */
.timeline__item::before {
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
    transition: all 0.3s ease;
}

.timeline__item:hover::before {
    transform: scale(1.2);
    background: var(--secondary);
    box-shadow: 0 0 0 4px rgba(227, 174, 47, 0.2);
}