/* =====================================================
   전략 프레임워크 갤러리
   Editorial system — Cream + Coral + Navy (Anthropic-aligned)
   ===================================================== */

:root {
  /* Brand — Pastel Card */
  --primary:          #E85D4E;
  --primary-active:   #d0463a;
  --primary-disabled: #f0d9d4;
  --accent-teal:      #A8E6CF;
  --accent-amber:     #F2D160;

  /* Pastel Card capsule palette */
  --coral:    #E85D4E;
  --lime:     #C4D94E;
  --lavender: #C5B5E0;
  --sky:      #8BB4F7;
  --violet:   #A06CE8;
  --yellow:   #F2D160;
  --peach:    #F5B895;
  --mint:     #A8E6CF;
  --outline:  #1E1E1E;

  /* Surfaces */
  --canvas:               #F5F5F0;
  --surface-soft:         #EFEFE7;
  --surface-card:         #FFFFFF;
  --surface-cream-strong: #E8E8DF;
  --surface-dark:         #1A1A1A;
  --surface-dark-elevated:#262624;
  --surface-dark-soft:    #201F1D;

  --hairline:      #DCDCD3;
  --hairline-soft: #E6E6DD;

  /* Text */
  --ink:         #1A1A1A;
  --body-strong: #1A1A1A;
  --body:        #2C2C2A;
  --muted:       #6B6B66;
  --muted-soft:  #8E8E88;
  --on-primary:  #ffffff;
  --on-dark:     #F5F5F0;
  --on-dark-soft:#A8A8A0;

  /* Semantic */
  --success: #5db872;
  --warning: #d4a017;
  --error:   #c64545;

  /* Type — Bodoni Moda 디스플레이 + Pretendard 본문 */
  --display: 'Bodoni Moda', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, serif;
  /* 라틴(영어·숫자)은 Bodoni Moda로 통일, 한글은 Pretendard로 폴백 */
  --sans:    'Bodoni Moda', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, sans-serif;
  --mono:    'Space Grotesk', 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Geometry */
  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-pill: 9999px;

  /* Spacing (4-base) */
  --s-xxs:   4px;
  --s-xs:    8px;
  --s-sm:   12px;
  --s-md:   16px;
  --s-lg:   24px;
  --s-xl:   32px;
  --s-xxl:  48px;
  --s-section: 96px;

  /* Category accent — Pastel Card 캡슐 색 매핑 */
  --cat-problem-solving: #8BB4F7;
  --cat-business-model:  #E85D4E;
  --cat-market:          #C5B5E0;
  --cat-marketing:       #F5B895;
  --cat-organization:    #F2D160;
  --cat-hr:              #A06CE8;
  --cat-change:          #8BB4F7;
  --cat-project:         #C4D94E;
  --cat-process:         #A8E6CF;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 한글 단어가 중간에서 잘리지 않도록(어절 단위 줄바꿈) */
  word-break: keep-all;
  overflow-wrap: break-word;
}

.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =====================================================
   Typography utilities
   ===================================================== */
.serif { font-family: var(--display); font-weight: 600; }
.sans  { font-family: var(--sans); }

.display-xl { font-family: var(--display); font-weight: 700; font-size: 60px; line-height: 1.1;  letter-spacing: -2.4px; color: var(--ink); }
.display-lg { font-family: var(--display); font-weight: 700; font-size: 48px; line-height: 1.15; letter-spacing: -1.8px; color: var(--ink); }
.display-md { font-family: var(--display); font-weight: 700; font-size: 36px; line-height: 1.2;  letter-spacing: -1.2px; color: var(--ink); }
.display-sm { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.25; letter-spacing: -0.8px; color: var(--ink); }
.title-lg   { font-family: var(--sans);    font-weight: 500; font-size: 22px; line-height: 1.3;  color: var(--ink); }
.title-md   { font-family: var(--sans);    font-weight: 500; font-size: 18px; line-height: 1.4;  color: var(--ink); }
.title-sm   { font-family: var(--sans);    font-weight: 500; font-size: 16px; line-height: 1.4;  color: var(--ink); }
.body-md    { font-family: var(--sans);    font-weight: 400; font-size: 16px; line-height: 1.55; color: var(--body); }
.body-sm    { font-family: var(--sans);    font-weight: 400; font-size: 14px; line-height: 1.55; color: var(--body); }
.caption    { font-family: var(--sans);    font-weight: 500; font-size: 13px; line-height: 1.4;  color: var(--muted); }
.cap-up     { font-family: var(--sans);    font-weight: 500; font-size: 12px; line-height: 1.4;  letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }

