/* ============================================================================
   hero-deco.css — capas decorativas del hero, compartidas entre superficies
   ----------------------------------------------------------------------------
   Estas reglas vivian en home-rubro.css (hoja que SOLO carga la home publica).
   La home del alumno logueado monta el mismo markup (_HomeHeroDecoration) dentro
   de `.student-hero-decoration`, asi que la pintura/geometria/animacion de cada
   capa se movio aca para que ambas superficies consuman UNA sola definicion.

   Que quedo en home-rubro.css: el posicionamiento por rubro
   (`body.home-skin-<rubro> .home-hero-banner .hero-*`), que ademas hace de gate
   del rubro en la home publica. Aca abajo va el equivalente para el alumno.

   La deco de tech (`.hero-matrix`) ya vivia en site.css (global) y no se toca.
   Arte no lleva deco: sus washes van en el propio fondo del hero.

   Cargar en toda vista que renderice `_HomeHeroDecoration`.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. POSICIONAMIENTO EN LAS SUPERFICIES LOGUEADAS
   Espeja `body.home-skin-<rubro> .home-hero-banner .hero-*` de home-rubro.css.
   No hace falta gate por rubro: la vista solo emite la capa del rubro del tenant.

   Dos wrappers montan el mismo markup y comparten estas reglas:
     .home-alumno-skin  -> home del alumno logueado
     .rubro-skin        -> Mi aula, Mensajes y Perfil (admin, profesor y alumno)
   ---------------------------------------------------------------------------- */
