/* Premium motion layer: GSAP / Lenis / vanilla stand-ins for React Bits & 21st.dev.
   Only hides upcoming reveals when <html> has .js-motion (set early, confirmed by motion.js). */

/* --- Shiny gradient text (React Bits "Shiny Text" style) on the brand wordmark --- */
.brand b,
footer .lg b{
  background-image:linear-gradient(
    105deg,
    #C99A4B 0%,
    #C99A4B 38%,
    #F8E7B4 50%,
    #C99A4B 62%,
    #C99A4B 100%
  );
  background-size:220% 100%;
  background-position:120% 50%;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  -webkit-text-fill-color:transparent;
  animation:deera-shine 5.5s ease-in-out 1.2s infinite;
}
@keyframes deera-shine{
  0%,22%{background-position:120% 50%}
  55%,100%{background-position:-20% 50%}
}

/* --- Soft drifting aurora behind the sand catalogue (21st.dev / React Bits aura) --- */
.bg-aurora{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
}
.bg-aurora i{
  position:absolute;
  border-radius:50%;
  filter:blur(72px);
  will-change:transform,opacity;
  animation:deera-aurora 22s ease-in-out infinite alternate;
}
.bg-aurora i:nth-child(1){
  width:46vw;height:46vw;min-width:280px;min-height:280px;
  right:-8vw;top:28vh;
  background:rgba(201,154,75,.28);
  animation-duration:26s;
}
.bg-aurora i:nth-child(2){
  width:40vw;height:40vw;min-width:240px;min-height:240px;
  left:-10vw;top:58vh;
  background:rgba(18,62,56,.16);
  animation-duration:20s;
  animation-delay:-8s;
}
.bg-aurora i:nth-child(3){
  width:34vw;height:34vw;min-width:200px;min-height:200px;
  right:18vw;bottom:-8vh;
  background:rgba(217,174,102,.18);
  animation-duration:24s;
  animation-delay:-14s;
}
@keyframes deera-aurora{
  from{transform:translate3d(0,0,0) scale(1);opacity:.85}
  to{transform:translate3d(-6%,4%,0) scale(1.12);opacity:1}
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .bg-aurora i:nth-child(1){background:rgba(201,154,75,.2)}
  :root:not([data-theme="light"]) .bg-aurora i:nth-child(2){background:rgba(239,228,210,.08)}
  :root:not([data-theme="light"]) .bg-aurora i:nth-child(3){background:rgba(201,154,75,.14)}
}
:root[data-theme="dark"] .bg-aurora i:nth-child(1){background:rgba(201,154,75,.2)}
:root[data-theme="dark"] .bg-aurora i:nth-child(2){background:rgba(239,228,210,.08)}
:root[data-theme="dark"] .bg-aurora i:nth-child(3){background:rgba(201,154,75,.14)}

/* Keep page chrome above the aurora wash */
.top,main,footer,.bar,.veil,#wa-float{position:relative;z-index:1}
.top{z-index:50}
.bar{z-index:55}
.veil{z-index:70}
#wa-float{z-index:9999}

/* --- Hover lift + warm glow (fine pointers only, so touch doesn't stick) --- */
@media (hover:hover) and (pointer:fine){
  .card.is-revealed,
  .offer.is-revealed,
  .btn,.addbtn,.copy-btn,.cartbtn{
    transition:transform .35s cubic-bezier(.2,.7,.2,1),box-shadow .35s ease,border-color .35s ease,filter .35s ease;
  }
  .card.is-revealed:hover{
    transform:translateY(-6px);
    border-color:rgba(201,154,75,.5);
    box-shadow:0 18px 36px -20px rgba(12,45,41,.4),0 0 0 1px rgba(201,154,75,.28),0 0 28px -10px rgba(201,154,75,.45);
  }
  .offer.is-revealed:hover{
    transform:translateY(-5px);
    border-color:rgba(201,154,75,.7);
    box-shadow:0 16px 32px -16px rgba(0,0,0,.45),0 0 24px -8px rgba(201,154,75,.4);
  }
  .btn:hover,.addbtn:hover{
    transform:translateY(-2px);
    filter:brightness(1.06);
    box-shadow:0 12px 24px -12px rgba(201,154,75,.6);
  }
  .btn.ghost:hover{
    box-shadow:0 10px 22px -12px rgba(243,217,156,.55);
  }
  .cartbtn:hover,.copy-btn:hover{
    transform:translateY(-1px);
    border-color:rgba(201,154,75,.9);
  }
}

/* --- Pre-reveal states (cleared by GSAP, or if motion.js never confirms) --- */
html.js-motion .card:not(.is-revealed):not([hidden]),
html.js-motion .offer:not(.is-revealed),
html.js-motion .band li:not(.is-revealed),
html.js-motion .steps li:not(.is-revealed),
html.js-motion .sechead:not(.is-revealed),
html.js-motion .onote:not(.is-revealed){
  opacity:0;
  transform:translateY(28px);
}

/* Lenis replaces native smooth scrolling */
html.lenis,html.lenis body{height:auto}
html.lenis{scroll-behavior:auto!important}

@media (prefers-reduced-motion:reduce){
  .brand b,footer .lg b{
    animation:none!important;
    background:none;
    -webkit-text-fill-color:var(--amber);
    color:var(--amber);
  }
  .bg-aurora i{animation:none!important}
  html.js-motion .card:not(.is-revealed):not([hidden]),
  html.js-motion .offer:not(.is-revealed),
  html.js-motion .band li:not(.is-revealed),
  html.js-motion .steps li:not(.is-revealed),
  html.js-motion .sechead:not(.is-revealed),
  html.js-motion .onote:not(.is-revealed){
    opacity:1;
    transform:none;
  }
  .card,.offer,.btn,.addbtn,.copy-btn,.cartbtn{
    transition:none!important;
  }
}

@media (max-width:720px){
  .bg-aurora i{filter:blur(64px);opacity:.85}
}


/* Local-only reveal targets (bestsellers header, 6@99 strip, brand groups, brand jump strip) */
html.js-motion .hd-six:not(.is-revealed),
html.js-motion .ghead:not(.is-revealed),
html.js-motion .brand-strip-wrap:not(.is-revealed),
html.js-motion .studio .sechead:not(.is-revealed){
  opacity:0;
  transform:translateY(28px);
}
@media (hover:hover) and (pointer:fine){
  .hd-six.is-revealed{
    transition:transform .35s cubic-bezier(.2,.7,.2,1),box-shadow .35s ease,border-color .35s ease;
  }
  .hd-six.is-revealed:hover{
    transform:translateY(-5px);
    border-color:rgba(201,154,75,.7);
    box-shadow:0 16px 32px -16px rgba(0,0,0,.45),0 0 24px -8px rgba(201,154,75,.4);
  }
}
@media (prefers-reduced-motion:reduce){
  html.js-motion .hd-six:not(.is-revealed),
  html.js-motion .ghead:not(.is-revealed),
  html.js-motion .brand-strip-wrap:not(.is-revealed){
    opacity:1;
    transform:none;
  }
}
