/*
 * Sección de Hirem0 en la home de R&T (application/views/landing/hirem0-section.php).
 *
 * Mezcla las dos identidades:
 * - Hirem0: panel oscuro #0a0a0a con rejilla, texto #ededed / #a1a1a1, bordes
 *   #282828, detalles en monoespaciada y la tarjeta del reclutador con IA.
 * - R&T: titulares en ClashDisplay, botón en SpaceG y el morado #5234E2 como acento
 *   (en el panel oscuro se aclara a #a597ff para que el texto tenga contraste).
 *
 * web-land.css fuerza `a { color: #5234E2 !important; }`: los enlaces de aquí
 * necesitan su color con !important.
 */

.h0x {
    --h0x-bg: #0a0a0a;
    --h0x-surface: #111111;
    --h0x-surface-2: #181818;
    --h0x-border: #282828;
    --h0x-text: #ededed;
    --h0x-muted: #a1a1a1;
    --h0x-rt: #5234E2;
    --h0x-rt-light: #a597ff;
    --h0x-ok: #22c55e;
    --h0x-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
    --h0x-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    display: block;
}

/* ---------- Panel ---------- */

.h0x-shell {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
    padding: 72px 64px;
    border-radius: 28px;
    border: 1px solid var(--h0x-border);
    background-color: var(--h0x-bg);
    color: var(--h0x-text);
    isolation: isolate;
}

/* Rejilla de Hirem0, que se desvanece hacia los bordes. */
.h0x-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 70% 45%, #000 30%, transparent 85%);
    mask-image: radial-gradient(ellipse 85% 75% at 70% 45%, #000 30%, transparent 85%);
}

/* Halo morado de R&T detrás de la tarjeta y filo superior. */
.h0x-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(520px circle at 78% 42%, rgba(82, 52, 226, 0.34), transparent 65%),
        radial-gradient(380px circle at 0% 100%, rgba(82, 52, 226, 0.14), transparent 70%),
        linear-gradient(90deg, transparent 8%, rgba(165, 151, 255, 0.55) 50%, transparent 92%) top / 100% 1px no-repeat;
    pointer-events: none;
}

/* ---------- Texto ---------- */

.h0x-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.h0x-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px 0;
    font-family: var(--h0x-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--h0x-muted);
}

.h0x-eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
}

.h0x-brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-bottom: 22px;
}

.h0x-logo {
    flex: none;
    color: var(--h0x-text);
}

.h0x-wordmark {
    font-family: var(--h0x-sans);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--h0x-text);
}

.h0x-badge {
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(165, 151, 255, 0.45);
    background: rgba(82, 52, 226, 0.18);
    font-family: var(--h0x-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cfc7ff;
}

.h0x .h0x-title {
    margin: 0 0 20px 0;
    font-size: 54px;
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.01em;
    color: var(--h0x-text);
    text-wrap: balance;
}

.h0x-title-accent {
    display: block;
    color: var(--h0x-rt-light);
}

.h0x-text {
    max-width: 560px;
    margin: 0 0 26px 0;
    font-family: var(--h0x-sans);
    font-size: 18px;
    line-height: 1.6;
    color: var(--h0x-muted);
}

.h0x-points {
    display: grid;
    gap: 12px;
    margin: 0 0 34px 0;
    padding: 0;
    list-style: none;
}

.h0x-points li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: var(--h0x-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--h0x-text);
}

.h0x-point-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: 0;
    border-radius: 8px;
    background: rgba(82, 52, 226, 0.22);
    color: var(--h0x-rt-light);
}

/* ---------- Acciones ---------- */

.h0x-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 26px;
}

