/* ==============================================
   HERO VISUAL: AI Governance Dashboard
   Swap this file to change the hero visual.
   ============================================== */

/* --- Dashboard Container --- */
.hero-visual {
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  opacity: 0;
  animation: fadeIn 1s ease 0.6s forwards;
}

.hero-dashboard {
  position: relative;
  width: 100%;
  aspect-ratio: 1.05;
  perspective: 900px;
}

.dash-container {
  position: relative;
  width: 100%;
  height: 100%;
  transform: rotateY(-5deg) rotateX(2deg);
  transform-style: preserve-3d;
}

/* --- Base Card --- */
.dash-card {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 4px 24px rgba(15,43,70,0.06);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.dash-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(15,43,70,0.1);
}

.dash-card-header {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s infinite;
}

/* --- Card Positions & Float --- */
.card-registry  { top: 0; left: 3%; width: 56%; z-index: 3; animation: floatA 5s ease-in-out infinite; }
.card-risk       { top: 5%; right: 0; width: 40%; z-index: 4; animation: floatB 6s ease-in-out infinite 0.5s; }
.card-compliance { bottom: 14%; left: 0; width: 48%; z-index: 2; animation: floatC 5.5s ease-in-out infinite 1s; }
.card-feed       { bottom: 3%; right: 2%; width: 47%; z-index: 3; animation: floatD 6.5s ease-in-out infinite 1.5s; }

/* --- Card 1: AI Model Registry --- */
.model-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(226,222,214,0.5);
  opacity: 0;
  animation: slideRow 0.5s ease both;
}
.model-row:nth-child(2) { animation-delay: 0.9s; }
.model-row:nth-child(3) { animation-delay: 1.1s; }
.model-row:nth-child(4) { animation-delay: 1.3s; }
.model-row:nth-child(5) { animation-delay: 1.5s; }
.model-row:last-child { border-bottom: none; }

