/* Héroe cinematográfico con scroll (.sx). Todo acotado bajo .sx: no toca nada global. */
.sx { --tshadow: 0 1px 2px rgba(5,8,16,.95), 0 3px 12px rgba(5,8,16,.75), 0 10px 44px rgba(5,8,16,.8); position: relative; height: var(--sx-h, 640vh); background: #0b1a2e; color: var(--ink-inverse); }
.sx-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
.sx-media, .sx-media > * { position: absolute; inset: 0; }
.sx-poster { background: #0b1a2e center / cover no-repeat; }
.sx-video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 700ms var(--ease); transform: translateZ(0); will-change: transform; }
.sx-stage.is-video .sx-video { opacity: 1; }
.sx-mobile { display: none; overflow: hidden; }
.sx-mobile img { position: absolute; top: 0; left: 50%; display: block; height: 158svh; width: auto; max-width: none; transform: translate3d(-50%, 0, 0); will-change: transform; }
.sx-scrim { pointer-events: none; background:
  radial-gradient(ellipse 120% 90% at 50% 45%, rgba(8,14,26,0) 40%, rgba(8,14,26,.55) 100%),
  linear-gradient(180deg, rgba(8,14,26,.55) 0, rgba(8,14,26,0) 18%, rgba(8,14,26,0) 70%, rgba(8,14,26,.5) 100%); }
.sx-grain { pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Bandas */
.sx-band { position: absolute; z-index: 2; top: 50%; width: min(31vw, 460px); transform: translateY(-46%); opacity: 0; pointer-events: none; text-shadow: var(--tshadow); }
.sx-band.is-live { pointer-events: auto; }
.sx-band--left { left: max(24px, 5.5vw); }
.sx-band--right { right: max(24px, 5.5vw); }
.sx-band::before { content: ""; position: absolute; inset: -38% -30%; z-index: -1; pointer-events: none; opacity: calc(.3 + .7 * var(--k, 1));
  background: radial-gradient(ellipse 62% 56% at 50% 50%, rgba(6,12,24,.76) 0%, rgba(6,12,24,.52) 46%, rgba(6,12,24,0) 76%); }
.sx-band--land { top: auto; bottom: 7vh; left: 50%; width: min(820px, 92vw); transform: translateX(-50%); text-align: center; }
.sx-band--land::before { inset: -45% -18% -30%; background: radial-gradient(ellipse 60% 62% at 50% 55%, rgba(6,12,24,.78) 0%, rgba(6,12,24,.5) 50%, rgba(6,12,24,0) 78%); }

.sx-eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 12px/1.2 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--electric); margin-bottom: 18px; }
.sx-tick { width: 26px; height: 1px; background: currentColor; transform-origin: left; transform: scaleX(var(--k, 1)); }
.sx .sx-title { font: 600 clamp(34px, 4.1vw, 62px)/1.05 var(--font-display); letter-spacing: -.02em; color: var(--ink-inverse); margin: 0 0 18px; text-wrap: balance; }
.sx .sx-title--land { font-size: clamp(32px, 3.6vw, 54px); }
.sx-split { display: inline; }
.sx-split .w { display: inline-block; white-space: nowrap; }
.sx-split .c { display: inline-block; }
.sx-split .em { font-style: italic; color: var(--electric); }
.sx-fx-grid .em { color: var(--negocios-light); }
.sx-fx-focus .em, .sx-title--soft em { color: var(--hogares-light); }
.sx-text { font-size: 18px; line-height: 1.6; color: var(--body-inverse); margin: 0 0 22px; max-width: 40ch; opacity: calc(var(--k, 1) * 1.6 - .6); transform: translateY(calc((1 - var(--k, 1)) * 14px)); }
.sx-band--land .sx-text { margin-inline: auto; }
.sx .sx-link { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; text-decoration: none; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.06); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); text-shadow: none; opacity: calc(var(--k, 1) * 2 - 1); transition: background-color 150ms var(--ease), border-color 150ms var(--ease); }
.sx .sx-link:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.5); color: #fff; }

/* (a) Scatter: los caracteres se juntan como las luces de la azotea */
.sx-fx-scatter .c { --kc: clamp(0, (var(--k, 0) - var(--th, 0)) * 2.6, 1); opacity: var(--kc);
  transform: translate(calc((1 - var(--kc)) * var(--jx, 0px)), calc((1 - var(--kc)) * var(--jy, 0px))) rotate(calc((1 - var(--kc)) * var(--jr, 0deg))); }
/* (b) Encaje en rejilla: entra en orden, como las mesas alineadas de la oficina */
.sx-fx-grid .c { --kc: clamp(0, (var(--k, 0) - var(--th, 0)) * 3, 1); opacity: var(--kc); transform: translateX(calc((1 - var(--kc)) * var(--jx, 0px))); }
/* (c) De desenfoque a nitidez: la luz cálida de casa enfocando */
.sx-fx-focus { display: grid; }
.sx-fx-focus > * { grid-column: 1; }
.sx-fx-focus .sx-title { grid-row: 2; }
.sx-fx-focus .sx-eyebrow { grid-row: 1; }
.sx-fx-focus .sx-text { grid-row: 3; }
.sx-fx-focus .sx-link { grid-row: 4; justify-self: start; }
.sx-fx-focus .sx-split { opacity: var(--k, 0); }
.sx-fx-focus .sx-title--soft { filter: blur(10px); opacity: calc(1 - var(--k, 0)); pointer-events: none; }
/* (e) Subida palabra a palabra hasta la llegada */
.sx-fx-rise .w { --kc: clamp(0, (var(--k, 0) - var(--th, 0)) * 2.4, 1); opacity: var(--kc); transform: translateY(calc((1 - var(--kc)) * 0.6em)); }
.sx-sub { --ks: clamp(0, (var(--k, 0) - .55) * 3.2, 1); opacity: var(--ks); transform: translateY(calc((1 - var(--ks)) * 16px)); }
.sx-cta { --kb: clamp(0, (var(--k, 0) - .75) * 4, 1); opacity: var(--kb); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; font-size: 14px; color: var(--body-inverse); text-shadow: none; }
.sx .sx-search { margin: 0 auto; text-shadow: none; text-align: left; }
.sx .sx-search .sd-search__results { text-shadow: none; }
.sx-site .sx .sd-chip, .sx .sd-chip { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); color: var(--ink-inverse); }
.sx .sd-chip:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.4); color: #fff; }

