/* =========================================================
   Maestro Innova · Portada (index.php)
   Hero oscuro con escena 3D (Three.js) + secciones de contenido
   ========================================================= */
.lp .page { max-width: none; padding: 0; }
.lp .topbar { background: color-mix(in srgb, #0B1122 72%, transparent); box-shadow: 0 1px 0 rgba(255,255,255,.08); color: #fff; }
.lp .topbar .brand-txt strong { color: #fff; }
.lp .topbar .icon-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #E6EAF2; }
.lp .topbar .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.lp .topbar .btn-ghost:hover { background: rgba(255,255,255,.1); }
.lp .topbar .btn-primary { background: #fff; color: #0B1122; }
.lp .topbar .btn-primary:hover { background: var(--coral); color: #fff; }
.lp .site-foot { margin-top: 0; }

.lp-section { max-width: 1240px; margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2rem); }
.lp-head { text-align: center; max-width: 760px; margin: 0 auto 2.6rem; }
.lp-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin: .3rem 0 .6rem; }
.lp-head .eyebrow { justify-content: center; }
.lp .center { justify-content: center; }

/* ---------- Hero ---------- */
.lp-hero { position: relative; isolation: isolate; color: #E9EDF6; overflow: hidden; margin-top: -64px; padding: calc(64px + clamp(1.5rem, 5vw, 3.5rem)) clamp(1rem, 4vw, 2rem) 3.5rem; min-height: min(100svh, 980px); display: flex; flex-direction: column; }
.lp-hero-bg { position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 520px at 78% 38%, rgba(228,87,46,.22), transparent 60%),
    radial-gradient(700px 480px at 12% 18%, rgba(60,184,168,.18), transparent 60%),
    radial-gradient(1100px 600px at 50% 120%, rgba(242,165,12,.16), transparent 60%),
    linear-gradient(180deg, #0B1122 0%, #0F1830 55%, #111B36 100%); }
.lp-hero-bg::after { content: ""; position: absolute; inset: 0; opacity: .35;
  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: 56px 56px; mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 70%); }
.lp-hero-grid { max-width: 1240px; width: 100%; margin: 0 auto; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 1rem; align-items: center; }
.lp-badge { display: inline-flex; align-items: center; gap: .55rem; padding: .42rem .9rem; border-radius: 99px; font-size: .8rem; font-weight: 600; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); }
.lp-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #3DDC97; box-shadow: 0 0 0 0 rgba(61,220,151,.6); animation: lpPing 2s infinite; }
@keyframes lpPing { 70% { box-shadow: 0 0 0 9px rgba(61,220,151,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); } }
.lp-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.9vw, 3.9rem); line-height: 1.06; margin: 1.1rem 0 1rem; letter-spacing: -.03em; }
.grad { background: linear-gradient(100deg, #F2A50C 0%, #F0714A 45%, #FF8FA3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lead { font-size: clamp(1rem, 1.4vw, 1.14rem); color: #C3CBDA; max-width: 560px; }
.lp-lead b { color: #fff; }
.lp-cta { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.6rem 0 0; }
.lp-btn-glass { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); }
.lp-btn-glass:hover { background: rgba(255,255,255,.16); color: #fff; }
.lp-install { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.14) !important; color: #E6EAF2; box-shadow: none !important; backdrop-filter: blur(8px); margin-top: 1.4rem; }
.lp-install .ic { background: rgba(60,184,168,.18) !important; color: #5FE0CF !important; }
.lp-install .btn-primary { background: #fff; color: #0B1122; }
.lp-install .ios-hint { color: #AEB8CC; }

/* Escenario 3D */
.lp-stage { position: relative; height: clamp(360px, 62vh, 640px); }
.hero3d { position: absolute; inset: -6% -8%; opacity: 0; transition: opacity 1.2s ease; touch-action: pan-y; }
.hero3d.ready { opacity: 1; }
.hero3d canvas { width: 100% !important; height: 100% !important; display: block; }
.hero3d-labels { position: absolute; inset: -6% -8%; pointer-events: none; }
.n3d-label { position: absolute; left: 0; top: 0; pointer-events: auto; display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem .22rem .25rem; border-radius: 99px; background: rgba(11,17,34,.62); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); color: #E9EDF6; font: 600 .74rem var(--ff); white-space: nowrap; backdrop-filter: blur(6px); cursor: pointer; transition: opacity .3s, background .2s, box-shadow .2s; will-change: transform; }
.n3d-label b { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-size: .68rem; }
.n3d-label.on, .n3d-label:hover, .n3d-label:focus-visible { background: color-mix(in srgb, var(--c) 35%, rgba(11,17,34,.85)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); outline: none; }
.lp-stage-hint { position: absolute; bottom: -.3rem; left: 50%; transform: translateX(-50%); font-size: .78rem; color: #8E99B0; display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
/* Respaldo si no hay WebGL */
.hero3d-fallback { display: none; position: absolute; inset: 0; place-items: center; }
.no-webgl .hero3d-fallback { display: grid; }
.no-webgl .lp-stage-hint, .no-webgl .hero3d-labels { display: none; }
.hero3d-fallback span { position: absolute; border-radius: 50%; border: 1.5px solid rgba(242,165,12,.4); animation: lpSpin 18s linear infinite; }
.hero3d-fallback span:nth-child(1) { width: 38%; aspect-ratio: 1; background: radial-gradient(circle, rgba(240,113,74,.9), rgba(228,87,46,.15) 60%, transparent 70%); border: 0; }
.hero3d-fallback span:nth-child(2) { width: 62%; aspect-ratio: 1; border-color: rgba(60,184,168,.4); transform: rotateX(70deg); }
.hero3d-fallback span:nth-child(3) { width: 82%; aspect-ratio: 1; border-style: dashed; }
@keyframes lpSpin { to { rotate: 360deg; } }

/* Estadísticas */
.lp-stats { max-width: 1240px; width: 100%; margin: 2rem auto 0; display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.lp-stats > div { padding: 1.1rem 1.2rem; border-right: 1px solid rgba(255,255,255,.08); }
.lp-stats > div:last-child { border-right: 0; }
.lp-stats b { display: block; font-family: var(--ff-head); font-size: clamp(1.4rem, 2.6vw, 2rem); color: #fff; line-height: 1.1; }
.lp-stats span { font-size: .8rem; color: #AEB8CC; }
.lp-stats .lp-count b { color: #F5B533; }
.lp-stats b span { font-size: inherit; color: inherit; }
.lp-scroll { position: absolute; left: 50%; bottom: .7rem; transform: translateX(-50%); width: 24px; height: 38px; border: 2px solid rgba(255,255,255,.3); border-radius: 14px; }
.lp-scroll span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: #fff; animation: lpScroll 1.8s infinite; }
@keyframes lpScroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Banda de confianza ---------- */
.lp-trust { background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.lp-marquee { display: flex; width: max-content; animation: lpMarquee 38s linear infinite; }
.lp-marquee-row { display: flex; gap: 2.6rem; padding: 1rem 1.3rem; }
.lp-marquee span { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.lp-marquee .ico { color: var(--coral); }
.lp-trust:hover .lp-marquee { animation-play-state: paused; }
@keyframes lpMarquee { to { transform: translateX(-50%); } }

/* ---------- Cómo funciona ---------- */
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; counter-reset: s; position: relative; }
.lp-steps::before { content: ""; position: absolute; top: 46px; left: 16%; right: 16%; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px); z-index: -1; }
.lp-steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.6rem; box-shadow: var(--shadow); position: relative; transition: transform .25s, box-shadow .25s; }
.lp-steps li:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.lp-step-n { position: absolute; top: 1rem; right: 1.2rem; font-family: var(--ff-head); font-size: 2.4rem; font-weight: 700; color: var(--soft); line-height: 1; }
.lp-step-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--coral), #F5B533); box-shadow: 0 10px 22px -10px var(--coral); margin-bottom: 1rem; }
.lp-steps li:nth-child(2) .lp-step-ic { background: linear-gradient(135deg, #7B2CBF, #3A86FF); box-shadow: 0 10px 22px -10px #3A86FF; }
.lp-steps li:nth-child(3) .lp-step-ic { background: linear-gradient(135deg, #2A9D8F, #43AA8B); box-shadow: 0 10px 22px -10px #2A9D8F; }
.lp-steps h3 { font-size: 1.12rem; }
.lp-steps p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- Criterios ---------- */
.lp-dark { max-width: none; background: linear-gradient(180deg, #0F1830, #0B1122); color: #E6EAF2; }
.lp-dark > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.lp-dark h2, .lp-dark h3 { color: #fff; }
.lp-dark .lp-head p { color: #AEB8CC; }
.lp-tabs { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: 1rem; padding: .35rem; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.lp-tabs button { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: transparent; color: #C3CBDA; font: 600 .86rem var(--ff); padding: .55rem .9rem; border-radius: 12px; cursor: pointer; transition: .2s; }
.lp-tabs button[aria-selected=true] { background: #fff; color: #0B1122; }
.lp-tabs button:hover:not([aria-selected=true]) { background: rgba(255,255,255,.08); color: #fff; }
.lp-crit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.lp-crit { position: relative; padding: 1.3rem; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); overflow: hidden; transition: transform .25s, border-color .25s, background .25s, opacity .3s; }
.lp-crit::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); }
.lp-crit::after { content: ""; position: absolute; width: 180px; height: 180px; right: -70px; top: -70px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 35%, transparent), transparent 70%); opacity: .5; transition: opacity .3s; }
.lp-crit:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 60%, transparent); background: rgba(255,255,255,.07); }
.lp-crit:hover::after { opacity: 1; }
.lp-crit.pulse { animation: lpPulse 1.5s ease; }
@keyframes lpPulse { 30% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 45%, transparent); transform: scale(1.03); } }
.lp-crit-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.lp-crit-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--c, #F5B533); background: color-mix(in srgb, var(--c, #F5B533) 16%, transparent); }
.lp-crit-n { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8E99B0; }
.lp-crit-pts { margin-left: auto; text-align: right; line-height: 1; }
.lp-crit-pts b { font-family: var(--ff-head); font-size: 1.7rem; color: #fff; }
.lp-crit-pts small { display: block; font-size: .68rem; color: #8E99B0; }
.lp-crit h3 { font-size: 1.08rem; margin-bottom: .25rem; }
.lp-crit p { font-size: .87rem; color: #AEB8CC; margin: 0 0 .9rem; min-height: 2.6em; }
.lp-crit-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.lp-crit-bar span { display: block; height: 100%; width: 0; background: var(--c); border-radius: 99px; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.lp-crit-note { display: block; margin-top: .5rem; font-size: .74rem; color: #8E99B0; min-height: 1.1em; }
.lp-crit.off { opacity: .45; }
.lp-crit.off .lp-crit-pts b { color: #8E99B0; }
.lp-crit-total { background: linear-gradient(135deg, rgba(228,87,46,.18), rgba(242,165,12,.1)); border-color: rgba(242,165,12,.3); display: flex; flex-direction: column; align-items: flex-start; }
.lp-crit-total::before { background: linear-gradient(90deg, var(--coral), #F5B533); }
.lp-crit-total h3 { font-family: var(--ff-head); font-size: 1.8rem; margin: .7rem 0 .3rem; }
.lp-crit-total p { min-height: 0; }
.lp-crit-total .btn { margin-top: auto; }

/* ---------- Categorías ---------- */
.lp-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; perspective: 1000px; }
.lp-cat { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow); transition: transform .2s ease-out, box-shadow .25s; transform-style: preserve-3d; }
.lp-cat:hover { box-shadow: var(--shadow-lg); }
.lp-cat-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: var(--coral); background: color-mix(in srgb, var(--coral) 12%, var(--surface)); margin-bottom: 1rem; transform: translateZ(30px); }
.lp-cat:nth-child(2) .lp-cat-ic { color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, var(--surface)); }
.lp-cat:nth-child(3) .lp-cat-ic { color: #B7791F; background: color-mix(in srgb, var(--gold) 16%, var(--surface)); }
.lp-cat:nth-child(4) .lp-cat-ic { color: #7B2CBF; background: color-mix(in srgb, #7B2CBF 13%, var(--surface)); }
.lp-cat-anexo { position: absolute; top: 1.4rem; right: 1.3rem; font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 99px; background: var(--soft); color: var(--muted); }
.lp-cat h3 { font-size: 1.15rem; margin-bottom: .1rem; }
.lp-cat-linea { font-size: .78rem; font-weight: 700; color: var(--coral); margin-bottom: .6rem; }
.lp-cat > p:not(.lp-cat-linea) { font-size: .9rem; color: var(--muted); }
.lp-cat dl { margin: 1rem 0 0; padding-top: .9rem; border-top: 1px dashed var(--line); display: grid; gap: .45rem; }
.lp-cat dl div { font-size: .84rem; }
.lp-cat dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; } .lp-cat dd { margin: .1rem 0 0; font-weight: 700; }

/* ---------- Funcionalidades ---------- */
.lp-soft { max-width: none; background: var(--soft); }
.lp-soft > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.lp-feature { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; transition: transform .25s, box-shadow .25s; }
.lp-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.lp-feature-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand); color: var(--gold); margin-bottom: .9rem; }
.lp-feature h3 { font-size: 1.02rem; }
.lp-feature p { font-size: .9rem; color: var(--muted); margin: 0; }

/* ---------- Fechas ---------- */
.lp-dates { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: clamp(1.5rem, 4vw, 3rem); box-shadow: var(--shadow); }
.lp-dates h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.lp-timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1rem; }
.lp-timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--teal), var(--coral)); border-radius: 2px; }
.lp-timeline li { display: grid; grid-template-columns: 20px 1fr; column-gap: 1rem; }
.lp-tl-dot { grid-row: span 2; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 3px solid var(--teal); z-index: 1; }
.lp-timeline li.hot .lp-tl-dot { border-color: var(--coral); box-shadow: 0 0 0 5px color-mix(in srgb, var(--coral) 20%, transparent); }
.lp-timeline b { font-family: var(--ff-head); font-size: 1.1rem; }
.lp-timeline li.hot b { color: var(--coral); }
.lp-timeline span:not(.lp-tl-dot) { font-size: .88rem; color: var(--muted); }

/* ---------- CTA final ---------- */
.lp-final { position: relative; isolation: isolate; overflow: hidden; text-align: center; color: #fff; padding: clamp(3.5rem, 8vw, 5.5rem) 1.2rem; background: linear-gradient(135deg, #0B1122, #1B2A52); }
.lp-final-glow { position: absolute; inset: -40% -10% auto; height: 140%; z-index: -1; background: radial-gradient(500px 260px at 30% 40%, rgba(228,87,46,.35), transparent 70%), radial-gradient(500px 260px at 70% 60%, rgba(60,184,168,.3), transparent 70%); animation: lpFloat 12s ease-in-out infinite alternate; }
@keyframes lpFloat { to { transform: translate3d(4%, 6%, 0) scale(1.08); } }
.lp-final h2 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.8rem); max-width: 800px; margin: 0 auto .7rem; }
.lp-final p { color: #C3CBDA; margin-bottom: 0; }

/* ---------- Aparición al desplazarse ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Modo oscuro (secciones claras) ---------- */
[data-theme="dark"] .lp-step-n { color: #232E4B; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .lp-crit-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-cats { grid-template-columns: repeat(2, 1fr); }
  .lp-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .lp-hero { min-height: auto; }
  .lp-hero-grid { grid-template-columns: 1fr; text-align: center; }
  .lp-hero-copy { order: 2; }
  .lp-stage { order: 1; height: clamp(260px, 42vh, 360px); margin-top: -.5rem; }
  .lp-lead { margin-left: auto; margin-right: auto; }
  .lp-cta { justify-content: center; }
  .lp-install { margin-left: auto; margin-right: auto; text-align: left; }
  .lp-stats { grid-template-columns: repeat(2, 1fr); }
  .lp-stats > div:nth-child(2) { border-right: 0; }
  .lp-stats > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.08); }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-steps::before { display: none; }
  .lp-dates { grid-template-columns: 1fr; }
  .hero3d-labels { display: none; }
  .lp-scroll { display: none; }
}
@media (max-width: 600px) {
  .lp-hero { padding-top: calc(64px + 1rem); }
  .lp-crit-grid, .lp-cats, .lp-features { grid-template-columns: 1fr; }
  .lp-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .lp-tabs button { justify-content: center; padding: .55rem .4rem; font-size: .8rem; }
  .lp-stats b { font-size: 1.35rem; }
  .lp-stats > div { padding: .9rem; }
  .lp-cta .btn { flex: 1 1 100%; }
  .lp-marquee { animation-duration: 26s; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-marquee, .lp-final-glow, .hero3d-fallback span, .lp-badge .dot { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