/* =====================================================
   Spike mark (Anthropic radial 4-spoke)
   ===================================================== */
.spike {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  flex-shrink: 0;
}
.spike svg { width: 100%; height: 100%; display: block; }

/* =====================================================
   Top navigation
   ===================================================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 64px;
}
.top-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-logo-wrap {
  position: relative;
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
  background: #ffffff;
  box-shadow: 0 0 0 2px #ffffff;
  transition: transform 0.4s ease;
}
/* 호버 시 로고가 360도 회전 */
@keyframes brand-spin {
  to { transform: rotate(360deg); }
}
.brand:hover .brand-logo {
  animation: brand-spin 1.2s linear infinite;
}
/* 호버 시 로고에서 퍼지는 물결(ripple) */
.brand-logo-wrap::before,
.brand-logo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #e8772e;
  opacity: 0;
  pointer-events: none;
}
@keyframes brand-ripple {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.6); }
}
.brand:hover .brand-logo-wrap::before {
  animation: brand-ripple 1.6s ease-out infinite;
}
.brand:hover .brand-logo-wrap::after {
  animation: brand-ripple 1.6s ease-out infinite 0.8s;
}
.brand-text {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1;
}

/* 호버 시 글자가 흐르는 듯한 shimmer 효과 */
@keyframes brand-shimmer {
  to { background-position: -200% center; }
}
.brand:hover .brand-text {
  background-image: linear-gradient(
    90deg,
    var(--ink) 0%,
    var(--ink) 35%,
    #e8772e 50%,
    var(--ink) 65%,
    var(--ink) 100%
  );
  background-size: 200% auto;
  background-position: 0% center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: brand-shimmer 1.6s linear infinite;
}
.brand-sep {
  color: var(--muted);
  margin: 0 6px;
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  color: var(--body);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 16px; }

.nav-search {
  flex: 1;
  max-width: 600px;
  height: 44px;
  padding: 10px 20px;
  font-size: 15px;
  background: #ffffff;
  border: 1.5px solid var(--hairline);
  border-radius: var(--r-pill);
  color: var(--ink);
}
.nav-search::placeholder { color: var(--muted-soft); }
.nav-search:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(204,120,92,0.12);
  outline: none;
}

/* Theme toggle */
.btn-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline);
  background: var(--canvas);
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.btn-theme:hover { background: var(--surface-card); }
.btn-theme svg { width: 16px; height: 16px; display: block; }
.icon-moon { display: none; }

/* =====================================================
   Buttons
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  padding: 12px 20px;
  height: 40px;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline);
  background: var(--canvas);
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-github:hover { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.btn-github:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-github .gh-mark { width: 20px; height: 20px; }
.btn-primary:active { background: var(--primary-active); }

.btn-secondary {
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn-secondary:active { background: var(--surface-card); }

.btn-on-dark {
  background: var(--surface-dark-elevated);
  color: var(--on-dark);
}
.btn-on-coral {
  background: var(--canvas);
  color: var(--ink);
}
.btn-on-coral:active { background: var(--surface-card); }

.btn-text {
  background: transparent;
  color: var(--ink);
  padding: 0;
  height: auto;
}

/* =====================================================
   Hero
   ===================================================== */
