/* ==========================================================
   WillSim Games
   Same palette and fonts as the FOCOM page - change them in :root.
   ========================================================== */
:root {
  --bg:        #0f120e;
  --bg-lift:   #1b2019;   /* soft glow at the top of the page */
  --text:      #ecebe0;
  --muted:     #b9b9a8;
  --accent:    #c8b877;
  --accent-ink:#14170f;

  --card-ratio: 3 / 4;    /* portrait. Use 2 / 3 for taller cards, 4 / 5 for shorter */
  --card-width: 22rem;

  --font-head: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at top, var(--bg-lift) 0%, var(--bg) 65%) no-repeat, var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
header {
  padding: 2.5rem 1.5rem 0.5rem;
  text-align: center;
}

.logo {
  display: block;
  width: min(300px, 65vw);
  height: auto;
  margin: 0 auto;
}

.wordmark {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  line-height: 1;
  letter-spacing: 0.04em;
}

/* ---------- The two game cards ---------- */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), var(--card-width)));
  justify-content: center;
  gap: 1.75rem;
}

.card {
  position: relative;
  display: block;
  aspect-ratio: var(--card-ratio);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #1a1f18;
  color: var(--text);
  text-decoration: none;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}

.card img,
.card .placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* fills the portrait card; use "contain" to never crop */
  transition: transform .5s;
}

/* Shown if a photo is missing from /media */
.card .placeholder {
  background: linear-gradient(160deg, #2a3126, #141812);
}

/* Dark fade at the bottom so the title is always readable */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 38%, transparent 62%);
  pointer-events: none;
}

.card-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.4rem;
  text-shadow: 0 1px 10px rgba(0,0,0,.7);
}

.badge {
  margin-bottom: 0.6rem;
  padding: 0.15rem 0.6rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 3px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-shadow: none;
}

.card-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2rem, 7vw, 2.6rem);
  line-height: 1.05;
}

.card-sub {
  margin-top: 0.25rem;
  color: var(--muted);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(0,0,0,.55);
}
.card:hover img,
.card:focus-visible img { transform: scale(1.04); }

a:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 4px;
}

/* ---------- Footer ---------- */
footer {
  padding: 1.25rem 1.5rem 1.75rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- Respect "reduce motion" settings ---------- */
@media (prefers-reduced-motion: reduce) {
  .card, .card img { transition: none; }
  .card:hover, .card:focus-visible { transform: none; }
  .card:hover img, .card:focus-visible img { transform: none; }
}
