/* Home page revamp: GTA box-art look (outlined logo type, wanted stars, cover-art panels with a white gutter
   and a hard accent shadow). Everything is scoped to body.home and layered over styles.css, which is untouched:
   remove the home-revamp.css <link> in index.html to get the old look back. */

@import url("modal-revamp.css?v=21");

body.home {
  --gta-ink: #000;
  --gta-paper: #f4f1e8;
  --gta-outline: -2px -2px 0 var(--gta-ink), 2px -2px 0 var(--gta-ink), -2px 2px 0 var(--gta-ink), 2px 2px 0 var(--gta-ink);
}

/* Backdrop: darker, with a halftone print texture instead of the grid. */
body.home .page-bg {
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(var(--accent-rgb), 0.3), transparent 60%),
    linear-gradient(180deg, #050505 0%, var(--bg-deep) 38%, #050505 100%);
}

body.home .page-bg::after {
  opacity: 0.5;
  background-image: radial-gradient(rgba(var(--accent-rgb), 0.5) 1px, transparent 1.6px);
  background-size: 9px 9px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
}

/* Header: the logo as a cover title, the stars as a wanted level. */
body.home .site-header {
  background: transparent;
  border-top: 6px solid var(--accent);
  border-bottom: 0;
  padding: 34px 20px 26px;
}

body.home .brand {
  gap: 12px;
}

body.home .brand__stars {
  gap: 6px;
}

body.home .star {
  width: 26px;
  height: 26px;
  fill: var(--accent);
  stroke: var(--gta-ink);
  stroke-width: 2.5;
  paint-order: stroke;
  stroke-linejoin: round;
  filter: drop-shadow(2px 3px 0 var(--gta-ink));
  animation: home-wanted 1.6s steps(1) infinite;
}

body.home .star:nth-child(2) {
  animation-delay: 0.2s;
}

body.home .star:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes home-wanted {
  0%,
  70% {
    fill: var(--accent);
  }
  85% {
    fill: var(--gta-paper);
  }
}

body.home .brand__word {
  font-size: clamp(4.4rem, 13vw, 8.5rem);
  letter-spacing: 0.04em;
  line-height: 0.85;
  color: var(--gta-paper);
  -webkit-text-stroke: 10px var(--gta-ink);
  paint-order: stroke fill;
  text-shadow: 7px 8px 0 var(--gta-ink);
  transform: rotate(-2deg);
}

