/* Reviews (2 Nov 2026): the star rating on the home page, the "What players
   say" section, and the /reviews.html page. Filled in by js/reviews.js.
   Stars are gold so they read as a rating at a glance, everything else uses
   the site's own blues and greys. */

:root {
  --color-star: #f5b74e;
  --color-star-empty: #2a3340;
}

/* ---- Stars ------------------------------------------------------------- */
.stars {
  position: relative;
  display: inline-block;
  line-height: 0;
  vertical-align: middle;
}
.stars__row {
  display: inline-flex;
  gap: 2px;
  /* Always the full width of five stars, even inside the narrower gold
     layer, so the gold stars sit exactly on top of the grey ones. */
  width: max-content;
}
.stars svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: var(--color-star-empty);
}
.stars--sm svg {
  width: 15px;
  height: 15px;
}
.stars--lg svg {
  width: 28px;
  height: 28px;
}
/* The gold layer sits on top of the grey one and is cut off at the rating,
   so 4.3 shows four full stars and a third of the fifth. */
.stars__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--stars-fill, 0%);
  overflow: hidden;
  white-space: nowrap;
}
.stars__fill svg {
  fill: var(--color-star);
}

/* ---- Home page: the rating under the hero buttons ------------------------ */
.review-badge {
  /* Its own line, with the same space above and below, so it never sits on
     top of the Windows / Free To Play / Anti-cheat line under it. */
  display: flex;
  width: fit-content;
  align-items: center;
  gap: var(--space-3);
  margin-block: 0 var(--space-6);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: var(--fs-200);
  transition: border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
}
.review-badge:hover,
.review-badge:focus-visible {
  border-color: var(--color-accent-border);
  color: var(--color-text);
}
.review-badge[hidden] {
  display: none;
}

/* ---- The big score ------------------------------------------------------- */
.review-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.review-score__number {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-800);
  line-height: 1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.review-score__count {
  color: var(--color-text-muted);
  font-size: var(--fs-300);
}

/* ---- Home page section --------------------------------------------------- */
.reviews-home {
  padding-block: var(--space-9) 0;
}
.reviews-home[hidden] {
  display: none;
}
.reviews-home__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
.reviews-home__heading h3 {
  font-size: var(--fs-500);
  margin-bottom: var(--space-3);
}
.reviews-home__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
@media (max-width: 1024px) {
  .review-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .review-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- One review ---------------------------------------------------------- */
.review-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-2);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.review-card__top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.review-card__initial {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--radius-full);
  background: var(--color-accent-muted);
  color: var(--color-accent-hover);
  font-weight: var(--fw-bold);
  font-size: var(--fs-300);
}
.review-card__name {
  color: var(--color-text);
  font-weight: var(--fw-bold);
  font-size: var(--fs-300);
  overflow-wrap: anywhere;
}
.review-card__date,
.review-card__source {
  color: var(--color-text-faint);
  font-size: var(--fs-100);
}
.review-card__text {
  color: var(--color-text-muted);
  font-size: var(--fs-200);
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.review-card__source {
  margin-top: auto;
}

/* ---- The reviews page ---------------------------------------------------- */
.reviews-page {
  padding-block: var(--space-9);
}
.reviews-page__top {
  display: grid;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
.reviews-page__top h1 {
  margin-bottom: var(--space-2);
}
.reviews-page__lead {
  color: var(--color-text-muted);
  font-size: var(--fs-300);
  max-width: 62ch;
}
.review-parts {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--fs-200);
}
.review-parts a {
  color: var(--color-accent-hover);
}
.review-parts a:hover,
.review-parts a:focus-visible {
  color: var(--color-text);
}
.review-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
@media (max-width: 720px) {
  .review-actions {
    grid-template-columns: 1fr;
  }
}
.review-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-panel);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.review-action h2 {
  font-size: var(--fs-400);
}
.review-action p {
  color: var(--color-text-muted);
  font-size: var(--fs-200);
}
.review-action .btn {
  margin-top: auto;
}
.reviews-page__list-heading {
  font-size: var(--fs-500);
  margin-bottom: var(--space-5);
}
.review-status {
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}
.review-status:empty {
  display: none;
}
.review-more {
  margin-top: var(--space-6);
}
.review-more[hidden] {
  display: none;
}

/* 3 Nov 2026: keeps its height while loading so the page doesn't jump. */
.review-badge {
  min-height: 40px;
}
.reviews-home__empty {
  color: var(--color-text-muted);
  font-size: var(--fs-200);
}
.reviews-home__empty a {
  color: var(--color-accent-hover);
}
