/**
 * Enhanced Buttons
 * リップルエフェクト・ネオングロー・グラデーション
 */

/* ===================================
 * Primary Button Enhancement
 * =================================== */
.c-btn--primary {
  position: relative;
  background: linear-gradient(135deg, #007a8a, #006064);
  background-size: 200% 200%;
  animation: buttonGradient 3s ease infinite;
  overflow: hidden;
}

.c-btn--primary:hover {
  box-shadow:
    0 8px 24px rgba(0, 188, 212, 0.4),
    0 0 30px rgba(0, 229, 255, 0.5),
    0 0 60px rgba(0, 229, 255, 0.3) inset;
  transform: translateY(-2px);
}

.c-btn--primary:active {
  transform: translateY(0);
  box-shadow:
    0 4px 12px rgba(0, 188, 212, 0.3),
    0 0 20px rgba(0, 229, 255, 0.3);
}

@keyframes buttonGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===================================
 * Outline Button Enhancement
 * =================================== */
.c-btn--outline {
  position: relative;
  background: transparent;
  border: 2px solid #007a8a;
  color: #007a8a;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.c-btn--outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, #007a8a, #006064);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.c-btn--outline:hover {
  color: #ffffff;
  border-color: #00e5ff;
  box-shadow:
    0 0 20px rgba(0, 229, 255, 0.4),
    0 0 40px rgba(0, 229, 255, 0.2) inset;
  transform: translateY(-2px);
}

.c-btn--outline:hover::before {
  width: 100%;
}

/* ===================================
 * Enhanced Button (共通拡張)
 * =================================== */
.c-btn--enhanced {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.c-btn--enhanced:hover {
  transform: translateY(-3px) scale(1.02);
}

.c-btn--enhanced:active {
  transform: translateY(-1px) scale(0.98);
}

/* ===================================
 * Transparent Button (Hero用)
 * =================================== */
.c-btn--transparent {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.c-btn--transparent::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.c-btn--transparent:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
  box-shadow:
    0 8px 24px rgba(0, 229, 255, 0.3),
    0 0 30px rgba(0, 229, 255, 0.4) inset;
  transform: translateY(-2px);
}

.c-btn--transparent:hover::after {
  left: 100%;
}

/* ===================================
 * Page Top Button Enhancement
 * =================================== */
.c-page-top--enhanced {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.c-page-top--enhanced .c-page-top__link {
  background: linear-gradient(135deg, #007a8a, #006064);
  background-size: 200% 200%;
  animation: buttonGradient 3s ease infinite;
  border: 2px solid rgba(0, 229, 255, 0.3);
  box-shadow:
    0 4px 16px rgba(0, 122, 138, 0.3),
    0 0 20px rgba(0, 229, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.c-page-top--enhanced .c-page-top__link:hover {
  transform: translateY(-4px) rotate(360deg);
  box-shadow:
    0 8px 32px rgba(0, 122, 138, 0.5),
    0 0 40px rgba(0, 229, 255, 0.6),
    0 0 60px rgba(0, 229, 255, 0.3) inset;
  border-color: #00e5ff;
}

.c-page-top--enhanced .c-page-top__link:active {
  transform: translateY(-2px) rotate(360deg) scale(0.95);
}

.c-page-top--enhanced .c-page-top__link svg {
  transition: transform 0.3s;
}

.c-page-top--enhanced .c-page-top__link:hover svg {
  transform: scale(1.2);
}

/* ===================================
 * Button Ripple Container
 * =================================== */
.c-btn {
  position: relative;
  overflow: hidden;
}

/* ripple-effect.js が動的に追加する .ripple クラスのスタイルは
   ripple-effect.js 内で定義されている */

/* ===================================
 * Reduced Motion
 * =================================== */
@media (prefers-reduced-motion: reduce) {
  .c-btn--primary,
  .c-btn--outline,
  .c-btn--transparent,
  .c-page-top--enhanced .c-page-top__link {
    animation: none;
    transition: none;
  }

  .c-btn--primary:hover,
  .c-btn--outline:hover,
  .c-btn--transparent:hover,
  .c-page-top--enhanced .c-page-top__link:hover {
    transform: none;
  }
}

/* ===================================
 * GPU Acceleration
 * =================================== */
.c-btn,
.c-page-top__link {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}