.hero {
  padding: 72px 0 56px;
}
.hero-eyebrow {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--primary);
  display: inline-block;
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1.1;
  letter-spacing: -2px;
  color: var(--ink);
  max-width: 960px;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}
.hero-sub {
  margin: 20px 0 0;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.hero .lead {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  color: var(--body);
  max-width: 640px;
  margin: 0 0 32px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 480px;
}
.hero-search {
  width: 100%;
  height: 48px;
  font-size: 16px;
  padding: 12px 18px;
  background: var(--canvas);
}

/* =====================================================
   Filter band (sticky sub-nav)
   ===================================================== */
.filters {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 12px 0;
}
.filters .container {
  display: flex;
  align-items: center;
}
.filters .container::-webkit-scrollbar { display: none; }
.search-input {
  flex: 1;
  min-width: 240px;
  padding: 10px 14px;
  height: 40px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-input::placeholder { color: var(--muted-soft); }
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(204, 120, 92, 0.15);
}

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
}
/* 카테고리 색 점(왼쪽 마커) 제거 — cat-dot은 원본 규칙에서 직접 처리 */
.chip-dot { display: none; }
.chip {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface-card);
  border: none;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 1 auto;
}
.chip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chip:hover { background: var(--hairline); }
.chip[aria-selected="true"] {
  background: var(--ink);
  color: var(--canvas);
}
.chip[aria-selected="true"] .chip-dot { opacity: 0.85; }
.chip[aria-selected="true"] .chip-count {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
}
.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--surface-card);
  color: var(--muted);
  border-radius: var(--r-pill);
  line-height: 1;
}

/* =====================================================
   Section: gallery
   ===================================================== */
.gallery-section {
  padding: 56px 0 112px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -1.6px;
  color: var(--ink);
}
.section-head .section-meta {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
}

/* 카테고리 섹션 */
.cat-section {
  scroll-margin-top: 112px;
  margin-bottom: 64px;
}
.cat-section:last-child { margin-bottom: 0; }
.cat-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 24px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}
.cat-section:first-child .cat-head { border-top: none; padding-top: 0; }
.cat-head h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.9px;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}
.cat-head .cat-dot { display: none; }
.cat-head .cat-count {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink);
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 10px;
  line-height: 1;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .gallery { grid-template-columns: 1fr; } }

/* =====================================================
   Card (editorial feature card)
   ===================================================== */
.card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--ink); box-shadow: 0 12px 32px rgba(20,20,19,0.12); }
.card:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.card-thumb {
  background: var(--canvas);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.card-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card-num {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.04em;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 10px;
  line-height: 1;
}

.card-body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-cat {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.card-cat { gap: 0; }
.card-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.7px;
  color: var(--ink);
  margin: 4px 0 0;
}
.card-alt {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.card-summary {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--body);
  margin: 8px 0 12px;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--muted);
}
.meta-pair { display: flex; align-items: center; gap: 8px; }
.meta-label { font-weight: 500; }
.stars { color: #E8A55A; letter-spacing: 2px; font-size: 13px; }
.stars .star-empty { color: var(--hairline); }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 80px 0;
  font-size: 15px;
}

/* =====================================================
   Coral callout band
   ===================================================== */
.coral-band {
  background: var(--canvas);
  padding: 0 0 96px;
}
.coral-callout {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--r-lg);
  padding: 64px 48px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: center;
}
.coral-callout h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -1.5px;
}
.coral-callout p {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255,255,255,0.92);
}
.coral-callout .cta-row {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .coral-callout { grid-template-columns: 1fr; padding: 48px 32px; }
  .coral-callout .cta-row { justify-content: flex-start; }
}

/* =====================================================
   Footer (dark navy)
   ===================================================== */
