:root {
  --grid: #e5e7eb;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  background: #fff; /* ✅ 전체 배경은 흰색으로 고정 */
}

/* ✅ 섹션 내부에만 체크무늬 + 위 흰색 그라데이션 */
section.container.section-title {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;

  background:
    linear-gradient(0deg, transparent 24%, var(--grid) 25%, var(--grid) 26%, transparent 27%, transparent 74%, var(--grid) 75%, var(--grid) 76%, transparent 77%),
    linear-gradient(90deg, transparent 24%, var(--grid) 25%, var(--grid) 26%, transparent 27%, transparent 74%, var(--grid) 75%, var(--grid) 76%, transparent 77%);
  background-size: 48px 48px;
}

/* ✅ 위쪽에서 흰색 → 아래로 투명해지는 오버레이 */
section.container.section-title::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 50%);
  pointer-events: none;
  z-index: 1;
}

/* ✅ wrap → wp */
.wp {
  position: relative;
  z-index: 2; /* 오버레이 아래 깔리지 않게 */
  min-height: 40svh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  margin: 0;
}

/* ✅ 버튼 간격 */
.wp .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: clamp(90px, 9vw, 120px);
  align-items: start;
  justify-content: center;
}

.wp .item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 버튼 크기 */
.wp .card {
  position: relative;
  width: clamp(180px, 22vw, 280px);
  aspect-ratio: 1/1;
  display: block;
  transition: all 0.3s ease;
}

/* hover 효과 */
.wp .card:hover {
  transform: none;
  filter: brightness(1.1) drop-shadow(0 12px 25px rgba(0,0,0,0.2));
}

.wp .card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.4s ease-in-out, filter 0.4s ease-in-out;
}

.wp .card img.hover {
  opacity: 0;
}

.wp .card:hover img.base {
  opacity: 0;
  filter: brightness(1.05);
}

.wp .card:hover img.hover {
  opacity: 1;
  filter: brightness(1.1);
}

.wp .caption {
  text-align: center;
  margin-top: 20px;
  font-weight: 700;
  font-size: 1rem;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(3px);
  transition: all 0.3s ease-in-out;
}

.wp .caption:hover {
  background: currentColor;
  color: #fff;
}

.wp .c-red { color: #b91c1c; }
.wp .c-blue { color: #1d4ed8; }
.wp .c-orange { color: #b45309; }

@media (max-width: 980px) {
  .wp .grid { grid-template-columns: 1fr; gap: 80px; }
  .wp .card { width: min(70vw, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  .wp .card, .wp .card img, .wp .caption { transition: none !important; }
}
