@charset "UTF-8";

/* ============================================================
   Page Hero：装飾動画（friendwalker2 も WORKS と同じく透過を強める）
   共通の .page-hero-media（opacity:1）を上書き。
============================================================ */
.page-hero--media .page-hero-media {
  opacity: 0.4;
}

/* ============================================================
   Hero 追加分
============================================================ */
/* F-Walk ロゴ（ヒーロー上部のアクセント） */
/* ヒーローの大タイトルを F-Walk ロゴに差し替え */
.fw-hero-logo-title {
  margin: 0.5rem 0 0;
  line-height: 1;
}
.fw-hero-logo-title img {
  display: block;
  width: clamp(240px, 42vw, 600px);
  height: auto;
  filter: drop-shadow(0 10px 26px rgba(20, 55, 140, 0.28));
}

.fw-hero-lead {
  margin-top: 1.5rem;
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  color: var(--color-text-mid);
  line-height: 2;
  max-width: 620px;
}

/* ============================================================
   Section
============================================================ */
/* パーティクル背景を透かすため半透明に */
.fw-section { background: rgba(239, 245, 255, 0.55); }

/* 見出し行 */
.fw-graph-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
/* グラフ見出しに使う section-head はバナー幅を内容に合わせ、下マージンを消す */
.fw-graph-head-title.section-head {
  margin-bottom: 0;
  flex: 1 1 auto;
}

.fw-graph-title {
  font-family: var(--font-ja);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
}

/* コントロールボタン */
.fw-controls {
  display: flex;
  gap: 0.5rem;
}
.fw-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 1rem;
  border-radius: 100px;
  border: 1px solid var(--color-border-mid);
  background: var(--color-bg-card);
  color: var(--color-text-mid);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}
.fw-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(21,83,216,0.08);
}

/* 凡例 */
.fw-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.fw-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-mid);
}
.fw-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}
.fw-dot-dashed {
  background: transparent !important;
  border: 1.5px dashed var(--color-text-muted);
  box-shadow: none;
}

/* ============================================================
   Graph Canvas
============================================================ */
.fw-graph-wrap {
  position: relative;
}

.fw-graph-canvas {
  position: relative;
  width: 100%;
  height: clamp(480px, 68vh, 720px);
  border-radius: var(--radius-lg);
  border: 0px solid var(--color-border);
  overflow: hidden;
  /* 宇宙空間（Starfield）の下地：濃紺 */
  background: #050a1a;
}
/* グラフ背景動画（最背面）。白ベール(::before)がこの上に乗って透過感を出す */
.fw-graph-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.4;          /* 動画自体の透過（さらに白ベールで淡くなる） */
  pointer-events: none;
}
/* 白ベール：動画の上に重ね、従来どおりの淡い透過感を出す
   （ノード/文字の可読性を確保しつつ宇宙をうっすら透かす） */
.fw-graph-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(244, 247, 255, 0.75);
  pointer-events: none;
}
/* SVG は最前面 */
#fw-svg { z-index: 2; }

#fw-svg {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}
#fw-svg:active { cursor: grabbing; }

.fw-hint {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* ------ D3 描画要素 ------ */
.fw-link {
  fill: none;
  stroke: rgba(20,55,140,0.30);
  stroke-width: 1.5px;
  transition: stroke 0.2s ease, stroke-width 0.2s ease;
}
.fw-link.is-active {
  stroke: var(--color-accent);
  stroke-width: 2.5px;
}
.fw-link.is-dim { stroke: rgba(20,55,140,0.07); }

.fw-node { cursor: pointer; }

.fw-node-shape {
  stroke: rgba(255,255,255,0.25);
  stroke-width: 2px;
  transition: filter 0.25s ease, stroke 0.2s ease;
}
.fw-node:hover .fw-node-shape,
.fw-node.is-active .fw-node-shape {
  stroke: rgba(255,255,255,0.9);
}
.fw-node.is-dim { opacity: 0.28; transition: opacity 0.2s ease; }

.fw-node-label {
  fill: #082456;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(255,255,255,0.9);
  stroke-width: 3px;
}

.fw-node-avatar-text {
  fill: #fff;
  font-family: var(--font-ja);
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}

.fw-node-pulse {
  fill: none;
  stroke-width: 2px;
  opacity: 0;
}

/* ============================================================
   Tooltip
============================================================ */
.fw-tooltip {
  position: fixed;
  z-index: 1200;
  min-width: 200px;
  max-width: 280px;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.97);
  border: 1px solid var(--color-border-mid);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(20,55,140,0.22);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.fw-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fw-tooltip-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}
