/* ==========================================================================
   Crea Negocio Web — Hoja de estilos principal
   Paleta anclada en el azulejo madrileño: cobalto, ocre y papel hueso.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Color */
  --tinta:          #14171F;
  --tinta-2:        #3D4557;
  --tinta-3:        #6E7689;
  --cobalto:        #1B3FA0;
  --cobalto-claro:  #2E5BD4;
  --cobalto-oscuro: #102863;
  --cobalto-suave:  #EAEFFB;
  --ambar:          #C97C15;
  --ambar-claro:    #E5A33D;
  --ambar-suave:    #FDF2E0;
  --papel:          #FBFAF7;
  --papel-2:        #F4F2EC;
  --nieve:          #FFFFFF;
  --linea:          #E5E2DB;
  --linea-fuerte:   #D2CEC4;
  --verde:          #1B6E52;
  --verde-suave:    #E6F2ED;

  /* Tipografía */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --texto:   "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono:    ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;

  /* Escala fluida */
  --t-xs:   clamp(0.75rem, 0.72rem + 0.15vw, 0.82rem);
  --t-sm:   clamp(0.875rem, 0.85rem + 0.12vw, 0.94rem);
  --t-base: clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
  --t-md:   clamp(1.125rem, 1.06rem + 0.32vw, 1.31rem);
  --t-lg:   clamp(1.35rem, 1.2rem + 0.75vw, 1.85rem);
  --t-xl:   clamp(1.7rem, 1.4rem + 1.5vw, 2.6rem);
  --t-2xl:  clamp(2.1rem, 1.6rem + 2.5vw, 3.6rem);
  --t-3xl:  clamp(2.6rem, 1.7rem + 4.2vw, 5rem);

  /* Espaciado */
  --e-1: 0.25rem;
  --e-2: 0.5rem;
  --e-3: 0.75rem;
  --e-4: 1rem;
  --e-5: 1.5rem;
  --e-6: 2rem;
  --e-7: 3rem;
  --e-8: 4rem;
  --e-9: 6rem;
  --seccion: clamp(4rem, 3rem + 6vw, 8rem);

  /* Formas */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-full: 999px;

  /* Sombras */
  --s-1: 0 1px 2px rgba(20, 23, 31, 0.05);
  --s-2: 0 4px 14px rgba(20, 23, 31, 0.07);
  --s-3: 0 14px 40px rgba(20, 23, 31, 0.10);
  --s-4: 0 30px 70px rgba(16, 40, 99, 0.16);

  /* Movimiento */
  --curva: cubic-bezier(0.22, 1, 0.36, 1);
  --curva-suave: cubic-bezier(0.4, 0, 0.2, 1);

  /* Medidas */
  --ancho: 1200px;
  --ancho-estrecho: 760px;
  --header-h: 76px;
}

/* --------------------------------------------------------------------------
   2. Reset y base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: var(--t-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
  font-variation-settings: "SOFT" 20, "WONK" 1;
}

h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }

p { margin: 0 0 var(--e-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--cobalto); text-decoration: none; }

ul, ol { margin: 0; padding: 0; }

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

:focus-visible {
  outline: 3px solid var(--cobalto-claro);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--cobalto); color: var(--nieve); }

/* --------------------------------------------------------------------------
   3. Utilidades de estructura
   -------------------------------------------------------------------------- */

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
}

.estrecho { max-width: var(--ancho-estrecho); margin-inline: auto; }

.seccion { padding-block: var(--seccion); }

.seccion-papel { background: var(--papel-2); }

.seccion-oscura {
  background: var(--cobalto-oscuro);
  color: var(--nieve);
}
.seccion-oscura h2,
.seccion-oscura h3 { color: var(--nieve); }
.seccion-oscura p { color: rgba(255, 255, 255, 0.78); }

.centrado { text-align: center; }

.salto-contenido {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cobalto);
  color: var(--nieve);
  padding: var(--e-3) var(--e-5);
  z-index: 200;
  border-radius: 0 0 var(--r-sm) 0;
}
.salto-contenido:focus { left: 0; }

/* --------------------------------------------------------------------------
   4. Tipografía de composición
   -------------------------------------------------------------------------- */

.antetitulo {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  font-family: var(--texto);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cobalto);
  margin-bottom: var(--e-4);
}
.antetitulo::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--ambar);
  border-radius: 2px;
}
.seccion-oscura .antetitulo { color: var(--ambar-claro); }

.entradilla {
  font-size: var(--t-md);
  color: var(--tinta-2);
  line-height: 1.6;
  max-width: 58ch;
}
.seccion-oscura .entradilla { color: rgba(255, 255, 255, 0.8); }

.cabecera-seccion { margin-bottom: var(--e-7); }
.cabecera-seccion.centrado .entradilla { margin-inline: auto; }
.cabecera-seccion.centrado .antetitulo::before { display: none; }

.resalte {
  color: var(--cobalto);
  font-style: italic;
  font-variation-settings: "SOFT" 40, "WONK" 1;
}

.subrayado {
  position: relative;
  white-space: nowrap;
}
.subrayado::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.06em;
  height: 0.32em;
  background: var(--ambar-claro);
  opacity: 0.42;
  border-radius: 3px;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--curva) 0.35s;
}
.visible .subrayado::after,
.cargado .subrayado::after { transform: scaleX(1); }

