/* ================================================
   VISHWOKARMA LABS — Animation Layer
   ================================================ */

/* ─── PAGE LOADER ─── */
.page-loader {
  position: fixed; inset: 0;
  background: var(--paper);
  z-index: 9999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              visibility 0.6s cubic-bezier(0.16,1,0.3,1);
}
.page-loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-wordmark {
  font-family: 'Patrick Hand', sans-serif;
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.18em;
  color: var(--ink); opacity: 0;
  animation: loaderFade 0.5s 0.1s ease forwards;
}
.loader-track {
  width: 120px; height: 1.5px;
  background: rgba(0,0,0,0.1); overflow: hidden;
}
.loader-fill {
  width: 100%; height: 100%;
  background: var(--ink);
  transform: translateX(-100%);
  animation: loaderBar 0.7s 0.15s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes loaderFade { to { opacity: 1; } }
@keyframes loaderBar  { to { transform: translateX(0); } }

/* ─── SCROLL PROGRESS ─── */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  width: 0%; height: 2px;
  background: var(--ink); z-index: 850;
  transition: width 0.08s linear;
  transform-origin: left;
}

/* ─── CUSTOM CURSOR ─── */
.cursor-dot, .cursor-ring { position: fixed; pointer-events: none; z-index: 9990; border-radius: 50%; }
.cursor-dot  {
  width: 6px; height: 6px;
  background: var(--ink);
  transform: translate(-50%,-50%);
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(26,26,26,0.55);
  transform: translate(-50%,-50%);
  transition: width 0.35s cubic-bezier(0.16,1,0.3,1),
              height 0.35s cubic-bezier(0.16,1,0.3,1),
              border-color 0.35s ease,
              opacity 0.35s ease;
}
.cursor-dot.hover  { width: 10px; height: 10px; }
.cursor-ring.hover { width: 52px; height: 52px; border-color: rgba(26,26,26,0.25); }
.cursor-dot.click  { width: 4px; height: 4px; opacity: 0.5; }
.cursor-ring.click { width: 20px; height: 20px; }
.cursor-dot.hidden, .cursor-ring.hidden { opacity: 0; }
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ─── HERO ENTRY ─── */
.hero__eyebrow  { animation: heroSlideUp 0.9s 0.15s cubic-bezier(0.16,1,0.3,1) both; }
.hero__slogan   { animation: heroSlideUp 0.9s 0.8s  cubic-bezier(0.16,1,0.3,1) both; }
.hero__desc     { animation: heroSlideUp 0.9s 1.0s  cubic-bezier(0.16,1,0.3,1) both; }
.hero__cta      { animation: heroSlideUp 0.9s 1.15s cubic-bezier(0.16,1,0.3,1) both; }
.hero__scroll-hint { animation: heroSlideUp 0.9s 1.35s cubic-bezier(0.16,1,0.3,1) both; }
@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── HERO TITLE CHARACTER REVEAL ─── */
.hero__title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(56px) rotate(5deg);
  animation: charUp 0.65s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes charUp {
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

/* ─── SCROLL REVEAL VARIANTS ─── */
.reveal-up    { opacity: 0; transform: translateY(48px); }
.reveal-left  { opacity: 0; transform: translateX(-48px); }
.reveal-right { opacity: 0; transform: translateX(48px); }
.reveal-scale { opacity: 0; transform: scale(0.9); }

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
  opacity: 1; transform: none;
  transition: opacity 0.75s cubic-bezier(0.16,1,0.3,1),
              transform 0.75s cubic-bezier(0.16,1,0.3,1);
}

/* ─── STAGGER CHILDREN ─── */
.stagger-children > * {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1),
              transform 0.65s cubic-bezier(0.16,1,0.3,1);
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.00s; opacity:1; transform:none; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.07s; opacity:1; transform:none; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.14s; opacity:1; transform:none; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.21s; opacity:1; transform:none; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.28s; opacity:1; transform:none; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.35s; opacity:1; transform:none; }
.stagger-children.visible > *:nth-child(n+7) { transition-delay: 0.42s; opacity:1; transform:none; }

/* ─── BUTTON RIPPLE ─── */
.btn { position: relative; overflow: hidden; }
.btn .ripple-wave {
  position: absolute; border-radius: 50%;
  transform: scale(0);
  animation: rippleOut 0.55s linear forwards;
  pointer-events: none;
  background: rgba(255,255,255,0.25);
}
.btn--outline .ripple-wave,
.btn--sm.btn--outline .ripple-wave { background: rgba(0,0,0,0.08); }
@keyframes rippleOut {
  to { transform: scale(4); opacity: 0; }
}

