/* Event-driven product lighting. Independent of existing GSAP/AOS transforms. */
#produtos .produto-card { position: relative; overflow: hidden; }
#produtos .produto-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--light-x, 50%) var(--light-y, 50%), rgba(196, 151, 74, 0.13), transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 180ms ease-out;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #produtos .produto-card[data-lit='true']::before { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #produtos .produto-card::before { display: none; }
}

/* Original ILMD tilted photo wall. No React Bits Pro source or new photos. */
#home .hero-mosaic { perspective: 1100px; }
#home .hero-mosaic__mobile {
  transform: rotateX(9deg) rotateZ(-8deg) scale(1.08);
  transform-origin: center;
}
#home .hero-mosaic__card { border-radius: 1.5rem; border: 1px solid rgba(196,151,74,.18); box-shadow: 0 6px 18px rgba(44,21,7,.12); }
#home .hero-mosaic__card img { will-change: auto; }
#home .hero-mosaic__track, #home .hero-mosaic__row-track { animation-play-state: paused; }
#home .hero-mosaic[data-tiles-active='true'] .hero-mosaic__track,
#home .hero-mosaic[data-tiles-active='true'] .hero-mosaic__row-track { animation-play-state: running; }
@media (min-width: 1080px) {
  #home .hero-mosaic__desktop { transform: rotateX(16deg) rotateY(-16deg) rotateZ(-12deg) scale(1.14); transform-origin: center; }
}
@media (prefers-reduced-motion: reduce) {
  #home .hero-mosaic__track, #home .hero-mosaic__row-track { animation: none !important; }
  #home .hero-mosaic__mobile, #home .hero-mosaic__desktop { transform: none; }
}

/* Magic UI inspired perimeter shimmer, preserving every CTA URL/attribution. */
@property --ilmd-landing-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.button::after { display: none; }
.button::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--ilmd-landing-angle), transparent 0deg 250deg, rgba(255,255,255,.9) 280deg, transparent 310deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .button:focus-visible::before { animation: ilmd-landing-shimmer 2.4s linear 2; }
  @media (hover: hover) and (pointer: fine) {
    .button:hover::before { animation: ilmd-landing-shimmer 2.4s linear 2; }
  }
}
@keyframes ilmd-landing-shimmer { 0% { --ilmd-landing-angle: 0deg; opacity: 0; } 15%,85% { opacity: 1; } 100% { --ilmd-landing-angle: 360deg; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .button::before { display: none; } }

/* One visible control for all automatic photo and text motion. */
#home { position: relative; }
.motion-toggle {
  position: absolute; top: 1.6rem; right: 2rem; z-index: 4;
  min-height: 44px; padding: .8rem 1.4rem;
  border: 1px solid rgba(89,48,24,.25); border-radius: 999px;
  background: #FAF6EE; color: #593018;
  font: 500 1.2rem/1.4 var(--font-body); cursor: pointer;
}
.motion-toggle:focus-visible { outline: 2px solid #593018; outline-offset: 3px; }
.motion-toggle[aria-pressed='true'] { background: #F4E9D6; }
body[data-motion-paused='true'] .button::before { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .motion-toggle { display: none; } }