/* --------------------------------------------------------------------------
   5. Botones
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-2);
  padding: 0.92em 1.6em;
  border-radius: var(--r-full);
  font-family: var(--texto);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--curva), box-shadow 0.35s var(--curva),
              background-color 0.3s var(--curva-suave), color 0.3s var(--curva-suave);
  isolation: isolate;
}

.btn svg { width: 1.1em; height: 1.1em; flex: none; }

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cobalto-oscuro);
  transform: translateY(101%);
  transition: transform 0.45s var(--curva);
  z-index: -1;
}
.btn:hover::before { transform: translateY(0); }

.btn-principal {
  background: var(--cobalto);
  color: var(--nieve);
  box-shadow: 0 6px 20px rgba(27, 63, 160, 0.28);
}
.btn-principal:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(27, 63, 160, 0.36);
}

.btn-secundario {
  background: var(--nieve);
  color: var(--tinta);
  border: 1.5px solid var(--linea-fuerte);
}
.btn-secundario::before { background: var(--tinta); }
.btn-secundario:hover { color: var(--nieve); border-color: var(--tinta); transform: translateY(-3px); }

.btn-ambar {
  background: var(--ambar);
  color: var(--nieve);
  box-shadow: 0 6px 20px rgba(201, 124, 21, 0.3);
}
.btn-ambar::before { background: #A96410; }
.btn-ambar:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(201, 124, 21, 0.38); }

.btn-claro {
  background: var(--nieve);
  color: var(--cobalto-oscuro);
}
.btn-claro::before { background: var(--ambar); }
.btn-claro:hover { color: var(--nieve); transform: translateY(-3px); }

.btn-fantasma {
  background: transparent;
  color: var(--nieve);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.btn-fantasma::before { background: var(--nieve); }
.btn-fantasma:hover { color: var(--cobalto-oscuro); border-color: var(--nieve); }

.btn-grande { padding: 1.05em 2.1em; font-size: var(--t-base); }

.grupo-btn {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-3);
  align-items: center;
}
.centrado .grupo-btn { justify-content: center; }

.enlace-flecha {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  font-weight: 700;
  font-size: var(--t-sm);
  color: var(--cobalto);
}
.enlace-flecha svg { transition: transform 0.35s var(--curva); width: 1.05em; height: 1.05em; }
.enlace-flecha:hover svg { transform: translateX(5px); }

/* --------------------------------------------------------------------------
   6. Barra de progreso de scroll
   -------------------------------------------------------------------------- */

.progreso {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--cobalto), var(--ambar));
  z-index: 120;
  will-change: transform;
}

/* --------------------------------------------------------------------------
   7. Cabecera y navegación
   -------------------------------------------------------------------------- */

.cabecera {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--curva-suave), box-shadow 0.4s var(--curva-suave),
              background-color 0.4s var(--curva-suave);
}
.cabecera.desplazada {
  border-bottom-color: var(--linea);
  box-shadow: var(--s-2);
  background: rgba(251, 250, 247, 0.95);
}

.barra-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-5);
  height: var(--header-h);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.16rem;
  color: var(--tinta);
  letter-spacing: -0.02em;
  flex: none;
}
.marca-icono {
  width: 34px; height: 34px;
  flex: none;
  display: block;
  transition: transform 0.5s var(--curva);
}
.marca:hover .marca-icono { transform: rotate(-8deg) scale(1.06); }
.marca-texto span { color: var(--cobalto); }

.nav-lista {
  display: flex;
  align-items: center;
  gap: var(--e-5);
  list-style: none;
}

.nav-enlace {
  position: relative;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--tinta-2);
  padding-block: 0.4rem;
  transition: color 0.3s var(--curva-suave);
}
.nav-enlace::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--cobalto);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--curva);
}
.nav-enlace:hover { color: var(--cobalto); }
.nav-enlace:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-enlace.activo { color: var(--cobalto); }
.nav-enlace.activo::after { transform: scaleX(1); }

.nav-acciones { display: flex; align-items: center; gap: var(--e-3); flex: none; }

.hamburguesa {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--linea);
  background: var(--nieve);
}
.hamburguesa span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--tinta);
  border-radius: 2px;
  transition: transform 0.4s var(--curva), opacity 0.25s var(--curva-suave);
}
.hamburguesa[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburguesa[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburguesa[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu-movil {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--papel);
  padding: var(--e-6) clamp(1.15rem, 4vw, 2.5rem) var(--e-8);
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
  transform: translateX(100%);
  transition: transform 0.5s var(--curva);
  z-index: 99;
  overflow-y: auto;
  visibility: hidden;
}
.menu-movil.abierto { transform: translateX(0); visibility: visible; }

.menu-movil a:not(.btn) {
  font-family: var(--display);
  font-size: var(--t-lg);
  font-weight: 600;
  color: var(--tinta);
  padding-block: var(--e-3);
  border-bottom: 1px solid var(--linea);
  opacity: 0;
  transform: translateY(14px);
}
.menu-movil.abierto a:not(.btn) {
  animation: entra-menu 0.5s var(--curva) forwards;
}
.menu-movil.abierto a:nth-child(1) { animation-delay: 0.06s; }
.menu-movil.abierto a:nth-child(2) { animation-delay: 0.12s; }
.menu-movil.abierto a:nth-child(3) { animation-delay: 0.18s; }
.menu-movil.abierto a:nth-child(4) { animation-delay: 0.24s; }
.menu-movil.abierto a:nth-child(5) { animation-delay: 0.30s; }

@keyframes entra-menu {
  to { opacity: 1; transform: translateY(0); }
}

.menu-movil .btn { margin-top: var(--e-5); }

body.menu-bloqueado { overflow: hidden; }

/* --------------------------------------------------------------------------
   8. Héroe
   -------------------------------------------------------------------------- */

.heroe {
  position: relative;
  padding-top: clamp(3rem, 2rem + 5vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 2rem + 6vw, 6.5rem);
  overflow: hidden;
}

.heroe-fondo {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 520px at 78% -8%, var(--cobalto-suave), transparent 62%),
    radial-gradient(760px 420px at 2% 12%, var(--ambar-suave), transparent 58%);
}

.heroe-rejilla-fondo {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--linea) 1px, transparent 1px),
    linear-gradient(90deg, var(--linea) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 30%, #000 5%, transparent 68%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 5%, transparent 68%);
  opacity: 0.5;
}

