/* Torki Games. Black and white like the logo; the game art brings the colour. */

:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #0f0f0f;
  --border: #1f1f1f;
  --border-hi: #3a3a3a;
  --text: #fff;
  --muted: #9b9b9b;
  --font: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1176px, calc(100% - 64px)); margin-left: auto; margin-right: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: saturate(150%) blur(10px); -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: inline-flex; }
.logo img { height: 40px; width: auto; }
.site-nav { display: flex; gap: 32px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .15s; }
.site-nav a:hover { color: var(--text); }
.site-nav .lang-switch { padding: 3px 9px; border: 1px solid var(--border-hi); border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.site-nav .lang-switch:hover { border-color: var(--text); }
.site-nav { align-items: center; }

/* Hero */
.hero { padding-top: 112px; padding-bottom: 72px; }
.hero h1 {
  max-width: 13em;
  font-size: clamp(40px, 6.4vw, 80px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.hero-sub { max-width: 34em; margin-top: 28px; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; }

/* Game cards */
.games-section { padding-bottom: 120px; }
.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  transition: border-color .2s;
}
.card:hover { border-color: var(--border-hi); }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #161616; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-media img.keep-left { object-position: left center; transform-origin: left center; }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 28px; }
.card-platform { color: var(--muted); font-size: 14px; font-weight: 500; }
.card-title { margin-top: 4px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.card-text { margin-top: 10px; color: #cfcfcf; font-size: 16px; line-height: 1.55; }
.card-fact { margin-top: 14px; margin-bottom: 24px; color: var(--muted); font-size: 14px; }
.btn {
  align-self: flex-start; margin-top: auto;
  display: inline-flex; align-items: center; height: 44px; padding: 0 20px;
  background: var(--text); color: #000; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background-color .15s;
}
.btn:hover { background: #d9d9d9; }

/* Text blocks */
.block { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; padding-top: 56px; padding-bottom: 96px; border-top: 1px solid var(--border); }
.block-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.block-body p { max-width: 32em; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; color: #e6e6e6; }
.block-body p + p { margin-top: 16px; }
.email {
  display: inline-block; margin-top: 16px;
  font-size: clamp(26px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.025em;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--border-hi);
  transition: text-decoration-color .15s;
  word-break: break-word;
}
.email:hover { text-decoration-color: var(--text); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; gap: 32px; padding-top: 32px; padding-bottom: 40px; }
.footer-nav { display: flex; gap: 24px; margin-left: auto; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.footer-nav a:hover { color: var(--text); }
.legal { color: #5c5c5c; font-size: 14px; }
.site-footer .logo img { height: 30px; }

/* Legal pages */
.doc { width: min(760px, calc(100% - 64px)); padding-top: 64px; padding-bottom: 120px; }
.doc-langs { margin-bottom: 40px; color: var(--muted); font-size: 14px; }
.doc-langs a { color: var(--text); }
.doc h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.doc-updated { margin-top: 8px; color: var(--muted); font-size: 14px; }
.doc h2 { margin-top: 40px; margin-bottom: 10px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.doc p { color: #d4d4d4; font-size: 16px; line-height: 1.65; }
.doc p + p { margin-top: 12px; }
.doc a { text-underline-offset: 3px; }
.doc-data { display: grid; grid-template-columns: 180px 1fr; gap: 8px 24px; margin: 16px 0 0; font-size: 16px; }
.doc-data dt { color: var(--muted); }
.doc-data dd { margin: 0; }
.doc-translation { margin-top: 96px; padding-top: 56px; border-top: 1px solid var(--border); }
.todo { padding: 1px 6px; border-radius: 4px; background: #3a2f00; color: #ffd75e; }

/* 404 */
.not-found { padding-top: 120px; padding-bottom: 200px; }
.not-found h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -0.03em; }
.not-found p { margin-top: 12px; color: var(--muted); }
.not-found .btn { margin-top: 32px; }

@media (max-width: 1000px) {
  .games { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 40px); }
  .header-inner { height: 64px; }
  .logo img { height: 34px; }
  .site-nav { gap: 18px; }
  .site-nav a:not(.lang-switch) { font-size: 14px; }
  .hero { padding-top: 56px; padding-bottom: 40px; }
  .hero-sub { margin-top: 20px; }
  .games { grid-template-columns: 1fr; gap: 16px; }
  .games-section { padding-bottom: 72px; }
  .block { grid-template-columns: 1fr; gap: 12px; padding-top: 40px; padding-bottom: 64px; }
  .footer-inner { flex-wrap: wrap; gap: 16px 24px; }
  .footer-nav { margin-left: 0; order: 3; width: 100%; flex-wrap: wrap; gap: 8px 20px; }
  .doc { padding-top: 40px; padding-bottom: 80px; }
  .doc-data { grid-template-columns: 1fr; gap: 2px; }
  .doc-data dd + dt { margin-top: 10px; }
}

@media (max-width: 400px) {
  .nav-about { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-media img { transition: none; }
}
