/* ══════════════════════════════════════════════════════════════
   사단법인 세컨하프 — 공개 페이지
   ══════════════════════════════════════════════════════════════ */


* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, 'Malgun Gothic', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  letter-spacing: -0.032em;
  line-height: 1.25;
  font-weight: 700;
  text-wrap: balance;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 200;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  background: var(--ink-900);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 헤더 ──────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled,
body:not(.has-hero) .site-header {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}

.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text em {
  font-style: normal;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--ink-400);
  font-weight: 600;
}

/* 히어로가 있는 페이지는 헤더가 사진 위에 얹힌다 */
body.has-hero .site-header:not(.scrolled) .brand-text strong,
body.has-hero .site-header:not(.scrolled) .nav-trigger,
body.has-hero .site-header:not(.scrolled) .hamburger span {
  color: #fff;
}
body.has-hero .site-header:not(.scrolled) .brand-text em {
  color: rgba(255, 255, 255, 0.66);
}
body.has-hero .site-header:not(.scrolled) .hamburger span {
  background: #fff;
}

/* ── 데스크톱 메뉴 (CSS 만으로 드롭다운) ────────────────────── */
.nav-wrap {
  margin-left: auto;
}

.nav {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-group {
  position: relative;
}

.nav-trigger {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-700);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.chev {
  transition: transform 0.22s var(--ease);
  opacity: 0.55;
}

.nav-group:hover .nav-trigger,
.nav-group:focus-within .nav-trigger {
  background: var(--brand-soft);
  color: var(--brand);
}

.nav-group:hover .chev,
.nav-group:focus-within .chev {
  transform: rotate(180deg);
}

.nav-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  translate: -50% 0;
  min-width: 12rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 44px -12px rgba(11, 13, 18, 0.22), 0 2px 6px rgba(11, 13, 18, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}

.nav-group:hover .nav-panel,
.nav-group:focus-within .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-panel a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--ink-700);
  text-decoration: none;
  font-size: 0.9375rem;
  white-space: nowrap;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.nav-panel a:hover,
.nav-panel a[aria-current='page'] {
  background: var(--brand-soft);
  color: var(--brand);
}

/* ── 헤더 우측 ─────────────────────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-donate {
  padding: 0.5rem 1.125rem;
  border-radius: 999px;
  background: var(--ink-900);
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}

.btn-donate:hover {
  background: var(--brand);
  transform: translateY(-1px);
}

body.has-hero .site-header:not(.scrolled) .btn-donate {
  background: #fff;
  color: var(--ink-900);
}
body.has-hero .site-header:not(.scrolled) .btn-donate:hover {
  background: var(--brand-bright);
  color: #fff;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-900);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.hamburger[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── 모바일 메뉴 ───────────────────────────────────────────── */
.mobile-nav {
  display: none;
  padding: 1rem 1.5rem 2rem;
  background: #fff;
  border-top: 1px solid var(--line);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.mobile-nav > ul,
.mobile-nav ul ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-nav > ul > li + li {
  margin-top: 1.25rem;
}

.m-group {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-400);
  text-transform: uppercase;
}

.mobile-nav ul ul a {
  display: block;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 1.0625rem;
  font-weight: 500;
}

.mobile-nav ul ul a[aria-current='page'] {
  color: var(--brand);
  font-weight: 700;
}

.btn-donate.wide {
  display: block;
  margin-top: 1.75rem;
  padding: 0.875rem;
  text-align: center;
  font-size: 1rem;
}

