/* =============================================== */
/* PACHAX — Premium Design System                  */
/* =============================================== */

:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #0d0d14;
    --bg-card: #111119;
    --bg-card-hover: #16161f;
    --surface: #1a1a24;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);

    --text-primary: #f0f0f5;
    --text-secondary: #8a8a9a;
    --text-tertiary: #5a5a6a;

    --accent: #0066FF;
    --accent-light: #00D4FF;
    --accent-glow: rgba(0,102,255,0.15);
    --gradient: linear-gradient(135deg, #0066FF, #00D4FF);
    --gradient-text: linear-gradient(135deg, #0066FF, #00D4FF);

    --whatsapp: #25D366;

    /* Spacing */
    --section-py: clamp(80px, 10vw, 140px);
    --container-px: clamp(20px, 5vw, 80px);
    --container-max: 1200px;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    /* Transitions */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 0.6s;
}

/* =============================================== */
/* RESET & BASE                                    */
/* =============================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-px);
}

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

/* =============================================== */
/* BUTTONS                                         */
/* =============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font);
    font-weight: 600;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
    text-decoration: none;
}

.btn--primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 0 30px rgba(0,102,255,0.3), 0 0 60px rgba(0,102,255,0.1);
}
.btn--primary:hover {
    box-shadow: 0 0 40px rgba(0,102,255,0.5), 0 0 80px rgba(0,102,255,0.2);
    transform: translateY(-2px);
}

.btn--ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}
.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(0,102,255,0.05);
}

.btn--sm { padding: 10px 24px; font-size: 14px; }
.btn--lg { padding: 16px 36px; font-size: 16px; }

/* =============================================== */
/* HEADER                                          */
/* =============================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 24px 0; /* Un poco menos de padding para compensar el logo mayor */
    transition: all 0.4s var(--ease);
    background: transparent;
}

.header--scrolled {
    padding: 12px 0;
    background: rgba(10,10,15,0.92); /* Un poco más opaco para legibilidad */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.header__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
}

.header__logo-img {
    width: auto;
    height: 100px; /* Tamaño mucho más imponente */
    max-height: 12vh;
    object-fit: contain;
    transition: height 0.4s var(--ease);
}

.header--scrolled .header__logo-img {
    height: 65px; 
}

.header__nav {
    display: flex;
    gap: 36px;
}

.header__link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s;
    position: relative;
}
.header__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    border-radius: 1px;
    transition: width 0.3s var(--ease);
}
.header__link:hover { color: var(--text-primary); }
.header__link:hover::after { width: 100%; }

.header__cta { display: none; }

.header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}
.header__burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}
.header__burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.header__burger.active span:nth-child(2) { opacity: 0; }
.header__burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: rgba(10,10,15,0.97);
    backdrop-filter: blur(30px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease);
}
.mobile-nav.active { opacity: 1; pointer-events: all; }

.mobile-nav__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}
.mobile-nav__link {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s;
}
.mobile-nav__link:hover { color: var(--text-primary); }
.mobile-nav__cta { margin-top: 16px; }

/* =============================================== */
/* HERO                                            */
/* =============================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    pointer-events: none;
}
.hero__glow--1 {
    width: 600px; height: 600px;
    background: rgba(0,102,255,0.12);
    top: -200px; right: -100px;
}
.hero__glow--2 {
    width: 500px; height: 500px;
    background: rgba(0,212,255,0.08);
    bottom: -200px; left: -100px;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(0,102,255,0.08);
    border: 1px solid rgba(0,102,255,0.2);
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-light);
    margin-bottom: 32px;
}
.hero__badge-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero__title {
    font-size: clamp(36px, 5.5vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero__subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    margin-bottom: 48px;
    font-weight: 400;
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero__scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
.hero__scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* =============================================== */
/* LOGOS TICKER                                    */
/* =============================================== */

.logos-ticker {
    padding: 60px 0;
    background: var(--bg-primary);
    overflow: hidden;
    position: relative;
}

.logos-ticker__container {
    max-width: 100%;
    position: relative;
    display: flex;
}

/* Degrade a los lados para suavizar la entrada/salida de logos */
.logos-ticker::before,
.logos-ticker::after {
    content: "";
    position: absolute;
    top: 0;
    width: 200px;
    height: 100%;
    z-index: 2;
}

.logos-ticker::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-primary), transparent);
}

.logos-ticker::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-primary), transparent);
}

.logos-ticker__wrapper {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
}

.logos-ticker:hover .logos-ticker__wrapper {
    animation-play-state: paused;
}

.logos-ticker__slide {
    display: flex;
    align-items: center;
    gap: 80px;
    padding: 0 40px;
}

.logos-ticker__slide img {
    height: 35px;
    width: auto;
    opacity: 0.4;
    filter: grayscale(1) brightness(2);
    transition: all 0.3s var(--ease);
}

.logos-ticker__slide img:hover {
    opacity: 1;
    filter: grayscale(0) brightness(1);
    transform: scale(1.1);
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =============================================== */
/* SECTIONS COMMON                                 */
/* =============================================== */

.section { padding: var(--section-py) 0; }

.section__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px;
}

.section__label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-light);
    margin-bottom: 16px;
}

.section__title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section__desc {
    font-size: 17px;
    color: var(--text-secondary);
}

/* =============================================== */
/* FILTER SECTION                                  */
/* =============================================== */

.filter-section {
    padding: 40px 0 0;
    position: relative;
    z-index: 2;
    margin-top: -40px;
}

.filter-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}
.filter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: var(--gradient);
}

.filter-card__icon {
    width: 52px; height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 14px;
    margin: 0 auto 24px;
    color: var(--accent-light);
}

