/* ==========================================================================
   NOURISH Motion System — Blur-to-Clear Scroll Reveal
   ========================================================================== */

/* Only apply hidden initial state when JS has confirmed readiness */
html.js-motion .reveal {
  opacity: 0;
  transform: translateY(35px);
  filter: blur(10px);
  transition:
    opacity var(--duration-reveal) var(--ease-out-expo),
    transform var(--duration-reveal) var(--ease-out-expo),
    filter var(--duration-reveal) var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

html.js-motion .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0px);
  will-change: auto;
}

/* Subtle Image Reveal */
html.js-motion .img-reveal {
  opacity: 0;
  transform: scale(1.035);
  transition:
    opacity 900ms var(--ease-out-expo),
    transform 1050ms var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 60ms);
}

html.js-motion .img-reveal.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Restrained Floating Botanical Accent */
@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-7px);
  }
}

.float-gentle {
  animation: floatGentle 7s ease-in-out infinite;
}

/* Reduce animation intensity on mobile for smooth performance */
@media (max-width: 767px) {
  html.js-motion .reveal {
    transform: translateY(20px);
    filter: blur(4px);
    transition-duration: 640ms;
  }

  html.js-motion .img-reveal {
    transform: scale(1.02);
    transition-duration: 700ms;
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html.js-motion .reveal,
  html.js-motion .img-reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .float-gentle {
    animation: none !important;
  }
}

/* ---------- Desktop-Only Custom Botanical Cursor ---------- */
@media (hover: hover) and (pointer: fine) and (min-width: 960px) {
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor [role="button"] {
    cursor: none;
  }

  .custom-cursor-dot,
  .custom-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 220ms ease;
    will-change: transform;
  }

  .custom-cursor-dot {
    width: 7px;
    height: 7px;
    margin-left: -3.5px;
    margin-top: -3.5px;
    background-color: var(--color-evergreen);
  }

  .custom-cursor-ring {
    width: 32px;
    height: 32px;
    margin-left: -16px;
    margin-top: -16px;
    border: 1.5px solid rgba(23, 63, 50, 0.45);
    background-color: rgba(220, 232, 216, 0.14);
    transition:
      opacity 220ms ease,
      width 240ms var(--ease-out-expo),
      height 240ms var(--ease-out-expo),
      margin 240ms var(--ease-out-expo),
      border-color 240ms ease,
      background-color 240ms ease;
  }

  body.has-custom-cursor .custom-cursor-dot.is-active,
  body.has-custom-cursor .custom-cursor-ring.is-active {
    opacity: 1;
  }

  .custom-cursor-ring.is-hovering {
    width: 46px;
    height: 46px;
    margin-left: -23px;
    margin-top: -23px;
    border-color: var(--color-gold);
    background-color: rgba(198, 166, 107, 0.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  .custom-cursor-dot,
  .custom-cursor-ring {
    display: none !important;
  }

  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button {
    cursor: auto !important;
  }
}
