/* ============================================================
   duqe — portada (rediseño 1.1.24, 29 sep 2026)
   Se encola solo en la portada, después de front-page.css y
   help.css (functions.php). Viene de la vista previa aprobada:
   hero «abanico + ordenador» (opción 5), carrusel de funciones
   «Fusión» y el portátil de Web Sync. Solo transform/opacity en
   las animaciones; todo lo que se mueve se apaga con
   prefers-reduced-motion (el reveal ni se activa: ver el script
   del <head> en functions.php).
   ============================================================ */

/* ============================================================
   HERO — BLOQUE DE TEXTO
   ============================================================ */
.hx { padding: clamp(18px, 3vw, 40px) 0 0; overflow: clip; position: relative; }
.hx__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 72px); align-items: center;
}
.hx__txt { min-width: 0; padding-bottom: clamp(28px, 4vw, 64px); }

.hx__ey {
  display: block;
  font-size: 11.5px; letter-spacing: .16em; line-height: 1.4;
  margin: 0 0 16px;
}
.hx__sq { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--red); margin-right: 10px; vertical-align: 1px; }
@media (max-width: 400px) { .hx__ey { letter-spacing: .12em; font-size: 11px; } }

.hx h1 {
  font-size: clamp(34px, 10vw, 44px);
  line-height: 1.0; letter-spacing: -0.035em;
  margin: 0 0 16px; text-wrap: balance;
  overflow-wrap: break-word; hyphens: manual;
}
.hx__lead {
  font-size: 16.5px; line-height: 1.5; color: var(--ink-2);
  max-width: 40ch; margin: 0 0 22px;
  text-wrap: pretty; hyphens: manual;
}
.hx__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hx__cta .btn { justify-content: center; padding: 14px 24px; font-size: 16px; }
.hx__tick {
  display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 18px 0 0;
  font-size: 12px; color: var(--muted); letter-spacing: .04em; font-weight: 600;
}
.hx__tick span { white-space: nowrap; }
.hx__tick b { color: var(--ink); font-weight: 700; }

@media (max-width: 560px) {
  .hx__cta .btn { flex: 1 1 auto; padding: 14px 16px; }
}
@media (min-width: 981px) {
  .hx__grid { min-height: clamp(620px, calc(100svh - 110px), 800px); }
  .hx__ey { font-size: 12.5px; margin-bottom: 26px; }
  .hx h1 { font-size: clamp(52px, 4.9vw, 76px); margin-bottom: 26px; }
  .hx__lead { font-size: 19px; margin-bottom: 34px; }
  .hx__cta { gap: 12px; }
  .hx__cta .btn { padding: 16px 28px; font-size: 17px; }
  .hx__tick { margin-top: 30px; gap: 6px 26px; }
}
@media (max-width: 980px) {
  .hx__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hx__txt { padding-bottom: 26px; }
}

/* Las <img> llevan width/height (evitan saltos al cargar): el alto lo pone la proporción. */
.hx__art img { height: auto; }

/* El arte del hero no entra con el reveal genérico (sube 14 px):
   tiene su propia entrada, más abajo. */
.reveal-ready .hx__art.reveal { transform: none; }

/* ============================================================
   HERO «ABANICO + ORDENADOR» — el portátil con Web Sync centrado
   detrás y tres teléfonos abiertos en abanico delante de su parte baja.
   Medidas en variables: --lw portátil, --cw teléfono central,
   --sw laterales, --pt dónde empiezan los teléfonos, --h alto visible.
   ============================================================ */