.site-footer {
  background: var(--surface-dark);
  color: var(--on-dark-soft);
  padding: 64px 0 48px;
}
.site-footer .container { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; }
@media (max-width: 768px) { .site-footer .container { grid-template-columns: 1fr; gap: 32px; } }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--on-dark);
  margin-bottom: 16px;
  text-decoration: none;
}
.footer-brand .brand-text { color: var(--on-dark); }
.footer-brand .brand-sep { color: var(--on-dark-soft); }
.footer-tag {
  font-size: 14px;
  line-height: 1.55;
  color: var(--on-dark-soft);
  max-width: 360px;
}
.footer-col h4 {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--on-dark);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--on-dark-soft);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-col a:hover { color: var(--on-dark); }
.footer-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--on-dark);
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-pill);
  line-height: 1;
}
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  letter-spacing: 0.06em;
}
.footer-copy { color: #ffffff; }
.footer-author {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
}
.footer-name { color: #ffffff; }
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #ffffff;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.footer-social:hover { opacity: 1; }
.footer-social svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* =====================================================
   Modal — editorial 2-zone
   ===================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: rgba(20, 20, 19, 0.55);
  padding: 20px;
  overflow-y: auto;
}
.modal[aria-hidden="false"] { display: flex; align-items: flex-start; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; }
.modal-dialog {
  position: relative;
  width: min(1520px, 96vw);
  background: var(--canvas);
  border-radius: var(--r-xl);
  margin: auto;
  overflow: hidden;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hairline);
  background: var(--canvas);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  z-index: 5;
}
.modal-close:hover { background: var(--surface-card); }

.modal-content { padding: 0; }

.m-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  min-height: 600px;
}
@media (max-width: 980px) {
  .m-layout { grid-template-columns: 1fr; }
}

.m-stage {
  background: var(--surface-soft);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  border-right: 1px solid var(--hairline);
}
.m-stage .viz {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 18px;
}
.m-stage .viz svg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 640px;
}
.viz-caption {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
  font-family: var(--sans);
  letter-spacing: 0.01em;
}

.m-side {
  padding: 48px 44px;
  overflow-y: auto;
  max-height: 90vh;
}
.m-cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.m-cat-row .cat-dot { display: none; }
.m-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -1.5px;
  color: var(--ink);
  margin: 0 0 6px;
}
.m-alt {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  margin: 0 0 24px;
}

.m-ratings {
  display: flex;
  gap: 32px;
  padding: 18px 20px;
  background: var(--surface-card);
  border-radius: var(--r-md);
  margin-bottom: 28px;
}
.m-rating-item { display: flex; flex-direction: column; gap: 4px; }
.m-rating-label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}
.m-rating-item .stars { font-size: 14px; }

.m-section { margin-bottom: 24px; }
.m-section h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.m-section p {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--body);
}
.m-section ul { margin: 0; padding: 0; list-style: none; }
.m-section li {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--body);
  padding: 6px 0 6px 16px;
  position: relative;
}
.m-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 4px;
  height: 4px;
  background: var(--ink);
  border-radius: 50%;
}
.m-section.example p {
  background: var(--surface-card);
  padding: 16px 20px;
  border-radius: var(--r-md);
  font-size: 14.5px;
  line-height: 1.65;
}

.m-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.m-related a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--surface-card);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--hairline);
  transition: background 0.15s ease;
}
.m-related a:hover { background: var(--ink); color: var(--canvas); border-color: var(--ink); }

@media (max-width: 980px) {
  .m-stage { padding: 36px 28px; border-right: none; border-bottom: 1px solid var(--hairline); }
  .m-side  { padding: 32px 28px; max-height: none; }
  .modal { padding: 16px; }
  .m-title { font-size: 28px; }
}

/* No-scroll when modal open */
body.no-scroll { overflow: hidden; }

/* =====================================================
   Diagram — common SVG defaults
   ===================================================== */
.thumb-svg, .viz-svg { width: 100%; height: 100%; display: block; }
.viz-svg text, .thumb-svg text { font-family: var(--sans); }

