/* ============================================
   R&BD Partners — style.css
   전체 공통 스타일 정의
   ============================================ */

/* ── 0. 웹폰트 ────────────────────────────── */
/* Pretendard: 공식 CDN의 Variable + dynamic-subset 사용.
   unicode-range로 사용되는 글자만 subset을 다운로드해
   합계 ~200KB 수준으로 줄임 (기존 직접 로딩 ~3MB 대비 93% 감소). */
@import url('https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css');

@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-1Thin.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-2ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-3Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-5Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-6SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-9Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

/* ── 1. CSS 변수 ───────────────────────────── */
:root {
  --color-bg-dark: #0a0e1a;
  --color-bg-light: #ffffff;
  --color-bg-mid: #f0f4ff;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-text-dark: #e8edf8;
  --color-text-light: #1a2340;
  --color-text-muted: #6b7fa8;
  --color-border-dark: #1a2340;
  --color-border-light: #dce6f0;

  --font-primary: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
  --font-title: 'Paperozi', sans-serif;
  --max-width: 1200px;
  --nav-height: 64px;
}

/* ── 2. Reset / Base ───────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-light);
  background: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
}

/* 제목 및 탭 요소에 페이퍼로지 적용 */
h1, h2, h3, h4, h5, h6,
.nav__logo,
.nav__link,
.section__title,
.hero__title,
.project-header__title,
.stage-title,
.activity-title,
.filter-tab,
.side-nav__item a,
.mobile-toc summary,
.gallery-section__title,
.gallery-proj-card__title,
.gallery-method-card__title,
.btn-primary,
.btn-outline,
.btn-primary-sm,
.footer__name {
  font-family: var(--font-title);
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── 3. 레이아웃 유틸 ──────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── 4. NAV ────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg-dark);
  border-bottom: 1px solid var(--color-border-dark);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}
.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-dark);
  letter-spacing: -0.02em;
}
.nav__logo span { color: var(--color-primary); }
.nav__menu { display: flex; align-items: center; gap: 32px; }
.nav__link {
  color: var(--color-text-dark);
  font-size: 0.9375rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav__link:hover { opacity: 1; color: var(--color-text-dark); }
.nav__link--cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 6px;
  opacity: 1 !important;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s;
}
.nav__link--cta:hover { background: var(--color-primary-hover); }
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav__hamburger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-active span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__mobile {
  display: none;
  flex-direction: column;
  background: var(--color-bg-dark);
  border-top: 1px solid var(--color-border-dark);
  position: absolute;
  top: var(--nav-height);
  left: 0; right: 0;
  padding: 16px 24px 24px;
  gap: 4px;
  z-index: 999;
}
.nav__mobile.is-open { display: flex; }
.nav__mobile .nav__link { padding: 10px 0; border-bottom: 1px solid var(--color-border-dark); font-size: 1rem; }
.nav__mobile .nav__link--cta { margin-top: 8px; text-align: center; border-bottom: none; }

/* ── 5. FOOTER ─────────────────────────────── */
.footer {
  background: var(--color-bg-dark);
  color: var(--color-text-dark);
  padding: 48px 0;
  border-top: 1px solid var(--color-border-dark);
}
.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer__name { font-size: 1rem; font-weight: 700; }
.footer__info { font-size: 0.875rem; color: var(--color-text-muted); line-height: 1.4; }
.footer__copy { font-size: 0.8125rem; color: var(--color-text-muted); margin-top: 4px; }

/* ── 6. 버튼 ───────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--color-primary-hover); color: #fff; transform: translateY(-1px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--color-text-dark);
  font-size: 1rem;
  font-weight: 600;
  padding: 13px 27px;
  border-radius: 8px;
  border: 1.5px solid rgba(232, 237, 248, 0.35);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn-outline:hover {
  border-color: rgba(232, 237, 248, 0.7);
  background: rgba(232, 237, 248, 0.06);
  color: var(--color-text-dark);
  transform: translateY(-1px);
}

.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.btn-primary-sm:hover { background: var(--color-primary-hover); color: #fff; }

/* ── 7. 섹션 패턴 ──────────────────────────── */
.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-dark);
  padding: 80px 0;
}
.section-light {
  background: var(--color-bg-light);
  color: var(--color-text-light);
  padding: 80px 0;
}
.section-mid {
  background: var(--color-bg-mid);
  color: var(--color-text-light);
  padding: 80px 0;
}
.section__label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.section__title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.section__sub {
  font-size: 1.0625rem;
  line-height: 1.85;
  max-width: 640px;
  color: var(--color-text-muted);
}

