/* ==========================================================
   Ceres Greens — motion layer
   Sits on top of the original Elementor site. Nothing here
   changes layout or colours at rest; it only animates how
   things arrive and respond. Disabled for reduced motion.
   ========================================================== */

:root {
  --cg-ease: cubic-bezier(.16, 1, .3, 1);
  --cg-leaf: #83C541;
}

/* ---------- Scroll progress bar ---------- */
.cg-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 99999;
  background: var(--cg-leaf);
  transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}

/* ---------- Header arrives on load ---------- */
.cg-motion #masthead { animation: cg-drop .9s var(--cg-ease) backwards; } /* backwards: no transform left behind, so the fixed mobile menu still covers the screen */
@keyframes cg-drop { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.cg-hero { isolation: isolate; }
.cg-hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background: inherit;
  background-attachment: scroll;
  will-change: transform;
  animation: cg-kenburns 2.6s var(--cg-ease) both;
}
@keyframes cg-kenburns { from { transform: scale(1.14); } to { transform: scale(1); } }

.cg-word {
  display: inline-block;
  opacity: 0; transform: translateY(.55em) rotate(2deg);
  filter: blur(6px);
  animation: cg-word .9s var(--cg-ease) forwards;
  animation-delay: calc(var(--i, 0) * 55ms + var(--base, 0ms));
}
@keyframes cg-word { to { opacity: 1; transform: none; filter: none; } }

.cg-hero-item {
  opacity: 0; transform: translateY(22px);
  animation: cg-rise .9s var(--cg-ease) forwards;
  animation-delay: var(--base, 0ms);
}
@keyframes cg-rise { to { opacity: 1; transform: none; } }

/* ---------- Scroll reveals ---------- */
.cg-motion .cg-reveal {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity .9s var(--cg-ease),
    transform 1s var(--cg-ease);
  transition-delay: var(--d, 0ms);
}
.cg-motion .cg-reveal--left  { transform: translateX(-40px); }
.cg-motion .cg-reveal--right { transform: translateX(40px); }
.cg-motion .cg-reveal--pop   { transform: scale(.92) translateY(18px); }
.cg-motion .cg-reveal.cg-in  { opacity: 1; transform: none; }

/* Images unveil like a curtain, then settle */
.cg-motion .cg-img {
  clip-path: inset(0 0 100% 0 round 12px);
  transition: clip-path 1.3s var(--cg-ease);
  transition-delay: var(--d, 0ms);
}
.cg-motion .cg-img img {
  transform: scale(1.15);
  transition: transform 1.6s var(--cg-ease);
  transition-delay: var(--d, 0ms);
}
.cg-motion .cg-img.cg-in { clip-path: inset(0 0 0 0 round 0); }
.cg-motion .cg-img.cg-in img { transform: none; }

/* Small section labels ("about us", "our services"…) open up */
.cg-motion .cg-label .elementor-heading-title {
  letter-spacing: .02em; opacity: 0;
  transition: letter-spacing 1.2s var(--cg-ease), opacity .8s var(--cg-ease);
}
.cg-motion .cg-label.cg-in .elementor-heading-title { letter-spacing: var(--cg-ls, normal); opacity: 1; }

/* ---------- Hover & press responses ---------- */
/* Lift + a light sweep across the button. Done with a background layer
   (not overflow:hidden) so button sizes stay exactly as designed. */
.elementor-button {
  background-image: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.38) 50%, transparent 62%);
  background-size: 260% 100%;
  background-position: 130% 0;
  background-repeat: no-repeat;
  transition: transform .35s var(--cg-ease), box-shadow .35s var(--cg-ease),
              background-position .9s ease, background-color .3s, color .3s !important;
}
.elementor-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(1,48,36,.45);
  background-position: -30% 0;
}
.elementor-button:active { transform: translateY(0) scale(.98); }

.cg-card { transition: transform .5s var(--cg-ease), box-shadow .5s var(--cg-ease); }
.cg-card:hover { transform: translateY(-8px); box-shadow: 0 22px 40px -22px rgba(1,48,36,.45); }
.cg-card img { transition: transform .8s var(--cg-ease); }
.cg-card:hover img { transform: scale(1.08) rotate(-2deg); }

.cg-zoom { overflow: hidden; }
.cg-zoom img { transition: transform 1s var(--cg-ease); }
.cg-zoom:hover img { transform: scale(1.05); }

.elementor-icon-list-item { transition: transform .35s var(--cg-ease); }
.elementor-icon-list-item:hover { transform: translateX(6px); }

.elementor-social-icon { transition: transform .35s var(--cg-ease) !important; }
.elementor-social-icon:hover { transform: translateY(-4px) rotate(-8deg); }

/* Desktop menu: underline draws in on hover (the mobile menu stays as it was) */
@media (min-width: 1025px) {
  #masthead .elementskit-navbar-nav > li > a { position: relative; }
  #masthead .elementskit-navbar-nav > li > a::after {
    content: ""; position: absolute; left: 15px; right: 15px; bottom: -6px; height: 2px;
    background: var(--cg-leaf); transform: scaleX(0); transform-origin: 0 50%;
    transition: transform .4s var(--cg-ease);
  }
  #masthead .elementskit-navbar-nav > li > a:hover::after { transform: scaleX(1); }
}

/* ---------- Reduced motion: everything off ---------- */
@media (prefers-reduced-motion: reduce) {
  .cg-progress, .cg-hero-bg { display: none; }
  .cg-word, .cg-hero-item, #masthead { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .cg-reveal, .cg-img, .cg-img img, .cg-label .elementor-heading-title {
    opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important;
  }
  .elementor-button, .cg-card, .cg-card img, .cg-zoom img, .elementor-icon-list-item, .elementor-social-icon { transition: none !important; }
  .elementor-button:hover, .cg-card:hover, .cg-card:hover img, .cg-zoom:hover img,
  .elementor-icon-list-item:hover, .elementor-social-icon:hover { transform: none !important; }
  .elementor-button:hover { background-position: 130% 0; box-shadow: none; }
}