/* hover 가능한 영역 */
.viz-svg [data-tip] { cursor: help; }
.viz-svg [data-tip] > rect,
.viz-svg [data-tip] > circle,
.viz-svg [data-tip] > polygon { transition: fill 0.18s ease, stroke-width 0.18s ease; }
.viz-svg [data-tip]:hover > rect:not([fill="none"]),
.viz-svg [data-tip]:hover > circle:not([fill="none"]),
.viz-svg [data-tip]:hover > polygon:not([fill="none"]) {
  stroke-width: 2.4;
  filter: brightness(0.97);
}

/* 글로벌 툴팁 */
.fw-tooltip {
  position: fixed;
  pointer-events: none;
  left: 0;
  top: 0;
  background: var(--ink);
  color: var(--on-dark);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 400;
  max-width: min(320px, calc(100vw - 32px));
  opacity: 0;
  transform: translate(-9999px, -9999px);
  transition: opacity 0.14s ease;
  z-index: 200;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
  white-space: normal;
  word-break: keep-all;
}
.fw-tooltip.visible { opacity: 1; }
.fw-tooltip strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--primary);
}
.fw-tooltip em {
  display: block;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--on-dark-soft);
  margin-top: 4px;
  text-transform: uppercase;
}

/* =====================================================
   Page load animation
   ===================================================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow    { animation: fadeUp 0.5s ease both; }
.hero h1         { animation: fadeUp 0.55s 0.07s ease both; }
.hero-sub        { animation: fadeUp 0.5s 0.14s ease both; }
.filters         { animation: fadeUp 0.5s 0.2s ease both; }
.gallery-section { animation: fadeUp 0.6s 0.28s ease both; }
.coral-band      { animation: fadeUp 0.5s 0.32s ease both; }
.site-footer     { animation: fadeUp 0.5s 0.36s ease both; }

/* =====================================================
   Hamburger button
   ===================================================== */
.btn-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--hairline);
  background: var(--canvas);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.ham-bar {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-origin: center;
}
.btn-hamburger[aria-expanded="true"] .ham-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.btn-hamburger[aria-expanded="true"] .ham-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.btn-hamburger[aria-expanded="true"] .ham-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =====================================================
   Mobile menu dropdown
   ===================================================== */
.mobile-menu {
  display: none;
  position: sticky;
  top: 64px;
  z-index: 45;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s ease;
}
.mobile-menu[aria-hidden="false"] {
  max-height: 480px;
}
.mobile-menu-inner {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mobile-search {
  width: 100%;
  height: 44px;
  font-size: 15px;
}
.mobile-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-menu-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}
.mobile-filter-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-filter-chips .chip {
  flex: none;
  justify-content: flex-start;
  width: 100%;
  font-size: 14px;
  padding: 10px 14px;
}
.chip-all { font-weight: 600; }

/* =====================================================
   Mobile responsive
   ===================================================== */
@media (max-width: 768px) {
  .btn-hamburger { display: flex; }
  .nav-search { display: none; }
  .nav-right .btn-github { display: none; }
  #theme-toggle { display: none; }
  .filters { display: none; }
  .mobile-menu { display: block; }

  /* 모바일에서는 보조 브랜드(| AI ROASTING) 숨김, 한 줄 유지 */
  .brand-secondary { display: none; }
  .brand-text { white-space: nowrap; }
  .top-nav .container { gap: 12px; }

  .hero { padding: 36px 0 28px; }
  .hero h1 { font-size: 34px; letter-spacing: -1.1px; }
  .hero-sub { font-size: 14px; }
  .hero-demo { padding: 22px 20px; }
  .hero-eyebrow { font-size: 11px; }

  .gallery-section { padding: 28px 0 56px; }
  .gallery { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
  .card-thumb { height: 150px; }
  .card-body { padding: 16px 18px 20px; }
  .card-title { font-size: 18px; }
  .cat-head h3 { font-size: 22px; }

  .coral-callout { flex-direction: column; gap: 24px; }
  .coral-callout h2 { font-size: 24px; }

  .site-footer { padding: 48px 0 36px; }
  .site-footer .container { grid-template-columns: 1fr; }
  .footer-col { display: none; }

  .modal { padding: 32px 12px; }
  .modal-dialog { width: 100%; max-height: none; animation: none; }
  .m-layout { grid-template-columns: 1fr !important; grid-template-rows: auto 1fr; }
  .m-stage { height: auto; max-height: 44vh; padding: 18px 14px; }
  .m-stage .viz { padding: 12px; }
  .m-stage .viz svg { max-height: 38vh; }
  .m-side { max-height: none; padding: 28px 22px; }
  .modal-close { position: fixed; top: 44px; right: 24px; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr !important; }
  .hero h1 { font-size: 30px; }
}

/* 히어로 제목 줄바꿈: 데스크톱은 "질문에" 뒤, 모바일은 "70가지" 앞 */
.hero h1 .br-m { display: none; }
@media (max-width: 640px) {
  .hero h1 .br-d { display: none; }
  .hero h1 .br-m { display: inline; }
}

/* =====================================================
   v3 개선: 정렬 툴바 · 히어로 추천 데모 · 접근성 · 모션
   ===================================================== */

/* 정렬 툴바 */
.gallery-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  flex-wrap: wrap;
}
.toolbar-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.sort-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.sort-btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
  background: var(--surface-card);
  border: 1px solid transparent;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sort-btn:hover { background: var(--hairline); }