body.home .tagline {
  margin-top: 18px;
  color: var(--gta-paper);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Pause-menu tabs: a black plate with a hard edge. */
body.home .pause-nav {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0;
  border: 3px solid var(--gta-ink);
  border-radius: 6px;
  background: #0a0a0a;
  box-shadow:
    0 0 0 2px var(--gta-paper),
    6px 7px 0 2px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

body.home .pause-nav__items {
  max-width: none;
}

body.home .pause-nav__item.is-active {
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #000));
}

/* Countdown as a HUD clock. */
body.home .daily-timer {
  align-items: center;
  padding: 26px 0 10px;
  color: var(--gta-paper);
  font-size: 0.86rem;
  letter-spacing: 0.22em;
}

body.home .daily-timer__value {
  color: var(--accent);
  font-family: var(--display);
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.06em;
  text-shadow: var(--gta-outline), 3px 4px 0 var(--gta-ink);
}

/* Section headings: mission-title type between two rules. */
body.home .games {
  gap: 56px;
}

body.home .games-section {
  gap: 22px;
}

body.home .games-section__title {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  color: var(--accent);
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0.06em;
  text-shadow: var(--gta-outline), 4px 5px 0 var(--gta-ink);
}

body.home .games-section__title::before,
body.home .games-section__title::after {
  content: "";
  flex: 1;
  height: 4px;
  background: var(--gta-paper);
  box-shadow: 3px 3px 0 var(--gta-ink);
}

body.home .games-section__copy {
  color: var(--gta-paper);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Game cards: cover-art panels. */
body.home .games-section__cards,
body.home .daily-cards {
  gap: 30px;
}

body.home .game-card {
  border: 3px solid var(--gta-ink);
  border-radius: 6px;
  background: #0a0a0a;
  box-shadow:
    0 0 0 3px var(--gta-paper),
    9px 10px 0 3px var(--accent);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

body.home .game-card:hover,
body.home .game-card:focus-visible {
  border-color: var(--gta-ink);
  transform: translate(-3px, -4px) rotate(-0.5deg);
  box-shadow:
    0 0 0 3px var(--gta-paper),
    13px 15px 0 3px var(--accent);
}

body.home .game-picker.is-open .game-card {
  border-color: var(--gta-ink);
  transform: none;
}

body.home .game-card__body {
  padding: 64px 20px 16px;
  border-bottom: 6px solid var(--accent);
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.94) 62%);
}

body.home .game-card__title {
  font-size: clamp(2.1rem, 4vw, 2.7rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gta-paper);
  text-shadow: var(--gta-outline), 3px 4px 0 var(--gta-ink);
}

body.home .game-card__desc {
  color: #d9d5c9;
  font-weight: 500;
}

body.home .game-card__tag {
  padding: 2px 9px;
  border: 2px solid var(--gta-ink);
  border-radius: 3px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  box-shadow: 2px 3px 0 var(--gta-ink);
}

/* Slide-out menu: a plate with chunky buttons. */
body.home .mode-slide {
  border: 3px solid var(--gta-ink);
  border-radius: 6px;
  background: #0a0a0a;
  box-shadow:
    0 0 0 3px var(--gta-paper),
    7px 8px 0 3px rgba(0, 0, 0, 0.75);
}

body.home .mode-slide__link {
  border: 2px solid var(--gta-ink);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #000));
  color: var(--on-accent);
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.06em;
  box-shadow: 3px 4px 0 var(--gta-ink);
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

body.home .mode-slide__link:hover,
body.home .mode-slide__link:focus-visible {
  border-color: var(--gta-ink);
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #000));
  transform: translateY(-2px);
  filter: brightness(1.12);
}

body.home .mode-slide__completed,
body.home .mode-slide__streak {
  color: var(--on-accent);
  font-family: var(--font);
}

/* Corner buttons and the welcome note pick up the same hard edge. */
body.home .login-fab,
body.home .admin-fab,
body.home .leaderboard-fab,
body.home .stats-fab,
body.home .theme-pill {
  border: 2px solid var(--gta-ink);
  border-radius: 6px;
  box-shadow: 3px 4px 0 var(--gta-ink);
}

body.home .welcome-box {
  border: 3px solid var(--gta-ink);
  border-radius: 6px;
  background: #0a0a0a;
  box-shadow:
    0 0 0 2px var(--gta-paper),
    6px 7px 0 2px rgba(0, 0, 0, 0.7);
}

body.home .welcome-box__title {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  body.home .star {
    animation: none;
  }

  body.home .game-card:hover,
  body.home .game-card:focus-visible {
    transform: none;
  }
}

/* Game tags (header row, yesterday's answers): square stickers instead of round pills. */
body.home .selected-game {
  border: 2px solid var(--gta-ink);
  border-radius: 4px;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  box-shadow: 2px 3px 0 var(--gta-ink);
}

body.home .site-header__games {
  gap: 8px;
  margin-top: 16px;
}

/* Yesterday's dailies: a plate with a title band, one row per universe and one column per game,
   so the 3D and HD answers for the same game line up. */
body.home .yesterday-dailies__table {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto;
  column-gap: 14px;
  row-gap: 12px;
  padding: 0 14px 16px;
  border: 3px solid var(--gta-ink);
  border-radius: 6px;
  background: #0a0a0a;
  box-shadow:
    0 0 0 3px var(--gta-paper),
    9px 10px 0 3px rgba(0, 0, 0, 0.7);
}

body.home .yesterday-dailies__status {
  padding-top: 16px;
}

body.home .yesterday-dailies__title {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-content: flex-start;
  max-width: none;
  margin: 0 -14px 2px;
  padding: 9px 14px 7px;
  border: 0;
  border-bottom: 3px solid var(--gta-ink);
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 62%, #000));
  color: var(--on-accent);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  line-height: 1;
  text-align: left;
}

body.home .yesterday-dailies__universe {
  grid-column: 1;
  align-self: stretch;
  min-width: 7.2rem;
  margin: 0;
  padding: 4px 10px 2px;
  border: 2px solid var(--gta-ink);
  border-radius: 4px;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  box-shadow: 2px 3px 0 var(--gta-ink);
}

body.home .yesterday-dailies__universe--3d {
  grid-row: 2;
  background: #f0c14b;
  color: #1a1208;
}

body.home .yesterday-dailies__universe--hd {
  grid-row: 3;
  background: #9ec4f0;
  color: #08121e;
}

body.home .yesterday-dailies__pills {
  grid-column: 2;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

body.home .yesterday-dailies__pills--3d {
  grid-row: 2;
}

body.home .yesterday-dailies__pills--hd {
  grid-row: 3;
}

body.home .yesterday-dailies__pill,
body.home .yesterday-dailies__pill.selected-game {
  display: block;
  min-width: 0;
  padding: 9px 10px 7px;
  border: 2px solid var(--gta-ink);
  border-radius: 4px;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 2px 3px 0 var(--gta-ink);
  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

body.home button.yesterday-dailies__pill:hover,
body.home button.yesterday-dailies__pill:focus-visible {
  transform: translateY(-2px);
}

body.home .yesterday-dailies__pill--empty {
  opacity: 1;
  border-style: dashed;
  border-color: #55524b;
  background: #141414;
  color: #8f8b81;
  box-shadow: none;
}

body.home button.yesterday-dailies__pill--grid {
  border: 2px solid var(--gta-ink);
  background: #141414;
  color: #f0c14b;
  box-shadow:
    inset 0 0 0 2px #f0c14b,
    2px 3px 0 var(--gta-ink);
}

@media (max-width: 640px) {
  /* Too narrow for five columns: one column per universe, one row per game instead. */
  body.home .yesterday-dailies__table {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 10px;
  }

  body.home .yesterday-dailies__universe {
    grid-row: 2;
    min-width: 0;
  }

  body.home .yesterday-dailies__universe--hd {
    grid-column: 2;
  }

  body.home .yesterday-dailies__pills {
    grid-row: 3;
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }

  body.home .yesterday-dailies__pills--3d {
    grid-column: 1;
  }

  body.home .yesterday-dailies__pills--hd {
    grid-column: 2;
  }
}

/* Daily progress on the cards: a checklist of stamped tags. Not played is a hollow dashed tag,
   passed and failed are solid stamps. */
body.home .game-card__status {
  top: 14px;
  right: 14px;
  gap: 7px;
}

body.home .game-card__status-row {
  gap: 7px;
}

body.home .game-card__status-pill {
  gap: 6px;
  padding: 5px 9px 3px 7px;
  border: 2px dashed rgba(244, 241, 232, 0.55);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: rgba(244, 241, 232, 0.75);
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
}

/* Checkbox: empty until played, then a tick or a cross. */
body.home .game-card__status-pill::before {
  content: "";
  width: 0.7em;
  height: 0.7em;
  margin-top: -2px;
  border: 2px solid currentColor;
  border-radius: 2px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 0.62;
  text-align: center;
}

body.home .game-card__status-pill.is-passed,
body.home .game-card__status-pill.is-failed,
body.home .game-card__status-pill--streak,
body.home .game-card__status-pill--score {
  border: 2px solid var(--gta-ink);
  box-shadow: 2px 3px 0 var(--gta-ink);
}

body.home .game-card__status-pill.is-passed {
  background: #3dcc70;
  color: #06140c;
}

body.home .game-card__status-pill.is-failed {
  background: #e44545;
  color: #fff;
}

body.home .game-card__status-pill.is-passed::before {
  content: "\2713";
}

body.home .game-card__status-pill.is-failed::before {
  content: "\00d7";
}

body.home .game-card__status-pill--streak {
  background: #e44545;
  color: #fff;
}

body.home .game-card__status-pill--score {
  background: #3d7ec4;
  color: #fff;
}

body.home .game-card__status-pill--streak::before,
body.home .game-card__status-pill--score::before {
  content: none;
}

/* Yesterday's dailies, grouped by universe: each universe's label and its answers form one tray in
   that universe's colour (3D gold, HD blue), so it reads as two separate groups. */
body.home .yesterday-dailies__table {
  --uni-3d: #f0c14b;
  --uni-hd: #9ec4f0;
  column-gap: 0;
  row-gap: 16px;
}

body.home .yesterday-dailies__universe {
  border-radius: 4px 0 0 4px;
  box-shadow: none;
}

body.home .yesterday-dailies__pills {
  padding: 10px;
  border: 2px solid var(--gta-ink);
  border-left: 0;
  border-radius: 0 4px 4px 0;
}

body.home .yesterday-dailies__universe--3d,
body.home .yesterday-dailies__pills--3d {
  --uni: var(--uni-3d);
}

body.home .yesterday-dailies__universe--hd,
body.home .yesterday-dailies__pills--hd {
  --uni: var(--uni-hd);
}

body.home .yesterday-dailies__universe {
  background: var(--uni);
}

body.home .yesterday-dailies__pills {
  background: color-mix(in srgb, var(--uni) 16%, #0a0a0a);
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--uni) 70%, #000),
    3px 4px 0 var(--gta-ink);
}

@media (max-width: 640px) {
  /* Stacked layout: the label caps its column of answers. */
  body.home .yesterday-dailies__table {
    column-gap: 10px;
    row-gap: 0;
  }

  body.home .yesterday-dailies__title {
    margin-bottom: 14px;
  }

  body.home .yesterday-dailies__universe {
    border-radius: 4px 4px 0 0;
  }

  body.home .yesterday-dailies__pills {
    padding: 8px;
    border: 2px solid var(--gta-ink);
    border-top: 0;
    border-radius: 0 0 4px 4px;
  }
}