.fw-tooltip-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-accent-grad);
}
.fw-tooltip-name {
  display: block;
  font-family: var(--font-ja);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
}
.fw-tooltip-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--color-text-mid);
}
.fw-tooltip-body {
  font-size: 0.78rem;
  color: var(--color-text-mid);
  line-height: 1.6;
  white-space: pre-line;
  border-top: 1px solid var(--color-border);
  padding-top: 0.5rem;
  margin: 0;
}

/* ============================================================
   Modal
============================================================ */
.fw-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.fw-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.fw-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8,36,86,0.55);
  backdrop-filter: blur(6px);
}

.fw-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-mid);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 24px 80px rgba(20,55,140,0.28);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.fw-modal.is-open .fw-modal-card {
  transform: translateY(0) scale(1);
}

.fw-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-text-mid);
  background: rgba(21,83,216,0.06);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}
.fw-modal-close:hover {
  color: var(--color-white);
  background: rgba(21,83,216,0.14);
}

.fw-modal-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.fw-modal-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ja);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-accent-grad);
  box-shadow: 0 0 24px var(--color-accent-glow);
}
.fw-modal-heading { min-width: 0; }
.fw-modal-role {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}
.fw-modal-name {
  font-family: var(--font-ja);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.2;
}
.fw-modal-area {
  display: block;
  font-size: 0.82rem;
  color: var(--color-text-mid);
  margin-top: 0.25rem;
}

.fw-modal-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 1.25rem;
  margin-bottom: 1.5rem;
}
.fw-modal-meta dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.fw-modal-meta dd {
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.6;
}

.fw-modal-memo {
  font-size: 0.83rem;
  color: var(--color-text-mid);
  line-height: 1.8;
  white-space: pre-line;
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.fw-modal-memo:empty { display: none; }

.fw-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.fw-modal-actions:empty { display: none; }

/* ============================================================
   CTA（個別再定義）
============================================================ */
.cta-section {
  position: relative;
  padding: var(--space-xl) 0;
  overflow: hidden;
  text-align: center;
}
.cta-bg { position: absolute; inset: 0; background: var(--color-bg-2); }
.cta-inner { position: relative; z-index: 1; }
.cta-title {
  font-family: var(--font-ja);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.35;
  margin-bottom: 1.5rem;
}
.cta-desc {
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  color: var(--color-text-mid);
  line-height: 2;
  margin-bottom: 2.5rem;
}
.cta-actions {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}

/* ============================================================
   Responsive
============================================================ */
@media (max-width: 640px) {
  .fw-graph-head { align-items: flex-start; }
  .fw-legend { gap: 0.75rem 1rem; }
  .fw-modal-header { flex-direction: column; text-align: center; gap: 1rem; }
  .fw-modal-meta { grid-template-columns: 1fr; gap: 0.2rem; }
  .fw-modal-meta dt { margin-top: 0.5rem; color: var(--color-accent); }
  .fw-tooltip { display: none; } /* モバイルはタップでモーダル表示 */
}

/* CTA の F-Walk ロゴ（中央・アクセント） */
.fw-cta-logo {
  display: block;
  width: clamp(200px, 30vw, 500px);
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 10px 24px rgba(20, 55, 140, 0.3));
}
