/* ============================================================
   popup.css — HEROポップアップ（誰がやっているか）専用スタイル
   index.html のみで使用
   ============================================================ */

/* ── トリガーバー ── */
.hero-trust-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 18px;
  padding: 9px 16px 9px 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 40px;
  background: rgba(255,255,255,0.06);
  transition: background 0.2s, border-color 0.2s;
  width: fit-content;
  user-select: none;
}
.hero-trust-trigger:hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(232,114,90,0.5);
}

.htt-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8725a 0%, #c45a44 100%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
}
.htt-text { display: flex; flex-direction: column; gap: 1px; }
.htt-name { font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.9); letter-spacing: 0.02em; }
.htt-role { font-size: 11px; color: rgba(255,255,255,0.42); }

.htt-pulse {
  flex-shrink: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--salmon);
  position: relative;
}
.htt-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(232,114,90,0.4);
  animation: htt-ping 1.6s ease-out infinite;
}
@keyframes htt-ping {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(2.2); opacity: 0;   }
  100% { transform: scale(2.2); opacity: 0;   }
}

.htt-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-left: 2px;
  transition: color 0.2s;
}
.hero-trust-trigger:hover .htt-hint { color: rgba(232,114,90,0.8); }

/* ── ポップアップオーバーレイ ── */
.htp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
}
.htp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,16,30,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* ── ポップアップカード ── */
.htp-card {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(540px, calc(100vw - 40px));
  background: var(--white);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(26,39,68,0.08),
    0 24px 60px rgba(10,16,30,0.22),
    0 8px 20px rgba(10,16,30,0.12);
  overflow: hidden;
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34,1.4,0.64,1), opacity 0.22s ease;
}

.htp-overlay.is-open  { display: block; }
.htp-overlay.is-visible .htp-backdrop { opacity: 1; }
.htp-overlay.is-visible .htp-card {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* ヘッダー */
.htp-header {
  background: var(--navy);
  padding: 22px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.htp-header-left { display: flex; align-items: center; gap: 14px; }
.htp-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8725a 0%, #c45a44 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(232,114,90,0.3);
}
.htp-header-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 3px;
}
.htp-header-name { font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 2px; }
.htp-header-role { font-size: 12px; color: rgba(255,255,255,0.5); }

.htp-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 16px; line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.htp-close:hover { background: rgba(255,255,255,0.16); color: var(--white); }

/* ボディ */
.htp-body { padding: 24px 24px 20px; }

.htp-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.htp-badge { font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 3px; letter-spacing: 0.03em; }
.htp-badge.primary { background: var(--salmon-light); color: var(--salmon); }
.htp-badge.muted   { background: var(--gray-light);   color: var(--gray-text); }

.htp-story { display: flex; flex-direction: column; gap: 13px; margin-bottom: 20px; }
.htp-story p { font-size: 13.5px; color: var(--text-body); line-height: 1.85; }
.htp-story strong { color: var(--navy); font-weight: 700; }

.htp-quote {
  padding: 14px 16px 14px 18px;
  background: var(--salmon-light);
  border-left: 3px solid var(--salmon);
  border-radius: 0 6px 6px 0;
  margin: 4px 0 6px;
}
.htp-quote p {
  font-family: 'Noto Serif JP', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.75;
}

.htp-skills { border-top: 1px solid var(--border); padding-top: 16px; margin-bottom: 16px; }
.htp-skills-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gray-text); margin-bottom: 10px;
}
.htp-skills-list { display: flex; flex-wrap: wrap; gap: 7px; }
.htp-skill {
  font-size: 12px; color: var(--navy);
  background: var(--gray-light); border: 1px solid var(--border);
  border-radius: 3px; padding: 4px 10px; font-weight: 500;
}

.htp-reassure {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 12px 14px;
  background: var(--off-white);
  border-radius: 6px; border: 1px solid var(--border);
}
.htp-reassure-icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }
.htp-reassure p { font-size: 12px; color: var(--gray-text); line-height: 1.65; }
.htp-reassure strong { color: var(--navy); }

/* フッターCTA */
.htp-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.htp-cta-primary {
  flex: 1; min-width: 140px;
  background: var(--salmon); color: var(--white);
  border: none; border-radius: 4px; padding: 13px 20px;
  font-size: 14px; font-family: inherit; font-weight: 700;
  cursor: pointer; text-decoration: none;
  display: block; text-align: center;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}
.htp-cta-primary:hover { background: var(--salmon-hover); transform: translateY(-1px); }
.htp-cta-sub {
  font-size: 12px; color: var(--gray-text); text-decoration: none;
  border-bottom: 1px solid var(--gray-mid); padding-bottom: 1px;
  white-space: nowrap; transition: color 0.15s;
}
.htp-cta-sub:hover { color: var(--navy); }

/* ── デスクトップ：吹き出し型ポップオーバー ── */
@media (hover: hover) and (min-width: 769px) {
  .hero-trust-wrapper { position: relative; width: fit-content; }

  .htp-overlay.desktop-mode {
    position: absolute;
    inset: auto;
    bottom: calc(100% + 12px);
    left: 0;
  }
  .htp-overlay.desktop-mode .htp-backdrop { display: none; }
  .htp-overlay.desktop-mode .htp-card {
    position: relative;
    top: auto; left: auto;
    transform: translateY(8px) scale(0.97);
    width: min(480px, 90vw);
  }
  .htp-overlay.desktop-mode.is-visible .htp-card {
    transform: translateY(0) scale(1);
  }
  .htp-overlay.desktop-mode .htp-card::after {
    content: '';
    position: absolute; bottom: -8px; left: 40px;
    width: 16px; height: 8px;
    background: var(--white);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.06));
  }
}

/* ── スマホ：ボトムシート ── */
@media (max-width: 768px) {
  .htp-card {
    top: auto; bottom: 0; left: 0; right: 0;
    transform: translateY(20px) scale(1);
    width: 100%;
    border-radius: 20px 20px 0 0;
  }
  .htp-overlay.is-visible .htp-card { transform: translateY(0) scale(1); }
  .htp-footer { flex-direction: column; }
  .htp-cta-primary { width: 100%; }
}