@media (max-width: 60rem) {
  .nav-wrap {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .mobile-nav {
    display: block;
  }
  .mobile-nav[hidden] {
    display: none;
  }
}

/* ── 본문 공통 ─────────────────────────────────────────────── */
main {
  min-height: 60vh;
}

body.has-hero main {
  margin-top: calc(var(--header-h) * -1);
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section-dark {
  background: var(--ink-900);
  color: #fff;
}

.section-soft {
  background: var(--paper-soft);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.section-dark .eyebrow {
  background: rgba(79, 155, 255, 0.16);
  color: var(--brand-bright);
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
}

.section-lead {
  margin: 0;
  max-width: 40rem;
  color: var(--ink-500);
  font-size: 1.0625rem;
}

.section-dark .section-lead {
  color: var(--ink-300);
}

/* ── 히어로 ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: min(88vh, 46rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink-900);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 13, 18, 0.72) 0%,
    rgba(11, 13, 18, 0.28) 38%,
    rgba(11, 13, 18, 0.92) 100%
  );
}

.hero-text {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem clamp(3rem, 7vw, 5.5rem);
  color: #fff;
}

.hero-lead {
  margin: 0;
  font-size: clamp(2.25rem, 6.2vw, 4.25rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.042em;
  text-wrap: balance;
  animation: rise 0.9s var(--ease) both;
}

.hero-sub {
  margin: 1.25rem 0 0;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 2vw, 1.1875rem);
  animation: rise 0.9s var(--ease) 0.12s both;
}

.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s var(--ease) 0.22s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── 버튼 ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-bright);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
}
.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-line {
  border: 1px solid var(--line);
  color: var(--ink-900);
  background: #fff;
}
.btn-line:hover {
  border-color: var(--ink-900);
}

/* ── 통계 (숫자 강조) ──────────────────────────────────────── */
.stat-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin-top: 3rem;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat {
  padding: 2rem 1.75rem;
  background: var(--ink-900);
}

.stat-num {
  display: block;
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1.05;
}

.stat-num .unit {
  font-size: 0.45em;
  font-weight: 600;
  color: var(--brand-bright);
  margin-left: 0.25rem;
  letter-spacing: -0.01em;
}

.stat-label {
  display: block;
  margin-top: 0.625rem;
  color: var(--ink-300);
  font-size: 0.9375rem;
}

.stat-note {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-500);
  font-size: 0.8125rem;
}

/* ── 카드 ──────────────────────────────────────────────────── */
.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin: 2.75rem 0 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 24px 48px -16px rgba(11, 13, 18, 0.18);
}

.card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
}