/* ── 8. 태그 ───────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-primary);
}
.tag--dark {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}

/* ── 9. 이미지 블록 ─────────────────────────── */
.img-block {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin: 2rem 0;
  border: 1px solid var(--color-border-light);
}
.img-block img {
  width: 100%;
  height: auto;
  display: block;
}
.img-caption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 10px 16px;
  background: var(--color-bg-mid);
}
.img-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
@media (max-width: 768px) { .img-grid-2 { grid-template-columns: 1fr; } }

/* ── 9-1. 미디어 공통 (프로젝트·방법론) ────── */
.media--hero,
.media--pair,
.media--fluid {
  margin: 2rem 0;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  overflow: hidden;
  padding: 8px;
}

/* hero: 1열, 3:2 */
.media--hero img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

/* pair: 2열, 4:3 */
.media--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.media--pair img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}
.media--pair .media__caption {
  grid-column: 1 / -1;
  text-align: center;
}

/* fluid: 원본 비율 유지 */
.media--fluid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* 미디어 캡션 */
.media__caption {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 8px;
  padding: 0 4px;
  text-align: center;
}
.stage-section--dark .media--hero,
.stage-section--dark .media--pair,
.stage-section--dark .media--fluid {
  border-color: #2a3555;
  background: #111827;
}

@media (max-width: 768px) {
  .media--hero img { aspect-ratio: 4/3; }
  .media--pair {
    grid-template-columns: 1fr;
  }
  .media--pair img { aspect-ratio: 3/2; }
}

/* ── 10. 프로젝트 헤더 ─────────────────────── */
.project-header {
  background: var(--color-bg-dark);
  color: var(--color-text-dark);
  padding: 80px 0 64px;
}
.project-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.project-header__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.project-header__year { font-size: 0.9375rem; color: var(--color-text-muted); }
.project-header__title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.project-header__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}
.project-header__tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── 11. 프로젝트 레이아웃 (사이드 네비) ───── */
.project-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px;
  align-items: start;
}
.side-nav {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}
.side-nav__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-light);
}
.side-nav__list { display: flex; flex-direction: column; gap: 4px; }
.side-nav__item a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  transition: color 0.2s, background 0.2s;
}
.side-nav__item a:hover,
.side-nav__item.is-active a {
  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.07);
}
.side-nav__item.is-active a { font-weight: 600; }

/* 모바일 목차 */
.mobile-toc {
  display: none;
  margin: 0 24px 8px;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  overflow: hidden;
}
.mobile-toc summary {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-bg-mid);
}
.mobile-toc summary::after { content: '▾'; font-size: 0.875rem; }
.mobile-toc[open] summary::after { content: '▴'; }
.mobile-toc__list { padding: 8px 0; background: var(--color-bg-light); }
.mobile-toc__list li a {
  display: block;
  padding: 10px 18px;
  color: var(--color-text-light);
  font-size: 0.9375rem;
}
.mobile-toc__list li a:hover { color: var(--color-primary); }

/* ── 12. Stage / Activity 섹션 ─────────────── */
.stage-section {
  padding: 64px 24px;
  border-bottom: 1px solid var(--color-border-light);
}
.stage-section::after { content: ''; display: table; clear: both; }
.stage-section:last-of-type { border-bottom: none; }

.stage-header {
  margin-bottom: 48px;
}
.stage-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.stage-title {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-light);
}

/* Activity 소섹션 */
.activity-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.activity-section:last-child { border-bottom: none; padding-bottom: 0; }

.activity-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: 1.2rem;
  padding-left: 16px;
  border-left: 3px solid var(--color-primary);
}

.activity-section p {
  color: var(--color-text-light);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.85;
}

.activity-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.5rem;
}