.heroe-rejilla {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
}

.heroe h1 {
  margin-bottom: var(--e-5);
  font-size: var(--t-3xl);
}

.heroe .entradilla { margin-bottom: var(--e-6); }

.insignia {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  padding: 0.45rem 0.95rem 0.45rem 0.5rem;
  border-radius: var(--r-full);
  background: var(--nieve);
  border: 1px solid var(--linea);
  box-shadow: var(--s-1);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--tinta-2);
  margin-bottom: var(--e-5);
}
.insignia-punto {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--verde);
  position: relative;
  margin-left: 0.35rem;
}
.insignia-punto::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--verde);
  opacity: 0;
  animation: pulso 2.4s ease-out infinite;
}
@keyframes pulso {
  0%   { opacity: 0.7; transform: scale(0.6); }
  70%  { opacity: 0; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(1.5); }
}

.heroe-pie {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-5);
  margin-top: var(--e-6);
  padding-top: var(--e-5);
  border-top: 1px solid var(--linea);
}
.heroe-dato { display: flex; flex-direction: column; }
.heroe-dato dt {
  font-size: var(--t-xs);
  color: var(--tinta-3);
  order: 2;
  font-weight: 600;
}
.heroe-dato dd {
  margin: 0;
  order: 1;
  font-family: var(--display);
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--cobalto);
  font-variant-numeric: tabular-nums;
}

/* Palabras del titular con revelado por máscara */
.palabra {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.palabra > span {
  display: inline-block;
  transition: transform 0.85s var(--curva);
}
/* Igual que en .revelar: sin JS el titular se ve entero, no oculto. */
.js .palabra > span { transform: translateY(105%); }
.js .cargado .palabra > span { transform: translateY(0); }

/* --------------------------------------------------------------------------
   9. Maqueta de navegador animada (el héroe visual)
   -------------------------------------------------------------------------- */

.escena {
  position: relative;
  perspective: 1600px;
}

.navegador {
  background: var(--nieve);
  border-radius: var(--r-lg);
  box-shadow: var(--s-4);
  overflow: hidden;
  border: 1px solid var(--linea);
  transform: rotateY(-7deg) rotateX(3deg) translateZ(0);
  transition: transform 0.9s var(--curva);
  will-change: transform;
}
.escena:hover .navegador { transform: rotateY(-2deg) rotateX(1deg) scale(1.015); }

.navegador-barra {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  padding: 0.7rem 0.9rem;
  background: var(--papel-2);
  border-bottom: 1px solid var(--linea);
}
.navegador-puntos { display: flex; gap: 6px; flex: none; }
.navegador-puntos i {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: block;
}
.navegador-puntos i:nth-child(1) { background: #F0685B; }
.navegador-puntos i:nth-child(2) { background: #F5BF4F; }
.navegador-puntos i:nth-child(3) { background: #61C554; }
.navegador-url {
  flex: 1;
  background: var(--nieve);
  border: 1px solid var(--linea);
  border-radius: var(--r-full);
  padding: 0.3rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--tinta-3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
  white-space: nowrap;
}
.navegador-url svg { width: 11px; height: 11px; color: var(--verde); flex: none; }

.navegador-lienzo {
  position: relative;
  background: var(--nieve);
  min-height: 340px;
  padding: 0;
  overflow: hidden;
}

/* Piezas que se ensamblan */
.pieza {
  opacity: 0;
  transform: translateY(18px);
  animation: monta 0.7s var(--curva) forwards;
}
@keyframes monta {
  to { opacity: 1; transform: translateY(0); }
}

.maqueta-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--linea);
  animation-delay: 0.5s;
}
.maqueta-logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--tinta);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.maqueta-logo i {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--ambar);
  display: block;
  flex: none;
}
.maqueta-menu { display: flex; gap: 0.55rem; }
.maqueta-menu i {
  display: block;
  height: 6px;
  width: 30px;
  border-radius: 3px;
  background: var(--papel-2);
}
.maqueta-menu i:last-child { background: var(--cobalto); width: 42px; }

