/* SMELO — Premium motion layer */

:root {
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.5s steps(2) infinite;
}

@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2%, -2%); }
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 101;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-light), var(--gold));
  box-shadow: 0 0 12px rgba(201, 169, 98, 0.6);
  transition: width 0.1s linear;
}

/* Enhanced loader */
.loader {
  transition: opacity 1s var(--ease-expo), visibility 1s, transform 1.2s var(--ease-expo);
}

.loader.is-exiting {
  opacity: 0;
  transform: scale(1.05);
}

.loader__ring {
  position: absolute;
  width: 140px;
  height: 140px;
  border: 1px solid rgba(201, 169, 98, 0.2);
  border-radius: 50%;
  animation: loaderRingSpin 3s linear infinite;
}

.loader__ring::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--gold-light);
  animation: loaderRingSpin 1.2s linear infinite reverse;
}

.loader__logo {
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  animation: loaderLogoIn 1s var(--ease-spring) 0.15s forwards;
}

@keyframes loaderLogoIn {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes loaderRingSpin {
  to { transform: rotate(360deg); }
}

/* Floating particles */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: particleDrift var(--duration, 15s) var(--ease-smooth) infinite;
  animation-delay: var(--delay, 0s);
  box-shadow: 0 0 12px rgba(201, 169, 98, 0.4);
}

.particle--ocean {
  background: var(--accent-ocean);
  box-shadow: 0 0 10px rgba(78, 205, 196, 0.35);
}

.particle--rose {
  background: var(--accent-rose);
  box-shadow: 0 0 10px rgba(232, 160, 176, 0.35);
}

@keyframes particleDrift {
  0% {
    opacity: 0;
    transform: translate(var(--x-start), 100vh) scale(0);
  }
  8% { opacity: var(--opacity, 0.5); }
  92% { opacity: var(--opacity, 0.5); }
  100% {
    opacity: 0;
    transform: translate(var(--x-end), -10vh) scale(1);
  }
}

/* Ambient orbs — richer motion */
.ambient__orb {
  animation: orbFloat 20s ease-in-out infinite, orbPulse 8s ease-in-out infinite;
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.3; filter: blur(80px); }
  50% { opacity: 0.45; filter: blur(100px); }
}

/* Hero — cinematic entrance */
.page-loaded .hero__eyebrow {
  animation: slideReveal 0.7s var(--ease-expo) 0.05s forwards;
}

.page-loaded .hero__title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(1.1em) rotateX(12deg);
  animation: wordReveal 0.65s var(--ease-expo) forwards;
  transform-origin: center bottom;
}

.page-loaded .hero__title .hero__title-accent,
.page-loaded .hero__title .word em {
  font-style: italic;
  color: var(--gold-light);
  background: linear-gradient(120deg, var(--gold-light), #fff5e0, var(--gold));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: wordReveal 1s var(--ease-expo) forwards, shimmerText 4s ease-in-out infinite;
}

.page-loaded .hero__text {
  animation: blurFadeUp 0.7s var(--ease-expo) 0.2s forwards;
}

.page-loaded .hero__cta {
  animation: blurFadeUp 0.7s var(--ease-expo) 0.28s forwards;
}

.page-loaded .hero__cta .btn {
  opacity: 0;
  animation: blurFadeUp 0.55s var(--ease-spring) forwards;
}

.page-loaded .hero__cta .btn:nth-child(1) { animation-delay: 0.32s; }
.page-loaded .hero__cta .btn:nth-child(2) { animation-delay: 0.4s; }

.page-loaded .hero__visual {
  animation: heroVisualIn 0.8s var(--ease-expo) 0.08s forwards;
}

@keyframes slideReveal {
  from {
    opacity: 0;
    transform: translateX(-24px);
    letter-spacing: 0.8em;
  }
  to {
    opacity: 1;
    transform: translateX(0);
    letter-spacing: 0.5em;
  }
}

@keyframes wordReveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

@keyframes shimmerText {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

@keyframes blurFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes heroVisualIn {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(40px);
    filter: blur(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

/* Hero visual extras */
.hero__glow {
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 169, 98, 0.15) 0%, transparent 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: glowPulse 4s ease-in-out infinite;
  pointer-events: none;
}

.hero__ring--2 {
  width: 112%;
  height: 112%;
  border-style: dashed;
  opacity: 0.4;
  animation: ringRotate 45s linear infinite reverse;
}

.hero__ring--3 {
  width: 88%;
  height: 88%;
  border: none;
  background: conic-gradient(from 0deg, transparent, rgba(201, 169, 98, 0.15), transparent 30%);
  animation: ringRotate 12s linear infinite;
  mask: radial-gradient(circle, transparent 48%, black 49%);
  -webkit-mask: radial-gradient(circle, transparent 48%, black 49%);
}

.hero__bottle {
  position: relative;
  z-index: 2;
  animation: bottleFloat 5s ease-in-out infinite, bottleGlow 3s ease-in-out infinite;
}

@keyframes bottleGlow {
  0%, 100% { filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.6)); }
  50% { filter: drop-shadow(0 50px 100px rgba(201, 169, 98, 0.25)); }
}

.hero__sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold-light);
  border-radius: 50%;
  animation: sparkle 2s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  top: var(--t, 50%);
  left: var(--l, 50%);
  box-shadow: 0 0 8px var(--gold-light);
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Scent wave lines */
.scent-waves {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 60px;
  opacity: 0.3;
  pointer-events: none;
}