.sort-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--canvas);
}
.sort-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* 히어로 2단 레이아웃 + 추천 데모 */
.hero .container { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-demo {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px;
}
.hero-demo-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; color: var(--primary);
  margin: 0 0 6px;
}
.hero-demo-title { font-family: var(--sans); font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 16px; line-height: 1.4; }
.hero-demo-q {
  display: block; width: 100%; text-align: left;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 8px;
  cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.hero-demo-q:hover { border-color: var(--primary); background: var(--canvas); transform: translateX(2px); }
.hero-demo-q:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.hero-demo-q .arr { color: var(--primary); font-weight: 700; float: right; }
.hero-demo-foot { font-size: 12px; color: var(--muted); margin: 14px 0 0; }
.hero-demo-foot a { color: var(--primary); font-weight: 600; text-decoration: none; }
.hero-demo-foot a:hover { text-decoration: underline; }

/* 접근성: viz 요소 포커스 가능 + 포커스 링 */
.viz-svg [data-tip]:focus-visible,
.thumb-svg [data-tip]:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.m-related a:focus-visible,
.btn:focus-visible,
.btn-theme:focus-visible,
.brand:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: var(--r-sm); }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 28px; }
  .hero-demo { max-width: 520px; }
}

/* 모션 최소화 선호 대응: 장식 애니메이션·트랜지션 모두 정지 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-eyebrow, .hero h1, .hero-sub, .filters,
  .gallery-section, .coral-band, .site-footer { opacity: 1 !important; transform: none !important; }
  .brand:hover .brand-logo { animation: none !important; }
  .brand:hover .brand-logo-wrap::before,
  .brand:hover .brand-logo-wrap::after { animation: none !important; opacity: 0 !important; }
  .brand:hover .brand-text { animation: none !important; }
  .card:hover { transform: none !important; }
}

/* =====================================================
   Pastel Card 리스킨 (검정 2px 캡슐 + 그레인 + 미세 회전)
   ===================================================== */

/* 그레인 오버레이 */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* 카드: 흰 캡슐 박스 + 검정 2px + 하드 오프셋 그림자 */
.card {
  border: 2px solid var(--outline);
  border-radius: 22px;
  box-shadow: 0 4px 0 rgba(26, 26, 26, 0.10);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--outline);
  box-shadow: 0 9px 0 rgba(26, 26, 26, 0.14);
}
.card-thumb { border-bottom: 2px solid var(--outline); }
.card-num { border: 2px solid var(--outline); background: var(--cat-color); color: var(--outline); }

