/* ==========================================================================
   ARMELEC — Hero de Navidad (página de inicio)
   Escritorio: la imagen manda (proporción fija 3840×1666) y todo se coloca en %
   para que texto y bolas queden siempre en el mismo sitio sobre el fondo.
   Móvil/tablet: texto → bolas (CTA) → árbol con los armarios.
   ========================================================================== */

@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
}

.xh {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(120% 70% at 50% 18%, #cf1219 0%, #a9070d 48%, #7a0308 100%);
}

.xh-stage { position: relative; }

/* ---------- Texto ---------- */
.xh-copy {
    position: relative;
    z-index: 2;
    padding: 44px 24px 8px;
    max-width: 640px;
}
.xh-eyebrow {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #f3cf7a;
    background: linear-gradient(100deg, #fbe7a8 0%, #f0c35e 38%, #d9a441 62%, #f7dc93 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 1px 1px rgba(90, 0, 0, .35));
}
.xh-title {
    margin: 14px 0 0;
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
    font-weight: 600;
    font-size: clamp(38px, 10.4vw, 58px);
    line-height: 1.06;
    letter-spacing: -.012em;
    text-wrap: balance;
    text-shadow: 0 2px 18px rgba(90, 0, 4, .35);
}
.xh-line {
    display: inline;
    animation: xh-rise .9s cubic-bezier(.22, 1, .36, 1) both;
}
.xh-line:nth-child(2) { animation-delay: .08s; }
.xh-line:nth-child(3) { animation-delay: .16s; }
.xh-line:nth-child(4) { animation-delay: .24s; }
.xh-line + .xh-line::before { content: " "; }
@keyframes xh-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.xh-lead {
    margin: 16px 0 0;
    font-size: 17px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .95);
}

/* «i» de Fabricantes: bastón de caramelo */

/* ---------- Bolas de nieve (CTA) ---------- */
.xh-globes {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 4%;
    padding: 18px 16px 0;
}
.xh-globe {
    position: relative;
    display: block;
    width: 46%;
    max-width: 250px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.xh-globe__body {
    position: relative;
    display: block;
    transform-origin: 50% 92%;
    transition: transform .55s cubic-bezier(.34, 1.56, .64, 1);
    will-change: transform;
}
.xh-globe img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 18px rgba(60, 0, 3, .45));
}
/* Sombra de la peana sobre el suelo */
.xh-globe::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 18%;
    right: 18%;
    bottom: 4%;
    height: 7%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(40, 0, 2, .55), rgba(40, 0, 2, 0));
    transition: transform .55s cubic-bezier(.34, 1.56, .64, 1);
}
/* Zona de la esfera donde cae la nieve */
.xh-snow {
    position: absolute;
    pointer-events: none;
}
.xh-globe--catalogo .xh-snow { left: 15.6%; top: 5.6%; width: 68.8%; height: 68.8%; }
.xh-globe--contacto .xh-snow { left: 13.7%; top: 3.4%; width: 73%; height: 73%; }

