/* ================================================
   DOK — Animations v2
   ================================================ */

/* Keyframes */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes leafSway {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25%       { transform: rotate(3deg) scale(1.02); }
  75%       { transform: rotate(-2deg) scale(.99); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.04); }
}
@keyframes rotateGlow {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(.5) translateY(20px); }
  70%  { transform: scale(1.1) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Hero entrance animations */
.hero-badge     { animation: fadeSlideDown .8s .3s both cubic-bezier(.16,1,.3,1); }
.hero-logo-wrap { animation: scaleIn 1s .5s both cubic-bezier(.16,1,.3,1); }
.hero-tagline   { animation: fadeSlideUp .8s .75s both cubic-bezier(.16,1,.3,1); }
.hero-desc      { animation: fadeSlideUp .8s .9s both cubic-bezier(.16,1,.3,1); }
.hero-cta-group { animation: fadeSlideUp .8s 1.05s both cubic-bezier(.16,1,.3,1); }

/* Logo SVG leaf animation */
.logo-leaf-animated {
  transform-origin: center;
  animation: leafSway 4s ease-in-out infinite;
}
.logo-eucalyptus {
  animation: leafSway 5s 1s ease-in-out infinite;
}
.logo-wheat {
  animation: leafSway 4.5s .5s ease-in-out infinite;
}

/* Floating elements */
.float-anim { animation: floatY 5s ease-in-out infinite; }
.float-anim-slow { animation: floatY 7s ease-in-out infinite; }
.float-anim-fast { animation: floatY 3.5s .5s ease-in-out infinite; }

/* Shimmer on gold text */
.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--gold-dark) 0%,
    var(--gold-light) 40%,
    var(--gold) 50%,
    var(--gold-light) 60%,
    var(--gold-dark) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* Product card entrance */
.product-card {
  animation: popIn .5s var(--ease-bounce) both;
}

/* Step items staggered */
.step-item:nth-child(1) { animation-delay: 0s; }
.step-item:nth-child(2) { animation-delay: .1s; }
.step-item:nth-child(3) { animation-delay: .2s; }
.step-item:nth-child(4) { animation-delay: .3s; }

/* Preloader pulse on dots (legacy support) */
@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(.6); opacity: .4; }
  40%           { transform: scale(1); opacity: 1; }
}

/* Parallax hint */
.parallax-elem {
  transition: transform .1s linear;
  will-change: transform;
}

/* Page transition in */
.page-loaded .header { animation: fadeSlideDown .6s .1s both cubic-bezier(.16,1,.3,1); }

/* Gold underline decoration */
.gold-underline {
  display: inline-block;
  position: relative;
}
.gold-underline::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease-out-expo);
}
.gold-underline.visible::after { transform: scaleX(1); }

/* Stagger for grid reveals */
.stagger-child:nth-child(1) { transition-delay: .05s; }
.stagger-child:nth-child(2) { transition-delay: .1s; }
.stagger-child:nth-child(3) { transition-delay: .15s; }
.stagger-child:nth-child(4) { transition-delay: .2s; }
.stagger-child:nth-child(5) { transition-delay: .25s; }
.stagger-child:nth-child(6) { transition-delay: .3s; }
.stagger-child:nth-child(7) { transition-delay: .35s; }
.stagger-child:nth-child(8) { transition-delay: .4s; }

/* Smooth reveal for sections */
.section-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s var(--ease-out-expo), transform .9s var(--ease-out-expo);
}
.section-reveal.in-view { opacity: 1; transform: translateY(0); }

/* Active nav link */
.nav-link.active-section { color: var(--choco-light); }
.nav-link.active-section::after { width: 100% !important; }

/* Video fallback grain overlay */
.hero-grain {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}