.hx--5 .hx__grid { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; justify-items: center; }
.hx--5 .hx__txt { text-align: center; max-width: 1000px; padding-bottom: 26px; }
.hx--5 .hx__ey, .hx--5 .hx__cta, .hx--5 .hx__tick { justify-content: center; }
.hx--5 .hx__lead { margin-inline: auto; }
.hx5 {
  --lw: min(100vw + 8px, 470px); --cw: min(40vw, 190px); --sw: min(34vw, 162px);
  --pt: calc(var(--lw) * .34); --h: calc(var(--pt) + var(--cw) * 1.5);
  position: relative; width: 100%; height: var(--h);
}
.hx5__lap {
  position: absolute; left: 50%; top: 0; width: var(--lw); margin-left: calc(var(--lw) / -2);
}
.hx5__lap .lap__lid img { background: #fff; }
.hx5__d { position: absolute; left: 50%; top: var(--pt); }
.hx5__d--c { width: var(--cw); margin-left: calc(var(--cw) / -2); z-index: 3; }
.hx5__d--l, .hx5__d--r { width: var(--sw); margin-left: calc(var(--sw) / -2); z-index: 2; }
.hx5 { --fx: 66%; --fy: 26px; --fr: 8deg; }
.hx5__d--l { transform: translate(calc(var(--fx) * -1), var(--fy)) rotate(calc(var(--fr) * -1)); }
.hx5__d--r { transform: translate(var(--fx), var(--fy)) rotate(var(--fr)); }
/* los teléfonos flotan sobre el portátil: sombra algo más marcada */
.hx5__d { box-shadow: 0 40px 70px -30px rgba(20,16,10,.55), 0 12px 28px -16px rgba(20,16,10,.4); }

/* entrada: primero sube el portátil, luego el central y al final se abre el abanico */
.reveal-ready .hx5.reveal .hx5__lap { transform: translateY(28px); opacity: 0; }
.reveal-ready .hx5.reveal.in .hx5__lap { transform: none; opacity: 1; transition: transform 1s var(--ease), opacity .6s var(--ease); }
.reveal-ready .hx5.reveal .hx5__d--c { transform: translateY(70px); opacity: 0; }
.reveal-ready .hx5.reveal.in .hx5__d--c { transform: none; opacity: 1; transition: transform 1s var(--ease) .3s, opacity .5s var(--ease) .3s; }
.reveal-ready .hx5.reveal .hx5__d--l,
.reveal-ready .hx5.reveal .hx5__d--r { transform: translate(0, 70px) rotate(0); opacity: 0; }
.reveal-ready .hx5.reveal.in .hx5__d--l { transform: translate(calc(var(--fx) * -1), var(--fy)) rotate(calc(var(--fr) * -1)); }
.reveal-ready .hx5.reveal.in .hx5__d--r { transform: translate(var(--fx), var(--fy)) rotate(var(--fr)); }
.reveal-ready .hx5.reveal.in .hx5__d--l,
.reveal-ready .hx5.reveal.in .hx5__d--r {
  opacity: 1; transition: transform 1.2s var(--ease) .7s, opacity .5s var(--ease) .7s;
}
@media (min-width: 981px) {
  .hx--5 { padding-top: clamp(20px, 2.4vw, 36px); }
  .hx--5 .hx__txt { padding-bottom: 34px; }
  .hx--5 .hx__ey { margin-bottom: 18px; }
  .hx--5 h1 { font-size: clamp(46px, 4.2vw, 64px); max-width: 24ch; margin-inline: auto; margin-bottom: 18px; }
  .hx--5 .hx__lead { max-width: 60ch; margin-bottom: 24px; }
  .hx--5 .hx__tick { margin-top: 18px; }
  .hx5 { --lw: min(62vw, 820px); --cw: min(20vw, 280px); --sw: min(17vw, 240px); --pt: calc(var(--lw) * .29); --fx: 74%; --fy: 44px; --fr: 7deg; }
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hx5__lap, .hx5__d { animation: linear both; animation-timeline: scroll(root); animation-range: 0px 800px; }
    .hx5__lap { animation-name: hx-up3; }
    .hx5__d--c { animation-name: hx-up2; }
    .hx5__d--l { animation-name: hx5-l; }
    .hx5__d--r { animation-name: hx5-r; }
  }
}
@keyframes hx5-l { from { translate: 0 0; } to { translate: -28px -30px; } }
@keyframes hx5-r { from { translate: 0 0; } to { translate: 28px -30px; } }

