/* Hero sample dashboard. Colours from style.css: #428bca primary, #0d1e2d hero overlay. */
@media (min-width: 992px) {
  #hero .hero-split { display: flex; align-items: center; gap: 48px; }
  #hero .hero-text { flex: 1 1 0; min-width: 0; }
  #hero .hero-text p { width: auto; max-width: 34em; }
  .hero-dash { flex: 0 0 340px; max-width: 360px; }
}
@media (max-width: 991px) { .hero-dash { max-width: 420px; margin: 24px auto 0; } }

.hd-inner {
  padding: 18px 20px; border-radius: 8px; color: #fff; font-size: 12px;
  background: rgba(13, 30, 45, .9); border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25); transition: transform .3s ease-out;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .hd-inner { background: rgba(13, 30, 45, .45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
.hd-top, .hd-kpis { display: flex; justify-content: space-between; align-items: center; }
.hd-top { margin-bottom: 10px; }
.hd-live { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: .4px; }
.hd-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #34c759; }
.hd-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #34c759; opacity: 0; animation: hd-pulse 2s ease-out infinite paused; }
.hd-vis .hd-dot::after { animation-play-state: running; }
@keyframes hd-pulse { from { transform: scale(.6); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.hd-muted, .hd-kpis span { color: rgba(255, 255, 255, .85); font-size: 11px; }
.hd-title { font: 700 17px Raleway, sans-serif; margin-bottom: 12px; }
.hd-kpis { gap: 8px; margin-bottom: 14px; }
.hd-kpis > div { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 6px; background: rgba(255, 255, 255, .08); }
.hd-kpis b { display: block; font-size: 22px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hd-spark { display: block; width: 100%; height: auto; }
.hd-line { fill: none; stroke: #428bca; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.hd-cap { margin-top: 4px; }
.hd-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .12); }
.hd-flash { animation: hd-flash .9s ease-out; }
@keyframes hd-flash { from { opacity: .25; } }

/* Phones: compact card (header row keeps "Sample dashboard", KPIs, sparkline). */
@media (max-width: 767px) {
  .hero-dash { margin-top: 16px; }
  .hd-inner { padding: 12px 14px; }
  .hd-title, .hd-cap, .hd-foot { display: none; }
  .hd-kpis { margin-bottom: 8px; }
  .hd-kpis b { font-size: 18px; }
}
/* Short screens: hide it, or it pushes the headline up under the fixed nav. */
@media (max-width: 767px) and (max-height: 819px), (min-width: 768px) and (max-width: 991px) and (max-height: 939px) {
  .hero-dash { display: none; }
}

/* Start states only exist when JS is running to reveal them. */
.js .hero-dash { opacity: 0; transform: translateY(12px); transition: opacity .5s ease-out, transform .5s ease-out; }
.js .hero-dash.hd-in { opacity: 1; transform: none; }
.js .hd-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .hd-area { opacity: 0; }
.hd-draw .hd-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s ease-out .2s; }
.hd-draw .hd-area { opacity: 1; transition: opacity .6s ease-out 1.4s; }

/* Reduced motion: final state, no movement. */
@media (prefers-reduced-motion: reduce) {
  .js .hero-dash, .js .hd-line, .js .hd-area, .hd-inner { opacity: 1; transform: none; stroke-dashoffset: 0; transition: none; }
  .hd-dot::after, .hd-flash { animation: none; }
}