/* 다크 배경 내 텍스트 */
.stage-section--dark {
  background: var(--color-bg-dark);
}
.stage-section--dark .stage-label {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
}
.stage-section--dark .stage-title { color: var(--color-text-dark); }
.stage-section--dark .activity-title { color: var(--color-text-dark); }
.stage-section--dark .activity-section { border-bottom-color: var(--color-border-dark); }
.stage-section--dark .activity-section p { color: #c8d4ec; }

/* activity-section 내 이미지 기본 스타일 */
.activity-section img { width: 100%; border-radius: 8px; object-fit: cover; }

.stage-section--dark .img-block { border-color: var(--color-border-dark); }
.stage-section--dark .img-caption { background: #111827; color: var(--color-text-muted); }

/* 결과 카드 (성과 섹션용) */
.result-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 2rem 0;
}
.result-card {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.result-card__num {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.03em;
}
.result-card__label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}
@media (max-width: 768px) { .result-cards { grid-template-columns: 1fr 1fr; } }

/* ── 13. 프로젝트 하단 네비 ────────────────── */
.project-nav {
  background: var(--color-bg-dark);
  padding: 48px 0;
}
.project-nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.project-nav__arrow {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  transition: color 0.2s;
}
.project-nav__arrow:hover { color: var(--color-text-dark); }

/* ── 14. 필터 탭 & 카드 그리드 ─────────────── */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filter-tab {
  background: var(--color-bg-mid);
  border: 1.5px solid var(--color-border-light);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-tab.is-active, .filter-tab:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.project-card {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.10);
  transform: translateY(-2px);
  color: inherit;
}
.project-card__client { font-size: 0.9375rem; font-weight: 700; color: var(--color-text-light); }
.project-card__product { font-size: 0.875rem; color: var(--color-text-muted); line-height: 1.5; }
.project-card__year { font-size: 0.8125rem; color: var(--color-text-muted); margin-top: auto; }

/* ── 15. 그리드 유틸 ───────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }

/* ── 서비스 카드 ─────────────────────────── */
.service-card {
  position: relative;
  height: 380px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  background: var(--color-bg-dark);
}

.service-card:hover {
  transform: translateY(-8px);
}

.service-card__bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}

/* 서비스 카드별 배경 이미지 (Unsplash 고해상도 이미지 적용) */
.service-card--consulting .service-card__bg { 
  background-image: linear-gradient(rgba(10, 14, 26, 0.4), rgba(10, 14, 26, 0.95)), 
  url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&q=80&w=800'); 
}
.service-card--methodology .service-card__bg { 
  background-image: linear-gradient(rgba(10, 14, 26, 0.4), rgba(10, 14, 26, 0.95)), 
  url('https://images.unsplash.com/photo-1531482615713-2afd69097998?auto=format&fit=crop&q=80&w=800'); 
}
.service-card--ai .service-card__bg { 
  background-image: linear-gradient(rgba(10, 14, 26, 0.4), rgba(10, 14, 26, 0.95)), 
  url('https://images.unsplash.com/photo-1677442136019-21780ecad995?auto=format&fit=crop&q=80&w=800'); 
}

.service-card:hover .service-card__bg {
  transform: scale(1.1);
}

.service-card__content {
  position: relative;
  z-index: 2;
  color: #fff;
}

.service-card__title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.service-card__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  opacity: 0.85;
}

.service-card:hover .service-card__desc {
  opacity: 1;
  color: #fff;
}

@media (max-width: 768px) {
  /* NAV 반응형 */
  .nav__menu { display: none; }
  .nav__hamburger { display: flex; }

  .service-card { height: 320px; padding: 24px; }
  .service-card__title { font-size: 1.25rem; }
}

/* ── 17. HERO ──────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 800px;
  background: var(--color-bg-dark);
  color: var(--color-text-dark);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero__bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1; /* 히어로 섹션 내의 가장 하단 배경 */
  pointer-events: auto; /* 마우스 추적을 위해 이벤트 허용 */
}

.hero__bg iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
}

