

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(ellipse at center, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
}

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.small-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Trust badges under the hero CTA */
.hero-badges {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.1rem 0.6rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(6px);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(102, 126, 234, 0.5);
}

.hero-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    font-size: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.22), rgba(118, 75, 162, 0.22));
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.hero-badge-text strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}

.hero-badge-text small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 560px) {
    .hero-badges {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .hero-badge {
        justify-content: flex-start;
    }
}

/* Secciones */
.section-dark {
    background-color: var(--dark-navy);
    padding: var(--section-padding);
}

.section-light {
    background-color: var(--navy);
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem 1.9rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(102, 126, 234, 0.45);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 1.4rem;
    border-radius: 14px;
    color: #ffffff;
    background: var(--gradient-primary);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card-icon {
    transform: scale(1.08) rotate(-4deg);
}

.card-icon svg {
    width: 28px;
    height: 28px;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.card p {
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 0.95rem;
}

/* Feature Section */
.feature-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Scroll-reveal: el estado inicial oculto SOLO se aplica cuando el JS añade
   la clase .reveal, de modo que sin JS todo permanece visible. */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.reveal.reveal-x { transform: translateX(40px); }
.reveal.in-view { opacity: 1; transform: none; }

/* Escalonado de la lista de ventajas */
.feature-list .feature-item.reveal { transition-delay: calc(var(--i, 0) * 0.12s); }

@media (prefers-reduced-motion: reduce) {
    .mockup-screen,
    .mockup-container::before,
    .verifactu-badge { animation: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

.feature-text {
    max-width: 600px;
}

.feature-description {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.feature-list {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    color: #e2e8f0;
    line-height: 1.55;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.feature-item:hover {
    background: rgba(102, 126, 234, 0.07);
    border-color: rgba(102, 126, 234, 0.28);
    transform: translateX(4px);
}

.feature-item strong {
    color: #ffffff;
}

.feature-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a1628;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 1px;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.35);
    transition: transform 0.25s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.12);
}

/* Mockup */
.mockup-container {
    perspective: 1000px;
}

.mockup-container {
    perspective: 1200px;
    position: relative;
}

/* Resplandor difuso detrás del mockup */
.mockup-container::before {
    content: '';
    position: absolute;
    inset: 8% 12%;
    background: radial-gradient(ellipse at center, rgba(102, 126, 234, 0.4), transparent 70%);
    filter: blur(40px);
    z-index: 0;
    animation: mockupGlow 5s ease-in-out infinite;
}

.mockup-screen {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, var(--light-navy), #232f42);
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    overflow: hidden;
    transform: rotateY(-8deg) rotateX(6deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    transform-style: preserve-3d;
    animation: mockupFloat 6s ease-in-out infinite;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
}

/* Al pasar el ratón, el mockup se endereza y se acerca */
.mockup-container:hover .mockup-screen {
    animation-play-state: paused;
    transform: rotateY(0deg) rotateX(0deg) translateY(-6px) scale(1.02);
    box-shadow: 0 40px 80px rgba(102, 126, 234, 0.3);
}

@keyframes mockupFloat {
    0%, 100% { transform: rotateY(-8deg) rotateX(6deg) translateY(0); }
    50%      { transform: rotateY(-8deg) rotateX(6deg) translateY(-14px); }
}

@keyframes mockupGlow {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 0.85; }
}

.mockup-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mockup-dots {
    display: flex;
    gap: 0.5rem;
}

.mockup-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
}



.mockup-dots span:nth-child(1) { background: #ff5f56; }
.mockup-dots span:nth-child(2) { background: #ffbd2e; }
.mockup-dots span:nth-child(3) { background: #27ca3f; }

.mockup-title {
    font-weight: 600;
    color: var(--white);
}

.mockup-content {
    padding: 2rem;
}

.mockup-invoice {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.invoice-header h4 {
    color: var(--white);
    margin: 0;
}

.verifactu-badge {
    background: var(--gradient-accent);
    color: #0a1628;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    animation: badgePulse 2.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.5); }
    50%      { box-shadow: 0 0 0 6px rgba(79, 172, 254, 0); }
}

.invoice-details {
    margin-bottom: 1.5rem;
}

.invoice-line {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

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

.qr-code {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    padding: 6px;
    background: #ffffff;
    /* Patrón tipo QR generado con gradientes (damero + esquinas) */
    background-image:
        linear-gradient(90deg, #0a1628 2px, transparent 2px),
        linear-gradient(#0a1628 2px, transparent 2px);
    background-size: 8px 8px;
    background-position: 6px 6px;
    box-shadow: inset 0 0 0 6px #ffffff;
    position: relative;
}

/* Tres "ojos" del QR en las esquinas */
.qr-code::before,
.qr-code::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border: 3px solid #0a1628;
    border-radius: 2px;
}
.qr-code::before { top: 6px; left: 6px; box-shadow: 36px 0 0 -1px #ffffff, 36px 0 0 2px #0a1628; }
.qr-code::after  { bottom: 6px; left: 6px; }

.qr-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* Pricing */
.pricing-container {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

.pricing-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    max-width: 400px;
    width: 100%;
    position: relative;
    backdrop-filter: blur(10px);
}

/* Wider pricing card variant for subscription page */
.pricing-card--wide {
    width: 100%;
    max-width: none;
}

.pricing-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-secondary);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 0 0 12px 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    padding: 3rem 2rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Billing toggle (monthly/annual) */
.billing-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0.25rem 0 0.75rem;
}

.billing-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
}
.billing-label.active { color: var(--white); }

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    transition: background 0.2s ease;
}
.switch .slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 3px;
    left: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.switch input:checked + .slider {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.switch input:checked + .slider:before {
    transform: translateX(22px);
}

/* Price animation on toggle */
.price { display: inline-flex; align-items: baseline; gap: 8px; }
.price-amount { transition: color 0.2s ease; }
.price-period { transition: color 0.2s ease; }
.price.price-animate .price-amount,
.price.price-animate .price-period {
    animation: priceSwitch 260ms ease;
}
@keyframes priceSwitch {
    0% { opacity: 0; transform: translateY(-4px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Save badge (annual savings) */
.save-badge {
    display: inline-flex;
    position: absolute;
    bottom: 35px;
    left: 30%;
    transform: translateX(-50%);
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--gradient-accent);
    color: var(--white);
    font-weight: 800;
    font-size: 0.82rem;
    line-height: 1.1;
    letter-spacing: 0.2px;
    margin: 0.375rem 0 0.25rem;
    box-shadow: 0 12px 24px -8px rgba(79, 172, 254, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: saturate(150%) blur(2px);
    backdrop-filter: saturate(150%) blur(2px);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.save-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -10px rgba(79, 172, 254, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.pricing-header .segmented + .save-badge { margin-top: 0.5rem; }

.badge-animate { animation: badgePop 260ms ease; }
@keyframes badgePop {
    0% { opacity: 0; transform: translateY(-4px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}



/* Segmented control (alternative to switch) */
.segmented {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px;
}

.segmented-option {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.12s ease;
    min-width: 110px;
}

.segmented-option.active {
    color: var(--white);
    background: var(--gradient-secondary);
    box-shadow: 0 6px 14px rgba(240, 147, 251, 0.22);
    transform: translateY(-1px);
}

.segmented-option:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

.segmented-option:not(.active):hover {
    color: var(--text-light);
}

@keyframes segmentedActivate {
    0% { opacity: 0.9; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

.pricing-header h3 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.price {
    margin: 1.5rem 0;
}

/* Placement tweaks: segmented just above price in subscription pricing card */
.subscription-page .pricing-card .pricing-header .segmented {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}
.subscription-page .pricing-card .pricing-header .price {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.price-amount {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    font-size: 1rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.price-note {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pricing-body {
    padding: 2rem;
}

.features-list {
    margin-bottom: 2rem;
}

.features-list .feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.check-icon {
    width: 20px;
    height: 20px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.pricing-cta {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.guarantee-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* FAQ */
.pricing-faq {
    max-width: 900px;
    margin: 0 auto;
}

.pricing-faq h3 {
    text-align: center;
    font-size: clamp(1.6rem, 3vw, 2rem);
    margin-bottom: 2.5rem;
    color: var(--white);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.25rem;
}

.faq-item {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    padding: 1.6rem 1.6rem 1.6rem 1.9rem;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

/* Barra de acento lateral que se ilumina al pasar el ratón */
.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    opacity: 0.45;
    transition: opacity 0.25s ease;
}

.faq-item:hover {
    transform: translateY(-4px);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.09), rgba(255, 255, 255, 0.02));
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}

.faq-item:hover::before {
    opacity: 1;
}

.faq-item h4 {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.7rem;
}

/* Marcador "?" a la izquierda de cada pregunta */
.faq-item h4::before {
    content: '?';
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
    color: #c7d2fe;
    background: rgba(102, 126, 234, 0.18);
    border: 1px solid rgba(102, 126, 234, 0.35);
}

.faq-item p {
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.65;
    margin: 0;
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .pricing-header {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .pricing-body {
        padding: 1.5rem;
    }
}