/* ==========================================================================
   Lace & Tulle Mesh Dynamic Atmospheric System
   ========================================================================== */

/* Keyframe Animations for Micro-Movement & Shimmer */
@keyframes laceMeshFloat {
  0% {
    background-position: 0 0, 0 0, 0 0;
  }
  50% {
    background-position: 18px 24px, -14px 18px, 10px -12px;
  }
  100% {
    background-position: 36px 48px, -28px 36px, 20px -24px;
  }
}

@keyframes laceRadialBreathe {
  0%, 100% {
    opacity: 0.55;
    transform: scale(1) translate3d(0, 0, 0);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.04) translate3d(8px, -6px, 0);
  }
}

@keyframes laceGridShimmer {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 48px 48px, -48px 48px;
  }
}

@keyframes laceWaveDrift {
  0% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(-15px) translateY(8px);
  }
  100% {
    transform: translateX(0) translateY(0);
  }
}

/* 1. Dynamic Mesh Texture Overlay on Hero Sections */
.hm-hero,
.pa-hero,
.lc-hero,
.ab-hero,
.cd-hero,
.cp-hero,
.ct-hero {
  position: relative;
  overflow: hidden;
}

.hm-hero::before,
.pa-hero::before,
.lc-hero::before,
.ab-hero::before,
.cd-hero::before,
.cp-hero::before,
.ct-hero::before {
  content: "";
  position: absolute;
  inset: -40px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
  background-image:
    /* Fine hexagonal tulle mesh geometry */
    radial-gradient(circle at 50% 50%, rgba(168, 132, 47, 0.16) 1.2px, transparent 1.6px),
    radial-gradient(circle at 0% 0%, rgba(26, 23, 18, 0.06) 1.2px, transparent 1.6px),
    /* Delicate diamond warp-knit lines */
    linear-gradient(45deg, rgba(230, 224, 212, 0.45) 1px, transparent 1px),
    linear-gradient(-45deg, rgba(230, 224, 212, 0.45) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px, 28px 28px, 28px 28px;
  background-position: 0 0, 14px 14px, 0 0, 0 0;
  animation: laceMeshFloat 28s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
  will-change: background-position;
}

/* 2. Floating Luminous Silk Sheen on Hero Backgrounds */
.hm-hero::after,
.pa-hero::after,
.lc-hero::after,
.ab-hero::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 65vw;
  height: 65vw;
  max-width: 800px;
  max-height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 168, 92, 0.14) 0%, rgba(243, 234, 211, 0.08) 45%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  filter: blur(40px);
  animation: laceRadialBreathe 12s ease-in-out infinite;
}

/* Ensure hero contents appear crisp above animated mesh layers */
.hm-hero-grid,
.pa-hero-grid,
.lc-hero-grid,
.ab-hero-grid,
.cd-hero-grid,
.cp-hero-grid,
.ct-hero > div {
  position: relative;
  z-index: 2;
}

/* 3. Dynamic Organic Mesh Texture for Alternate Sections & LaceDog Dark/Gold Sections */
.hm-section-alt,
.ab-section-alt,
.lc-bg-alt,
.pa-bg-alt,
.cd-bg-alt,
.cp-bg-alt {
  position: relative;
}

.hm-section-alt::before,
.ab-section-alt::before,
.lc-bg-alt::before,
.pa-bg-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 12px 12px, rgba(168, 132, 47, 0.1) 1.5px, transparent 1.6px),
    linear-gradient(60deg, rgba(216, 208, 191, 0.25) 1px, transparent 1px),
    linear-gradient(-60deg, rgba(216, 208, 191, 0.25) 1px, transparent 1px);
  background-size: 24px 42px, 24px 42px, 24px 42px;
  animation: laceMeshFloat 40s linear infinite;
}

/* Dark section specific luminous jacquard net */
.hm-section-dark,
.ab-section-dark {
  position: relative;
  overflow: hidden;
}

.hm-section-dark::before,
.ab-section-dark::before {
  content: "";
  position: absolute;
  inset: -20px;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(201, 168, 92, 0.45) 1.5px, transparent 2px),
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: laceMeshFloat 35s ease-in-out infinite alternate;
}

.hm-section-dark .hm-wrap,
.ab-section-dark .ab-wrap {
  position: relative;
  z-index: 2;
}

/* 4. Dynamic Interactive Tactile Response for Image Media Boxes & Swatches */
.hm-media-box,
.ab-media-box,
.pa-step-card,
.pa-tex-card,
.lc-feature-card,
.lc-craft-box,
.hm-card,
.ab-card,
.ab-team-card {
  position: relative;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.hm-media-box::after,
.ab-media-box::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.hm-media-box:hover::after,
.ab-media-box:hover::after {
  opacity: 1;
}

.hm-media-box:hover,
.ab-media-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -6px rgba(26, 23, 18, 0.12), 0 4px 12px rgba(168, 132, 47, 0.06);
  border-color: #d6ccba;
}

/* Lace Texture cards interactive lift & delicate mesh border sheen */
.pa-tex-card:hover,
.lc-feature-card:hover,
.lc-craft-box:hover,
.hm-card:hover {
  transform: translateY(-5px);
  border-color: #c9a85c;
  box-shadow: 0 14px 32px -4px rgba(26, 23, 18, 0.08), 0 2px 8px rgba(168, 132, 47, 0.08);
}

.pa-tex-card img,
.lc-feature-card img,
.lc-craft-box img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.pa-tex-card:hover img,
.lc-feature-card:hover img,
.lc-craft-box:hover img {
  transform: scale(1.04);
}

/* 5. Placeholder Mesh Dynamic Upgrade (if any placeholder renders) */
.hm-ph,
.ab-ph {
  background-image: 
    radial-gradient(circle at 50% 50%, var(--hm-ph-border, #dcd7cc) 1.2px, transparent 1.5px),
    linear-gradient(45deg, var(--hm-ph-border, #dcd7cc) 1px, transparent 1px),
    linear-gradient(-45deg, var(--hm-ph-border, #dcd7cc) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 24px 24px;
  animation: laceGridShimmer 22s linear infinite;
}

/* 6. Respect Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  .hm-hero::before,
  .pa-hero::before,
  .lc-hero::before,
  .ab-hero::before,
  .cd-hero::before,
  .cp-hero::before,
  .ct-hero::before,
  .hm-hero::after,
  .pa-hero::after,
  .lc-hero::after,
  .ab-hero::after,
  .hm-section-alt::before,
  .ab-section-alt::before,
  .lc-bg-alt::before,
  .pa-bg-alt::before,
  .hm-section-dark::before,
  .ab-section-dark::before,
  .hm-ph,
  .ab-ph {
    animation: none !important;
  }
  .hm-media-box,
  .ab-media-box,
  .pa-step-card,
  .pa-tex-card,
  .lc-feature-card,
  .lc-craft-box,
  .hm-card {
    transition: none !important;
  }
}
