/* サイトのトップ（/）専用。Tech System Lab の入口。 */

.page {
  max-width: var(--w-full);
  width: 100%;
  margin: 0 auto;
  /* gap を効かせるために縦並びの flex にする。block のままだと gap が無視され、
     セクション同士が隙間なく積み上がる。 */
  display: flex;
  flex-direction: column;
  /* セクション同士の間。切れ目は見出しの大きさと枠線が作るので、ここは
     詰まって見えない程度で足りる。広げすぎると別ページのように離れて見える。 */
  gap: 40px;
}

/* ===== ヒーロー ===== */
.hero {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 38px 40px 34px;
  overflow: hidden;
}
/* 上端の帯。文字は載せないので装飾として濃い色を使ってよい。 */
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
}
.hero-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  margin-top: 12px;
}
.hero-sub {
  font-size: 16px;
  font-weight: 500;
  color: var(--sub);
  line-height: 1.6;
  margin-top: 8px;
}
.hero-lead {
  font-size: 13.5px;
  color: var(--sub);
  line-height: 1.95;
  margin-top: 14px;
  max-width: 640px;
}
.hero-lead b { color: var(--ink); font-weight: 700; }

/* ===== コンテンツのカード ===== */
/* 見出しと、その見出しが指すカードを1つのまとまりとして扱う。
   .page の gap（セクション間）とは別に、この中だけ間隔を詰める。 */
.home-block { display: flex; flex-direction: column; gap: 14px; }
.home-heading { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }

.content-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 24px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 180ms, box-shadow 180ms, border-color 180ms;
}
.content-card:hover {
  transform: translateY(-2px);
  border-color: #d1d5db;
  box-shadow: 0 6px 20px -12px rgba(17, 24, 39, 0.2);
}
.content-card-tag { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.content-card-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.content-card-desc { font-size: 13px; color: var(--sub); line-height: 1.8; }
.content-card-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.content-card-count { color: var(--muted); }
.content-card-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 600;
}

/* ===== 一覧のセクション（Excel・コラム） ===== */
.home-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 30px 28px 28px;
}
.home-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
/* 一覧が縦に長いため、見出しは本文よりはっきり大きくする。
   サイズは /tools/ の一覧見出し（tools/style.css の .list-title）と同じ値にそろえる。 */
.home-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.home-section-more {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.home-section-more:hover { text-decoration: underline; }
.home-section-lead {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.85;
  margin-top: 10px;
}

.home-list {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.home-list-card {
  display: block;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 140ms, background 140ms;
}
.home-list-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.home-list-cat { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.home-list-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.5;
  margin-top: 3px;
}
.home-list-desc {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 4px;
}

/* ===== このサイトについて ===== */
.home-prose {
  font-size: 13.5px;
  color: var(--sub);
  line-height: 1.9;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-prose b { color: var(--ink); font-weight: 700; }
.home-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ===== 幅の狭い画面 ===== */
@media (max-width: 900px) {
  .hero { padding: 26px 22px 24px; border-radius: 12px; }
  .hero-title { font-size: 26px; }
  .content-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .home-section-title { font-size: 18px; }
  .home-heading { font-size: 18px; }
  .home-list { grid-template-columns: 1fr; }
  .home-section { padding: 20px 16px 22px; }
  .hero-title { font-size: 23px; }
  .hero-sub { font-size: 14.5px; }
}
