/* Homepage-specific styles (shared styles are in site.css) */

/* The homepage H1 is sr-only (visually hidden in the HTML) */

body.page-home #main {
  padding-top: 28px;
}

body.page-home a {
  color: inherit;
}

body.page-home a:hover {
  text-decoration: none;
}

/* ─── Grid ─── */
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

/* ─── Card (standard) ─── */
.home-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 20px;
  transition: box-shadow 0.2s;
}

.home-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.card-meta .meta-label {
  font-weight: 600;
  letter-spacing: 0.06em;
}

.home-card h3 {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 700;
  margin: 0 0 8px;
  border: none;
  padding: 0;
  width: auto;
  color: var(--ink);
}

.home-card h3 a { color: var(--ink); }

.card-summary {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink2);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: calc(1.5em * 3);
  flex: 1;
}

.card-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--muted);
}

.card-products span::before {
  content: "\25C7 ";
  font-size: 9px;
  opacity: 0.5;
  vertical-align: 1px;
}

.card-stat {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 10px;
}

.card-stat em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
  margin-right: 4px;
}

/* ─── Featured card ─── */
.home-card.featured {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: 1fr 0.42fr;
  gap: 0;
  padding: 0;
  min-height: 320px;
}

.featured .featured-body {
  padding: 32px 36px 28px;
  display: flex;
  flex-direction: column;
}

.featured .featured-body .card-meta { margin-bottom: 16px; }

.featured .featured-body h3 {
  font-size: 40px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.featured .featured-body .card-summary {
  -webkit-line-clamp: 3;
  max-height: calc(1.55em * 3);
  font-size: 14.5px;
  line-height: 1.55;
}

.featured .featured-accent {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
  border-left: 1px solid var(--line);
  overflow: hidden;
}

.featured .accent-number {
  font-family: "Noto Serif", "Georgia", serif;
  font-weight: 800;
  font-size: 72px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.14;
  text-align: center;
}

.featured .accent-stat-val {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 64px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
  text-align: center;
}

.featured .accent-stat-cap {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  text-align: center;
}

.featured .accent-stats-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.featured .accent-stats-list .accent-stat-item {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.featured .accent-stats-list .accent-stat-item:first-child {
  border-top: none;
  padding-top: 0;
}

.featured .accent-stats-list .stat-val {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  color: var(--accent);
  line-height: 1.15;
  margin-bottom: 3px;
}

.featured .accent-stats-list .stat-cap {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.home-card.plain-card .card-meta .meta-label { color: var(--muted); }

/* ─── Homepage pagination ─── */
.home-pager {
  display: flex;
  justify-content: space-between;
  padding: 24px 0 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}

.home-pager b { color: var(--accent); }
.home-pager a { color: var(--muted); }
.home-pager a:hover { color: var(--ink); text-decoration: none; }

body.page-home #post-pagination { display: none; }

/* ─── Homepage responsive ─── */
@media (max-width: 720px) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-card.featured {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  .featured .featured-body {
    padding: 24px 20px 20px;
  }

  .featured .featured-body h3 { font-size: 26px; }

  .featured .featured-accent {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 18px 20px;
  }

  .featured .accent-stat-val { font-size: 40px; }
  .featured .accent-stats-list .stat-val { font-size: 22px; }
}
