/* Mundo Duxels — prototipo. Neon sobre #0b1020. */
:root {
  --bg: #0b1020;
  --bg2: #121a33;
  --fg: #e8ecf8;
  --mut: #a4adc8;
  --ia: #2a86ff;
  --sw: #f2f5ff; /* software */
  --xr: #f0392f; /* juegos + XR */
  --bc: #22b14c; /* blockchain */
  --line: rgba(232, 236, 248, 0.14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
/* sin scroll suave: un ancla dentro de la pagina no debe recorrer las 12 escenas a toda velocidad */
html { scroll-behavior: auto; background: var(--bg); color-scheme: dark; }
/* primer pintado = composicion de p=0: degradado del fondo mientras llega three (~600 KB) */
html.flight { background: radial-gradient(60% 50% at 62% 55%, var(--bg2), var(--bg) 70%) fixed, var(--bg); }
body {
  margin: 0;
  background: transparent;
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
html.static body { background: var(--bg); }
a { color: inherit; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 60; }
.skip:focus, .skip:focus-visible { left: 12px; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; }

/* Canvas fijo detras de todo (solo visible en modo vuelo); se funde al renderizar el primer frame */
#mundo-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 0;
}
html.flight #mundo-canvas { display: block; opacity: 0; transition: opacity 0.7s ease; }
html.flight.ready #mundo-canvas { opacity: 1; }

/* Cabecera: degradado + desenfoque con salida suave, para que el texto del catalogo no choque con la barra */
.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: grid;
  align-items: center;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) clamp(14px, 4vw, 40px) 10px;
}
.top::before {
  content: "";
  position: absolute;
  inset: 0 0 -16px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11, 16, 32, 0.94), rgba(11, 16, 32, 0.7) 60%, rgba(11, 16, 32, 0));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: 0.02em; }
