/**
 * CIADE Consulting — Capa UI moderna (B2B / SaaS)
 * Carga después del stylesheet principal.
 */

:root {
    --ciade-brand: #1e5f5c;
    --ciade-brand-dark: #164a47;
    --ciade-brand-light: #2d7d5e;
    --ciade-accent: #0ea5e9;
    --ciade-success: #059669;
    --ciade-surface: #f8fafc;
    --ciade-surface-elevated: #ffffff;
    --ciade-border: #e2e8f0;
    --ciade-border-strong: #cbd5e1;
    --ciade-text: #0f172a;
    --ciade-text-muted: #475569;
    --ciade-text-subtle: #64748b;
    --ciade-radius-sm: 0.5rem;
    --ciade-radius: 0.75rem;
    --ciade-radius-lg: 1rem;
    --ciade-radius-xl: 1.25rem;
    --ciade-radius-2xl: 1.5rem;
    --ciade-shadow-sm: 0 1px 2px rgb(15 23 42 / 0.04);
    --ciade-shadow: 0 4px 6px -1px rgb(15 23 42 / 0.06), 0 2px 4px -2px rgb(15 23 42 / 0.04);
    --ciade-shadow-md: 0 10px 25px -5px rgb(15 76 129 / 0.12), 0 8px 10px -6px rgb(15 23 42 / 0.04);
    --ciade-shadow-lg: 0 25px 50px -12px rgb(15 76 129 / 0.18);
    --ciade-gradient-hero: linear-gradient(160deg, #f0f9ff 0%, #f8fafc 42%, #eff6ff 100%);
    --ciade-gradient-brand: linear-gradient(135deg, #2d7d5e 0%, #1e5f5c 100%);
    --ciade-gradient-mesh:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgb(14 165 233 / 0.12), transparent 50%),
        radial-gradient(ellipse 60% 40% at 90% 20%, rgb(15 76 129 / 0.08), transparent 45%),
        radial-gradient(ellipse 50% 30% at 50% 100%, rgb(5 150 105 / 0.06), transparent 50%);
    --primary-color: var(--ciade-brand);
    --primary-dark: var(--ciade-brand-dark);
    --accent-color: var(--ciade-accent);
    --text-primary: var(--ciade-text);
    --text-secondary: var(--ciade-text-muted);
    --text-light: var(--ciade-text-subtle);
    --bg-secondary: var(--ciade-surface);
    --border-color: var(--ciade-border);
    --gradient-primary: var(--ciade-gradient-brand);
    --shadow-md: var(--ciade-shadow);
    --shadow-lg: var(--ciade-shadow-md);
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ciade-text);
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-shadow: none;
    color: var(--ciade-text);
}

p {
    text-shadow: none;
    color: var(--ciade-text-muted);
}

/* —— Header —— */
.header {
    background: rgb(255 255 255 / 0.72);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgb(226 232 240 / 0.8);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.header.is-scrolled {
    background: rgb(255 255 255 / 0.92);
    box-shadow: var(--ciade-shadow-sm);
    border-bottom-color: var(--ciade-border);
}

.navbar {
    padding: 0.75rem 0;
}

.nav-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--ciade-text-muted);
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--ciade-brand);
}

.nav-link::after {
    height: 2px;
    border-radius: 1px;
    background: var(--ciade-gradient-brand);
}

.nav-cta .btn-primary {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    border-radius: var(--ciade-radius);
}

/* —— Botones —— */
.btn {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    border-radius: var(--ciade-radius);
    letter-spacing: -0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:focus-visible {
    outline: 2px solid var(--ciade-accent);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--ciade-gradient-brand);
    color: #fff;
    box-shadow: 0 1px 2px rgb(15 76 129 / 0.2), 0 4px 12px rgb(15 76 129 / 0.25);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgb(15 76 129 / 0.35);
    filter: brightness(1.05);
}

.btn-secondary {
    background: var(--ciade-surface-elevated);
    color: var(--ciade-text);
    border: 1.5px solid var(--ciade-border-strong);
    box-shadow: var(--ciade-shadow-sm);
}

.btn-secondary:hover {
    background: var(--ciade-surface);
    border-color: var(--ciade-brand);
    color: var(--ciade-brand);
}

/* —— Hero —— */
.hero {
    background: var(--ciade-gradient-hero);
    background-image: var(--ciade-gradient-mesh), var(--ciade-gradient-hero);
    padding-top: 7rem;
    min-height: min(100vh, 920px);
}

.hero-title,
.title-line-1,
.title-line-2,
.title-line-3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-shadow: none;
}

.title-line-1 {
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ciade-brand);
    margin-bottom: 0.75rem;
}

