/* Wild landing-page animations – HUBERII home only */

.landing-page {
  position: relative;
  overflow: hidden;
}

/* Animated gradient background – stronger drift */
.landing-page::before {
  content: '';
  position: fixed;
  inset: -50%;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(212, 160, 18, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(30, 41, 59, 0.25), transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(212, 160, 18, 0.1), transparent 60%);
  animation: landing-bg-drift 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes landing-bg-drift {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  25% { transform: translate(4%, -3%) scale(1.03) rotate(1deg); }
  50% { transform: translate(-3%, 4%) scale(0.97) rotate(-1deg); }
  75% { transform: translate(2%, 2%) scale(1.02) rotate(0.5deg); }
}

/* Floating decorative blobs – wild motion */
.landing-deco {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.landing-deco-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 160, 18, 0.2) 0%, transparent 70%);
  top: 10%;
  right: 5%;
  animation: deco-float-1 18s ease-in-out infinite;
}

.landing-deco-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.15) 0%, transparent 70%);
  bottom: 25%;
  left: 3%;
  animation: deco-float-2 14s ease-in-out infinite 2s;
}

.landing-deco-3 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(212, 160, 18, 0.15) 0%, transparent 70%);
  bottom: 10%;
  right: 20%;
  animation: deco-float-3 20s ease-in-out infinite 1s;
}

.landing-deco-4 {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(30, 41, 59, 0.2) 0%, transparent 70%);
  top: 50%;
  left: 10%;
  animation: deco-float-4 10s ease-in-out infinite 0.5s;
}

@keyframes deco-float-4 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate(30px, -40px) scale(1.3); opacity: 1; }
}

@keyframes deco-float-1 {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  20% { transform: translate(-40px, 30px) scale(1.15) rotate(10deg); }
  40% { transform: translate(30px, -50px) scale(0.9) rotate(-15deg); }
  60% { transform: translate(-20px, -30px) scale(1.1) rotate(5deg); }
  80% { transform: translate(50px, 20px) scale(0.95) rotate(-8deg); }
}

@keyframes deco-float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.2); }
  66% { transform: translate(-30px, 50px) scale(0.85); }
}

@keyframes deco-float-3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-50px, -60px) rotate(180deg); }
}

@media (prefers-reduced-motion: reduce) {
  .landing-page::before,
  .landing-deco {
    animation: none;
  }
  .landing-deco { opacity: 0.5; }
}

/* Floating orbs (hero/featured) */
.landing-page .hero::after,
.landing-page .section.featured::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: float-orb 8s ease-in-out infinite;
}

.landing-page .hero::after {
  width: 200px;
  height: 200px;
  background: var(--accent);
  top: -80px;
  right: -60px;
}

.landing-page .section.featured::before {
  width: 180px;
  height: 180px;
  background: var(--nav-bg);
  bottom: -60px;
  left: -40px;
  animation-delay: -4s;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.1); }
}

