/* ============================================================
   BANZ TECHNOLOGIES — ANIMATIONS CSS
   Keyframes, Clip-path, Reveal Classes, Motion Utilities
   ============================================================ */

/* ---- Preloader ---- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: var(--z-preloader);
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preloader__logo {
  width: 200px;
  height: 80px;
  margin-bottom: 48px;
}

.preloader__logo-path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: strokeDraw 1.4s var(--ease-out) forwards;
}

.preloader__bar-wrap {
  width: 200px;
  height: 1px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.preloader__bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--text-primary);
  transition: width 0.05s linear;
}

.preloader__count {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  margin-top: 16px;
}

/* ---- Page Curtain Reveal ---- */
.page-curtain {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-preloader) - 1);
  background: var(--bg-secondary);
  transform-origin: top;
  transform: scaleY(0);
  pointer-events: none;
}

/* ---- Keyframes ---- */
@keyframes strokeDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
  50%       { box-shadow: 0 0 0 6px rgba(0,0,0,0.06); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* ---- Scroll-reveal base classes (GSAP controlled) ---- */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-fade,
.reveal-scale {
  will-change: transform, opacity;
}

/* ---- Text reveal wrap (overflow hide for mask anim) ---- */
.text-reveal {
  overflow: hidden;
  display: block;
}

.text-reveal__inner {
  display: block;
  transform: translateY(110%);
  transition: transform var(--dur-slow) var(--ease-out);
}

.text-reveal.in-view .text-reveal__inner {
  transform: translateY(0);
}

/* ---- Split text characters (GSAP SplitText) ---- */
.split-char {
  display: inline-block;
  will-change: transform, opacity;
}

.split-word {
  display: inline-block;
  overflow: hidden;
}

/* ---- Image parallax wrap ---- */
.parallax-wrap {
  overflow: hidden;
}

.parallax-img {
  will-change: transform;
  transform-origin: center center;
}

/* ---- Marquee ---- */
.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  white-space: nowrap;
}

.marquee__track {
  display: flex;
  gap: 0;
  animation: marqueeScroll 45s linear infinite;
}

.marquee--slow .marquee__track  { animation-duration: 70s; }
.marquee--fast .marquee__track  { animation-duration: 25s; }
.marquee--reverse .marquee__track { animation-direction: reverse; }

.marquee__item {
  flex-shrink: 0;
  padding: 0 40px;
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(0,0,0,0.4);
}

.marquee__item.filled {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(0,0,0,0.4);
}

/* ---- Clip-path transitions ---- */
.clip-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--dur-slow) var(--ease-out);
}

.clip-reveal.in-view {
  clip-path: inset(0 0% 0 0);
}

/* ---- Stagger children ---- */
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
}

/* ---- Glow border on hover ---- */
.glow-border {
  position: relative;
}

.glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(0,0,0,0.08), transparent) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--dur-fast) ease;
}

.glow-border:hover::after { opacity: 1; }

/* ---- Counter numbers ---- */
.counter-num {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 800;
}

/* ---- Noise overlay ---- */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-preloader);
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px;
}
