/* ============================================================
   HERBS GATE FOR EXPORT — 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:       #C9A227; /* accent gold — replaces old neon-green accent */
  --hm-dark:        #0F2A21; /* deep primary — full-bleed dark sections */
  --hm-mid:         #4C7E38; /* secondary, text-safe shade */
  --hm-surface:     #FAFAF7;
  --hm-ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --hm-ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --hm-duration:    0.5s;
}

/* ── 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 6px rgba(201, 162, 39, 0.45);
}

/* ── 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 8px rgba(201,162,39,0.4);
  transition: width 0.05s linear;
}

#hm-loader .loader-tagline {
  color: rgba(201,162,39,0.85);
  font-family: 'Work Sans', 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(201,162,39,0.22);
  border-radius: 100px;
  white-space: nowrap;
  color: rgba(255,255,255,0.75);
  font-family: 'Work Sans', 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(201,162,39,0.6);
  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: 'Work Sans', 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 20px -8px rgba(18,58,46,0.35),
    0 0 0 2px rgba(201,162,39,0.2);
}

/* ── 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 (pill hover/active — see section 23) ─────── */
.desktop-menu a {
  text-decoration: none;
}

/* ── 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(-3px);
}

/* ── 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(-5px);
  box-shadow:
    0 24px 48px -16px rgba(18,58,46,0.16),
    0 0 0 1px rgba(201,162,39,0.25);
}

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

/* ── 23. Navbar scroll state — simple, always-solid header ──
   The header stays bg-surface at all times; scrolling only adds a
   slightly deeper shadow for a touch of depth. No transparency, no
   blur, no height changes. */
header#mainHeader {
  transition: box-shadow 0.3s ease;
}

header#mainHeader.scrolled {
  box-shadow: 0 4px 20px -6px rgba(18, 58, 46, 0.16);
}

.nav-link {
  position: relative;
}

/* ── Export gallery marquee — pure CSS, infinite loop ──────────
   Each row's content is duplicated exactly once (two identical sets
   back to back), so animating exactly -50% of the row's own width
   loops seamlessly. Runs on plain CSS, independent of GSAP/JS. */
.gallery-marquee {
  animation-duration: 42s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}

.gallery-marquee-ltr {
  animation-name: hm-gallery-ltr;
}

.gallery-marquee-rtl {
  animation-name: hm-gallery-rtl;
}

.gallery-marquee:hover {
  animation-play-state: paused;
}

@keyframes hm-gallery-ltr {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

@keyframes hm-gallery-rtl {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Gentle continuous float — pure CSS, always runs (no GSAP) ─────── */
@keyframes hm-float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.hm-float {
  animation: hm-float-y 4.5s ease-in-out infinite;
}

/* ── "Browse by Category" staggered reveal — pure CSS/JS, no GSAP ──
   #home-categories starts with its cards hidden; main.js adds the
   .in-view class (via IntersectionObserver) once, and each card
   transitions in with an incremental delay for a one-after-another
   effect that then simply stops (no loop). */
#home-categories .category-card {
  opacity: 0;
  transform: translateY(35px) scale(0.96);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

#home-categories.in-view .category-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#home-categories.in-view .category-card:nth-child(1) { transition-delay: 0s; }
#home-categories.in-view .category-card:nth-child(2) { transition-delay: 0.12s; }
#home-categories.in-view .category-card:nth-child(3) { transition-delay: 0.24s; }
#home-categories.in-view .category-card:nth-child(4) { transition-delay: 0.36s; }

/* ── 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(-6px) !important;
  box-shadow:
    0 18px 40px -18px rgba(18, 58, 46, 0.24),
    0 0 0 1px rgba(201, 162, 39, 0.35) !important;
}

.hm-card .card-img-wrap img {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.hm-card:hover .card-img-wrap img {
  transform: scale(1.035) !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,
  #home-categories .category-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;
  }
}