/* Scroll-triggered section entrance – wild slide + skew */
.landing-page .section[data-landing-section] {
  opacity: 0;
  transform: translateY(60px) scale(0.97);
  transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.landing-page .section[data-landing-section].landing-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.landing-page .section[data-landing-section].landing-visible .section-title {
  animation: title-wobble 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.landing-page .section[data-landing-section].landing-visible .section-subtitle {
  animation: subtitle-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s both;
}

.landing-page .section[data-landing-section].landing-visible .section-link {
  animation: link-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

@keyframes title-wobble {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes subtitle-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes link-slide-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Carousel – wild slide transition */
.landing-page .carousel-banner {
  animation: carousel-banner-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes carousel-banner-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.landing-page .carousel-slide:not([hidden]) {
  animation: carousel-wild-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes carousel-wild-in {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.landing-page .carousel-caption {
  animation: caption-float 4s ease-in-out infinite;
}

.landing-page .carousel-title {
  animation: caption-text-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.landing-page .carousel-subtitle {
  animation: caption-text-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s both;
}

@keyframes caption-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes caption-text-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing-page .carousel-btn {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
}

.landing-page .carousel-btn:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.landing-page .carousel-btn:active {
  transform: translateY(-50%) scale(1.05);
}

.landing-page .carousel-dot {
  transition: transform 0.25s ease, background 0.25s, border-color 0.25s;
}

.landing-page .carousel-dot:hover {
  transform: scale(1.25);
}

.landing-page .carousel-dot[aria-selected="true"] {
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .landing-page .hero::after,
  .landing-page .section.featured::before { animation: none; opacity: 0.2; }
  .landing-page .section[data-landing-section] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .landing-page .section[data-landing-section].landing-visible .section-title { animation: none; }
  .landing-page .section[data-landing-section].landing-visible .section-subtitle { animation: none; }
  .landing-page .section[data-landing-section].landing-visible .section-link { animation: none; }
  .landing-page .carousel-caption,
  .landing-page .carousel-dot[aria-selected="true"] { animation: none; }
  .landing-page .carousel-btn:hover { transform: translateY(-50%); }
  .landing-page .carousel-dot:hover { transform: none; }
}

/* Hero – wild entrance and glow */
.landing-page .hero {
  position: relative;
  overflow: visible;
  animation: hero-card-enter 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.landing-page .section.featured {
  position: relative;
  overflow: visible;
}

@keyframes hero-card-enter {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.landing-page .hero-title .gradient-text {
  display: inline-block;
  animation: title-glow 2.5s ease-in-out infinite;
}

@keyframes title-glow {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(212, 160, 18, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 24px rgba(212, 160, 18, 0.8));
  }
}

.landing-page .hero-h {
  animation: hero-h-float 4s ease-in-out infinite;
}

@keyframes hero-h-float {
  0%, 100% { transform: scale(1) translateY(0) rotate(0deg); }
  25% { transform: scale(1.04) translateY(-6px) rotate(2deg); }
  75% { transform: scale(1.04) translateY(-6px) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .landing-page .hero-title .gradient-text,
  .landing-page .hero-h {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-page .product-card {
    animation: none;
  }
  .landing-page .product-card:hover {
    transform: translateY(-4px);
  }
}

/* Category cards – slide and glow */
.landing-page .category-card {
  animation: category-slide 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.landing-page .category-card:hover {
  box-shadow: 0 0 30px var(--accent-light);
  transform: translateY(-4px) scale(1.02);
}

@keyframes category-slide {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Product grid – perspective for 3D cards */
.landing-page .product-grid {
  perspective: 1200px;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Mobile – 2 products per row */
@media (max-width: 768px) {
  .landing-page .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Extra small mobile – fallback */
@media (max-width: 480px) {
  .landing-page .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

/* Product cards – wild 3D bounce-in */
.landing-page .product-card {
  animation: card-wild-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform-origin: center bottom;
}

.landing-page .product-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 24px 48px rgba(30, 41, 59, 0.15);
}

/* Product card – shine sweep on hover */
.landing-page .product-card .product-card-image {
  position: relative;
  overflow: hidden;
}

.landing-page .product-card .product-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 40%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.15) 60%,
    transparent 100%
  );
  transform: translateX(-100%) skewX(-15deg);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.landing-page .product-card:hover .product-card-image::after {
  transform: translateX(100%) skewX(-15deg);
}

.landing-page .product-card .product-card-price {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.landing-page .product-card:hover .product-card-price {
  transform: scale(1.08);
}

@keyframes card-wild-in {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.85) rotateX(12deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
  }
}

/* Section link – wiggle on hover */
.landing-page .section-link {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.landing-page .section-link:hover {
  transform: translateX(6px) scale(1.05);
}

/* Empty state – gentle fade-in */
.landing-page .empty-state {
  animation: empty-in 0.6s ease-out both;
}

@keyframes empty-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section head divider – subtle line grow when visible */
.landing-page .section[data-landing-section].landing-visible .section-head {
  animation: section-head-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes section-head-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Product grid – stagger delay for cards when section becomes visible */
.landing-page .section.landing-visible .product-card:nth-child(1) { animation-delay: 0.05s; }
.landing-page .section.landing-visible .product-card:nth-child(2) { animation-delay: 0.1s; }
.landing-page .section.landing-visible .product-card:nth-child(3) { animation-delay: 0.15s; }
.landing-page .section.landing-visible .product-card:nth-child(4) { animation-delay: 0.2s; }
.landing-page .section.landing-visible .product-card:nth-child(5) { animation-delay: 0.25s; }
.landing-page .section.landing-visible .product-card:nth-child(6) { animation-delay: 0.3s; }
.landing-page .section.landing-visible .product-card:nth-child(n+7) { animation-delay: 0.35s; }

/* CTA buttons – pulse ring on hover */
.landing-page .hero-actions .btn-primary {
  position: relative;
  overflow: visible;
}

.landing-page .hero-actions .btn-primary::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: btn-pulse-ring 1.5s ease-out infinite;
}

.landing-page .hero-actions .btn-primary:hover::after {
  opacity: 0.6;
}

@keyframes btn-pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-page .hero-actions .btn-primary::after {
    display: none;
  }
}
