/* ============================================================
   PRIME STATA — HOME STYLES (page-specific)
   Notes:
   - Keep this file ONLY for home-only components.
   - Do not redefine global typography/layout tokens here.
============================================================ */

/* ============================================================
   HOME HERO MODULE: MOTION FRAME (canvas)
   Placement: hero-motion block inside hero-content
============================================================ */

.hero-motion{
  width: min(900px, 92vw);
  margin: 1.35rem auto 1.25rem;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  box-shadow: 0 26px 90px rgba(0,0,0,0.28);
  position: relative;          /* REQUIRED */
  transform: translateZ(0);
}

/* canvas fills the frame */
#hero-motion-canvas{
  width: 100%;
  height: clamp(180px, 26vw, 320px);
  display: block;
  aspect-ratio: 16 / 9;
}

/* subtle premium sheen */
.hero-motion-overlay{
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 120% at 70% 35%, rgba(70,120,255,0.18), rgba(255,255,255,0.02) 55%),
    radial-gradient(90% 90% at 20% 70%, rgba(0,0,0,0.14), transparent 55%);
}

/* hover lift */
@media (hover:hover){
  .hero-motion{
    transition: transform 240ms ease, box-shadow 240ms ease;
  }
  .hero-motion:hover{
    transform: translateY(-4px);
    box-shadow: 0 34px 110px rgba(0,0,0,0.34);
  }
}

@media (prefers-reduced-motion: reduce){
  .hero-motion:hover{ transform: none; }
}

/* ============================================================
   HOME SIGNATURE MODULE #1A: KPI CONSOLE (micro-bars)
============================================================ */

.kpi-console {
  margin: 1.75rem auto 2.75rem; /* adds space below */
  max-width: 1120px;
  padding: 0 1.25rem;
  position: relative;
}

/* subtle visual separation from next section */
.kpi-console::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1.75rem;
  transform: translateX(-50%);
  width: 140px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(0, 0, 0, 0.08),
    transparent
  );
}

.kpi-console-inner {
  border-radius: 18px;
  padding: 1.1rem 1.1rem 1.25rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
}

.kpi-console-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0.25rem 0.85rem;
}

.kpi-console-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  opacity: 0.95;
}

.kpi-console-sub {
  font-size: 0.92rem;
  opacity: 0.7;
}

.kpi-console-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.kpi-tile {
  grid-column: span 3;
  border-radius: 16px;
  padding: 1rem 1rem 0.9rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
  overflow: hidden;
  position: relative;
}

.kpi-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.kpi-metric {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-size: clamp(1.55rem, 2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kpi-num {
  font-variant-numeric: tabular-nums;
}

.kpi-suffix {
  opacity: 0.85;
  font-size: 0.95em;
}

.kpi-tag {
  font-size: 0.78rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.10);
  opacity: 0.85;
  white-space: nowrap;
}

.kpi-label {
  margin-top: 0.55rem;
  font-weight: 650;
  font-size: 0.98rem;
  opacity: 0.95;
}

.kpi-sub {
  margin-top: 0.35rem;
  font-size: 0.88rem;
  line-height: 1.35;
  opacity: 0.72;
}

.kpi-bars {
  margin-top: 0.85rem;
  height: 26px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 6px;
  align-items: end;
  opacity: 0.75;
}

.kpi-bars span {
  height: var(--h);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
  transform-origin: bottom;
  transform: scaleY(0.35);
  transition: transform 600ms ease;
}

/* Bars "wake up" when JS adds .kpi-live */
.kpi-tile.kpi-live .kpi-bars span {
  transform: scaleY(1);
}

@media (max-width: 980px) {
  .kpi-tile { grid-column: span 6; }
  .kpi-console-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .kpi-tile { grid-column: span 12; }
}



/* =========================================================
HOME: MOTION BANNER (home-only)
========================================================= */
.ps-motion-banner{
  width: 100%;

  /* tighter + cleaner hero→banner handoff */
  margin: clamp(10px, 2.2vw, 18px) auto 0; /* was 18–34px */
  padding: 0 clamp(14px, 3vw, 22px);

  position: relative;
  z-index: 1;
  transform: translateY(-6px); /* subtle “nesting” into hero spacing */
}

.ps-motion-shell{
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: clamp(200px, 24vw, 320px);
  max-width: 1180px;
  margin: 0 auto;

  /* “glass” frame */
  background: radial-gradient(1200px 520px at 15% 20%, rgba(120, 180, 255, 0.16), transparent 55%),
              radial-gradient(900px 460px at 85% 70%, rgba(120, 255, 210, 0.12), transparent 60%),
              rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 60px rgba(0,0,0,0.25);

  /* perf isolation */
  contain: layout paint;
  isolation: isolate;
}

#ps-motion-canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ps-motion-shell::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* subtle sheen + vignette */
  background:
    linear-gradient(120deg, rgba(255,255,255,0.06), transparent 35%, rgba(255,255,255,0.03)),
    radial-gradient(900px 380px at 50% 30%, transparent 35%, rgba(0,0,0,0.28));
  opacity: 0.95;
}

.ps-motion-overlay{
  position: relative;
  z-index: 2;
  padding: clamp(18px, 3vw, 28px);
  max-width: 620px;
}

.ps-motion-kicker{
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.78;
  margin-bottom: 0.55rem;
}

.ps-motion-title{
  margin: 0 0 0.6rem;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  line-height: 1.12;
}

.ps-motion-sub{
  margin: 0;
  opacity: 0.82;
  max-width: 52ch;
}

.ps-motion-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.ps-motion-tags span{
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-size: 0.86rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  opacity: 0.92;
}

/* Mobile: keep it elegant, not cramped */
@media (max-width: 560px){
  .ps-motion-overlay{ max-width: 100%; }
  .ps-motion-tags span{ font-size: 0.82rem; }
}

/* Reduced motion: keep it as a static “panel” */
@media (prefers-reduced-motion: reduce){
  #ps-motion-canvas{ display: none; }
}