/* ============================================================
   HERBS-MAN — Premium Animation System CSS
   Awwwards-quality layer. Never animates width/height/top/left.
   All motion via transform + opacity only.
   ============================================================ */

/* ── 1. CSS Custom Properties ──────────────────────────────── */
:root {
  --hm-green:       #acf847;
  --hm-dark:        #00170d;
  --hm-mid:         #416900;
  --hm-surface:     #fbfbe2;
  --hm-ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --hm-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --hm-duration:    0.65s;
}

/* ── 2. Scroll Progress Bar ────────────────────────────────── */
#hm-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--hm-green);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(172, 248, 71, 0.6);
}

/* ── 3. Page Loader ────────────────────────────────────────── */
#hm-loader {
  position: fixed;
  inset: 0;
  background: var(--hm-dark);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  pointer-events: all;
}

#hm-loader .loader-logo {
  opacity: 0;
  transform: translateY(20px);
}

#hm-loader .loader-wordmark {
  color: #fff;
  font-family: 'Noto Serif', serif;
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0;
  transform: translateY(10px);
}

#hm-loader .loader-bar-track {
  width: 180px;
  height: 2px;
  background: rgba(255,255,255,0.12);
  border-radius: 99px;
  overflow: hidden;
}

#hm-loader .loader-bar {
  width: 0%;
  height: 100%;
  background: var(--hm-green);
  border-radius: 99px;
  box-shadow: 0 0 10px rgba(172,248,71,0.5);
  transition: width 0.05s linear;
}

#hm-loader .loader-tagline {
  color: rgba(172,248,71,0.7);
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0;
}

/* Custom Cursor removed to restore default browser cursor and optimize speed */

/* Background blobs removed — static gradients via body CSS only */

/* Particle canvas and floating decos removed for performance */

/* ── 8. GSAP Base States ───────────────────────────────────── */
/* will-change is set by GSAP only during animation, not globally */

/* ── 9. Hero Split Text ────────────────────────────────────── */
.hm-split-wrap {
  overflow: hidden;
}

.hm-split-wrap .word {
  display: inline-block;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* ── 10. Card Animations ───────────────────────────────────── */
.hm-card {
  position: relative;
  cursor: pointer;
}

.hm-card .card-img-wrap {
  overflow: hidden;
  border-radius: inherit;
}

.hm-card .card-img-wrap img {
  backface-visibility: hidden;
}

/* ── 11. Infinite Marquee ──────────────────────────────────── */
#hm-marquee {
  overflow: hidden;
  padding: 48px 0;
  background: var(--hm-dark);
  position: relative;
}

#hm-marquee::before,
#hm-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

#hm-marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--hm-dark) 0%, transparent 100%);
}

#hm-marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--hm-dark) 0%, transparent 100%);
}

.hm-marquee-row {
  display: flex;
  width: max-content;
  will-change: transform;
  gap: 0;
  margin-bottom: 16px;
}

.hm-marquee-row:last-child {
  margin-bottom: 0;
}

.hm-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 28px;
  margin: 0 8px;
  border: 1px solid rgba(172,248,71,0.18);
  border-radius: 100px;
  white-space: nowrap;
  color: rgba(255,255,255,0.75);
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(4px);
  transition: border-color 0.3s ease, color 0.3s ease;
  user-select: none;
}

.hm-marquee-item:hover {
  border-color: rgba(172,248,71,0.55);
  color: var(--hm-green);
}

.hm-marquee-item .marquee-icon {
  font-size: 16px;
  color: var(--hm-green);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.hm-marquee-header {
  text-align: center;
  margin-bottom: 28px;
  padding: 0 24px;
}

.hm-marquee-header p {
  color: rgba(255,255,255,0.4);
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hm-marquee-header h2 {
  color: rgba(255,255,255,0.85);
  font-family: 'Noto Serif', serif;
  font-size: clamp(22px, 3vw, 32px);
  margin-top: 4px;
}

/* ── 12. Button Micro-interactions ────────────────────────── */
.premium-btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--hm-ease-out),
              box-shadow 0.3s ease;
  transform: translateZ(0); /* force GPU layer */
}

/* Ripple element */
.hm-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,0.28);
  pointer-events: none;
  animation: hm-ripple-anim 0.55s linear;
}

@keyframes hm-ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Button glow pulse on hover */
.premium-btn:hover {
  box-shadow:
    0 8px 24px -6px rgba(0,23,13,0.4),
    0 0 0 2px rgba(172,248,71,0.25);
}

