/* =========================
   Design tokens (Light)
========================= */
:root{
  --bg:#ffffff;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --accent:#3b82f6;
  --radius:20px;
  --font-main:'Inter','Noto Sans KR',sans-serif;
  --shadow:0 16px 34px rgba(17,24,39,.10);


  --bg: #ffffff;
  --text-main: #111111;
  --text-muted: #737373;
  --line: #e5e5e5;
  --accent: #000000;
}

/* =========================
   Base
========================= */
*{ box-sizing:border-box; -webkit-font-smoothing:antialiased; }
html,body{ height:100%; margin:0; }

body{
  font-family:var(--font-main);
  background:var(--bg);
  color:var(--text);
  line-height:1.6;
  word-break:keep-all;
}

a{
  color:inherit;
  text-decoration:none;
  transition: .2s cubic-bezier(.4,0,.2,1);
}

.wrap{
  max-width:1100px;
  margin:0 auto;
  padding:60px 24px 100px;
}

/* =========================
    Site Header (Canopy Minimalism)
========================= */
.site-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 40px 60px; /* 상단 여백 극대화 */
  display: flex;
  flex-direction: column;
  align-items: center; /* 중앙 정렬로 갤러리 느낌 연출 */
  text-align: center;
}

/* 브랜드 섹션 */
.brand-section {
  margin-bottom: 60px;
}

.brand-name {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 900;
  letter-spacing: 0.15em; /* 자간을 넓혀 고급스러운 인상 */
  margin: 0 0 20px 0;
  color: var(--text-main);
  text-transform: uppercase;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 17px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.6;
  max-width: 540px;
  margin: 0 auto;
  word-break: keep-all;
}

/* 검색 섹션 */
.action-section {
  width: 100%;
  max-width: 560px;
  margin-top: 20px;
}

.search-container {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  padding: 16px 0;
  border-bottom: 1.5px solid var(--text-main); /* 박스 대신 굵은 밑줄 */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-icon {
  margin-right: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  opacity: 0.8;
}

.search-container input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 18px; /* 입력 폰트 크기 확대 */
  color: var(--text-main);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.search-container input::placeholder {
  color: #ccc;
  font-weight: 300;
}

/* 상호작용: 포커스 시 약간의 변화 */
.search-container:focus-within {
  border-bottom-color: var(--text-muted);
}

.search-container:focus-within .search-icon {
  transform: translateX(-2px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .site-header {
    padding: 60px 24px 40px;
    align-items: flex-start; /* 모바일에서는 좌측 정렬이 가독성이 좋음 */
    text-align: left;
  }
  .brand-tagline {
    margin: 0;
    font-size: 15px;
  }
  .search-container input {
    font-size: 16px;
  }
}

.pill{
  padding:12px 24px;
  border-radius:14px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
  background:#fff;
  border:1px solid var(--line);
  color:var(--text);
  transition:all .2s ease;
}

.pill:hover{ background:#f9fafb; }

.pill[aria-pressed="true"]{
  background:rgba(59,130,246,.10);
  border-color:rgba(59,130,246,.25);
}

/* =========================
   Meta row
========================= */
.meta-row{
  /* display:flex; */
  display:none;
  align-items:center;
  gap:12px;
  font-size:14px;
  color:var(--muted);
  margin-bottom:24px;
  padding-left:4px;
}
.meta-row strong{ color:var(--text); font-weight:700; }

/* =========================
   Category Filter (Canopy Style)
========================= */
.filterbar {
  margin:30px 0;
  padding: 0; /* 테두리와 배경을 제거하여 여백으로만 구분 */
  border: none;
  background: transparent;
  display: flex;
  justify-content: center; /* 헤더의 중앙 정렬 무드 유지 */
}

.filterbar__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px; /* 칩 사이의 간격을 넓게 벌려 여유로움 부여 */
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0; /* 측면 패딩을 없애고 텍스트 정렬 강조 */
  border: none;
  background: transparent;
  color: #888; /* 비활성 상태는 연하게 */
  cursor: pointer;
  position: relative;
  transition: all .2s ease;
}

/* 호버 시 텍스트 컬러만 변경 */
.chip:hover {
  color: #111;
  transform: none; /* 물리적 이동 제거 (정적인 고급스러움) */
}

.chip__name {
  font-size: 16px;
  font-weight: 500; /* 너무 굵지 않게 조정 */
  letter-spacing: 0.02em;
  text-transform: uppercase; /* 영문일 경우 대비, 국문도 깔끔하게 유지 */
}

.chip__count {
  font-size:20px;
  font-weight: 400;
  color: #bbb;
  vertical-align: super; /* 숫자를 첨자처럼 올려서 전문적인 느낌 부여 */
  margin-left:0;
}

/* 활성화 상태 (Active) */
.chip.is-active {
  color: #111;
  background: transparent;
}

.chip.is-active .chip__name {
  font-weight: 700;
}

/* 활성화 시 하단에 아주 얇은 바(Bar) 생성 */
.chip.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #111;
}

.chip.is-active .chip__count {
  color: #111;
  font-weight: 600;
}

/* 모바일 대응 */
@media (max-width: 768px) {
  .filterbar {
    justify-content: flex-start;
    overflow-x: auto; /* 가로 스크롤 허용 */
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .filterbar__chips {
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding-left: 20px;
    gap: 20px;
  }
  /* 스크롤바 숨기기 */
  .filterbar::-webkit-scrollbar { display: none; }
}

/* =========================
   Grid / Card
========================= */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(320px,1fr));
  gap:28px;
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  position:relative;
  display:flex;
  flex-direction:column;
  transition: all .35s cubic-bezier(.165,.84,.44,1);
}

