/* 首页（产品矩阵）专用。教程页的样式在 style.css 里，这份只加首页那几块。
   颜色变量跟 style.css 共用一套 —— 所以深色模式、配色改一处就两边都对。 */

main.wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 16px 48px;
}

.hero {
  padding: 40px 0 8px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 2rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.hero .lead {
  margin: 0 auto;
  max-width: 42em;
  color: var(--fg-dim);
  font-size: 1.05rem;
}

/* --- 产品矩阵 ----------------------------------------------------------- */

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 28px 0 0;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
}

.product:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.product .name {
  font-weight: 700;
  font-size: 1.15rem;
}

.product .tagline {
  color: var(--fg-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

.product .go {
  margin-top: auto;
  padding-top: 6px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
}

.product.soon {
  opacity: 0.62;
}

.product.soon:hover {
  transform: none;
  border-color: var(--line);
}

.product.soon .go {
  color: var(--fg-dim);
  font-weight: 400;
}

/* 一句话在窄屏上要能读，别挤成细条 */
@media (max-width: 420px) {
  .hero h1 { font-size: 1.5rem; }
  .products { grid-template-columns: 1fr; }
}
