/* ============ roadmap.html page-specific ============ */

/* ---- timeline layout ---- */
/* 年表はコンテンツ幅いっぱいを使う。列幅は変数で持ち、縦線の位置を自動追従させる */
.tl {
  position: relative;
  --tl-time-w: 82px;   /* 年/四半期の列 */
  --tl-node-w: 108px;  /* ノードの列 = 縦線とカードの間の余白 */
  --tl-thumb-w: 300px; /* サムネイル幅(大画面で拡大) */
}
.tl::before {
  content: "";
  position: absolute;
  /* ノード列の中心(線幅2pxぶん左に寄せて中央合わせ) */
  left: calc(var(--tl-time-w) + var(--tl-node-w) / 2 - 1px);
  top: 34px;
  bottom: 44px;
  width: 2px;
  border-radius: 1px;
  background: #f5b39c;
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--tl-time-w) var(--tl-node-w) 1fr;
  align-items: center;
}
.tl-item + .tl-item { margin-top: 22px; }

/* time rail (year / quarter) */
.tl-time { display: flex; flex-direction: column; line-height: 1.25; padding: 4px 0; }
.tl-time__year {
  font-family: var(--ff-en);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--c-primary);
}
.tl-time__q {
  font-family: var(--ff-en);
  font-size: 17px;
  font-weight: 600;
  color: var(--c-text);
}

/* node (dot on the line) */
.tl-node { position: relative; height: 100%; min-height: 24px; }
.tl-node::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 12px; height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--c-primary);
}

/* card */
.tl-card {
  display: flex;
  align-items: center;
  gap: 28px;
  background: #fff;
  border: 1px solid #f2f0ee;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 20px 28px 20px 20px;
}
/* サムネイル: マイルストーンごとの画像(assets/img/roadmap/)。
   元画像は幅550pxで縦横比がまちまちなため、フレームを 3:2 に固定して cover で切り抜く */
.tl-card__thumb {
  flex: 0 0 var(--tl-thumb-w);
  width: var(--tl-thumb-w);
  /* height 属性(presentational hint)を打ち消さないと aspect-ratio が効かない */
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 10px;
  background: var(--c-bg-soft);
}
.tl-card__body { flex: 1 1 auto; min-width: 0; }
.tl-card__date {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--c-primary);
}
.tl-card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--c-text);
  margin-top: 4px;
}
.tl-card__desc {
  font-size: 13px;
  line-height: 1.85;
  color: var(--c-muted);
  margin-top: 6px;
}
.tl-card__desc + .tl-card__desc { margin-top: 4px; }
.tl-card__desc a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 2px; }

/* status badge */
.tl-badge {
  flex: 0 0 auto;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  white-space: nowrap;
}
.tl-badge--done  { background: #e3f6ea; color: #1ca25a; }
.tl-badge--doing { background: #e4edfd; color: #3e6fd8; }
.tl-badge--ready { background: #e8e9fc; color: #5a61d6; }

/* ---- responsive ---- */
/* 大画面: 余ったコンテンツ幅をサムネイルとノード余白に配分する */
@media (min-width: 1280px) {
  .tl { --tl-thumb-w: 360px; }
}
@media (min-width: 1440px) {
  .tl { --tl-node-w: 124px; --tl-thumb-w: 400px; }
  .tl-card { gap: 34px; padding: 24px 32px 24px 24px; }
}
@media (max-width: 1024px) {
  .tl { --tl-time-w: 70px; --tl-node-w: 76px; --tl-thumb-w: 240px; }
  .tl-card { gap: 22px; }
}
@media (max-width: 760px) {
  .tl::before { left: 6px; top: 10px; bottom: 10px; }
  .tl-item { display: block; padding-left: 30px; }
  .tl-item + .tl-item { margin-top: 30px; }
  .tl-node { position: absolute; left: 7px; top: 6px; height: 0; min-height: 0; }
  .tl-node::after { left: 0; top: 0; transform: translate(-50%, 0); width: 10px; height: 10px; }
  .tl-time { flex-direction: row; align-items: baseline; gap: 10px; margin-bottom: 10px; padding: 0; }
  .tl-time__year { font-size: 18px; }
  .tl-time__q { font-size: 15px; }
  .tl-card { display: block; position: relative; padding: 14px 14px 20px; }
  .tl-card__thumb { width: 100%; aspect-ratio: 3 / 2; margin-bottom: 14px; }
  .tl-badge {
    position: absolute;
    top: 26px; right: 26px;
    box-shadow: 0 4px 12px rgba(26, 28, 29, .18);
  }
}
