/* ═══════════ 홈 전용: 브랜드 히어로 + INPACT 육각형 ═══════════ */

.hero-brand {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 2.5rem + 4vw, 7rem) 24px clamp(4rem, 3rem + 4vw, 7rem);
  background:
    radial-gradient(700px 420px at 88% 8%, var(--brand-100), transparent 65%),
    var(--bg);
}

.hero-brand-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-brand h1 {
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -0.035em;
}
.hero-brand h1 em {
  font-style: normal;
  color: var(--brand);
}

.hero-sub b { color: var(--brand-600); }

/* ── 육각형 스테이지 ── */
.hex-wrap { display: grid; gap: 16px; justify-items: center; }

.hex-stage {
  position: relative;
  width: min(100%, 430px);
}
.hex-stage svg { width: 100%; height: auto; }

.hex-outline {
  fill: rgba(255, 255, 255, 0.55);
  stroke: var(--brand-300);
  stroke-width: 2;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: hexDraw 1.6s var(--ease-out-expo) 0.2s forwards;
}
@keyframes hexDraw { to { stroke-dashoffset: 0; } }

/* 레이더 차트 격자 링 */
.hex-grid polygon {
  fill: none;
  stroke: var(--brand-100);
  stroke-width: 1.2;
}

.hex-spokes line {
  stroke: var(--brand-100);
  stroke-width: 1.5;
}

/* 스탯 영역 — 여섯 지표 전부 100% (만렙) */
.hex-stat {
  fill: rgba(78, 85, 236, 0.16);
  stroke: var(--brand);
  stroke-width: 2.5;
  stroke-linejoin: round;
  transform-box: view-box;
  transform-origin: 210px 210px;
  animation:
    hexStatGrow 1.3s var(--ease-out-expo) 0.5s backwards,
    hexStatPulse 3.2s ease-in-out 2s infinite;
}
@keyframes hexStatGrow {
  from { transform: scale(0.08); }
}
@keyframes hexStatPulse {
  0%, 100% { fill: rgba(78, 85, 236, 0.16); }
  50% { fill: rgba(78, 85, 236, 0.26); }
}

.hex-node { cursor: pointer; outline: none; }
.hex-node circle {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.5;
  filter: drop-shadow(0 4px 10px rgba(25, 31, 40, 0.08));
  /* 상태 전환은 즉시 — 프레임이 멈춘 환경에서도 활성 색이 어중간하게 걸리지 않도록 */
  transform-origin: center;
  animation: hexPop 0.6s var(--ease-out-expo) backwards;
}
.hex-node:nth-of-type(1) circle { animation-delay: 0.45s; }
.hex-node:nth-of-type(2) circle { animation-delay: 0.60s; }
.hex-node:nth-of-type(3) circle { animation-delay: 0.75s; }
.hex-node:nth-of-type(4) circle { animation-delay: 0.90s; }
.hex-node:nth-of-type(5) circle { animation-delay: 1.05s; }
.hex-node:nth-of-type(6) circle { animation-delay: 1.20s; }
@keyframes hexPop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

.hex-node text {
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 900;
  fill: var(--ink-sub);
  text-anchor: middle;
  pointer-events: none;
}

.hex-node:hover circle,
.hex-node:focus-visible circle { stroke: var(--brand); }

.hex-node.is-active circle {
  fill: var(--brand);
  stroke: var(--brand);
  animation: hexPulse 2.4s ease-in-out infinite;
}
.hex-node.is-active text { fill: #fff; }
@keyframes hexPulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(78, 85, 236, 0.35)) drop-shadow(0 4px 10px rgba(25, 31, 40, 0.08)); }
  50% { filter: drop-shadow(0 0 14px rgba(78, 85, 236, 0.55)) drop-shadow(0 4px 10px rgba(25, 31, 40, 0.08)); }
}

/* 중앙 오버레이 */
.hex-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.hex-center b {
  font-size: clamp(3rem, 2rem + 4vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
  color: var(--brand);
  letter-spacing: -0.02em;
}
.hex-center span {
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink-sub);
  letter-spacing: 0.04em;
}
.hex-center.is-swap b,
.hex-center.is-swap span { animation: hexSwap 0.45s var(--ease-out-expo); }
/* opacity는 건드리지 않는다 — 렌더 프레임이 멈춘 환경에서도 글자가 사라지지 않도록 */
@keyframes hexSwap {
  from { transform: translateY(12px) scale(0.96); }
  to { transform: none; }
}

