/* SmartHerb Public Home Effects — RS-VC46
 * Page-scoped motion and interaction layer inspired by modern public-sector
 * image-led homepages. No layout dependency outside .page-public-home.
 */

body.page-public-home {
  --shfx-progress: 0;
}

body.page-public-home .sh-scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 2050;
  height: 3px;
  transform: scaleX(var(--shfx-progress));
  transform-origin: left center;
  background: linear-gradient(90deg, #1f6b55, #50bb8d, #c7e86b);
  box-shadow: 0 1px 8px rgba(35, 131, 95, .34);
  pointer-events: none;
}

body.page-public-home .sh-hero {
  isolation: isolate;
}

body.page-public-home .sh-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(80, 187, 141, .16), transparent 26%),
    radial-gradient(circle at 84% 22%, rgba(199, 232, 107, .14), transparent 24%),
    linear-gradient(115deg, transparent 0 62%, rgba(255, 255, 255, .24) 62% 63%, transparent 63%);
  pointer-events: none;
}

html[data-theme="dark"] body.page-public-home .sh-hero::before,
body.page-public-home.theme-dark .sh-hero::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(80, 187, 141, .12), transparent 27%),
    radial-gradient(circle at 84% 22%, rgba(199, 232, 107, .08), transparent 25%);
}

body.page-public-home .sh-hero__content,
body.page-public-home .sh-hero__visual {
  position: relative;
  z-index: 1;
}

body.page-public-home .sh-hero__visual {
  --shfx-x: 50%;
  --shfx-y: 35%;
}

body.page-public-home .sh-spotlight {
  position: relative;
  overflow: hidden;
}

body.page-public-home .sh-spotlight__viewport {
  position: relative;
  min-height: clamp(470px, 42vw, 610px);
  overflow: hidden;
  background: var(--sh-mint-100);
}

body.page-public-home .sh-spotlight__viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: .7;
  background: radial-gradient(circle at var(--shfx-x) var(--shfx-y), rgba(255, 255, 255, .2), transparent 32%);
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity .25s ease;
}

body.page-public-home .sh-spotlight__slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.025);
  transition: opacity .72s ease, transform 1.05s cubic-bezier(.2, .75, .25, 1), visibility 0s linear .72s;
  pointer-events: none;
}

body.page-public-home .sh-spotlight__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition-delay: 0s;
  pointer-events: auto;
}

body.page-public-home .sh-spotlight .sh-hero__image-wrap {
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}

body.page-public-home .sh-spotlight .sh-hero__image-wrap img {
  transform: scale(1.035);
  transition: transform 7s linear;
}

body.page-public-home .sh-spotlight__slide.is-active .sh-hero__image-wrap img {
  transform: scale(1.095);
}

body.page-public-home #main-content .sh-hero__caption a {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: .35rem;
  margin-top: .32rem;
  color: #d8f7e8 !important;
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
}

body.page-public-home #main-content .sh-hero__caption a:hover,
body.page-public-home #main-content .sh-hero__caption a:focus-visible {
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: .2em;
}

body.page-public-home .sh-spotlight__controls {
  position: absolute;
  top: .9rem;
  right: .9rem;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  padding: .36rem .42rem;
  background: rgba(7, 37, 29, .64);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
  backdrop-filter: blur(14px);
}

body.page-public-home .sh-spotlight__arrow,
body.page-public-home .sh-spotlight__dot {
  border: 0;
  background: transparent;
  color: #fff;
}

body.page-public-home .sh-spotlight__arrow {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  transition: background .18s ease, transform .18s ease;
}

body.page-public-home .sh-spotlight__arrow:hover,
body.page-public-home .sh-spotlight__arrow:focus-visible {
  background: rgba(255, 255, 255, .18);
  transform: scale(1.06);
}

body.page-public-home .sh-spotlight__dots {
  display: flex;
  align-items: center;
  gap: .3rem;
}

body.page-public-home .sh-spotlight__dot {
  width: .46rem;
  height: .46rem;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, .52);
  transition: width .25s ease, background .25s ease;
}

body.page-public-home .sh-spotlight__dot.is-active {
  width: 1.35rem;
  background: #fff;
}

/* Hero entrance: enabled only after JS boot so content remains visible without JS. */
body.page-public-home.sh-effects-ready .sh-hero__content > *,
body.page-public-home.sh-effects-ready .sh-hero__visual {
  opacity: 0;
  transform: translateY(18px);
  animation: shfx-enter .72s cubic-bezier(.2, .75, .25, 1) forwards;
}