.h0x a.h0x-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: var(--h0x-rt);
    font-family: 'SpaceG', Arial, sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    color: #ffffff !important;
    text-decoration: none;
    box-shadow: 0 10px 30px -10px rgba(82, 52, 226, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.h0x a.h0x-cta:hover,
.h0x a.h0x-cta:focus-visible {
    transform: translateY(-2px);
    background: #6247f0;
    box-shadow: 0 16px 36px -12px rgba(82, 52, 226, 0.95);
    color: #ffffff !important;
}

.h0x a.h0x-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-family: var(--h0x-sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--h0x-text) !important;
    text-decoration: underline;
    text-decoration-color: rgba(237, 237, 237, 0.35);
    text-underline-offset: 6px;
    transition: text-decoration-color 0.2s ease;
}

.h0x a.h0x-more:hover,
.h0x a.h0x-more:focus-visible {
    color: #ffffff !important;
    text-decoration-color: var(--h0x-rt-light);
}

.h0x a.h0x-cta svg,
.h0x a.h0x-more svg {
    transition: transform 0.2s ease;
}

.h0x a.h0x-cta:hover svg,
.h0x a.h0x-more:hover svg {
    transform: translateX(3px);
}

.h0x a:focus-visible {
    outline: 2px solid var(--h0x-rt-light);
    outline-offset: 4px;
}

.h0x-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
    margin: 22px 0 0 0;
    font-family: var(--h0x-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #8f8f8f;
}

.h0x-trust-item {
    white-space: nowrap;
}

/* El separador va detrás de cada tramo: si la línea salta, queda al final, no al principio. */
.h0x-trust-item:not(:last-child)::after {
    content: "·";
    margin: 0 10px;
    color: #5c5c5c;
}

/* ---------- Tarjeta del reclutador con IA ---------- */

.h0x-demo {
    position: relative;
    min-width: 0;
    margin: 0 16px 16px 0;
}

/* Capa morada desplazada detrás de la tarjeta, como el relieve de los botones de R&T. */
.h0x-demo::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 10px),
        var(--h0x-rt);
    transform: translate(16px, 16px);
}

.h0x-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--h0x-border);
    background: var(--h0x-surface);
    box-shadow:
        0 0 0 1px rgba(165, 151, 255, 0.06),
        0 40px 80px -30px rgba(0, 0, 0, 0.9);
}

.h0x-card-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--h0x-border);
    background: var(--h0x-surface-2);
}

.h0x-dots {
    display: inline-flex;
    gap: 6px;
}

.h0x-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333333;
}

.h0x-card-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: var(--h0x-sans);
    font-size: 13px;
    color: var(--h0x-muted);
}

.h0x-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--h0x-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--h0x-ok);
}

.h0x-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--h0x-ok);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: h0x-pulse 2s ease-out infinite;
}

.h0x-card-body {
    padding: 18px 22px 24px 22px;
}

.h0x-example {
    display: block;
    margin-bottom: 12px;
    font-family: var(--h0x-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6f6f6f;
}

.h0x-prompt {
    position: relative;
    margin: 0 0 20px auto;
    max-width: 86%;
    padding: 14px 16px;
    border-radius: 14px 14px 4px 14px;
    background: var(--h0x-rt);
    font-family: var(--h0x-sans);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    color: #ffffff;
}

.h0x-prompt::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 3px;
    vertical-align: -0.15em;
    background: #ffffff;
    animation: h0x-caret 1s steps(1) infinite;
}

.h0x-steps {
    display: grid;
    gap: 10px;
    margin: 0 0 20px 0;
    padding: 0;
    list-style: none;
}

.h0x-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--h0x-sans);
    font-size: 14px;
    line-height: 1.4;
    color: #d4d4d4;
}

.h0x-step-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.14);
    color: var(--h0x-ok);
}

.h0x-step-icon .h0x-check {
    width: 12px;
    height: 12px;
}

.h0x-shortlist {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--h0x-border);
    background: var(--h0x-bg);
}

.h0x-shortlist-label {
    margin: 0 0 10px 0;
    font-family: var(--h0x-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--h0x-muted);
}

.h0x-candidate {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 2px 12px 2px;
}

.h0x-candidate + .h0x-candidate {
    border-top: 1px solid #1c1c1c;
}

