/* Zavod LMS — premium motion layer */

:root {
  --zl-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --zl-ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --zl-duration: 0.55s;
  --zl-shadow-lift: 0 4px 8px rgba(16, 20, 28, 0.06), 0 20px 48px rgba(16, 20, 28, 0.12);
}

/* Page enter */
.zl-main > .zl-shell {
  animation: zl-page-in 0.65s var(--zl-ease-out) both;
}
@keyframes zl-page-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Reveal on scroll */
.zl-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity var(--zl-duration) var(--zl-ease-out),
    transform var(--zl-duration) var(--zl-ease-out);
  will-change: opacity, transform;
}
.zl-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.zl-reveal-delay-1 { transition-delay: 0.06s; }
.zl-reveal-delay-2 { transition-delay: 0.12s; }
.zl-reveal-delay-3 { transition-delay: 0.18s; }
.zl-reveal-delay-4 { transition-delay: 0.24s; }

/* Stagger children */
.zl-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s var(--zl-ease-out),
    transform 0.5s var(--zl-ease-out);
}
.zl-stagger.is-in > *:nth-child(1) { transition-delay: 0.04s; }
.zl-stagger.is-in > *:nth-child(2) { transition-delay: 0.1s; }
.zl-stagger.is-in > *:nth-child(3) { transition-delay: 0.16s; }
.zl-stagger.is-in > *:nth-child(4) { transition-delay: 0.22s; }
.zl-stagger.is-in > *:nth-child(5) { transition-delay: 0.28s; }
.zl-stagger.is-in > *:nth-child(6) { transition-delay: 0.34s; }
.zl-stagger.is-in > *:nth-child(n+7) { transition-delay: 0.4s; }
.zl-stagger.is-in > * {
  opacity: 1;
  transform: translateY(0);
}

/* Premium interactive surfaces */
.zl-card,
.zl-row-card,
.zl-panel,
.zl-course-card,
.zl-test,
.glass-card {
  transition:
    transform 0.35s var(--zl-ease-out),
    box-shadow 0.35s var(--zl-ease-out),
    border-color 0.25s ease;
}
.zl-card:hover,
.zl-panel:hover,
.zl-course-card:hover,
.zl-test:hover,
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--zl-shadow-lift);
  border-color: rgba(201, 162, 39, 0.55);
}
.zl-row-card:hover {
  transform: translateY(-2px) translateX(2px);
  box-shadow: var(--zl-shadow-lift);
}

.btn {
  transition:
    transform 0.25s var(--zl-ease-out),
    box-shadow 0.25s var(--zl-ease-out),
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--zl-ease-out);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(201, 162, 39, 0.35);
}
.btn-primary:active { transform: translateY(0); }

.zl-nav .nav-link {
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--zl-ease-out);
}
.zl-nav .nav-link:hover { transform: translateY(-1px); }

.zl-brand-mark {
  transition: transform 0.4s var(--zl-ease-out), box-shadow 0.4s ease;
}
.zl-brand:hover .zl-brand-mark {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 12px 24px rgba(36, 52, 71, 0.35);
}

/* Soft ambient orbs (hero helpers) */
.zl-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.45;
  animation: zl-orb-float 10s ease-in-out infinite;
}
.zl-orb.a {
  width: 280px;
  height: 280px;
  background: rgba(196, 163, 90, 0.35);
  top: -60px;
  right: 8%;
}
.zl-orb.b {
  width: 220px;
  height: 220px;
  background: rgba(201, 162, 39, 0.35);
  bottom: -40px;
  left: 12%;
  animation-delay: -4s;
}
@keyframes zl-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -18px) scale(1.08); }
}

.zl-shimmer-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196,163,90,0.8), rgba(26,155,142,0.7), transparent);
  background-size: 200% 100%;
  animation: zl-shimmer 4.5s linear infinite;
  opacity: 0.85;
}
@keyframes zl-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

/* Kinetic title helper */
.zl-title-clip {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.zl-title-clip > span {
  display: inline-block;
  animation: zl-title-rise 0.85s var(--zl-ease-out) both;
}
@keyframes zl-title-rise {
  from { transform: translateY(110%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Progress bar grow */
.progress-bar {
  transition: width 0.8s var(--zl-ease-out) !important;
}

/* Quiz option polish */
.zl-option {
  transition:
    transform 0.2s var(--zl-ease-out),
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease !important;
}
.zl-option:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(16, 20, 28, 0.06);
}

/* Loader premium */
.page-loader {
  background:
    radial-gradient(600px 300px at 50% 40%, rgba(201, 162, 39, 0.12), transparent 60%),
    var(--zl-surface);
}
.loader-mark {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
  margin: 0 auto 1rem;
  box-shadow: 0 10px 24px rgba(16, 20, 28, 0.3);
  animation: zl-loader-pulse 1.4s ease-in-out infinite;
}
.loader-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes zl-loader-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .zl-reveal,
  .zl-stagger > *,
  .zl-main > .zl-shell {
    opacity: 1 !important;
    transform: none !important;
  }
}
