/* games.thedigitalbeachhead.com — dark game launcher */

:root {
  --bg: #0e1014;
  --surface: #171a20;
  --surface-hi: #20242c;
  --text: #eef0f3;
  --muted: #9aa3ae;
  --line: #262a32;
  --amber: #e0a55a;
  --amber-hi: #ecb874;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 32px;
}
.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.back {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--text); }

/* ---------- Featured game ---------- */
.feature {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(78vh, 720px);
  overflow: hidden;
}
.feature-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}
.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(14, 16, 20, .75) 32%, rgba(14, 16, 20, 0) 65%),
    linear-gradient(to right, rgba(14, 16, 20, .9) 0%, rgba(14, 16, 20, 0) 60%),
    linear-gradient(to bottom, rgba(14, 16, 20, .7) 0%, rgba(14, 16, 20, 0) 18%);
}
.feature-body {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 56px;
}
.feature-label {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--amber);
}
.feature h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}
.feature-text {
  max-width: 34em;
  margin: 18px 0 28px;
  font-size: 18px;
  color: #c9ced5;
}
.feature-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}
.play {
  display: inline-block;
  padding: 14px 26px;
  font-size: 17px;
  font-weight: 700;
  color: #1a1206;
  text-decoration: none;
  background: var(--amber);
  border-radius: 8px;
  transition: background-color .15s;
}
.play:hover { background: var(--amber-hi); }
.needs { font-size: 14px; color: var(--muted); }

/* ---------- Library ---------- */
.library {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 32px 96px;
}
.library h2 {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.card {
  display: block;
  overflow: hidden;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: background-color .2s, border-color .2s, transform .2s;
}
.card:hover {
  background: var(--surface-hi);
  border-color: #353a44;
  transform: translateY(-3px);
}
.card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 10 / 7;
  object-fit: cover;
}
.card-body {
  position: relative;
  padding: 18px 20px 20px;
}
.card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.card p {
  margin: 4px 0 0;
  padding-right: 64px;
  font-size: 15px;
  color: var(--muted);
}
.card-play {
  position: absolute;
  top: 18px;
  right: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #1a1206;
  background: var(--amber);
  border-radius: 999px;
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px 40px;
  font-size: 15px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.footer-links { display: flex; gap: 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .topbar { padding: 16px 20px; }
  .back { font-size: 14px; }
  .feature { min-height: 560px; }
  .feature-body { padding: 0 20px 40px; }
  .feature-text { font-size: 16px; }
  .library { padding: 32px 20px 72px; }
  .grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; align-items: flex-start; padding: 24px 20px 32px; }
  .footer-links { flex-wrap: wrap; gap: 12px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .play { transition: none; }
  .card:hover { transform: none; }
}