.card > a{
  display:flex;
  flex-direction:column;
  height:100%;
}

.card:hover{
  transform:translateY(-6px);
  border-color:rgba(59,130,246,.25);
  box-shadow:var(--shadow);
}

.thumb{
  width:100%;
  aspect-ratio:16/10;
  object-fit:cover;
  background:#f3f4f6;
  border-bottom:1px solid var(--line);
  transition:transform .6s ease;
}

.card:hover .thumb{ transform:scale(1.05); }

.content{
  padding:24px;
  flex-grow:1;
  display:flex;
  flex-direction:column;
}

.sub{
  display:flex;
  gap:8px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.tag{
  font-size:12px;
  font-weight:600;
  padding:5px 12px;
  border-radius:8px;
  background:#f3f4f6;
  color:var(--muted);
  border:1px solid var(--line);
  text-transform:uppercase;
  letter-spacing:.03em;
}

.title{
  font-size:22px;
  font-weight:700;
  margin:0 0 12px 0;
  line-height:1.35;
  letter-spacing:-.02em;
}

.excerpt{
  margin:0;
  font-size:15px;
  color:#4b5563;
  line-height:1.6;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* =========================
   State / Footer
========================= */
.state{
  padding:80px 40px;
  text-align:center;
  background:#fff;
  border-radius:var(--radius);
  border:1px dashed var(--line);
  color:var(--muted);
  grid-column:1 / -1;
}

.footer{
  margin-top:100px;
  padding-top:40px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:20px;
}

.footer a:hover{ color:var(--text); }

/* =========================
   Responsive
========================= */
@media (max-width:768px){
  .wrap{ padding:40px 20px; }
  .tools{ flex-direction:column; align-items:stretch; }
  .search{ max-width:none; }
  .grid{ grid-template-columns:1fr; }
  .filterbar{ flex-direction:column; gap:10px; }
  .filterbar__label{ padding-top:0; }
}

/* =========================
   Mobile-friendly enhancements (Index)
========================= */

/* iOS 안전영역 + 터치 반응 개선 */
:root{
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

body{
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

/* 전체 레이아웃: 모바일에서 상단 여백/패딩 과다 방지 */
@media (max-width: 768px){
  .wrap{
    max-width: 100%;
    padding: 28px 16px calc(72px + var(--safe-bottom));
  }

  /* 헤더 영역: 너무 길게 내려오는 느낌 완화 */
  .site-header{
    padding: 44px 16px 28px;
  }
  .brand-section{ margin-bottom: 28px; }
  .brand-name{ letter-spacing: 0.08em; }
  .action-section{ max-width: 100%; }

  /* 검색: 손가락 조작 편의 + 폰트 확대 */
  .search-container{
    padding: 12px 0;
  }
  .search-container input{
    font-size: 16px; /* iOS 자동 확대 방지 + 가독성 */
  }

  /* 카드: 한 열 고정 + 간격 다듬기 */
  .grid{
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .content{ padding: 18px; }
  .title{ font-size: 18px; margin-bottom: 10px; }
  .excerpt{ font-size: 14px; -webkit-line-clamp: 3; }

  /* 태그/칩: 터치 타겟 키우기 */
  .pill{
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
  }
  .chip__name{ font-size: 14px; }
  .chip__count{ font-size: 16px; }
}

/* 초소형(<=420px): 글씨/간격 더 컴팩트 */
@media (max-width: 420px){
  .brand-name{ font-size: 30px; }
  .brand-tagline{ font-size: 14px; }
  .title{ font-size: 17px; }
}

/* “가로폭 긴 요소”가 생길 때 전체가 밀리는 문제 방지 */
img, video, iframe{
  max-width: 100%;
  height: auto;
}


/* 더보기 버튼 영역 */
.loadmore-wrap{
  display:flex;
  justify-content:center;
  margin: 22px 0 10px;
}

.loadmore-wrap[hidden]{
  display:none !important;
}
