/* Page progress bar */
#page-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  background: var(--green-light);
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
}

#page-progress.is-loading {
  animation: progressPulse 0.8s ease infinite;
}

@keyframes progressPulse {
  0% {
    transform: scaleX(0);
    transform-origin: left;
  }
  50% {
    transform: scaleX(0.6);
    transform-origin: left;
  }
  100% {
    transform: scaleX(1);
    transform-origin: right;
  }
}

/* Custom cursor */
.cursor-dot {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--green-mid);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
  mix-blend-mode: difference;
}

.cursor-dot.is-hover {
  width: 36px;
  height: 36px;
  background: rgba(45, 122, 45, 0.35);
  mix-blend-mode: normal;
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .cursor-dot {
    display: none !important;
  }
}

/* Word reveal */
[data-reveal="words"] .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

[data-reveal="words"].is-visible .word {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile book bar */
.mobile-book-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 180;
  display: flex;
  align-items: stretch;
  background: var(--black);
  border-top: 1px solid rgba(45, 122, 45, 0.4);
  transform: translateY(100%);
  transition: transform 0.35s var(--ease-out);
}

.mobile-book-bar.is-visible {
  transform: translateY(0);
}

.mobile-book-bar__wa {
  flex: 0 0 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  color: var(--white);
  text-decoration: none;
}

.mobile-book-bar__wa svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.mobile-book-bar__book {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-mid);
  color: var(--white);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mobile-book-bar__book:hover {
  background: var(--green-dark);
  color: var(--white);
}

@media (min-width: 769px) {
  .mobile-book-bar {
    display: none;
  }
}

/* Blur-up images */
.img-blur-up {
  filter: blur(12px);
  transition: filter 0.5s ease;
}

.img-blur-up.is-loaded {
  filter: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  [data-reveal="words"] .word {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cursor-dot {
    display: none !important;
  }
}
