/* ================================ */
/* 3D & ADVANCED EFFECTS             */
/* ================================ */

/* ── 3D Tilt Card Effect ── */
.tilt-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform var(--duration-normal) var(--ease-out);
}

.tilt-3d .tilt-3d-inner {
  transition: transform var(--duration-normal) var(--ease-out);
}

/* ── 3D Float on Hover (Category Cards) ── */
.cat-card {
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
  transform-style: preserve-3d;
}

.cat-card:hover {
  transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateZ(10px);
  box-shadow: 8px 12px 30px rgba(26, 26, 26, 0.25);
}

/* ── Promo Block 3D Lift ── */
.promo-block {
  transform-style: preserve-3d;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.promo-block:hover {
  transform: perspective(1000px) translateZ(15px);
  box-shadow: 0 20px 40px rgba(26, 26, 26, 0.2);
}

/* ── Gallery 3D Tilt on Hover ── */
.gallery-item {
  transform-style: preserve-3d;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.gallery-item:hover {
  transform: perspective(600px) rotateY(-3deg) rotateX(2deg) scale(1.02);
  box-shadow: 10px 15px 35px rgba(26, 26, 26, 0.2);
  z-index: 5;
}

/* ── Parallax Layers ── */
.parallax-section {
  position: relative;
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  inset: -20%;
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ── Floating Animation (decorative) ── */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25%      { transform: translateY(-12px) rotate(1deg); }
  50%      { transform: translateY(-6px) rotate(-1deg); }
  75%      { transform: translateY(-15px) rotate(0.5deg); }
}

.float-anim {
  animation: float 6s ease-in-out infinite;
}

/* ── Logo 3D Hover ── */
.navbar-logo-circle {
  transition: transform var(--duration-normal) var(--ease-spring),
              box-shadow var(--duration-normal) var(--ease-out);
  transform-style: preserve-3d;
}

.navbar-logo-circle:hover {
  transform: perspective(200px) rotateY(15deg) scale(1.08);
  box-shadow: var(--shadow-gold);
}

/* ── Footer Social 3D Pop ── */
.footer-social-link {
  transform-style: preserve-3d;
}

.footer-social-link:hover {
  transform: perspective(200px) rotateY(-10deg) translateY(-3px) scale(1.1);
}

/* ── Shimmer Effect for Titles ── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--color-brown-dark) 0%,
    var(--color-gold) 25%,
    var(--color-beige-dark) 50%,
    var(--color-gold) 75%,
    var(--color-brown-dark) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

/* ── Magnetic Button Hover ── */
.promo-block-btn,
.form-submit {
  transition: all var(--duration-normal) var(--ease-spring);
  transform-style: preserve-3d;
}

.promo-block-btn:hover {
  transform: perspective(500px) translateZ(8px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.15);
}

/* ── Scroll Progress Bar (Premium) ── */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(26, 26, 26, 0.05); /* very subtle track */
  z-index: 9999;
  pointer-events: none;
}

.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-brown-light), var(--color-beige-dark), var(--color-gold), #fff);
  width: var(--scroll, 0%);
  position: relative;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6), 0 0 5px rgba(212, 175, 55, 0.3);
  transition: width 0.05s ease-out;
}

/* The Glowing Tip */
.scroll-progress-bar::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff, 0 0 20px var(--color-gold), 0 0 30px var(--color-gold);
}

/* ── Text Reveal Character Split ── */
.split-text .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) rotateX(90deg);
  transition: all 0.5s var(--ease-out);
}

.split-text.revealed .char {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

/* ── Glowing Border on Promo Dark Block ── */
.promo-block--dark {
  position: relative;
  overflow: hidden;
}

.promo-block--dark::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(212,175,55,0.3), transparent, rgba(212,175,55,0.3)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.promo-block--dark:hover::before {
  opacity: 1;
}

/* ── Smooth Image Ken Burns (Gallery) ── */
@keyframes kenBurns {
  0%   { transform: scale(1) translate(0, 0); }
  50%  { transform: scale(1.08) translate(-1%, -1%); }
  100% { transform: scale(1) translate(0, 0); }
}

.gallery-item:nth-child(odd) .gallery-img {
  animation: kenBurns 20s ease-in-out infinite;
}

.gallery-item:nth-child(even) .gallery-img {
  animation: kenBurns 25s ease-in-out infinite reverse;
}

.gallery-item:hover .gallery-img {
  animation-play-state: paused;
}

/* ── Value Counter Animation (About page) ── */
@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Reduce Motion Preference ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .gallery-item:nth-child(odd) .gallery-img,
  .gallery-item:nth-child(even) .gallery-img {
    animation: none;
  }
}