/* 워터마크 가리기 및 텍스트 가독성을 위한 그라데이션 */
.hero__mask {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  /* 전체적으로 반투명 블랙을 깔고, 하단 10%를 완전 불투명 처리 */
  background: linear-gradient(to bottom, 
    rgba(10, 14, 26, 0.5) 0%, 
    rgba(10, 14, 26, 0.3) 40%, 
    rgba(10, 14, 26, 0.4) 70%, 
    rgba(10, 14, 26, 1) 90%, 
    rgba(10, 14, 26, 1) 100%
  );
  pointer-events: none; /* 마우스가 통과해서 iframe으로 가도록 */
  z-index: 2;
}

.hero__inner {
  position: relative;
  z-index: 3; /* 텍스트와 버튼이 iframe 위로 올라옴 */
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none; /* 본문 영역 빈틈에서 마우스가 iframe을 볼 수 있게 함 */
}

.hero__content {
  max-width: 900px;
  margin-top: -100px;
  pointer-events: auto; /* 텍스트 영역 내에서는 스크롤 가능 */
}

.hero__eyebrow {
  font-family: var(--font-title);
  font-size: 0.9375rem; /* 조금 축소 */
  font-weight: 600; /* 두께 완화 */
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85); /* 파란색에서 부드러운 흰색으로 변경 */
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

.hero__title {
  font-family: var(--font-title);
  font-weight: 800; /* 900에서 800으로 하향 */
  font-size: clamp(1.8rem, 4.4vw, 2.8rem); /* 80% 수준으로 축소 */
  line-height: 1.27; /* 1.15에서 10% 증가 */
  letter-spacing: -0.01em; /* 기존 -0.04em에서 여유 있게 조정 */
  margin-bottom: 28px;
  color: #ffffff;
  /* 검정색 네온 글로우 효과 유지하되 강도 조절 */
  text-shadow: 
    0 0 10px rgba(0, 0, 0, 0.8),
    0 0 25px rgba(0, 0, 0, 0.5);
}

.hero__sub {
  font-size: 1.125rem; /* 1.25에서 축소 */
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  max-width: 620px;
  margin-bottom: 44px;
  font-weight: 400; /* 본문 두께 완화 */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.hero__eyebrow,
.hero__title,
.hero__sub {
  pointer-events: auto; /* 텍스트 선택 가능 */
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  pointer-events: auto; /* 버튼 클릭 가능 */
}

/* 히어로 하단 통계 오버레이 */
.hero__stats {
  position: absolute;
  bottom: 60px;
  left: 24px;
  right: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 36px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  pointer-events: auto; /* 통계 카드는 상호작용 가능 */
  z-index: 4;
}

.hero__stat-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero__stat-num {
  font-family: var(--font-title);
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.hero__stat-label {
  font-size: 0.95rem;
  color: rgba(232, 237, 248, 0.62);
  line-height: 1.45;
  font-weight: 600;
}

.hero__stat-item--highlight .hero__stat-num {
  color: var(--color-primary);
  text-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

/* ── 18. 반응형 ─────────────────────────────── */
@media (max-width: 1024px) {
  .hero__stats {
    grid-template-columns: repeat(3, 1fr);
    bottom: 40px;
  }
}

@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 100vh;
    padding: 120px 0 100px;
  }
  .hero__content { margin-top: 0; }
  .hero__stats {
    position: static;
    margin-top: 80px;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 20px;
  }

  /* 프로젝트/방법론 레이아웃 모바일 */
  .project-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }
  .side-nav { display: none; }
  .mobile-toc { display: block; }
  .project-header__title { font-size: 1.75rem; }
  .project-header__subtitle { font-size: 1rem; }
  .stage-section { padding: 48px 20px; }
}

@media (max-width: 480px) {
  .hero__stats {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ══════════════════════════════════════════
   공통 갤러리 섹션
══════════════════════════════════════════ */
.gallery-section {
  background: var(--color-bg-dark);
  padding: 80px 0;
}
.gallery-section--method {
  background: var(--color-bg-dark);
}
.gallery-section__header {
  margin-bottom: 40px;
}
.gallery-section__title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text-dark);
  margin-top: 8px;
}
.gallery-section__cta {
  text-align: center;
  margin-top: 48px;
}

/* ── 프로젝트 갤러리 카드 ──────────────── */
.gallery-proj-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 8px;
}

