/* HabiVox Motion-System: ruhige, professionelle Bewegung. Regeln siehe DESIGN_SYSTEM.md ("Bewegung").
   Nur Opacity/Transform/Farbe werden animiert (GPU-freundlich, kein Layout-Springen).
   Wird NACH theme.css/enduser.css/admin-studio.css geladen. */
:root {
  --hv-dur-fast: 140ms;
  --hv-dur-base: 220ms;
  --hv-dur-slow: 420ms;
  --hv-ease: cubic-bezier(.22, .61, .36, 1);
  --hv-ease-in-out: cubic-bezier(.45, 0, .2, 1);
}

@keyframes hv-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hv-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }

/* Seitenaufbau: Karten/Panels steigen sanft ein, gestaffelt (max. 6 Stufen) */
.card, .panel, .stat-card, .profile.show, .login-card, .industry-card, .type-option {
  animation: hv-rise var(--hv-dur-slow) var(--hv-ease) backwards;
}
:is(.card, .panel, .stat-card, .industry-card, .type-option):nth-child(2) { animation-delay: 50ms; }
:is(.card, .panel, .stat-card, .industry-card, .type-option):nth-child(3) { animation-delay: 100ms; }
:is(.card, .panel, .stat-card, .industry-card, .type-option):nth-child(4) { animation-delay: 150ms; }
:is(.card, .panel, .stat-card, .industry-card, .type-option):nth-child(5) { animation-delay: 190ms; }
:is(.card, .panel, .stat-card, .industry-card, .type-option):nth-child(n+6) { animation-delay: 220ms; }

/* Interaktive Elemente: Farb-/Rahmenwechsel weich, Druck-Rückmeldung kurz */
button, .btn, a.btn, a.primary, .tab-btn, .chip, .lang-switch button, .acct-link, .slot-btn, .progress button {
  transition: background-color var(--hv-dur-base) var(--hv-ease), border-color var(--hv-dur-base) var(--hv-ease),
    color var(--hv-dur-base) var(--hv-ease), box-shadow var(--hv-dur-base) var(--hv-ease), transform var(--hv-dur-fast) var(--hv-ease);
}
button:active:not(:disabled), a.btn:active, a.primary:active, .slot-btn:active { transform: scale(.98); }
input, select, textarea { transition: border-color var(--hv-dur-base) var(--hv-ease), box-shadow var(--hv-dur-base) var(--hv-ease), background-color var(--hv-dur-base) var(--hv-ease); }

/* Aufklappbare Bereiche (Einstellungen): Inhalt blendet beim Öffnen ein, Pfeil dreht sich weich */
.panel[data-settings-group]:not(.collapsed) > .body { animation: hv-fade var(--hv-dur-base) var(--hv-ease) backwards; }
.panel[data-settings-group] > h2::after { transition: transform var(--hv-dur-base) var(--hv-ease); }

/* Meldungen, Dialoge, Popups */
.msg:not(:empty), .field-error:not(:empty), .demo-msg:not(:empty) { animation: hv-fade var(--hv-dur-base) var(--hv-ease) backwards; }
.hv-dlg-back { animation: hv-fade var(--hv-dur-base) var(--hv-ease) backwards; }
.hv-dlg, .hv-pop, .hv-listbox { animation: hv-pop var(--hv-dur-base) var(--hv-ease) backwards; }

/* Sprungmarken und Seitenwechsel innerhalb einer Seite */
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
