/* ═══════════════════════════════════════════════════════════════════════════
   NOVIRA — Folded Portal Brand Motion Architecture
   Single maintainable motion system derived from novira-brand-kit-v0.1:
   - Compact reveal (420ms / 550ms) matching public/brand/motion/novira-reveal.svg
   - Auth arrival reveal (1050ms / 1250ms + 150ms delay, ~1400ms total)
   - Static settled state for multi-step continuity (e.g. Login -> OTP)
   Preserves exact #F3E8D6 Folded Portal vector paths and cubic-bezier(.2,.8,.2,1).
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --novira-brand-canvas: #0D0D0F;
  --novira-brand-ivory: #F3E8D6;
  --novira-brand-ink: #191715;
  --novira-brand-white: #FFFFFF;
  --novira-status-error-fg: #DDA393;
  --novira-status-error-bg: #241D1A;
  --novira-status-error-border: #63453D;
  --novira-motion-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --novira-reveal-compact-left: 420ms;
  --novira-reveal-compact-folded: 550ms;
  --novira-reveal-arrival-left: 1050ms;
  --novira-reveal-arrival-folded: 1250ms;
  --novira-reveal-arrival-delay: 150ms;
}

.novira-reveal {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  shape-rendering: geometricPrecision;
}

.novira-reveal .novira-panel-left,
.novira-reveal .novira-panel-folded {
  transform-box: fill-box;
  animation-timing-function: var(--novira-motion-ease);
  animation-fill-mode: both;
}

.novira-reveal .novira-panel-left {
  transform-origin: right center;
}

.novira-reveal .novira-panel-folded {
  transform-origin: left center;
}

/* Compact reveal — matches public/brand/motion/novira-reveal.svg */
.novira-reveal--compact .novira-panel-left {
  animation-name: novira-panel-unfold;
  animation-duration: var(--novira-reveal-compact-left);
}

.novira-reveal--compact .novira-panel-folded {
  animation-name: novira-panel-settle;
  animation-duration: var(--novira-reveal-compact-folded);
}

/* Authentication arrival reveal — plays once on arrival (~1400ms total), rests statically */
.novira-reveal--arrival .novira-panel-left {
  animation-name: novira-panel-unfold;
  animation-duration: var(--novira-reveal-arrival-left);
}

.novira-reveal--arrival .novira-panel-folded {
  animation-name: novira-panel-settle;
  animation-duration: var(--novira-reveal-arrival-folded);
  animation-delay: var(--novira-reveal-arrival-delay);
}

/* Settled continuity state — zero replay across multi-step auth (OTP / validation retries) */
.novira-reveal--static .novira-panel-left,
.novira-reveal--static .novira-panel-folded {
  animation: none;
}

@keyframes novira-panel-unfold {
  from {
    opacity: 0;
    transform: translateX(-3px) scaleX(0.72);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes novira-panel-settle {
  from {
    opacity: 0;
    transform: translateX(3px) scaleX(0.82);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .novira-reveal .novira-panel-left,
  .novira-reveal .novira-panel-folded {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
