@font-face {
  font-family: Barlow;
  src: url('/assets/barlow-condensed-extrabold.ttf') format('truetype');
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  --background: #0e0f11;
  --surface: #08090a;
  --accent: #b90000;
  --text: #fff;
  --muted: #b7b7ba;
  --line: #343438;
  color-scheme: dark;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  color: var(--text);
  background: var(--background);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a, button, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:focus-visible, summary:focus-visible { outline: 2px solid #fff; outline-offset: 6px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, figure { margin: 0; }
h1, h2, .brand, .footer-brand { font-family: Barlow, 'Arial Narrow', Impact, sans-serif; font-weight: 800; }
.wrap { width: min(1040px, calc(100% - 64px)); margin-inline: auto; }

.site-header {
  width: min(1120px, calc(100% - 64px));
  height: 88px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  z-index: 2;
}
.brand { font-size: 28px; white-space: nowrap; }
nav { display: flex; align-items: center; gap: 32px; font-size: 15px; }
nav a { padding-block: 12px; }
nav a:hover, .site-footer a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 7px; }
nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.nav-download {
  padding: 11px 23px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  font-weight: 700;
  box-shadow: none;
}
nav .nav-download:hover { background: #d00000; border-color: #d00000; text-decoration: none; }

.hero {
  position: relative;
  min-height: 680px;
  height: min(760px, calc(100svh - 88px));
  overflow: hidden;
  background: #420000;
}
.hero-art { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 50% 53%; }
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(175deg, rgb(70 0 0 / 90%) 0%, rgb(66 0 0) 25%, rgb(115 0 0 / 29%) 58%, #0e0f11c9 80%), linear-gradient(0deg, rgb(14 15 17), transparent 24%);
}
.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(720px, calc(100% - 48px));
  margin-inline: auto;
  padding: 48px 0 100px;
  text-align: center;
}
.hero h1 { width: 100%; line-height: 1; }
.hero-logo { width: clamp(300px, 34vw, 440px); margin-inline: auto; }
.hero-copy > p { font-size: 26px; font-weight: 700; line-height: 1.35; margin: 24px 0 27px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  padding: 16px 30px;
  background: var(--accent);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  border: 1px solid var(--accent);
  border-radius: 999px;
  line-height: 1.3;
  box-shadow: none;
}
.button:hover { background: #d00000; border-color: #d00000; }
.download-details { font-size: 13px; color: #ddd; margin-top: 16px; }
.download-details span { padding-inline: 9px; color: #929296; }
.hero-foot { position: absolute; bottom: 24px; left: 24px; right: 24px; display: flex; justify-content: center; font-size: 13px; }
.hero-foot a { color: #eee; padding: 10px; }
.hero-foot a span { padding-left: 10px; }

.gameplay { background: var(--surface); padding: 70px 0 58px; }
.section-intro { max-width: 760px; margin-inline: auto; padding-bottom: 36px; text-align: center; }
.section-intro h2 { font-size: clamp(40px, 4.6vw, 58px); line-height: 1.05; }
.section-intro p { font-size: 17px; line-height: 1.6; color: var(--muted); margin-top: 16px; }
.scene-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.scene-grid figure { min-width: 0; text-align: center; }
.scene-grid img { width: 100%; aspect-ratio: 1446 / 1088; object-fit: cover; background: var(--background); border: 1px solid var(--line); border-radius: 4px; }
.scene-grid figcaption { font-size: 16px; font-weight: 700; line-height: 1.4; padding-top: 17px; }
.last-call { display: flex; flex-direction: column; align-items: center; gap: 25px; padding-block: 62px 70px; text-align: center; }
.last-call h2 { font-size: 52px; line-height: 1; }
.last-call p { margin-top: 14px; color: var(--muted); font-size: 17px; }
.button-quiet { background: transparent; border-color: #85858b; }
.button-quiet:hover { background: var(--accent); border-color: var(--accent); }

.site-footer { border-top: 1px solid var(--line); padding-block: 32px 38px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.footer-brand { font-size: 26px; color: var(--text); }
.site-footer > div { display: flex; justify-content: center; gap: 26px; margin-top: 7px; }

.catalog { min-height: calc(100svh - 270px); padding-bottom: 72px; }
.page-intro { padding: 46px 0 48px; text-align: center; }
.back-link { font-size: 14px; display: inline-block; margin-bottom: 28px; }
.back-link:hover, .text-link:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.page-intro h1 { font-size: clamp(64px, 8vw, 104px); line-height: 1; letter-spacing: -.7px; }
.page-intro > p { max-width: 640px; margin: 18px auto 0; font-size: 18px; line-height: 1.5; color: var(--muted); }
.board-heading { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 24px; }
.board-heading h2 { font-size: 32px; }
.text-link { font-size: 14px; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
thead th { color: var(--muted); font-weight: 400; font-size: 13px; padding: 14px 22px; background: #1a1a1d; }
thead th:first-child { width: 12%; }
thead th:nth-child(2) { width: 48%; }
thead th:nth-child(3), thead th:last-child { width: 20%; }
tbody td, tbody th { padding: 24px 22px; border-bottom: 1px solid var(--line); font-weight: 400; font-size: 17px; overflow-wrap: anywhere; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.rank { font-size: 22px; color: var(--muted); }
.score { font-size: 27px; font-weight: 700; }
.time { color: var(--muted); }
.first-place { background: #211112; }
.first-place .rank { color: var(--text); box-shadow: inset 3px 0 var(--accent); }
.board-note { max-width: 660px; font-size: 14px; line-height: 1.7; color: var(--muted); margin: 28px auto 0; text-align: center; }
.empty-board { border-block: 1px solid var(--line); padding: 48px 30px 54px; display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--surface); }
.empty-board img { width: 70px; height: 70px; object-fit: contain; margin-bottom: 22px; }
.empty-board h2 { font-size: 44px; }
.empty-board p { max-width: 420px; color: var(--muted); font-size: 17px; line-height: 1.6; margin: 14px 0 26px; }

.release { border-top: 1px solid #571214; padding: 34px 0 38px; text-align: center; }
.release-stamp { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-bottom: 22px; }
.release-stamp h2 { font-size: 48px; line-height: 1; }
.release-stamp p { font-size: 14px; color: var(--muted); }
.release-tag { display: inline-block; background: var(--accent); color: var(--text); font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.muted-tag { background: #27272c; color: #ddd; }
.release-content > time { font-size: 14px; color: var(--muted); }
.changelog { width: fit-content; max-width: 640px; margin: 20px auto 25px; padding-left: 20px; line-height: 1.7; font-size: 17px; text-align: left; }
.changelog li { padding-left: 4px; margin-bottom: 7px; }
.changelog li::marker { color: #c0c0c3; }
.release-content > p { margin: 20px 0; color: var(--muted); }
.artifact { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 15px 20px; margin-top: 22px; }
.button-small { font-size: 15px; min-height: 46px; padding: 12px 22px; }
.artifact > span { font-size: 13px; color: var(--muted); }
.artifact details { flex-basis: 100%; font-size: 12px; color: var(--muted); margin-top: 2px; }
.artifact summary { cursor: pointer; width: max-content; padding: 5px 0; margin-inline: auto; }
.artifact code { display: block; overflow-wrap: anywhere; font-size: 12px; line-height: 1.8; padding: 12px 0; max-width: 640px; margin-inline: auto; }

.skip-link { position: fixed; top: 12px; opacity: 0; pointer-events: none; left: 20px; z-index: 20; background: var(--accent); color: var(--text); padding: 14px; border-radius: 999px; }
.skip-link:focus { opacity: 1; pointer-events: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 850px) {
  .site-header { height: 76px; }
  .brand { font-size: 25px; }
  nav { gap: 22px; font-size: 14px; }
  .nav-download span { display: none; }
  .hero { min-height: 650px; height: min(720px, calc(100svh - 76px)); }
  .hero-copy { padding-top: 44px; }
  .hero-logo { width: 360px; }
  .hero-copy > p { font-size: 24px; }
  .scene-grid { gap: 18px; }
  .scene-grid figcaption { font-size: 14px; }
}

@media (max-width: 700px) {
  .scene-grid { grid-template-columns: minmax(0, 360px); justify-content: center; gap: 30px; }
  .scene-grid figcaption { font-size: 16px; padding-top: 14px; }
}

@media (max-width: 560px) {
  .wrap, .site-header { width: calc(100% - 40px); }
  .site-header { height: auto; min-height: 108px; flex-direction: column; padding: 18px 0 16px; gap: 12px; }
  .brand { font-size: 25px; }
  nav { justify-content: center; width: 100%; gap: 22px; font-size: 13px; }
  nav a { padding-block: 8px; }
  .nav-download { padding: 9px 16px; }
  .hero { min-height: 0; height: 660px; }
  .hero-art { object-position: 62% center; }
  .hero-copy { width: calc(100% - 40px); padding: 40px 0 96px; }
  .hero-logo { width: min(330px, 100%); }
  .hero-copy > p { font-size: 22px; line-height: 1.35; margin: 23px 0 25px; }
  .button { min-height: 52px; font-size: 15px; padding: 14px 25px; }
  .download-details { font-size: 11px; margin-top: 15px; }
  .download-details span { padding-inline: 6px; }
  .hero-foot { bottom: 21px; font-size: 12px; }
  .gameplay { padding: 48px 0; }
  .section-intro { padding-bottom: 30px; }
  .section-intro h2 { font-size: 42px; }
  .section-intro p { font-size: 16px; margin-top: 13px; }
  .last-call { padding-block: 48px 56px; }
  .last-call h2 { font-size: 46px; }
  .last-call p { font-size: 16px; }
  .site-footer { padding-block: 28px 32px; gap: 12px; }
  .footer-brand { font-size: 24px; }
  .site-footer > div { font-size: 12px; gap: 24px; }
  .catalog { padding-bottom: 48px; }
  .page-intro { padding: 32px 0 38px; }
  .back-link { font-size: 13px; margin-bottom: 25px; }
  .page-intro h1 { font-size: clamp(55px, 16vw, 80px); }
  .page-intro > p { font-size: 16px; margin-top: 16px; }
  .board-heading h2 { font-size: 29px; }
  .text-link { font-size: 12px; }
  thead th { font-size: 11px; padding: 12px 8px; }
  thead th:first-child { width: 13%; }
  thead th:nth-child(2) { width: 40%; }
  thead th:nth-child(3) { width: 22%; }
  thead th:last-child { width: 25%; }
  tbody th, tbody td { padding: 20px 8px; font-size: 13px; }
  .score { font-size: 21px; }
  .rank { font-size: 18px; }
  .time { font-size: 13px; }
  .board-note { font-size: 12px; }
  .empty-board { padding: 36px 20px 42px; }
  .empty-board h2 { font-size: 38px; }
  .empty-board p { font-size: 15px; }
  .release { padding: 29px 0 33px; }
  .release-stamp { gap: 10px 14px; }
  .release-stamp h2 { font-size: 43px; }
  .release-stamp p { font-size: 12px; }
  .release-tag { font-size: 11px; }
  .changelog { font-size: 15px; margin-top: 17px; }
  .artifact { gap: 14px; }
  .artifact > span { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
