/* TopSpin Games — News + Article pages
   Supplementary to the real https://topspin.games/design/site.css
   (which supplies global reset, fonts, nav/footer helpers). This file
   adds only the components new to the site: the news bento grid, news
   cards, and the article-page layout/typography. */

:root {
  --bg: #0a0a0a;
  --bg-raised: #101010;
  --ink: #f4f1ea;
  --ink-dim: #a9a49a;
  --ink-faint: #6b675f;
  --red: #e10600;
  --rule: rgba(244, 241, 234, 0.14);
  --rule-soft: rgba(244, 241, 234, 0.07);

  --font: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-serif: var(--font);
  --font-sans: var(--font);
  --font-label: var(--font);

  --side-pad: 6vw;
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--ink);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  background: radial-gradient(circle, rgba(225, 6, 0, 0.55) 0%, rgba(225, 6, 0, 0) 70%);
}
.glow-hero {
  width: 60vw; height: 60vw; max-width: 900px; max-height: 900px;
  top: 50%; right: -10vw; transform: translateY(-50%);
  opacity: 0.55;
}
.glow-bottom {
  width: 80vw; height: 40vw; max-width: 1100px; max-height: 500px;
  left: 50%; bottom: -10vw; transform: translateX(-50%);
  opacity: 0.4;
}

.page-hero {
  position: relative;
  padding: 16vh var(--side-pad) 8vh;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  min-height: 62vh;
  display: flex;
  align-items: center;
}
.page-hero .glow-bottom { opacity: 0.5; }
.page-hero-inner { position: relative; z-index: 1; max-width: 54vw; }
.page-hero-character {
  position: absolute;
  bottom: 0; right: 4vw;
  height: 90%;
  width: auto;
  max-width: 40vw;
  object-fit: contain;
  object-position: bottom;
  pointer-events: none;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.6));
  z-index: 0;
}
.page-hero-heading {
  font-family: var(--font);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  line-height: 0.98;
  margin: 22px 0 0;
}
.page-hero-heading .accent { color: var(--red); }
.page-hero-sub { margin-top: 20px; max-width: 52ch; font-size: 1.05rem; color: var(--ink-dim); font-weight: 300; }

.news-section { position: relative; padding: 8vh var(--side-pad) 14vh; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  grid-auto-flow: dense;
  gap: 2.4vw;
  max-width: 1400px;
  margin: 0 auto;
}
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-raised);
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), border-color 0.3s ease, box-shadow 0.3s ease;
  grid-column: span 2;
  grid-row: span 1;
}
/* No scroll-reveal library here (the real site doesn't use one on inner
   pages) — cards are simply visible by default, so there's nothing to fail
   without JS. Bento sizing classes below are assigned per-card based on
   which articles actually have real art. */
.news-card.is-feature { grid-column: span 2; grid-row: span 2; }
.news-card.is-tall { grid-column: span 1; grid-row: span 2; }
.news-card.is-wide { grid-column: span 4; grid-row: span 1; }
.news-card:hover {
  transform: translateY(-6px) rotate(0deg) scale(1.02);
  border-color: rgba(225, 6, 0, 0.6);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 40px rgba(225, 6, 0, 0.15);
  z-index: 2;
}

/* Bento sizing now driven by .is-feature / .is-tall / .is-wide classes, see below */

.news-card-media { position: relative; flex: 1; min-height: 110px; }
.news-card-img { width: 100%; height: 100%; object-fit: contain; background: #101010; display: block; }
.news-card-noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(to right, rgba(244, 241, 234, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 241, 234, 0.08) 1px, transparent 1px),
    #101010;
  background-size: 24px 24px, 24px 24px, auto;
}
.news-card-noimg span {
  font-family: var(--font);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--rule);
  padding: 8px 14px;
  border-radius: 2px;
}

