/* Motion adapted from fast-charge, with Athea's palette and branding. */
:root {
  --athea-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --athea-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html.athea-loading {
  overflow: hidden;
}

.athea-page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: #080808;
  transition: opacity 0.6s var(--athea-ease-out), visibility 0.6s;
}

.athea-page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.athea-page-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.athea-page-loader__logo {
  width: min(14rem, 55vw);
  height: auto;
  animation: athea-loader-pulse 1.6s var(--athea-ease-in-out) infinite;
}

.athea-page-loader__bar {
  width: min(10rem, 40vw);
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 12%);
}

.athea-page-loader__bar span {
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #d5b58b, transparent);
  animation: athea-loader-shimmer 1.2s var(--athea-ease-in-out) infinite;
}

@keyframes athea-loader-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes athea-loader-shimmer {
  from { transform: translateX(-120%); }
  to { transform: translateX(320%); }
}

/* Individual translate/scale preserve existing Tailwind positioning transforms. */
.athea-motion-ready .athea-reveal {
  opacity: 0;
  translate: 0 36px;
  transition:
    opacity 0.7s var(--athea-ease-out),
    translate 0.7s var(--athea-ease-out),
    scale 0.7s var(--athea-ease-out);
  transition-delay: var(--athea-delay, 0ms);
}

.athea-motion-ready .athea-reveal--fade {
  translate: none;
}

.athea-motion-ready .athea-reveal--scale {
  translate: none;
  scale: 0.96;
}

.athea-motion-ready .athea-reveal--hero {
  translate: 0 32px;
  transition-duration: 0.85s;
}

.athea-motion-ready .athea-reveal--footer {
  translate: 0 24px;
  transition-duration: 0.8s;
}

.athea-motion-ready .athea-reveal.is-visible {
  opacity: var(--athea-opacity, 1);
  translate: none;
  scale: 1;
}

@media (max-width: 767px) {
  .athea-motion-ready .athea-reveal {
    translate: 0 24px;
  }

  .athea-motion-ready .athea-reveal--fade,
  .athea-motion-ready .athea-reveal--scale,
  .athea-motion-ready .athea-reveal.is-visible {
    translate: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.athea-loading { overflow: revert; }
  .athea-page-loader { display: none; }
  .athea-page-loader * { animation: none !important; }
  .athea-motion-ready .athea-reveal {
    opacity: var(--athea-opacity, 1);
    translate: none;
    scale: none;
    transition: none;
  }
}
