/* =========================================================
   H.S.N.S — 쇼케이스 / 아카이브
   app.css 의 디자인 토큰(--ink-*, --gold-*, --font-*)을 그대로 쓴다.
   app.css 뒤에 로드되므로 여기서는 신규 클래스만 정의한다.

   사용처: 랜딩 partials/_showcase.html, archive.html, archive_detail.html
   ========================================================= */

/* -----------------------------
   0. 히어로 안의 브리핑 카드
   첫 화면에서 스크롤 없이 실물이 보이게 하는 것이 목적이다.
   원래 우측 슬롯(.hero__art)은 데스크톱 전용 장식이었으므로,
   브리핑이 들어갈 때는 모바일에서도 반드시 보이도록 되살린다.
   ----------------------------- */
.hero__art--brief { display: block; }

/* 카드가 들어가면 히어로 세로 부피를 줄여 첫 화면 안에 들어오게 한다 */
.hero--with-brief.section--hero { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.hero--with-brief .hero__eyebrow { margin-bottom: 1.25rem; }
.hero--with-brief .hero__h1 {
  font-size: clamp(2.25rem, 3.6vw + 1rem, 4.25rem);
  margin-bottom: 1.25rem;
}
.hero--with-brief .hero__lede {
  font-size: 1rem;
  margin-bottom: 1.75rem;
  max-width: 32rem;
}
.hero--with-brief .hero__stats {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
}
.hero--with-brief .hero__stat-num { font-size: 1.75rem; }

@media (min-width: 1024px) {
  /* DOM 순서는 모바일 기준(카피 → 브리핑 → 가입폼 → 통계)이고,
     데스크톱에서는 좌측 열에 카피·폼·통계를 쌓고 우측 열을 카드가 통으로 쓴다.
     행/열을 모두 명시한다 — grid-row 만 주면 위치가 확정된 아이템이 먼저 배치되어
     좌우가 뒤집힌다. */
  .hero__inner  { grid-column: 1; grid-row: 1; }
  .hero__signup { grid-column: 1; grid-row: 2; }
  .hero__stats  { grid-column: 1; grid-row: 3; }
  .hero__art    { grid-column: 2; grid-row: 1 / span 3; }
  .hero--with-brief .hero__layout { align-items: start; }
}

.hero-brief {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.hero-brief__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--ink-200);
  background: var(--ink-50);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-500);
}

.hero-brief__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-brief__count {
  margin-left: auto;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(212, 168, 75, 0.16);
  color: var(--gold-600);
  white-space: nowrap;
}

.hero-brief__live {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e5484d;
  animation: hero-brief-blink 1.8s ease-in-out infinite;
}

@keyframes hero-brief-blink { 50% { opacity: 0.3; } }

@media (prefers-reduced-motion: reduce) {
  .hero-brief__live { animation: none; }
}

