/* ============================================================
   Games hub — Directory, built on ArekUI Brutalist (vendored).
   Ruled Sheet grammar: paper, dot grid, ink hairlines, one
   signal orange, zero radius, no shadows, mono everywhere.
   Tiles are plain links — no status copy anywhere on this page.
   ============================================================ */

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

body {
  min-height: 100vh;
  caret-color: var(--ar-accent);
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--ar-base-content);
  color: var(--ar-base-100);
}

:focus-visible {
  outline: 2px solid var(--ar-base-content);
  outline-offset: 2px;
}

/* Respect the OS-level motion preference. */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Shell (snake's masthead grammar) ---------------------- */

.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 28px) clamp(14px, 3vw, 40px) 64px;
}

.masthead {
  border-top: 3px solid var(--ar-base-content);
  padding-top: 14px;
  margin-bottom: clamp(18px, 2vw, 26px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.masthead h1 {
  margin: 0;
  font-size: clamp(3rem, 8.2vw, 7.375rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.masthead .mark {
  color: var(--ar-accent);
}

.meta {
  text-align: right;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ar-gray-600);
}

.meta p {
  margin: 0 0 4px;
}

.meta p:last-child {
  margin-bottom: 0;
}

.meta .meta-accent {
  color: var(--ar-base-content);
}

/* --- Directory: ruled cabinets ----------------------------- */

.directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}

.tile {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--ar-base-content);
  background: var(--ar-base-100);
  color: inherit;
  text-decoration: none;
  transition: transform 0.12s ease;
}

/* The cabinet lifts like the board does — paper stays put. */
.tile:hover,
.tile:focus-visible {
  transform: translateY(-4px);
  outline-offset: 4px;
}

.tile-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-bottom: 2px solid var(--ar-base-content);
  background: var(--ar-base-200);
}

/* Preview art arrives later (screenshots pending): the cabinet
   keeps its ruled shape with a quiet ruled-sheet placeholder. */
.tile-img[hidden] {
  display: none;
}

.tile-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.tile-name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tile-name .mark {
  color: var(--ar-accent);
}

.tile-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ar-gray-600);
}

.tile-sub {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--ar-base-content);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ar-base-content);
}

/* --- Footer ------------------------------------------------ */

footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 50;
  background: var(--ar-base-content);
  color: var(--ar-base-100);
  text-align: center;
  padding: 10px 16px;
  font-size: 0.6875rem;
  margin: 0;
}

footer a {
  color: var(--ar-base-100);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

footer a:hover {
  color: var(--ar-accent);
}
