/* ============================================================
   THE LIVING MENU HEART — living-heart.css
   Commissioned by James Price, Nov 9, 2026.
   The electronic winged heart, alive on the page:
   - it BREATHES (slow ~4s pulse of scale and glow),
   - STARDUST / SUNLIGHT FALLS around it (see living-heart.js),
   - its OUTLINE changes colors — the living color rides the
     glowing line that traces the heart ONLY (blue at the top,
     green down the sides, gold at the point, traveling).
   The golden wings stay gold, the marble E stays marble, the
   halo keeps its own glow. Nothing around the heart is shaded
   or color-matched: boxes, frames and page furniture stay
   neutral and unchanged. The color life is the heart's alone.
   ============================================================ */

.lmh{
  position:relative;
  width:100%;
  max-width:520px;
  margin-inline:auto;
  line-height:0;
  -webkit-tap-highlight-color:transparent;
}

/* the heart's own soft breathing light, immediately around it —
   a warm neutral halo of light, never a shaded box */
.lmh::before{
  content:"";
  position:absolute;
  inset:-6%;
  background:radial-gradient(closest-side, rgba(255,216,150,.20), rgba(255,216,150,.05) 55%, transparent 72%);
  animation:lmhHaloBreath 4s ease-in-out infinite;
  pointer-events:none;
}
@keyframes lmhHaloBreath{
  0%,100%{opacity:.55; transform:scale(.985)}
  50%{opacity:1; transform:scale(1.02)}
}

/* the breath itself */
.lmh-breathe{
  position:relative;
  animation:lmhBreath 4s ease-in-out infinite;
  transform-origin:50% 55%;
}
@keyframes lmhBreath{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.028)}
}

.lmh-art{
  width:100%;
  height:auto;
  display:block;
}

/* --- the living outline: an SVG heart-line laid exactly over the
       painted outline, blended as light (screen) so the art itself
       is never distorted or recolored --- */
.lmh-outline{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  mix-blend-mode:screen;
  pointer-events:none;
  overflow:visible;
}
.lmh-line{
  fill:none;
  stroke:url(#lmhGrad);
  stroke-linecap:round;
  stroke-linejoin:round;
}
.lmh-line-core{ stroke-width:9;  opacity:.95; }
.lmh-line-glow{
  stroke-width:27;
  opacity:.45;
  filter:blur(7px);
  animation:lmhGlowPulse 4s ease-in-out infinite;
}
@keyframes lmhGlowPulse{
  0%,100%{opacity:.34}
  50%{opacity:.60}
}

/* the color travel: the blue → green → gold family perpetually
   journeys around the outline — each stop takes the next color
   in turn, phase-shifted, so the colors move along the line */
.lmh-stop-a{ stop-color:#37c8ff; animation:lmhTravelA 12s linear infinite; }
.lmh-stop-b{ stop-color:#3ddc84; animation:lmhTravelB 12s linear infinite; }
.lmh-stop-c{ stop-color:#ffd23e; animation:lmhTravelC 12s linear infinite; }
@keyframes lmhTravelA{
  0%,100%{ stop-color:#37c8ff } 33.33%{ stop-color:#3ddc84 } 66.66%{ stop-color:#ffd23e }
}
@keyframes lmhTravelB{
  0%,100%{ stop-color:#3ddc84 } 33.33%{ stop-color:#ffd23e } 66.66%{ stop-color:#37c8ff }
}
@keyframes lmhTravelC{
  0%,100%{ stop-color:#ffd23e } 33.33%{ stop-color:#37c8ff } 66.66%{ stop-color:#3ddc84 }
}

/* falling stardust / sunlight canvas (driven by living-heart.js) */
.lmh-dust{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
}

/* When the component rests inside the house's grand-entry anchor
   (a.heart on index.html), that page's old still-image rules must
   not reach the component's art — the component keeps its own law.
   (This lives here, in the component's own sheet; the page's own
   styles are untouched.) */
.heart .lmh-art{
  animation:none;
  box-shadow:none;
  border-radius:0;
}

@media (prefers-reduced-motion: reduce){
  .lmh-breathe, .lmh::before, .lmh-line-glow,
  .lmh-stop-a, .lmh-stop-b, .lmh-stop-c{ animation:none }
}
