/* Home hero art: one clear idea. A live OEE card on top, three machines below; the idle one turns to running and the OEE goes up.
   8s loop. transform / opacity / stroke only. Starts once in view (.in). */
.hv { position: relative; width: min(100%, 620px); margin-inline: auto; }
.hv-card { position: relative; z-index: 2; padding: 22px 26px 26px; border-radius: 30px; background: #fff; box-shadow: 0 50px 80px -44px rgba(16,33,47,.5), 0 0 0 1px rgba(16,33,47,.05); }
.hv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hv-live { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #3a4a5a; }
.hv-live i { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.hv.in .hv-live i { animation: hvlive 1.8s infinite; }
@keyframes hvlive { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.55); } 70%,100% { box-shadow: 0 0 0 9px rgba(22,163,74,0); } }
.hv-top small { font-size: 11px; font-weight: 600; color: #a0aab5; }
.hv-main { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; margin-top: 18px; }

.hv-ring { position: relative; width: 150px; height: 150px; }
.hv-ring svg { display: block; width: 100%; height: 100%; }
.hv-ring .bg { fill: none; stroke: #f1e4d3; stroke-width: 12; }
.hv-ring .fg { fill: none; stroke: var(--orange); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: .29; }
.hv-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.hv-ring b { position: relative; display: block; font-size: 38px; line-height: 1; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hv-ring b span { display: inline-block; }
.hv-ring .n2 { position: absolute; left: 0; right: 0; opacity: 0; }
.hv-ring small { margin-top: 6px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.hv.in .hv-ring .fg { animation: hvring 8s cubic-bezier(.45,0,.3,1) infinite; }
.hv.in .hv-ring .n1 { animation: hvn1 8s linear infinite; } .hv.in .hv-ring .n2 { animation: hvn2 8s linear infinite; }
@keyframes hvring { 0%,44% { stroke-dashoffset: .29; } 56%,94% { stroke-dashoffset: .22; } 100% { stroke-dashoffset: .29; } }
@keyframes hvn1 { 0%,46% { opacity: 1; } 50%,94% { opacity: 0; } 98%,100% { opacity: 1; } }
@keyframes hvn2 { 0%,46% { opacity: 0; } 52%,94% { opacity: 1; } 98%,100% { opacity: 0; } }

.hv-side { min-width: 0; }
.hv-bars { display: flex; align-items: flex-end; gap: 8px; height: 84px; }
.hv-bars i { flex: 1; height: var(--h); border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #ffb867, #f7861e); transform-origin: bottom; }
.hv-bars i:not(:last-child) { opacity: .5; }
.hv.in .hv-bars i { animation: hvbar 1s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--d); }
.hv.in .hv-bars i:last-child { animation: hvbar 1s cubic-bezier(.16,1,.3,1) both, hvlast 8s ease-in-out 1.2s infinite; animation-delay: var(--d), 1.2s; }
@keyframes hvbar { from { transform: scaleY(.1); } to { transform: scaleY(1); } }
@keyframes hvlast { 0%,44% { transform: scaleY(.72); } 56%,94% { transform: scaleY(1); } 100% { transform: scaleY(.72); } }
.hv-gain { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 0; }
.hv-gain b { font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -.03em; color: #c25e00; }
.hv-gain span { font-size: 13.5px; line-height: 1.3; font-weight: 600; color: var(--mute); }

/* machines: same visual size, same baseline, status pill underneath */
.hv-floor { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 18px; padding-top: 6px; }
.hv-floor::before { content: ""; position: absolute; left: 2%; right: 2%; bottom: 16px; height: 46%; border-radius: 50%; background: radial-gradient(ellipse, rgba(247,134,30,.22), rgba(247,134,30,0) 70%); }
.hv-m { position: relative; margin: 0; display: grid; justify-items: center; gap: 8px; }
.hv-m img { display: block; width: 100%; height: auto; filter: drop-shadow(0 16px 12px rgba(16,33,47,.26)); }
.hv.in .hv-m img { animation: hvfloat 6s ease-in-out infinite; }
.hv.in .hv-m:nth-child(2) img { animation-delay: -2s; } .hv.in .hv-m:nth-child(3) img { animation-delay: -4s; }
@keyframes hvfloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.hv-m figcaption { display: grid; justify-items: center; gap: 6px; }
.hv-m figcaption b { font-size: 12.5px; font-weight: 800; letter-spacing: .02em; color: #1c2c3a; text-align: center; }
.st { position: relative; display: inline-grid; align-items: center; height: 26px; padding: 0 12px 0 26px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 800; }
.st i { position: absolute; left: 10px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #16a34a; }
.st em { grid-area: 1 / 1; font-style: normal; white-space: nowrap; }
.st .b { opacity: 0; }
.st.flip.st { background: #fef3c7; color: #b45309; }
.st.flip i { background: #f59e0b; }
.hv.in .st.flip { animation: hvpill 8s linear infinite; }
.hv.in .st.flip i { animation: hvdot 8s linear infinite; }
.hv.in .st.flip .a { animation: hva 8s linear infinite; } .hv.in .st.flip .b { animation: hvb 8s linear infinite; }
@keyframes hvpill { 0%,45% { background: #fef3c7; color: #b45309; } 50%,94% { background: #dcfce7; color: #15803d; } 98%,100% { background: #fef3c7; color: #b45309; } }
@keyframes hvdot { 0%,45% { background: #f59e0b; } 50%,94% { background: #16a34a; } 98%,100% { background: #f59e0b; } }
@keyframes hva { 0%,46% { opacity: 1; } 50%,94% { opacity: 0; } 98%,100% { opacity: 1; } }
@keyframes hvb { 0%,46% { opacity: 0; } 52%,94% { opacity: 1; } 98%,100% { opacity: 0; } }

@media (max-width: 900px) { .hv { width: min(100%, 540px); } }
@media (max-width: 560px) {
  .hv-card { padding: 18px 18px 20px; border-radius: 24px; }
  .hv-main { grid-template-columns: 1fr; gap: 16px; justify-items: center; }
  .hv-ring { width: 130px; height: 130px; } .hv-ring b { font-size: 32px; }
  .hv-side { width: 100%; } .hv-bars { height: 64px; } .hv-gain { justify-content: center; }
  .hv-m figcaption b { font-size: 10.5px; } .st { height: 23px; font-size: 10.5px; padding: 0 9px 0 22px; } .st i { left: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hv *, .hv *::before { animation: none !important; }
  .hv-ring .n1 { opacity: 0; } .hv-ring .n2 { opacity: 1; } .hv-ring .fg { stroke-dashoffset: .22; }
  .st.flip { background: #dcfce7; color: #15803d; } .st.flip i { background: #16a34a; } .st.flip .a { opacity: 0; } .st.flip .b { opacity: 1; }
}
