/* ============================================================
   COZOPY — landing.css
   Estilos exclusivos para las landing pages SEM.
   Se carga encima de styles.css (los :root ya están definidos).
   Basado en snippets 331 y 420 (v1 WordPress) — reimplementado
   con tokens de DESIGN.md y sin jQuery ni font-size por JS.
   ============================================================ */


/* ============================================================
   LANDING NAV (.landing-nav)
   Reemplaza al .site-header en estas páginas
   ============================================================ */

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    border-bottom: 1px solid var(--color-surface);
    background-color: var(--color-background);
}

.landing-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    width: var(--container-width);
    max-width: var(--max-width);
    height: 70px; /* altura fija de la barra de nav — matches site-nav */
    margin-right: auto;
    margin-left: auto;
}

/* --- Logo --- */

.landing-nav__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 50px; /* slot reservado para el logo — matches site-nav__logo */
}

.landing-nav__logo img {
    height: 100%;
    width: auto;
}

/* --- Texto de logo temporal (hasta tener el SVG) --- */

.landing-nav__logo-text {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-secondary);
}

/* --- Links de menú interno --- */

.landing-nav__menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: clamp(var(--space-md), 4vw, var(--space-2xl));
}

.landing-nav__menu a {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--color-foreground);
    transition: color var(--transition);
}

.landing-nav__menu a:hover {
    color: var(--color-secondary);
}

/* --- Teléfono (solo landing empresas) --- */

.landing-nav__phone {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    background-color: var(--color-surface-alt);
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--color-secondary);
    text-decoration: none;
    white-space: nowrap;
}


/* ============================================================
   LANDING HERO (.landing-hero)
   ============================================================ */

.landing-hero {
    padding: var(--space-2xl) 0;
    background-color: var(--color-secondary);
    overflow: hidden;
}

.landing-hero__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2xl);
    width: var(--container-width);
    max-width: var(--max-width);
    margin: 0 auto;
}

/* --- Columna de contenido (izquierda, ~50%) --- */

.landing-hero__content {
    width: 49%; /* distribución 50/41 validada en snippet 420 */
}

.landing-hero__content h1 {
    font-size: var(--text-4xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--color-primary-foreground);
    margin-bottom: var(--space-md);
}

.landing-hero__content > p {
    font-size: var(--text-md);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-lg);
}

/* --- Bullet pills --- */

.landing-hero__bullets {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.landing-hero__bullets li {
    padding: 0.3em 0.6em; /* em: escala con el font-size del pill */
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1;
}

/* --- Columna de imagen (derecha, ~41%) --- */

.landing-hero__image {
    position: relative;
    width: 41%; /* distribución 50/41 validada en snippet 420 */
    min-height: 400px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(10, 118, 229, 0.25) 0%, rgba(10, 118, 229, 0.08) 100%);
    border: 1px solid rgba(10, 118, 229, 0.3);
    overflow: hidden;
    /* [IMAGEN: imagen-encabezado — ilustración o foto, ~600×500px WebP — reemplazará este gradiente ] */
}

.landing-hero__image::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(10, 118, 229, 0.12);
    top: -80px;
    right: -80px;
}

.landing-hero__image::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(10, 118, 229, 0.08);
    bottom: 40px;
    left: -30px;
}


/* ============================================================
   LANDING CARDS (.landing-cards)
   Beneficios (landing 1) y Para Quién (landing 2)
   ============================================================ */

.landing-cards {
    padding: 2% 0;
}

.landing-cards__inner {
    display: flex;
    flex-direction: column;
    width: var(--container-width);
    max-width: var(--max-width);
    margin: 0 auto;
}

.landing-cards__heading {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.landing-cards__cta {
    text-align: center;
    margin-top: var(--space-xl);
}

/* --- Grid de tarjetas --- */

.landing-cards__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
}

/* --- Tarjeta individual --- */

.landing-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: calc(33.333% - var(--space-md)); /* 3 columnas con gap */
    min-width: 260px; /* evita que el texto se comprima en viewports intermedios */
    border-radius: var(--radius-md);
    background-color: var(--color-surface-alt);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.landing-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.landing-card[data-reveal] {
    /* restore reveal transitions (higher specificity than either rule alone) */
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.25s ease;
}

.landing-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
}

.landing-card__image svg {
    width: 48px;
    height: 48px;
    opacity: 0.9;
}

.landing-card__body {
    padding: var(--space-md);
}

.landing-card__body h3 {
    font-size: var(--text-md);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.landing-card__body p {
    font-size: var(--text-base);
    margin-bottom: var(--space-md);
}

.landing-card__body .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0;
    border: none;
    background: none;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-secondary);
    text-decoration: none;
    transition: gap var(--transition);
}

.landing-card__body .btn:hover {
    gap: var(--space-sm);
}


/* ============================================================
   LANDING CTA (.landing-cta)
   Sección oscura con info de contacto + formulario
   ============================================================ */

.landing-cta {
    padding: 2% 0;
}

.landing-cta__inner {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    width: var(--container-width);
    max-width: var(--max-width);
    margin: 0 auto;
    border-radius: var(--radius-md);
    background-color: var(--color-secondary);
    overflow: hidden;
}