/* ── 13. Image Shine Effect ────────────────────────────────── */
.hm-shine-wrap {
  position: relative;
  overflow: hidden;
}

.hm-shine-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255,255,255,0.22) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  opacity: 0;
  transition: none;
}

.hm-shine-wrap:hover::after {
  animation: hm-shine-sweep 0.55s var(--hm-ease-out) forwards;
}

@keyframes hm-shine-sweep {
  0%   { left: -75%; opacity: 1; }
  100% { left: 125%; opacity: 1; }
}

/* ── 14. Nav Link Underline Animation ──────────────────────── */
.desktop-menu a {
  position: relative;
  text-decoration: none;
}

.desktop-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s var(--hm-ease-out);
}

.desktop-menu a:hover::after,
.desktop-menu a.active-link::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* ── 15. Icon Hover Micro-animation ────────────────────────── */
.icon-float {
  display: inline-block;
  transition: transform 0.3s var(--hm-ease-spring);
  will-change: transform;
}

.icon-float:hover {
  transform: translateY(-5px) rotate(8deg) scale(1.15);
}

/* ── 16. Counter Highlight ─────────────────────────────────── */
[data-counter] {
  display: inline-block;
  tabular-nums: all;
  font-variant-numeric: tabular-nums;
}

/* ── 17. Cert Card Stack Animation Base ────────────────────── */
.cert-card {
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* ── 18. Footer Reveal ─────────────────────────────────────── */
footer [class*="col"],
footer > * > * {
  will-change: transform, opacity;
}

/* ── 19. Section Fade Utilities ────────────────────────────── */
.hm-section-title {
  overflow: hidden;
}

/* ── 20. Scroll-driven parallax image ─────────────────────── */
.hm-parallax-img {
  will-change: transform;
  backface-visibility: hidden;
}

/* ── 21. Background Section Accent ────────────────────────── */
.hm-section-accent {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.07;
  will-change: transform;
}

/* ── 22. Hover Ring Enhancement ────────────────────────────── */
.hover-ring {
  transition: transform 0.4s var(--hm-ease-out),
              box-shadow 0.4s ease;
  backface-visibility: hidden;
}

.hover-ring:hover {
  transform: translateY(-6px);
  box-shadow:
    0 24px 48px -12px rgba(0,23,13,0.2),
    0 0 0 1px rgba(172,248,71,0.3);
}

.hover-ring::after {
  transition: opacity 0.4s ease, transform 0.4s var(--hm-ease-out);
}

/* ── 23. Navbar scroll state ───────────────────────────────── */
header.scrolled {
  box-shadow: 0 4px 32px -8px rgba(0,23,13,0.18) !important;
}

/* ── 24. Mobile-specific overrides ────────────────────────── */
@media (max-width: 768px) {
  #hm-marquee::before,
  #hm-marquee::after {
    width: 48px;
  }

  .hm-float-deco {
    font-size: 32px !important;
    opacity: 0.6;
  }

  .hm-bg-blob {
    filter: blur(50px);
    opacity: 0.2;
  }

  #hm-particles {
    display: none; /* No particles on mobile */
  }
}

/* ── 25. Premium CSS Hover for Cards ───────────────────────── */
.hm-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}

.hm-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow:
    0 20px 38px -12px rgba(0, 23, 13, 0.2),
    0 0 0 1.5px rgba(172, 248, 71, 0.55),
    0 0 20px 0px rgba(172, 248, 71, 0.15) !important;
}

.hm-card .card-img-wrap img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.hm-card:hover .card-img-wrap img {
  transform: scale(1.06) !important;
}

/* ── 26. Prefers Reduced Motion ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hm-reveal,
  .hm-fade-up,
  .hm-fade-left,
  .hm-fade-right,
  .hm-scale-in,
  .hm-word-split .word,
  .gsap-stagger-item,
  .gsap-fade-up,
  .gsap-reveal,
  .gsap-scale-up,
  .cert-card,
  .hm-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  #hm-loader {
    display: none !important;
  }

  #hm-marquee .hm-marquee-row {
    animation: none !important;
  }

  .hm-float-deco {
    display: none;
  }

  .hm-bg-blob {
    display: none;
  }

  #hm-particles {
    display: none;
  }

  .hover-ring:hover,
  .hover-ring:hover::after,
  .premium-btn:hover,
  .icon-float:hover {
    transform: none !important;
  }
}
