/* Custom Properties - Friendly Beige Theme */
:root {
    /* Beige & Warm Backgrounds */
    --bg-primary: #FAF9F6;      /* Off-white Beige */
    --bg-secondary: #F3F0EB;    /* Slightly darker beige for contrast */
    --bg-tertiary: #FFFFFF;     /* White for cards */

    /* Primario: Azul Eléctrico (Softened for friendly look) */
    --primary-50:  #f0fdf4;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;     /* Brand Blue */
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-rgba: 59, 130, 246;

    /* Acentos / CTAs: Verde Esmeralda/Brillante */
    --accent-400: #34d399;
    --accent-500: #10b981;      /* Brand Green */
    --accent-600: #059669;
    --accent-rgba: 16, 185, 129;

    /* Friendly Typography Colors */
    --text-primary: #1E293B;    /* Very dark blue-gray */
    --text-secondary: #475569;  /* Slate gray */
    --text-tertiary: #64748B;   /* Lighter gray */
    --text-quaternary: #94A3B8;

    /* Soft Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-primary);
}

/* Typography Hierarchy */
h1 { font-size: 64px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: 40px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 24px; font-weight: 600; line-height: 1.3; }
.text-body-large { font-size: 20px; font-weight: 400; line-height: 1.6; color: var(--text-secondary); }
.label { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary-600); }

/* Utilities */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Friendly Cards */
.glass-card {
    background: var(--bg-tertiary);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.glass-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: rgba(var(--primary-rgba), 0.1);
}

/* Primary Button (Friendly & Accessible) */
.btn-primary {
    background-color: var(--accent-500);
    color: #ffffff;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 100px; /* Pill shape for friendly look */
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
}

.btn-primary:hover {
    background-color: var(--accent-600);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.23);
}

.btn-outline {
    background: transparent;
    color: var(--primary-600);
    border: 2px solid var(--primary-200);
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: white;
}

.btn-outline:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
}

/* Glow classes turned into soft accessible shadows to keep HTML compatible */
.glow-primary {
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05));
}
.glow-accent {
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: all 0.3s ease;
    background: transparent;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--shadow-sm);
    padding: 16px 0;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-container img {
    height: 72px; /* Ampliado a solicitud del cliente */
    width: auto;
    transition: height 0.3s ease;
}
.navbar.scrolled .logo-container img {
    height: 54px; /* Se reduce un poco al hacer scroll para no tapar contenido */
}
.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    list-style: none;
}
.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--primary-600);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}
.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.hero-text {
    max-width: 600px;
}
.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    padding: 8px 16px;
    border-radius: 100px;
    color: var(--primary-700);
    font-weight: 600;
    margin-bottom: 24px;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero h1 {
    margin-bottom: 24px;
    color: var(--text-primary);
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}
.hero h1 span {
    color: var(--primary-600);
}
.hero p {
    color: var(--text-secondary);
    margin-bottom: 40px;
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}
.hero-ctas {
    display: flex;
    gap: 16px;
    opacity: 0;
    animation: scale-in 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s forwards;
}
.hero-visual {
    position: relative;
    opacity: 0;
    animation: fade-in-rotate 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}
.hero-visual img {
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    z-index: 2;
    position: relative;
    box-shadow: var(--shadow-xl);
    border: 8px solid white;
}
.sphere {
    display: none;
}

/* Social Proof */
.social-proof {
    padding: 64px 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.stat-item h3 {
    font-size: 40px;
    color: var(--primary-600);
    margin-bottom: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
}
.stat-item p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Services Friendly Cards */
.services-section {
    padding: 100px 0;
    position: relative;
}
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px;
}
.section-header h2 {
    margin-bottom: 16px;
    color: var(--text-primary);
}
.section-header p {
    color: var(--text-secondary);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.service-card-flip {
    perspective: none;
    height: auto;
    opacity: 0;
}
.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: flat;
    background: var(--bg-tertiary);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}
.service-card-flip:hover .service-card-inner {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}
.service-card-front {
    position: relative;
    width: 100%;
    height: 220px;
}
.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.service-overlay {
    display: none;
}
.service-card-back {
    position: relative;
    transform: none;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    background: transparent;
}
.service-title-back {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 700;
}
.service-description {
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    line-height: 1.6;
}
.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}
.feature-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
}

/* Animations Variables */
@keyframes fade-in-up {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes fade-in-rotate {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Particles Container - Hidden for friendly aesthetic */
.particles-container { display: none; }

/* Animate-on-scroll Helper */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* CTA & Footer */
.cta-section {
    padding: 100px 0;
    text-align: center;
    background: var(--primary-50);
    border-radius: 40px;
    margin: 0 24px 64px;
}
.cta-section h2 { margin-bottom: 24px; color: var(--text-primary); }
.cta-section p { color: var(--text-secondary); margin-bottom: 40px; font-size: 20px; }

/* CRM Form Styles */
.crm-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-tertiary);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    text-align: left;
}
.form-group {
    margin-bottom: 24px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    background: var(--bg-primary);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px var(--primary-100);
}
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}
.form-submit-btn {
    width: 100%;
    margin-top: 8px;
}

footer {
    background: var(--bg-tertiary);
    padding: 64px 0 32px;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 64px;
    margin-bottom: 64px;
}
.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 300px;
}
.footer-links h4 {
    margin-bottom: 24px;
    color: var(--text-primary);
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--primary-600);
}
.footer-bottom {
    text-align: center;
    color: var(--text-quaternary);
    padding-top: 32px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* Media Queries */
@media (max-width: 1024px) {
    .hero h1 { font-size: 48px; }
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-text { margin: 0 auto; }
    .hero-ctas { justify-content: center; }
    .hero-visual { margin-top: 40px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .cta-section { margin: 0 0 64px; border-radius: 0; }
    .crm-form-container { padding: 32px 24px; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        padding: 24px;
        box-shadow: var(--shadow-md);
    }
    .nav-links.active { display: flex; }
    .mobile-menu-toggle { display: flex; }
    .hero h1 { font-size: 36px; }
    .hero-content { gap: 32px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