.title-line-2 {
    font-size: clamp(2.5rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    color: var(--ciade-text);
}

.title-line-3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 600;
    color: var(--ciade-text-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.highlight {
    background: linear-gradient(120deg, var(--ciade-brand) 0%, var(--ciade-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    padding: 0;
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--ciade-text-muted);
    max-width: 32rem;
}

.professional-img {
    border-radius: var(--ciade-radius-2xl);
    box-shadow: var(--ciade-shadow-lg);
    border: 1px solid rgb(255 255 255 / 0.8);
}

.shape-circle {
    background: linear-gradient(135deg, rgb(14 165 233 / 0.15), rgb(15 76 129 / 0.08));
}

.shape-arc {
    border-color: rgb(14 165 233 / 0.2);
}

/* —— Secciones —— */
.section-header {
    text-align: center;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--ciade-text-muted);
    line-height: 1.65;
}

.products,
.benefits,
.gallery,
.success-cases,
.demo,
.contact {
    padding: 5rem 0;
}

.products {
    background: var(--ciade-surface);
}

/* —— Tarjetas de producto —— */
.product-card {
    background: var(--ciade-surface-elevated);
    border: 1px solid var(--ciade-border);
    border-radius: var(--ciade-radius-xl);
    box-shadow: var(--ciade-shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
}

.product-card.clickable:hover {
    transform: translateY(-6px);
    box-shadow: var(--ciade-shadow-md);
    border-color: rgb(15 76 129 / 0.2);
}

.product-card.featured {
    border-color: var(--ciade-brand);
    box-shadow: var(--ciade-shadow-md);
    position: relative;
}

.product-card.featured::before {
    background: var(--ciade-gradient-brand) !important;
    height: 4px;
}

.product-badge {
    background: linear-gradient(135deg, var(--ciade-brand), var(--ciade-brand-light));
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.75rem;
}

.product-title {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* —— Toggle planes —— */
.plan-toggle-container {
    margin-top: 2rem;
}

.plan-toggle {
    background: var(--ciade-surface-elevated);
    border: 1px solid var(--ciade-border);
    border-radius: 9999px;
    padding: 0.35rem;
    box-shadow: var(--ciade-shadow-sm);
}

.toggle-switch.active .toggle-slider {
    background: var(--ciade-gradient-brand);
}

/* —— Demo y contacto —— */
.demo {
    background: var(--ciade-gradient-mesh), linear-gradient(180deg, #fff 0%, var(--ciade-surface) 100%);
}

.demo-form,
.contact-form-container form,
.register-form {
    background: var(--ciade-surface-elevated);
    border: 1px solid var(--ciade-border);
    border-radius: var(--ciade-radius-2xl);
    box-shadow: var(--ciade-shadow-md);
    padding: 2rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--ciade-border);
    border-radius: var(--ciade-radius);
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--ciade-text);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ciade-brand);
    box-shadow: 0 0 0 3px rgb(15 76 129 / 0.12);
}

.form-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--ciade-text);
    margin-bottom: 0.375rem;
    display: block;
}

.contact-card-consolidated {
    background: var(--ciade-surface-elevated);
    border: 1px solid var(--ciade-border);
    border-radius: var(--ciade-radius-2xl);
    box-shadow: var(--ciade-shadow);
}

.contact-icon {
    background: linear-gradient(135deg, rgb(15 76 129 / 0.1), rgb(14 165 233 / 0.08));
    color: var(--ciade-brand);
    border-radius: var(--ciade-radius);
}

/* —— Footer —— */
.footer {
    background: #0f172a;
    color: #94a3b8;
}

.footer-section h4 {
    color: #f1f5f9;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-links a:hover {
    color: var(--ciade-accent);
}

.footer-bottom {
    border-top: 1px solid rgb(148 163 184 / 0.15);
}

/* —— WhatsApp flotante —— */
.chat-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
}

.chat-button {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    background: #25d366;
    color: #fff;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgb(37 211 102 / 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-button:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 28px rgb(37 211 102 / 0.5);
    color: #fff;
}

/* —— Animación entrada suave —— */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* —— Beneficios / stats —— */
.benefit-card,
.stat-card,
.testimonial-card {
    border-radius: var(--ciade-radius-xl);
    border: 1px solid var(--ciade-border);
    background: var(--ciade-surface-elevated);
    box-shadow: var(--ciade-shadow-sm);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.benefit-card:hover,
.stat-card:hover {
    box-shadow: var(--ciade-shadow-md);
    transform: translateY(-2px);
}

/* —— Galería —— */
.gallery-item img {
    border-radius: var(--ciade-radius-lg);
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

/* —— Contenedor —— */
.container {
    max-width: 72rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (max-width: 768px) {
    .hero {
        padding-top: 6rem;
        min-height: auto;
        padding-bottom: 3rem;
    }

    .hero-content {
        gap: 2rem;
    }

    .hero-visual {
        height: auto;
        min-height: 320px;
    }

    .professional-img {
        width: 100%;
        max-width: 360px;
        height: auto;
        aspect-ratio: 4/5;
    }

    .nav-cta {
        display: none;
    }

    .chat-button span {
        display: none;
    }

    .chat-button {
        width: 3.5rem;
        height: 3.5rem;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .products,
    .benefits,
    .gallery,
    .success-cases,
    .demo,
    .contact {
        padding: 3.5rem 0;
    }
}