/* --- Columna de texto/contacto (75%) --- */

.landing-cta__content {
    width: 75%; /* 75/25 distribución validada en snippet 420 */
    padding: var(--section-padding-v);
}

.landing-cta__content h2 {
    color: var(--color-primary-foreground);
    margin-bottom: var(--space-sm);
}

.landing-cta__content > p {
    opacity: 0.85;
    font-size: var(--text-md);
    color: var(--color-primary-foreground);
    margin-bottom: var(--space-lg);
}

/* --- Info de contacto --- */

.landing-cta__contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.landing-cta__contact-item h3 {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--color-primary-foreground);
    margin-bottom: 0.25em;
}

.landing-cta__contact-item p,
.landing-cta__contact-item a {
    opacity: 0.85;
    font-size: var(--text-base);
    color: var(--color-primary-foreground);
}

/* --- Columna de formulario (25%) --- */

.landing-cta__form {
    width: 25%; /* 75/25 distribución validada en snippet 420 */
    padding: var(--space-lg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background-color: var(--color-background);
}

.landing-cta__form h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-md);
}

/* --- Versión simple (sin formulario) --- */

.landing-cta--simple .landing-cta__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-2xl);
}

.landing-cta--simple .landing-cta__content {
    width: 100%;
    padding: 0;
}


/* ============================================================
   LANDING HOW IT WORKS (.landing-how)
   ============================================================ */

.landing-how {
    padding: 2% 0;
}

.landing-how__inner {
    width: var(--container-width);
    max-width: var(--max-width);
    margin: 0 auto 2%;
}

.landing-how__heading {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.landing-how__steps {
    display: flex;
    justify-content: space-between;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* --- Paso individual --- */

.landing-step {
    display: flex;
    flex: 1;
    gap: var(--space-md);
    align-items: flex-start;
}

.landing-step__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px; /* tamaño fijo del ícono numerado del paso */
    height: 48px;
    border-radius: var(--radius-full);
    background-color: var(--color-secondary);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-primary-foreground);
    /* [IMAGEN: ícono del paso — public/svg/paso-N.svg] */
}

.landing-step__body h3 {
    font-size: var(--text-md);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.landing-step__body p {
    font-size: var(--text-base);
    font-weight: 500;
}

.landing-how__cta {
    text-align: center;
}


/* ============================================================
   LANDING SERVICIOS — TABS (.landing-services)
   ============================================================ */

.landing-services {
    padding: 2% 0;
}

.landing-services__inner {
    width: var(--container-width);
    max-width: var(--max-width);
    margin: 0 auto;
}

.landing-services__heading {
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* --- Tabs --- */

.services-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background-color: var(--color-secondary);
    margin-bottom: var(--space-lg);
}

.services-tab-btn {
    width: 50%;
    padding: var(--space-md);
    border: 1px solid var(--color-secondary);
    border-radius: var(--radius-sm);
    background-color: var(--color-secondary);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-primary-foreground);
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition);
}

.services-tab-btn.active {
    background-color: var(--color-background);
    color: var(--color-secondary);
}

/* --- Contenido de tab --- */

.services-tab-content {
    display: none;
    flex-direction: row;
    gap: var(--space-2xl);
}

.services-tab-content.active {
    display: flex;
}

/* --- Servicio individual --- */

.service-item {
    display: flex;
    align-items: flex-start;
    flex: 1;
    gap: var(--space-md);
}

.service-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px; /* tamaño fijo del ícono de servicio */
    height: 56px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
}

.service-item__icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.service-item__body h3 {
    font-size: var(--text-md);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.service-item__body p {
    font-size: var(--text-base);
}


/* ============================================================
   ANIMACIONES ACCESIBLES
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================================
   MOBILE — max-width: 768px
   ============================================================ */

@media (max-width: 768px) {

    /* --- Nav --- */
    .landing-nav__menu {
        display: none; /* menú se colapsa — solo logo + CTA visibles */
    }

    .landing-nav__phone {
        display: none;
    }

    .landing-nav__inner {
        justify-content: center;
    }

    /* --- Hero --- */
    .landing-hero__inner {
        flex-direction: column-reverse;
        gap: var(--space-lg);
    }

    .landing-hero__content,
    .landing-hero__image {
        width: 100%;
    }

    .landing-hero__content h1 {
        font-size: var(--text-3xl);
    }

    .landing-hero__image {
        min-height: 220px;
    }

    /* --- Cards --- */
    .landing-card {
        width: 100%;
    }

    /* --- CTA --- */
    .landing-cta__inner {
        flex-direction: column;
    }

    .landing-cta__content,
    .landing-cta__form {
        width: 100%;
    }

    .landing-cta__form {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    .landing-cta__content {
        padding: var(--space-lg);
    }

    /* --- How it works --- */
    .landing-how__steps {
        flex-direction: column;
    }

    /* --- Services tabs --- */
    .services-tab-btn {
        font-size: var(--text-lg);
    }

    .services-tab-content.active {
        flex-direction: column;
        gap: var(--space-lg);
    }
}
