/* ==========================================================================
   CRISTCAM — Inicio
   Secciones propias de la portada. Los componentes compartidos (.hx-title,
   .hx-label, .hx-head, .hx-cta…) están en base.css.
   ========================================================================== */

body {
    background: var(--surface);
    color: var(--fg);
}

/* ==========================================================================
   HERO — video real, mensaje directo y franja de clientes
   ========================================================================== */

.hx-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: max(760px, 100svh);
    overflow: hidden;
    background: var(--ink);
    isolation: isolate;
}

.hx-hero__video {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hx-hero__shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(11, 12, 15, 0.9) 0%, rgba(11, 12, 15, 0.7) 40%, rgba(11, 12, 15, 0.2) 80%),
        linear-gradient(180deg, rgba(11, 12, 15, 0.45) 0%, rgba(11, 12, 15, 0) 30%);
}

.hx-hero__inner {
    flex: 1;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-h) + clamp(64px, 9vh, 120px));
    padding-bottom: clamp(56px, 8vh, 96px);
}

.hx-hero__content {
    max-width: 640px;
    animation: hx-up 0.9s var(--ease) both;
}

@keyframes hx-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

.hx-hero__kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffb36b;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.hx-hero__kicker::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--primary);
}

.hx-hero__title {
    margin: 20px 0 20px;
    color: #fff;
    font: 700 clamp(2.1rem, 1.4rem + 2.2vw, 3.3rem)/1.1 var(--font-display);
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.hx-hero__lead {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.075rem;
    line-height: 1.7;
}

.hx-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
    margin-top: 36px;
}

.hx-hero__call {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.hx-hero__call small {
    display: block;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    font-weight: 500;
}

.hx-hero__call-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: background-color 0.25s, border-color 0.25s;
}

.hx-hero__call:hover .hx-hero__call-icon {
    border-color: var(--primary);
    background: var(--primary);
}

/* Franja de clientes (logos a color en movimiento continuo) */
.hx-trust {
    position: relative;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.hx-trust__inner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 40px;
    height: 128px;
}

.hx-trust__label {
    padding-right: 40px;
    border-right: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.hx-trust__marquee {
    display: flex;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.hx-trust__track {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 72px;
    padding-right: 72px;
    list-style: none;
    animation: hx-marquee 45s linear infinite;
}

.hx-trust__marquee:hover .hx-trust__track {
    animation-play-state: paused;
}

.hx-trust__track img {
    display: block;
    width: auto;
    /* Los archivos traen tamaño visual normalizado (ver scripts/logos) */
    height: calc(var(--h, 79px) / 2.1);
    max-height: 64px;
    transition: transform 0.3s var(--ease);
}

.hx-trust__track img[height="79"] { --h: 79px; }
.hx-trust__track img[height="74"] { --h: 74px; }
.hx-trust__track img[height="77"] { --h: 77px; }
.hx-trust__track img[height="76"] { --h: 76px; }
.hx-trust__track img[height="53"] { --h: 53px; }
.hx-trust__track img[height="88"] { --h: 88px; }
.hx-trust__track img[height="119"] { --h: 119px; }
.hx-trust__track img[height="125"] { --h: 125px; }
.hx-trust__track img[height="140"] { --h: 140px; }

.hx-trust__track img:hover {
    transform: scale(1.06);
}

@keyframes hx-marquee {
    to { transform: translateX(-100%); }
}

@media (max-width: 768px) {
    .hx-hero {
        min-height: 0;
    }

    .hx-hero__inner {
        padding-top: calc(var(--header-h) + 56px);
        padding-bottom: 56px;
    }

    .hx-trust__inner {
        grid-template-columns: 1fr;
        gap: 12px;
        height: auto;
        padding: 20px 0 22px;
    }

    .hx-trust__label {
        padding: 0;
        border: 0;
        text-align: center;
    }

    .hx-trust__label br {
        display: none;
    }

    .hx-trust__track {
        gap: 48px;
        padding-right: 48px;
    }
}

/* ==========================================================================
   MANIFIESTO + CIFRAS 3D
   ========================================================================== */

.hx-manifesto {
    padding: var(--section-y) 0;
    background: var(--surface);
}

.hx-manifesto__text {
    max-width: 920px;
    font: 600 clamp(1.35rem, 1rem + 1.3vw, 2.15rem)/1.3 var(--font-display);
    letter-spacing: -0.035em;
    text-wrap: pretty;
}

.hx-manifesto__text .w {
    color: rgba(14, 16, 20, 0.12);
    transition: color 0.35s;
}

.hx-manifesto__text .w.is-lit {
    color: var(--ink);
}

.hx-manifesto__text .w.is-accent.is-lit {
    color: var(--primary);
}

.hx-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: clamp(40px, 5vw, 72px);
    border-top: 1px solid var(--line);
}

.hx-stat {
    display: flex;
    flex-direction: column;
    padding: 26px 24px 0 0;
}

.hx-stat + .hx-stat {
    padding-left: 28px;
    border-left: 1px solid var(--line);
}

.hx-stat__num {
    order: 1;
    background: linear-gradient(180deg, var(--ink) 35%, #5d6471);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font: 700 clamp(2.2rem, 1.7rem + 1.5vw, 3.1rem)/1 var(--font-display);
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
}

.hx-stat dt {
    order: 2;
    margin-top: 12px;
    color: var(--muted);
    font: 500 14px/1.4 var(--font-body);
}

@media (max-width: 900px) {
    .hx-stats {
        grid-template-columns: repeat(2, 1fr);
        border-top: 0;
    }

    .hx-stat,
    .hx-stat + .hx-stat {
        padding: 28px 0 28px;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .hx-stat:nth-child(even) {
        padding-left: 20px;
        border-left: 1px solid var(--line);
    }
}

/* ==========================================================================
   SERVICIOS — tarjetas 3D
   ========================================================================== */

.hx-services {
    position: relative;
    padding: var(--section-y) 0;
    background:
        var(--surface-soft);
}

.hx-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.hx-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(14, 16, 20, 0.08);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(14, 16, 20, 0.04);
    transition: transform 0.6s var(--ease), border-color 0.4s, box-shadow 0.4s;
}

.hx-card:hover {
    border-color: rgba(242, 116, 5, 0.55);
    box-shadow: 0 34px 60px -24px rgba(14, 16, 20, 0.35), 0 0 0 1px rgba(242, 116, 5, 0.2);
}

.hx-card__media {
    margin: 10px;
    aspect-ratio: 16 / 10.5;
    overflow: hidden;
    border-radius: 8px;
    transform: translateZ(40px);
}

.hx-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

.hx-card:hover .hx-card__media img {
    transform: scale(1.08);
}

.hx-card__body {
    position: relative;
    padding: 8px 22px 24px;
    transform: translateZ(60px);
}

.hx-card__index {
    position: absolute;
    top: 12px;
    right: 22px;
    color: var(--primary);
}

.hx-card h3 {
    margin-bottom: 8px;
    color: var(--ink);
    font: 700 1.25rem/1.2 var(--font-display);
    letter-spacing: -0.03em;
}

.hx-card p {
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.65;
}

.hx-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
    list-style: none;
}

.hx-card__specs li {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--fg);
    font-size: 10.5px;
}

