/* ------------------------------------------------------------------
   LVGameDev site styles.
   Layered on top of the theme's purged Tailwind build (css/main.css),
   so anything new lives here rather than depending on a Tailwind rebuild.
   Dark mode follows the theme: `html.dark` toggled by js/main.js.
   ------------------------------------------------------------------ */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, .08), 0 18px 44px rgba(15, 23, 42, .16);
  --radius: 16px;
}

html.dark {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #334155;
  --border: #334155;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-text: #0b1220;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .5), 0 18px 44px rgba(0, 0, 0, .55);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Light/dark-only images: hide the wrong one before JS runs (JS then takes over) */
html.dark .lightOnly { display: none; }
html:not(.dark) .darkOnly { display: none; }

#navbar { border-bottom: 1px solid var(--border); }

.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1.125rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); }

/* ---------- Hero (home) ---------- */
.hero {
  max-width: 56rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2rem;
  text-align: center;
}
.hero__logo {
  display: block;
  height: clamp(150px, 22vw, 230px);
  width: auto;
  margin: 0 auto 1.5rem;
}
.hero__lead {
  max-width: 40rem;
  margin: 0 auto 1.75rem;
  font-size: clamp(1.125rem, .75rem + 1.2vw, 1.375rem);
  line-height: 1.6;
  color: var(--muted);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
}

/* ---------- Sections ---------- */
.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem;
}
.section--page { padding-top: 2.5rem; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.section__title {
  margin: 0;
  padding: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.section__link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.section__link:hover { text-decoration: underline; }

.page-head { margin-bottom: 1.75rem; }
.page-head__title {
  margin: 0 0 .5rem;
  font-size: clamp(1.75rem, 1rem + 2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.page-head__lead {
  margin: 0;
  max-width: 44rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Game cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.game-stack {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
  transition: transform .2s ease, box-shadow .2s ease;
}
.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.game-card__media {
  display: block;
  aspect-ratio: 616 / 353;
  background: var(--surface-2);
}
.game-card__media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.25rem 1.5rem 1.5rem;
}
.game-card__title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.game-card__tagline {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}
.game-card__meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .9rem;
  font-size: .875rem;
  color: var(--muted);
}
.game-card__facts {
  margin: .25rem 0 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .4rem 1.25rem;
  font-size: .95rem;
}
.game-card__facts dt { color: var(--muted); font-weight: 600; }
.game-card__facts dd { margin: 0; }
.game-card__actions {
  margin-top: auto;
  padding-top: .5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

@media (min-width: 768px) {
  .game-card--detailed { flex-direction: row; }
  .game-card--detailed .game-card__media { flex: 0 0 46%; aspect-ratio: auto; }
  .game-card--detailed .game-card__body { padding: 1.75rem 2rem; }
  .game-card--detailed .game-card__title { font-size: 1.625rem; }
}

.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge--positive { background: rgba(22, 163, 74, .12); color: #15803d; }
html.dark .badge--positive { background: rgba(34, 197, 94, .18); color: #4ade80; }
.badge--mixed { background: rgba(217, 119, 6, .12); color: #b45309; }
html.dark .badge--mixed { background: rgba(245, 158, 11, .18); color: #fbbf24; }

/* ---------- Generic page (contact) ---------- */
.page-card {
  max-width: 44rem;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  line-height: 1.65;
}
#page-content a { color: var(--accent); }
#page-content p { padding: .5rem 0; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.site-footer__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2rem;
  text-align: center;
  font-size: .875rem;
  color: var(--muted);
}
.site-footer__inner p { margin: 0 0 .35rem; }
.site-footer__copy { color: var(--text); font-weight: 600; }
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: .75rem;
}
.site-footer__nav a { color: var(--muted); text-decoration: none; }
.site-footer__nav a:hover { color: var(--text); text-decoration: underline; }