/* 필터 칩: 카테고리별 파스텔 캡슐 + 균등 폭으로 콘텐츠 가로를 꽉 채움 */
.filter-chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.filter-chips .chip { width: 100%; font-size: 12.5px; padding: 9px 10px; }
.chip { border: 2px solid var(--outline); color: var(--outline); }
.chip-count { border: 2px solid var(--outline); background: var(--canvas); color: var(--outline); min-width: 20px; padding: 2px 6px; }
.chip[data-cat="all"]             { background: var(--coral); }
.chip[data-cat="problem-solving"] { background: var(--cat-problem-solving); }
.chip[data-cat="market"]          { background: var(--cat-market); }
.chip[data-cat="marketing"]       { background: var(--cat-marketing); }
.chip[data-cat="business-model"]  { background: var(--cat-business-model); }
.chip[data-cat="organization"]    { background: var(--cat-organization); }
.chip[data-cat="process"]         { background: var(--cat-process); }
.chip:hover { filter: brightness(1.04); }
.chip[aria-selected="true"] { color: var(--outline); box-shadow: 3px 3px 0 var(--outline); transform: translate(-1px, -1px); }
.chip[aria-selected="true"] .chip-count { background: rgba(255,255,255,0.7); color: var(--outline); }

/* 정렬 버튼 / 검색 입력 / 버튼 / 토글: 캡슐 + 검정 2px */
.sort-btn { border: 2px solid var(--outline); }
.search-input { border: 2px solid var(--outline); border-radius: var(--r-pill); }
.search-input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(232, 93, 78, 0.18); }
.btn-github, .btn-theme { border: 2px solid var(--outline); }
.btn-primary, .btn-on-coral, .btn { border: 2px solid var(--outline); border-radius: var(--r-pill); }

/* 히어로 eyebrow: 라임 캡슐 + 미세 회전 */
.hero-eyebrow {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 2px solid var(--outline);
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--outline);
  transform: rotate(-3deg);
}
.hero-eyebrow::before { display: none; }

/* 히어로 데모 카드: 캡슐 박스 */
.hero-demo { border: 2px solid var(--outline); border-radius: 22px; box-shadow: 0 4px 0 rgba(26,26,26,0.10); }
.hero-demo-q { border: 2px solid var(--outline); border-radius: var(--r-pill); }
.hero-demo-q:hover { background: var(--peach); }

/* 카테고리 카운트 배지 + 모달 */
.cat-head .cat-count { border: 2px solid var(--outline); background: var(--canvas); }
.modal-dialog { border: 2px solid var(--outline); border-radius: 26px; }
.modal-close { border: 2px solid var(--outline); }
.m-related a { border: 2px solid var(--outline); }
.m-ratings { border: 2px solid var(--outline); }
.m-stage .viz { border: 2px solid var(--outline); }

/* 모달 상단 카테고리/번호 pill 버튼 */
.m-cat-row { display: flex; align-items: center; gap: 8px; }
.m-cat-tag, .m-cat-num {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--outline);
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1;
}
.m-cat-tag { padding: 6px 13px; font-size: 12px; color: var(--outline); background: var(--canvas); }
.m-cat-tag[data-cat="problem-solving"] { background: var(--cat-problem-solving); }
.m-cat-tag[data-cat="market"]          { background: var(--cat-market); }
.m-cat-tag[data-cat="marketing"]       { background: var(--cat-marketing); }
.m-cat-tag[data-cat="business-model"]  { background: var(--cat-business-model); }
.m-cat-tag[data-cat="organization"]    { background: var(--cat-organization); }
.m-cat-tag[data-cat="process"]         { background: var(--cat-process); }
.m-cat-num {
  padding: 6px 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  background: var(--coral);
  color: var(--outline);
}

/* 숫자 배지: 템플릿에 맞춰 모든 숫자 폰트를 Bodoni Moda(디스플레이)로 통일 */
.card-num,
.chip-count,
.cat-head .cat-count,
.footer-count,
.m-cat-num {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
}
.card-num, .chip-count, .cat-head .cat-count, .footer-count { font-weight: 700; }
