:root {
  --bg: #0c0d0f;
  --text: #f4f2ee;
  --text-soft: rgba(244, 242, 238, .82);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Κάθε παιχνίδι πιάνει όλο το ύψος της οθόνης */
.tile {
  position: relative;
  min-height: 50vh;
  min-height: 50svh; 
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(160deg, var(--accent), #0c0d0f 85%);
}

/* Αν ο αριθμός των παιχνιδιών είναι μονός, το τελευταίο πιάνει όλο το πλάτος */
.tile:last-child:nth-child(odd) { grid-column: 1 / -1; }

.tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .9s ease, transform 1.4s cubic-bezier(.2, .6, .2, 1);
}
.tile-img.is-loaded { opacity: 1; transform: scale(1); }
.tile.no-img .tile-img { display: none; }

.tile:hover .tile-img.is-loaded { transform: scale(1.035); }

/* Σκίαση για να διαβάζεται το κείμενο πάνω σε οποιαδήποτε εικόνα */
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(8, 9, 11, .88) 0%, rgba(8, 9, 11, .5) 38%, rgba(8, 9, 11, 0) 70%);
}

.tile-body {
  width: 100%;
  max-width: 34rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  padding-bottom: max(clamp(1.75rem, 5vw, 4rem), env(safe-area-inset-bottom));
}

h2 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.tile-body p {
  margin-top: .85rem;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.5;
  color: var(--text-soft);
  max-width: 30rem;
}

.btn {
  display: inline-block;
  margin-top: 1.6rem;
  padding: .85rem 1.7rem;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
/* Όλη η κάρτα είναι clickable */
.btn::after { content: ""; position: absolute; inset: 0; }

.tile:hover .btn,
.btn:focus-visible { background: var(--text); color: #0c0d0f; }
.btn:focus-visible { outline: 3px solid var(--text); outline-offset: 4px; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Mobile: ένα παιχνίδι ανά row */
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .tile { min-height: 85vh; min-height: 85svh; }
  .tile-body { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tile-img, .btn { transition: none; }
  .tile-img { transform: none; }
}
