/* ═══════════════════════════════════════════════════════════════════════════
   ALIMAJ THEME — Animations & Reveals
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── SCROLL REVEAL BASE ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity  var(--trans-reveal),
    transform var(--trans-reveal);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delay variants */
.reveal--d1 { transition-delay: 0.08s; }
.reveal--d2 { transition-delay: 0.18s; }
.reveal--d3 { transition-delay: 0.28s; }
.reveal--d4 { transition-delay: 0.38s; }
.reveal--d5 { transition-delay: 0.48s; }

/* Fade only (no translate) */
.reveal--fade {
  transform: none;
}

/* Slide from left */
.reveal--left {
  transform: translateX(-40px);
}
.reveal--left.is-visible {
  transform: translateX(0);
}

/* Slide from right */
.reveal--right {
  transform: translateX(40px);
}
.reveal--right.is-visible {
  transform: translateX(0);
}

/* Scale up */
.reveal--scale {
  transform: scale(0.94);
}
.reveal--scale.is-visible {
  transform: scale(1);
}

/* ── INTRO SEQUENCE (hub page) ── */
#alimaj-intro {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: var(--af-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.8s var(--ease-out);
}
#alimaj-intro.is-out {
  opacity: 0;
  pointer-events: none;
}

#alimaj-intro__rule {
  width: 0;
  height: 1px;
  background: rgba(200, 149, 42, 0.35);
  margin-bottom: var(--space-8);
  animation: intro-rule 1s var(--ease-out) 0.6s both;
}
@keyframes intro-rule {
  to { width: 80px; }
}

#alimaj-intro__word {
  font-family: var(--font-serif);
  font-weight: var(--weight-light);
  font-size: clamp(56px, 10vw, 130px);
  letter-spacing: 0.6em;
  padding-right: 0.6em;
  color: var(--af-smoke);
  animation: intro-reveal 1.6s var(--ease-out) 0.4s both;
}
@keyframes intro-reveal {
  from { opacity: 0; letter-spacing: 1.2em; }
  to   { opacity: 1; letter-spacing: 0.6em;  }
}

#alimaj-intro__sub {
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: var(--weight-thin);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(200, 149, 42, 0.55);
  margin-top: var(--space-5);
  padding-right: 0.42em;
  animation: intro-sub 0.8s var(--ease-out) 1.5s both;
}
@keyframes intro-sub {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── BLADE (hub divider) ── */
#alimaj-blade {
  width: 1px;
  background: var(--af-gold);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  transform: scaleY(0);
  transform-origin: center;
  animation: blade-rise 1s var(--ease-out) 3s both;
}
@keyframes blade-rise {
  to { transform: scaleY(1); }
}

#alimaj-blade-gem {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  background: var(--af-gold);
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0;
  animation: gem-appear 0.4s var(--ease-out) 3.8s both;
}
@keyframes gem-appear {
  to { opacity: 1; }
}

/* ── HUB WING REVEAL ── */
.alimaj-hub-content {
  opacity: 0;
  animation: wing-fade 0.8s var(--ease-out) 3.2s both;
}
@keyframes wing-fade {
  to { opacity: 1; }
}

/* ── GENERAL PURPOSE ── */
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1);    }
}

/* ── LOADING STATE ── */
.alimaj-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16);
}
.alimaj-loading__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--af-gold);
  margin: 0 4px;
  animation: loading-pulse 1.2s ease-in-out infinite;
}
.alimaj-loading__dot:nth-child(2) { animation-delay: 0.2s; }
.alimaj-loading__dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes loading-pulse {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1;   }
}

/* ── ADMIN BAR COMPENSATION ── */
.admin-bar #alimaj-stage {
  height: calc(100vh - 32px);
}
.admin-bar .alimaj-hero {
  padding-top: calc(var(--nav-h) + 32px);
}
@media screen and (max-width: 782px) {
  .admin-bar #alimaj-stage {
    height: calc(100vh - 46px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal--fade,
  .reveal--left,
  .reveal--right,
  .reveal--scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
  #alimaj-intro { display: none; }
  .alimaj-hub-content { opacity: 1; animation: none; }
  .alimaj-ticker__track { animation: none; }
}