/* parallax suave de los teléfonos al hacer scroll (keyframes compartidos) */
@keyframes hx-up2 { from { translate: 0 0; } to { translate: 0 -46px; } }
@keyframes hx-up3 { from { translate: 0 0; } to { translate: 0 -24px; } }

/* ---------- etiqueta Premium ---------- */
.tag {
  display: inline-block; vertical-align: .2em;
  margin-left: 8px; padding: 3px 7px 2px;
  font-family: var(--font-body); font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; line-height: 1.2;
  color: var(--muted); border: 1px solid var(--line); border-radius: 100px;
}

/* ============================================================
   PORTÁTIL (rehecho): filo rojo fino como el del teléfono, marco
   de pantalla oscuro y fino, y una base de aluminio más ancha que
   la tapa, que es lo que hace que se lea como portátil.
   ============================================================ */
.lap { width: 100%; }
.lap__lid {
  margin-inline: 6.5%;
  padding: 1.6% 1.6% 2.2%;
  background: #1d1b18;
  border: 2px solid var(--red);
  border-radius: 12px 12px 3px 3px;
}
.lap__lid img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 3px; background: #e6e4df;
}
.lap__base {
  position: relative; height: 12px;
  background: linear-gradient(#eeebe6, #d6d2cb 55%, #bfbab2);
  border-radius: 2px 2px 14px 14px / 2px 2px 10px 10px;
  box-shadow: 0 30px 50px -26px rgba(20,16,10,.5), 0 8px 16px -10px rgba(20,16,10,.35);
}
.lap__base::before {
  content: ""; position: absolute; left: 50%; top: 0; width: 15%; height: 4px;
  transform: translateX(-50%);
  background: #c4bfb7; border-radius: 0 0 6px 6px;
}
@media (max-width: 700px) { .lap__lid { border-width: 1.5px; border-radius: 9px 9px 2px 2px; } .lap__base { height: 8px; } }

/* ============================================================
   FUNCIONES «FUSIÓN» — chips como índice + carril con scroll-snap
   de teléfonos enteros. JS en assets/portada.js.
   ============================================================ */
.fz { --sw: 250px; margin-top: clamp(28px, 4vw, 48px); }
.fz__chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: clamp(24px, 3vw, 36px);
}
.fz__chip {
  font: 500 15px/1.2 var(--font-body); color: var(--ink-2);
  padding: 10px 16px; min-height: 42px;
  border: 1px solid var(--line); border-radius: 100px; background: transparent;
  cursor: pointer; white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease);
}
.fz__chip:hover { border-color: var(--ink-2); color: var(--ink); }
.fz__chip:active { transform: scale(.98); }
.fz__chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.fz__chip:focus-visible, .fz__arrow:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* El carril: cada función ocupa --sw y la activa queda en el centro; las de
   los lados asoman atenuadas, que es lo que invita a deslizar. */