/* 브리핑이 길어도 페이지가 밀리지 않도록 카드 내부만 스크롤 */
.hero-brief__body {
  max-height: 46vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.hero-brief__body .brief-list { padding: 0.25rem 1.125rem 0.75rem; }
.hero-brief__body .brief-item { padding: 0.85rem 0 0.85rem 2rem; }
.hero-brief__body .brief-item::before { top: 1.05rem; }
.hero-brief__body .brief-item__title { font-size: 0.9375rem; }
.hero-brief__body .brief-item__excerpt {
  font-size: 0.8125rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-brief__foot {
  display: flex;
  gap: 1.25rem;
  padding: 0.75rem 1.125rem;
  border-top: 1px solid var(--ink-200);
  background: var(--ink-50);
  font-size: 0.8125rem;
  color: var(--ink-700);
}

.hero-brief__foot a { transition: color var(--t-fast); }
.hero-brief__foot a:hover { color: var(--gold-600); }

@media (max-width: 1023px) {
  /* 모바일은 카드가 카피 아래로 내려오므로, 첫 화면에 헤드라인 몇 줄이라도
     걸리도록 위쪽 여백을 조인다.
     내부 스크롤은 끈다 — 카드 위에서 스와이프하면 페이지 스크롤을 가로채
     아래의 가입 폼에 도달하지 못하는 함정이 된다. 대신 아래를 페이드 처리하고
     전문은 카드 하단 링크로 보낸다. */
  .hero-brief__body {
    max-height: 40vh;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
            mask-image: linear-gradient(to bottom, #000 78%, transparent);
  }
  .hero--with-brief .hero__layout { gap: 1.5rem; }
  .hero--with-brief .hero__eyebrow { margin-bottom: 0.875rem; }
  .hero--with-brief .hero__lede {
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
  }
  .hero--with-brief .hero__stats {
    margin-top: 2rem;
    padding-top: 1.5rem;
    gap: 1rem;
  }
  .hero--with-brief .hero__stat-num { font-size: 1.5rem; }
}

/* -----------------------------
   0-a. 앵커 이동 (네비의 '공지사항' → 랜딩 하단 공지 섹션)
   .nav 가 position:sticky 라 그대로 두면 제목이 네비 밑에 가려진다.
   ----------------------------- */
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

#notice { scroll-margin-top: 5rem; }

/* -----------------------------
   0-b. 랜딩 1칸 가입 폼 (어두운 히어로 위)
   ----------------------------- */
.quick-signup { margin-bottom: 1rem; }

.quick-signup__row {
  display: flex;
  gap: 0.5rem;
  max-width: 30rem;
}

.quick-signup__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(212, 168, 75, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-50);
  font-size: 0.9375rem;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.quick-signup__input::placeholder { color: var(--ink-500); }

.quick-signup__input:focus {
  outline: none;
  border-color: var(--gold-400);
  background: rgba(255, 255, 255, 0.1);
}

.quick-signup__btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--gold-400);
  color: var(--ink-950);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--t-fast), transform var(--t-fast);
}

.quick-signup__btn:hover { background: #e0b95f; }
.quick-signup__btn:active { transform: translateY(1px); }
.quick-signup__btn[disabled] { opacity: 0.6; cursor: progress; }

.quick-signup__note {
  max-width: 30rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--ink-500);
}

.quick-signup__note a {
  color: var(--ink-300);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quick-signup__result:not(:empty) { margin-top: 1rem; max-width: 30rem; }

.hero__actions--sub {
  gap: 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.8125rem;
}

.link-arrow--light { color: var(--ink-300); }
.link-arrow--light:hover { color: var(--gold-400); }

/* 가입 완료 / 오류 표시 */
.quick-done {
  padding: 1rem 1.125rem;
  border: 1px solid rgba(212, 168, 75, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(212, 168, 75, 0.1);
}

.quick-done__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  color: var(--gold-400);
  font-size: 0.9375rem;
}

.quick-done__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--gold-400);
  color: var(--ink-950);
  font-size: 0.75rem;
}

.quick-done__body {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink-200);
}

.quick-done__body b { color: var(--ink-50); }

.quick-error {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--red-500);
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.12);
}

.quick-error__msg {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #fecaca;
}

@media (max-width: 520px) {
  .quick-signup__row { flex-direction: column; }
  .quick-signup__btn { justify-content: center; }
}

/* -----------------------------
   1. 섹션 헤더
   ----------------------------- */
.showcase__head {
  max-width: 44rem;
  margin: 0 0 2.5rem;
}

.showcase__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(184, 144, 47, 0.35);
  border-radius: var(--radius-pill);
  background: rgba(212, 168, 75, 0.08);
  color: var(--gold-600);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.showcase__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 0 rgba(184, 144, 47, 0.6);
  animation: showcase-pulse 2.4s ease-out infinite;
}

@keyframes showcase-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(184, 144, 47, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(184, 144, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 144, 47, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .showcase__pulse { animation: none; }
}

.showcase__title { margin-bottom: 1rem; }
.showcase__lede  { color: var(--ink-500); }

/* -----------------------------
   2. 브리핑 카드 (신문 지면 톤)
   ----------------------------- */
.brief-card {
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 25, 22, 0.04), 0 12px 32px -20px rgba(26, 25, 22, 0.25);
  overflow: hidden;
}

.brief-card__masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--ink-200);
  background: var(--ink-50);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.brief-card__name {
  font-weight: 500;
  color: var(--ink-900);
}

.brief-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--ink-200);
  background: var(--ink-50);
  font-size: 0.8125rem;
  color: var(--ink-500);
}

