/* sections/hero — v2. Base + 2 variants (article | service).
   service variant ships with TRIZ 40-Principles signature grid. */

/* ============================================================
   Base
   ============================================================ */
.hero {
  padding-block: var(--space-16) var(--space-12);
}
.hero__wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--type-xs);
  font-weight: 500;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-6);
}
.hero__eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--color-accent);
}

.hero__title {
  font-size: var(--type-2xl);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.005em;
  word-break: keep-all;
  text-wrap: balance;
  margin-bottom: var(--space-6);
  color: var(--color-text);
}
@media (min-width: 768px) {
  .hero__title { font-size: var(--type-3xl); }
}
/* subtitle이 있으면 title 하단 여백을 줄여 타이트하게 */
.hero__title:has(+ .hero__subtitle) {
  margin-bottom: var(--space-3);
}

.hero__subtitle {
  font-size: var(--type-lg);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--color-accent);
  margin-bottom: var(--space-6);
  max-width: var(--measure);
  word-break: keep-all;
  text-wrap: balance;
}

.hero__lead {
  font-size: var(--type-md);
  line-height: var(--leading-snug);
  color: var(--color-muted);
  max-width: var(--measure);
  word-break: keep-all;
  text-wrap: pretty;
}

/* ============================================================
   Variant: hero--article (blog/insights)
   ============================================================ */
.hero--article .hero__lead { margin-bottom: var(--space-8); }

.hero--article .hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  padding-block: var(--space-4);
  margin-bottom: var(--space-12);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--type-sm);
}
.hero--article .hero__meta-item { display: flex; gap: var(--space-2); align-items: baseline; }
.hero--article .hero__meta dt { color: var(--color-subtle); font-weight: 500; }
.hero--article .hero__meta dd { color: var(--color-text); font-weight: 500; }

.hero--article .hero__figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}
.hero--article .hero__figure img {
  width: 100%; height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  display: block;
}
.hero--article .hero__caption {
  margin-top: var(--space-3);
  font-size: var(--type-xs);
  color: var(--color-subtle);
  text-align: center;
  font-style: italic;
}

/* ============================================================
   Variant: hero--service — split with 40-Principles signature
   ============================================================ */
.hero--service {
  padding-block: var(--space-20) var(--space-24);
  border-bottom: 1px solid var(--color-border);
}
.hero--service .hero__wrap {
  max-width: var(--wrap-wide);
  display: grid;
  gap: var(--space-12);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 1000px) {
  .hero--service .hero__wrap {
    grid-template-columns: 1.15fr 1fr;
    gap: var(--space-16);
    align-items: start;
  }
}

.hero--service .hero__content { max-width: 620px; }

/* hero__media: image slot replacing .hero__signature on pages that
   prefer a photograph (강연 현장 등) over typographic signature */
.hero__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero__media-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-6) var(--space-6);
  background: linear-gradient(180deg, transparent, rgba(15, 17, 20, 0.75));
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--type-xs);
  letter-spacing: .04em;
}

/* ─ text-only 변형 (우측 시그니처 없는 페이지): hero--service와 동일 컨테이너·동일 H1 크기.
   grid를 단일 컬럼으로만 변경해서 타이틀 위치·크기가 모든 서비스 페이지에서 동일하게 ─ */
.hero--service.hero--text-only .hero__wrap {
  grid-template-columns: 1fr;
}
@media (min-width: 1000px) {
  .hero--service.hero--text-only .hero__wrap {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Variant: hero--landing (홈 전용, 전폭 편집 잡지 스타일)
   ============================================================ */
.hero--landing {
  padding-block: var(--space-20) var(--space-24);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero--landing { padding-block: var(--space-24) var(--space-32); }
}
/* 홈은 카테고리 스트라이프 없음 — 자체적 정체성 */
.hero--landing::before { content: none !important; }

/* 우측 상단 서브틀 라디얼 장식 */
.hero--landing::after {
  content: "";
  position: absolute;
  right: -200px;
  top: -100px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--color-accent-soft) 0%, transparent 60%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.hero--landing .hero__wrap {
  max-width: 1280px;
  padding-inline: var(--space-6);
  display: block;
  position: relative;
  z-index: 1;
}

.hero--landing .hero__content { max-width: 960px; }

.hero--landing .hero__eyebrow {
  margin-bottom: var(--space-6);
}

.hero--landing .hero__title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-8);
}
@media (min-width: 768px)  { .hero--landing .hero__title { font-size: 72px; } }
@media (min-width: 1200px) { .hero--landing .hero__title { font-size: 96px; } }
@media (min-width: 1400px) { .hero--landing .hero__title { font-size: 108px; } }

.hero--landing .hero__lead {
  font-size: 18px;
  line-height: 1.55;
  max-width: 740px;
  margin-bottom: var(--space-12);
}
@media (min-width: 768px) {
  .hero--landing .hero__lead { font-size: 22px; margin-bottom: var(--space-16); }
}

.hero--landing .hero__actions {
  margin-bottom: var(--space-16);
}

