/* ============================================================
   Bytex — Servicios Home (Flujo de 5 pasos)
   File: assets/css/servicios-home.css

   Tamaños de texto desde la escala global (--bytex-fs-*).
   ============================================================ */

/* ============================================================
   Sección
   ============================================================ */
.bytex-servicios {
    position: relative;
    overflow: hidden;
    padding: 120px 0;
    border-bottom: 1px solid var(--bytex-border);
}
.bytex-servicios__bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--bytex-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--bytex-border) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.25;
    mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
    pointer-events: none;
}
/* Glow pulsante de fondo */
.bytex-servicios::before {
    content: "";
    position: absolute;
    top: 30%;
    right: -10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--bytex-accent) 0%, transparent 55%);
    opacity: 0.06;
    filter: blur(70px);
    pointer-events: none;
    z-index: 1;
    animation: bytex-servicios-glow-pulse 9s ease-in-out infinite;
}
@keyframes bytex-servicios-glow-pulse {
    0%, 100% { opacity: 0.04; transform: scale(1); }
    50%      { opacity: 0.12; transform: scale(1.06); }
}
.bytex-servicios__inner {
    position: relative;
    z-index: 2;
    max-width: var(--bytex-container);
    margin: 0 auto;
    padding: 0 var(--bytex-container-padding);
}

/* ============================================================
   Head
   ============================================================ */
.bytex-servicios__head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 80px;
}
.bytex-servicios__eyebrow {
    font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace;
    font-size: var(--bytex-fs-eyebrow);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bytex-accent);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.bytex-servicios__eyebrow::before,
.bytex-servicios__eyebrow::after {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--bytex-accent);
    display: inline-block;
}
.bytex-servicios__title {
    font-family: var(--bytex-font-heading);
    font-weight: 800;
    font-size: var(--bytex-fs-h2);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--bytex-text);
    margin: 0 0 24px;
    text-transform: uppercase;
}
.bytex-servicios__title-accent {
    color: var(--bytex-accent);
}
.bytex-servicios__sub {
    font-family: var(--bytex-font-body);
    font-size: var(--bytex-fs-body);
    line-height: 1.6;
    color: var(--bytex-text-2);
    margin: 0 auto;
    max-width: 620px;
}

/* ============================================================
   Timeline (5 pasos horizontales con línea conectora)
   ============================================================ */
.bytex-servicios__timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    align-items: stretch;
    position: relative;
}
/* Línea horizontal de fondo que conecta los números */
.bytex-servicios__timeline::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 10%;
    right: 10%;
    height: 1px;
    background: var(--bytex-border);
    z-index: 0;
    pointer-events: none;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0.4s;
}
.bytex-servicios__timeline.is-revealed::before {
    transform: scaleX(1);
}
/* Override: el timeline en sí no se desvanece, solo su línea */
.bytex-servicios__timeline[data-reveal] {
    opacity: 1;
    transform: none;
}

/* ============================================================
   Step
   ============================================================ */
.bytex-servicios__step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 8px;
}
/* Número como etiqueta encima de la card */
.bytex-servicios__step-num {
    font-family: var(--bytex-font-heading);
    font-size: var(--bytex-fs-sm);
    font-weight: 800;
    line-height: 1;
    color: var(--bytex-text-2);
    letter-spacing: 0.08em;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
    background: var(--bytex-panel);
    padding: 6px 14px;
    border: 1px solid var(--bytex-border);
    transition: color .3s ease, border-color .3s ease;
}
.bytex-servicios__step:hover .bytex-servicios__step-num {
    color: var(--bytex-accent);
    border-color: var(--bytex-accent);
}
/* Card con imagen, icono y contenido */
.bytex-servicios__step-card {
    position: relative;
    z-index: 2;
    background: var(--bytex-panel);
    border: 1px solid var(--bytex-border);
    width: 100%;
    flex: 1;
    overflow: hidden;
    transition: border-color .25s ease, transform .25s ease;
    display: flex;
    flex-direction: column;
}
.bytex-servicios__step:hover .bytex-servicios__step-card {
    border-color: var(--bytex-accent);
    transform: translateY(-4px);
}
/* Banda de imagen arriba */
.bytex-servicios__step-image {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--bytex-bg);
}
.bytex-servicios__step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: contrast(1.05) saturate(0.85);
    transform: scale(1.04);
    transition: transform .5s ease;
}
.bytex-servicios__step:hover .bytex-servicios__step-image img {
    transform: scale(1.1);
}
/* Oscurecido inferior para asentar el icono */
.bytex-servicios__step-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 11, 13, calc(var(--bytex-image-overlay) * 0.1)) 0%,
        rgba(10, 11, 13, calc(var(--bytex-image-overlay) * 0.55)) 100%
    );
    pointer-events: none;
    z-index: 1;
}
/* Scan-line: cruza la imagen una vez al hacer hover */
.bytex-servicios__step-scan {
    position: absolute;
    left: 0;
    right: 0;
    top: -10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--bytex-accent), transparent);
    box-shadow: 0 0 12px var(--bytex-accent);
    opacity: 0;
    z-index: 3;
    pointer-events: none;
}
.bytex-servicios__step:hover .bytex-servicios__step-scan {
    animation: bytex-servicios-scan 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes bytex-servicios-scan {
    0%   { top: -10%; opacity: 0; }
    15%  { opacity: 0.85; }
    85%  { opacity: 0.85; }
    100% { top: 110%; opacity: 0; }
}
/* Icono: superpuesto sobre la imagen, esquina inferior izquierda */
.bytex-servicios__step-icon {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    padding: 8px;
    color: var(--bytex-accent);
    background: rgba(10, 11, 13, 0.8);
    border: 1px solid var(--bytex-accent);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.bytex-servicios__step-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
/* Contenido de texto */
.bytex-servicios__step-content {
    padding: 20px 18px 22px;
    flex: 1;
}
/* Título */
.bytex-servicios__step-title {
    font-family: var(--bytex-font-heading);
    font-size: var(--bytex-fs-body);
    font-weight: 800;
    line-height: 1.2;
    color: var(--bytex-text);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: -0.005em;
}
/* Descripción */
.bytex-servicios__step-desc {
    font-family: var(--bytex-font-body);
    font-size: var(--bytex-fs-sm);
    line-height: 1.55;
    color: var(--bytex-text-2);
    margin: 0;
}
/* Conector individual ya no se usa (la línea es global) */
.bytex-servicios__connector {
    display: none;
}

/* Respeta prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .bytex-servicios::before,
    .bytex-servicios__step-scan {
        animation: none !important;
    }
    .bytex-servicios__step:hover .bytex-servicios__step-card {
        transform: none;
    }
    .bytex-servicios__step:hover .bytex-servicios__step-image img {
        transform: scale(1.04);
    }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .bytex-servicios {
        padding: 80px 0;
    }
    .bytex-servicios__head {
        margin-bottom: 56px;
    }
    .bytex-servicios__timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 16px;
        max-width: 720px;
        margin: 0 auto;
    }
    .bytex-servicios__timeline::before {
        display: none;
    }
    .bytex-servicios__step {
        padding: 0;
    }
}

@media (max-width: 600px) {
    .bytex-servicios {
        padding: 64px 0;
    }
    .bytex-servicios__timeline {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 400px;
    }
    .bytex-servicios__step-content {
        padding: 18px 18px 20px;
    }
}