/* ============================================================
   Cerevia · páginas de módulo v2 (2026-11-09, agente 08)
   Hero con el color de la familia, constelación animada, cifras, capturas en marcos de equipo y celular.
   Solo CSS propio y livianos (transform/opacity). Todo se apaga con prefers-reduced-motion.
   Variables que pone cada página: --grad, --rgb, --acento (color del módulo en la suite Sinapsis).
   ============================================================ */
.pagina-v2 { --h2-fondo: color-mix(in srgb, var(--acento) 55%, #000); }
.pagina-v2 .pagina { overflow-x: clip; }

/* ---------- Hero ---------- */
.h2-hero { position: relative; isolation: isolate; color: #fff; padding: 34px 0 0; margin-bottom: 78px;
  background: linear-gradient(135deg, var(--acento) 0%, var(--h2-fondo) 100%); border-radius: 0 0 40px 40px; }
.h2-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: inherit; background:
  radial-gradient(60% 70% at 85% 20%, rgba(255,255,255,.22), transparent 62%),
  radial-gradient(50% 60% at 8% 105%, rgba(var(--rgb), .55), transparent 65%); }
.h2-cst { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .5; pointer-events: none; clip-path: inset(0 round 0 0 40px 40px); }
.h2-cst-l line { stroke: #fff; stroke-opacity: .32; stroke-width: 1; stroke-dasharray: 3 7; animation: h2Dash 22s linear infinite; }
.h2-cst-n circle { fill: #fff; fill-opacity: .85; transform-box: fill-box; transform-origin: center; animation: h2Pulso 4.2s ease-in-out infinite; }
.h2-cst-n .n1 { animation-delay: -1s; } .h2-cst-n .n2 { animation-delay: -2.1s; } .h2-cst-n .n3 { animation-delay: -3.2s; }
@keyframes h2Dash { to { stroke-dashoffset: -100; } }
@keyframes h2Pulso { 0%, 100% { transform: scale(1); fill-opacity: .55; } 50% { transform: scale(1.9); fill-opacity: 1; } }
.h2-pausa .h2-cst-l line, .h2-pausa .h2-cst-n circle, .h2-pausa .orb *, .h2-pausa .h2-dev { animation-play-state: paused !important; }

.h2-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 36px; align-items: center; padding-top: 18px; padding-bottom: 30px; }
.h2-hero .migas, .h2-hero .migas a { color: rgba(255,255,255,.82); }
.h2-hero .migas span { color: #fff; }
.h2-fam { margin: 18px 0 8px; font: 800 12.5px "DM Sans", sans-serif; letter-spacing: .09em; text-transform: uppercase; color: rgba(255,255,255,.88); }
.h2-hero h1 { display: flex; align-items: center; gap: 16px; margin: 0; font: 700 clamp(42px, 6.4vw, 76px)/1.02 "Space Grotesk", "DM Sans", sans-serif; letter-spacing: -.025em; color: #fff; }
.h2-ico { flex: none; display: grid; place-items: center; width: .95em; height: .95em; border-radius: 26%; background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.5); box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: h2Flota 5s ease-in-out infinite; }
.h2-ico svg { width: 58%; height: 58%; }
@keyframes h2Flota { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-7px) rotate(3deg); } }
.h2-lema { margin: 18px 0 16px; max-width: 30em; font-size: clamp(18px, 2vw, 22px); line-height: 1.45; font-weight: 600; color: rgba(255,255,255,.95); }
.h2-estado { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px; padding: 8px 16px; border-radius: 999px; font: 800 14px "DM Sans", sans-serif; background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.45); }
.h2-punto { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.h2-punto::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #fff; animation: mtPulso 1.6s ease-out infinite; }
.h2-botones { display: flex; flex-wrap: wrap; gap: 12px; }
.h2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 800 15.5px "DM Sans", sans-serif; text-decoration: none; border: 2px solid transparent; transition: transform .2s, box-shadow .2s, background .2s; }
.h2-btn-demo { background: #fff; color: var(--acento); box-shadow: 0 12px 28px rgba(0,0,0,.25); }
.h2-btn-demo:hover, .h2-btn-demo:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(0,0,0,.3); }
.h2-btn-claro { color: #fff; border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.08); }
.h2-btn-claro:hover, .h2-btn-claro:focus-visible { background: rgba(255,255,255,.2); }
.h2-hero a:focus-visible, .h2-cta a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* entrada del hero (CSS puro, una vez) */
.h2-texto > *, .h2-visual { animation: h2Entra .7s cubic-bezier(.22, 1, .36, 1) both; }
.h2-texto > *:nth-child(2) { animation-delay: .05s; } .h2-texto > *:nth-child(3) { animation-delay: .12s; } .h2-texto > *:nth-child(4) { animation-delay: .2s; }
.h2-texto > *:nth-child(5) { animation-delay: .28s; } .h2-texto > *:nth-child(6) { animation-delay: .36s; } .h2-visual { animation-delay: .2s; }
@keyframes h2Entra { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Cifras (se superponen al borde del hero) ---------- */
.h2-cifras { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: -52px; background: #fff; color: var(--text); border-radius: 24px; box-shadow: 0 22px 50px rgba(var(--rgb), .28), 0 2px 10px rgba(0,0,0,.06); overflow: hidden; }
.h2-cifra { display: grid; gap: 4px; padding: 22px 26px; }
.h2-cifra + .h2-cifra { border-left: 1px solid var(--border); }
.h2-cifra b { font: 700 clamp(28px, 3.6vw, 42px)/1 "Space Grotesk", "DM Sans", sans-serif; color: var(--acento); font-variant-numeric: tabular-nums; }
.h2-cifra span { font-size: 14px; line-height: 1.4; color: var(--text2); }

/* ---------- Visuales del hero ---------- */
.h2-visual { position: relative; display: grid; justify-items: center; perspective: 1300px; }
.h2-dev { position: relative; width: min(100%, 620px); transform-style: preserve-3d; transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); transition: transform .25s ease-out; animation: h2Dev 7s ease-in-out infinite; }
@keyframes h2Dev { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }
.dev { margin: 0; }
.dev img { display: block; width: 100%; height: auto; }
.dev-pc { border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid rgba(255,255,255,.55); box-shadow: 0 30px 70px rgba(0,0,0,.38); }
.dev-cel { position: absolute; right: -4%; bottom: -9%; width: 27%; border-radius: 22px; overflow: hidden; background: #111; border: 5px solid #14121f; box-shadow: 0 22px 50px rgba(0,0,0,.45); transform: translateZ(60px) translateY(var(--py, 0px)); }
.dev-anime { border-radius: 26px; overflow: hidden; background: #DDE3EE; border: 1px solid rgba(255,255,255,.5); box-shadow: 0 30px 70px rgba(0,0,0,.38); max-width: 420px; margin: 0 auto; }
.dev-anime img { max-height: 540px; object-fit: cover; object-position: 50% 28%; }
.dev-contener img { object-fit: contain; background: #EFE9EE; }
.h2-panel { width: min(100%, 560px); padding: 10px; border-radius: 22px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); box-shadow: 0 30px 70px rgba(0,0,0,.3); animation: h2Dev 7s ease-in-out infinite; }
.h2-panel .pv-nota { color: rgba(255,255,255,.85); margin: 8px 0 0; text-align: center; }

/* órbita para módulos sin captura */
.orb { position: relative; width: min(78vw, 380px); aspect-ratio: 1; display: grid; place-items: center; }
.orb-anillo { position: absolute; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.45); animation: h2Gira 40s linear infinite; }
.orb-anillo.a1 { inset: 8%; } .orb-anillo.a2 { inset: 26%; animation-direction: reverse; animation-duration: 28s; border-style: solid; border-color: rgba(255,255,255,.25); }
@keyframes h2Gira { to { transform: rotate(360deg); } }
.orb-centro { position: relative; z-index: 2; display: grid; place-items: center; width: 34%; aspect-ratio: 1; border-radius: 30%; background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.6); box-shadow: 0 0 0 14px rgba(255,255,255,.08), 0 20px 50px rgba(0,0,0,.28); animation: h2Flota 5.5s ease-in-out infinite; }
.orb-centro svg { width: 56%; height: 56%; }
.orb-sat { position: absolute; z-index: 3; display: grid; place-items: center; width: 17%; aspect-ratio: 1; border-radius: 28%; background: rgba(255,255,255,.22); border: 1.5px solid rgba(255,255,255,.6); box-shadow: 0 10px 24px rgba(0,0,0,.25); animation: h2Orbita 20s linear infinite; animation-delay: calc(var(--i) * -6.66s); }
.orb-sat svg { width: 55%; height: 55%; }
@keyframes h2Orbita { from { transform: rotate(0deg) translateX(min(34vw, 150px)) rotate(0deg); } to { transform: rotate(360deg) translateX(min(34vw, 150px)) rotate(-360deg); } }

/* ---------- Secciones ---------- */
.h2-sec { padding-top: 56px; padding-bottom: 8px; }
#que-resuelve { padding-top: 24px; }
.h2-fns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.h2-fn { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 4px 18px; align-items: start; padding: 24px 26px; border-radius: 22px; background: #fff; border: 1px solid var(--border); box-shadow: 0 2px 14px rgba(40,30,90,.06); overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.h2-fn::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--rgb), .18), transparent 70%); transition: transform .4s; }
.h2-fn:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(var(--rgb), .2); border-color: rgba(var(--rgb), .45); }
.h2-fn:hover::after { transform: scale(1.8); }
.h2-fn-ico { grid-row: span 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, var(--acento), color-mix(in srgb, var(--acento) 60%, #000)); box-shadow: 0 10px 22px rgba(var(--rgb), .32); }
.h2-fn-ico svg { width: 28px; height: 28px; }
.h2-fn h3 { margin: 4px 0 0; font: 700 19px "Space Grotesk", "DM Sans", sans-serif; }
.h2-fn p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--text2); }
.h2-tambien { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.h2-tambien p { margin: 0; font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--acento); }
.h2-tambien ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.h2-tambien li { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--acento); background: rgba(var(--rgb), .1); }

.h2-vista { position: relative; display: grid; justify-items: center; padding: 10px 0 30px; }
.h2-vista .dev-pc { width: min(100%, 880px); border: 1px solid var(--border); box-shadow: 0 30px 70px rgba(var(--rgb), .25); }
.h2-vista .dev-cel { right: 4%; bottom: 0; width: min(22%, 190px); }
.h2-nota { text-align: center; margin: 4px 0 0; font-size: 13px; color: var(--text2); }
.h2-historia { max-width: 760px; margin: 0 auto; padding: 24px 28px; border-radius: 22px; background: #fff; border: 1px solid var(--border); box-shadow: 0 2px 14px rgba(40,30,90,.06); }
.h2-historia .historia-texto { min-height: 0; }

.h2-faq-caja { max-width: 820px; }
.h2-faq { display: grid; gap: 10px; }
.h2-q { border: 1px solid var(--border); border-radius: 16px; background: #fff; overflow: hidden; }
.h2-q summary { position: relative; display: flex; align-items: center; min-height: 56px; padding: 14px 52px 14px 20px; font: 700 16.5px "DM Sans", sans-serif; cursor: pointer; list-style: none; }
.h2-q summary::-webkit-details-marker { display: none; }
.h2-q summary::after { content: "+"; position: absolute; right: 20px; top: 50%; translate: 0 -50%; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 20px; line-height: 1; color: #fff; background: var(--acento); transition: transform .25s; }
.h2-q[open] summary::after { transform: rotate(45deg); }
.h2-q[open] { border-color: rgba(var(--rgb), .45); box-shadow: 0 10px 26px rgba(var(--rgb), .14); }
.h2-q-r { padding: 0 20px 18px; color: var(--text2); line-height: 1.6; }
.h2-q-r p { margin: 0; }
.h2-q summary:focus-visible { outline: 3px solid var(--acento); outline-offset: -3px; }

.h2-cta { position: relative; overflow: hidden; text-align: center; padding: 48px 28px; border-radius: 30px; color: #fff; background: linear-gradient(135deg, var(--acento), var(--h2-fondo)); box-shadow: 0 26px 60px rgba(var(--rgb), .35); }
.h2-cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 80% at 90% 0%, rgba(255,255,255,.25), transparent 65%); pointer-events: none; }
.h2-cta h2 { position: relative; margin: 0 0 10px; font: 700 clamp(26px, 3.6vw, 38px) "Space Grotesk", "DM Sans", sans-serif; color: #fff; }
.h2-cta p { position: relative; margin: 0 auto 22px; max-width: 34em; color: rgba(255,255,255,.95); }
.h2-cta .h2-btn { position: relative; }
.h2-cta .h2-cta-mail { margin: 14px 0 0; font-weight: 700; font-size: 14.5px; }

/* ---------- Pantallas angostas ---------- */
@media (max-width: 900px) {
  .h2-grid { grid-template-columns: 1fr; gap: 30px; }
  .h2-visual { order: 2; }
  .h2-fns { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .h2-hero { border-radius: 0 0 28px 28px; margin-bottom: 150px; }
  .h2-cifras { grid-template-columns: 1fr; margin-bottom: -126px; }
  .h2-cifra { padding: 14px 22px; grid-template-columns: 82px 1fr; align-items: center; gap: 12px; }
  .h2-cifra + .h2-cifra { border-left: 0; border-top: 1px solid var(--border); }
  .h2-cifra b { font-size: 26px; }
  .h2-botones .h2-btn { flex: 1 1 100%; }
  .dev-cel { right: 0; bottom: -6%; width: 30%; border-width: 4px; border-radius: 16px; }
  .h2-vista .dev-cel { right: 0; width: 30%; }
  .h2-sec { padding-top: 44px; }
  .h2-fn { grid-template-columns: 48px 1fr; padding: 20px; }
  .h2-fn-ico { width: 48px; height: 48px; border-radius: 15px; }
  @keyframes h2Orbita { from { transform: rotate(0deg) translateX(110px) rotate(0deg); } to { transform: rotate(360deg) translateX(110px) rotate(-360deg); } }
}

/* ---------- Menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  .h2-cst-l line, .h2-cst-n circle, .h2-ico, .h2-dev, .h2-panel, .orb *, .h2-punto::after, .h2-texto > *, .h2-visual { animation: none !important; }
  .h2-dev { transform: none; transition: none; }
  .h2-fn, .h2-btn, .h2-q summary::after, .h2-fn::after { transition: none; }
}
/* pantallas táctiles: sin inclinación */
.tactil .h2-dev { transform: none; }

@media (max-width: 620px) { .pagina-v2 .cabecera .btn { white-space: nowrap; padding: 0 14px; font-size: 13.5px; min-height: 44px; } }

.h2-vista-extra { margin-top: 26px; }

/* ---- Bloques «Dictas y la IA mejora la redacción» (Integra+) y «Tutor de pistas con IA» (Logra+) ---- */
.h2-bloque { display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px; align-items: center; padding: 34px; border-radius: 28px; background: #fff; border: 1px solid var(--border); box-shadow: 0 18px 44px rgba(var(--rgb), .14); }
.h2-bloque h2 { margin: 6px 0 10px; font: 700 clamp(26px, 3.4vw, 36px)/1.15 "Space Grotesk", "DM Sans", sans-serif; }
.h2-bloque p { color: var(--text2); line-height: 1.6; }
.h2-etq { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px; border-radius: 999px; font: 800 13px "DM Sans", sans-serif; }
.h2-etq span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.h2-etq.ok { color: #0D6B52; background: #E1F5EE; } .h2-etq.prep { color: #8A5A00; background: #FFF3D6; }
.h2-puntos { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.h2-puntos li { position: relative; padding-left: 28px; line-height: 1.5; color: var(--text); }
.h2-puntos li::before { content: "✓"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 800; color: #fff; background: var(--acento); }
.ia-demo { display: grid; gap: 6px; justify-items: stretch; padding: 22px; border-radius: 22px; background: linear-gradient(135deg, rgba(var(--rgb), .1), rgba(var(--rgb), .03)); }
.ia-paso { margin: 0; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: 0 6px 16px rgba(var(--rgb), .12); animation: iaSube 6s ease-in-out infinite; }
.ia-paso b { display: block; color: var(--acento); font-size: 14px; } .ia-paso span { font-size: 14.5px; color: var(--text2); }
.ia-2 { animation-delay: -2s; } .ia-3 { animation-delay: -4s; }
.ia-flecha { margin: 0; text-align: center; font-size: 20px; color: var(--acento); line-height: 1; }
.ia-niveles { display: flex; gap: 8px; justify-content: center; }
.ia-niveles span { flex: 1; padding: 12px 8px; text-align: center; border-radius: 14px; font: 800 14px "DM Sans", sans-serif; color: #fff; background: linear-gradient(135deg, var(--acento), color-mix(in srgb, var(--acento) 60%, #000)); animation: iaSube 6s ease-in-out infinite; }
.ia-niveles span:nth-child(2) { animation-delay: -1s; opacity: .9; } .ia-niveles span:nth-child(3) { animation-delay: -2s; opacity: .8; }
@keyframes iaSube { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (max-width: 900px) { .h2-bloque { grid-template-columns: 1fr; padding: 24px 20px; } }
@media (prefers-reduced-motion: reduce) { .ia-paso, .ia-niveles span { animation: none; } }

/* ---- Chat de ejemplo de Orienta+ (hero) y profesora Álvarez más abajo ---- */
.h2-chat { width: min(100%, 520px); padding: 18px 18px 16px; border-radius: 26px; background: #fff; color: var(--text); box-shadow: 0 30px 70px rgba(0,0,0,.35); animation: h2Dev 7s ease-in-out infinite; }
.chat-etq { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 6px 12px; border-radius: 999px; font: 800 12.5px "DM Sans", sans-serif; color: #8A5A00; background: #FFF3D6; }
.chat-etq span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chat-cab { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; } .chat-cab b { font: 700 18px "Space Grotesk", "DM Sans", sans-serif; } .chat-cab small { color: var(--text2); font-weight: 700; }
.chat-pests { display: flex; gap: 6px; margin-bottom: 12px; }
.chat-pest { flex: 1; min-height: 44px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; color: var(--text2); font: 800 14px "DM Sans", sans-serif; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chat-pest.activa { background: var(--acento); border-color: var(--acento); color: #fff; }
.chat-pest:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }
.chat-cuerpo { display: grid; gap: 6px; min-height: 228px; align-content: start; padding: 12px; border-radius: 18px; background: #F4F6FB; }
.chat-msg { margin: 0; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; max-width: 92%; }
.chat-yo { justify-self: end; background: var(--acento); color: #fff; border-bottom-right-radius: 4px; min-height: 1.5em; }
.chat-ia { justify-self: start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text); min-height: 1.5em; }
.chat-etq-ia { margin: 4px 0 0 4px; font-size: 12px; font-weight: 800; color: var(--text2); min-height: 1em; }
.chat-ia.escribiendo::after { content: "▍"; margin-left: 2px; color: var(--acento); animation: chatCursor 1s steps(2) infinite; }
@keyframes chatCursor { 50% { opacity: 0; } }
.chat-aviso { margin: 10px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--text2); }
.h2-profe { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 28px; align-items: center; max-width: 820px; }
.h2-profe-img { width: 100%; height: auto; border-radius: 20px; background: #EFE9EE; box-shadow: 0 16px 40px rgba(var(--rgb), .2); }
@media (max-width: 620px) { .h2-profe { grid-template-columns: 1fr; } .h2-chat { padding: 14px 14px 12px; } .chat-cuerpo { min-height: 250px; } }
@media (prefers-reduced-motion: reduce) { .h2-chat { animation: none; } .chat-ia.escribiendo::after { animation: none; } .chat-pest { transition: none; } }

.dx-link span { margin-left: 6px; }

.h2-nota-prep { margin: -10px 0 18px; max-width: 34em; padding: 8px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; color: #fff; background: rgba(255,255,255,.12); border: 1px dashed rgba(255,255,255,.55); }
.h2-nota-prep b { color: #FFE9A8; }