/* ─── CARD HOVER LIFT ─── */
.os-card {
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.4s ease !important;
  will-change: transform;
}
.os-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 48px rgba(0,0,0,0.11) !important;
}

.event-card {
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.4s ease !important;
}
.event-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 14px 36px rgba(0,0,0,0.1) !important;
}

.ep {
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.35s ease !important;
}
.ep:hover {
  transform: translateY(-5px) translateX(3px) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,0.09) !important;
}

/* ─── SHOP CARD HOVER ─── */
.shop-card {
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.4s ease !important;
  will-change: transform;
}
.shop-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.10) !important;
}

/* ─── PILLAR HOVER ─── */
.pillar {
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1),
              padding-left 0.35s cubic-bezier(0.16,1,0.3,1);
  border-left: 2px solid transparent;
  padding-left: 0 !important;
}
.pillar:hover {
  transform: translateX(8px);
  border-left-color: var(--ink);
  padding-left: 10px !important;
}

/* ─── INK UNDERLINE on nav + text links ─── */
.nav__links a {
  position: relative; display: inline-block;
}
.nav__links a::after {
  content: '';
  position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: currentColor;
  transition: width 0.35s cubic-bezier(0.16,1,0.3,1);
}
.nav__links a:hover::after { width: 100%; }
.nav__links a:hover { text-decoration: none; }

.text-link {
  position: relative; display: inline-block;
}
.text-link::after {
  content: '';
  position: absolute; bottom: -1px; left: 0;
  width: 0; height: 1.5px;
  background: var(--ink);
  transition: width 0.35s cubic-bezier(0.16,1,0.3,1);
}
.text-link:hover::after { width: 100%; }
.text-link:hover { opacity: 1; text-decoration: none; }

/* ─── LOGO HOVER ─── */
.logo-mark {
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.nav__logo:hover .logo-mark {
  transform: scale(1.12) rotate(-5deg) !important;
}

/* ─── TICKER PAUSE ON HOVER ─── */
.ticker:hover .ticker__track { animation-play-state: paused; }

/* ─── SECTION TAG SLIDE ─── */
.section__tag {
  transition: letter-spacing 0.4s cubic-bezier(0.16,1,0.3,1);
}
.section__tag.visible { letter-spacing: 0.12em; }

/* ─── FLOATING SHAPES (hero decorative) ─── */
.hero-shape {
  position: absolute; pointer-events: none; opacity: 0.04;
  font-size: 120px; font-weight: 700; color: var(--ink);
  user-select: none; will-change: transform;
}
.hero-shape--a { top: 15%; right: 8%; animation: floatA 7s ease-in-out infinite; }
.hero-shape--b { bottom: 20%; right: 18%; font-size: 60px; animation: floatB 5s ease-in-out infinite 1s; }
.hero-shape--c { top: 40%; left: 3%; font-size: 80px; animation: floatC 9s ease-in-out infinite 0.5s; opacity: 0.025; }

@keyframes floatA {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-18px) rotate(4deg); }
}
@keyframes floatB {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-10px) rotate(-6deg); }
}
@keyframes floatC {
  0%,100% { transform: translateY(0px) rotate(-3deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}

/* ─── SCROLL HINT BREATHING LINE ─── */
.scroll-line {
  width: 1px; height: 44px;
  background: currentColor;
  display: block; margin: 8px auto 0;
  animation: scrollDrop 2s cubic-bezier(0.16,1,0.3,1) infinite;
  transform-origin: top;
}
@keyframes scrollDrop {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  45%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  46%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ─── FORM INPUT FOCUS ─── */
.form-group input, .form-group textarea, .form-group select {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease !important;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06) !important;
}

/* ─── AUTH MODAL SLIDE IN ─── */
.auth-modal {
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1),
              opacity 0.45s cubic-bezier(0.16,1,0.3,1) !important;
  transform: translateY(24px) scale(0.97);
  opacity: 0;
}
.auth-modal.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ─── CART DRAWER SLIDE ─── */
.cart-drawer {
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1) !important;
}

/* ─── TOAST SLIDE ─── */
.toast {
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
              opacity 0.4s ease !important;
  transform: translateY(12px);
  opacity: 0;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ─── HAMBURGER MORPH ─── */
.hamburger span {
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1),
              opacity 0.25s ease,
              width 0.35s cubic-bezier(0.16,1,0.3,1) !important;
}
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ─── CHECKOUT MODAL ─── */
.checkout-modal {
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1),
              opacity 0.45s ease !important;
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .cursor-dot, .cursor-ring, .hero-shape { display: none !important; }
  .page-loader { display: none !important; }
}