.maqueta-heroe {
  padding: 1.3rem 1.1rem 1.1rem;
  background: linear-gradient(160deg, var(--cobalto-suave), transparent 75%);
}
.maqueta-titulo {
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--tinta);
  margin-bottom: 0.55rem;
  animation-delay: 0.95s;
}
.maqueta-linea {
  height: 7px;
  border-radius: 4px;
  background: var(--papel-2);
  margin-bottom: 0.42rem;
  animation-delay: 1.25s;
}
.maqueta-linea.corta { width: 62%; animation-delay: 1.4s; }
.maqueta-boton {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.8rem;
  background: var(--cobalto);
  color: var(--nieve);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: var(--r-full);
  animation-delay: 1.7s;
}
.maqueta-boton::after {
  content: "";
  width: 5px; height: 5px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.maqueta-tarjetas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding: 1.1rem;
}
.maqueta-tarjeta {
  border: 1px solid var(--linea);
  border-radius: var(--r-sm);
  padding: 0.65rem;
  background: var(--nieve);
}
.maqueta-tarjeta:nth-child(1) { animation-delay: 2.0s; }
.maqueta-tarjeta:nth-child(2) { animation-delay: 2.15s; }
.maqueta-tarjeta:nth-child(3) { animation-delay: 2.3s; }
.maqueta-tarjeta i {
  display: block;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--ambar-suave);
  margin-bottom: 0.5rem;
}
.maqueta-tarjeta b {
  display: block;
  height: 6px;
  width: 78%;
  border-radius: 3px;
  background: var(--tinta);
  opacity: 0.82;
  margin-bottom: 0.32rem;
}
.maqueta-tarjeta u {
  display: block;
  height: 5px;
  width: 92%;
  border-radius: 3px;
  background: var(--papel-2);
}

/* Cursor que se mueve y hace clic */
.cursor-demo {
  position: absolute;
  width: 20px; height: 20px;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  animation: cursor-mueve 9s var(--curva-suave) 2.6s infinite;
}
.cursor-demo svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.28)); }
@keyframes cursor-mueve {
  0%   { opacity: 0; transform: translate(80%, 320%) scale(1); }
  8%   { opacity: 1; }
  26%  { transform: translate(210%, 268%) scale(1); }
  30%  { transform: translate(210%, 268%) scale(0.82); }
  34%  { transform: translate(210%, 268%) scale(1); }
  60%  { transform: translate(520%, 470%) scale(1); }
  88%  { opacity: 1; transform: translate(700%, 250%) scale(1); }
  100% { opacity: 0; transform: translate(700%, 250%) scale(1); }
}

/* Etiquetas flotantes */
.flotante {
  position: absolute;
  background: var(--nieve);
  border: 1px solid var(--linea);
  border-radius: var(--r-md);
  box-shadow: var(--s-3);
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--tinta);
  z-index: 5;
  opacity: 0;
  animation: flota-entra 0.8s var(--curva) forwards;
}
.flotante svg { width: 15px; height: 15px; flex: none; }
.flotante-1 { top: 12%; left: -8%; animation-delay: 2.6s; }
.flotante-1 svg { color: var(--verde); }
.flotante-2 { bottom: 14%; right: -6%; animation-delay: 2.95s; }
.flotante-2 svg { color: var(--ambar); }

@keyframes flota-entra {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.flotante-1 { animation-name: flota-entra, flota-vaiven; animation-duration: 0.8s, 5s; animation-delay: 2.6s, 3.4s; animation-iteration-count: 1, infinite; animation-timing-function: var(--curva), ease-in-out; }
.flotante-2 { animation-name: flota-entra, flota-vaiven; animation-duration: 0.8s, 6s; animation-delay: 2.95s, 3.75s; animation-iteration-count: 1, infinite; animation-timing-function: var(--curva), ease-in-out; }

@keyframes flota-vaiven {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* --------------------------------------------------------------------------
   10. Marquesina de sectores
   -------------------------------------------------------------------------- */

.marquesina {
  border-block: 1px solid var(--linea);
  background: var(--nieve);
  padding-block: var(--e-4);
  overflow: hidden;
  position: relative;
}
.marquesina::before,
.marquesina::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 90px;
  z-index: 2;
  pointer-events: none;
}
.marquesina::before { left: 0; background: linear-gradient(90deg, var(--nieve), transparent); }
.marquesina::after { right: 0; background: linear-gradient(270deg, var(--nieve), transparent); }

.marquesina-pista {
  display: flex;
  gap: var(--e-7);
  width: max-content;
  animation: desliza 34s linear infinite;
}
.marquesina:hover .marquesina-pista { animation-play-state: paused; }
@keyframes desliza {
  to { transform: translateX(-50%); }
}
.marquesina-item {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  font-family: var(--display);
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--tinta-3);
  white-space: nowrap;
  transition: color 0.3s var(--curva-suave);
}
.marquesina-item:hover { color: var(--cobalto); }
.marquesina-item svg { width: 1.05em; height: 1.05em; color: var(--ambar); }

/* --------------------------------------------------------------------------
   11. Rejillas y tarjetas
   -------------------------------------------------------------------------- */

.rejilla { display: grid; gap: var(--e-5); }
.rejilla-2 { grid-template-columns: repeat(2, 1fr); }
.rejilla-3 { grid-template-columns: repeat(3, 1fr); }
.rejilla-4 { grid-template-columns: repeat(4, 1fr); }

.tarjeta {
  background: var(--nieve);
  border: 1px solid var(--linea);
  border-radius: var(--r-lg);
  padding: var(--e-6);
  transition: transform 0.5s var(--curva), box-shadow 0.5s var(--curva),
              border-color 0.4s var(--curva-suave);
  position: relative;
  overflow: hidden;
}
.tarjeta::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cobalto), var(--ambar));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--curva);
}
.tarjeta:hover {
  transform: translateY(-7px);
  box-shadow: var(--s-3);
  border-color: transparent;
}
.tarjeta:hover::after { transform: scaleX(1); }