.model-icon {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.model-icon.blue   { background: #E6F0FF; }
.model-icon.purple { background: #F0E6FF; }
.model-icon.green  { background: #E6FFE8; }
.model-icon.orange { background: #FFF3E0; }

.model-info { flex: 1; min-width: 0; }
.model-name { font-size: 11px; font-weight: 600; color: var(--navy); }
.model-type { font-size: 9px; color: var(--text-light); }

.model-status {
  font-size: 8.5px; font-weight: 600; padding: 2px 7px;
  border-radius: 10px; white-space: nowrap;
}
.model-status.approved { background: #E6F9E8; color: #2B7A3A; }
.model-status.review   { background: #FFF3E0; color: #B8760A; }
.model-status.flagged  { background: #FFE6E6; color: #A73B3B; }

/* --- Card 2: Risk Score Gauge --- */
.risk-gauge {
  display: flex; flex-direction: column; align-items: center; padding: 6px 0;
}
.gauge-svg { width: 90px; height: 54px; }
.gauge-track { fill: none; stroke: var(--border); stroke-width: 6; stroke-linecap: round; }
.gauge-fill {
  fill: none; stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 126;
  stroke-dashoffset: 126;
  animation: gaugeAnim 2s ease 1s forwards;
}
.risk-score-big {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700; color: var(--navy);
  margin-top: 1px; line-height: 1;
}
.risk-score-big .unit { font-size: 13px; color: var(--text-light); font-family: 'DM Sans', sans-serif; }
.risk-label { font-size: 9px; color: var(--text-light); margin-top: 2px; }
.risk-breakdown { display: flex; gap: 14px; margin-top: 8px; justify-content: center; }
.risk-item { text-align: center; }
.risk-item-val { font-size: 13px; font-weight: 700; }
.risk-item-val.high { color: #C44; }
.risk-item-val.med  { color: var(--gold); }
.risk-item-val.low  { color: var(--teal); }
.risk-item-label { font-size: 8px; color: var(--text-light); }

/* --- Card 3: Compliance Bars --- */
.compliance-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.compliance-flag { font-size: 14px; }
.compliance-info { flex: 1; }
.compliance-name { font-size: 10px; font-weight: 600; color: var(--navy); }
.compliance-bar-wrap {
  width: 100%; height: 3.5px;
  background: var(--border); border-radius: 2px;
  margin-top: 3px; overflow: hidden;
}
.compliance-bar { height: 100%; border-radius: 2px; width: 0; }
.compliance-bar.b1 { background: var(--teal); animation: bar87 2s ease 1.2s forwards; }
.compliance-bar.b2 { background: var(--gold); animation: bar62 2s ease 1.5s forwards; }
.compliance-bar.b3 { background: #7C6FDB;    animation: bar45 2s ease 1.8s forwards; }
.compliance-pct { font-size: 9px; font-weight: 600; color: var(--text-muted); min-width: 24px; text-align: right; }

/* --- Card 4: Activity Feed --- */
.feed-item {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(226,222,214,0.4);
  opacity: 0;
  animation: feedIn 0.5s ease both;
}
.feed-item:nth-child(2) { animation-delay: 1.1s; }
.feed-item:nth-child(3) { animation-delay: 1.5s; }
.feed-item:nth-child(4) { animation-delay: 1.9s; }
.feed-item:nth-child(5) { animation-delay: 2.3s; }
.feed-item:last-child { border-bottom: none; }

.feed-dot {
  width: 5px; height: 5px; border-radius: 50%;
  margin-top: 3.5px; flex-shrink: 0;
}
.feed-dot.teal { background: var(--teal); }
.feed-dot.gold { background: var(--gold); }
.feed-dot.red  { background: #C44; }
.feed-dot.blue { background: #4A7FBF; }

.feed-text { font-size: 10px; color: var(--text-muted); line-height: 1.35; }
.feed-text strong { color: var(--navy); font-weight: 600; }
.feed-time { font-size: 8px; color: var(--text-light); margin-top: 1px; }

/* --- Floating Particles --- */
.dash-particle {
  position: absolute;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--teal); opacity: 0.25;
  animation: floatP 6s ease-in-out infinite;
}
.dash-particle:nth-child(1) { top: 12%; left: 0%; }
.dash-particle:nth-child(2) { top: 42%; right: -2%; animation-delay: 1.5s; width: 3px; height: 3px; }
.dash-particle:nth-child(3) { bottom: 22%; left: -2%; animation-delay: 3s; width: 5px; height: 5px; opacity: 0.15; }
.dash-particle:nth-child(4) { top: 3%; right: 18%; animation-delay: 2s; background: var(--gold); opacity: 0.2; }
.dash-particle:nth-child(5) { bottom: 10%; right: 22%; animation-delay: 4s; opacity: 0.15; }

/* --- Dashboard Animations --- */
@keyframes floatA  { 0%,100% { transform: translateY(0); }   50% { transform: translateY(-6px); } }
@keyframes floatB  { 0%,100% { transform: translateY(0); }   50% { transform: translateY(-8px); } }
@keyframes floatC  { 0%,100% { transform: translateY(0); }   50% { transform: translateY(-5px); } }
@keyframes floatD  { 0%,100% { transform: translateY(0); }   50% { transform: translateY(-7px); } }
@keyframes floatP  {
  0%,100% { transform: translateY(0) translateX(0); opacity: 0.2; }
  25%     { transform: translateY(-12px) translateX(6px); opacity: 0.35; }
  50%     { transform: translateY(-6px) translateX(-4px); opacity: 0.2; }
  75%     { transform: translateY(-18px) translateX(8px); opacity: 0.3; }
}
@keyframes slideRow { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes feedIn   { from { opacity: 0; transform: translateY(6px); }  to { opacity: 1; transform: translateY(0); } }
@keyframes pulse    { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes gaugeAnim { to { stroke-dashoffset: 44; } }
@keyframes bar87   { to { width: 87%; } }
@keyframes bar62   { to { width: 62%; } }
@keyframes bar45   { to { width: 45%; } }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-visual { width: 420px; right: 0; }
}

@media (max-width: 900px) {
  .hero-visual { display: none; }
}