.hx-card__glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(242, 116, 5, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.hx-card:hover .hx-card__glare {
    opacity: 1;
}

@media (max-width: 1000px) {
    .hx-cards {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin-inline: auto;
    }

    .hx-head {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ==========================================================================
   ESPECIFICACIONES — regla de 33 m
   ========================================================================== */

.hx-specs {
    padding: var(--section-y) 0;
    color: var(--ink);
    background:
        var(--concrete);
}

.hx-specs__grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: stretch;
}

.hx-ruler {
    --r: 0;
    position: relative;
    min-height: 440px;
}

.hx-ruler__scale {
    position: absolute;
    inset: 0 auto 0 0;
    width: 100%;
    border-left: 2px solid var(--ink);
    background:
        repeating-linear-gradient(to top, var(--ink) 0 2px, transparent 2px calc(100% / 10)) left / 46px 100% no-repeat,
        repeating-linear-gradient(to top, rgba(14, 16, 20, 0.45) 0 1px, transparent 1px calc(100% / 50)) left / 22px 100% no-repeat;
}

.hx-ruler__label {
    position: absolute;
    left: 54px;
    transform: translateY(50%);
    color: rgba(14, 16, 20, 0.55);
    font: 500 12px/1 var(--font-body);
}

.hx-ruler__fill {
    position: absolute;
    bottom: 0;
    left: 96px;
    width: 16px;
    height: calc(var(--r) * 100%);
    border-radius: 999px;
    background: linear-gradient(0deg, #c45500, var(--primary) 60%, #ffa04a);
    box-shadow: 0 0 30px rgba(242, 116, 5, 0.5);
}

.hx-ruler__value {
    position: absolute;
    top: -14px;
    left: 26px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
}

.hx-ruler__value b {
    font-weight: 500;
}

.hx-specs__lead {
    max-width: 540px;
    margin-top: 16px;
    color: #4b5058;
    font-size: 1rem;
    line-height: 1.7;
}

.hx-specs__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 680px;
    margin: 32px 0;
}

.hx-spec {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 18px 20px;
    border: 1px solid rgba(14, 16, 20, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform 0.4s var(--ease), box-shadow 0.4s;
}

.hx-spec:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -18px rgba(14, 16, 20, 0.3);
}

.hx-spec__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: var(--ink);
    font-size: 14px;
    color: var(--primary);
}

.hx-spec strong {
    font: 700 clamp(1.5rem, 1.3rem + 0.6vw, 1.85rem)/1 var(--font-display);
    letter-spacing: -0.04em;
}

.hx-spec span:last-child {
    margin-top: 4px;
    color: #5d6471;
    font-size: 13px;
}

@media (max-width: 900px) {
    .hx-specs__grid {
        grid-template-columns: 1fr;
    }

    .hx-ruler {
        display: none;
    }
}

@media (max-width: 520px) {
    .hx-specs__cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hx-spec {
        padding: 18px;
    }
}

/* ==========================================================================
   PROCESO
   ========================================================================== */

.hx-process {
    padding: var(--section-y) 0;
    background: var(--surface-soft);
}

.hx-process .ui-container {
    display: flex;
    flex-direction: column;
}

.hx-steps__progress {
    order: 1;
    position: relative;
    height: 2px;
    margin-bottom: 28px;
    background: var(--line);
}

.hx-steps__progress span {
    position: absolute;
    inset: 0 auto 0 0;
    width: calc(var(--pp, 0) * 100%);
    background: var(--primary);
    box-shadow: 0 0 18px rgba(242, 116, 5, 0.7);
}

.hx-steps {
    order: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    list-style: none;
}

.hx-step__num {
    display: block;
    margin-bottom: 14px;
    color: #b3b8c1;
    font: 700 15px/1 var(--font-body);
    transition: color 0.6s;
}

.hx-step.is-active .hx-step__num {
    color: var(--primary);
}

.hx-step h3 {
    margin-bottom: 8px;
    color: var(--ink);
    font: 700 1.15rem/1.25 var(--font-display);
    letter-spacing: -0.02em;
}

.hx-step p {
    max-width: 320px;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.65;
}

@media (max-width: 800px) {
    .hx-steps {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}
