/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font Variables */
:root {
  /* Fuente base */
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Pesos específicos */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: #1a202c;
    background-color: #ffffff;
    overflow-x: hidden;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    z-index: 9999;
    transition: width 0.3s ease;
}

/* Custom Animations */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(2deg); 
    }
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.3); 
    }
    50% { 
        box-shadow: 0 0 30px rgba(34, 197, 94, 0.6); 
    }
}

@keyframes bounce-slow {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Animation classes */
.animate-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Enhanced hover effects */
[class*="card"]:hover [class*="icon"] {
    transform: scale(1.1) rotate(5deg);
}

[class*="icon"] {
    transition: transform 0.3s ease;
}

/* Header transition */
header {
    transition: all 0.3s ease-in-out;
}

/* Mobile menu animations */
[data-mobile-menu]:not(.hidden) {
    animation: slideIn 0.3s ease-out;
}

/* Loading animation for buttons */
button.loading {
    position: relative;
    color: transparent;
}

button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    header,
    [data-mobile-menu-button],
    button,
    #successModal {
        display: none !important;
    }
}

/* WhatsApp Chat Animation */
.message {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Demo Screen Transitions */
.demo-screen {
    transition: all 0.5s ease-in-out;
}

.demo-screen:not(.hidden) {
    opacity: 1;
    transform: translateX(0);
}

.demo-screen.hidden {
    opacity: 0;
    transform: translateX(20px);
}

/* Demo Step Active State */
[data-step].border-primary-600 {
    border-color: #22c55e !important;
    background-color: #f0fdf4 !important;
}

/* Animation classes */
.animate-bounce-slow {
    animation: bounce-slow 2s infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* Pricing Toggle Animation */
.pricing-toggle {
    transition: all 0.3s ease;
}

.pricing-toggle.active {
    background-color: #22c55e;
}

/* Form Validation */
input.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1) !important;
}

/* Success Modal Animation */
#successModal {
    transition: all 0.3s ease;
}

#successModal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

#successModal.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Mobile Menu Button Animation */
[data-mobile-menu-button].active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

[data-mobile-menu-button].active span:nth-child(2) {
    opacity: 0;
}

[data-mobile-menu-button].active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

[data-mobile-menu-button] span {
    transition: all 0.3s ease;
}

/* Stats Counter Animation */
.stat-number {
    transition: all 0.3s ease;
}

/* Feature Card Hover Effects */
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-card {
    transition: all 0.3s ease;
}

/* Testimonial Card Hover Effects */
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.testimonial-card {
    transition: all 0.3s ease;
}

/* Pricing Card Hover Effects */
.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.pricing-card {
    transition: all 0.3s ease;
}

/* Step Card Hover Effects */
.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.step-card {
    transition: all 0.3s ease;
}

/* Problem/Solution Card Hover Effects */
.problem-item:hover,
.solution-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.problem-item,
.solution-item {
    transition: all 0.3s ease;
}

/* Status Card Hover Effects */
.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.status-card {
    transition: all 0.3s ease;
}

/* FAQ Accordion */
.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    display: block !important;
}

.faq-answer {
    transition: all 0.3s ease;
}

/* CTA Button Hover Effects */
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cta-button {
    transition: all 0.3s ease;
}

/* Footer Link Hover Effects */
footer a:hover {
    transform: translateY(-2px);
}

footer a {
    transition: all 0.3s ease;
}

/* Social Link Hover Effects */
.social-link:hover {
    transform: scale(1.1);
}

.social-link {
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a202c;
        color: #e2e8f0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .cta-button {
        border: 2px solid currentColor;
    }
    
    .feature-card,
    .testimonial-card,
    .pricing-card {
        border: 1px solid #e2e8f0;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Visible for Better Accessibility */
.cta-button:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #22c55e;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Screen Reader Only */
.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;
}

/* Plus Jakarta Sans Typography Classes */
/* Hero Principal */
.hero-h1 {
  font-family: var(--font-primary);
  font-weight: var(--font-extrabold);
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

/* Subtítulos */
.hero-subtitle {
  font-family: var(--font-primary);
  font-weight: var(--font-regular);
  font-size: 1.25rem;
  line-height: 1.5;
  opacity: 0.8;
}

/* Métricas Sociales */
.metric-number {
  font-family: var(--font-primary);
  font-weight: var(--font-bold);
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(45deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-label {
  font-family: var(--font-primary);
  font-weight: var(--font-medium);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
