/* The House of Routing — hero de cada sección del menú principal (Academia, Mi escritorio, Tienda, Blog, Contacto).
   Lo inserta scripts/heroes_menu.py entre las marcas <!-- menu-hero:start --> y <!-- menu-hero:end -->. */
.mh { position: relative; overflow: hidden; background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
.mh::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(560px 420px at 80% 52%, color-mix(in srgb, var(--route) 7%, transparent), transparent 70%); }
.mh-in { position: relative; max-width: 1200px; margin: 0 auto; padding: 24px 24px 72px; }
.mh .rt-crumbs, .mh .bl-crumbs { margin: 0 0 40px; padding: 0; }
.mh-row { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.mh-tx { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.mh-k { margin: 0; font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--focus); }
.mh-h { margin: 0; font-family: var(--font-display); font-size: clamp(40px, 5.4vw, 70px); line-height: 1.03; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.mh-h em { font-style: normal; color: var(--route); }
.mh-lead { margin: 0; max-width: 560px; font-size: 19px; line-height: 30px; color: var(--ink-muted); }
.mh .rt-meta { margin: 0; }
.mh-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 8px; }
.mh-cta { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 28px; border: 0; background: none; color: var(--on-route); font: 600 16px var(--font-sans); text-decoration: none; cursor: pointer; }
.mh-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--route); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 7px, 100% 100%, 12px 100%, 0 calc(100% - 7px)); transition: filter .15s ease; }
.mh-cta:hover::before { filter: brightness(1.1); }
.mh-cta:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.mh-cta svg, .mh-cta2 svg { width: 18px; height: 18px; flex: none; transition: transform .2s ease; }
.mh-cta:hover svg:last-child { transform: translateX(3px); }
.mh-cta2 { display: inline-flex; align-items: center; gap: 9px; min-height: 50px; padding: 0 22px; border: 1px solid var(--line-strong); color: var(--ink); font: 600 16px var(--font-sans); text-decoration: none; transition: border-color .15s ease, color .15s ease; }
.mh-cta2:hover, .mh-cta2:focus-visible { border-color: var(--route); color: var(--route-text); }
.mh-art { flex: 1 1 440px; min-width: 0; max-width: 580px; margin: 0 auto; }
.mh-art > svg { display: block; width: 100%; height: auto; overflow: visible; }
.mh-cap { margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--ink-muted); }
.mh-cap b { margin-right: 6px; font-family: var(--font-mono); letter-spacing: .14em; color: var(--ink); }

/* ---- Ilustraciones SVG (colores del tema claro/oscuro) ---- */
.mh-art text { font-family: var(--font-sans); fill: var(--ink); }
.mh-art .t-mono { font-family: var(--font-mono); }
.mh-art .t-disp { font-family: var(--font-display); }
.mh-art .t-mut { fill: var(--ink-muted); }
.mh-art .t-route { fill: var(--route-text); }
.mh-art .t-prem { fill: var(--premium); }
.mh-art .t-inv { fill: var(--ink-inverse); }
.mh-art .t-onr { fill: var(--on-route); }
.mh-art .t-brand { fill: var(--focus); }
.mh-art .f-route { fill: var(--route); }
.mh-art .f-prem { fill: var(--premium-fill); }
.mh-art .f-focus { fill: var(--focus); }
.mh-art .f-ok { fill: var(--ok); }
.mh-art .f-inv { fill: var(--surface-inverse); }
.mh-art .f-strong { fill: var(--line-strong); }
.mh-art .s-line { fill: none; stroke: var(--line); stroke-width: 1.5; }
.mh-art .s-dash { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 2 9; stroke-linecap: round; }
.mh-art .ic { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; color: var(--ink); overflow: visible; }
.mh-art .ic-inv { color: var(--ink-inverse); }
.mh-art a { cursor: pointer; }
.mh-art a:focus-visible { outline: none; }