@media (hover: hover) {
    .xh-globe:hover .xh-globe__body { transform: scale(1.12); animation: xh-shake .7s ease-in-out; }
    .xh-globe:hover::after { transform: scaleX(1.12); }
}
.xh-globe:focus-visible .xh-globe__body { transform: scale(1.12); }
.xh-globe:focus-visible img { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 3px #fff) drop-shadow(0 10px 18px rgba(60, 0, 3, .45)); }
@keyframes xh-shake {
    0% { rotate: 0deg; }
    20% { rotate: -4deg; }
    40% { rotate: 3.5deg; }
    60% { rotate: -2.5deg; }
    80% { rotate: 1.5deg; }
    100% { rotate: 0deg; }
}

/* ---------- Imagen de fondo ---------- */
.xh-bg { display: block; }
.xh-bg img {
    display: block;
    width: 100%;
    height: auto;
    margin-top: -14%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
}

/* Móvil y tablet: orden texto → bolas → árbol */
@media (max-width: 1023px) {
    .xh-stage { display: flex; flex-direction: column; }
    .xh-copy { order: 1; }
    .xh-globes { order: 2; }
    .xh-bg { order: 3; }
}
@media (min-width: 640px) and (max-width: 1023px) {
    .xh-copy { padding: 60px 40px 8px; max-width: 760px; }
    .xh-title { font-size: clamp(46px, 7.4vw, 66px); }
    .xh-globes { justify-content: flex-start; padding-left: 40px; gap: 32px; }
    .xh-globe { width: 32%; }
}

/* ---------- Escritorio: composición sobre la imagen ---------- */
@media (min-width: 1024px) {
    .xh-stage { aspect-ratio: 3840 / 1666; }
    .xh-bg { position: absolute; inset: 0; }
    .xh-bg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        margin: 0;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .xh-copy {
        position: absolute;
        left: 7.2%;
        top: 7.4%;
        width: 44%;
        max-width: none;
        padding: 0;
    }
    .xh-eyebrow { font-size: max(14px, 1.04vw); }
    .xh-title {
        margin-top: .5vw;
        font-size: max(32px, 3.05vw);
        line-height: 1.05;
        text-wrap: initial;
    }
    .xh-line { display: block; white-space: nowrap; }
    .xh-line + .xh-line::before { content: none; }
    .xh-lead { margin-top: 1.1vw; font-size: max(15px, 1.22vw); max-width: 30em; }
    .xh-lead { white-space: nowrap; max-width: none; }

    .xh-globes { position: absolute; inset: 0; padding: 0; display: block; pointer-events: none; }
    .xh-globe { position: absolute; width: 15%; max-width: none; pointer-events: auto; }
    .xh-globe--catalogo { left: 5.19%; top: 52.1%; }
    .xh-globe--contacto { left: 19.9%; top: 51.2%; }
    @media (max-width: 1199px) {
        .xh-copy { top: 6.4%; width: 50%; }
        .xh-lead { font-size: 14px; }
        .xh-globe { width: 13.5%; }
        .xh-globe--catalogo { left: 5.39%; top: 55.6%; }
        .xh-globe--contacto { left: 18.6%; top: 54.7%; }
    }
    /* Reflejo en el suelo brillante (Chrome, Edge y Safari) */
    .xh-globe img { -webkit-box-reflect: below -0.9vw linear-gradient(transparent 72%, rgba(255, 255, 255, .22)); }
}

@media (prefers-reduced-motion: reduce) {
    .xh-line { animation: none; }
    .xh-globe__body, .xh-globe::after { transition: none; }
    .xh-globe:hover .xh-globe__body { animation: none; }
}

/* Texto solo para lectores de pantalla y buscadores */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Luces del árbol que titilan (solo escritorio, donde la imagen es la panorámica) */
.xh-lights { display: none; }
.xh-ambient { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
@media (min-width: 1024px) {
    .xh-lights { display: block; position: absolute; inset: 0; pointer-events: none; z-index: 1; }
    .xh-lights i {
        position: absolute;
        width: 1.6vw; height: 1.6vw;
        margin: -.8vw 0 0 -.8vw;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 246, 210, .95) 0, rgba(255, 214, 120, .55) 22%, rgba(255, 200, 90, 0) 62%);
        mix-blend-mode: screen;
        opacity: 0;
        animation: xh-twinkle var(--t, 3s) ease-in-out var(--d, 0s) infinite;
    }
}
@keyframes xh-twinkle {
    0%, 100% { opacity: 0; transform: scale(.6); }
    45% { opacity: .9; transform: scale(1.15); }
    60% { opacity: .5; transform: scale(.95); }
}
@media (prefers-reduced-motion: reduce) {
    .xh-lights i { animation: none; opacity: .35; }
    .xh-ambient { display: none; }
}