.filter-card__text {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}
.filter-card__text strong { color: var(--accent-light); }

.filter-card__sub {
    color: var(--text-secondary);
    font-size: 15px;
}

/* =============================================== */
/* PROBLEMS                                        */
/* =============================================== */

.problems { background: var(--bg-secondary); }

.problems__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.problem-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: all 0.4s var(--ease);
}
.problem-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    background: var(--bg-card-hover);
}

.problem-card__icon {
    width: 52px; height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,59,48,0.08);
    border-radius: 14px;
    margin-bottom: 20px;
    color: #ff6b6b;
}

.problem-card__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.problem-card__desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =============================================== */
/* SOLUTION                                        */
/* =============================================== */

.solution__card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: clamp(40px, 6vw, 72px);
    position: relative;
    overflow: hidden;
}
.solution__card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--gradient);
}

.solution__title {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.4;
    margin: 16px 0 20px;
}

.solution__desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 640px;
    margin-bottom: 32px;
}

.solution__features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.solution__feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* =============================================== */
/* SERVICES                                        */
/* =============================================== */

.services { background: var(--bg-secondary); }

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease);
}

.service-card__glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0,102,255,0.08), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}
.service-card:hover .service-card__glow { opacity: 1; }

.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
}

.service-card--featured {
    border-color: rgba(0,102,255,0.3);
    background: linear-gradient(180deg, rgba(0,102,255,0.04) 0%, var(--bg-card) 50%);
}

.service-card__badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 4px 14px;
    border-radius: 50px;
    background: var(--gradient);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.service-card__icon {
    width: 56px; height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 16px;
    margin-bottom: 24px;
}

.service-card__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-card__desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.service-card__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.service-card__list li {
    font-size: 14px;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}
.service-card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

/* =============================================== */
/* RESULTS                                         */
/* =============================================== */

.results__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    text-align: center;
    transition: all 0.4s var(--ease);
}
.result-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.result-card__value {
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.result-card__label {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.result-card__bar {
    height: 4px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
}
.result-card__bar-fill {
    height: 100%;
    width: 0;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 1.5s var(--ease);
}
.result-card__bar-fill.animated {
    width: var(--fill-width);
}

/* =============================================== */
/* PROCESS                                         */
/* =============================================== */

.process { background: var(--bg-secondary); }

.process__timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.process__line {
    position: absolute;
    left: 36px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), rgba(0,102,255,0.1));
}

.process-step {
    display: flex;
    gap: 32px;
    padding: 32px 0;
    position: relative;
}

.process-step__number {
    width: 72px;
    height: 72px;
    min-width: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-light);
    z-index: 1;
    transition: all 0.4s var(--ease);
}

.process-step:hover .process-step__number {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.process-step__content {
    padding-top: 12px;
}

.process-step__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.process-step__desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =============================================== */
/* CTA SECTION                                     */
/* =============================================== */

.cta-section { padding-bottom: 120px; }

.cta-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: clamp(48px, 6vw, 80px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card__glow {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0,102,255,0.12), transparent 70%);
    pointer-events: none;
}

.cta-card__title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    position: relative;
}

.cta-card__desc {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 40px;
    position: relative;
}

.cta-card .btn { position: relative; }

/* =============================================== */
/* FOOTER                                          */
/* =============================================== */

.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer__logo-img { 
    height: 36px; /* Aumentado para mayor claridad */
    width: auto; 
    object-fit: contain; 
}

.footer__copy {
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer__links {
    display: flex;
    gap: 24px;
}
.footer__links a {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.3s;
}
.footer__links a:hover { color: var(--text-primary); }

/* =============================================== */
/* WHATSAPP FLOAT                                  */
/* =============================================== */

.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    background: var(--whatsapp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 998;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    transition: all 0.3s var(--ease);
    animation: whatsapp-pulse 3s ease-in-out infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37,211,102,0.6);
}

@keyframes whatsapp-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 4px 40px rgba(37,211,102,0.6), 0 0 0 10px rgba(37,211,102,0.08); }
}

/* =============================================== */
/* REVEAL ANIMATIONS                               */
/* =============================================== */

/* Fallback de seguridad: Si el JS no carga, los elementos se muestran tras 3s */
@keyframes reveal-fallback {
    to { opacity: 1; transform: translateY(0); }
}
.reveal {
    animation: reveal-fallback 0.8s var(--ease) forwards;
    animation-play-state: paused;
}
.reveal.visible {
    animation-play-state: running;
}

/* Ocultar BRs en móviles para evitar espacios raros */
@media (max-width: 768px) {
    br { display: none; }
}

/* =============================================== */
/* RESPONSIVE                                      */
/* =============================================== */

@media (max-width: 1024px) {
    .services__grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
    .results__grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}

@media (max-width: 768px) {
    .header__nav { display: none; }
    .header__cta { display: none; }
    .header__burger { display: flex; }

    .problems__grid { grid-template-columns: 1fr; }

    .process__line { left: 24px; }
    .process-step { gap: 20px; }
    .process-step__number { width: 48px; height: 48px; min-width: 48px; font-size: 16px; border-radius: 14px; }

    .footer__inner { flex-direction: column; text-align: center; }
    .footer__links { justify-content: center; }

    .header__logo-img { height: 75px; } /* Tamaño móvil optimizado */
    .header--scrolled .header__logo-img { height: 55px; }

    .hero__title br { display: none; }
    .section__title br { display: none; }
    .cta-card__title br { display: none; }
}

@media (min-width: 769px) {
    .header__cta { display: inline-flex; }
}