body.page-public-home.sh-effects-ready .sh-hero__content > :nth-child(1) { animation-delay: .04s; }
body.page-public-home.sh-effects-ready .sh-hero__content > :nth-child(2) { animation-delay: .11s; }
body.page-public-home.sh-effects-ready .sh-hero__content > :nth-child(3) { animation-delay: .18s; }
body.page-public-home.sh-effects-ready .sh-hero__content > :nth-child(4) { animation-delay: .25s; }
body.page-public-home.sh-effects-ready .sh-hero__content > :nth-child(5) { animation-delay: .32s; }
body.page-public-home.sh-effects-ready .sh-hero__content > :nth-child(6) { animation-delay: .39s; }
body.page-public-home.sh-effects-ready .sh-hero__visual { animation-delay: .18s; }

@keyframes shfx-enter {
  to { opacity: 1; transform: translateY(0); }
}

body.page-public-home.sh-effects-ready [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .68s ease, transform .68s cubic-bezier(.2, .75, .25, 1);
  transition-delay: var(--shfx-delay, 0ms);
}

body.page-public-home.sh-effects-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.page-public-home .sh-service-card,
body.page-public-home .sh-herb-card,
body.page-public-home .sh-project-card,
body.page-public-home .sh-area-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

body.page-public-home .sh-service-card::after,
body.page-public-home .sh-herb-card::after,
body.page-public-home .sh-project-card::after,
body.page-public-home .sh-area-card::after {
  content: "";
  position: absolute;
  inset: -120% auto -120% -45%;
  z-index: 2;
  width: 34%;
  transform: rotate(18deg) translateX(-240%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34), transparent);
  transition: transform .72s ease;
  pointer-events: none;
}

body.page-public-home .sh-service-card:hover::after,
body.page-public-home .sh-herb-card:hover::after,
body.page-public-home .sh-project-card:hover::after,
body.page-public-home .sh-area-card:hover::after {
  transform: rotate(18deg) translateX(520%);
}

body.page-public-home .sh-stat strong.is-counting {
  color: #bdf2d6 !important;
  text-shadow: 0 0 24px rgba(80, 187, 141, .24);
}

body.page-public-home .sh-stat strong.is-counted {
  animation: shfx-count-pop .38s ease;
}

@keyframes shfx-count-pop {
  50% { transform: translateY(-3px) scale(1.045); }
}

body.page-public-home .sh-final-cta__inner {
  position: relative;
  overflow: hidden;
}

body.page-public-home .sh-final-cta__inner::before,
body.page-public-home .sh-final-cta__inner::after {
  content: "";
  position: absolute;
  width: 180px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 48% 52% 70% 30% / 52% 42% 58% 48%;
  pointer-events: none;
  animation: shfx-float 8s ease-in-out infinite alternate;
}

body.page-public-home .sh-final-cta__inner::before {
  top: -110px;
  right: 18%;
}

body.page-public-home .sh-final-cta__inner::after {
  right: -65px;
  bottom: -105px;
  animation-delay: -3s;
}

@keyframes shfx-float {
  to { transform: translate3d(12px, 14px, 0) rotate(9deg); }
}

@media (max-width: 991.98px) {
  body.page-public-home .sh-spotlight__viewport {
    min-height: clamp(500px, 76vw, 650px);
  }
}

@media (max-width: 575.98px) {
  body.page-public-home .sh-spotlight__viewport {
    min-height: 430px;
  }

  body.page-public-home .sh-spotlight__controls {
    top: .65rem;
    right: .65rem;
    transform: scale(.92);
    transform-origin: top right;
  }

  body.page-public-home .sh-spotlight__viewport::after {
    display: none;
  }
}

@media (hover: none) {
  body.page-public-home .sh-service-card::after,
  body.page-public-home .sh-herb-card::after,
  body.page-public-home .sh-project-card::after,
  body.page-public-home .sh-area-card::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-public-home *,
  body.page-public-home *::before,
  body.page-public-home *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  body.page-public-home.sh-effects-ready [data-reveal],
  body.page-public-home.sh-effects-ready .sh-hero__content > *,
  body.page-public-home.sh-effects-ready .sh-hero__visual {
    opacity: 1;
    transform: none;
  }
}