.card p {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ── 미션 / 인용 ───────────────────────────────────────────── */
.mission-quote {
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
}

.mission-quote p {
  font-size: clamp(1.125rem, 2.6vw, 1.5rem);
  line-height: 1.6;
  letter-spacing: -0.028em;
  font-weight: 500;
}

.mission-quote .accent {
  color: var(--brand);
  font-weight: 700;
}

.vision-line {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
  font-size: clamp(1.25rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.4;
}

.vision-line strong {
  color: var(--brand-bright);
}

/* ── 재정 요약 ─────────────────────────────────────────────── */
.finance-summary {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.finance-summary th,
.finance-summary td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.finance-summary tr:last-child th,
.finance-summary tr:last-child td {
  border-bottom: 0;
}

.finance-summary th {
  width: 58%;
  background: var(--paper-soft);
  font-weight: 500;
  color: var(--ink-500);
  font-size: 0.9375rem;
}

.finance-summary .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-dark .finance-summary {
  border-color: var(--line-dark);
}
.section-dark .finance-summary th,
.section-dark .finance-summary td {
  border-bottom-color: var(--line-dark);
}
.section-dark .finance-summary th {
  background: var(--ink-800);
  color: var(--ink-300);
}

.finance-item {
  margin-bottom: 3rem;
}

.finance-item h2 a,
.finance-item h3 a {
  text-decoration: none;
}
.finance-item h2 a:hover {
  color: var(--brand);
}

/* ── 글 목록 ───────────────────────────────────────────────── */
.post-list {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.post-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--line);
}

.post-list a {
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s var(--ease);
}

.post-list a:hover {
  color: var(--brand);
}

.post-list time {
  margin-left: auto;
  color: var(--ink-400);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.post-list .empty {
  color: var(--ink-400);
  justify-content: center;
}

.section-dark .post-list,
.section-dark .post-list li {
  border-color: var(--line-dark);
}
.section-dark .post-list time {
  color: var(--ink-500);
}

.more {
  margin-top: 1.75rem;
}

.more a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.more a::after {
  content: '→';
  transition: transform 0.2s var(--ease);
}

.more a:hover::after {
  transform: translateX(3px);
}

.section-dark .more a {
  color: var(--brand-bright);
}

/* ── CTA ───────────────────────────────────────────────────── */
.cta-inner {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto;
}

.cta-inner h2 {
  font-size: clamp(1.625rem, 4vw, 2.5rem);
}

.cta-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ── 일반 페이지 ───────────────────────────────────────────── */
.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem clamp(4rem, 9vw, 7rem);
}

.page > h1 {
  font-size: clamp(1.875rem, 4.6vw, 2.75rem);
  margin: 0 0 1.5rem;
}

.page-photo {
  margin: 0 0 2.5rem;
}

.page-photo img {
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.page-photo.portrait {
  max-width: 16rem;
}

.page-photo.portrait img {
  aspect-ratio: 3 / 4;
}

.block + .block {
  margin-top: 2.75rem;
}

.block h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  color: var(--brand);
}

.block p {
  margin: 0 0 1rem;
}

/* ── 재정보고 상세 ─────────────────────────────────────────── */
.finance-detail,
.post {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem clamp(4rem, 9vw, 7rem);
}

.finance-detail h1,
.post h1 {
  font-size: clamp(1.625rem, 4vw, 2.25rem);
  margin: 0 0 0.75rem;
}

.finance-detail h2 {
  margin: 3rem 0 0.75rem;
  font-size: 1.125rem;
  color: var(--brand);
}

.period,
.post time {
  display: block;
  color: var(--ink-400);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--paper-soft);
  border-left: 3px solid var(--brand);
  color: var(--ink-500);
  font-size: 0.9375rem;
}

.attachments {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.attachments a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.125rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.attachments a::before {
  content: '📄';
}

.attachments a:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.post .body {
  margin-top: 2rem;
}

.back {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.back a {
  color: var(--ink-500);
  text-decoration: none;
  font-size: 0.9375rem;
}

.back a:hover {
  color: var(--brand);
}

.lead {
  color: var(--ink-500);
  font-size: 0.9375rem;
  max-width: 44rem;
}

.empty {
  color: var(--ink-400);
}

/* ── 푸터 ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink-900);
  color: var(--ink-300);
  font-size: 0.875rem;
}

.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 4.5rem) 1.5rem 2.5rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}

@media (max-width: 48rem) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.tagline {
  margin: 1rem 0 0;
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.5;
}

.footer-info p {
  margin: 0 0 0.5rem;
}

.footer-info .org {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.25rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.875rem;
}

.footer-bottom {
  border-top: 1px solid var(--line-dark);
}

.footer-bottom > * {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-bottom .notice {
  padding-top: 1.75rem;
  color: var(--ink-500);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.footer-bottom .links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding-bottom: 2.5rem;
  padding-top: 1rem;
}

.footer-bottom .links a {
  color: var(--ink-300);
  text-decoration: none;
}

.footer-bottom .links a:hover {
  color: #fff;
}

.gov {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.gov img {
  height: 22px;
  width: auto;
  filter: grayscale(1) brightness(2.4);
  opacity: 0.5;
  transition: opacity 0.2s var(--ease);
}

.gov a:hover img {
  opacity: 0.9;
}

/* ── 카드·통계 링크화 ───────────────────────────────────── */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
  color: var(--brand);
  font-size: 0.875rem;
  font-weight: 600;
}

.card-more::after {
  content: '→';
  transition: transform 0.2s var(--ease);
}

.card:hover .card-more::after {
  transform: translateX(3px);
}

a.stat {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: background 0.25s var(--ease);
}

a.stat:hover {
  background: var(--ink-800);
}

a.stat:hover .stat-note {
  color: var(--brand-bright);
}

/* ── 상세 페이지 ────────────────────────────────────────── */
.detail {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 1.5rem clamp(4rem, 9vw, 7rem);
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

@media (max-width: 56rem) {
  .detail {
    grid-template-columns: 1fr;
  }
}

.detail-photo {
  margin: 0;
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

@media (max-width: 56rem) {
  .detail-photo {
    position: static;
  }
}

.detail-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.detail-body h1 {
  font-size: clamp(1.75rem, 4.4vw, 2.75rem);
  margin: 0 0 1rem;
}

.detail-lead {
  margin: 0 0 2.5rem;
  color: var(--ink-500);
  font-size: 1.125rem;
  line-height: 1.7;
}

.detail-point {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.detail-point h2 {
  margin: 0 0 0.375rem;
  font-size: 1rem;
  color: var(--brand);
}

.detail-point p {
  margin: 0;
  color: var(--ink-700);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

/* ── 디자인 안 선택 막대 (확정되면 제거) ────────────────── */
.theme-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 46px;
  padding: 0 0.75rem;
  background: rgba(11, 13, 18, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-family: 'Pretendard Variable', Pretendard, system-ui, sans-serif;
  overflow-x: auto;
}

.theme-bar .tb-label {
  padding: 0 0.5rem 0 0.625rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.theme-bar a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.theme-bar a b {
  font-size: 0.6875rem;
  opacity: 0.6;
}

.theme-bar a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.theme-bar a.on {
  background: #fff;
  color: #0b0d12;
  font-weight: 700;
}

.theme-bar a.on b {
  opacity: 0.55;
}

@media print {
  .theme-bar {
    display: none;
  }
}


/* 선택 막대가 있을 때 헤더와 본문을 그만큼 내린다 */
body.has-theme-bar {
  padding-top: 46px;
}

body.has-theme-bar .site-header {
  top: 46px;
}

.tb-compare {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
  white-space: nowrap;
}

.tb-compare:hover {
  background: #fff;
  color: #0b0d12 !important;
}

/* ══ 스크롤 등장 (모든 안 공통) ══════════════════════════ */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}