.h0x-avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #2f2f2f;
    background: var(--h0x-surface-2);
    font-family: var(--h0x-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--h0x-text);
}

.h0x-candidate-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.h0x-candidate-info strong {
    font-family: var(--h0x-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--h0x-text) !important;
}

.h0x-candidate-info small {
    font-family: var(--h0x-sans);
    font-size: 12px;
    color: var(--h0x-muted);
}

.h0x-fit {
    flex: none;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(82, 52, 226, 0.2);
    font-family: var(--h0x-mono);
    font-size: 12px;
    font-weight: 600;
    color: #cfc7ff;
}

/* Barra de encaje bajo cada finalista. */
.h0x-fit-bar {
    position: absolute;
    left: 48px;
    right: 2px;
    bottom: 3px;
    height: 2px;
    border-radius: 2px;
    background: #1f1f1f;
    overflow: hidden;
}

.h0x-fit-bar::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--h0x-fit, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--h0x-rt), var(--h0x-rt-light));
}

/* ---------- Animación al entrar en pantalla (solo con JS) ---------- */

.h0x--armed .h0x-prompt,
.h0x--armed .h0x-steps li,
.h0x--armed .h0x-shortlist {
    opacity: 0;
    transform: translateY(8px);
}

.h0x--armed .h0x-fit-bar::after {
    width: 0;
}

.h0x--play .h0x-prompt,
.h0x--play .h0x-steps li,
.h0x--play .h0x-shortlist {
    opacity: 1;
    transform: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.h0x--play .h0x-prompt {
    transition-delay: 0.1s;
}

.h0x--play .h0x-steps li {
    transition-delay: calc(0.7s + var(--h0x-i, 0) * 0.45s);
}

.h0x--play .h0x-shortlist {
    transition-delay: 2.6s;
}

.h0x--play .h0x-fit-bar::after {
    width: var(--h0x-fit, 0%);
    transition: width 0.9s ease;
    transition-delay: calc(2.9s + var(--h0x-i, 0) * 0.15s);
}

@keyframes h0x-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70%  { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes h0x-caret {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .h0x-status i,
    .h0x-prompt::after {
        animation: none;
    }

    .h0x a.h0x-cta,
    .h0x a.h0x-cta svg,
    .h0x a.h0x-more svg {
        transition: none;
    }

    .h0x a.h0x-cta:hover {
        transform: none;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 1199.98px) {
    .h0x-shell {
        gap: 40px;
        padding: 56px 44px;
    }

    .h0x .h0x-title {
        font-size: 46px;
    }
}

@media (max-width: 991.98px) {
    .h0x-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 44px;
        padding: 48px 32px;
        border-radius: 24px;
    }

    .h0x-shell::after {
        background:
            radial-gradient(420px circle at 60% 85%, rgba(82, 52, 226, 0.34), transparent 65%),
            linear-gradient(90deg, transparent 8%, rgba(165, 151, 255, 0.55) 50%, transparent 92%) top / 100% 1px no-repeat;
    }

    .h0x-demo {
        max-width: 560px;
        width: calc(100% - 16px);
        justify-self: center;
    }
}

@media (max-width: 575.98px) {
    .h0x-shell {
        padding: 36px 20px;
        border-radius: 20px;
    }

    .h0x .h0x-title {
        font-size: 36px;
    }

    .h0x-text {
        font-size: 16px;
    }

    .h0x-points li {
        font-size: 15px;
    }

    .h0x-actions {
        width: 100%;
    }

    .h0x a.h0x-cta {
        width: 100%;
        justify-content: center;
    }

    .h0x-demo {
        width: calc(100% - 10px);
        margin: 0 10px 10px 0;
    }

    .h0x-demo::before {
        transform: translate(10px, 10px);
    }

    .h0x-dots {
        display: none;
    }

    .h0x-card-body {
        padding: 16px 16px 18px 16px;
    }

    .h0x-prompt {
        max-width: 100%;
        font-size: 14px;
    }
}