/* -----------------------------
   3. 기사 목록 (publisher가 생성하는 마크업)
   ----------------------------- */
.brief-list {
  margin: 0;
  padding: 0.5rem 1.5rem 1.25rem;
  list-style: none;
  counter-reset: brief;
}

.brief-item {
  position: relative;
  padding: 1.125rem 0 1.125rem 2.25rem;
  border-bottom: 1px solid var(--ink-100);
  counter-increment: brief;
}

.brief-item:last-child { border-bottom: 0; }

.brief-item::before {
  content: counter(brief, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-300);
}

.brief-item__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.375rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-300);
}

.brief-item__cat {
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(212, 168, 75, 0.14);
  color: var(--gold-600);
  letter-spacing: 0.04em;
}

.brief-item__src { color: var(--ink-500); }

.brief-item__title {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-900);
  transition: color var(--t-fast);
}

a.brief-item__title:hover {
  color: var(--gold-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.brief-item__excerpt {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink-500);
}

/* -----------------------------
   4. 이전 브리핑 목록
   ----------------------------- */
.showcase__recent { margin-top: 3rem; }

.recent-list {
  margin-top: 1.25rem;
  border-top: 1px solid var(--ink-200);
}

.recent-list li { border-bottom: 1px solid var(--ink-200); }

.recent-list a {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0.25rem;
  transition: background var(--t-fast), padding-left var(--t-fast);
}

.recent-list a:hover {
  background: rgba(212, 168, 75, 0.06);
  padding-left: 0.75rem;
}

.recent-list__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-300);
  white-space: nowrap;
}

.recent-list__text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-700);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-list__arrow {
  color: var(--gold-500);
  opacity: 0;
  transition: opacity var(--t-fast);
}

.recent-list a:hover .recent-list__arrow { opacity: 1; }

/* -----------------------------
   5. CTA
   ----------------------------- */
.showcase--compact .showcase__recent { margin-top: 0; }

.showcase__recent-more {
  margin-top: 1.25rem;
  text-align: right;
}

.showcase__cta {
  margin-top: 2.5rem;
  text-align: center;
}

.showcase__cta-note {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-300);
}

/* -----------------------------
   6. 아카이브 목록
   ----------------------------- */
.archive-page__lede { color: var(--ink-500); }

.archive-page__count {
  display: inline-block;
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-300);
}

.archive-list {
  margin-top: 2.5rem;
  border-top: 1px solid var(--ink-200);
}

.archive-list__item { border-bottom: 1px solid var(--ink-200); }

.archive-list__item > a {
  display: block;
  padding: 1.5rem 0.25rem;
  transition: background var(--t-fast), padding-left var(--t-fast);
}

.archive-list__item > a:hover {
  background: rgba(212, 168, 75, 0.06);
  padding-left: 0.75rem;
}

.archive-list__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--ink-300);
}

.archive-list__edition {
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(212, 168, 75, 0.14);
  color: var(--gold-600);
}

.archive-list__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink-900);
}

.archive-list__summary {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink-500);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.archive-list__item .link-arrow { margin-top: 0.75rem; }

.archive-empty {
  padding: 4rem 0;
  text-align: center;
  color: var(--ink-300);
}

/* -----------------------------
   7. 아카이브 상세 / 페이저
   ----------------------------- */
.archive-detail__head { margin-top: 1.5rem; }
.archive-detail__lede { color: var(--ink-500); }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-200);
  font-size: 0.875rem;
}

.pager__link {
  color: var(--ink-700);
  transition: color var(--t-fast);
}

.pager__link:hover { color: var(--gold-600); }

.pager__link--off {
  color: var(--ink-300);
  cursor: default;
}

.pager__pos {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-300);
}

.pager--posts .pager__link {
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -----------------------------
   8. 반응형
   ----------------------------- */
@media (max-width: 640px) {
  .brief-list { padding: 0.25rem 1rem 1rem; }
  .brief-item { padding-left: 1.75rem; }
  .brief-card__masthead,
  .brief-card__foot { padding: 0.75rem 1rem; }
  .brief-card__foot { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  .recent-list a {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .recent-list__arrow { display: none; }

  .archive-list__title { font-size: 1.25rem; }
}
