/*
 * ポータル（/media、および top.mode=portal のときのトップ）とプライバシーポリシー用の追加スタイル。
 *
 * デザイントークン（:root のカラー・フォント）と、.sheet / .container / .card /
 * .site-header / .btn-ghost などの共通パーツは style.css 側にある。このファイルは
 * ポータルで新しく必要になったセクションだけを足す差分。style.css の後に読み込む。
 */

/* ---------- hero ---------- */
.portal-hero {
  padding-block: clamp(56px, 8vw, 96px) clamp(40px, 6vw, 72px);
}

.portal-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: .04em;
  margin-block: 16px 24px;
}

.portal-title--page {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.portal-hero .hero-lead {
  max-width: 42em;
}

/* ---------- 新着記事 ---------- */
.post-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 24px;
  margin-top: 40px;
  list-style: none;
}

.post-item a {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--grid-major);
  background: var(--card-bg);
  transition: transform .15s ease, border-color .15s ease;
}

.post-item a:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.post-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--grid-minor);
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* アイキャッチが無い記事。画像枠を潰すとカードの高さが揃わないので、
   同じ比率のまま製図用紙の罫線だけを見せる。 */
.post-thumb-empty {
  display: block;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(var(--grid-major) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px);
  background-size: 16px 16px;
}

.post-body {
  padding: 16px 18px 20px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--pencil);
  margin-bottom: 8px;
}

.post-site {
  color: var(--shu);
  font-weight: 500;
}

.post-title {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 700;
  margin-bottom: 8px;
}

.post-excerpt {
  font-size: 13px;
  line-height: 1.8;
  color: var(--pencil);
}

/* ---------- メディア一覧 ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  list-style: none;
}

.media-card {
  padding: 24px;
}

.media-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.media-card h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid var(--shu);
}

.media-desc {
  font-size: 13px;
  line-height: 1.8;
  color: var(--pencil);
}

.media-count {
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--blueprint);
  margin-top: 12px;
}

.media-newest {
  font-size: 12px;
  line-height: 1.7;
  color: var(--pencil);
  margin-top: 8px;
}

.media-newest a {
  color: inherit;
}

/* ---------- 運営について ---------- */
.about-media-body {
  max-width: 44em;
  margin-top: 32px;
}

.about-media-body p {
  line-height: 2;
  margin-bottom: 20px;
}

.about-media-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

/* ---------- 固定ページ（プライバシーポリシー） ---------- */
.page-section {
  padding-block: var(--section-space);
}

.page-narrow {
  max-width: 760px;
}

.page-narrow h2 {
  font-size: 1.15rem;
  margin-block: 40px 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--grid-major);
}

.page-narrow p {
  line-height: 2;
  margin-bottom: 16px;
}

/* ---------- footer ---------- */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  list-style: none;
  margin-bottom: 12px;
}

.footer-links a {
  color: inherit;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 899px) {
  .post-list,
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .post-list,
  .media-grid {
    grid-template-columns: 1fr;
  }
}