.home-alumno-skin .student-hero-decoration .hero-industrial,
.home-alumno-skin .student-hero-decoration .hero-edu-deco,
.rubro-skin .student-hero-decoration .hero-industrial,
.rubro-skin .student-hero-decoration .hero-edu-deco {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.home-alumno-skin .student-hero-decoration .hero-biz-grid,
.home-alumno-skin .student-hero-decoration .hero-biz-candles,
.home-alumno-skin .student-hero-decoration .hero-bars,
.home-alumno-skin .student-hero-decoration .hero-notes,
.rubro-skin .student-hero-decoration .hero-biz-grid,
.rubro-skin .student-hero-decoration .hero-biz-candles,
.rubro-skin .student-hero-decoration .hero-bars,
.rubro-skin .student-hero-decoration .hero-notes {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

/* .hero-matrix (tech) trae posicion e inset de site.css; solo le falta el
   z-index explicito, igual que hace home-rubro.css para el hero de Info. */
.home-alumno-skin .student-hero-decoration .hero-matrix,
.rubro-skin .student-hero-decoration .hero-matrix { z-index: 0; }

.home-alumno-skin .student-hero-decoration .hero-net,
.rubro-skin .student-hero-decoration .hero-net {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.5;
    overflow: hidden;
    pointer-events: none;
}

.home-alumno-skin .student-hero-decoration .hero-pulse,
.rubro-skin .student-hero-decoration .hero-pulse {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;
    z-index: 0;
    opacity: 0.5;
    overflow: hidden;
    pointer-events: none;
}

/* El hero del alumno es mas bajo que el banner publico: las capas que se apoyan
   en el borde inferior se recortan para no comerse el texto. */
.home-alumno-skin .student-hero-decoration .hero-bars,
.rubro-skin .student-hero-decoration .hero-bars { height: 92px; }
.home-alumno-skin .student-hero-decoration .hero-biz-candles,
.rubro-skin .student-hero-decoration .hero-biz-candles { height: 120px; }
.home-alumno-skin .student-hero-decoration .hero-pulse,
.rubro-skin .student-hero-decoration .hero-pulse { height: 88px; }

/* ----------------------------------------------------------------------------
   2. CAPAS (movidas tal cual desde home-rubro.css)
   ---------------------------------------------------------------------------- */

/* ---- Tecnica y oficios — glow industrial + chispas ---- */
.hero-industrial-glow {
    position: absolute;
    top: -12%;
    right: -8%;
    width: 540px;
    height: 540px;
    max-width: 80%;
    background: radial-gradient(circle, rgba(255, 188, 69, 0.22), transparent 65%);
}
.hero-spark {
    position: absolute;
    bottom: -12px;
    width: var(--spark-size, 3px);
    height: var(--spark-size, 3px);
    border-radius: 50%;
    background: var(--skin-amber, #ffbc45);
    box-shadow: 0 0 6px rgba(255, 188, 69, 0.85);
    opacity: 0;
    animation: hero-spark-rise var(--spark-d, 6s) linear infinite;
    animation-delay: var(--spark-delay, 0s);
}
@keyframes hero-spark-rise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    12% { opacity: var(--spark-o, 0.9); }
    85% { opacity: var(--spark-o, 0.9); }
    100% { transform: translateY(-360px) scale(0.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-spark { animation: none; opacity: 0; }
}

/* ---- Negocios — grilla dorada + candlesticks ---- */
.hero-biz-grid {
    inset: 0;
    background:
        radial-gradient(circle at 80% 12%, rgba(224, 191, 99, 0.2) 0%, transparent 55%),
        linear-gradient(rgba(224, 191, 99, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(224, 191, 99, 0.05) 1px, transparent 1px);
    background-size: 100% 100%, 52px 52px, 52px 52px;
    background-repeat: no-repeat, repeat, repeat;
}
.hero-biz-candles {
    inset: auto 0 0 0;
    height: 170px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 14px;
    padding: 0 9%;
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(to top, #000 35%, transparent 100%);
    mask-image: linear-gradient(to top, #000 35%, transparent 100%);
}
.hero-biz-candle {
    position: relative;
    width: 10px;
    height: var(--candle-h, 30px);
    margin-bottom: var(--candle-o, 0px);
    border-radius: 2px;
    transform-origin: bottom;
    animation: hero-biz-candle-rise 2.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-biz-candle.is-positive { background: var(--skin-gold, #e0bf63); box-shadow: 0 0 10px rgba(224, 191, 99, 0.45); }
.hero-biz-candle.is-negative { background: rgba(224, 191, 99, 0.3); }
.hero-biz-candle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -9px;
    bottom: -9px;
    width: 2px;
    transform: translateX(-50%);
    background: inherit;
    opacity: 0.6;
}
@keyframes hero-biz-candle-rise {
    from { transform: scaleY(0); opacity: 0; }
    to { transform: scaleY(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-biz-candle { animation: none; }
}

/* ---- Musica — ecualizador de barras + notas flotantes ---- */
.hero-bars {
    inset: auto 0 0 0;
    height: 130px;
    display: flex;
    align-items: flex-end;
    gap: 5px;
    padding: 0 2vw;
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(to top, #000 40%, transparent 100%);
    mask-image: linear-gradient(to top, #000 40%, transparent 100%);
}
.hero-bar {
    flex: 1;
    height: var(--bar-h, 30px);
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--skin-cyan, #42e7ff), rgba(66, 231, 255, 0.05));
    opacity: var(--bar-o, 0.6);
    transform-origin: bottom;
    animation: hero-bar-eq var(--bar-d, 2s) ease-in-out infinite;
    animation-delay: var(--bar-delay, 0s);
}
@keyframes hero-bar-eq {
    0%, 100% { transform: scaleY(var(--bar-min, 0.3)); }
    50% { transform: scaleY(var(--bar-max, 1)); }
}
.hero-notes { inset: 0; overflow: hidden; }
.hero-notes span {
    position: absolute;
    color: var(--skin-cyan, #42e7ff);
    opacity: 0.32;
    font-size: 1.5rem;
    animation: hero-note-float 7s ease-in-out infinite;
}
.hero-notes span:nth-child(1) { left: 8%; top: 32%; font-size: 1.3rem; animation-delay: 0s; }
.hero-notes span:nth-child(2) { left: 18%; top: 64%; font-size: 1.7rem; animation-delay: -1.4s; }
.hero-notes span:nth-child(3) { left: 74%; top: 28%; font-size: 1.4rem; animation-delay: -2.6s; }
.hero-notes span:nth-child(4) { left: 86%; top: 58%; font-size: 1.9rem; animation-delay: -3.8s; }
.hero-notes span:nth-child(5) { left: 44%; top: 18%; font-size: 1.2rem; animation-delay: -0.8s; }
.hero-notes span:nth-child(6) { left: 60%; top: 70%; font-size: 1.6rem; animation-delay: -5s; }
@keyframes hero-note-float {
    0%, 100% { transform: translateY(0) rotate(-6deg); opacity: 0.22; }
    50% { transform: translateY(-24px) rotate(8deg); opacity: 0.5; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-bar { animation: none; transform: scaleY(var(--bar-min, 0.4)); }
    .hero-notes span { animation: none; }
}

/* ---- Fitness — linea de pulso (ECG) ---- */
.hero-pulse svg { width: 200%; height: 100%; display: block; }
.hero-pulse-line {
    fill: none;
    stroke: var(--skin-lime, #68f6ba);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(104, 246, 186, 0.7));
    animation: hero-pulse-move 6s linear infinite;
}
@keyframes hero-pulse-move {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-pulse-line { animation: none; }
}

/* ---- Educacion — glifos academicos flotantes ---- */
.hero-edu-deco-item {
    position: absolute;
    color: var(--skin-edu, #7d9bc9);
    opacity: var(--edu-opacity, 0.3);
    animation: hero-edu-float var(--edu-float-duration, 6s) ease-in-out infinite,
               hero-edu-twinkle var(--edu-twinkle-duration, 2.4s) ease-in-out infinite;
}
@keyframes hero-edu-float {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-22px) rotate(5deg); }
}
@keyframes hero-edu-twinkle {
    0%, 100% { opacity: calc(var(--edu-opacity, 0.3) * 0.55); }
    50% { opacity: var(--edu-opacity, 0.3); filter: brightness(var(--edu-brightness, 1.3)); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-edu-deco-item { animation: none; }
}

/* ---- Otros — red de nodos SVG ---- */
.hero-net svg { width: 100%; height: 100%; display: block; }
.hero-net line { stroke: rgba(169, 182, 255, 0.35); stroke-width: 1; }
.hero-net circle { fill: var(--skin-peri, #a9b6ff); }
.hero-net .hero-net-dot {
    animation: hero-net-pulse 3.5s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}
@keyframes hero-net-pulse {
    0%, 100% { opacity: 0.4; r: 3; }
    50% { opacity: 1; r: 5; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-net .hero-net-dot { animation: none; }
}