.tarjeta h3 { margin-bottom: var(--e-3); }
.tarjeta p { color: var(--tinta-2); font-size: var(--t-sm); }

.icono-tarjeta {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--cobalto-suave);
  color: var(--cobalto);
  display: grid;
  place-items: center;
  margin-bottom: var(--e-4);
  transition: transform 0.5s var(--curva), background-color 0.4s var(--curva-suave);
}
.icono-tarjeta svg { width: 25px; height: 25px; }
.tarjeta:hover .icono-tarjeta {
  transform: rotate(-7deg) scale(1.07);
  background: var(--ambar-suave);
  color: var(--ambar);
}

/* Lista de comprobación */
.lista-check { list-style: none; display: flex; flex-direction: column; gap: var(--e-3); }
.lista-check li {
  display: flex;
  align-items: flex-start;
  gap: var(--e-3);
  font-size: var(--t-sm);
  color: var(--tinta-2);
}
.lista-check li::before {
  content: "";
  flex: none;
  width: 21px; height: 21px;
  margin-top: 0.15em;
  border-radius: 50%;
  background: var(--verde-suave) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B6E52' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.seccion-oscura .lista-check li { color: rgba(255,255,255,0.82); }

/* --------------------------------------------------------------------------
   12. Proceso (secuencia real numerada)
   -------------------------------------------------------------------------- */

.proceso { position: relative; display: flex; flex-direction: column; gap: var(--e-6); }
.proceso::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 20px; bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--cobalto), var(--ambar));
  opacity: 0.28;
}

.paso {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--e-5);
  align-items: start;
  position: relative;
}
.paso-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--nieve);
  border: 2px solid var(--cobalto);
  color: var(--cobalto);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  flex: none;
  transition: transform 0.5s var(--curva), background-color 0.4s, color 0.4s;
  z-index: 1;
}
.paso:hover .paso-num { background: var(--cobalto); color: var(--nieve); transform: scale(1.08); }
.paso-cuerpo h3 { margin-bottom: var(--e-2); }
.paso-cuerpo p { color: var(--tinta-2); font-size: var(--t-sm); }
.paso-plazo {
  display: inline-block;
  margin-top: var(--e-3);
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--ambar);
  background: var(--ambar-suave);
  padding: 0.25rem 0.7rem;
  border-radius: var(--r-full);
}

/* --------------------------------------------------------------------------
   13. Precios
   -------------------------------------------------------------------------- */

.plan {
  background: var(--nieve);
  border: 1px solid var(--linea);
  border-radius: var(--r-lg);
  padding: var(--e-6);
  display: flex;
  flex-direction: column;
  transition: transform 0.5s var(--curva), box-shadow 0.5s var(--curva);
  position: relative;
}
.plan:hover { transform: translateY(-7px); box-shadow: var(--s-3); }

.plan-destacado {
  border: 2px solid var(--cobalto);
  box-shadow: var(--s-3);
}
.plan-etiqueta {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cobalto);
  color: var(--nieve);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.plan-nombre {
  font-family: var(--display);
  font-size: var(--t-lg);
  font-weight: 700;
  margin-bottom: var(--e-2);
}
.plan-para { font-size: var(--t-sm); color: var(--tinta-3); margin-bottom: var(--e-5); }
.plan-precio {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-bottom: var(--e-2);
}
.plan-precio .cifra {
  font-family: var(--display);
  font-size: clamp(2.4rem, 2rem + 2vw, 3.1rem);
  font-weight: 700;
  color: var(--cobalto);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.plan-precio .moneda { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--cobalto); }
.plan-nota { font-size: var(--t-xs); color: var(--tinta-3); margin-bottom: var(--e-5); }
.plan .lista-check { margin-bottom: var(--e-6); flex: 1; }
.plan .btn { width: 100%; }

/* --------------------------------------------------------------------------
   14. Portfolio
   -------------------------------------------------------------------------- */

.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-2);
  justify-content: center;
  margin-bottom: var(--e-7);
}
.filtro {
  padding: 0.5rem 1.15rem;
  border-radius: var(--r-full);
  border: 1.5px solid var(--linea);
  background: var(--nieve);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--tinta-2);
  transition: all 0.35s var(--curva);
}
.filtro:hover { border-color: var(--cobalto); color: var(--cobalto); }
.filtro.activo { background: var(--cobalto); border-color: var(--cobalto); color: var(--nieve); }

.trabajo {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--nieve);
  border: 1px solid var(--linea);
  transition: transform 0.55s var(--curva), box-shadow 0.55s var(--curva), opacity 0.4s, filter 0.4s;
  display: flex;
  flex-direction: column;
  /* Las tarjetas de la portada son enlaces: heredan color y no llevan subrayado */
  color: inherit;
  text-decoration: none;
}
.trabajo h3 { color: var(--tinta); }
.trabajo:hover { transform: translateY(-8px); box-shadow: var(--s-3); }
.trabajo.oculto { display: none; }