.gallery-proj-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.gallery-proj-card:hover {
  transform: translateY(-4px);
  border-color: #374151;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

/* ── 갤러리 카드 (gcard) — 컨설팅펌 스타일 ── */
.gcard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gcard {
  display: flex;
  flex-direction: column;
  background: #111827;
  border: 1px solid #1e293b;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.gcard:hover {
  transform: translateY(-4px);
  border-color: #334155;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.gcard__upper {
  padding: 24px 24px 18px;
  margin: 0 24px;
  padding-left: 0;
  padding-right: 0;
  border-bottom: 1px solid #1e293b;
}
.gcard__title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.4;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.gcard__meta {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}
.gcard__lower {
  padding: 18px 24px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.gcard__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.gcard__tag {
  font-size: 0.675rem;
  font-weight: 600;
  padding: 2px 9px;
  border: 1px solid;
  border-radius: 100px;
  letter-spacing: 0.02em;
  line-height: 1.6;
}
.gcard__desc {
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.65;
  margin: 0;
  flex: 1;
}


.gallery-proj-card__desc {
  font-size: 0.8125rem;
  color: #6b7fa8;
  line-height: 1.6;
  margin: 4px 0 0;
  flex: 1;
}

/* ── 방법론 갤러리 카드 ───────────────── */
.gallery-method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-method-card {
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.gallery-method-card:hover {
  transform: translateY(-4px);
  border-color: #374151;
  box-shadow: 0 16px 48px rgba(0,0,0,0.45);
}

.gallery-method-card__head {
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.gallery-method-card__abbr {
  font-family: var(--font-title);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.85;
}
.gallery-method-card__title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-text-dark);
  margin: 0;
}
.gallery-method-card__sub {
  font-family: var(--font-title);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  color: #9ca3af;
  margin: 2px 0 0;
  letter-spacing: 0.01em;
}

.gallery-method-card__body {
  padding: 22px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gallery-method-card__points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.gallery-method-card__point {
  position: relative;
  padding-left: 20px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #cbd5e1;
  font-weight: 400;
}
.gallery-method-card__point::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 2px;
  background: #64748b;
}
.gallery-method-card:hover .gallery-method-card__point::before {
  background: currentColor;
  opacity: 0.6;
}
.gallery-method-card__cta {
  font-family: var(--font-title);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: auto;
  padding-top: 4px;
  opacity: 0.9;
  transition: transform 0.2s;
}
.gallery-method-card:hover .gallery-method-card__cta {
  transform: translateX(4px);
}

/* ── 반응형 ──────────────────────────── */
@media (max-width: 1280px) {
  .gcard-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .gcard-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-method-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .gcard-grid { grid-template-columns: 1fr; }
  .gallery-method-grid { grid-template-columns: 1fr; }
  .gallery-section__title { font-size: 1.5rem; }
  .gcard__content { padding: 20px 18px 16px; }
  .gcard__title { font-size: 1rem; }
}

/* ============================================
   Methodology page — slide image embeds
   ============================================ */
.slide-figure {
  margin: 32px 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-bg-mid);
  box-shadow: 0 12px 40px -16px rgba(26, 35, 64, 0.28);
}
.slide-figure img { display: block; width: 100%; height: auto; }
.slide-figure figcaption {
  padding: 14px 18px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border-light);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.slide-figure--full  { max-width: 880px; margin-left: auto; margin-right: auto; }
.slide-figure--wide  { max-width: 1040px; margin-left: auto; margin-right: auto; }
.slide-figure--inset { max-width: 720px; margin-left: auto; margin-right: auto; }
.slide-figure--right { float: right; width: 50%; margin: 8px 0 24px 32px; }
.slide-figure--left  { float: left;  width: 50%; margin: 8px 32px 24px 0; }
.activity-section::after { content: ''; display: table; clear: both; }

/* Shared aliases so custom-named figures from early drafts match visual rules */
.sec-figure, .ci-figure, .md-inset, .tt-inset {
  margin: 32px auto;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-bg-mid);
  box-shadow: 0 12px 40px -16px rgba(26, 35, 64, 0.28);
  max-width: 720px;
}
.sec-figure img, .ci-figure img, .md-inset img, .tt-inset img {
  display: block; width: 100%; height: auto;
}
.sec-figure figcaption, .ci-figure figcaption, .md-inset figcaption, .tt-inset figcaption,
.ci-figure__cap, .md-inset__cap, .tt-inset__cap {
  padding: 14px 18px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border-light);
  font-weight: 500;
}
.sec-figure--full, .ci-figure--full, .md-inset--full, .tt-inset--full { max-width: 880px; }
.sec-figure--left, .md-inset--left, .tt-inset--left,
.sec-figure--inset-left { float: left; width: 50%; max-width: 50%; margin: 8px 32px 24px 0; }
.sec-figure--inset, .sec-figure--right, .ci-figure--right, .md-inset--right, .tt-inset--right {
  max-width: 720px; margin-left: auto; margin-right: auto;
}