.top nav { display: flex; align-items: center; justify-content: center; min-width: 0; gap: 18px; font-size: 0.95rem; }
.top nav a { text-decoration: none; color: var(--mut); }
.top nav a:hover { color: var(--fg); }
.top nav { gap: 12px; }
.top .ico {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
  font: inherit; font-size: 0.85rem; color: var(--fg); text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(18, 26, 51, 0.7);
}
.top .ico:hover { background: rgba(32, 44, 84, 0.9); color: #fff; }
.top .ico svg { flex: none; }
.splash {
  --sz: 41.5vh; /* tamaño del cubo 3D del hero (medido en navegador): 41.5 vh escritorio, 25.5 vh movil */
  position: fixed; inset: 0; z-index: 100; overflow: hidden;
  transition: opacity .5s ease, visibility .5s ease;
}
/* el mismo espacio que el mundo 3D (#0b1020 + estrellas); se desvanece cuando el cubo 3D toma el relevo */
.splash::before, .splash::after { content: ""; position: absolute; inset: 0; transition: opacity .45s ease; }
.splash::before {
  background:
    radial-gradient(1.2px 1.2px at 22px 34px, rgba(255, 255, 255, .75), transparent 100%) 0 0 / 137px 129px,
    radial-gradient(1px 1px at 80px 70px, rgba(201, 216, 255, .6), transparent 100%) 0 0 / 173px 151px,
    radial-gradient(1.6px 1.6px at 40px 110px, rgba(255, 255, 255, .55), transparent 100%) 0 0 / 241px 223px,
    radial-gradient(1px 1px at 120px 18px, rgba(255, 220, 210, .45), transparent 100%) 0 0 / 199px 187px,
    radial-gradient(60% 55% at 50% 46%, #141d3a 0%, #0b1020 72%), #0b1020;
}
.splash::after { /* segunda capa de estrellas que titila */
  background:
    radial-gradient(1.4px 1.4px at 60px 40px, rgba(255, 255, 255, .8), transparent 100%) 0 0 / 263px 241px,
    radial-gradient(1.1px 1.1px at 150px 120px, rgba(190, 210, 255, .7), transparent 100%) 0 0 / 311px 277px;
  animation: splash-twinkle 3.2s ease-in-out infinite alternate;
}
@keyframes splash-twinkle { from { opacity: .25; } to { opacity: 1; } }
.splash-logo, .splash-ring, .splash-glow { position: absolute; z-index: 1; left: var(--sx, 50%); top: var(--sy, 42%); transform: translate(-50%, -50%); }
/* splash: pilares 3D reales (prismas CSS de 6 caras en un solo contexto 3D con la perspectiva de la camara del hero;
   keyframes densos, colores y nieve generados en build_mundo.py, SPLASH). 100cqw = 256 unidades del logo; --ss es el
   mismo tamaño del cubo 3D del hero (41.5 vh escritorio, 25.5 vh movil). Acostados en fila bajo el cubo mientras nieva
   (rojo, verde, blanco); pixeles blancos los levantan hacia la camara y cada uno entra a su lugar por una direccion
   libre: el orden por profundidad es real y las trayectorias se verifican sin choques al generar.
   Solo transform/opacity: corre en el compositor y no se traba mientras el hilo principal carga el mundo 3D. */
.splash-logo {
  width: var(--ss, var(--sz)); aspect-ratio: 1; container-type: size; overflow: visible;
  transition: left .38s ease, top .38s ease, width .38s ease, opacity .35s ease;
  animation: splash-in .6s ease-out backwards;
}
.splash-logo .motes { position: absolute; left: 50%; top: 50%; }
.splash-logo .lay { position: absolute; inset: 0; }
.splash-logo .org { position: absolute; width: 0; height: 0; transform-style: preserve-3d; }
.splash-logo .bar, .splash-logo .bar i { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.splash-logo .bar { animation-fill-mode: both; animation-timing-function: linear; will-change: transform; }
.splash-logo .bar i { display: block; backface-visibility: hidden; outline: 1px solid transparent; }
.splash-logo .pm { position: absolute; left: 0; top: 0; border-radius: 1px; background: #fff; opacity: 0; animation-fill-mode: both; will-change: transform, opacity; }
/* nieve de pixeles por toda la pantalla */
.splash .snow { position: absolute; inset: 0; z-index: 0; overflow: hidden; transition: opacity .45s ease; }
.splash .snow i { position: absolute; top: -12px; border-radius: 1px; animation: splash-snow linear infinite; will-change: transform; }
@keyframes splash-snow { from { transform: translateY(0); } to { transform: translateY(calc(100vh + 24px)); } }
@keyframes splash-in { from { opacity: 0; } }
/* brillo detras del logo al armarse (opacidad, no filtro: tambien corre en el compositor) */
.splash-glow {
  width: calc(var(--ss, var(--sz)) * 1.3); aspect-ratio: 1; border-radius: 50%; opacity: 0; z-index: 0;
  background: radial-gradient(closest-side, rgba(150, 180, 255, .32), rgba(150, 180, 255, .1) 55%, transparent);
  transition: left .38s ease, top .38s ease, width .38s ease, opacity .3s ease;
  animation: splash-glow 3.6s ease-in-out infinite; will-change: opacity;
}
@keyframes splash-glow { 0%, 50%, 88%, 100% { opacity: .15; } 64% { opacity: 1; } }
.splash-ring {
  width: calc(var(--ss, var(--sz)) * 1.45); aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid rgba(201, 216, 255, .5); opacity: 0;
  transition: left .38s ease, top .38s ease, width .38s ease;
  animation: splash-ring 3.6s ease-out infinite;
}
@keyframes splash-ring {
  0%, 55% { opacity: 0; transform: translate(-50%, -50%) scale(.7); }
  63% { opacity: .55; }
  84%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); }
}
/* nombre bajo el logo: entra despues del logo y se va en cuanto el logo se acomoda sobre el cubo 3D */
.splash-name {
  position: absolute; z-index: 1; left: var(--sx0, 50%); top: calc(var(--sy0, 42%) + var(--sz) * 0.86 + 10px);
  transform: translateX(-50%); margin: 0; white-space: nowrap;
  font-size: clamp(1.5rem, 4.2vh, 2.3rem); font-weight: 750; letter-spacing: 0.05em; color: #f2f5ff;
  text-shadow: 0 0 18px rgba(140, 170, 255, 0.45);
  animation: splash-name-in .7s .35s ease-out both; transition: opacity .3s ease, transform .3s ease;
}
.splash-name sup { font-size: 0.42em; font-weight: 600; margin-left: 0.12em; vertical-align: super; opacity: 0.85; }
@keyframes splash-name-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.splash.fit .splash-name { opacity: 0; transform: translate(-50%, -6px); }
/* relevo al 3D: se va el fondo y enseguida (.pop) los rectangulos se funden mientras el cubo sale de la pantalla */
.splash.reveal::before, .splash.reveal::after { opacity: 0; }
.splash.reveal .splash-ring, .splash.reveal .splash-glow, .splash.reveal .snow { animation: none; opacity: 0; transition: opacity .3s ease; }
.splash.pop .splash-logo { opacity: 0; }
html.intro.ready #mundo-canvas { transition: none; }
.splash.done { opacity: 0; visibility: hidden; pointer-events: none; }
html.static .splash { display: none; }
@media (max-width: 1000px) { .splash { --sz: 25.5vh; } }
html.intro { overflow: hidden; }
/* las tarjetas entran cuando el cubo ya salió de la pantalla */
html.flight .scene .panel { transition: opacity .6s ease; }
html.intro .scene .panel { opacity: 0; } /* solo opacidad: no altera la medida de las tarjetas */
.top .ico[hidden], .top [data-wa][hidden] { display: none; }
.top .ico:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.hint-pop {
  position: absolute; right: clamp(14px, 4vw, 40px); top: calc(100% + 6px); max-width: min(300px, calc(100vw - 28px));
  padding: 10px 14px; border-radius: 12px; font-size: 0.85rem; line-height: 1.4; color: var(--fg);
  background: rgba(14, 21, 42, 0.96); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.hint-pop[hidden] { display: none; }

main { position: relative; z-index: 1; }

/* Textos comunes */
.eyebrow { font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: color-mix(in srgb, var(--c, var(--fg)) 62%, #fff); font-weight: 700; margin-bottom: 8px; }
.line { color: var(--mut); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 46ch; }
.line.sub { font-size: clamp(1.15rem, 2.4vw, 1.55rem); font-weight: 650; color: var(--fg); letter-spacing: 0.005em; }
.w-sw { color: var(--sw); }
.w-ia { color: color-mix(in srgb, var(--ia) 80%, #fff); }
.w-xr { color: color-mix(in srgb, var(--xr) 78%, #fff); }
.w-bc { color: color-mix(in srgb, var(--bc) 74%, #fff); }
.scene h1, .scene h2, .catalog-head h2, .cta h2 {
  font-size: clamp(1.9rem, 5.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.scene h1, .scene h2 { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); }
/* align-items:center: chips keep their own height (pill shape) even when a taller item (the social icons) shares the row */
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.tags li {
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--c, var(--line));
  color: var(--fg);
  background: rgba(11, 16, 32, 0.55);
  white-space: nowrap; /* the chip wraps as a whole, never its text inside the chip */
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tags li.tags-social { overflow: visible; }
/* Solo las doce tarjetas de servicios: etiquetas cortas y cuatro chips en una fila. */
.tags.service-tags { gap: 6px; }
.tags.service-tags li { font-size: 0.74rem; padding: 4px 8px; }
@media (max-width: 360px) {
  html.flight .scene .tags.service-tags li { padding-inline: 4px; }
}
.service-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
/* every .btn is a row: the icon (svg) sits vertically centred next to the label; same 1px border on filled and outline
   buttons so Email and WhatsApp have identical height and spacing */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.btn svg { flex: none; display: block; }
.btn:hover { background: #fff; }
.btn.alt { background: transparent; color: var(--fg); }
.btn.alt:hover { background: rgba(232, 236, 248, 0.14); }
.btn[hidden] { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* Cierre: fila compacta (correo, WhatsApp y cotizar, redes al final a la derecha) */
.actions.row { gap: 8px; margin-top: 14px; }
.actions.row .social { margin: 0 0 0 auto; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--fg); color: var(--fg); background: rgba(18, 26, 51, 0.6); text-decoration: none; }
.ibtn:hover { background: rgba(232, 236, 248, 0.16); color: #fff; }
.ibtn[hidden] { display: none; }
.btn.sm { margin-top: 0; padding: 7px 16px; font-size: 0.85rem; }
.scene[data-scene="contacto"] h2 { margin-bottom: 8px; }
.scene[data-scene="contacto"] .tags { margin-top: 10px; }
.cta .actions { justify-content: center; }
.note {
  margin-top: 12px; max-width: 46ch;
  color: var(--fg); font-size: 0.92rem; line-height: 1.45;
}
.social { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--mut); background: rgba(18, 26, 51, 0.6); }
.social a:hover { color: #fff; border-color: var(--fg); }
.social.compact { gap: 4px; margin-top: 0; }
.tags li.tags-social { margin-left: auto; padding: 0 !important; border: 0 !important; border-radius: 0; background: none !important; font-size: inherit; }
.social.compact a { width: 30px; height: 30px; }
.social.compact a svg { width: 16px; height: 16px; }
.foot .social { justify-content: center; }
.legacy { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 14px; font-size: 0.88rem; }
.legacy a { color: var(--mut); text-decoration: none; }
.legacy a:hover { color: var(--fg); text-decoration: underline; }
.scene[data-scene="llegada"] .tags li, .scene[data-scene="cubo"] .tags li, .scene[data-scene="nombre"] .tags li { font-size: 0.8rem; padding: 4px 11px; }
.scene[data-scene="llegada"] .note { font-size: 0.9rem; }
button:focus-visible, .btn:focus-visible, a:focus-visible, [tabindex="-1"]:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* ===== Layout estatico (sin JS, sin WebGL o movimiento reducido) ===== */
.scenes { position: relative; }
.scene {
  position: relative;
  min-height: 78vh;
  min-height: 78svh;
  display: flex;
  align-items: center;
  padding: 110px clamp(18px, 6vw, 80px) 56px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 70% at 85% 50%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%),
    var(--bg);
}
.scene:first-child { min-height: 100vh; min-height: 100svh; }
.scene .panel { max-width: 560px; }
.scene .vis { display: none; }

/* ===== Layout estatico (html.static): sin WebGL, three no carga, error de render o ?static=1 =====
   Historia vertical: una seccion por escena con su color (--c), alternando texto e imagen. */
html.static { scroll-padding-top: 76px; }
html.static body { background: var(--bg); overflow-x: clip; }
html.static .top::before {
  inset: 0; background: rgba(11, 16, 32, 0.96); border-bottom: 1px solid var(--line);
  -webkit-mask-image: none; mask-image: none;
}
html.static .scene {
  --pad: max(clamp(18px, 5vw, 56px), calc((100% - 1120px) / 2));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: 0;
  padding: clamp(56px, 9vw, 104px) var(--pad);
  overflow-x: clip;
  background:
    radial-gradient(ellipse 50% 85% at var(--gx, 80%) 50%, color-mix(in srgb, var(--c) 17%, transparent), transparent 72%),
    var(--bg);
}
html.static .scene:nth-child(even) { --gx: 20%; }
html.static .scene::before {
  content: ""; position: absolute; top: -1px; left: var(--pad); width: 72px; height: 3px;
  background: var(--c); box-shadow: 0 0 14px var(--c);
}
html.static .scene:first-child { min-height: 100vh; min-height: 100svh; padding-top: 118px; }
html.static .scene:first-child::before { display: none; }
html.static .scene .panel { grid-column: 1; grid-row: 1; max-width: 560px; padding: 0; }
html.static .scene .vis { grid-column: 2; grid-row: 1; }
html.static .scene:nth-child(even) .panel { grid-column: 2; }
html.static .scene:nth-child(even) .vis { grid-column: 1; }
html.static .scene h1, html.static .scene h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); text-shadow: none; }
html.static .scene .note {
  max-width: 52ch; margin-top: 16px; padding: 12px 16px; border-radius: 12px; font-size: 1rem;
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
html.static .scene[data-scene="llegada"] .note { font-size: 0.95rem; }
html.static .scene[data-scene="llegada"] .tags li, html.static .scene[data-scene="cubo"] .tags li { font-size: 0.82rem; padding: 5px 12px; }
html.static .scene .tags li { background: color-mix(in srgb, var(--c, #aab3cc) 10%, rgba(11, 16, 32, 0.7)); }

/* Visual de cada escena: tarjeta oscura con brillo del color; las imagenes (RGBA aditivas) se funden con screen */
html.static .scene .vis {
  display: grid; place-items: center; position: relative; isolation: isolate; overflow: hidden;
  width: 100%; aspect-ratio: 3 / 2; border-radius: 22px; color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 38%, var(--line));
  background: radial-gradient(circle at 50% 56%, color-mix(in srgb, var(--c) 30%, #0b1020), #0b1020 74%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), inset 0 0 60px color-mix(in srgb, var(--c) 10%, transparent);
}
html.static .scene .vis .still { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: screen; pointer-events: none; }
html.static .scene .vis .glyph { width: 40%; max-width: 190px; height: auto; filter: drop-shadow(0 0 16px color-mix(in srgb, var(--c) 70%, transparent)); }
html.static .scene .vis .logo-big { position: relative; width: 44%; height: auto; filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.55)); }
html.static .scene .vis .px { position: absolute; width: 11px; height: 11px; border-radius: 2px; background: #2a86ff; box-shadow: 0 0 10px currentColor; color: #2a86ff; }
html.static .scene .vis .p1 { left: 14%; top: 22%; }
html.static .scene .vis .p2 { left: 24%; top: 70%; width: 8px; height: 8px; background: #22b14c; color: #22b14c; }
html.static .scene .vis .p3 { left: 80%; top: 24%; width: 14px; height: 14px; background: #f0392f; color: #f0392f; }
html.static .scene .vis .p4 { left: 72%; top: 74%; background: #22b14c; color: #22b14c; }
html.static .scene .vis .p5 { left: 8%; top: 48%; width: 7px; height: 7px; background: #f0392f; color: #f0392f; }
html.static .scene .vis .p6 { left: 90%; top: 52%; width: 8px; height: 8px; }
/* Hero: el logo grande, sin tarjeta, con halo de los tres colores */
html.static .scene[data-scene="llegada"] .vis {
  overflow: visible; aspect-ratio: 1; max-width: 460px; justify-self: center; border: 0; background: none; box-shadow: none;
}
html.static .scene[data-scene="llegada"] .vis::before {
  content: ""; position: absolute; inset: 4%; z-index: -1; border-radius: 50%; opacity: 0.55; filter: blur(48px);
  background: conic-gradient(from 200deg, rgba(42, 134, 255, 0.55), rgba(34, 177, 76, 0.5), rgba(240, 57, 47, 0.55), rgba(42, 134, 255, 0.55));
}
html.static .scene[data-scene="llegada"] .vis .logo-big { width: 80%; filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.5)); }
@media (prefers-reduced-motion: no-preference) {
  html.static .scene .vis .logo-big { animation: logo-float 7s ease-in-out infinite; }
  html.static .scene .vis .glyph { animation: logo-float 8s ease-in-out infinite; }
  html.static .scene[data-scene="llegada"] .vis::before { animation: logo-glow 6s ease-in-out infinite; }
  html.static .scene .vis .px { animation: px-blink 3.2s ease-in-out infinite; }
  html.static .scene .vis .p2 { animation-delay: -0.8s; } html.static .scene .vis .p3 { animation-delay: -1.6s; }
  html.static .scene .vis .p4 { animation-delay: -2.2s; } html.static .scene .vis .p5 { animation-delay: -0.4s; }
}
@keyframes logo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes logo-glow { 0%, 100% { opacity: 0.4; transform: scale(0.96); } 50% { opacity: 0.8; transform: scale(1.06); } }
@keyframes px-blink { 0%, 100% { opacity: 0.35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-6px); } }

/* ===== Modo vuelo (WebGL activo): escenas fijas con fundido ===== */
html.flight .flight { height: var(--flight-h, 2330vh); position: relative; }
html.flight .scenes { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
html.flight.past .scenes, html.flight.past .scroll-hint, html.flight.past .spin-hint { visibility: hidden; }
html.flight .scene {
  position: absolute;
  inset: 0;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(18px, 6vw, 80px) calc(clamp(28px, 9vh, 90px) + env(safe-area-inset-bottom));
  border: 0;
  background: none;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
/* antes de que arranque JS ya se pinta la escena de llegada (sin salto de layout) */
html.flight .scene:first-child { opacity: 1; min-height: 0; }
html.flight .scene .panel {
  pointer-events: none;
  padding: 22px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(14, 21, 42, 0.94), rgba(18, 26, 51, 0.86));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid color-mix(in srgb, var(--c) 28%, var(--line));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28), inset 0 1px 0 color-mix(in srgb, var(--c) 16%, transparent);
}
html.flight .scene.on .panel { pointer-events: auto; }

/* Cierre: el boton Reiniciar respira para invitar a volver a empezar (animacion continua) */
@keyframes restart-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(120, 190, 255, 0); }
  50% { box-shadow: 0 0 14px 3px rgba(120, 190, 255, 0.55); }
}
@keyframes restart-nudge { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-35deg); } }
html.at-end #restart { animation: restart-glow 2.2s ease-in-out infinite; border-color: rgba(120, 190, 255, 0.7); }
html.at-end #restart svg { animation: restart-nudge 2.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { html.at-end #restart, html.at-end #restart svg { animation: none; } }

/* Riel de puntos (derecha): una por escena; solo en modo vuelo */
.route { display: none; }
html.flight .route, html.static .route {
  position: fixed; right: clamp(6px, 1.4vw, 18px); top: 50%; transform: translateY(-50%); z-index: 15;
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.route .rbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; margin: 0 0 6px;
  border: 1px solid var(--line); border-radius: 50%; color: var(--fg); background: rgba(18, 26, 51, 0.7); cursor: pointer; text-decoration: none;
}
.route .rbtn:last-child { margin: 6px 0 0; }
.route .rbtn:hover { background: rgba(32, 44, 84, 0.9); color: #fff; }
.route .rbtn[data-active] { background: rgba(32, 44, 84, 0.95); color: #fff; border-color: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 1px rgba(11, 16, 32, 0.5), 0 0 10px 3px rgba(255, 255, 255, 0.55); }
#play .pause-icon, #play[aria-pressed="true"] .play-icon { display: none; }
#play[aria-pressed="true"] .pause-icon { display: block; }
#play[aria-pressed="true"] { color: #9cc7ff; border-color: #2a86ff; box-shadow: 0 0 14px rgba(42, 134, 255, 0.3); }
html.static #play { display: none; }
html.flight:not(.ready) #play { visibility: hidden; }
.route .rbtn:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.route .rbtn:hover .tip, .route .rbtn:focus-visible .tip { opacity: 1; transform: translate(0, -50%); }
.route .dot {
  position: relative; display: flex; align-items: center; justify-content: center; width: 26px; height: 22px; padding: 0;
  border: 0; background: none; cursor: pointer; color: var(--fg);
}
.route .dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--c) 72%, transparent);
  box-shadow: 0 0 0 1px rgba(11, 16, 32, 0.5); transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.route .dot:hover::before, .route .dot:focus-visible::before { background: var(--c); transform: scale(1.35); }
.route .dot[aria-current="step"]::before { background: var(--c); transform: scale(1.7); box-shadow: 0 0 0 1px rgba(11, 16, 32, 0.5), 0 0 10px 3px var(--c); }
.route .dot:focus-visible { outline: 2px solid var(--fg); outline-offset: -2px; border-radius: 8px; }
/* escenas grises (llegada, nombre, logo, siguiente paso, contacto, servicios): casi negro con aro claro, visibles sobre el fondo oscuro */
.route .dot[data-gray]::before {
  box-sizing: border-box; width: 9px; height: 9px; background: #0b1020; border: 1.5px solid rgba(255, 255, 255, 0.55); box-shadow: none;
}
.route .dot[data-gray]:hover::before, .route .dot[data-gray]:focus-visible::before { background: #0b1020; border-color: rgba(255, 255, 255, 0.9); }
.route .dot[data-gray][aria-current="step"]::before { background: #0b1020; border-color: #fff; box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.75); }
.route .dot[data-gray] .tip { background: #0b1020; border-color: rgba(255, 255, 255, 0.55); }
.route .tip {
  position: absolute; right: 100%; top: 50%; transform: translate(6px, -50%); margin-right: 4px; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; color: var(--fg); background: rgba(14, 21, 42, 0.95);
  border: 1px solid color-mix(in srgb, var(--c, var(--line)) 70%, transparent); opacity: 0; pointer-events: none; transition: opacity 0.15s, transform 0.15s;
}
.route .dot:hover .tip, .route .dot:focus-visible .tip { opacity: 1; transform: translate(0, -50%); }

/* ===== Catalogo ===== */
.catalog {
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, var(--bg), var(--bg2) 40%, var(--bg));
  border-top: 1px solid var(--line);
}
.catalog-in { max-width: 1120px; margin: 0 auto; padding: clamp(84px, 11vw, 130px) clamp(18px, 5vw, 40px) 12px; }
.catalog-head { margin-bottom: 48px; }
.catalog-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.catalog-nav a { padding: 7px 12px; border: 1px solid var(--c, var(--line)); border-radius: 999px; color: var(--fg); font-size: 0.88rem; }
.catalog-nav a:hover, .catalog-nav a:focus-visible { background: var(--bg2); }
.pillar { position: relative; margin-bottom: 52px; padding-left: clamp(14px, 2vw, 22px); }
.pillar > h3, .alliances > h3, .products > h3 {
  display: flex; align-items: center; gap: 12px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 10px;
  color: var(--fg);
}
/* barra luminosa que enlaza las tarjetas del mismo grupo */
.pillar::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 25%, transparent), var(--c) 50%, color-mix(in srgb, var(--c) 25%, transparent));
  background-size: 100% 220%; box-shadow: 0 0 12px color-mix(in srgb, var(--c) 55%, transparent);
}
.pillar > h3 { text-shadow: 0 0 24px color-mix(in srgb, var(--c) 55%, transparent); }
.gicon { display: inline-flex; flex: none; width: 30px; height: 30px; color: var(--c); filter: drop-shadow(0 0 8px var(--c)); }
.gicon svg { width: 100%; height: 100%; overflow: visible; }
.items li, .card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.items li:hover, .items li:focus-within, .card:hover, .card:focus-within { transform: translateY(-3px); box-shadow: 0 10px 26px color-mix(in srgb, var(--c) 28%, transparent); border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
/* entrada escalonada al hacer scroll (una vez por tarjeta); solo con html.rv-on, sin JS u observer todo se ve */
html.rv-on .rv:not(.in) { opacity: 0; }
html.rv-on .rv.in { animation: rv-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rv-in { from { opacity: 0; transform: translateY(28px) scale(0.96) rotateX(6deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .pillar::before { animation: line-flow 5s linear infinite; }
  @keyframes line-flow { from { background-position: 0 0; } to { background-position: 0 220%; } }
  .gi-bar { stroke-dasharray: 9; animation: gi-load 2.4s ease-in-out infinite; }
  @keyframes gi-load { 0% { stroke-dashoffset: 9; } 70%, 100% { stroke-dashoffset: 0; } }
  .gi-cur { animation: gi-blink 1s steps(2, end) infinite; }
  @keyframes gi-blink { 50% { opacity: 0; } }
  .gicon.green { perspective: 90px; }
  .gicon.green svg { animation: gi-rot 6s linear infinite; }
  .gi-play { transform-box: fill-box; transform-origin: center; animation: gi-pulse 2.4s ease-in-out infinite; }
  @keyframes gi-rot { to { transform: rotateY(360deg); } }
  .gi-b { transform-box: fill-box; transform-origin: center; }
  .gi-b { animation: gi-pulse 2.4s ease-in-out infinite; }
  .gi-b2 { animation-delay: 0.4s; } .gi-b3 { animation-delay: 0.8s; }
  @keyframes gi-pulse { 0%, 100% { opacity: 0.45; transform: scale(0.92); } 40% { opacity: 1; transform: scale(1.08); } }
}
.pillar > .line { margin-bottom: 18px; max-width: 62ch; }
.items { display: grid; gap: 10px 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); align-items: start; }
.items li {
  padding: 12px 14px 12px 16px;
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--c);
  color: var(--fg);
  font-size: 0.95rem;
}
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  padding: 20px;
  border-radius: 16px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-top: 2px solid var(--c, var(--line));
}
.card h4 { font-size: 1.05rem; margin-bottom: 10px; }
.alliances { margin: 76px 0 56px; scroll-margin-top: 76px; }
.alliances > .line { margin-bottom: 18px; max-width: 62ch; }
.ally { --c: #aab3cc; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.ally-logo { height: 88px; display: flex; align-items: center; margin-bottom: 14px; }
.ally-logo img { height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 14px; }
.ally h4 { font-size: 1.3rem; margin-bottom: 4px; }
.ally .ally-role { color: var(--fg); font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.ally p { color: var(--mut); font-size: 0.93rem; }
.ally .ally-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 16px; }
.ally .ally-links .btn { gap: 6px; }
.branch { margin-top: 28px; scroll-margin-top: 76px; }
.branch-title { font-size: 1.15rem; margin-bottom: 8px; color: var(--c); }
.branch > .line { max-width: 68ch; margin-bottom: 14px; }
.service-detail summary { cursor: pointer; font-weight: 600; }
.service-detail summary::marker { color: var(--c); }
.service-detail p { margin-top: 10px; font-size: .87rem; color: var(--mut); }
.service-detail strong { color: var(--fg); font-size: .82rem; }
.items [data-service] { scroll-margin-top: 76px; overflow-wrap: anywhere; }
.service-detail summary:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }

.cta { text-align: center; padding: 56px 0 20px; border-top: 1px solid var(--line); }
.cta p { color: var(--mut); max-width: 48ch; margin: 0 auto; }
.cta a:not(.btn) { color: var(--fg); }

/* Compositor de solicitud local: no publica datos; arma el texto para WhatsApp, correo o portapapeles. */
.cform {
  max-width: 600px; margin: 28px auto 0; padding: 24px 24px 20px; text-align: left;
  background: var(--bg2); border: 1px solid var(--line); border-top: 2px solid var(--sw); border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}
.cform[hidden] { display: none; }
.cform h3 { margin: 0 0 18px; font-size: 1.08rem; letter-spacing: .04em; text-transform: uppercase; }
.cform .fld { display: block; margin-bottom: 14px; }
.cform .fld > span { display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 700; color: var(--fg); }
.cform input[type="text"], .cform textarea {
  display: block; width: 100%; padding: 11px 13px; font: inherit; font-size: 16px; line-height: 1.4; color: var(--fg);
  background: rgba(20, 35, 66, 0.72); border: 1px solid color-mix(in srgb, var(--ia) 55%, var(--line)); border-radius: 5px;
}
.cform textarea { min-height: 104px; resize: vertical; }
.cform input::placeholder, .cform textarea::placeholder { color: color-mix(in srgb, var(--mut) 70%, transparent); }
.cform input:hover, .cform textarea:hover { border-color: color-mix(in srgb, var(--fg) 40%, var(--line)); }
.cform input:focus-visible, .cform textarea:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-color: var(--fg); }
.cform [aria-invalid="true"] { border-color: color-mix(in srgb, var(--xr) 80%, #fff); }
.form-meta { display: flex; justify-content: space-between; margin: -8px 0 18px; color: var(--mut); font-size: .76rem; }
.form-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.cform .btn { width: 100%; justify-content: center; min-height: 44px; margin: 0; font: inherit; font-weight: 700; line-height: 1.2; cursor: pointer; }
.cform .btn.disabled { opacity: .5; cursor: not-allowed; }
.cform-status { min-height: 1.5em; margin: 12px 0 0 !important; max-width: none !important; font-size: 0.92rem; line-height: 1.45; }
.cform-status.ok { color: color-mix(in srgb, var(--bc) 62%, #fff); font-weight: 600; }
.cform-status.err { color: color-mix(in srgb, var(--xr) 62%, #fff); }
.cform-status a { color: var(--fg); font-weight: 600; text-underline-offset: 3px; }
.cform-privacy { margin: 8px 0 0 !important; max-width: none !important; font-size: 0.78rem; line-height: 1.4; color: var(--mut); }
.install-band { max-width: 720px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin: 18px auto 0; padding: 16px 20px; text-align: left; border: 1px solid color-mix(in srgb, var(--ia) 42%, var(--line)); border-radius: 10px; background: rgba(17, 31, 59, .58); color: var(--mut); }
.install-band > svg { color: var(--ia); }
.install-band p { margin: 0; max-width: none; font-size: .88rem; line-height: 1.45; }
.install-band .btn { white-space: nowrap; margin: 0; align-self: center; }
.install-band > svg { align-self: center; }
@media (max-width: 640px) { .cform { padding: 18px 16px 14px; border-radius: 14px; } .form-actions { gap: 8px; } .form-actions .btn { padding-left: 10px; padding-right: 10px; } .install-band { grid-template-columns: auto 1fr; gap: 12px; padding: 14px; } .install-band .btn { grid-column: 1 / -1; } }

@media (max-width: 1000px) { .foot { padding-bottom: calc(56px + env(safe-area-inset-bottom)); } }

.foot { position: relative; z-index: 10; background: var(--bg); text-align: center; padding: 24px 16px 40px; color: var(--mut); font-size: 0.85rem; border-top: 1px solid var(--line); }

@media (max-width: 1000px) {
  html.static .scene { grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
  html.static .scene .vis, html.static .scene:nth-child(even) .vis { grid-column: 1; grid-row: 1; max-width: 560px; justify-self: center; }
  html.static .scene .panel, html.static .scene:nth-child(even) .panel { grid-column: 1; grid-row: 2; max-width: 620px; justify-self: center; width: 100%; }
  html.static .scene[data-scene="llegada"] .vis { max-width: 300px; }
  html.static .scene:first-child { min-height: 0; padding-top: 96px; }
}

@media (max-width: 900px) {
  .top .ico { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .top .ico .lbl { display: none; }
}

@media (max-width: 640px) {
  html.flight .route, html.static .route { right: 0; }
  html.static .route { opacity: 0.7; }
  .route .dot { width: 26px; height: 20px; }
  .route .dot::before { width: 6px; height: 6px; }
  .route .dot[data-gray]::before { width: 8px; height: 8px; }
  .route .tip { display: none; }
  .route .rbtn { width: 26px; height: 26px; margin-bottom: 4px; }
  .route .rbtn:last-child { margin: 4px 0 0; }
  .route .rbtn svg { width: 13px; height: 13px; }
  .top nav { gap: 6px; }
  .top .ico { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .top .ico .lbl { display: none; }
  .brand { gap: 8px; }
  .brand span { font-size: 0.95rem; }
  .scene { align-items: flex-start; }
  html.flight .scene { align-items: flex-end; }
  html.flight .scene .panel { padding: 16px 18px; }
  html.flight .scene h1, html.flight .scene h2 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
  html.flight .tags { margin-top: 12px; }
  html.flight .scene[data-scene="llegada"] .tags, html.flight .scene[data-scene="cubo"] .tags { gap: 6px; }
  html.flight .scene[data-scene="llegada"] .tags li, html.flight .scene[data-scene="cubo"] .tags li, html.flight .scene[data-scene="nombre"] .tags li { font-size: 0.74rem; padding: 3px 9px; }
  html.flight .note { font-size: 0.85rem; margin-top: 8px; }
  html.flight .scene .panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(14, 21, 42, 0.88); }
}

@media (max-width: 420px) {
  .brand span { display: none; }
  .top { padding-left: 8px; padding-right: 8px; }
  .top nav { gap: 4px; }
  .top .ico { width: 32px; height: 32px; flex: none; }
}
@media (max-width: 360px) {
  .top nav { gap: 3px; }
  .top .ico { width: 30px; height: 30px; }
  .top .brand img { width: 28px; height: 28px; }
  .top { grid-template-columns: 30px minmax(0, 1fr) 30px; gap: 6px; }
}

@media (max-width: 640px) {
  html.static .top nav { gap: 3px; }
  html.static .top .ico { width: 32px; height: 32px; padding: 0; justify-content: center; }
  html.static .top .ico .lbl { display: none; }
  html.static { scroll-padding-top: 70px; }
  html.static .scene { padding: 44px 18px 52px; }
  html.static .scene:first-child { padding-top: 84px; }
  html.static .scene h1, html.static .scene h2 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  html.static .scene .vis { border-radius: 16px; }
  html.static .scene .vis .glyph { width: 34%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.flight #mundo-canvas { transition: none; }
}

/* Logo and selected flag balance the two ends of the header. */
.lang { position: relative; justify-self: end; }
.lang [hidden] { display: none; }
.lang-toggle {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  padding: 0; cursor: pointer; border: 0; border-radius: 8px; background: transparent;
}
.lang-name { display: none; }
.flag { display: block; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.lang-toggle:hover, .lang-toggle[aria-expanded="true"] { background: rgba(255,255,255,.08); }
.lang button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; width: 204px; padding: 6px;
  border: 1px solid rgba(170,183,220,.24); border-radius: 14px; background: rgba(16,23,43,.98);
  box-shadow: 0 14px 42px rgba(0,0,0,.45); color: var(--fg);
}
.lang-menu button {
  display: flex; align-items: center; gap: 13px; width: 100%; padding: 11px 12px; border: 0;
  border-radius: 8px; text-align: left; font: inherit; font-size: .9rem; color: inherit;
  background: transparent; cursor: pointer;
}
.lang-menu button:hover, .lang-menu button:focus-visible { background: rgba(105,135,220,.14); }
@media (max-width: 360px) { .lang-toggle { width: 30px; height: 30px; } }

@media (min-width: 1001px) {
  .top { grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr); }
  .brand { justify-self: start; }
  .brand span { display: inline; }
  .top nav { justify-self: center; gap: 12px; }
  .lang { justify-self: end; }
  .lang-toggle { width: auto; min-width: 36px; gap: 9px; padding: 0 8px; }
  .lang-name { display: inline; font: inherit; font-size: .84rem; color: var(--mut); white-space: nowrap; }
}

.more { margin-top: 20px; }
.more .btn { margin-top: 0; }
@media (max-height: 420px) { html.static .route { display: none; } }
@media (max-height: 640px) {
  .route .dot { height: 17px; }
  .route .rbtn { width: 22px; height: 22px; margin-bottom: 4px; }
  .route .rbtn:last-child { margin: 4px 0 0; }
}
/* Mantener los cuatro controles y todas las escenas debajo de la cabecera en pantallas bajas. */
@media (max-height: 600px) {
  html.flight .route, html.static .route { top: calc(50% + 28px); gap: 1px; }
  .route .dot { height: clamp(8px, calc((100svh - 228px) / 18), 18px); }
  .route .rbtn, .route .rbtn:last-child { margin: 0; }
}
.scroll-hint { display: none; }
html.flight .scroll-hint {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  position: fixed; left: clamp(18px, 6vw, 80px); bottom: max(22px, env(safe-area-inset-bottom)); /* el hero lleva la tarjeta abajo a la derecha */
  z-index: 6; pointer-events: none; font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
.scroll-hint i { width: 1px; height: 34px; background: linear-gradient(var(--fg), transparent); animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.scroll-hint span { white-space: nowrap; }
.scroll-hint .short { display: none; }
@media (max-width: 1000px) {
  /* una sola linea, centrada, con ancho propio (con left:50% el ancho disponible seria la mitad de la pantalla y partiria el texto) */
  html.flight .scroll-hint {
    right: auto; left: 50%; transform: translateX(-50%); bottom: auto; top: 78px;
    width: max-content; max-width: calc(100vw - 32px); text-align: center; font-size: 0.72rem; letter-spacing: 0.1em;
  }
}
@media (max-width: 360px) {
  html.flight .scroll-hint .long { display: none; }
  html.flight .scroll-hint .short { display: inline; }
}
@media (max-width: 380px) { .brand span { display: none; } }
/* «Gira el cubo»: arriba del cubo del hero (mundo.js fija left/top con la proyeccion del cubo); la flecha se balancea */
.spin-hint { display: none; }
html.flight .spin-hint {
  display: flex; align-items: center; gap: 10px; position: fixed; left: 50%; top: 30%; transform: translate(-50%, -100%);
  z-index: 6; pointer-events: none; opacity: 0; transition: opacity .5s ease; white-space: nowrap;
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
html.flight .spin-hint svg { flex: none; animation: spin-hint 1.8s ease-in-out infinite alternate; will-change: transform; }
@keyframes spin-hint { from { transform: translateX(-6px) rotate(-6deg); } to { transform: translateX(6px) rotate(6deg); } }
@media (max-width: 1000px) { html.flight .spin-hint { font-size: 0.7rem; letter-spacing: 0.1em; gap: 8px; } html.flight .spin-hint svg { width: 40px; } }
@media (prefers-reduced-motion: reduce) { .scroll-hint i, .spin-hint svg { animation: none; } }

.foot .privacy { margin: 0; max-width: none; font-size: 0.75rem; opacity: 0.8; }
.foot .privacy-link { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; text-decoration: none; }
.foot .privacy-link:hover { color: #fff; background: var(--bg2); }
.foot .legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.legal-cross { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.legal-cross a { color: var(--fg); }
.foot .privacy-link:focus-visible, .privacy-page a:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
/* footer compacto: redes + enlaces en una fila, copyright + privacidad en otra */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 22px; padding: 12px 16px 14px; }
.foot p { margin: 0; }
.foot .social { margin: 0; gap: 4px; }
.foot .social a { width: 30px; height: 30px; }
.foot .social a svg { width: 16px; height: 16px; }
.foot .legacy { margin: 0; gap: 4px 16px; font-size: 0.82rem; }

/* Privacy uses the same header while keeping ordinary document scrolling. */
.privacy-page { background: radial-gradient(ellipse at 70% 0%, var(--bg2), var(--bg) 42%) fixed; }
.privacy-page .top::before { bottom: 0; background: rgba(11, 16, 32, .94); -webkit-mask-image: none; mask-image: none; border-bottom: 1px solid var(--line); }
.privacy-page .top .ico { width: auto; padding: 0 14px; height: 40px; }
.privacy-page .top .ico .lbl { display: inline; }
.privacy-main { width: min(100% - 40px, 860px); margin: 0 auto; padding: max(112px, calc(88px + env(safe-area-inset-top))) 0 max(64px, env(safe-area-inset-bottom)); }
.privacy-notice[hidden] { display: none; }
.privacy-heading { padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.privacy-eyebrow { color: var(--mut); font-size: .9rem; letter-spacing: .12em; margin-bottom: 12px; }
.privacy-heading h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.035em; line-height: 1.12; overflow-wrap: anywhere; }
.privacy-updated { color: var(--mut); font-size: .88rem; margin-top: 16px; }
.privacy-intro { font-size: 1.12rem; margin-top: 24px; }
.privacy-section { margin-top: 32px; }
.privacy-section h2 { font-size: 1.2rem; line-height: 1.4; margin-bottom: 12px; }
.privacy-section p { color: #c4cce0; margin-top: 12px; line-height: 1.75; }
.privacy-notice a { color: #9bc7ff; text-underline-offset: 3px; overflow-wrap: anywhere; }
/* pillar scenes (tools/pillars_art.py): lost (404), dead (error), build (under construction) */
.status-art { position: relative; margin: 0 0 8px; padding-top: 12px; }
.status-art svg { position: relative; z-index: 1; display: block; width: min(100%, 560px); height: auto; margin: 0 auto; overflow: visible; }
/* splash snow behind the scene: red, green and blue pixels falling (tools/pillars_art.snow); white is the scene's */
.pa-snow { position: absolute; inset: 0 -4% 12%; z-index: 0; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 18%, #000 70%, transparent); }
.pa-snow i { position: absolute; top: -10px; border-radius: 1px; animation: pa-snow linear infinite; }
/* status pages (404, error, under construction, /account): black night so the red, green and blue snow shines */
.privacy-page.status-page { background: #000; }
.status-page .top::before { background: rgba(0, 0, 0, .94); }
@keyframes pa-snow { to { top: 100%; } }
.status-art figcaption { text-align: center; color: var(--mut); font-size: .95rem; margin-top: 4px; }
.product-notice .status-art { margin-top: 28px; }
.status-main { text-align: center; }
.status-main .privacy-intro { max-width: 46ch; margin-left: auto; margin-right: auto; }
.status-main h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.03em; line-height: 1.12; }
.status-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.privacy-notice .status-actions .btn { color: var(--bg); text-decoration: none; }
.privacy-notice .status-actions .btn.alt { color: var(--fg); }
.pa-pillar { transform-box: fill-box; transform-origin: 50% 100%; }
.pa-wander { animation: pa-wander 3.2s ease-in-out infinite; }
.pa-dig { animation: pa-dig 1.6s ease-in-out infinite; }
.pa-d2 { animation-delay: -.7s; }
.pa-d3 { animation-delay: -1.4s; }
.pa-look { animation: pa-look 2.6s steps(1) infinite; }
.pa-q { animation: pa-q 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.pa-halo { animation: pa-halo 2.2s ease-in-out infinite; }
.pa-ox { animation: pa-ox .8s ease-in-out infinite alternate; }
.pa-oy { animation: pa-oy .8s ease-in-out infinite alternate; }
@keyframes pa-ox { from { transform: translateX(-26px); } to { transform: translateX(26px); } }
@keyframes pa-oy { from { transform: translateY(-8px); } to { transform: translateY(8px); } }
.pa-hop { animation: pa-hop 1.6s ease-in-out infinite; transform-box: fill-box; }
.pa-spill, .pa-crumb { animation: pa-q 3s ease-in-out infinite; transform-box: fill-box; }
@keyframes pa-wander { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-6px) rotate(-4deg); } 75% { transform: translateX(6px) rotate(4deg); } }
@keyframes pa-dig { 0%, 100% { transform: rotate(0); } 45% { transform: rotate(9deg) translateY(2px); } 60% { transform: rotate(7deg); } }
@keyframes pa-look { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(-2.5px, 0); } 60% { transform: translate(2.5px, -1px); } }
@keyframes pa-q { 0%, 100% { transform: translateY(0) rotate(-6deg); opacity: .85; } 50% { transform: translateY(-7px) rotate(6deg); opacity: 1; } }
@keyframes pa-halo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes pa-hop { 0%, 55%, 100% { transform: translateY(0); } 25% { transform: translateY(-16px) rotate(90deg); } }
@media (prefers-reduced-motion: reduce) {
  .pa-wander, .pa-dig, .pa-look, .pa-q, .pa-halo, .pa-hop, .pa-spill, .pa-crumb, .pa-ox, .pa-oy { animation: none; }
  .pa-snow i { animation: none; top: var(--y); }
}
/* product pages (/<id>): the legal-page shell with the product's monogram, domain and status */
.product-notice { --c: #aab3cc; }
.product-title { display: flex; align-items: center; gap: 18px; }
.product-title .prod-mark { width: 72px; height: 72px; border-radius: 16px; font-size: 1.6rem; }
.product-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.product-domain { color: var(--mut); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.product-meta .prod-status { margin-top: 0; }
.product-notice .legal-cross { border-top: 0; padding-top: 0; margin-top: 28px; }
@media (max-width: 600px) {
  .privacy-main { width: calc(100% - 32px); padding-top: max(94px, calc(80px + env(safe-area-inset-top))); }
  .privacy-page .top .ico { padding: 0 12px; max-width: 100%; font-size: .8rem; }
  .privacy-heading { padding-bottom: 24px; }
  .privacy-intro { font-size: 1rem; }
  .product-title .prod-mark { width: 56px; height: 56px; font-size: 1.25rem; border-radius: 13px; }
}
@media (max-width: 1000px) { .foot { padding-bottom: calc(56px + env(safe-area-inset-bottom)); } }
#catalogo:focus { outline: none; }

/* ===== Posicion de la tarjeta por escena (data-pos = CARDS en scenes.js; data-pm = alterna arriba/abajo en movil) ===== */
html.flight .scene[data-pos^="t"] { align-items: flex-start; padding-top: clamp(76px, 11vh, 104px); padding-bottom: 0; }
html.flight .scene[data-pos^="m"] { align-items: center; padding-bottom: 0; }
html.flight .scene[data-pos$="r"] { justify-content: flex-end; }
html.flight .scene[data-pos$="c"] { justify-content: center; }
@media (max-width: 1000px) {
  /* tarjetas pegadas al borde (abajo: sobre el area segura; arriba: justo bajo la barra), compactas (<= ~30 % del alto) */
  html.flight .scene[data-pm="b"] { align-items: flex-end; justify-content: flex-start; padding: 0 38px calc(10px + env(safe-area-inset-bottom)) 10px; }
  html.flight .scene[data-pm="t"] { align-items: flex-start; justify-content: flex-start; padding: 64px 38px 0 10px; }
  html.flight .scene .panel { max-width: none; width: 100%; padding: 10px 12px; border-radius: 14px; }
  html.flight .scene .eyebrow { font-size: 0.64rem; letter-spacing: 0.14em; margin-bottom: 3px; }
  html.flight .scene h1, html.flight .scene h2 { font-size: clamp(1.15rem, 5.4vw, 1.45rem); line-height: 1.1; margin-bottom: 5px; }
  html.flight .scene .line { font-size: 0.82rem; line-height: 1.36; }
  html.flight .scene .tags { margin-top: 7px; gap: 4px; }
  html.flight .scene .tags li, html.flight .scene[data-scene="llegada"] .tags li, html.flight .scene[data-scene="cubo"] .tags li, html.flight .scene[data-scene="nombre"] .tags li { font-size: 0.66rem; padding: 2px 8px; }
  html.flight .scene .tags .social.compact a { width: 26px; height: 26px; }
  html.flight .scene .note, html.flight .scene[data-scene="llegada"] .note { font-size: 0.76rem; margin-top: 5px; }
  html.flight .scene .actions.row { margin-top: 8px; }
  html.flight .scene .more { margin-top: 8px; }
}

/* boton Estatica/Animada de la barra superior: muestra el icono y la etiqueta del modo al que se cambia */
#mode-toggle .mi { display: inline-flex; align-items: center; }
#mode-toggle .lbl.mi { display: inline; }
html.static #mode-toggle .mi-static, html:not(.static) #mode-toggle .mi-anim { display: none; }
@media (max-width: 1000px) { #mode-toggle .lbl { display: none; } }

/* Tarjetas del recorrido: un solo tamaño fijo para todas (Chapa, 2026-10-06). El texto va arriba y
   la fila de chips/acciones/redes se apoya en el borde inferior, así todas comparten silueta y posición.
   El tamaño es el del contenido más largo de las 18 tarjetas en los seis idiomas (medido en navegador): los textos
   se recortaron a ~2 renglones para que esa medida sea la de una tarjeta de rama (252 px escritorio, 164 px móvil). */
html.flight { --card-w: min(520px, 44vw); --card-h: 252px; }
html.flight .scene .panel {
  position: relative; width: var(--card-w); max-width: none; height: var(--card-h);
  display: flex; flex-direction: column; overflow: hidden;
}
html.flight .scene .panel > :is(.tags, .actions, .service-links) { margin-top: auto; padding-top: 12px; }
html.flight .tags li.tags-social { position: static; margin-left: auto; }
@media (min-width: 1001px) { html.flight .scene h1, html.flight .scene h2 { font-size: clamp(1.7rem, 2.3vw, 1.85rem); } }
@media (max-width: 1000px) {
  html.flight { --card-w: 100%; --card-h: 164px; }
  html.flight .scene .panel > :is(.tags, .actions, .service-links) { padding-top: 6px; }
}
/* teléfonos en horizontal: muy poca altura, la tarjeta vuelve a ajustarse a su contenido */
@media (max-width: 1000px) and (max-height: 500px) {
  html.flight .scene .panel { height: auto; max-height: calc(100svh - 76px); }
}
/* palabras largas (alemán, italiano) se parten con guion según el idioma activo (<html lang>) */
.items li, .card p, .catalog .line { -webkit-hyphens: auto; hyphens: auto; }
/* barra superior: entre 1001 y 1279 px los botones van solo con icono (con texto se enciman con la marca) */
@media (min-width: 1001px) and (max-width: 1279px) {
  .top .ico { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .top .ico .lbl { display: none; }
}
/* ventanas de escritorio muy bajas: la tarjeta se ajusta a su contenido y nunca sale de la pantalla */
@media (min-width: 1001px) and (max-height: 560px) {
  html.flight .scene .panel { height: auto; max-height: calc(100vh - 96px); }
}
html.dragging, html.dragging * { cursor: grabbing !important; user-select: none; }
/* Tarjetas compactas (Chapa, 2026-10-06: «la medida de la más chica posible»): el lema del hero en un renglón,
   la descripción sin tope de ancho y los botones de Servicios y Contacto en una sola fila */
html.flight .scene .line.sub { font-size: clamp(1rem, 1.45vw, 1.18rem); }
html.flight .scene .note { max-width: none; }
html.flight .scene .service-links { display: flex; flex-wrap: wrap; gap: 6px; }
html.flight .scene .service-links .btn, html.flight .scene .actions.row .btn { padding: 6px 12px; font-size: 0.8rem; gap: 5px; }
html.flight .scene .actions.row { gap: 6px; flex-wrap: nowrap; }
html.flight .scene .actions.row .social.compact { flex-wrap: nowrap; }
/* correo y WhatsApp solo con icono (conservan aria-label y title) cuando la tarjeta es angosta, para que todo quepa en un renglón */
@media (max-width: 1180px) { html.flight .scene .actions.row .btn.alt span { display: none; } }
@media (max-width: 1000px) {
  html.flight .scene .service-links .btn, html.flight .scene .actions.row .btn { padding: 4px 9px; font-size: 0.72rem; }
  html.flight .scene .service-links { gap: 4px; }
  html.flight .scene .service-links .btn { padding: 4px 8px; font-size: 0.7rem; }
  html.flight .scene .service-links .btn svg { display: none; }
  html.flight .scene .line.sub { font-size: 0.9rem; }
  html.flight .scene .actions.row { gap: 4px; }
  html.flight .scene .actions.row .social.compact { gap: 3px; }
  html.flight .scene .actions.row .social.compact a { width: 26px; height: 26px; }
  html.flight .scene .actions.row .social.compact a svg { width: 14px; height: 14px; }
}
@media (max-width: 380px) {
  html.flight .scene .actions.row .btn { padding: 4px 7px; }
  html.flight .scene .actions.row .social.compact a { width: 23px; height: 23px; }
  html.flight .scene .actions.row .social.compact a svg { width: 12px; height: 12px; }
}
@media (max-width: 340px) { html.flight .scene .actions.row { flex-wrap: wrap; } }
/* teléfonos de 320–340 px: el texto ocupa más líneas, la tarjeta fija es un poco más alta */
@media (max-width: 380px) { html.flight { --card-h: 182px; } }
@media (max-width: 340px) { html.flight { --card-h: 202px; } }
/* Productos Duxels: tarjetas compactas con monograma provisional (sin logos aun) en los colores de la marca */
.products { margin: 76px 0 0; scroll-margin-top: 76px; }
.products > .line { margin-bottom: 18px; max-width: 62ch; }
.products .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.prod { --c: #aab3cc; display: flex; align-items: center; gap: 14px; padding: 16px; }
.prod-mark {
  flex: none; width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--c) 6%, transparent);
}
.prod-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.prod h4 { font-size: 1.08rem; margin: 0; }
.prod h4 a { color: inherit; text-decoration: none; }
.prod h4 a:hover, .prod h4 a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.prod .prod-domain {
  margin: 0; max-width: 100%; color: var(--mut); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.prod a.prod-domain { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.prod-status {
  margin-top: 6px; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--mut); padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line);
}
