/* ==========================================================================
   LEXI LEGAL · Componentes de la web v3 (portada y cabecera común)
   ========================================================================== */
:root { --alto-cab: 104px; }
html { scroll-padding-top: 120px; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }

/* ---------- Barra de aviso + cabecera ---------- */
.aviso-barra {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 36px; padding: 0 16px;
  background: var(--verde-900); color: #E3F0E9; font-size: .84rem; font-weight: 500; text-decoration: none;
  white-space: nowrap; overflow: hidden;
}
.aviso-barra b { padding: 2px 8px; border-radius: 999px; background: var(--verde-300); color: var(--verde-900); font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.aviso-corto { display: none; }
.aviso-barra .ico { flex: 0 0 auto; width: 14px; height: 14px; transition: transform .2s; }
.aviso-barra:hover .ico { transform: translate(2px, -2px); }
.cabecera .contenedor { max-width: 1320px; position: relative; }
.menu-movil { inset: var(--alto-cab) 0 auto 0; max-height: calc(100dvh - var(--alto-cab)); }

/* Cabecera transparente sobre la portada verde noche */
.cabecera.sobre-oscuro:not(.con-fondo) .marca-nombre,
.cabecera.sobre-oscuro:not(.con-fondo) .nav > a,
.cabecera.sobre-oscuro:not(.con-fondo) .nav-boton { color: #F3F8F5; }
.cabecera.sobre-oscuro:not(.con-fondo) .nav > a:hover,
.cabecera.sobre-oscuro:not(.con-fondo) .nav-boton:hover { background: rgba(255, 255, 255, .08); }
.cabecera.sobre-oscuro:not(.con-fondo) .btn-icono { color: #fff; border-color: rgba(255, 255, 255, .25); }
.cabecera.sobre-oscuro:not(.con-fondo) .btn-secundario { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.cabecera.sobre-oscuro:not(.con-fondo) .btn-primario { background: #fff; color: var(--verde-900); box-shadow: none; }
.cabecera.sobre-oscuro:not(.con-fondo) .marca img { box-shadow: none; }

/* ---------- Menús grandes ---------- */
.nav-item { position: static; }
.nav-boton {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 999px; background: none;
  font-size: .9rem; font-weight: 500; color: var(--texto-2); cursor: pointer; transition: color .2s, background-color .2s;
}
.nav-boton:hover, .nav-item.abierto .nav-boton { color: var(--texto); background: var(--velo); }
.nav-boton .ico { width: 14px; height: 14px; transition: transform .25s; }
.nav-item.abierto .nav-boton .ico { transform: rotate(180deg); }
.mega {
  position: absolute; top: calc(100% - 6px); left: 50%; z-index: 60; width: max-content; max-width: 860px;
  background: var(--verde-800); color: #F3F8F5; border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px;
  box-shadow: 0 30px 70px -20px rgba(4, 18, 12, .55); overflow: hidden;
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.mega::before { content: ""; position: absolute; inset: -14px 0 auto; height: 14px; }
.nav-item.abierto .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s, transform .2s; }
.mega-cuerpo { display: grid; gap: 8px; padding: 18px; }
.mega-producto .mega-cuerpo { grid-template-columns: 250px 1fr 1fr; }
.mega-quien .mega-cuerpo { grid-template-columns: 1fr 1fr; min-width: 520px; }
.mega-tit { grid-column: 1 / -1; padding: 2px 8px 6px; font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--verde-300); }
.mega-col { display: grid; align-content: start; gap: 2px; }
.mega-col .mega-tit { padding-left: 12px; }
.mega a.mega-enlace { display: block; padding: 11px 12px; border-radius: 12px; text-decoration: none; transition: background-color .15s; }
.mega a.mega-enlace:hover { background: rgba(255, 255, 255, .07); }
.mega a.mega-enlace b { display: block; font-size: .95rem; font-weight: 600; }
.mega a.mega-enlace span { display: block; margin-top: 2px; font-size: .82rem; color: #A9C4B6; }
.mega-destacado {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 200px; padding: 16px; border-radius: 14px; text-decoration: none; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 10%, #3E8F6B 0%, #1A4A37 55%, #0C251C 100%);
}
.mega-destacado::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 30%, rgba(7, 26, 19, .65)); }
.mega-destacado > * { position: relative; z-index: 1; }
.mega-destacado .chip-nuevo { align-self: flex-start; }
.mega-destacado b { font-size: 1rem; }
.mega-pie { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; background: rgba(255, 255, 255, .05); border-top: 1px solid rgba(255, 255, 255, .06); font-size: .84rem; color: #C8DACF; }
.mega-pie a { flex-shrink: 0; padding: 6px 12px; border-radius: 9px; background: #fff; color: var(--verde-900); font-size: .8rem; font-weight: 600; text-decoration: none; }
.chip-nuevo { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--verde-300); color: var(--verde-900); font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.menu-movil .mm-tit { display: block; padding: 18px 0 6px; font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--acento); }

/* ---------- Portada a pantalla completa ---------- */
.portada {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column;
  min-height: 100svh; padding: calc(var(--alto-cab) + 64px) 0 0; color: #F3F8F5; background: var(--verde-900);
}
.portada-fondo { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
/* Manchas de luz: degradado radial en vez de filter: blur (mismo aspecto, sin recalcular el desenfoque en cada fotograma) */
/* Cada mancha es el círculo original (60vw, 45vw, 38vw) ampliado 120px por lado para que quepa
   el borde difuminado, que imita un blur(60px): opaco hasta --s y se desvanece hasta el borde. */
.portada-fondo i { position: absolute; border-radius: 50%; opacity: .55; will-change: transform;
  background: radial-gradient(closest-side, var(--c) 0%, var(--c) var(--s), color-mix(in srgb, var(--c) 50%, transparent) calc(var(--s) + (100% - var(--s)) * .5), color-mix(in srgb, var(--c) 12%, transparent) calc(var(--s) + (100% - var(--s)) * .8), transparent 100%); }
.portada-fondo i:nth-child(1) { --c: #2E7A5A; --s: 58%; width: calc(60vw + 240px); height: calc(60vw + 240px); left: calc(-18vw - 120px); top: calc(-20vw - 120px); animation: flotar1 18s ease-in-out infinite alternate; }
.portada-fondo i:nth-child(2) { --c: #1A6B4C; --s: 48%; width: calc(45vw + 240px); height: calc(45vw + 240px); right: calc(-12vw - 120px); top: calc(10vh - 120px); animation: flotar2 22s ease-in-out infinite alternate; }
.portada-fondo i:nth-child(3) { --c: #4E9A79; --s: 42%; width: calc(38vw + 240px); height: calc(38vw + 240px); left: calc(30vw - 120px); bottom: calc(-22vw - 120px); opacity: .35; animation: flotar1 26s ease-in-out infinite alternate-reverse; }
@keyframes flotar1 { to { transform: translate(8vw, 6vh) scale(1.12); } }
@keyframes flotar2 { to { transform: translate(-6vw, 10vh) scale(.9); } }
.portada::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image: linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 0%, transparent 78%); mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 0%, transparent 78%);
}
.portada::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.portada-texto { position: relative; z-index: 2; text-align: center; will-change: transform, opacity; }
.portada h1 { margin: 0 auto 22px; max-width: 980px; font-family: var(--serif); font-weight: 400; font-size: clamp(2.9rem, 5.6vw + .6rem, 5.6rem); line-height: 1.02; letter-spacing: -0.015em; text-wrap: balance; }
.portada h1 .h1-marca { color: var(--verde-300); }
.portada h1 em { font-style: italic; color: var(--verde-200); }
.portada .entradilla { margin: 0 auto; max-width: 660px; color: #C8DACF; font-size: 1.18rem; }
.portada .acciones { justify-content: center; }
.portada .btn-primario { background: #fff; color: var(--verde-900); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
.portada .btn-primario:hover { background: var(--verde-100); }
.portada .btn-secundario { background: rgba(255, 255, 255, .09); color: #fff; border-color: rgba(255, 255, 255, .22); }
.portada .btn-secundario:hover { border-color: rgba(255, 255, 255, .5); }
.btn-play { width: 26px; height: 26px; margin-left: -8px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--verde-900); }
.btn-play .ico { width: 11px; height: 11px; margin-left: 2px; }

/* Tarjetas que flotan en la portada */
.flotantes { position: relative; z-index: 1; flex: 1; min-height: 360px; margin-top: 40px; pointer-events: none; }
.flota {
  position: absolute; left: 50%; top: 50%; will-change: transform;
  background: rgba(255, 255, 255, .96); color: #0B1410; border-radius: 16px; padding: 12px 14px; font-size: .78rem; line-height: 1.4;
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .4);
  animation: aparecer-flota .9s cubic-bezier(.2, .8, .2, 1) both;
}
.flota small { display: block; font-size: .66rem; color: #6B7670; }
.flota b { font-weight: 700; }
.flota .fila-f { display: flex; align-items: center; gap: 8px; }
.flota .pt { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; }
.flota .ico-c { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--verde-100); color: var(--verde-700); flex-shrink: 0; }
.flota .ico-c .ico { width: 16px; height: 16px; }
.flota.f-wa { background: #1C1F1E; color: #F3F8F5; border-radius: 16px 16px 16px 4px; box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08); }
.flota.f-wa small { color: #93AC9F; }
.flota.f-cli { background: #fff; border-radius: 16px 16px 4px 16px; }
@keyframes aparecer-flota { from { opacity: 0; } to { opacity: 1; } }
.flota:nth-child(1) { animation-delay: .35s; } .flota:nth-child(2) { animation-delay: .5s; } .flota:nth-child(3) { animation-delay: .65s; }
.flota:nth-child(4) { animation-delay: .8s; } .flota:nth-child(5) { animation-delay: .95s; } .flota:nth-child(6) { animation-delay: 1.1s; }
.portada-panel {
  position: absolute; left: 50%; top: 18%; width: min(760px, 86vw); transform: translateX(-50%);
  border-radius: 20px 20px 0 0; overflow: hidden; background: #FBFCFB; color: #0B1410; will-change: transform;
  box-shadow: 0 -20px 80px -20px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .18);
}
.pp-barra { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #F1F5F2; border-bottom: 1px solid #E1E7E3; font-size: .7rem; color: #6B7670; }
.pp-barra i { width: 9px; height: 9px; border-radius: 50%; background: #D5DED8; }
.pp-barra span { margin-left: 8px; }
.pp-cuerpo { display: grid; grid-template-columns: 150px 1fr; min-height: 300px; }
.pp-lat { padding: 14px 10px; background: #F1F5F2; border-right: 1px solid #E1E7E3; display: grid; align-content: start; gap: 4px; font-size: .74rem; color: #4B5650; }
.pp-lat span { padding: 7px 9px; border-radius: 8px; }
.pp-lat span.on { background: #fff; color: #0B1410; font-weight: 600; box-shadow: 0 0 0 1px #E1E7E3; }
.pp-main { padding: 18px 20px; }
.pp-saludo { display: block; }
.pp-main h3, .pp-main .pp-saludo { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; }
.pp-main p { font-size: .72rem; color: #6B7670; margin-bottom: 12px; }
.pp-fila { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid #E1E7E3; border-radius: 10px; margin-bottom: 6px; font-size: .74rem; background: #fff; }
.pp-fila b { font-weight: 600; }
.pp-fila small { color: #6B7670; }
.pp-fila .est { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid #E1E7E3; border-radius: 7px; font-size: .68rem; }
.pp-fila .est i { width: 6px; height: 6px; border-radius: 50%; background: #16a34a; }
.pp-fila .est i.am { background: #d97706; }
.pp-fila.nueva { animation: fila-entra 1s 1.4s cubic-bezier(.2, .8, .2, 1) both; border-color: var(--verde-300); box-shadow: 0 0 0 3px var(--verde-100); }
@keyframes fila-entra { from { opacity: 0; transform: translateY(-10px); } }

/* Cinta continua */
.cinta-zona { position: relative; z-index: 3; margin-top: -40px; padding: 70px 0 30px; text-align: center; background: linear-gradient(to bottom, rgba(7, 26, 19, 0) 0, var(--verde-950) 60px); }
.cinta-zona p { margin-bottom: 14px; font-size: .84rem; color: #A9C4B6; }
.cinta { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); }
.cinta-pista { display: flex; width: max-content; gap: 56px; animation: cinta 34s linear infinite; }
.cinta:hover .cinta-pista { animation-play-state: paused; }
.cinta-pista span { display: inline-flex; align-items: center; gap: 10px; font-size: 1.02rem; font-weight: 600; color: #E3F0E9; white-space: nowrap; opacity: .85; }
.cinta-pista .ico { width: 18px; height: 18px; color: var(--verde-300); }
@keyframes cinta { to { transform: translateX(-50%); } }

/* ---------- Funciones con maquetas animadas ---------- */
.funciones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.func { display: flex; flex-direction: column; padding: 10px 10px 26px; border-radius: 24px; transition: background-color .3s, transform .3s; }
.func:hover { background: var(--fondo-2); }
.func-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 12px 4px; padding: 6px 12px; border-radius: 10px; background: var(--acento-suave); color: var(--acento); font-size: .84rem; font-weight: 600; }
.func-chip .ico { width: 15px; height: 15px; }
.func-chip + .chip-nuevo { margin-left: 6px; }
.func-cab { display: flex; align-items: center; }
.func-visual { position: relative; height: 250px; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, var(--verde-50), var(--verde-100)); border: 1px solid var(--borde); }
html[data-tema="dark"] .func-visual { background: linear-gradient(160deg, #10241B, #14301F); }
.func h3 { margin: 22px 8px 8px; font-size: 1.24rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.func p { margin: 0 8px; color: var(--texto-2); font-size: .97rem; }

/* Maqueta 1: WhatsApp a las 23:42 */
.m-chat { position: absolute; inset: 22px 26px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.m-burbuja { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: .76rem; line-height: 1.4; box-shadow: 0 6px 16px -8px rgba(12, 37, 28, .35); opacity: 0; transform: translateY(10px); }
.m-burbuja.c { align-self: flex-end; background: #fff; color: #0B1410; border-bottom-right-radius: 4px; }
.m-burbuja.b { align-self: flex-start; background: var(--verde-700); color: #fff; border-bottom-left-radius: 4px; }
.m-burbuja small { display: block; text-align: right; font-size: .58rem; opacity: .6; }
.m-hora { align-self: center; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .8); color: #4B5650; font-size: .64rem; font-family: var(--mono); opacity: 0; }
.en-vista .m-hora { animation: subir .5s .1s both; }
.en-vista .m-burbuja:nth-of-type(2) { animation: subir .5s .5s both; }
.en-vista .m-burbuja:nth-of-type(3) { animation: subir .5s 1.3s both; }
.en-vista .m-burbuja:nth-of-type(4) { animation: subir .5s 2.1s both; }
@keyframes subir { to { opacity: 1; transform: none; } }

/* Maqueta 2: documentos que entran en la carpeta */
.m-carpeta { position: absolute; left: 50%; top: 54%; width: 230px; transform: translate(-50%, -50%); }
.m-carpeta-tapa { height: 26px; width: 90px; border-radius: 10px 10px 0 0; background: var(--verde-300); }
.m-carpeta-cuerpo { position: relative; z-index: 2; padding: 14px; border-radius: 0 14px 14px 14px; background: #fff; color: #0B1410; box-shadow: 0 20px 40px -18px rgba(12, 37, 28, .45); }
.m-carpeta-cuerpo small { display: block; font-size: .6rem; color: #6B7670; }
.m-carpeta-cuerpo b { font-size: .86rem; }
.m-barra { height: 4px; margin: 10px 0 6px; border-radius: 99px; background: #E1E7E3; overflow: hidden; }
.m-barra i { display: block; height: 100%; width: 0; background: var(--verde-600); border-radius: 99px; }
.en-vista .m-barra i { animation: llenar 2.4s .9s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes llenar { to { width: 100%; } }
.m-estado { position: relative; height: 14px; font-size: .62rem; color: #6B7670; }
.m-estado span { position: absolute; inset: 0; }
.m-estado .fin { opacity: 0; color: var(--verde-600); font-weight: 600; }
.en-vista .m-estado .ini { animation: fuera .2s 3.3s both; }
.en-vista .m-estado .fin { animation: dentro .3s 3.4s both; }
@keyframes fuera { to { opacity: 0; } }
@keyframes dentro { to { opacity: 1; } }
.m-datos { display: flex; gap: 6px; margin-top: 8px; }
.m-datos span { flex: 1; padding: 5px 7px; border-radius: 7px; background: var(--verde-50); font-size: .58rem; color: #4B5650; opacity: 0; transform: translateY(6px); }
.m-datos span b { display: block; font-size: .64rem; color: #0B1410; }
.en-vista .m-datos span:nth-child(1) { animation: subir .4s 3.5s both; }
.en-vista .m-datos span:nth-child(2) { animation: subir .4s 3.7s both; }
.m-hoja { position: absolute; z-index: 1; width: 54px; height: 64px; padding: 8px 6px; border-radius: 8px; background: #fff; color: #4B5650; font-size: .5rem; text-align: center; box-shadow: 0 10px 22px -10px rgba(12, 37, 28, .45); }
.m-hoja .ico { width: 16px; height: 16px; margin: 4px auto 6px; color: var(--verde-600); }
.m-hoja.h1 { left: 6%; top: 18%; transform: rotate(-10deg); }
.m-hoja.h2 { right: 6%; top: 14%; transform: rotate(8deg); }
.m-hoja.h3 { right: 10%; bottom: 8%; transform: rotate(-6deg); }
.en-vista .m-hoja.h1 { animation: a-carpeta 1s .2s cubic-bezier(.6, 0, .4, 1) both; }
.en-vista .m-hoja.h2 { animation: a-carpeta 1s .5s cubic-bezier(.6, 0, .4, 1) both; }
.en-vista .m-hoja.h3 { animation: a-carpeta 1s .8s cubic-bezier(.6, 0, .4, 1) both; }
@keyframes a-carpeta { 60% { opacity: 1; } to { left: calc(50% - 27px); right: auto; top: 46%; bottom: auto; transform: scale(.4) rotate(0); opacity: 0; } }

/* Maqueta 3: búsqueda en el BOE */
.m-busca { position: absolute; left: 22px; right: 22px; top: 34px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff; color: #0B1410; box-shadow: 0 14px 30px -14px rgba(12, 37, 28, .4); font-size: .76rem; }
.m-busca .ico { width: 15px; height: 15px; color: var(--verde-600); flex-shrink: 0; }
.m-escrito { display: inline-block; overflow: hidden; white-space: nowrap; width: 0; border-right: 1.5px solid var(--verde-600); }
.en-vista .m-escrito { animation: escribir 1.8s .3s steps(36) both, cursor .8s steps(1) infinite; }
@keyframes escribir { to { width: 100%; } }
@keyframes cursor { 50% { border-color: transparent; } }
.m-resultado { position: absolute; left: 22px; right: 22px; top: 98px; padding: 12px 14px; border-radius: 14px; background: #fff; color: #0B1410; box-shadow: 0 14px 30px -14px rgba(12, 37, 28, .4); font-size: .72rem; line-height: 1.5; opacity: 0; transform: translateY(10px); }
.m-resultado .cit { display: inline-grid; place-items: center; min-width: 16px; height: 15px; padding: 0 4px; border-radius: 4px; background: var(--verde-700); color: #fff; font-size: .55rem; font-weight: 700; vertical-align: 1px; }
.m-fuente { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #E1E7E3; font-size: .64rem; color: #4B5650; }
.m-fuente b { color: #0B1410; }
.m-fuente span:last-child { margin-left: auto; padding: 2px 7px; border-radius: 6px; background: var(--verde-50); color: var(--verde-700); font-weight: 600; }
.en-vista .m-resultado { animation: subir .5s 2.3s both; }

/* ---------- Relato fijo al hacer scroll ---------- */
.relato { padding-top: 40px; }
.relato-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 72px; margin-top: 40px; }
.relato-escena { position: sticky; top: calc(var(--alto-cab) + 40px); height: min(620px, calc(100vh - var(--alto-cab) - 80px)); border-radius: 30px; overflow: hidden; }
.relato-escena .oscuro-escena { position: absolute; inset: 0; background: radial-gradient(120% 90% at 30% 0%, #1F5A43 0%, #0C251C 60%); }
.relato-escena .oscuro-escena::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 20px 20px; }
.escena { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .6s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.escena.activa { opacity: 1; transform: none; }
.relato-progreso { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.relato-progreso i { height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.relato-progreso i b { display: block; height: 100%; width: 100%; background: var(--verde-300); transform-origin: left center; transform: scaleX(0); transition: transform .2s linear; }
.relato-pasos { padding: 8vh 0 6vh; }
.relato-paso { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .4s; }
.relato-paso.activo { opacity: 1; }
.relato-paso .paso-num { font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; color: var(--acento); }
.relato-paso h3 { margin: 12px 0 12px; font-size: clamp(1.6rem, 1.6vw + 1rem, 2.3rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.03em; }
.relato-paso p { color: var(--texto-2); font-size: 1.05rem; max-width: 460px; }
.relato-paso .puntos { margin-top: 18px; }
/* Escenas */
.esc-tel { width: 260px; height: 430px; border-radius: 36px; padding: 9px; background: linear-gradient(160deg, #3a3f3c, #121514 40%, #202422); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .6); }
.esc-tel .pantalla { border-radius: 28px; }
.esc-tel .chat { justify-content: flex-start; padding-top: 14px; }
.esc-tel .burbuja { font-size: .72rem; }
.esc-expediente { width: min(400px, 100%); }
.esc-expediente .exp { box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .55); }
.esc-cita { width: min(360px, 100%); }
.esc-panel { width: 100%; max-width: 470px; display: grid; gap: 12px; }
.esc-panel .pp-fila { margin: 0; padding: 12px 14px; font-size: .8rem; box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .5); }
.esc-borrador { padding: 16px 18px; border-radius: 14px; background: #fff; color: #0B1410; font-size: .76rem; line-height: 1.55; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.esc-borrador small { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--verde-600); font-weight: 700; font-size: .66rem; letter-spacing: .04em; text-transform: uppercase; }
.esc-borrador small .ico { width: 13px; height: 13px; }
.esc-borrador mark { background: var(--verde-100); color: var(--verde-700); padding: 0 3px; border-radius: 3px; }

/* ---------- Carrusel «Para ti» ---------- */
.carrusel-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.carrusel-flechas { display: flex; gap: 8px; flex-shrink: 0; }
.carrusel-flechas button { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--tinta); color: var(--tinta-texto); display: grid; place-items: center; cursor: pointer; transition: opacity .2s, background-color .2s; }
.carrusel-flechas button:hover { background: var(--tinta-hover); }
.carrusel-flechas button:disabled { opacity: .3; cursor: default; }
.carrusel-flechas .ico { width: 18px; height: 18px; }
.carrusel { display: flex; gap: 18px; margin-top: 40px; padding: 0 max(24px, calc((100vw - var(--ancho)) / 2 + 24px)) 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 max(24px, calc((100vw - var(--ancho)) / 2 + 24px)); scrollbar-width: none; cursor: grab; }
.carrusel::-webkit-scrollbar { display: none; }
.carrusel.arrastrando { cursor: grabbing; scroll-snap-type: none; }
.carrusel.arrastrando a { pointer-events: none; }
.perfil {
  position: relative; flex: 0 0 min(560px, 82vw); height: 420px; scroll-snap-align: start; overflow: hidden; isolation: isolate;
  border-radius: 24px; color: #fff; text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px;
}
.perfil-fondo { position: absolute; inset: 0; z-index: -1; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.perfil:hover .perfil-fondo { transform: scale(1.04); }
.perfil-fondo.g1 { background: radial-gradient(90% 80% at 80% 10%, #4E9A79 0%, #1A4A37 55%, #0C251C 100%); }
.perfil-fondo.g2 { background: radial-gradient(90% 80% at 15% 10%, #3E8F6B 0%, #164030 50%, #071A13 100%); }
.perfil-fondo.g3 { background: radial-gradient(90% 90% at 70% 90%, #5DA684 0%, #1F5A43 50%, #0C251C 100%); }
.perfil-fondo.g4 { background: radial-gradient(80% 90% at 30% 80%, #86BEA3 0%, #2E7A5A 40%, #0C251C 100%); }
.perfil-fondo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 35%, rgba(7, 26, 19, .7)); }
.perfil-maqueta { position: absolute; top: 28px; left: 28px; right: 28px; display: grid; gap: 8px; }
.perfil-maqueta .pp-fila { margin: 0; background: rgba(255, 255, 255, .95); color: #0B1410; border: 0; box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .5); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.perfil:hover .perfil-maqueta .pp-fila:nth-child(1) { transform: translateX(6px); }
.perfil:hover .perfil-maqueta .pp-fila:nth-child(2) { transform: translateX(14px); }
.perfil:hover .perfil-maqueta .pp-fila:nth-child(3) { transform: translateX(22px); }
.perfil h3 { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.perfil h3 .ico { width: 20px; height: 20px; transition: transform .25s; }
.perfil:hover h3 .ico { transform: translateX(5px); }
.perfil p { margin-top: 6px; max-width: 420px; color: #D5E5DC; font-size: .97rem; }

/* ---------- Cifras ---------- */
.cifras-grandes { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px; }
.cifra-g { padding: 8px 32px; border-left: 1px solid var(--borde-2); }
.cifra-g:first-child { border-left: 0; }
.cifra-g b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(3.2rem, 4vw + 1rem, 5rem); line-height: 1; letter-spacing: -0.02em; color: var(--tinta); font-variant-numeric: tabular-nums; }
.cifra-g span { display: block; margin-top: 14px; color: var(--texto-2); font-size: 1.02rem; line-height: 1.45; }

/* ---------- Fundador ---------- */
.fundador { display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: center; padding: 48px; border-radius: 30px; background: var(--fondo-2); border: 1px solid var(--borde); }
.fundador blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.7rem, 1.6vw + 1rem, 2.5rem); line-height: 1.2; letter-spacing: -0.01em; }
.fundador figcaption { margin-top: 22px; font-size: .92rem; color: var(--texto-2); }
.fundador figcaption b { display: block; color: var(--texto); }
.fundador-tarjeta { display: grid; gap: 10px; padding: 26px; border-radius: 22px; background: var(--verde-800); color: #F3F8F5; }
.fundador-tarjeta small { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--verde-300); }
.fundador-tarjeta b { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; }
.fundador-tarjeta p { font-size: .92rem; color: #C8DACF; }
.fundador-tarjeta .btn { margin-top: 6px; background: #fff; color: var(--verde-900); }

/* ---------- Caja de demo con formulario por pasos ---------- */
.demo-caja { display: grid; grid-template-columns: .95fr 1.05fr; gap: 32px; padding: 32px; border-radius: 30px; background: var(--verde-50); border: 1px solid var(--borde); }
html[data-tema="dark"] .demo-caja { background: var(--fondo-2); }
.demo-info { padding: 16px 8px 8px 16px; display: flex; flex-direction: column; }
.demo-info .titulo { font-size: clamp(1.8rem, 1.6vw + 1.1rem, 2.5rem); }
.demo-info hr { width: 100%; margin: 26px 0; border: 0; border-top: 1px solid var(--borde-2); }
.demo-desde { font-size: .95rem; color: var(--texto-2); }
.demo-precio { font-family: var(--serif); font-size: clamp(3rem, 3vw + 1.5rem, 4.2rem); line-height: 1; color: var(--tinta); margin: 6px 0 22px; }
.demo-precio small { font-size: .45em; }
.demo-lista { list-style: none; padding: 0; display: grid; gap: 12px; }
.demo-lista li { display: flex; align-items: center; gap: 12px; font-size: 1rem; }
.demo-lista li span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--tinta); color: var(--tinta-texto); flex-shrink: 0; }
.demo-lista .ico { width: 11px; height: 11px; stroke-width: 3; }
.demo-nota { margin-top: auto; padding-top: 22px; font-size: .8rem; color: var(--texto-3); }
.demo-form { box-shadow: var(--sombra-1); align-content: start; }
.pasos-form { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--texto-3); }
.pasos-form .barra { flex: 1; height: 5px; border-radius: 99px; background: var(--borde); overflow: hidden; }
.pasos-form .barra i { display: block; height: 100%; width: 50%; border-radius: 99px; background: var(--tinta); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.paso-form[hidden] { display: none !important; }
.paso-form { display: grid; gap: 16px; animation: burbuja .35s ease both; }
.botones-form { display: flex; gap: 10px; }
.botones-form .btn { flex: 1; }
.campo select { width: 100%; padding: 13px 15px; border-radius: 13px; background: var(--fondo); border: 1px solid var(--borde); color: var(--texto); font: inherit; font-size: .96rem; font-weight: 400; }

/* ---------- Diálogo de vídeo ---------- */
.dialogo-video { width: min(980px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 20px; background: #000; overflow: hidden; box-shadow: 0 40px 100px rgba(0, 0, 0, .6); }
.dialogo-video::backdrop { background: rgba(4, 14, 10, .75); backdrop-filter: blur(6px); }
.dialogo-video video { display: block; width: 100%; height: auto; }
.dialogo-video form { position: absolute; top: 12px; right: 12px; }
.dialogo-video button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #000; display: grid; place-items: center; cursor: pointer; }

/* ---------- Pie verde con mapa ---------- */
.pie.pie-verde { padding-top: 0; background: var(--verde-900); color: #F3F8F5; }
.pie-verde .pie-mapa-zona { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 64px 0 48px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.pie-verde .pie-mapa-texto h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 2vw + 1.2rem, 3rem); line-height: 1.08; margin-bottom: 14px; }
.pie-verde .pie-mapa-texto p { color: #B9CCC2; max-width: 440px; }
.pie-verde .pie-mapa-texto .acciones { margin-top: 26px; }
.pie-verde .pie-mapa-texto .btn-primario { background: #fff; color: var(--verde-900); box-shadow: none; }
.pie-verde .pie-mapa-texto .btn-secundario { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }
.mapa-puntos { width: 100%; height: auto; display: block; }
.mapa-puntos circle { fill: rgba(255, 255, 255, .22); }
.mapa-puntos circle.mad { fill: var(--verde-300); }
.mapa-puntos circle.pulso-mapa { fill: none; stroke: var(--verde-300); stroke-width: 1.5; animation: pulso-mapa 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulso-mapa { from { transform: scale(1); opacity: 1; } to { transform: scale(4); opacity: 0; } }
.pie-verde .pie-grid { padding-top: 52px; grid-template-columns: 1.4fr repeat(4, 1fr); }
.pie-verde .pie-desc, .pie-verde ul a, .pie-verde ul button { color: #B9CCC2; }
.pie-verde ul a:hover, .pie-verde ul button:hover { color: #fff; }
.pie-verde .pie-tit { color: var(--verde-300); }
.pie-verde .marca-nombre { color: #fff; }
.pie-verde .pie-final { border-color: rgba(255, 255, 255, .08); color: #93AC9F; }
.pie-sellos li { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: #B9CCC2; }
.pie-sellos .ico { width: 15px; height: 15px; color: var(--verde-300); }

/* ---------- Aparición escalonada genérica ---------- */
.js .sube { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .sube.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .portada-fondo i, .cinta-pista { animation: none !important; }
  .m-burbuja, .m-hora, .m-datos span, .m-resultado { opacity: 1 !important; transform: none !important; }
  .m-escrito { width: 100% !important; }
  .m-hoja { display: none; }
  .m-estado .ini { opacity: 0; } .m-estado .fin { opacity: 1; }
  .m-barra i { width: 100%; }
  .escena { transition: none; }
}

/* ---------- Adaptación ---------- */
@media (max-width: 1200px) {
  .pie-verde .pie-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 1020px) {
  .funciones { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .relato-grid { grid-template-columns: 1fr; gap: 0; }
  .relato-escena { top: calc(var(--alto-cab) + 12px); height: 46vh; z-index: 2; border-radius: 24px; }
  .relato-pasos { padding: 4vh 0 10vh; }
  .relato-paso { min-height: 55vh; }
  .cifras-grandes { grid-template-columns: 1fr 1fr; gap: 32px 0; }
  .cifra-g:nth-child(3) { border-left: 0; }
  .fundador, .demo-caja { grid-template-columns: 1fr; }
  .pie-verde .pie-mapa-zona { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --alto-cab: 100px; }
  .aviso-barra { font-size: .74rem; height: 32px; }
  .aviso-barra b { display: none; }
  .aviso-largo { display: none; }
  .aviso-corto { display: inline; }
  .portada { padding-top: calc(var(--alto-cab) + 40px); }
  .portada .entradilla { font-size: 1.04rem; }
  .flotantes { min-height: 300px; }
  .flota.solo-ancho { display: none; }
  .portada-panel { width: 94vw; top: 26%; }
  .pp-cuerpo { grid-template-columns: 1fr; }
  .pp-lat { display: none; }
  .relato-escena { height: 42vh; }
  .esc-tel { transform: scale(.72); }
  .perfil { height: 380px; padding: 22px; }
  .cifra-g { padding: 6px 18px; }
  .fundador, .demo-caja { padding: 22px; }
  .pie-verde .pie-grid { grid-template-columns: 1fr 1fr; }
}

/* Ajustes: los enlaces de los menús grandes no heredan el estilo de la barra */
.nav .mega a { padding: 0; border-radius: 0; color: #F3F8F5; white-space: normal; background: none; font-weight: inherit; }
.nav .mega a.mega-enlace { padding: 11px 12px; border-radius: 12px; }
.nav .mega a.mega-enlace:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav .mega a.mega-destacado { padding: 16px; border-radius: 14px; }
.nav .mega .mega-pie a { padding: 6px 12px; border-radius: 9px; background: #fff; color: var(--verde-900); font-weight: 600; }
.mega-destacado { background: radial-gradient(130% 100% at 15% 0%, #4E9A79 0%, #22604A 45%, #164030 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.pp-fila { color: #0B1410; }
@media (max-width: 640px) { .esc-expediente, .esc-cita, .esc-panel { transform: scale(.82); } }
/* ==========================================================================
   Animación de las hojas que entran en la carpeta (bucle de 10 s)
   Las hojas aparecen sueltas, vuelan dentro de la carpeta por detrás de la
   ficha, se llena la barra, salen los datos y el botón se pulsa solo.
   Solo se mueve mientras la tarjeta está a la vista (.en-vista).
   ========================================================================== */
.ho { position: absolute; inset: 0; --dur: 10s; }
.ho-carpeta { position: absolute; left: 50%; top: 58px; width: 250px; transform: translateX(-50%); }
.ho-trasera { position: absolute; left: 0; right: 0; top: 0; height: 96px; border-radius: 14px; background: var(--verde-200); }
.ho-trasera::before { content: ""; position: absolute; left: 0; top: -14px; width: 86px; height: 22px; border-radius: 10px 10px 0 0; background: var(--verde-200); }
.ho-hoja {
  position: absolute; left: calc(50% + var(--x) - 25px); top: -16px; z-index: 30; width: 50px; height: 60px; padding-top: 7px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; border-radius: 8px; background: #fff; color: #4B5650;
  font-size: .5rem; font-weight: 600; box-shadow: 0 8px 18px -8px rgba(12, 37, 28, .45); opacity: 0;
}
.ho-hoja i { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--verde-50); color: var(--verde-600); }
.ho-hoja i .ico { width: 11px; height: 11px; }
.ho-hoja.hj1 { --dx: -50px; --dy: -36px; --r0: -14deg; --r1: -6deg; animation: hoja1 var(--dur) infinite, hoja1z var(--dur) infinite step-end; }
.ho-hoja.hj2 { --dx: 120px; --dy: -34px; --r0: 10deg; --r1: -2deg; animation: hoja2 var(--dur) infinite, hoja2z var(--dur) infinite step-end; }
.ho-hoja.hj3 { --dx: -178px; --dy: 46px; --r0: 8deg; --r1: 3deg; animation: hoja3 var(--dur) infinite, hoja3z var(--dur) infinite step-end; }
.ho-hoja.hj4 { --dx: 50px; --dy: 58px; --r0: -10deg; --r1: 6deg; animation: hoja4 var(--dur) infinite, hoja4z var(--dur) infinite step-end; }
@keyframes hoja1 {
  0%, 2% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r0)) scale(.6); }
  6%, 26% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--r0)) scale(1); }
  36% { transform: translate(0, -64px) rotate(var(--r1)) scale(.95); }
  42%, 90% { opacity: 1; transform: translate(0, 0) rotate(var(--r1)) scale(.95); }
  97%, 100% { opacity: 0; transform: translate(0, 0) rotate(var(--r1)) scale(.95); }
}
@keyframes hoja1z {
  0%, 2% { z-index: 30; }
  6%, 26% { z-index: 30; }
  36% { z-index: 30; }
  36.5% { z-index: 5; }
  42%, 90% { z-index: 5; }
  97%, 100% { z-index: 5; }
}
@keyframes hoja2 {
  0%, 5% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r0)) scale(.6); }
  9%, 31% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--r0)) scale(1); }
  41% { transform: translate(0, -64px) rotate(var(--r1)) scale(.95); }
  47%, 90% { opacity: 1; transform: translate(0, 0) rotate(var(--r1)) scale(.95); }
  97%, 100% { opacity: 0; transform: translate(0, 0) rotate(var(--r1)) scale(.95); }
}
@keyframes hoja2z {
  0%, 5% { z-index: 30; }
  9%, 31% { z-index: 30; }
  41% { z-index: 30; }
  41.5% { z-index: 5; }
  47%, 90% { z-index: 5; }
  97%, 100% { z-index: 5; }
}
@keyframes hoja3 {
  0%, 8% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r0)) scale(.6); }
  12%, 36% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--r0)) scale(1); }
  46% { transform: translate(0, -64px) rotate(var(--r1)) scale(.95); }
  52%, 90% { opacity: 1; transform: translate(0, 0) rotate(var(--r1)) scale(.95); }
  97%, 100% { opacity: 0; transform: translate(0, 0) rotate(var(--r1)) scale(.95); }
}
@keyframes hoja3z {
  0%, 8% { z-index: 30; }
  12%, 36% { z-index: 30; }
  46% { z-index: 30; }
  46.5% { z-index: 5; }
  52%, 90% { z-index: 5; }
  97%, 100% { z-index: 5; }
}
@keyframes hoja4 {
  0%, 11% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r0)) scale(.6); }
  15%, 41% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--r0)) scale(1); }
  51% { transform: translate(0, -64px) rotate(var(--r1)) scale(.95); }
  57%, 90% { opacity: 1; transform: translate(0, 0) rotate(var(--r1)) scale(.95); }
  97%, 100% { opacity: 0; transform: translate(0, 0) rotate(var(--r1)) scale(.95); }
}
@keyframes hoja4z {
  0%, 11% { z-index: 30; }
  15%, 41% { z-index: 30; }
  51% { z-index: 30; }
  51.5% { z-index: 5; }
  57%, 90% { z-index: 5; }
  97%, 100% { z-index: 5; }
}
.ho-frente {
  position: relative; z-index: 10; margin-top: 26px; padding: 13px 14px 12px; border-radius: 14px; background: #fff; color: #0B1410;
  box-shadow: 0 16px 34px -14px rgba(12, 37, 28, .45); animation: ho-rebote var(--dur) infinite;
}
@keyframes ho-rebote {
  0%, 40% { transform: translateY(0); } 42% { transform: translateY(3px); } 44%, 45% { transform: translateY(0); }
  47% { transform: translateY(3px); } 49%, 50% { transform: translateY(0); } 52% { transform: translateY(3px); }
  54%, 55% { transform: translateY(0); } 57% { transform: translateY(3px); } 59%, 100% { transform: translateY(0); }
}
.ho-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ho-cab small { display: block; font-size: .56rem; color: #6B7670; }
.ho-cab b { display: block; font-size: .8rem; font-weight: 600; color: var(--verde-700); line-height: 1.25; }
.ho-boton-ia { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--verde-700); color: #fff; box-shadow: 0 0 0 3px var(--verde-100); }
.ho-boton-ia .ico { width: 12px; height: 12px; }
.ho-estado { position: relative; height: 14px; margin-top: 12px; font-size: .58rem; color: #6B7670; }
.ho-estado span { position: absolute; inset: 0; white-space: nowrap; }
.ho-t1 { animation: ho-t1 var(--dur) infinite; }
.ho-t2 { opacity: 0; color: var(--verde-600); font-weight: 600; animation: ho-t2 var(--dur) infinite; }
@keyframes ho-t1 { 0%, 57% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes ho-t2 { 0%, 57% { opacity: 0; } 60%, 90% { opacity: 1; } 97%, 100% { opacity: 0; } }
.ho-barra { height: 4px; margin-top: 4px; border-radius: 99px; background: #E1E7E3; overflow: hidden; }
.ho-barra i { display: block; height: 100%; width: 100%; border-radius: 99px; background: var(--verde-600); transform-origin: left center; transform: scaleX(.04); animation: ho-barra var(--dur) infinite; }
@keyframes ho-barra { 0%, 16% { transform: scaleX(.04); } 58%, 100% { transform: scaleX(1); } }
.ho-datos { position: absolute; left: 0; right: 0; top: calc(100% + 8px); display: flex; gap: 6px; }
.ho-datos span { flex: 1; padding: 6px 9px; border-radius: 9px; background: rgba(255, 255, 255, .85); font-size: .58rem; color: #0B1410; box-shadow: 0 8px 18px -12px rgba(12, 37, 28, .5); opacity: 0; }
.ho-datos b { display: block; font-size: .52rem; font-weight: 500; color: #6B7670; }
.ho-r1 { animation: ho-r1 var(--dur) infinite; }
.ho-r2 { animation: ho-r2 var(--dur) infinite; }
@keyframes ho-r1 { 0%, 60% { opacity: 0; transform: translateY(-16px) scale(.9); } 64%, 77% { opacity: 1; transform: none; } 80%, 100% { opacity: 0; transform: scale(.94); } }
@keyframes ho-r2 { 0%, 65% { opacity: 0; transform: translateY(-16px) scale(.9); } 69%, 77% { opacity: 1; transform: none; } 80%, 100% { opacity: 0; transform: scale(.94); } }
.ho-listo {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 6px 6px 10px; border-radius: 11px; background: #fff; color: #0B1410; font-size: .58rem; font-weight: 600;
  box-shadow: 0 10px 22px -12px rgba(12, 37, 28, .5); opacity: 0; animation: ho-listo var(--dur) infinite;
}
.ho-listo > span { display: flex; align-items: center; gap: 5px; }
.ho-listo .ico { width: 11px; height: 11px; color: var(--verde-600); }
@keyframes ho-listo { 0%, 79% { opacity: 0; transform: scale(.9); } 83%, 91% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
.ho-btn { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 8px; background: var(--verde-700); color: #fff; font-style: normal; animation: ho-btn var(--dur) infinite, ho-btnc var(--dur) infinite; }
.ho-btn .ico { color: #fff; }
@keyframes ho-btn { 0%, 86% { transform: scale(1); } 87.5% { transform: scale(.94); } 89.5%, 100% { transform: scale(1); } }
@keyframes ho-btnc { 0%, 86% { background: var(--verde-700); } 87.5% { background: var(--verde-900); } 89.5%, 100% { background: var(--verde-700); } }
.ho-anillo { position: absolute; inset: -4px; border-radius: 11px; border: 2px solid var(--verde-400); opacity: 0; animation: ho-anillo var(--dur) infinite; }
@keyframes ho-anillo { 0%, 86.5% { opacity: 0; transform: scale(.6); } 88% { opacity: .7; transform: scale(1); } 91%, 100% { opacity: 0; transform: scale(1.4); } }
/* Solo en movimiento cuando se ve; si no, en pausa */
.ho *, .ho *::before { animation-play-state: paused; }
.en-vista .ho *, .en-vista .ho *::before { animation-play-state: running; }
@media (prefers-reduced-motion: reduce) {
  .ho * { animation: none !important; }
  .ho-hoja { opacity: 1; transform: rotate(var(--r1)) scale(.95); z-index: 5; }
  .ho-t1 { opacity: 0; } .ho-t2 { opacity: 1; } .ho-barra i { width: 100%; } .ho-listo { opacity: 1; }
}
.enlace-tarjeta { text-decoration: none; }
.enlace-tarjeta:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.func .enlace-tarjeta::after { content: ''; position: absolute; inset: 0; }
.func { position: relative; }
.maqueta-nota .enlace { margin-left: 10px; }

/* ---------- Páginas propias (SEO) ---------- */
.func-visual.lienzo-anim { height: 340px; border-radius: 24px; }
.paso .func { padding: 0; }
.paso .func:hover { background: none; }
.tabla-planes { margin-top: 40px; overflow-x: auto; border: 1px solid var(--borde); border-radius: 22px; background: var(--bloque); box-shadow: var(--sombra-1); }
.tabla-planes table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .96rem; }
.tabla-planes th, .tabla-planes td { padding: 15px 22px; text-align: left; border-bottom: 1px solid var(--borde); }
.tabla-planes tbody tr:last-child th, .tabla-planes tbody tr:last-child td { border-bottom: 0; }
.tabla-planes thead th { font-size: 1.02rem; font-weight: 600; background: var(--fondo-2); }
.tabla-planes thead th small { display: block; margin-top: 2px; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; color: var(--tinta); }
.tabla-planes tbody th { font-weight: 500; color: var(--texto-2); }
.tabla-planes td { font-weight: 600; }
.tabla-planes td:nth-child(3) { background: var(--velo); }
.pasos .lienzo .pp-fila { margin: 0; padding: 12px 14px; font-size: .84rem; box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .5); }
.paso-num { text-transform: uppercase; color: var(--acento); }

/* Aire entre la última isla verde y el pie */
main > section.con-isla:last-child { padding-bottom: clamp(56px, 7vw, 96px); }

.tabla-planes td:nth-child(3) { background: none; }
.tabla-planes .destacada { background: var(--velo); }
.tabla-planes thead th.destacada { background: var(--acento-suave); }
.tabla-planes table { min-width: 680px; }

.tabla-planes td.destacada { background: var(--velo); }
.tabla-planes th:not(:first-child), .tabla-planes td { width: 24%; }

/* Fila de sellos de confianza (sección de seguridad) */
.sellos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin-top: 44px; border: 1px solid var(--borde); border-radius: 22px; overflow: hidden; background: var(--borde); }
.sello-g { display: grid; align-content: start; gap: 6px; padding: 22px; background: var(--fondo); }
.sello-ico { width: 46px; height: 46px; margin-bottom: 8px; border-radius: 50%; display: grid; place-items: center; background: var(--verde-300); color: var(--verde-900); box-shadow: 0 0 0 5px rgba(134, 190, 163, .18); }
.sello-ico .ico { width: 21px; height: 21px; }
.sello-g b { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.015em; }
.sello-g small { font-size: .86rem; color: var(--texto-2); line-height: 1.5; }
.sellos + .seg-grid { margin-top: 16px; }
@media (max-width: 1200px) { .sellos { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1020px) { .sellos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .sellos { grid-template-columns: 1fr; } }

/* ---------- Papeles que vuelan y se ordenan al hacer scroll ---------- */
.papeles { --p: 0; position: relative; overflow: hidden; padding: 170px 0 0; min-height: 1060px; text-align: center; isolation: isolate; }
.papeles-texto { position: relative; z-index: 3; max-width: 780px; }
.papeles-h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.8rem, 5.4vw + 1rem, 5.8rem); line-height: .98; letter-spacing: -0.025em; margin-bottom: 18px; color: var(--texto); }
.papeles-h2 em { font-style: italic; color: var(--verde-700); }
.papeles-texto .entradilla { margin: 0 auto 30px; max-width: 500px; }
.papeles-texto .acciones { justify-content: center; }
/* Bloque verde sobre el que caen los papeles */
.papeles-isla { position: absolute; left: 1.5%; right: 1.5%; bottom: 0; height: 400px; z-index: 0; border-radius: 32px; overflow: hidden;
  background: radial-gradient(60% 90% at 50% 100%, #2F8560 0%, rgba(47, 133, 96, 0) 70%), linear-gradient(180deg, #123A2B, #0B261C);
  display: grid; place-items: end center; padding-bottom: 64px; }
.papeles-isla::before { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask: radial-gradient(70% 80% at 50% 100%, #000, transparent); mask: radial-gradient(70% 80% at 50% 100%, #000, transparent); }
.papeles-exp { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; text-align: left; min-width: min(420px, 86vw);
  padding: 16px 18px 20px; border-radius: 18px; background: rgba(255, 255, 255, .96); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55);
  transform: translateY(calc((1 - var(--p)) * 40px)); opacity: calc(var(--p) * 1.4 - .2); }
.pe-icono { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--verde-50); color: var(--verde-700); }
.pe-icono .ico { width: 20px; height: 20px; }
.pe-txt small { display: block; font-size: .78rem; color: var(--texto-3); }
.pe-txt b { font-size: 1rem; color: var(--texto); font-variant-numeric: tabular-nums; }
.pe-ok { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #E1E7E3; color: #fff; transition: background .4s, transform .4s; transform: scale(.85); }
.pe-ok .ico { width: 15px; height: 15px; }
.papeles.listo .pe-ok { background: #2F8560; transform: scale(1); }
.pe-barra { position: absolute; left: 18px; right: 18px; bottom: 9px; height: 4px; border-radius: 4px; background: #E9EEEB; overflow: hidden; }
.pe-barra i { display: block; height: 100%; width: calc(var(--p) * 100%); background: linear-gradient(90deg, #2F8560, #1A4A37); border-radius: inherit; }
/* Papeles */
.papeles-capa { position: absolute; inset: 0; z-index: 2; pointer-events: none; perspective: 1400px; }
.papel { --q: 0; --e: max(0, 1 - var(--p));
  position: absolute; width: clamp(190px, 17vw, 268px); aspect-ratio: 1 / 1.414; transform-style: preserve-3d; will-change: transform, opacity;
  transform: translate3d(calc(var(--x0) * var(--e)), calc(var(--y0) * var(--e) - var(--q) * 70px * var(--v)), calc(var(--e) * 260px))
             rotateX(calc(var(--e) * 48deg)) rotateY(calc(var(--e) * var(--ry))) rotateZ(calc(var(--r0) + (var(--r1) - var(--r0)) * var(--p)));
  opacity: min(1, calc(var(--p) * 2.2)); }
.papel-hoja { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 10% 9% 7%; text-align: center; color: #3E3B35; border-radius: 2px; overflow: hidden;
  background: linear-gradient(155deg, #F3F0E9 0%, #E9E5DC 55%, #DEDAD0 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), 0 2px 3px rgba(20, 30, 25, .12), 0 28px 50px -22px rgba(20, 30, 25, .45); }
.papel-hoja::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.45), transparent 40%, rgba(0,0,0,.04)); }
.papeles.listo .papel-hoja { animation: papelFlota 7s ease-in-out infinite; animation-delay: calc(var(--v) * -3s); }
@keyframes papelFlota { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(.6deg); } }
.pl-org { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(5px, .42vw, 7px); letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.pl-tit { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(11px, 1.05vw, 17px); margin-top: 4%; line-height: 1.1; }
.pl-ref { font-family: Georgia, serif; font-size: clamp(4px, .34vw, 6px); opacity: .7; margin: 2% 0 6%; }
.pl-texto { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(3.4px, .3vw, 5.2px); line-height: 1.55; text-align: justify; hyphens: auto; color: #4A463F; margin: 0; flex: 1; overflow: hidden; }
.pl-pie { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 4%; }
.pl-pie small { font-family: Georgia, serif; font-size: clamp(3.4px, .3vw, 5px); opacity: .7; text-align: left; }
.pl-firma { width: 13%; height: auto; fill: var(--verde-700); opacity: .85; transform: rotate(-6deg); }
.pl-num { font-family: Georgia, serif; font-size: clamp(3.4px, .3vw, 5px); opacity: .5; margin-top: 3%; }
/* Posición final de cada papel */
.papel.p1 { left: 1%; top: 70px; }
.papel.p2 { right: 1.5%; top: 40px; }
.papel.p3 { left: 11%; bottom: 40px; }
.papel.p4 { right: 12%; bottom: 60px; }
.papel.p5 { left: -2%; bottom: 300px; width: clamp(160px, 14vw, 225px); }
.papel.p6 { right: -2%; bottom: 330px; width: clamp(160px, 14vw, 225px); }
@media (max-width: 900px) {
  .papeles { padding-top: 120px; min-height: 860px; }
  .papeles-isla { height: 300px; left: 8px; right: 8px; border-radius: 24px; padding-bottom: 40px; }
  .papel { width: 122px; }
  .papel.p5, .papel.p6 { display: none; }
  .papel.p1 { left: -14%; top: 6px; } .papel.p2 { right: -14%; top: 0; }
  .papel.p3 { left: -5%; bottom: 150px; } .papel.p4 { right: -5%; bottom: 160px; }
  .papeles-exp { min-width: 0; width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) { .papeles { --p: 1 !important; } .papel { --p: 1 !important; --q: 0 !important; filter: none; } .papeles.listo .papel-hoja { animation: none; } }

/* ---------- Conexiones en órbita ---------- */
#conexiones { padding-top: 96px; }
.orbita { --tam: min(540px, 88vw); --radio: calc(var(--tam) * .4); --nodo: clamp(52px, 11vw, 66px);
  position: relative; width: var(--tam); aspect-ratio: 1; margin: 30px auto 0; }
.orbita-anillo { position: absolute; inset: 10%; border: 1.5px dashed #CBD8D0; border-radius: 50%; }
.orbita-anillo::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(closest-side, rgba(47, 133, 96, .12), transparent); }
.orbita-centro { position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #FFFFFF, #E6F1EA 70%);
  border: 6px solid #fff; box-shadow: 0 30px 60px -20px rgba(26, 74, 55, .35), 0 0 0 1px #E1E7E3; }
.orbita-centro::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(47, 133, 96, .25); animation: orbitaLatido 3.2s ease-out infinite; }
@keyframes orbitaLatido { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.18); opacity: 0; } }
.orbita-logo { width: 42%; display: block; }
.orbita-logo svg { width: 100%; height: auto; fill: var(--verde-700); display: block; }
.orbita-nodos { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; animation: orbitaGiro 80s linear infinite; }
.orbita-nodos li { position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  transform: rotate(calc(var(--i) * 72deg)) translateY(calc(var(--radio) * -1)) rotate(calc(var(--i) * -72deg)); }
.orbita-nodos .nodo { position: absolute; left: calc(var(--nodo) / -2); top: calc(var(--nodo) / -2); width: var(--nodo); height: var(--nodo);
  display: grid; place-items: center; border-radius: 50%; border: 1px solid #DCE5DF; background: #F7FAF8; color: var(--verde-700); cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(26, 74, 55, .4); animation: orbitaGiro 80s linear infinite reverse;
  transition: background .35s, color .35s, border-radius .35s, box-shadow .35s, scale .35s; }
.orbita-nodos .nodo .ico { width: 42%; height: 42%; }
.orbita-nodos .nodo:hover { border-color: #A9C7B6; }
.orbita-nodos .nodo.activo { scale: 1.42; border-radius: 30%; background: var(--verde-700); color: #fff; border-color: var(--verde-700);
  box-shadow: 0 0 0 8px rgba(47, 133, 96, .14), 0 18px 34px -12px rgba(26, 74, 55, .55); z-index: 2; }
@keyframes orbitaGiro { to { transform: rotate(360deg); } }
.orbita:hover .orbita-nodos, .orbita:hover .nodo { animation-play-state: paused; }
.orbita-leyenda { max-width: 520px; margin: 26px auto 0; text-align: center; min-height: 3.4em; }
.orbita-leyenda b { display: block; font-size: 1.05rem; color: var(--texto); margin-bottom: 4px; }
.orbita-leyenda span { color: var(--texto-2); font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { .orbita-nodos, .orbita-nodos .nodo, .orbita-centro::after { animation: none; } }

/* Papeles en 3D (papeles3d.js): el lienzo sustituye a los papeles CSS */
.papeles-3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; display: block; }
.papeles.con-3d .papeles-capa { display: none; }

/* Separación entre el bloque verde de los papeles y la demo */
.papeles { margin-bottom: 88px; }
@media (max-width: 900px) { .papeles { margin-bottom: 56px; } }

/* ==========================================================================
   Animaciones pensadas para el móvil
   ========================================================================== */
/* Nada que gire o flote puede ensanchar la página (en el móvil la hacía bailar a los lados) */
html, body { overflow-x: clip; }
.orbita { overflow: clip; overflow-clip-margin: 28px; }
#conexiones { overflow-x: clip; }

/* Relato «Así funciona»: en el móvil, escena arriba y pasos en un carrusel que se desliza */
@media (max-width: 760px) {
  .relato-escena { position: relative; top: auto; height: 400px; z-index: auto; }
  .relato-escena .escena { padding-bottom: 48px; }
  .relato-pasos {
    display: flex; gap: 14px; padding: 18px 20px 6px; margin-inline: -20px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  }
  .relato-pasos::-webkit-scrollbar { display: none; }
  .relato-paso {
    flex: 0 0 86%; min-height: 0; justify-content: flex-start; scroll-snap-align: start;
    padding: 20px; border-radius: 20px; background: #fff; border: 1px solid var(--borde, #E1E7E3);
    opacity: .5;
  }
  .relato-paso h3 { font-size: 1.3rem; margin: 8px 0; }
  .relato-paso p { font-size: .97rem; }
  .relato-progreso i b { transition: transform .35s ease; }
  .relato-pista-aviso { display: block; margin-top: 10px; text-align: center; font-size: .8rem; color: var(--texto-2); }
}
@media (min-width: 761px) { .relato-pista-aviso { display: none; } }
