/* Boltplay — public site styles.
 *
 * A game portal, not a portfolio: dark surface so game art carries the page, tiles that
 * are mostly artwork, and one loud accent reserved for "play". Nothing here is loaded
 * from a CDN — system font stacks only, matching the project's no-external-assets rule.
 */

:root {
  --bg: #0b0d12;
  --surface: #141821;
  --surface-2: #1b2130;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf6;
  --muted: #98a2b8;
  --accent: #ffd60a;
  --accent-ink: #14161d;
  --radius: 14px;
  --radius-lg: 20px;
  --wrap: 1240px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* --- base ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.eyebrow {
  margin: 0 0 12px;
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
  background: hsl(var(--hue, 220) 85% 62%);
}

/* --- masthead ------------------------------------------------------------ */

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 13, 18, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.masthead-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 62px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.wordmark .bolt {
  width: 22px;
  height: 22px;
  fill: var(--accent);
  flex: none;
}

.masthead-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}
.masthead-nav a { color: var(--muted); text-decoration: none; }
.masthead-nav a:hover { color: var(--text); }

.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.16);
}

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: #ffe14d; }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
  font-family: inherit;
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--muted); }

.btn-lg { padding: 14px 26px; font-size: 16px; }

/* --- hero ---------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  max-width: var(--wrap);
  margin: 34px auto 10px;
  padding-inline: 20px;
}

.hero-art {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  aspect-ratio: 16 / 9;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(11, 13, 18, 0.55) 0%, rgba(11, 13, 18, 0) 55%);
  pointer-events: none;
}
.hero-art:hover img { transform: scale(1.02); }
.hero-art img { transition: transform 0.4s ease; }

.hero-body h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 850;
  margin-bottom: 14px;
}

.hero-lede {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16.5px;
  max-width: 52ch;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- toolbar ------------------------------------------------------------- */

.toolbar {
  position: sticky;
  top: 62px;
  z-index: 20;
  background: rgba(11, 13, 18, 0.9);
  backdrop-filter: blur(10px);
  border-block: 1px solid var(--line);
  margin-top: 30px;
}

.toolbar-in {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 12px;
  flex-wrap: wrap;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: none;
}
.search svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.search input {
  width: 232px;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); }

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}
.chip {
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 13px/1 var(--sans);
  text-transform: capitalize;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
}

.count {
  margin: 0;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: none;
}

/* --- grid ---------------------------------------------------------------- */

.shelf { padding: 30px 0 60px; }

.shelf-title {
  font-size: 19px;
  font-weight: 750;
  margin: 6px 0 18px;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 20px 18px;
}

.card { position: relative; min-width: 0; }
.card[hidden] { display: none; }

.card-link {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
}

.shot {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 19px;
  color: var(--accent-ink);
  opacity: 0;
  transition: opacity 0.18s ease;
  background: rgba(11, 13, 18, 0.42);
}
.play-badge::before {
  content: "";
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
}
.play-badge { text-indent: 3px; }

.card-link:hover .shot img,
.card-link:focus-visible .shot img { transform: scale(1.06); }
.card-link:hover .play-badge,
.card-link:focus-visible .play-badge { opacity: 1; }
.card-link:hover .shot { border-color: var(--line-strong); }

.card-body {
  display: block;
  padding: 10px 2px 0;
}

.card-title {
  display: block;
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  text-transform: capitalize;
}

.card-info {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 13, 18, 0.72);
  color: var(--text);
  font: 600 11px/1.6 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.card:hover .card-info,
.card-info:focus-visible { opacity: 1; }

.shot-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(120% 120% at 25% 15%, hsl(var(--hue, 220) 70% 34%), transparent 60%),
    var(--surface-2);
}

.empty {
  grid-column: 1 / -1;
  padding: 44px 0;
  text-align: center;
  color: var(--muted);
}

/* --- game page ----------------------------------------------------------- */

.play { padding: 22px 0 64px; }

.crumb {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
}
.crumb:hover { color: var(--text); }

.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
}

.stage-poster { position: absolute; inset: 0; }
.stage-poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }

.stage-start {
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: 700 17px/1 var(--sans);
  cursor: pointer;
}
.stage-play {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 26px;
  text-indent: 4px;
  transition: transform 0.16s ease;
  box-shadow: 0 10px 34px rgba(255, 214, 10, 0.28);
}
.stage-start:hover .stage-play { transform: scale(1.08); }

.stage-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.stage.is-live { background: #000; }

.play-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 2px 0;
}

.play-meta h1 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 820;
}

.play-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  text-transform: capitalize;
}
.play-tags .sep { opacity: 0.5; }

.play-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.play-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 30px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.sub {
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.play-lede { margin: 0; color: #c7cfe0; }
.play-controls { margin: 0; color: #c7cfe0; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; }

.rail {
  list-style: none;
  margin: 0;
  padding: 0 0 4px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 16px;
}
.rail a { text-decoration: none; display: block; }
.rail .shot { margin-bottom: 8px; }
.rail a:hover .shot { border-color: var(--line-strong); }
.rail a:hover .shot img { transform: scale(1.06); }

/* --- footer -------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--muted);
  font-size: 13.5px;
}
.foot-in {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 22px;
  }
  .play-cols { grid-template-columns: 1fr; gap: 24px; }
  .toolbar { position: static; }
}

@media (max-width: 620px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
  .search input { width: 100%; }
  .search { flex: 1 1 100%; }
  .count { display: none; }
  .masthead-nav a { display: none; }
  .play-bar { align-items: flex-start; }
  .stage-start { font-size: 15px; }
  .stage-play { width: 60px; height: 60px; font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .card-link:hover .shot img, .rail a:hover .shot img, .hero-art:hover img { transform: none; }
}
