/* ─────────────────────────────────────────────────────────────────
   Farseer Games — base styles
   text-first, minimal, paper-and-screen friendly
   ───────────────────────────────────────────────────────────────── */

:root {
  /* Dark (default) — neutral near-black */
  --bg: #181818;
  --bg-elev: #1f1f1f;
  --ink: #ece8dc;
  --ink-soft: #b6b1a3;
  --ink-mute: #7a7770;
  --ink-faint: #4a4842;
  --rule: #2c2c2a;
  --rule-soft: #232322;
  --accent: #6fc3cb;
  --accent-ink: #101414;

  /* tokens */
  --col-wide: 1280px;
  --gutter: clamp(20px, 4vw, 64px);

  --fs-base: 16px;
  --fs-meta: 11px;
  --fs-body: 15px;
  --fs-page: clamp(40px, 6vw, 72px);

  --lh-body: 1.65;

  --ease: cubic-bezier(.2, .6, .2, 1);
}

:root[data-theme="light"] {
  --bg: #f3eee2;
  --bg-elev: #ebe5d4;
  --ink: #1a1815;
  --ink-soft: #3a3832;
  --ink-mute: #6e6a60;
  --ink-faint: #a8a293;
  --rule: #cfc8b6;
  --rule-soft: #ded7c3;
  --accent: #10656e;
  --accent-ink: #f3eee2;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  transition: background-color 320ms var(--ease), color 320ms var(--ease);
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.t-label {
  font-size: var(--fs-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ─── Page shell ───────────────────────────────────────────────── */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px var(--gutter) 24px;
  background: linear-gradient(to bottom, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  transition: transform 360ms var(--ease), opacity 360ms var(--ease);
}

.topbar.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.logo {
  font-size: 11px;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink);
}

.logo span {
  display: block;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav a {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  transition: color 200ms var(--ease);
  position: relative;
}

.nav a:hover,
.nav a.is-active {
  color: var(--ink);
}

.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: var(--accent);
}

.theme-btn {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: 3px 10px;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}

.theme-btn:hover {
  color: var(--ink);
  border-color: var(--ink-mute);
}

/* ─── Page header ──────────────────────────────────────────────── */
.page-head {
  padding: 56px var(--gutter) 32px;
}

.page-head h1 {
  margin: 0 0 24px;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: var(--fs-page);
  line-height: 0.95;
  letter-spacing: 0.005em;
}

.page-head__sub {
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: var(--fs-body);
  line-height: 1.55;
  margin: 0;
  text-wrap: pretty;
}

/* ─── GAMES LIST — ledger rows ────────────────────────────────── */
.ledger {
  padding: 24px var(--gutter) 96px;
  max-width: var(--col-wide);
  margin: 0 auto;
  width: 100%;
}

.ledger__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.ledger__head h2 {
  margin: 0;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 1;
}

.ledger__head h2 .slash {
  color: var(--ink-faint);
  margin-left: 8px;
  font-size: 22px;
}

.game-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  column-gap: 20px;
  row-gap: 6px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: baseline;
  position: relative;
}

.game-row:last-child {
  border-bottom: 0;
}

.game-row__num {
  color: var(--ink-mute);
  font-size: var(--fs-meta);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  grid-row: 1;
}

.game-row__title {
  font-family: "Oswald", sans-serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.15;
  transition: color 200ms var(--ease);
  grid-row: 1;
  grid-column: 2;
}

.game-row__status {
  color: var(--ink-mute);
  font-size: var(--fs-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
  grid-row: 1;
  grid-column: 3;
}

.game-row__status.is-live {
  color: var(--accent);
}

.game-row__premise {
  display: block;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.55;
  margin-top: 2px;
  grid-row: 2;
  grid-column: 2 / -1;
  max-width: 56ch;
  text-wrap: pretty;
}

.game-row__tags {
  grid-row: 3;
  grid-column: 2 / -1;
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
}

.game-row__tags::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--ink-faint);
  flex: 0 0 18px;
  opacity: 0.7;
}

.game-row__tag {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.game-row__tag-sep {
  color: var(--ink-faint);
  font-size: 10px;
  user-select: none;
}

.game-row:hover .game-row__title {
  color: var(--accent);
}

.game-row::before {
  content: "";
  position: absolute;
  left: calc(var(--gutter) * -1 + 8px);
  top: 26px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 320ms var(--ease);
}

.game-row:hover::before {
  width: var(--gutter);
}

@media (max-width: 700px) {
  .ledger {
    padding: 16px var(--gutter) 64px;
  }

  .game-row {
    grid-template-columns: 40px 1fr;
    row-gap: 4px;
  }

  .game-row__status {
    grid-row: auto;
    grid-column: 2 / -1;
    text-align: left;
    margin-top: 6px;
    font-size: 10px;
  }

  .game-row__title {
    font-size: 21px;
  }

  .game-row__tags {
    margin-top: 6px;
  }

  .ledger__head h2 {
    font-size: 26px;
  }
}

/* ─── Notice — placeholder standing in for a game build ───────── */
.notice {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  padding: 80px var(--gutter);
}

.notice h1 {
  margin: 0;
  font-family: "Oswald", sans-serif;
  font-weight: 500;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1;
  letter-spacing: 0.005em;
}

.notice p {
  margin: 0;
  max-width: 44ch;
  color: var(--ink-soft);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-wrap: pretty;
}

.link-back {
  margin-top: 8px;
  font-size: var(--fs-meta);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 3px;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}

.link-back:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ─── Footer ──────────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--rule-soft);
}

.footer__bottom {
  padding: 24px var(--gutter) 32px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  color: var(--ink-mute);
  font-size: var(--fs-meta);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  transition: color 200ms var(--ease);
}

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

@media (max-width: 560px) {
  .footer__bottom {
    flex-direction: column;
    gap: 12px;
  }
}

/* ─── Quiet entry animations ──────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.enter {
  animation: fadeUp 600ms var(--ease) both;
}

.enter[data-i="0"] { animation-delay: 0ms; }
.enter[data-i="1"] { animation-delay: 40ms; }
.enter[data-i="2"] { animation-delay: 80ms; }
.enter[data-i="3"] { animation-delay: 120ms; }
.enter[data-i="4"] { animation-delay: 160ms; }
.enter[data-i="5"] { animation-delay: 200ms; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
