/* trust above fame business — design system */
:root {
  --bg: #000000;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --panel: #141414;
  --panel2: #1c1c1c;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --muted: #737373;
  --accent: #ffffff;
  --accent2: #ffffff;
  --accent-dim: rgba(255, 255, 255, 0.72);
  --danger: #ff4444;
  --warn: #a3a3a3;
  --rising: #ffffff;
  --stable: #a3a3a3;
  --declining: #525252;
  --critical: #ff4444;
  --radius: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  --shadow-hi: 0 20px 56px rgba(0, 0, 0, 0.7);
  --ring: none;
  --grad: #ffffff;
  --grad-green: #ffffff;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --mono-1: #ffffff;
  --mono-2: #d4d4d4;
  --mono-3: #a3a3a3;
  --mono-4: #737373;
  --mono-5: #525252;
  --mono-6: #404040;
}

@keyframes taf-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes taf-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes taf-scale-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes taf-line-draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.taf-brand {
  display: inline-block;
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--text);
}

.taf-brand-mark {
  font-weight: 700;
  letter-spacing: 0.06em;
}

.taf-brand-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

::selection {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.btn-primary,
button.btn-primary {
  background: var(--text) !important;
  color: var(--bg) !important;
  border: 1px solid var(--text) !important;
  box-shadow: none !important;
  font-weight: 600;
  transition: opacity 0.2s var(--ease-out-quart), transform 0.2s var(--ease-out-quart);
}

.btn-primary:hover,
button.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  filter: none !important;
}

@keyframes taf-rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes taf-card-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes taf-value-pop {
  from { opacity: 0; transform: translateY(10px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes taf-avatar-in {
  from { opacity: 0; transform: scale(0.88); }
  to { opacity: 1; transform: scale(1); }
}

#artist-main.taf-preload { opacity: 0; }
#artist-main.taf-ready { opacity: 1; transition: opacity 0.35s var(--ease-out-expo); }

.taf-enter-pending {
  opacity: 0 !important;
  transform: translateY(22px);
  animation: none !important;
}

.taf-enter-active {
  animation: taf-rise-in 0.8s var(--ease-out-expo) both;
}

.taf-enter-active.taf-avatar-pop {
  animation: taf-avatar-in 0.85s var(--ease-out-expo) both;
}

.release-career-card.taf-card-pending {
  opacity: 0;
  transform: translateY(18px) scale(0.96);
}

.release-career-card.taf-card-enter {
  animation: taf-card-rise 0.65s var(--ease-out-expo) both;
}

.kpi-value.taf-value-enter {
  animation: taf-value-pop 0.7s var(--ease-out-expo) both;
}

.kpi-delta.taf-delta-pending {
  opacity: 0;
  transform: translateY(6px);
}

.kpi-delta.taf-delta-enter {
  animation: taf-rise-in 0.55s var(--ease-out-expo) both;
}

#header-kpis .kpi.taf-refresh-pulse {
  animation: taf-kpi-pulse 0.65s var(--ease-out-expo) both;
}

@keyframes taf-kpi-pulse {
  0% { transform: scale(1); border-color: var(--border); }
  40% { transform: scale(1.015); border-color: var(--border-strong); }
  100% { transform: scale(1); border-color: var(--border); }
}

@keyframes taf-sync-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#scrape-btn.taf-syncing {
  pointer-events: none;
  opacity: 0.85;
}

#scrape-btn.taf-syncing::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: taf-sync-spin 0.75s linear infinite;
}

.release-career-year-label.taf-year-enter {
  animation: taf-rise-in 0.5s var(--ease-out-expo) both;
}

.vector-big-score.taf-value-enter {
  animation: taf-value-pop 0.85s var(--ease-out-expo) both;
}

.vector-big-fill {
  transition: width 1.1s var(--ease-out-expo), background-color 0.35s ease;
}

.breadcrumb.taf-enter-active { animation-duration: 0.65s; }

.reveal,
.taf-reveal {
  animation: taf-rise-in 0.75s var(--ease-out-expo) both;
}

/* Уважаем системную настройку «меньше движения»: глушим анимации/переходы.
   Бонус — страховка от заморозки rAF-анимаций Chart.js в Safari на этих страницах. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
