/* ==========================================================
   InfiniteBlogs — home page (index.html)
   ========================================================== */

/* ---------- title + game tabs ---------- */
.page-head {
  padding-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.page-head h1 {
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -1px;
}

.game-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.game-tabs::-webkit-scrollbar { display: none; }

.tab {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 14px;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  color: var(--text-muted);
  box-shadow: inset 0 -3px 0 transparent;
  transition: color 0.2s ease, box-shadow 0.25s var(--ease);
}
.tab img { transition: transform 0.25s var(--ease); }
.tab:hover img { transform: scale(1.08); }
.tab img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; }
.tab:hover { color: #fff; }
.tab.is-active { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }

/* ---------- shared square-art thumbnail (blurred copy behind) ---------- */
.thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb .blur {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  filter: blur(28px) brightness(0.7) saturate(1.3);
}
.thumb { transition: box-shadow 0.3s ease; }
.post-card:hover .thumb, .featured:hover .thumb { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); }
.thumb .art {
  position: relative;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  transition: transform 0.25s ease;
}

/* ---------- feed ---------- */
.feed {
  padding: 40px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* newest post, big */
.featured {
  display: grid;
  grid-template-columns: 640px minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.featured .thumb { height: 400px; border-radius: 16px; }
.featured .thumb .blur { filter: blur(36px) brightness(0.7) saturate(1.3); }
.featured .thumb .art { width: 300px; border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); }
.featured-body { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.eyebrow { font-weight: 700; font-size: 14px; letter-spacing: 2px; color: var(--accent); transition: color 0.4s var(--ease); }
.featured h2 { font-size: 50px; line-height: 1.08; letter-spacing: -1px; }
.featured p { margin: 0; max-width: 560px; font-size: 18px; color: var(--text-soft); }
.featured .btn { margin-top: 8px; }
.featured .btn svg { transition: transform 0.2s var(--ease); }
.featured:hover .btn svg { transform: translateX(4px); }

/* everything else, 4 per row */
.post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 28px;
}
.post-card { display: flex; flex-direction: column; gap: 14px; transition: transform 0.3s var(--ease); }
.post-card:hover { transform: translateY(-4px); }
.post-card h3, .featured h2 { transition: color 0.2s ease; }
.post-card .thumb { height: 196px; }
.post-card .thumb .art { width: 148px; }
.post-card-text { display: flex; flex-direction: column; gap: 10px; }
.post-card h3 { font-size: 21px; line-height: 1.25; }
.post-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured:hover .art, .post-card:hover .art { transform: scale(1.05); }
.featured:hover h2, .post-card:hover h3 { color: #9fd3ff; }

/* no posts for a game yet */
.empty {
  padding: 64px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
  text-align: center;
  color: var(--text-muted);
}

/* endless scrolling: stand-in for rows that are off screen */
.grid-spacer { grid-column: 1 / -1; }
.feed-end { margin: -24px 0 0; text-align: center; font-size: 14px; color: var(--text-muted); }

/* ---------- smaller laptops / tablets ---------- */
@media (max-width: 1200px) {
  .featured { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
  .featured h2 { font-size: 40px; }
  .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- phones ---------- */
@media (max-width: 720px) {
  .page-head { padding-top: 28px; gap: 16px; }
  .page-head h1 { font-size: 30px; letter-spacing: -0.6px; }
  .game-tabs { gap: 4px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .tab { padding: 10px 10px 12px; font-size: 14px; gap: 8px; }
  .tab img { width: 24px; height: 24px; border-radius: 6px; }

  .feed { padding: 24px 0 48px; gap: 28px; }

  .featured { grid-template-columns: 1fr; gap: 12px; }
  .featured .thumb { height: 224px; border-radius: var(--radius-card); }
  .featured .thumb .art { width: 168px; border-radius: 14px; }
  .featured-body { gap: 12px; }
  .eyebrow { font-size: 12px; }
  .featured h2 { font-size: 28px; line-height: 1.15; letter-spacing: -0.5px; }
  .featured p { font-size: 15px; }
  .featured .btn { align-self: stretch; height: 48px; margin-top: 4px; }

  /* the grid becomes a compact list: square image + date + title */
  .post-grid { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
  .post-card:hover { transform: none; }
  .post-card {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .post-card .thumb { width: 84px; height: 84px; flex-shrink: 0; border-radius: 12px; }
  .post-card .thumb .blur { display: none; }
  .post-card .thumb .art { width: 100%; border-radius: 0; box-shadow: none; }
  .post-card-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
  .post-card .meta { font-size: 12px; }
  .post-card h3 { font-size: 18px; }
  .post-card p { display: none; }

  .feed-end { margin-top: 0; }
}
