/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
@keyframes bottleFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}
@keyframes floatTag {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(0deg); }
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.6); opacity: 0.4; }
}
@keyframes pulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); box-shadow: 0 10px 40px rgba(212,160,23,0.4); }
  50% { transform: translate(-50%,-50%) scale(1.05); box-shadow: 0 15px 50px rgba(212,160,23,0.6); }
}
@keyframes dropFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-12px) scale(1.1); opacity: 0.9; }
}
@keyframes leafSway {
  0%, 100% { transform: rotate(-5deg) translateX(0); }
  50% { transform: rotate(5deg) translateX(10px); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes countUp {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to { background-position: 200% 0; }
}

/* ===== REVEAL ANIMATION CLASSES ===== */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.revealed { opacity: 1; transform: translate(0); }

/* Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ===== LEAF POSITIONS (decorative) ===== */
.leaf-0 { left: 5%; top: 15%; transform: rotate(20deg); animation: leafSway 6s ease-in-out infinite; }
.leaf-1 { left: 12%; top: 60%; transform: rotate(-30deg); animation: leafSway 8s ease-in-out infinite 1s; }
.leaf-2 { left: 25%; top: 8%; transform: rotate(45deg); animation: leafSway 5s ease-in-out infinite 2s; }
.leaf-3 { right: 8%; top: 25%; transform: rotate(-20deg); animation: leafSway 7s ease-in-out infinite 0.5s; }
.leaf-4 { right: 15%; top: 70%; transform: rotate(35deg); animation: leafSway 9s ease-in-out infinite 1.5s; }
.leaf-5 { left: 45%; bottom: 15%; transform: rotate(-15deg); animation: leafSway 6s ease-in-out infinite 3s; }
.leaf-6 { left: 8%; bottom: 30%; transform: rotate(55deg) scale(0.7); animation: leafSway 7s ease-in-out infinite 2.5s; }
.leaf-7 { right: 25%; top: 45%; transform: rotate(-45deg) scale(0.8); animation: leafSway 8s ease-in-out infinite 1s; }
.leaf-8 { left: 35%; top: 75%; transform: rotate(25deg) scale(0.6); animation: leafSway 5s ease-in-out infinite 3.5s; }
.leaf-9 { right: 35%; bottom: 20%; transform: rotate(-35deg) scale(0.9); animation: leafSway 9s ease-in-out infinite 0.8s; }
.leaf-10 { left: 60%; top: 10%; transform: rotate(10deg) scale(0.75); animation: leafSway 6s ease-in-out infinite 1.2s; }
.leaf-11 { right: 5%; bottom: 10%; transform: rotate(-50deg) scale(0.6); animation: leafSway 7s ease-in-out infinite 2s; }

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* ===== PAGE TRANSITIONS ===== */
.page-enter { animation: fadeInUp 0.5s ease forwards; }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed; top: 70px; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--green-main), var(--gold));
  z-index: 999; transition: width 0.1s;
}

/* ===== GOOEY RING LOADER (showcase) ===== */
/* รูปแบบ gooey rotate spin คล้าย loading.io/spinner/gooeyring */
.showcase-loader {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 50%;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0.5;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* ซ่อน loader เมื่อโหลดเสร็จ */
.showcase-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.goo-spinner {
  position: relative;
  width: 130px;
  height: 130px;
  /* gooey effect: ใบจากทำให้ลูกบอลหลอมรวมกันแบบ goo */
  filter: url(#gooeyRing);
  animation: gooSpin 2.6s linear infinite;
}

.goo-dot {
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;          /* จัดให้จุดศูนย์กลางอยู่ที่พิกัด */
  border-radius: 50%;
  background: #d4a017;
  animation: gooPulse 1.6s ease-in-out infinite;
}

/* วางลูกบอล 8 จุดรอบวงแหวน (รัศมี 45px, ศูนย์กลาง 65px) */
.goo-dot:nth-child(1) { top: 65px;   left: 110px;  animation-delay: 0.00s; }
.goo-dot:nth-child(2) { top: 96.8px; left: 96.8px; animation-delay: 0.20s; }
.goo-dot:nth-child(3) { top: 110px;  left: 65px;   animation-delay: 0.40s; }
.goo-dot:nth-child(4) { top: 96.8px; left: 33.2px; animation-delay: 0.60s; }
.goo-dot:nth-child(5) { top: 65px;   left: 20px;   animation-delay: 0.80s; }
.goo-dot:nth-child(6) { top: 33.2px; left: 33.2px; animation-delay: 1.00s; }
.goo-dot:nth-child(7) { top: 20px;   left: 65px;   animation-delay: 1.20s; }
.goo-dot:nth-child(8) { top: 33.2px; left: 96.8px; animation-delay: 1.40s; }

/* ลูกบอลตัวนำ (gold accent) ให้ดูเหมือน comet head */
.goo-dot:nth-child(1) { background: var(--gold); }

.showcase-loader-text {
  font-family: var(--font-h-text), sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--green-main);
  opacity: 0.8;
  animation: countUp 1.2s ease-in-out infinite alternate;
}

@keyframes gooSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes gooPulse {
  0%, 100% { transform: scale(0.35); }
  50%      { transform: scale(1); }
}

/* ลด motion สำหรับผู้ที่ตั้งค่า prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .goo-spinner { animation-duration: 6s; }
  .goo-dot { animation: none; transform: scale(0.8); }
}