/* Academia: panal de A a B */
.mh-hx { transform-box: fill-box; transform-origin: center; transition: transform .25s ease; }
.mh-hx .o { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.mh-hx .b { fill: var(--surface-raised); stroke: var(--brand); stroke-width: 2; transition: stroke .2s ease; }
.mh-hx.is-gold .b { stroke: var(--premium); }
.mh-hx .c { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .14em; fill: var(--ink-muted); }
.mh-hx.is-gold .c { fill: var(--premium); }
.mh-hx .n { font-size: 12px; font-weight: 600; }
.mh-art a:hover .mh-hx, .mh-art a:focus-visible .mh-hx { transform: translateY(-4px); }
.mh-hx.is-on .b { fill: color-mix(in srgb, var(--route) 9%, var(--surface-raised)); stroke: var(--route); stroke-width: 3; }
.mh-hx.is-on .c { fill: var(--route-text); }
.mh-art a:hover .mh-hx .b, .mh-art a:focus-visible .mh-hx .b { stroke: var(--route); stroke-width: 2.5; }
.mh-route-glow, .mh-route, .mh-trav { pointer-events: none; }
.mh-route-glow { fill: none; stroke: var(--route); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; opacity: .12; }
.mh-route { fill: none; stroke: var(--route); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: mh-draw 7s cubic-bezier(.6, 0, .2, 1) infinite; }
.mh-trav { fill: var(--route); }
.mh-pa { fill: var(--surface); stroke: var(--route); stroke-width: 3; }
.mh-pulse { fill: none; stroke: var(--route); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: mh-pulse 2.4s ease-out infinite; }
.mh-pulse.d2 { animation-delay: 1.2s; }

/* Mi escritorio: panel de progreso */
.mh-win { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; filter: drop-shadow(0 18px 30px color-mix(in srgb, var(--brand) 14%, transparent)); }
.mh-track { fill: none; stroke: var(--line); stroke-width: 14; }
.mh-ring { fill: none; stroke: var(--route); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: mh-ring 2.2s .3s cubic-bezier(.2, .8, .2, 1) forwards; }
.mh-tr { fill: var(--line); }
.mh-bar { transform-box: fill-box; transform-origin: left center; transform: scaleX(0); animation: mh-grow 1.6s cubic-bezier(.2, .8, .2, 1) forwards; }
.mh-pop { transform-box: fill-box; transform-origin: center; animation: mh-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.mh-chk { fill: none; stroke: var(--on-premium); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

/* Tienda: órbita de herramientas */
.mh-orbit { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 3 10; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: mh-spin 50s linear infinite; }
.mh-flow { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 5 9; animation: mh-flow 1.4s linear infinite; }
.mh-halo { fill: none; stroke: var(--line); stroke-width: 1.5; }
.mh-chip { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.mh-badge { transform-box: fill-box; transform-origin: center; animation: mh-bob 3s ease-in-out infinite; }

/* Blog: consola */
.mh-paper { fill: var(--surface-raised); stroke: var(--line); stroke-width: 1.5; }
.mh-term { fill: #0B1F3A; stroke: var(--line-strong); stroke-width: 1.5; filter: drop-shadow(0 18px 30px #0B1F3A33); }
.mh-art .tt { fill: #F1F5FA; }
.mh-art .tm { fill: #A6B7CD; }
.mh-art .tg { fill: #3FCB80; }
.mh-art .tr { fill: #F5654F; }
.mh-art .tl { fill: none; stroke: #18396A; stroke-width: 1.5; }
.mh-art .ttrack { fill: #18396A; }
.mh-art .tbar { fill: #F0503A; }
.mh-art .tdot { fill: #3FCB80; }
.mh-cur { fill: #F1F5FA; animation: mh-cur 1s steps(1) infinite; }
.mh-tag { fill: none; stroke: var(--line-strong); stroke-width: 1.2; }

/* Contacto: punto que parpadea */
.mh-wave { fill: none; stroke: var(--route); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; animation: mh-wave 3.6s ease-out infinite; }
.mh-node { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; transition: stroke .2s ease; }
.mh-art a:hover .mh-node, .mh-art a:focus-visible .mh-node { stroke: var(--route); stroke-width: 2.5; }
.mh-blink { animation: mh-blink 1.4s ease-in-out infinite; }
.mh-glow { fill: var(--route); opacity: .25; transform-box: fill-box; transform-origin: center; animation: mh-glow 1.4s ease-in-out infinite; }

@keyframes mh-draw { 0% { stroke-dashoffset: 1; } 45% { stroke-dashoffset: 0; } 82% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@keyframes mh-pulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(2.9); opacity: 0; } }
@keyframes mh-ring { to { stroke-dashoffset: 28; } }
@keyframes mh-grow { to { transform: scaleX(1); } }
@keyframes mh-pop { from { transform: scale(0); } }
@keyframes mh-spin { to { transform: rotate(360deg); } }
@keyframes mh-flow { to { stroke-dashoffset: -28; } }
@keyframes mh-bob { 50% { transform: translateY(-6px) rotate(-6deg); } }
@keyframes mh-cur { 50% { opacity: 0; } }
@keyframes mh-wave { 0% { transform: scale(.22); opacity: .75; } 100% { transform: scale(1); opacity: 0; } }
@keyframes mh-blink { 50% { opacity: .35; } }
@keyframes mh-glow { 50% { transform: scale(1.9); opacity: 0; } }

/* Títulos que pasaron de h1 a h2 al llegar el hero */
.bl-hero h2#bl-feat, .bl-hero h2#ct-t { margin: 12px 0 14px; font-family: var(--font-display); font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.bl-hero h2#bl-feat a { color: inherit; text-decoration: none; }

@media (max-width: 560px) {
  .mh-in { padding: 20px 16px 56px; }
  .mh .rt-crumbs, .mh .bl-crumbs { margin-bottom: 28px; }
  .mh-row { gap: 36px; }
  .mh-lead { font-size: 17px; line-height: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .mh-art *, .mh-art *::before { animation: none !important; transition: none !important; }
  .mh-route { stroke-dashoffset: 0; }
  .mh-ring { stroke-dashoffset: 28; }
  .mh-bar { transform: none; }
  .mh-trav, .mh-wave, .mh-pulse, .mh-glow { display: none; }
}
