/* ============================================================================
   SOFIK TARAFDAR MULTI-PAGE ECOSYSTEM — 3D ANIMATIONS & CREATOR SIGNATURE CSS
   Created by Saikat Mandal
   ============================================================================ */

@keyframes floatSlow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -14px, 0) scale(1.03); }
}

@keyframes spinFast {
  to { transform: rotate(360deg); }
}

@keyframes creatorSheen {
  0% { transform: translateX(-140%) skewX(-22deg); }
  35%, 100% { transform: translateX(240%) skewX(-22deg); }
}

@keyframes subtlePulseGlow {
  0%, 100% { box-shadow: 0 12px 28px -6px rgba(6, 16, 32, 0.72), 0 0 14px rgba(212, 175, 55, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.22); }
  50% { box-shadow: 0 16px 34px -6px rgba(6, 16, 32, 0.85), 0 0 22px rgba(212, 175, 55, 0.42), inset 0 1px 1px rgba(255, 255, 255, 0.32); }
}

.ambient-orb {
  animation: floatSlow 9s ease-in-out infinite;
  will-change: transform;
}

.spinner-ring {
  width: 1.1rem;
  height: 1.1rem;
  border: 2.5px solid rgba(212, 175, 55, 0.3);
  border-top-color: #d4af37;
  border-radius: 9999px;
  animation: spinFast 0.75s linear infinite;
}

/* Scroll Progress Indicator Bar */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #c5a059 0%, #e6c86e 50%, #25d366 100%);
  z-index: 60;
  transition: width 0.08s linear;
}

/* Scroll Reveal Animations via IntersectionObserver */
.reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* 3D Perspective Cards */
.perspective-stage {
  perspective: 1100px;
}

.service-card-3d {
  position: relative;
  transform-style: preserve-3d;
  transition:
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.32s ease;
  will-change: transform, box-shadow;
}

.service-card-3d:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -14px rgba(10, 25, 47, 0.18), 0 0 0 1px rgba(212, 175, 55, 0.45);
}

/* ============================================================================
   SIGNATURE CREATOR BRANDING: "Created by Saikat Mandal"
   1. Footer 3D Embossed Signature Plaque (.creator-3d-plaque)
   2. Persistent Floating 3D Signature Pill (.creator-floating-pill)
   ============================================================================ */
.creator-3d-plaque {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.875rem;
  background: linear-gradient(145deg, #0d213f 0%, #061020 55%, #0b1c36 100%);
  border: 1px solid rgba(212, 175, 55, 0.55);
  box-shadow:
    0 14px 30px -8px rgba(3, 8, 18, 0.8),
    0 0 18px rgba(212, 175, 55, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    inset 0 -2px 4px rgba(0, 0, 0, 0.55);
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
  user-select: none;
}

.creator-3d-plaque::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 235, 165, 0.22), transparent);
  transform: translateX(-140%) skewX(-22deg);
  animation: creatorSheen 6.5s ease-in-out infinite;
  pointer-events: none;
}

.creator-3d-plaque:hover {
  transform: perspective(700px) translateY(-3px) rotateX(4deg) rotateY(-4deg);
  border-color: rgba(230, 200, 110, 0.88);
  box-shadow:
    0 18px 36px -8px rgba(3, 8, 18, 0.9),
    0 0 25px rgba(212, 175, 55, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.creator-emblem-3d {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, #e6c86e 0%, #d4af37 50%, #9a7428 100%);
  color: #061020;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.45),
    inset 0 1px 1px rgba(255, 255, 255, 0.65);
  flex-shrink: 0;
}

.creator-text-embossed {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #ffffff 0%, #f9f3e3 45%, #e6c86e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

/* Persistent Floating 3D Creator Signature Pill (Bottom-Left) */
.creator-floating-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.85rem 0.42rem 0.5rem;
  border-radius: 9999px;
  background: rgba(6, 16, 32, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.52);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  animation: subtlePulseGlow 5s ease-in-out infinite;
  transition: transform 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.creator-floating-pill:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: #e6c86e;
}

.creator-floating-pill .creator-dot {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #e6c86e, #b08b42);
  color: #061020;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 800;
  font-size: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}


/* ============================================================================
   PART 5 — IMMERSIVE SCROLL-RESPONSIVE 3D CATALOGUE & PARALLAX ENGINE
   - Staggered 3D perspective entrance (.catalogue-3d-stage / .catalogue-card-3d)
   - Scroll-driven depth & tilt variables (--scroll-rx, --scroll-tz, --scroll-ty)
   - Inner image parallax & iris reveal (.card-parallax-img)
   - Hero 3D depth layer (.hero-depth-layer)
   ============================================================================ */
.catalogue-3d-grid {
  perspective: 1300px;
  transform-style: preserve-3d;
}

.catalogue-card-3d {
  --scroll-rx: 0deg;
  --scroll-ty: 0px;
  --scroll-scale: 1;
  --hover-rx: 0deg;
  --hover-ry: 0deg;
  --hover-ty: 0px;
  --stagger-delay: 0ms;
  position: relative;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  opacity: 0;
  transform: perspective(1200px) translate3d(0, 38px, -45px) rotateX(11deg) scale(0.96);
  transition:
    opacity 0.68s cubic-bezier(0.16, 1, 0.3, 1) var(--stagger-delay),
    transform 0.68s cubic-bezier(0.16, 1, 0.3, 1) var(--stagger-delay),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s ease;
  will-change: transform, opacity;
}

.catalogue-card-3d.is-in-view {
  opacity: 1;
  transform:
    perspective(1200px)
    translate3d(0, calc(var(--scroll-ty) + var(--hover-ty)), 0)
    rotateX(calc(var(--scroll-rx) + var(--hover-rx)))
    rotateY(var(--hover-ry))
    scale(var(--scroll-scale));
  transition:
    opacity 0.55s ease,
    transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.catalogue-card-3d:hover {
  box-shadow:
    0 28px 54px -14px rgba(6, 16, 32, 0.24),
    0 0 0 1px rgba(212, 175, 55, 0.52);
}

/* Inner Image Parallax & Reveal Layer */
.card-media-viewport {
  position: relative;
  overflow: hidden;
  transform: translateZ(14px);
}

.card-parallax-img {
  --img-parallax-y: 0px;
  --img-scale: 1.07;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(0, var(--img-parallax-y), 0) scale(var(--img-scale));
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease;
  will-change: transform;
}

.catalogue-card-3d:hover .card-parallax-img {
  --img-scale: 1.12;
}

/* Subtle Depth Separation for Card Content & Badges */
.card-depth-badge {
  transform: translateZ(26px);
  box-shadow: 0 8px 18px rgba(6, 16, 32, 0.32);
}

.card-depth-body {
  transform: translateZ(10px);
}

/* Section Divider 3D Depth Band */
.section-3d-divider {
  position: relative;
  box-shadow: 0 -18px 36px -18px rgba(6, 16, 32, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .catalogue-card-3d,
  .card-parallax-img {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  .ambient-orb,
  .service-card-3d,
  .reveal-on-scroll,
  .creator-3d-plaque::before,
  .creator-floating-pill {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
