/* ============ services (our design specialties) ============ */
.services { /* section 공통 적용 */ }
.specialties-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--svc-wrapper-gap);
  padding-top: 7.5rem;
  padding-bottom: 7.5rem;
}
.specialties-content {
  display: flex;
  flex-direction: column;
  gap: var(--svc-content-gap);
  width: 100%;
}
.services-header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  gap: 2rem;
}
.specialties-content .header { margin-left: var(--header-ml); }
.services-header-btn {
  display: inline-block;
  padding: 1.25rem 3.5rem;
  background: linear-gradient(90deg, #0a0a0a 0%, #444444 50%, #0a0a0a 100%);
  background-size: 200% auto;
  color: var(--c-white) !important;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 40px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  animation: worksShimmer 2.5s linear infinite, worksFloat 3s ease-in-out infinite;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  cursor: none !important;
}
.services-header-btn:hover {
  opacity: 0.95;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--svc-grid-gap);
}
.services-item {
  position: relative;
  height: var(--svc-item-h);
  perspective: 500px;
}
.card-link {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  height: var(--svc-item-h);
  perspective: 1000px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card-link:hover {
  transform: translateY(-5px);
}
.card-link:hover .svc-card {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}
.svc-card {
  position: absolute;
  inset: 0;
  border-radius: var(--r-card);
  overflow: hidden;
}
.svc-card.is-first {
  transform: translate(0); /* 원본 CSS 기본값(matrix identity) */
  z-index: 10;
  display: grid;
  grid-template-columns: 12rem 1fr auto; /* 분류 너비를 고정하여 설명글 좌측 정렬 통일 */
  gap: 10rem; /* 분류와 설명 간격을 더욱 대폭 띄움 */
  align-items: center;
  padding: var(--svc-card-pad);
  background-color: var(--c-white);
  font-size: var(--fs-regular);
  line-height: var(--lh-regular);
}
.svc-card.is-second { z-index: 9; }
.svc-card.is-third { z-index: 8; }
.svc-card.is-fourth { z-index: 7; }
.svc-card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card-link:hover .card-image {
  transform: scale(1.05);
}
.svc-card-title { font-size: var(--svc-card-title-fs); line-height: 1.25; font-weight: 700; justify-self: start; }
.svc-card .text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  white-space: nowrap;
  padding: 0; /* gap으로 조절하므로 내부 여백 제거 */
}
.svc-card .text-wrapper .t-regular {
  font-weight: 500; /* 강조 폰트 적용 */
  color: #111; /* 약간 더 진하게 강조 */
}
.svc-card .text-wrapper .t-sub {
  font-size: 0.85rem;
  font-weight: 400;
  color: #666;
  white-space: normal;
  line-height: 1.4;
}
.svc-card .go-portfolio {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--c-ink);
  opacity: 0.55;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  justify-self: start;
}
.svc-card .go-portfolio span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card-link:hover .go-portfolio {
  opacity: 1;
}
.card-link:hover .go-portfolio span {
  transform: translateX(4px);
}
/* primary button (ix2 reveal 대상 — 정적 기본 visible) */
.primary-button {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: var(--svc-btn-gap);
  padding: var(--svc-btn-pad);
  border-radius: var(--r-btn);
  background-color: var(--c-btn-dark);
  color: var(--c-white);
  font-size: var(--fs-small);
  line-height: 1.5;
  font-weight: 500;
}
.primary-button .button-icon {
  position: absolute;
  z-index: 3;
  display: flex;
  justify-content: center;
  border-radius: var(--r-pill);
  background-color: var(--c-bg);
  color: var(--c-ink);
}
.primary-button .btn-spacer { flex: none; margin-right: var(--svc-btn-spacer-mr); border-radius: var(--r-pill); }
.primary-button .button-content { padding: var(--svc-btn-content-pad); white-space: nowrap; }
.primary-button .button-primary-text { position: relative; z-index: 1; }
.primary-button .button-primary-text > div { line-height: 1; }

@media screen and (max-width: 991px) {
  .services-header-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .services-item { height: auto; }
  .svc-card.is-first { transform: none; }
  .specialties-content .header { margin-left: 0; }
  .svc-card-title { font-size: 2.5rem; }
  .card-link {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1rem;
    height: auto;
    padding: 1rem;
    background-color: var(--c-white);
    border-radius: 1rem;
    overflow: hidden;
  }
  .svc-card { position: relative; gap: 2rem; }
  .svc-card.is-first {
    position: static;
    height: auto;
    grid-template-columns: 11rem 1fr auto;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }
  .svc-card.is-first .text-wrapper {
    white-space: normal;
  }
  .svc-card.is-second, .svc-card.is-third, .svc-card.is-fourth { height: auto; aspect-ratio: 16 / 9; position: relative; } /* 표지 비율 유지 — 크롭 없음 */
}
@media screen and (max-width: 767px) {
  .services-grid { gap: 3rem; }
  .card-link { padding: 1rem; }
  .svc-card.is-first { height: auto; padding: 1rem .5rem; }
  .svc-card-title { font-size: 2rem; }
  .primary-button { z-index: 2; }
}
@media screen and (max-width: 479px) {
  .services-grid { display: flex; flex-direction: column; gap: 1rem; }
  .svc-card { height: 10rem; }
  .svc-card.is-second, .svc-card.is-third, .svc-card.is-fourth { height: auto; aspect-ratio: 16 / 9; } /* 표지 비율 유지 */
  .svc-card.is-first {
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1rem;
    text-align: left;
    justify-content: center;
    height: auto;
  }
  .svc-card.is-first .svc-card-title { grid-row: 1; grid-column: 1; }
  .svc-card.is-first .text-wrapper { grid-row: 2; grid-column: 1 / 3; text-align: left; white-space: normal; }
  .svc-card.is-first .go-portfolio { grid-row: 1; grid-column: 2; justify-self: start; }
  .svc-card-title { font-size: 1.8rem; line-height: 1.25; }
}

.services-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}
.services-more-btn {
  display: inline-block;
  padding: 1.25rem 3.5rem;
  background: linear-gradient(90deg, #0a0a0a 0%, #444444 50%, #0a0a0a 100%);
  background-size: 200% auto;
  color: var(--c-white) !important;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 40px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  animation: worksShimmer 2.5s linear infinite, worksFloat 3s ease-in-out infinite;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.services-more-btn:hover {
  opacity: 0.95;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}