/* Category links — 홈 히어로에서 카테고리 진입 CTA.
   program-showcase 탭(pill+accent fill)과 혼동 방지: rounded-rect 카드 + 화살표. */
.hero__categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.hero__category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: var(--type-base);
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color var(--motion-fast) var(--ease-out),
              transform var(--motion-fast) var(--ease-out),
              box-shadow var(--motion-fast) var(--ease-out);
}
.hero__category::after {
  content: '→';
  color: var(--color-accent);
  font-weight: 500;
  transition: transform var(--motion-fast) var(--ease-out);
}
.hero__category:hover {
  border-color: var(--color-accent);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(184, 92, 46, 0.08);
}
.hero__category:hover::after {
  transform: translateX(3px);
}
@media (min-width: 768px) {
  .hero__category {
    padding: 16px 26px;
  }
}

/* 홈 H1 줄바꿈: 모바일 컴팩트를 위해 좁은 화면에서 br 숨김 → balance 작동 */
.hero__title-break { display: inline; }
@media (min-width: 560px) {
  .hero__title-break { display: none; }
}

/* 대형 stats row */
.hero--landing .hero__quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  max-width: 960px;
  align-items: baseline;
}
@media (min-width: 768px) {
  .hero--landing .hero__quick-stats {
    gap: var(--space-12);
    padding-top: var(--space-12);
  }
}
.hero--landing .hero__stat-value {
  font-size: 36px;
}
@media (min-width: 768px) { .hero--landing .hero__stat-value { font-size: 56px; } }
@media (min-width: 1200px) { .hero--landing .hero__stat-value { font-size: 72px; } }

.hero--landing .hero__stat-label {
  font-family: var(--font-mono);
  font-size: var(--type-xs);
  margin-top: var(--space-2);
}

/* ─ 카테고리별 상단 액센트 스트라이프 (일관성 축: 패턴, 다양성 축: 색) ─ */
[data-category] .hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
[data-category] .hero { position: relative; }

[data-category="home"]       .hero::before { background: var(--color-text); }
[data-category="education"]  .hero::before { background: var(--color-accent); }
[data-category="consulting"] .hero::before { background: var(--color-accent-hover); }
[data-category="products"]   .hero::before { background: var(--color-text); }
[data-category="about"]      .hero::before { background: var(--color-border-strong); }
[data-category="insight"]    .hero::before { background: var(--color-accent-soft); filter: contrast(1.2); }
[data-category="contact"]    .hero::before { background: var(--color-border-strong); }

/* ─ 페이지 타입별 Hero 배경 규정 (data-level) ─
   home: .hero--landing 변형의 자체 그라디언트 유지
   hub · sub: 모두 동일 cream(--color-bg) — 일관성 우선.
   hero 바로 다음 첫 섹션은 항상 section--muted 라 자연스러운 대비가 생김. */
[data-level="hub"] .hero,
[data-level="sub"] .hero {
  background: var(--color-bg);
}

.hero--service .hero__title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-6);
}
@media (min-width: 768px)  { .hero--service .hero__title { font-size: 56px; } }
@media (min-width: 1200px) { .hero--service .hero__title { font-size: 72px; } }

.hero--service .hero__lead {
  font-size: var(--type-md);
  margin-bottom: var(--space-8);
  max-width: 56ch;
}
@media (min-width: 768px) { .hero--service .hero__lead { font-size: 20px; } }

.hero--service .hero__actions {
  display: flex; flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-12);
}

.hero--service .hero__quick-stats {
  display: flex; flex-wrap: wrap;
  gap: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}
.hero--service .hero__stat { display: flex; flex-direction: column; gap: 4px; }
.hero--service .hero__stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--color-text);
  font-feature-settings: "tnum", "lnum";
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1;
  letter-spacing: -0.01em;
}
.hero--service .hero__stat-suffix {
  font-family: var(--font-sans);
  font-size: var(--type-sm);
  font-weight: 500;
  color: var(--color-muted);
  margin-left: 2px;
}
.hero--service .hero__stat-label {
  font-family: var(--font-mono);
  font-size: var(--type-xs);
  color: var(--color-subtle);
  letter-spacing: 0.04em;
}

/* ── 40 Principles Grid (signature) ──────────────────────── */
.hero__signature {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.principles-caption {
  font-family: var(--font-mono);
  font-size: var(--type-xs);
  color: var(--color-muted);
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.principles-caption strong {
  color: var(--color-text);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: var(--type-sm);
  letter-spacing: 0;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.principle {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-subtle);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  cursor: default;
  position: relative;
  transition: background var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out);
}
.principle:hover { background: var(--color-surface); color: var(--color-text); }
.principle--featured {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 700;
}
.principle--featured:hover { background: var(--color-accent); color: #fff; }

/* Tooltip on featured (CSS-only) */
.principle__name {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-fast) var(--ease-out);
  z-index: 10;
}
.principle:hover .principle__name { opacity: 1; }

@media (max-width: 600px) {
  .principles-grid { grid-template-columns: repeat(10, 1fr); }
  .principle { font-size: 11px; }
  .principle__name { display: none; }
}