.trabajo-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--papel-2);
}
.trabajo-visual > svg { width: 100%; height: 100%; display: block; }
.trabajo-capa {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(16, 40, 99, 0.85));
  opacity: 0;
  transition: opacity 0.45s var(--curva);
  display: flex;
  align-items: flex-end;
  padding: var(--e-5);
}
.trabajo:hover .trabajo-capa { opacity: 1; }
.trabajo-capa span {
  color: var(--nieve);
  font-weight: 700;
  font-size: var(--t-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transform: translateY(10px);
  transition: transform 0.45s var(--curva) 0.05s;
}
.trabajo:hover .trabajo-capa span { transform: translateY(0); }

.trabajo-cuerpo { padding: var(--e-5); flex: 1; display: flex; flex-direction: column; }
.trabajo-sector {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ambar);
  margin-bottom: var(--e-2);
}
.trabajo-cuerpo h3 { font-size: var(--t-md); margin-bottom: var(--e-2); }
.trabajo-cuerpo p { font-size: var(--t-sm); color: var(--tinta-2); margin-bottom: var(--e-4); }
.trabajo-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; list-style: none; }
.trabajo-tags li {
  font-size: var(--t-xs);
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-full);
  background: var(--papel-2);
  color: var(--tinta-2);
  font-weight: 600;
}

.aviso-demo {
  display: flex;
  align-items: flex-start;
  gap: var(--e-3);
  background: var(--ambar-suave);
  border: 1px solid rgba(201, 124, 21, 0.25);
  border-radius: var(--r-md);
  padding: var(--e-4) var(--e-5);
  font-size: var(--t-sm);
  color: #7A4B0C;
  margin-bottom: var(--e-6);
}
.aviso-demo svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--ambar); }

/* --------------------------------------------------------------------------
   15. Acordeón de preguntas
   -------------------------------------------------------------------------- */

.acordeon { display: flex; flex-direction: column; gap: var(--e-3); }

.pregunta {
  background: var(--nieve);
  border: 1px solid var(--linea);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.35s var(--curva-suave), box-shadow 0.35s var(--curva-suave);
}
.pregunta.abierta { border-color: var(--cobalto); box-shadow: var(--s-2); }

.pregunta-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-4);
  padding: var(--e-5);
  text-align: left;
  font-family: var(--texto);
  font-weight: 700;
  font-size: var(--t-base);
  color: var(--tinta);
  transition: color 0.3s var(--curva-suave);
}
.pregunta-btn:hover { color: var(--cobalto); }

.pregunta-mas {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cobalto-suave);
  color: var(--cobalto);
  display: grid;
  place-items: center;
  transition: transform 0.45s var(--curva), background-color 0.35s;
  position: relative;
}
.pregunta-mas::before,
.pregunta-mas::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.45s var(--curva), opacity 0.3s;
}
.pregunta-mas::before { width: 12px; height: 2px; }
.pregunta-mas::after  { width: 2px; height: 12px; }
.pregunta.abierta .pregunta-mas { background: var(--cobalto); color: var(--nieve); transform: rotate(180deg); }
.pregunta.abierta .pregunta-mas::after { transform: scaleY(0); opacity: 0; }

.pregunta-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--curva);
}
.pregunta.abierta .pregunta-panel { grid-template-rows: 1fr; }
.pregunta-panel > div { overflow: hidden; }
.pregunta-panel p {
  padding: 0 var(--e-5) var(--e-5);
  color: var(--tinta-2);
  font-size: var(--t-sm);
}

/* --------------------------------------------------------------------------
   16. Formulario
   -------------------------------------------------------------------------- */

.formulario { display: flex; flex-direction: column; gap: var(--e-4); }

.campo { display: flex; flex-direction: column; gap: 0.45rem; }
.campo label {
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--tinta);
}
.campo label .opcional { font-weight: 500; color: var(--tinta-3); }

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--linea-fuerte);
  border-radius: var(--r-sm);
  background: var(--nieve);
  font-family: var(--texto);
  font-size: var(--t-base);
  color: var(--tinta);
  transition: border-color 0.3s var(--curva-suave), box-shadow 0.3s var(--curva-suave);
}
.campo textarea { resize: vertical; min-height: 130px; }
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--cobalto);
  box-shadow: 0 0 0 4px var(--cobalto-suave);
}
.campo input::placeholder,
.campo textarea::placeholder { color: var(--tinta-3); }

.campo-doble { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e-4); }

.campo-error {
  font-size: var(--t-xs);
  color: #B4291F;
  font-weight: 600;
  display: none;
}
.campo.invalido input,
.campo.invalido select,
.campo.invalido textarea { border-color: #B4291F; }
.campo.invalido .campo-error { display: block; }

.consentimiento {
  display: flex;
  align-items: flex-start;
  gap: var(--e-3);
  font-size: var(--t-xs);
  color: var(--tinta-2);
  line-height: 1.55;
}
.consentimiento input {
  width: 19px; height: 19px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--cobalto);
}