/* Raíl de progreso: las cuatro plantas */
.sx-rail { position: absolute; z-index: 3; right: 22px; top: 50%; height: 34vh; width: 2px; transform: translateY(-50%); background: rgba(255,255,255,.14); border-radius: 2px; }
.sx-rail__fill { position: absolute; inset: 0; background: var(--electric); border-radius: 2px; transform-origin: top; transform: scaleY(var(--p, 0)); }
.sx-rail__dot { position: absolute; left: 50%; top: calc(var(--at) * 100%); width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #0b1a2e; box-shadow: 0 0 0 1.5px rgba(255,255,255,.35); transition: background-color 250ms var(--ease), box-shadow 250ms var(--ease); }
.sx-rail__dot.on { background: var(--electric); box-shadow: 0 0 0 4px rgba(88,213,255,.18); }

/* Anillo de carga y señal de scroll */
.sx-loader { position: absolute; z-index: 3; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; color: var(--ink-inverse); font: 500 13px/1.2 var(--font-sans); letter-spacing: .04em; transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
.sx-loader svg { width: 34px; height: 34px; }
.sx-ring { stroke-dashoffset: 126; transition: stroke-dashoffset 120ms linear; }
.sx-loader.is-gone { opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }
.sx-loader.is-failed svg { display: none; }

/* Cabecera translúcida sobre el héroe */
body:has(.sx) .sd-site-header { position: fixed; left: 0; right: 0; }
body:has(.sx) .sd-main { padding-top: 0; }
body.sx-over .sd-header--site { background: rgba(9,20,36,.42); border-bottom-color: rgba(255,255,255,.1); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: none; }
body.sx-over .sd-header__logo .sd-logo--pos { display: none; }
body.sx-over .sd-header__logo .sd-logo--neg { display: block; }
body.sx-over.sd-site .sd-header__link, body.sx-over.sd-site .sd-header__link:hover, body.sx-over.sd-site .sd-header__link:focus-visible, body.sx-over.sd-site .sd-mm__item.is-open > .sd-header__link { color: #fff; }
body.sx-over.sd-site .sd-header__link--plain::after { background: #fff; }
body.sx-over.sd-site .sd-mm__chev { opacity: .8; }
body.sx-over .sd-header__link .sd-header__dot { background: var(--accent-light); }
body.sx-over .sd-header__link .sd-header__dot--store { background: transparent; border-color: var(--accent-light); }
body.sx-over .sd-header__sep { background: rgba(255,255,255,.2); }
body.sx-over .sd-site .sd-header__burger { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; }

/* Modo móvil: la imagen vertical se desplaza con el scroll */
.sx--pan { height: 420vh; }
.sx--pan .sx-poster, .sx--pan .sx-video, .sx--pan .sx-rail, .sx--pan .sx-loader svg { display: none; }
.sx--pan .sx-mobile { display: block; }
.sx--pan .sx-band, .sx--static .sx-band { left: 20px; right: 20px; width: auto; top: auto; bottom: max(28px, 6svh); transform: none; text-align: left; }
.sx--pan .sx-band--land, .sx--static .sx-band--land { text-align: center; }
.sx--pan .sx-band::before { inset: -40% -20px -30%; background: linear-gradient(180deg, rgba(6,12,24,0) 0%, rgba(6,12,24,.72) 45%, rgba(6,12,24,.82) 100%); }
.sx--pan .sx .sx-title, .sx--pan .sx-title { font-size: clamp(30px, 8.4vw, 40px); }
.sx--pan .sx-text { font-size: 16px; }
.sx--pan .sx-loader { display: none; }

/* Movimiento reducido: todo en su estado final, en flujo normal */
.sx--static { height: auto; }
.sx--static .sx-stage { position: relative; height: auto; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; gap: 56px; padding: 140px 20px 64px; }
.sx--static .sx-poster, .sx--static .sx-video, .sx--static .sx-rail, .sx--static .sx-loader { display: none; }
.sx--static .sx-mobile { display: block; }
.sx--static .sx-mobile img { left: 0; width: 100%; height: 100%; object-fit: cover; transform: none; }
.sx--static .sx-band { position: relative; inset: auto; opacity: 1 !important; transform: none; width: min(760px, 100%); margin: 0 auto; }
.sx--static .sx-band, .sx--static .sx-band * { --k: 1 !important; }
.sx--static .sx-band::before { inset: -20px; background: rgba(6,12,24,.6); border-radius: 20px; }
.sx--static .sx-title--soft { display: none; }

@media (max-height: 560px) { .sx-rail, .sx-loader { display: none; } }
@media (max-width: 1100px) and (min-width: 721px) { .sx-band { width: min(40vw, 420px); } }