.method-hero-band {
  margin: 32px auto 8px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0e1a 0%, #1a2340 100%);
  position: relative;
  max-width: 1040px;
}
.method-hero-band img { display: block; width: 100%; height: auto; }

.callout {
  margin: 24px 0;
  padding: 22px 26px;
  background: var(--color-bg-mid);
  border-left: 4px solid var(--color-primary);
  border-radius: 4px;
}
.callout__label {
  font-family: 'Paperozi', sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 6px;
}
.callout__text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-light);
  margin: 0;
}

.perspective-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  clear: both;
}
.perspective-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-left: 4px solid var(--color-primary);
  border-radius: 4px;
  align-items: start;
}
.perspective-list li::before {
  content: counter(pl);
  counter-increment: pl;
  font-family: 'Paperozi', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--color-primary);
  line-height: 1;
}
.perspective-list { counter-reset: pl; }
.perspective-list strong {
  display: block;
  font-family: 'Paperozi', sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--color-text-light);
  margin-bottom: 6px;
}

@media (max-width: 860px) {
  .slide-figure--right, .slide-figure--left,
  .sec-figure--left, .sec-figure--inset-left,
  .md-inset--left, .tt-inset--left { float: none; width: 100%; max-width: 100%; margin: 32px 0; }
  .slide-figure--full, .slide-figure--wide, .slide-figure--inset,
  .sec-figure, .ci-figure, .md-inset, .tt-inset,
  .method-hero-band { max-width: 100%; }
  .perspective-list li { grid-template-columns: 1fr; }
  .perspective-list li::before { margin-bottom: 4px; }
}

/* ============================================
   "R&BD가 일 하는 방법" 섹션
   방법론 페이지 하단 — 3 tools x 1 project stage
   ============================================ */
.rnbd-practice {
  padding: 64px 24px;
  background: var(--color-bg-dark);
  color: var(--color-text-dark);
}
.rnbd-practice__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.rnbd-practice__eyebrow {
  font-family: 'Paperozi', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 14px;
}
.rnbd-practice__title {
  font-family: 'Paperozi', sans-serif;
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #fff;
}
.rnbd-practice__lead {
  font-size: 1rem;
  line-height: 1.7;
  color: #b0bfe0;
  max-width: 760px;
  margin-bottom: 48px;
}
.rnbd-practice__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.rnbd-tool {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.rnbd-tool:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}
.rnbd-tool__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0f1525;
  position: relative;
}
.rnbd-tool__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.rnbd-tool__stage {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 12px;
  background: var(--color-primary);
  color: #fff;
  font-family: 'Paperozi', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
}
.rnbd-tool__body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.rnbd-tool__chip {
  font-family: 'Paperozi', sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  color: #60a5fa;
  text-transform: uppercase;
}
.rnbd-tool__name {
  font-family: 'Paperozi', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #fff;
}
.rnbd-tool__project {
  font-size: 0.875rem;
  color: #94a3c8;
  letter-spacing: 0.02em;
}
.rnbd-tool__desc {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #d0d9ee;
  margin-top: 4px;
}
.rnbd-tool__link {
  margin-top: auto;
  padding-top: 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #60a5fa;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.rnbd-tool__link:hover { color: #93c5fd; }
.rnbd-tool__link::after { content: ' →'; }

@media (max-width: 860px) {
  .rnbd-practice { padding: 48px 20px; }
  .rnbd-practice__title { font-size: 1.75rem; }
  .rnbd-practice__grid { grid-template-columns: 1fr; gap: 20px; }
}
