@font-face {
  font-family: 'Latin Modern';
  src: url('/fonts/lmroman10-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Latin Modern';
  src: url('/fonts/lmroman10-bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --page-background: #f7f7f6;
  --text-color: #252a2d;
  --accent-color: #245466;
  --accent-hover: #193e4e;
  --muted-color: #65747b;
  --border-color: #d7dcde;
  --surface-color: #fff;
  --surface-soft: #f4f7f7;
  --surface-active: #e8f1f2;
  --shadow-soft: 0 8px 28px rgba(33, 60, 69, .045);
  --tile-background: #e9edee;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--page-background);
  color: var(--text-color);
  font-family: 'Latin Modern', Georgia, serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; }
a { color: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 82px;
  padding: 20px clamp(24px, 4.2vw, 64px);
  border-bottom: 1px solid var(--border-color);
}
.site-name {
  color: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .025em;
  text-decoration: none;
  white-space: nowrap;
}
.menu { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:12px clamp(20px, 2.7vw, 40px); }
.menu a { color:inherit; font-size:1.26rem; line-height:1.4; text-decoration:none; text-underline-offset:6px; transition:color 150ms ease; }
.menu a[aria-current="page"] { font-weight:700; color:var(--accent-color); }
.menu a:hover, .menu a:focus-visible, .site-name:hover, .site-name:focus-visible {
  color:var(--accent-color); text-decoration:underline; text-decoration-thickness:1px;
}
.site-page, .page {
  width:min(1160px, 100%);
  margin:0 auto;
  padding:clamp(36px, 4.1vw, 58px) clamp(24px, 4.2vw, 64px) 90px;
}
.site-page--wide { width:min(1360px, 100%); }
.site-page--atlas { width:min(1450px, 100%); }
.site-page--reading { width:min(1050px, 100%); }
.page-heading, .heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:22px;
  padding-bottom:27px;
  margin:0 0 28px;
  border-bottom:1px solid var(--border-color);
}
.page-heading > div { min-width:0; }
.page-eyebrow {
  margin:0 0 10px;
  color:var(--accent-color);
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.13em;
  line-height:1.4;
}
.page-heading h1, .page-title {
  margin:0 0 10px;
  color:var(--text-color);
  font-size:clamp(2.3rem, 4.2vw, 3.35rem);
  line-height:1.14;
  font-weight:700;
  letter-spacing:-.01em;
}
.page-intro {
  margin:0;
  color:var(--muted-color);
  font-size:1.13rem;
  line-height:1.55;
  max-width:730px;
}
.surface-card {
  background:var(--surface-color);
  border:1px solid var(--border-color);
  border-radius:7px;
  box-shadow:var(--shadow-soft);
}
.ui-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:43px;
  padding:9px 17px;
  border:1px solid var(--accent-color);
  border-radius:4px;
  background:var(--surface-color);
  color:var(--accent-color);
  font-size:1.03rem;
  font-weight:700;
  line-height:1.25;
  text-decoration:none;
  transition:background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ui-button:hover:not(:disabled) { background:var(--surface-active); }
.ui-button--primary, .ui-button[aria-pressed="true"] { background:var(--accent-color);color:#fff; }
.ui-button--primary:hover:not(:disabled), .ui-button[aria-pressed="true"]:hover:not(:disabled) { background:var(--accent-hover);color:#fff; }
.ui-button:disabled { opacity:.5;cursor:not-allowed; }
.ui-input {
  width:100%; min-width:0; padding:9px 12px; border:1px solid #bdcbd0;
  border-radius:4px; background:var(--surface-color); color:var(--text-color);
  font-size:1.04rem;line-height:1.35;
}
.games-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:36px 26px;
  margin:0;
  padding:0;
}
.game-card { display:block; min-width:0; color:inherit; text-decoration:none; }
.game-cover {
  position: relative;
  display: flex;
  aspect-ratio: 16/10;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: linear-gradient(135deg, #edf0f1, #e1e8eb);
  transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}

.game-card:nth-child(10n+1) .game-cover {
  background: linear-gradient(135deg, #edf0f1, #e1e8eb);
}

.game-card:nth-child(10n+2) .game-cover {
  background: linear-gradient(135deg, #f0eeeb, #e7e3df);
}

.game-card:nth-child(10n+3) .game-cover {
  background: linear-gradient(135deg, #edf0ed, #e3e8e5);
}

.game-card:nth-child(10n+4) .game-cover {
  background: linear-gradient(135deg, #f0ebeb, #e7dfdf);
}

.game-card:nth-child(10n+5) .game-cover {
  background: linear-gradient(135deg, #edebf1, #e2dee8);
}

.game-card:nth-child(10n+6) .game-cover {
  background: linear-gradient(135deg, #f1f0eb, #e8e6de);
}

.game-card:nth-child(10n+7) .game-cover {
  background: linear-gradient(135deg, #ebf1ef, #dee8e6);
}

.game-card:nth-child(10n+8) .game-cover {
  background: linear-gradient(135deg, #f1ebee, #e8dee4);
}

.game-card:nth-child(10n+9) .game-cover {
  background: linear-gradient(135deg, #ebecf1, #dee1e8);
}

.game-card:nth-child(10n+10) .game-cover {
  background: linear-gradient(135deg, #f1edeb, #e8e2de);
}

.cover-monogram { color:#6c8591;font-size:clamp(2.7rem,5vw,4.4rem);font-weight:400;line-height:1;user-select:none; }
.game-title { display:block; margin-top:13px; font-size:1.3rem; font-weight:700;line-height:1.35; text-align:center; }
.game-description { display:block; margin:6px auto 0; font-size:1rem;line-height:1.4;color:var(--muted-color);text-align:center; }
.game-card:hover .game-cover, .game-card:focus-visible .game-cover {
  transform:translateY(-3px);border-color:#acbbc1;box-shadow:0 9px 22px rgba(28,54,65,.09);
}
.game-card:hover .game-title, .game-card:focus-visible .game-title { color:var(--accent-color); }
@media(max-width:900px) { .games-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:740px) {
  .site-header { align-items:center;flex-direction:column;gap:15px;padding:20px 24px; }
  .menu { justify-content:center;gap:10px 24px; }
  .menu a { font-size:1.12rem; }
  .site-page, .page { padding:32px 24px 62px; }
  .page-heading,.heading { align-items:flex-start;flex-direction:column;gap:18px; }
  .page-heading h1,.page-title { font-size:clamp(2.1rem,7vw,2.7rem); }
  .page-intro { font-size:1.05rem; }
  .games-grid { gap:28px 18px; }
  .game-title { font-size:1.19rem; }
}
@media(max-width:520px) { .games-grid { grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { transition:none!important; } }
