/* Research ページ独自のスタイル。土台は experience/ の CSS（design-tokens / components / experience）。 */

/* ヒーロー：動画の代わりに、このページ用に描いた画像（images/research-hero.jpg）を敷く。
   画像は tools/gen_hero.py で作ったもの。Experience より低め */
.research-hero,
.research-hero .hero-content {
  min-height: 52svh;
}

.research-hero .hero-placeholder {
  background:
    url("./images/research-hero.jpg") 70% center / cover no-repeat,
    var(--color-charcoal);
}

/* 並び替えタブ（新着 / 人気） */
.research-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: var(--space-lg);
}

.research-tab {
  padding: 10px 26px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: var(--color-charcoal);
  background: var(--color-white);
  font-family: var(--font-ja);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
}

.research-tab.is-active {
  border-color: var(--color-charcoal);
  color: var(--color-white);
  background: var(--color-charcoal);
}

/* 記事グリッド：PC 3列 / タブレット 2列 / スマホ 1列 */
.research-grid {
  display: grid;
  gap: var(--space-xl) 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .research-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .research-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.research-card {
  display: grid;
  gap: 14px;
  margin: -12px;
  padding: 12px;
  border-radius: 10px;
  color: var(--color-charcoal);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.research-card:hover,
.research-card:focus-visible,
.research-item.is-selected .research-card {
  background: #f4f4f4;
}

.research-item.is-selected .research-card {
  outline: 2px solid var(--color-plum);
}

.research-thumb {
  position: relative;
  aspect-ratio: 1280 / 670;
  overflow: hidden;
  border-radius: 8px;
  background: var(--color-charcoal);
}

.research-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transition: transform 0.4s ease;
}

.research-card:hover .research-thumb img {
  transform: scale(1.03);
}

.research-thumb__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 16px;
  color: var(--color-white);
  text-align: center;
}

.research-thumb__vol {
  color: var(--color-champagne);
  font-family: var(--font-display-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.research-thumb__title {
  font-family: var(--font-ja);
  font-size: clamp(17px, 1.7vw, 22px);
  font-weight: var(--font-weight-bold);
  line-height: 1.45;
}

.research-thumb__sub {
  font-family: var(--font-display-en);
  font-size: 12px;
  opacity: 0.85;
}

.research-card__title {
  margin: 0;
  font-family: var(--font-ja);
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: var(--font-weight-bold);
  line-height: 1.6;
}

.research-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.research-card__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.research-card__author {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.research-card__cta {
  color: var(--color-plum);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
}

/* フォーム横の「選択中のホワイトペーパー」 */
.research-selected {
  margin-top: var(--space-lg);
  padding: var(--space-md) 20px;
  border-left: 3px solid var(--color-plum);
  background: rgba(255, 255, 255, 0.06);
}

.research-selected[hidden] {
  display: none;
}

.research-selected__label {
  margin-bottom: 6px;
  color: var(--color-champagne);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
}

.research-selected__list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: var(--font-weight-bold);
  line-height: 1.6;
}

.research-selected__list[hidden],
.research-selected__empty[hidden] {
  display: none;
}

.research-selected__list li {
  display: flex;
  gap: var(--space-sm);
  align-items: baseline;
  justify-content: space-between;
}

.research-selected__remove {
  flex: none;
  padding: 2px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  font: inherit;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-normal, 400);
  cursor: pointer;
}

.research-selected__remove:hover {
  border-color: var(--color-white);
  color: var(--color-white);
}

.research-selected__empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: var(--text-sm);
}

/* 3つ選んだあと、選べない記事 */
.research-item.is-disabled .research-card {
  opacity: 0.45;
}

.research-choices__error {
  margin: 8px 0 0;
  color: #ff9d9d;
  font-size: var(--text-sm);
}

.research-choices__error[hidden] {
  display: none;
}

/* 記事を選んでいる間だけ画面下に出るバー */
.research-bar {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  max-width: 560px;
  margin-inline: auto;
  padding: 12px 12px 12px 20px;
  border-radius: 10px;
  color: var(--color-white);
  background: #111111;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.research-bar[hidden] {
  display: none;
}

.research-bar.is-away {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.research-bar p {
  margin: 0;
  font-weight: var(--font-weight-bold);
}

.research-bar small {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: var(--font-weight-regular);
}

.research-hero .hero-overlay {
  background: linear-gradient(90deg, rgba(17, 17, 17, 0.7), rgba(17, 17, 17, 0) 60%);
}

/* 画像だけで完結しているサムネイル（文字入りの画像）。暗くせずそのまま見せる */
.research-thumb--image img {
  opacity: 1;
}

.research-card__lead {
  margin: 0;
  color: #4a4a4a;
  font-size: var(--text-sm);
  line-height: 1.75;
}
