/* ==========================================================================
   페이지 고유 레이아웃
   ========================================================================== */

/* --- 홈 히어로 ----------------------------------------------------------- */
.hero {
  position: relative;
  margin-top: calc(var(--header-h) * -1);  /* sticky 헤더 아래로 배경이 흐르도록 */
  padding-top: var(--header-h);
  overflow: hidden;
  background: var(--paper);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
}

.hero::before {
  top: -12%;
  left: -8%;
  width: 46vw;
  height: 46vw;
  max-width: 640px;
  max-height: 640px;
  background: var(--pink-100);
}

.hero::after {
  bottom: -20%;
  right: -6%;
  width: 40vw;
  height: 40vw;
  max-width: 560px;
  max-height: 560px;
  background: var(--green-50);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  padding-block: clamp(3rem, 1.5rem + 6vw, 6rem);
}

@media (max-width: 1023px) {
  .hero__inner { grid-template-columns: 1fr; }
}

.hero__title {
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

.hero__title .accent { color: var(--accent); }

.hero__lead {
  margin-top: var(--space-5);
  max-width: 46ch;
  color: var(--ink-700);
  font-size: var(--fs-lg);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-7);
}

/* 소형 단말에서는 버튼을 세로로 꽉 채워 폭이 들쭉날쭉하지 않게 한다 */
@media (max-width: 419px) {
  .hero__actions .btn { flex: 1 1 100%; }
}

.hero__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-6);
  color: var(--ink-500);
  font-size: var(--fs-xs);
}

.hero__note span { display: inline-flex; align-items: center; gap: 6px; }
.hero__note svg { width: 15px; height: 15px; color: var(--green-500); }

.hero__media {
  position: relative;
  border-radius: var(--r-img);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero__media img { width: 100%; height: auto; }

.hero__media--mobile { display: none; }

@media (max-width: 639px) {
  .hero__media--desktop { display: none; }
  .hero__media--mobile { display: block; }
}

/* --- 문제 제기 섹션 ------------------------------------------------------ */
.problem {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

@media (max-width: 767px) { .problem { grid-template-columns: 1fr; } }

.problem__item {
  padding: var(--space-6);
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
}

.problem__quote {
  color: var(--ink-900);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.6;
}

.problem__desc {
  margin-top: var(--space-3);
  color: var(--ink-500);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

/* --- 2단 미디어 섹션 (텍스트 + 이미지) ----------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
}

/* minmax(0, 1fr) 이어야 안에 든 표(min-width 520px)가 트랙을 밀어내지 않는다.
   1fr 만 쓰면 최소 크기가 auto 라 컬럼이 콘텐츠 폭까지 늘어난다. */
@media (max-width: 899px) { .split { grid-template-columns: minmax(0, 1fr); } }

.split__media {
  border-radius: var(--r-img);
  overflow: hidden;
  background: var(--paper-alt);
}

.split__media img { width: 100%; }

.split--reverse .split__media { order: -1; }

@media (max-width: 899px) {
  .split--reverse .split__media { order: 0; }
}

.split__body h2 { margin-bottom: var(--space-4); }
.split__body p { color: var(--ink-700); }
.split__body p + p { margin-top: var(--space-4); }

.split__list { margin-top: var(--space-6); }

/* --- 키트 구성품 리스트 --------------------------------------------------- */
.parts { display: grid; gap: var(--space-4); }

.parts__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
}

.parts__num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--pink-800);
  font-size: var(--fs-xs);
  font-weight: 800;
}

/* span 기본값(inline)이면 이름과 설명이 한 줄로 붙고 margin-top 도 먹지 않는다 */
.parts__name,
.parts__desc { display: block; }

.parts__name { color: var(--ink-900); font-weight: 700; font-size: var(--fs-sm); line-height: 1.5; }
.parts__desc { color: var(--ink-500); font-size: var(--fs-xs); margin-top: 2px; line-height: 1.6; }

/* --- 기대효과 아이콘 그리드 ---------------------------------------------- */
.effects {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-5);
}

@media (max-width: 1023px) { .effects { grid-template-columns: repeat(3, 1fr); } }

/* 2열에서 항목 수가 홀수면 마지막 하나가 왼쪽에 홀로 남는다 */
@media (max-width: 599px) {
  .effects { grid-template-columns: repeat(2, 1fr); }
  .effect:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.effect { text-align: center; }

.effect__icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto var(--space-4);
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--accent);
}

.effect__icon svg { width: 30px; height: 30px; }

.effect__title { color: var(--ink-900); font-size: var(--fs-sm); font-weight: 700; }
.effect__text { margin-top: var(--space-2); color: var(--ink-500); font-size: var(--fs-xs); line-height: 1.6; }

/* --- 기관 유형 뱃지 그리드 ----------------------------------------------- */
.orgs { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.org {
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--ink-700);
  font-size: var(--fs-sm);
  font-weight: 700;
}

/* --- 갤러리 ------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

@media (max-width: 899px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 559px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper-alt);
  border: 0;
  padding: 0;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item--square { aspect-ratio: 1 / 1; }

/* --- CTA 배너 ----------------------------------------------------------- */
.cta-banner {
  position: relative;
  isolation: isolate;
  padding-block: clamp(4rem, 2.5rem + 6vw, 7rem);
  text-align: center;
  overflow: hidden;
}