.miel { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.aviso-formulario {
  display: none;
  padding: var(--e-4) var(--e-5);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  font-weight: 600;
}
.aviso-formulario.error { display: block; background: #FDECEA; color: #8E1F17; border: 1px solid #F4C7C2; }
.aviso-formulario.ok { display: block; background: var(--verde-suave); color: var(--verde); border: 1px solid #B9DED0; }

.btn[aria-busy="true"] { pointer-events: none; opacity: 0.75; }
.btn .cargador {
  width: 1em; height: 1em;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: gira 0.7s linear infinite;
  display: none;
}
.btn[aria-busy="true"] .cargador { display: block; }
.btn[aria-busy="true"] .btn-texto { opacity: 0.7; }
@keyframes gira { to { transform: rotate(360deg); } }

/* Tarjetas de contacto directo */
.contacto-directo { display: flex; flex-direction: column; gap: var(--e-3); }
.via {
  display: flex;
  align-items: center;
  gap: var(--e-4);
  padding: var(--e-4) var(--e-5);
  background: var(--nieve);
  border: 1px solid var(--linea);
  border-radius: var(--r-md);
  transition: transform 0.4s var(--curva), box-shadow 0.4s var(--curva), border-color 0.3s;
}
.via:hover { transform: translateX(6px); box-shadow: var(--s-2); border-color: var(--cobalto); }
.via-icono {
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  flex: none;
  background: var(--cobalto-suave);
  color: var(--cobalto);
}
.via-icono svg { width: 22px; height: 22px; }
.via-wa .via-icono { background: #E4F6EA; color: #1F9D55; }
.via-tel .via-icono { background: var(--ambar-suave); color: var(--ambar); }
.via-cuerpo { display: flex; flex-direction: column; min-width: 0; }
.via-cuerpo strong { font-size: var(--t-base); color: var(--tinta); }
.via-cuerpo span { font-size: var(--t-sm); color: var(--tinta-3); word-break: break-word; }

/* --------------------------------------------------------------------------
   17. Bloque de llamada final
   -------------------------------------------------------------------------- */

.cta-final {
  position: relative;
  background: var(--cobalto-oscuro);
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 2rem + 4vw, 5rem);
  overflow: hidden;
  text-align: center;
  color: var(--nieve);
}
.cta-final::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(229, 163, 61, 0.28), transparent 60%),
    radial-gradient(700px 350px at 85% 100%, rgba(46, 91, 212, 0.5), transparent 62%);
}
.cta-final > * { position: relative; }
.cta-final h2 { color: var(--nieve); margin-bottom: var(--e-4); }
.cta-final p { color: rgba(255,255,255,0.82); max-width: 52ch; margin-inline: auto; margin-bottom: var(--e-6); }

/* --------------------------------------------------------------------------
   18. Pie
   -------------------------------------------------------------------------- */

.pie {
  background: var(--tinta);
  color: rgba(255,255,255,0.72);
  padding-top: var(--e-8);
  padding-bottom: var(--e-5);
  font-size: var(--t-sm);
}
.pie-rejilla {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: var(--e-6);
  padding-bottom: var(--e-7);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.pie .marca { color: var(--nieve); margin-bottom: var(--e-4); }
.pie h4 {
  font-family: var(--texto);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--nieve);
  margin-bottom: var(--e-4);
}
.pie-lista { list-style: none; display: flex; flex-direction: column; gap: var(--e-3); }
.pie-lista a { color: rgba(255,255,255,0.72); transition: color 0.3s var(--curva-suave), padding-left 0.3s var(--curva); }
.pie-lista a:hover { color: var(--ambar-claro); padding-left: 5px; }
.pie-abajo {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--e-4);
  padding-top: var(--e-5);
  font-size: var(--t-xs);
  color: rgba(255,255,255,0.55);
}
.pie-abajo a { color: rgba(255,255,255,0.72); }
.pie-abajo a:hover { color: var(--ambar-claro); }

/* --------------------------------------------------------------------------
   19. Botón flotante de WhatsApp y volver arriba
   -------------------------------------------------------------------------- */

.flotante-wa {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.42);
  z-index: 90;
  transition: transform 0.4s var(--curva), box-shadow 0.4s var(--curva);
}
.flotante-wa svg { width: 29px; height: 29px; }
.flotante-wa:hover { transform: scale(1.09) rotate(5deg); box-shadow: 0 12px 34px rgba(37,211,102,0.55); }

.arriba {
  position: fixed;
  right: 20px;
  bottom: 86px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--nieve);
  border: 1px solid var(--linea);
  color: var(--tinta);
  display: grid;
  place-items: center;
  box-shadow: var(--s-2);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.4s var(--curva), transform 0.4s var(--curva), visibility 0.4s;
}
.arriba.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.arriba:hover { background: var(--cobalto); color: var(--nieve); border-color: var(--cobalto); }
.arriba svg { width: 19px; height: 19px; }

/* --------------------------------------------------------------------------
   20. Animaciones al hacer scroll
   -------------------------------------------------------------------------- */

/* El estado oculto SOLO se aplica cuando hay JavaScript confirmado (clase .js
   en <html>). Sin JS, todo el contenido se ve: nunca una página en blanco. */
.revelar {
  transition: opacity 0.75s var(--curva), transform 0.75s var(--curva);
  will-change: opacity, transform;
}
.js .revelar { opacity: 0; transform: translateY(28px); }
.js .revelar-izq { transform: translateX(-34px); }
.js .revelar-der { transform: translateX(34px); }
.js .revelar-zoom { transform: scale(0.94); }
.js .revelar.visible { opacity: 1; transform: none; }

[data-retraso="1"] { transition-delay: 0.08s; }
[data-retraso="2"] { transition-delay: 0.16s; }
[data-retraso="3"] { transition-delay: 0.24s; }
[data-retraso="4"] { transition-delay: 0.32s; }
[data-retraso="5"] { transition-delay: 0.40s; }
[data-retraso="6"] { transition-delay: 0.48s; }

/* Entrada de página */
body { animation: pagina-entra 0.55s var(--curva-suave); }
@keyframes pagina-entra {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Transiciones entre páginas (navegadores compatibles) */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: 0.32s var(--curva-suave) both fundido-fuera;
}
::view-transition-new(root) {
  animation: 0.42s var(--curva) both fundido-dentro;
}
@keyframes fundido-fuera {
  to { opacity: 0; transform: translateY(-10px); }
}
@keyframes fundido-dentro {
  from { opacity: 0; transform: translateY(16px); }
}