.scent-waves span {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 20px;
  background: linear-gradient(to top, var(--gold), transparent);
  transform-origin: bottom center;
  animation: scentWave 2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.15s);
}

.scent-waves span:nth-child(1) { margin-left: -30px; --i: 0; }
.scent-waves span:nth-child(2) { margin-left: -15px; --i: 1; }
.scent-waves span:nth-child(3) { margin-left: 0; --i: 2; }
.scent-waves span:nth-child(4) { margin-left: 15px; --i: 3; }
.scent-waves span:nth-child(5) { margin-left: 30px; --i: 4; }

@keyframes scentWave {
  0%, 100% { transform: translateX(-50%) scaleY(0.4); opacity: 0.3; }
  50% { transform: translateX(-50%) scaleY(1.2); opacity: 0.8; }
}

/* Scroll reveals — upgraded */
.reveal {
  opacity: 0;
  transform: translateY(48px) scale(0.97);
  filter: blur(6px);
  transition:
    opacity 1s var(--ease-expo),
    transform 1s var(--ease-expo),
    filter 1s var(--ease-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.reveal--left {
  transform: translateX(-48px) scale(0.97);
}

.reveal--left.visible {
  transform: translateX(0) scale(1);
}

.reveal--right {
  transform: translateX(48px) scale(0.97);
}

.reveal--right.visible {
  transform: translateX(0) scale(1);
}

.reveal--scale {
  transform: scale(0.9);
}

.reveal--scale.visible {
  transform: scale(1);
}

/* Stagger children */
.reveal-stagger.visible .reveal-child {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.reveal-child {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(4px);
  transition:
    opacity 0.8s var(--ease-expo),
    transform 0.8s var(--ease-expo),
    filter 0.8s var(--ease-expo);
}

.reveal-stagger.visible .reveal-child:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger.visible .reveal-child:nth-child(2) { transition-delay: 0.22s; }
.reveal-stagger.visible .reveal-child:nth-child(3) { transition-delay: 0.34s; }
.reveal-stagger.visible .reveal-child:nth-child(4) { transition-delay: 0.46s; }

/* Section labels — line draw */
.section__label {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.section__label::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 1s var(--ease-expo) 0.3s;
}

.reveal.visible .section__label::after,
.page-loaded .section__label::after {
  width: 100%;
}

/* Info strip cards — no hover motion (static like highlights row) */
.strip-cards .strip-cards__item {
  transition: none;
}

.strip-cards .strip-cards__icon {
  transition: none;
}

/* Product card — 3D tilt + glow border */
.product-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: transform;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(201, 169, 98, 0.12),
    transparent 55%
  );
  transition: opacity 0.4s;
  pointer-events: none;
}

.product-card.is-tilting::before,
.product-card:hover::before {
  opacity: 1;
}

.product-card__image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    transparent 30%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 70%
  );
  transform: translateX(-100%) skewX(-12deg);
  transition: transform 0.9s var(--ease-expo);
}