.cta-banner__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(33, 33, 33, 0.55), rgba(33, 33, 33, 0.68));
}

.cta-banner h2 {
  color: #fff;
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: var(--ls-tight);
}

.cta-banner p {
  max-width: 52ch;
  margin: var(--space-4) auto 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: var(--fs-lg);
}

.cta-banner__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-7);
}

@media (max-width: 419px) {
  .cta-banner__actions .btn { flex: 1 1 100%; }
}

/* --- 문의 페이지 --------------------------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: start;
}

@media (max-width: 899px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-aside {
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
}

.contact-aside dl { display: grid; gap: var(--space-5); }
.contact-aside dt {
  color: var(--ink-500);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.contact-aside dd { color: var(--ink-900); font-size: var(--fs-sm); line-height: 1.7; }

/* --- 소식 리스트 --------------------------------------------------------- */
.post-list { border-top: 1px solid var(--border); }

.post {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: var(--space-5);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 639px) {
  .post { grid-template-columns: 1fr; gap: var(--space-2); }
}

.post__date { color: var(--ink-500); font-size: var(--fs-sm); }
.post__title { color: var(--ink-900); font-size: 1.125rem; font-weight: 700; }
.post__excerpt { margin-top: var(--space-2); color: var(--ink-500); font-size: var(--fs-sm); }

/* --- 다운로드 카드 ------------------------------------------------------- */
.download {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  transition: border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease);
}

.download:hover { border-color: var(--pink-200); transform: translateY(-3px); }

.download__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--pink-800);
}

.download__icon svg { width: 22px; height: 22px; }

/* parts 와 같은 이유 — span 기본값(inline)이면 이름과 메타가 한 줄로 붙는다 */
.download__name,
.download__meta { display: block; }

.download__name { color: var(--ink-900); font-weight: 700; font-size: var(--fs-sm); line-height: 1.5; }
.download__meta { color: var(--ink-500); font-size: var(--fs-xs); margin-top: 2px; line-height: 1.6; }

/* --- 준비중 카드 --------------------------------------------------------- */
.card--soon { opacity: 0.72; }

.card--soon .card__media {
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(
    45deg,
    var(--paper-alt),
    var(--paper-alt) 12px,
    var(--paper-deep) 12px,
    var(--paper-deep) 24px
  );
  color: var(--ink-300);
  font-size: var(--fs-sm);
  font-weight: 700;
}

/* --- 본문 산문 (약관-방침) ------------------------------------------------ */
.prose { max-width: 74ch; }
.prose h2 { margin-top: var(--space-8); margin-bottom: var(--space-4); font-size: var(--fs-h3); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--space-6); margin-bottom: var(--space-3); font-size: 1.0625rem; }
.prose p + p { margin-top: var(--space-4); }
.prose ul { margin-top: var(--space-3); display: grid; gap: var(--space-2); }
.prose li { padding-left: 1.125rem; position: relative; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink-300);
}

/* --- 영상 목록 ----------------------------------------------------------- */
/* 영상 파일은 사이트에 두지 않는다. 유튜브·인스타그램에 올린 것을 카드로 건다.
   누르기 전에는 썸네일만 있고 임베드가 없다 (속도와 추적 최소화). */
.video-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) ease,
              border-color var(--dur-fast) ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--pink-200);
}

.video-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: var(--paper-alt);
  cursor: pointer;
  overflow: hidden;
}

/* 썸네일을 흐름에서 빼내야 세로로 긴 이미지가 카드 높이를 밀어 올리지 않는다 */
.video-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

.video-card:hover .video-card__media img { transform: scale(1.04); }

.video-card__blank {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--paper-alt), var(--paper-deep));
}

/* 재생 표시 */
.video-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.video-card__play svg {
  width: 56px;
  height: 56px;
  padding: 0.75rem;
  border-radius: var(--r-pill);
  background: rgba(33, 33, 33, 0.62);
  color: #fff;
  transition: background var(--dur-fast) ease, transform var(--dur-fast) var(--ease);
}

.video-card:hover .video-card__play svg {
  background: var(--accent);
  transform: scale(1.06);
}

.video-card__tag {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-700);
}

/* 재생을 누르면 이 자리에 iframe 이 들어온다 */
.video-card__media--playing { cursor: default; }
.video-card__media--playing iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
}

.video-note {
  margin-top: var(--space-6);
  color: var(--ink-500);
  font-size: var(--fs-xs);
  text-align: center;
}

/* 갤러리·영상이 아직 없을 때의 자리 안내 */
.admin-empty-lite {
  padding: var(--space-8) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  color: var(--ink-500);
  text-align: center;
}

.gallery-note {
  margin-top: var(--space-8);
  color: var(--ink-500);
  font-size: var(--fs-xs);
}

/* 키트 상세의 정보 표와 버튼 (예전에 style 속성으로 박혀 있던 것) */
.kit-spec { margin-top: var(--space-6); }

.kit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