/* Contadores */
.contador { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   21. Cabecera de página interior
   -------------------------------------------------------------------------- */

.cabecera-pagina {
  position: relative;
  padding-block: clamp(3rem, 2rem + 4vw, 5rem);
  background: var(--papel-2);
  border-bottom: 1px solid var(--linea);
  overflow: hidden;
}
.cabecera-pagina::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 400px at 80% 0%, var(--cobalto-suave), transparent 60%);
}
.cabecera-pagina > * { position: relative; }
.cabecera-pagina h1 { font-size: var(--t-2xl); margin-bottom: var(--e-4); }

.migas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-size: var(--t-xs);
  color: var(--tinta-3);
  margin-bottom: var(--e-4);
  list-style: none;
}
.migas a { color: var(--tinta-3); font-weight: 600; }
.migas a:hover { color: var(--cobalto); }
.migas li::after { content: "›"; margin-left: 0.45rem; color: var(--linea-fuerte); }
.migas li:last-child::after { display: none; }
.migas li[aria-current] { color: var(--cobalto); font-weight: 700; }

/* --------------------------------------------------------------------------
   22. Bloques de contenido legal
   -------------------------------------------------------------------------- */

.legal { max-width: 72ch; }
.legal h2 {
  font-size: var(--t-lg);
  margin-top: var(--e-7);
  margin-bottom: var(--e-3);
  padding-bottom: var(--e-2);
  border-bottom: 1px solid var(--linea);
}
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: var(--t-md); margin-top: var(--e-5); margin-bottom: var(--e-2); }
.legal p, .legal li { color: var(--tinta-2); font-size: var(--t-sm); }
.legal ul { padding-left: 1.3rem; margin-bottom: var(--e-4); }
.legal li { margin-bottom: var(--e-2); }
.legal .tabla-datos { width: 100%; border-collapse: collapse; margin-bottom: var(--e-5); font-size: var(--t-sm); }
.legal .tabla-datos th,
.legal .tabla-datos td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--linea); vertical-align: top; }
.legal .tabla-datos th { width: 34%; color: var(--tinta); font-weight: 700; }
.legal .tabla-datos td { color: var(--tinta-2); }

/* --------------------------------------------------------------------------
   23. Página 404
   -------------------------------------------------------------------------- */

.error-404 {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--e-8);
}
.error-cifra {
  font-family: var(--display);
  font-size: clamp(6rem, 4rem + 14vw, 13rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--cobalto), var(--ambar));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--e-4);
}

/* --------------------------------------------------------------------------
   24. Adaptación a pantallas
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .pie-rejilla { grid-template-columns: 1fr 1fr; gap: var(--e-7); }
  .rejilla-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .heroe-rejilla { grid-template-columns: 1fr; gap: var(--e-7); }
  /* En móvil el titular va primero: el visitante debe saber qué es esto
     antes de ver la demostración. */
  .escena { max-width: 520px; margin-inline: auto; width: 100%; }
  .navegador { transform: none; }
  .escena:hover .navegador { transform: scale(1.01); }
  .flotante-1 { left: -2%; }
  .flotante-2 { right: -1%; }
  .rejilla-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-lista { display: none; }
  .nav-acciones .btn { display: none; }
  .hamburguesa { display: flex; }
}

@media (max-width: 700px) {
  :root { --header-h: 66px; }
  .rejilla-2,
  .rejilla-3,
  .rejilla-4 { grid-template-columns: 1fr; }
  .campo-doble { grid-template-columns: 1fr; }
  .heroe-pie { gap: var(--e-4) var(--e-6); }
  .maqueta-tarjetas { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; padding: 0.8rem; }
  .cta-final { border-radius: var(--r-lg); }
  .flotante { font-size: 0.68rem; padding: 0.45rem 0.65rem; }
  .flotante-1 { left: 2%; top: 8%; }
  .flotante-2 { right: 2%; bottom: 10%; }
  .marquesina-pista { gap: var(--e-6); animation-duration: 26s; }
  .proceso::before { left: 22px; }
  .paso { grid-template-columns: 46px 1fr; gap: var(--e-4); }
  .paso-num { width: 46px; height: 46px; font-size: 1rem; }
  .arriba { bottom: 82px; right: 16px; }
  .flotante-wa { right: 16px; bottom: 16px; }
}

@media (max-width: 560px) {
  .pie-rejilla { grid-template-columns: 1fr; gap: var(--e-6); }
  .grupo-btn .btn { width: 100%; }
  .navegador-lienzo { min-height: 280px; }
  .maqueta-titulo { font-size: 1.05rem; }
}

/* --------------------------------------------------------------------------
   25. Respeto por reducción de movimiento
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .revelar { opacity: 1 !important; transform: none !important; }
  .palabra > span { transform: none !important; }
  .pieza { opacity: 1 !important; transform: none !important; }
  .marquesina-pista { animation: none !important; }
  .cursor-demo { display: none !important; }
  .subrayado::after { transform: scaleX(1) !important; }
  .navegador { transform: none !important; }
}

/* --------------------------------------------------------------------------
   26. Impresión
   -------------------------------------------------------------------------- */

@media print {
  .cabecera, .pie, .flotante-wa, .arriba, .progreso, .menu-movil { display: none !important; }
  body { background: #fff; color: #000; }
  .revelar { opacity: 1 !important; transform: none !important; }
}