.fz__track {
  display: flex; gap: clamp(20px, 3vw, 40px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-inline: calc((100% - var(--sw)) / 2);
  padding-block: 8px 40px;           /* sitio para la sombra del teléfono */
  cursor: grab;
}
.fz__track::-webkit-scrollbar { display: none; }
.fz__track.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.fz__track.is-drag img { pointer-events: none; }
.fz__slide {
  flex: 0 0 var(--sw); margin: 0; scroll-snap-align: center;
  display: flex; flex-direction: column;
  opacity: .38; transform: scale(.92);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.fz__slide.is-active { opacity: 1; transform: none; }
.fz__media {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1080 / 2424;           /* todas del alto de un teléfono */
}
.fz__media .device { width: 100%; }
.fz__media .device img { height: auto; }
.fz__slide--lap { flex-basis: min(560px, 86vw); }
.fz__slide--lap .fz__media { aspect-ratio: auto; padding-top: 18%; }
.fz__track { align-items: flex-start; }
.fz__cap { display: flex; flex-direction: column; gap: 6px; margin-top: 22px; }
.fz__num { font: 700 13px/1 var(--font-display); letter-spacing: .06em; color: var(--red-ink); }
.fz__t { font: 700 22px/1.15 var(--font-display); color: var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fz__d { color: var(--ink-2); font-size: 16px; line-height: 1.5; max-width: 34ch; }
.fz__ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 4px; }
.fz__arrow {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-size: 18px; cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.fz__arrow:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fz__arrow:active { transform: scale(.96); }
.fz__count { font: 600 14px/1 var(--font-display); color: var(--muted); font-variant-numeric: tabular-nums; min-width: 5ch; text-align: center; }
.fz__count b { color: var(--ink); }

@media (max-width: 900px) {
  .fz { --sw: min(240px, 64vw); }
  /* En el móvil los chips van en una sola fila que se desliza, a sangre. */
  .fz__chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: -20px; padding-inline: 20px; scroll-padding-inline: 20px;
  }
  .fz__chips::-webkit-scrollbar { display: none; }
  .fz__track { margin-inline: -20px; padding-inline: calc((100% + 40px - var(--sw)) / 2); gap: 18px; }
  .fz__slide--lap { flex-basis: min(340px, 84vw); }
  .fz__t { font-size: 20px; }
  .fz__d { font-size: 15.5px; }
  .fz__ctrl { display: none; }       /* en el móvil se desliza con el dedo */
}
@media (prefers-reduced-motion: reduce) {
  .fz__slide, .fz__chip { transition: none; }
}

/* «Y además», bajo el carrusel */
.fx__more {
  margin-top: clamp(28px, 3.4vw, 44px);
  color: var(--muted); font-size: 15px; line-height: 1.7; max-width: 80ch;
}
.fx__more-k {
  font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2); margin-right: 10px;
}
@media (max-width: 900px) {
  .fx__more { font-size: 14.5px; }
  .fx__more-k { display: block; margin-bottom: 4px; }
}

/* ============================================================
   CIFRAS · «Escenario» (1.1.25)
   Una cifra cada vez, enorme, con su frase; las demás atenuadas.
   Escritorio: titular + índice fijos a la izquierda (el índice
   marca en rojo la que está en escena). Móvil: barra de seis
   tramos fija bajo la navegación. Sin JS no se atenúa nada y se
   ven las seis. El recuento está en portada.js.
   El fondo y el relleno de la sección son los de .stats
   (front-page.css).
   ============================================================ */
.cx { --cx-top: 118px; padding-bottom: clamp(56px, 7vw, 100px); }
.cx h2 { font-weight: 800; letter-spacing: -0.03em; }
.cx h2 em { font-style: normal; color: var(--red); }
.cx .eyebrow { display: block; margin-bottom: 20px; }

.cx__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 120px); align-items: start;
}
.cx__side { position: sticky; top: var(--cx-top); }
.cx__head h2 { font-size: clamp(30px, 3.4vw, 50px); line-height: 1.06; }
.cx__idx { list-style: none; margin: clamp(36px, 5vh, 56px) 0 0; padding: 0; border-top: 1px solid var(--line); }
.cx__idx li {
  display: flex; align-items: baseline; gap: 14px; position: relative;
  padding: 11px 0 11px 22px; border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); transition: color .4s var(--ease);
}
.cx__idx li::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 2px; margin-top: -1px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.cx__idx li.is-on { color: var(--ink); }
.cx__idx li.is-on::before { transform: scaleX(1); }
.cx__n { letter-spacing: 0; font-variant-numeric: tabular-nums; }