.product-card:hover .product-card__image-wrap::after {
  transform: translateX(100%) skewX(-12deg);
}

.product-card__badge {
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 rgba(201, 169, 98, 0); }
  50% { box-shadow: 0 0 20px rgba(201, 169, 98, 0.2); }
}

/* Buttons — shine sweep */
.btn--primary,
.btn--whatsapp {
  position: relative;
  overflow: hidden;
}

.btn--primary::after,
.btn--whatsapp::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.6s var(--ease-expo);
}

.btn--primary:hover::after,
.btn--whatsapp:hover::after {
  left: 150%;
}

/* Stats counter glow */
.stat {
  transition: transform 0.5s var(--ease-spring), border-color 0.4s;
}

.stat:hover {
  transform: scale(1.03);
  border-color: rgba(201, 169, 98, 0.4);
}

.stat__num {
  transition: text-shadow 0.4s;
}

.stat:hover .stat__num {
  text-shadow: 0 0 30px rgba(201, 169, 98, 0.4);
}

/* Steps — connector animation */
.step {
  transition: transform 0.5s var(--ease-spring);
}

.step.visible:hover {
  transform: translateX(8px);
}

.step__num {
  transition: transform 0.5s var(--ease-spring), box-shadow 0.4s;
}

.step.visible:hover .step__num {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 0 24px rgba(201, 169, 98, 0.3);
}

/* About visual — rotating border */
.about__visual {
  position: relative;
  overflow: hidden;
}

.about__visual::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg, transparent, var(--gold-dim), transparent, var(--gold-light), transparent);
  animation: borderSpin 8s linear infinite;
  z-index: 0;
  opacity: 0.5;
}

.about__visual > * {
  position: relative;
  z-index: 1;
}

@keyframes borderSpin {
  to { transform: rotate(360deg); }
}

/* Cart drawer — spring */
.cart-drawer {
  transition: transform 0.65s var(--ease-spring);
}

.cart-item {
  animation: cartItemIn 0.5s var(--ease-expo) backwards;
}

@keyframes cartItemIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
}

/* Toast — bounce */
.toast {
  transition:
    transform 0.55s var(--ease-spring),
    opacity 0.4s;
}

.toast.show {
  animation: toastBounce 0.6s var(--ease-spring);
}

@keyframes toastBounce {
  0% { transform: translateX(-50%) translateY(80px) scale(0.9); }
  60% { transform: translateX(-50%) translateY(-4px) scale(1.02); }
  100% { transform: translateX(-50%) translateY(0) scale(1); }
}

/* FAB WhatsApp — ring ripple */
.fab-whatsapp::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.5);
  animation: fabRipple 2s ease-out infinite;
}

@keyframes fabRipple {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Mobile nav — stagger links */
.mobile-nav.open a {
  animation: navLinkIn 0.6s var(--ease-expo) backwards;
}

.mobile-nav.open a:nth-child(1) { animation-delay: 0.05s; }
.mobile-nav.open a:nth-child(2) { animation-delay: 0.12s; }
.mobile-nav.open a:nth-child(3) { animation-delay: 0.19s; }
.mobile-nav.open a:nth-child(4) { animation-delay: 0.26s; }
.mobile-nav.open a:nth-child(5) { animation-delay: 0.33s; }

@keyframes navLinkIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }
}

/* Parallax helper */
[data-parallax] {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* Skip intro animations on repeat visits (reload) */
.page-loaded-instant .hero__eyebrow,
.page-loaded-instant .hero__title,
.page-loaded-instant .hero__text,
.page-loaded-instant .hero__cta,
.page-loaded-instant .hero__visual {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
}

.page-loaded-instant .hero__title .word {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

.page-loaded-instant .hero__cta .btn {
  opacity: 1 !important;
  animation: none !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal-child {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .particle,
  .grain {
    display: none;
  }
}
