/**
 * Viex — Motion system (lightweight)
 * Reveals only activate when .viex-js is present (progressive enhancement).
 */

/* Default: content visible (no JS / slow JS never hides the page) */
.viex-reveal {
  opacity: 1;
  transform: none;
}

html.viex-js .viex-reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition:
    opacity 0.55s var(--viex-ease-out),
    transform 0.55s var(--viex-ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

html.viex-js .viex-reveal.is-visible {
  opacity: 1;
  transform: none;
}

html.viex-js .viex-reveal--left {
  transform: translateX(-0.85rem);
}

html.viex-js .viex-reveal--left.is-visible {
  transform: none;
}

html.viex-js .viex-reveal--scale {
  transform: scale(0.98);
}

html.viex-js .viex-reveal--scale.is-visible {
  transform: none;
}

.viex-stagger > .viex-reveal:nth-child(1) { --reveal-delay: 0ms; }
.viex-stagger > .viex-reveal:nth-child(2) { --reveal-delay: 50ms; }
.viex-stagger > .viex-reveal:nth-child(3) { --reveal-delay: 100ms; }
.viex-stagger > .viex-reveal:nth-child(4) { --reveal-delay: 150ms; }
.viex-stagger > .viex-reveal:nth-child(5) { --reveal-delay: 200ms; }
.viex-stagger > .viex-reveal:nth-child(6) { --reveal-delay: 250ms; }

.viex-hero__brand {
  animation: viex-rise 0.7s var(--viex-ease-out) both;
}

.viex-hero h1 {
  animation: viex-rise 0.7s var(--viex-ease-out) 0.08s both;
}

.viex-hero .viex-lead {
  animation: viex-rise 0.7s var(--viex-ease-out) 0.14s both;
}

.viex-hero .viex-btn-group,
.viex-hero .viex-eyebrow,
.viex-hero .viex-tagline {
  animation: viex-rise 0.7s var(--viex-ease-out) 0.2s both;
}

@keyframes viex-rise {
  from {
    opacity: 0;
    transform: translateY(0.85rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes viex-orb-in {
  to {
    opacity: 0.75;
    transform: translate3d(calc(var(--mx) * 1px), calc(var(--my) * 1px), 0) scale(1);
  }
}

@media (max-width: 960px) {
  html.viex-js .viex-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .viex-hero__brand,
  .viex-hero h1,
  .viex-hero .viex-lead,
  .viex-hero .viex-btn-group,
  .viex-hero .viex-eyebrow,
  .viex-hero .viex-tagline {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.viex-js .viex-reveal,
  .viex-hero__brand,
  .viex-hero h1,
  .viex-hero .viex-lead,
  .viex-hero .viex-btn-group,
  .viex-hero .viex-eyebrow,
  .viex-hero .viex-tagline,
  .viex-orb {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .viex-orb {
    opacity: 0.65 !important;
  }

  .viex-media:not(.is-placeholder) {
    opacity: 1 !important;
    border-color: var(--viex-border) !important;
    background: var(--viex-surface-2) !important;
    transition: none !important;
  }

  .viex-media--bleed:not(.is-placeholder) {
    border-color: transparent !important;
    background: transparent !important;
  }
}