.news-tag {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 1;
  font-family: var(--font);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 3px;
  transform: rotate(-2deg);
}
.news-tag.tag-award { background: var(--ink); color: var(--bg); }
.news-tag.tag-partnership { background: var(--red); color: #fff; }
.news-tag.tag-insight { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.news-tag.tag-launch { background: var(--ink); color: var(--bg); }

.news-card-body { position: relative; padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.news-card.is-feature .news-card-body, .news-card.is-wide .news-card-body { padding: 22px 26px 26px; }
.news-card-title {
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.32;
  color: var(--ink);
  margin: 0;
}
.news-card.is-feature .news-card-title { font-size: clamp(1.3rem, 1.8vw, 1.7rem); font-weight: 900; line-height: 1.15; }
.news-card-link {
  align-self: flex-start;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink);
  border: 1px solid #2a2a2a;
  padding: 8px 16px;
  border-radius: 20px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.news-card:hover .news-card-link { background: var(--red); border-color: var(--red); transform: translateX(4px); }



/* ---------- News card date + refined no-image treatment ---------- */
.news-card-tagrow { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.news-card-tagrow .news-tag { position: static; }
.news-card-date {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  background: rgba(10, 10, 10, 0.55);
  backdrop-filter: blur(4px);
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--rule);
  white-space: nowrap;
}
.news-card-noimg {
  position: relative;
  background:
    linear-gradient(135deg, rgba(225, 6, 0, 0.10) 0%, transparent 45%),
    linear-gradient(to right, rgba(244, 241, 234, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 241, 234, 0.08) 1px, transparent 1px),
    #101010;
  background-size: 100% 100%, 24px 24px, 24px 24px, auto;
}
.news-card-noimg span {
  font-family: var(--font);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--rule);
  padding: 9px 16px;
  border-radius: 3px;
  background: rgba(10, 10, 10, 0.4);
}

/* ---------- Article page ---------- */
.article-page { position: relative; }
.article-hero { position: relative; padding: 16vh var(--side-pad) 6vh; border-bottom: 1px solid var(--rule); overflow: hidden; }
.article-hero .glow-bottom { opacity: 0.45; }
.article-hero-inner { position: relative; z-index: 1; max-width: 74ch; margin: 0 auto; }
.article-breadcrumb { font-size: 11px; letter-spacing: 0.08em; color: var(--ink-faint); margin-bottom: 22px; }
.article-breadcrumb a { color: var(--ink-faint); }
.article-breadcrumb a:hover { color: var(--ink); }
.article-title {
  font-family: var(--font);
  font-weight: 900;
  text-transform: none;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.08;
  margin: 0 0 24px;
}
.article-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-dim); }
.article-byline .author { color: var(--ink); font-weight: 600; }
.article-byline .sep { color: var(--ink-faint); }
.article-media { max-width: 1000px; margin: 6vh auto 0; padding: 0 var(--side-pad); }
.article-media img { width: 100%; display: block; border-radius: 8px; border: 1px solid var(--rule); }
.article-media-noimg {
  width: 100%; aspect-ratio: 21/9; border-radius: 8px; border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(135deg, rgba(225, 6, 0, 0.10) 0%, transparent 45%),
    linear-gradient(to right, rgba(244, 241, 234, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 241, 234, 0.08) 1px, transparent 1px),
    #101010;
  background-size: 100% 100%, 24px 24px, 24px 24px, auto;
}
.article-media-noimg span {
  font-family: var(--font); font-weight: 900; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); border: 1px solid var(--rule); padding: 10px 18px; border-radius: 3px; background: rgba(10,10,10,0.4);
}
.article-body-wrap { max-width: 74ch; margin: 0 auto; padding: 8vh var(--side-pad) 10vh; }
.article-body { font-size: 1.05rem; line-height: 1.8; color: var(--ink-dim); font-weight: 300; }
.article-body p { margin: 0 0 22px; }
.article-body h2 { font-family: var(--font); font-weight: 800; color: var(--ink); text-transform: none; letter-spacing: -0.01em; font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.25; margin: 44px 0 18px; }
.article-body h3 { font-family: var(--font); font-weight: 700; color: var(--ink); font-size: 1.15rem; margin: 32px 0 14px; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--ink); }
.article-body ul, .article-body ol { margin: 0 0 22px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 28px; font-size: 0.92rem; }
.article-body th, .article-body td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--rule); color: var(--ink-dim); }
.article-body th { color: var(--ink); font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--ink-faint); }
.article-cta-row { max-width: 74ch; margin: 0 auto; padding: 0 var(--side-pad) 12vh; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; border-top: 1px solid var(--rule); padding-top: 40px; }
.article-back-link { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); border: 1px solid #2a2a2a; padding: 12px 22px; border-radius: 20px; transition: background 0.3s ease, border-color 0.3s ease; }
.article-back-link:hover { background: var(--red); border-color: var(--red); }
.article-rg-note { font-size: 11px; color: var(--ink-faint); }

@media (max-width: 768px) {
  .news-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 8vw; }
  .news-card, .news-card.is-feature, .news-card.is-tall, .news-card.is-wide {
    grid-column: span 1; grid-row: span 1;
  }
  .news-card-media, .news-card.is-feature .news-card-media { aspect-ratio: 16 / 10; flex: none; }
  .news-card:hover { transform: translateY(-4px) scale(1.01) !important; }
  .page-hero { padding: 13vh var(--side-pad) 6vh; min-height: auto; }
  .page-hero-inner { max-width: 100%; }
  .page-hero-character { opacity: 0.25; max-width: 70vw; right: 50%; transform: translateX(50%); }
}
@media (min-width: 769px) and (max-width: 1080px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 280px; }
  .news-card.is-feature { grid-column: span 2; }
  .news-card.is-tall, .news-card.is-wide { grid-column: span 1; grid-row: span 1; }
}
