/* /css/index.css
   Landing page for synups.club
   Uses global colors and tokens from theme.css
*/

body.index-body {
  margin: 0;
  min-height: 100vh;
  padding: 24px;
  box-sizing: border-box;

  /* Requested: light blue -> dark blue gradient background */
  background: linear-gradient(180deg, #bfe3ff 0%, #0b2a55 100%);
  color: var(--color-text);

  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  display: grid;
  place-items: center;
}

/* Main wrapper */
.landing-wrap {
  width: 100%;
  max-width: 1000px;

  display: grid;
  gap: 32px;
}

/* Intro section */
.intro {
  text-align: center;
  margin-top: -10px;
}

.intro h1 {
  margin: 0 0 8px;
  font-family: "Oswald", system-ui, -apple-system, sans-serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  letter-spacing: 0.03em;
}

.intro-tagline {
  margin: 0;
  font-size: 1.05rem;
  opacity: 0.9;
}

/* Game buttons grid */
.game-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Game card as big launch button */
.game-card {
  position: relative;
  display: grid;

  /* requested: image flush left, so we remove inner padding and move it into text column */
  padding: 0;

  /* less rounded corners */
  border-radius: 10px;

  text-decoration: none;
  color: var(--color-text);

  background: var(--color-surface, #1e1e1e);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);

  overflow: hidden; /* ensures image touches edges cleanly with rounded corners */

  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    background 0.2s ease-out,
    border-color 0.2s ease-out;
}

/* Primary (working) card */
.game-card--primary {
  border: 2px solid var(--color-accent, #ffb347);
}

/* Disabled cards (coming soon) */
.game-card--disabled {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
  border: 2px dashed rgba(255, 255, 255, 0.12);
}

/* Inner layout: square image left (no padding), text right (with padding) */
.game-card-main {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
}

/* Left image panel: square and flush */
.game-card-media {
  width: 120px;
  height: 120px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.game-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Text area: fixed title + 2-line text */
.game-card-text {
  display: grid;
  grid-template-rows: auto auto;
  gap: 6px;

  padding: 14px 16px;
  min-width: 0; /* enables clamping in grid */
}

.game-card-text h2 {
  margin: 0;
  font-family: "Oswald", system-ui, -apple-system, sans-serif;
  font-size: 1.2rem;
  line-height: 1.2;

  /* fixed title block height */
  min-height: calc(1.2em * 1);
}

.game-card-text p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  opacity: 0.9;
  hyphens: auto;

  /* clamp to exactly two lines */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;

  /* fixed 2-line block height */
  min-height: calc(1.35em * 2);
}

/* Hover / focus effects (only meaningful for primary card) */
.game-card--primary:hover,
.game-card--primary:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  outline: none;
}

.game-card--primary:focus-visible {
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.5),
    0 0 0 6px var(--color-accent, #ffb347);
}

/* Small screens tweaks */
@media (max-width: 600px) {
  body.index-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .landing-wrap {
    gap: 24px;
  }

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

  .game-card-main {
    grid-template-columns: 104px 1fr;
  }

  .game-card-media {
    width: 104px;
    height: 104px;
  }

  .game-card-text {
    padding: 12px 14px;
  }

  .game-card-text h2 {
    font-size: 1.15rem;
  }

  .game-card-text p {
    font-size: 0.9rem;
  }
}