.cx__list { list-style: none; margin: 0; padding: 0; }
.cx__sc {
  min-height: 62vh; display: flex; flex-direction: column; justify-content: center;
  padding: 5vh 0;
}
.cx__k {
  display: flex; gap: 12px; align-items: baseline;
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.cx__k .cx__n { color: var(--red-ink); }
.cx__v {
  font-family: var(--font-display); font-weight: 800; color: var(--ink);
  font-size: clamp(96px, 12.5vw, 210px); line-height: .86; letter-spacing: -0.05em;
  margin: 18px 0 22px; white-space: nowrap;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
.cx__v small { font-size: .3em; font-weight: 700; letter-spacing: 0; margin-left: .03em; }
/* Cada grupo de dígitos que cuenta va en una caja con el ancho de su valor
   final (lo fija el JS): la unidad no baila mientras cuenta. */
.cx__dg { display: inline-block; text-align: right; }
.cx__d { font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; color: var(--ink-2); max-width: 30ch; }

/* Cierre: la frase de marca, el enlace a las funciones y las fuentes. */
.cx__end { min-height: 0; padding-top: 8vh; align-items: flex-start; }
.cx__close {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(28px, 3.6vw, 52px); line-height: 1.06; letter-spacing: -0.03em;
  max-width: 17ch; text-wrap: balance; color: var(--ink);
}
.cx__go {
  display: inline-flex; align-items: center; gap: .45em; margin-top: 22px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--red-ink);
  padding-bottom: 4px; border-bottom: 1.5px solid var(--red-line);
  transition: border-color .25s var(--ease);
}
.cx__go:hover { border-color: var(--red); }
.cx__go span { display: inline-block; transition: transform .35s var(--ease); }
.cx__go:hover span { transform: translateX(4px); }
.cx .sources {
  align-self: stretch;
  font-family: var(--font-body); font-size: 13px; line-height: 1.6; color: var(--muted);
  max-width: 62ch; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line);
}
.cx__prog { display: none; }

/* Con el script: la que está en escena manda; las demás se apagan. */
.cx.is-live .cx__sc { opacity: .14; transition: opacity .6s var(--ease); }
.cx.is-live .cx__sc .cx__v { transform: translateY(10px) scale(.97); transform-origin: left bottom; transition: transform .8s var(--ease); }
.cx.is-live .cx__sc.is-on { opacity: 1; }
.cx.is-live .cx__sc.is-on .cx__v { transform: none; }

/* Escritorio bajo: si el titular y el índice no caben fijos, van con la página. */
@media (min-width: 981px) and (max-height: 620px) {
  .cx__side { position: static; }
}

@media (max-width: 980px) {
  .cx { --cx-top: 76px; }      /* justo bajo la navegación (77 px) */
  .cx__grid { grid-template-columns: 1fr; gap: 8px; }
  .cx__side { position: static; }
  .cx__idx { display: none; }
  .cx__prog {
    display: flex; gap: 5px; position: sticky; top: var(--cx-top); z-index: 3;
    padding: 14px 0 12px; background: var(--paper-2);
  }
  .cx__prog i { flex: 1; height: 3px; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
  .cx__prog i::after {
    content: ""; position: absolute; inset: 0; background: var(--ink);
    transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
  }
  .cx__prog i.is-done::after { transform: scaleX(1); }
  .cx__prog i.is-on::after { transform: scaleX(1); background: var(--red); }
  .cx__sc { min-height: 50svh; padding: 5svh 0; }
  .cx__v { font-size: clamp(80px, 28vw, 150px); margin: 12px 0 18px; }
  .cx__end { min-height: 0; padding-top: 5svh; }
}

@media (prefers-reduced-motion: reduce) {
  .cx.is-live .cx__sc, .cx.is-live .cx__sc .cx__v, .cx__idx li, .cx__idx li::before,
  .cx__prog i::after, .cx__go, .cx__go span { transition: none !important; }
  .cx.is-live .cx__sc .cx__v { transform: none; }
  .cx__go:hover span { transform: none; }
}

/* ---------- 07/10/2026 (1.1.27): el hero en pantallas grandes ----------
   El portátil tenía un tope de 820 px: en 1920 ocupaba menos de la mitad del
   ancho y el abanico se veía pequeño en medio de mucho vacío. Desde 1440 px
   el tope sube, con las mismas proporciones (central 0,34 y laterales 0,29
   del portátil). Por debajo de 1440 queda exactamente como estaba. */
@media (min-width: 1440px) {
  .hx5 { --lw: min(60vw, 1040px); --cw: min(20.4vw, 354px); --sw: min(17.4vw, 302px); }
}
