/* ============================================================
   VITAL VIBES — animations.css v4.0
   레퍼런스: Gucci Osteria Seoul 수준 인터랙션 밀도
   ============================================================ */

/* ── 0. 기본 진입 애니메이션 4종 ─────────────────────── */
.anim-fade-up {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-fade-left {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-fade-right {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-scale-in {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-fade-up.is-visible,
.anim-fade-left.is-visible,
.anim-fade-right.is-visible,
.anim-scale-in.is-visible {
  opacity: 1;
  transform: none;
}

/* ── 1. Stagger 지연 시스템 ─────────────────────────── */
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
[data-delay="5"] { transition-delay: 0.40s; }
[data-delay="6"] { transition-delay: 0.48s; }

/* ── 2. 이미지 Clip-Path Reveal ─────────────────────── */
.img-reveal-wrap {
  overflow: hidden;
  position: relative;
}

.img-reveal-wrap img {
  transform: scale(1.08);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.img-reveal-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-bg-alt, #F7EFE6);
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.img-reveal-wrap.is-visible::after { transform: scaleX(0); }
.img-reveal-wrap.is-visible img    { transform: scale(1); }

/* ── 3. 헤딩 라인 드로우 ────────────────────────────── */
.heading-line {
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.heading-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent, #C17F5A);
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.heading-line.is-visible::after { width: 60%; }

/* ── 4. 히어로 텍스트 순차 등장 ─────────────────────── */
@keyframes hero-kicker {
  from { opacity: 0; transform: translateY(20px) skewY(-2deg); }
  to   { opacity: 1; transform: none; }
}

@keyframes hero-title {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: none; }
}

@keyframes hero-sub {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero__kicker { animation: hero-kicker 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s  both; }
.hero__h1     { animation: hero-title  0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both; }
.hero__sub    { animation: hero-sub    0.7s ease 0.75s both; }
.hero__ctas   { animation: hero-sub    0.7s ease 0.95s both; }

/* ── 5. 히어로 하단 그라데이션 ─────────────────────── */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.3));
  pointer-events: none;
}

/* ── 6. 카드 호버 시스템 ────────────────────────────── */
.space-card,
.feature-item,
.menu-category {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.space-card:hover    { transform: translateY(-8px); box-shadow: 0 20px 60px rgba(0,0,0,0.14); }
.feature-item:hover  { transform: translateY(-6px); box-shadow: 0 12px 36px rgba(0,0,0,0.10); }
.menu-category:hover { transform: translateY(-4px); }

.space-card:hover .space-card__img-wrap img,
.event-card__img-wrap:hover img { transform: scale(1.06); }

/* ── 7. 버튼 Ripple ────────────────────────────────── */
.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: ripple-expand 0.55s linear;
  pointer-events: none;
}

@keyframes ripple-expand {
  to { transform: scale(4); opacity: 0; }
}

/* ── 8. Floating CTA 등장 ────────────────────────── */
@keyframes float-in {
  from { opacity: 0; transform: translateY(20px) scale(0.8); }
  to   { opacity: 1; transform: none; }
}

.floating-cta.show {
  animation: float-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── 9. Pulse-Ring CTA ──────────────────────────────── */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(193, 127, 90, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(193, 127, 90, 0); }
  100% { box-shadow: 0 0 0 0   rgba(193, 127, 90, 0); }
}

.btn-pulse {
  animation: pulse-ring 2.5s cubic-bezier(0.4,0,0.6,1) infinite;
}

/* ── 10. 섹션 구분선 ─────────────────────────────── */
@keyframes line-draw {
  from { width: 0; }
  to   { width: 60px; }
}

.section-rule {
  display: block;
  height: 2px;
  background: var(--color-accent, #C17F5A);
  width: 0;
  margin: 0.75rem 0 1.5rem;
}

.section-rule.is-visible {
  animation: line-draw 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

/* ── 11. 스펙 테이블 행 stagger ─────────────────────── */
.spec-table tr {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.spec-table.is-visible tr:nth-child(1) { opacity:1; transform:none; transition-delay:0.05s; }
.spec-table.is-visible tr:nth-child(2) { opacity:1; transform:none; transition-delay:0.10s; }
.spec-table.is-visible tr:nth-child(3) { opacity:1; transform:none; transition-delay:0.15s; }
.spec-table.is-visible tr:nth-child(4) { opacity:1; transform:none; transition-delay:0.20s; }
.spec-table.is-visible tr:nth-child(5) { opacity:1; transform:none; transition-delay:0.25s; }
.spec-table.is-visible tr:nth-child(6) { opacity:1; transform:none; transition-delay:0.30s; }
.spec-table.is-visible tr:nth-child(7) { opacity:1; transform:none; transition-delay:0.35s; }

/* ── 12. 스크롤 인디케이터 ────────────────────────── */
@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50%       { transform: translateX(-50%) translateY(8px); opacity: 0.4; }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: scroll-bounce 2s ease infinite;
  color: rgba(255,255,255,0.7);
  font-size: 1.5rem;
}

/* ── 13. WAVE별 서브페이지 accent 변형 ──────────────── */
.wave-1 { --color-accent: #C17F5A; }
.wave-2 { --color-accent: #A96B46; }
.wave-3 { --color-accent: #CF9572; }
.wave-4 { --color-accent: #7A1A2E; }
.wave-5 { --color-accent: #B8694A; }
.wave-6 { --color-accent: #D4A482; }

/* ── 14. 링크 언더라인 드로우 ────────────────────────── */
.link-draw {
  position: relative;
  text-decoration: none;
}

.link-draw::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.link-draw:hover::after { width: 100%; }

/* ── 15. 아이콘 인트로 scale ────────────────────────── */
@keyframes icon-pop {
  0%   { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  70%  { transform: scale(1.15) rotate(2deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.feature-icon.is-visible {
  animation: icon-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ── 16. 접근성 — 애니메이션 비선호 ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .anim-fade-up, .anim-fade-left, .anim-fade-right, .anim-scale-in {
    opacity: 1;
    transform: none;
  }
  .img-reveal-wrap::after { display: none; }
  .img-reveal-wrap img { transform: none; }
}