/* 캡션 카드 */
.hex-caption {
  width: min(100%, 430px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 16px 20px;
  min-height: 92px;
}
.hex-caption b {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--brand-600);
}
.hex-caption p {
  margin-top: 4px;
  font-size: var(--text-sm);
  color: var(--ink-sub);
}
.hex-caption.is-swap b,
.hex-caption.is-swap p { animation: hexSwap 0.45s var(--ease-out-expo); }

/* ── AI × DATA 밴드 ── */
.ai-band {
  padding: var(--space-section) 24px;
  background:
    radial-gradient(800px 400px at 12% -10%, rgba(169, 173, 247, 0.25), transparent 60%),
    radial-gradient(700px 360px at 92% 110%, rgba(78, 85, 236, 0.35), transparent 60%),
    linear-gradient(160deg, #23263a 0%, #191f28 100%);
  color: #fff;
}
.ai-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--brand-300);
  background: rgba(78, 85, 236, 0.22);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}
.ai-band h2 {
  font-size: var(--text-h2);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.03em;
}
.ai-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ai-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  transition: background var(--duration-normal) ease, transform var(--duration-normal) var(--ease-out-expo);
}
.ai-card:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-4px); }
.ai-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(78, 85, 236, 0.3);
  color: var(--brand-300);
  margin-bottom: 16px;
}
.ai-icon svg { width: 23px; height: 23px; }
.ai-card h3 { font-size: var(--text-h3); font-weight: 800; letter-spacing: -0.01em; }
.ai-card p { margin-top: 8px; font-size: var(--text-sm); color: rgba(255, 255, 255, 0.68); }
.ai-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ── 바로가기 허브 ── */
.hub-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
/* 도구 허브 페이지(카드 3장)는 3열 */
.hub-grid.tools-grid { grid-template-columns: repeat(3, 1fr); }

.hub-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--duration-normal) var(--ease-out-expo),
    box-shadow var(--duration-normal) ease, border-color var(--duration-normal) ease;
}
.hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-card);
}
/* 아이콘: Lucide (lucide.dev, ISC 라이선스) 인라인 SVG */
.hub-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand-50);
  color: var(--brand);
  margin-bottom: 4px;
  transition: background var(--duration-normal) ease;
}
.hub-icon svg { width: 23px; height: 23px; }
.hub-card:hover .hub-icon { background: var(--brand-100); }
.hub-card h3 { font-size: var(--text-h3); font-weight: 800; letter-spacing: -0.01em; }
.hub-card p { font-size: var(--text-sm); color: var(--ink-sub); flex: 1; }
.hub-go { font-size: var(--text-sm); font-weight: 800; color: var(--brand); }

/* ── 결과 섹션 ── */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.result-points {
  margin: 24px 0 28px;
  display: grid;
  gap: 14px;
}
.result-points li {
  font-size: var(--text-base);
  color: var(--ink-sub);
  padding-left: 26px;
  position: relative;
}
.result-points li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 900;
}
.result-points b { color: var(--ink); }

/* ── 무료 도구 배너 ── */
.tool-banner {
  background: linear-gradient(150deg, var(--ink) 0%, #2b3240 100%);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: #fff;
}
.tool-banner-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--brand-300);
  background: rgba(78, 85, 236, 0.22);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
}
.tool-banner h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.35rem, 1.1rem + 1.4vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.tool-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(78, 85, 236, 0.28);
  color: var(--brand-300);
}
.tool-icon svg { width: 23px; height: 23px; }
.tool-banner p {
  margin-top: 12px;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.72);
}
.tool-banner p b { color: #fff; }
.tool-banner .btn { flex-shrink: 0; }
.tool-banner-actions {
  flex-shrink: 0;
  display: grid;
  gap: 12px;
  justify-items: center;
}
.tool-banner-more {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--brand-300);
  transition: color var(--duration-fast) ease;
}
.tool-banner-more:hover { color: #fff; }

/* ── 반응형 ── */
@media (max-width: 1023px) {
  .hero-brand-inner { grid-template-columns: 1fr; }
  .hex-wrap { margin-top: 8px; }
  .hub-grid, .hub-grid.tools-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .tool-banner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 767px) {
  .hub-grid, .hub-grid.tools-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hex-outline { animation: none; stroke-dashoffset: 0; }
  .hex-stat { animation: none; }
  .hex-node circle { animation: none !important; }
  .hex-center.is-swap b, .hex-center.is-swap span,
  .hex-caption.is-swap b, .hex-caption.is-swap p { animation: none; }
}
