@font-face {
  font-family: Inter;
  src: url('assets/Inter.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --background: #0c2d40;
  --panel: #103449;
  --text: #f5f8fa;
  --muted: #a7bfcd;
  --accent: #00b7ee;
  --line: #2c4c5e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
button, a { touch-action: manipulation; }
img { display: block; max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--accent); color: var(--background); }
.wrap { width: calc(100% - 40px); max-width: 1120px; margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 12px; background: var(--text); color: var(--background); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.logo-header { display: flex; justify-content: center; padding-block: 24px 28px; }
.site-logo { width: 280px; max-width: 100%; margin: 0; }
.site-logo img { width: 100%; mix-blend-mode: lighten; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 25px; min-height: 46px; border: 0; border-radius: 4px; padding: 12px 18px; background: var(--accent); color: #052637; font-size: 13px; font-weight: 650; }
.button:hover { background: #54cfff; }
.button span { font-size: 18px; }

.games-section { padding-bottom: 58px; }
h2 { margin: 0 0 25px; font-size: 25px; font-weight: 600; letter-spacing: -.6px; }
.game-grid { display: grid; gap: 30px; }
.game-card { min-width: 0; }
.game-cover { display: flex; align-items: center; justify-content: center; width: 100%; height: 218px; padding: 0; overflow: hidden; border: 0; border-radius: 6px; }
.game-cover:hover { filter: brightness(1.06); }
.dough-cover { background: #f4e7cf; padding: 25px; }
.dough-cover img { width: 100%; }
.sage-cover { background: #f7e9ce; }
.sage-cover img { width: 100%; height: 100%; object-fit: contain; }
.spike-cover { background: #10131d; }
.spike-cover img { width: auto; height: 100%; object-fit: contain; }
.game-info { padding-top: 20px; }
.game-info h2 { font-size: 20px; font-weight: 600; letter-spacing: -.5px; margin: 0 0 11px; }
.game-info p { margin: 0; min-height: 48px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; margin-top: 16px; border-top: 1px solid var(--line); }
.card-bottom > span { color: var(--muted); font-size: 11px; }
.text-button { min-height: 44px; padding: 7px 0 7px 10px; background: none; border: 0; color: var(--text); font-size: 12px; }
.text-button span { color: var(--accent); margin-left: 6px; }
.text-button:hover { color: var(--accent); }

.game-dialog { max-width: 820px; width: calc(100% - 28px); max-height: 90dvh; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); overflow: auto; }
.game-dialog::backdrop { background: #04101cdd; }
.game-dialog[open] { display: grid; }
.dialog-close { position: absolute; right: 12px; top: 12px; z-index: 2; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 4px; background: var(--background); font-size: 28px; }
.dialog-image { display: flex; align-items: center; justify-content: center; height: 250px; background: #081e2b; }
.dialog-image img { width: 100%; height: 100%; object-fit: contain; }
.dialog-content { padding: 28px; }
.dialog-label { color: var(--accent); font-size: 12px; margin: 0 0 14px; }
.dialog-content h2 { margin-bottom: 18px; font-size: 30px; }
.dialog-content > p:not(.dialog-label) { color: var(--muted); font-size: 13px; line-height: 1.8; }
.dialog-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 22px; }
.dialog-tags span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 3px; font-size: 11px; }
.dialog-status { padding-top: 18px; margin-bottom: 24px; border-top: 1px solid var(--line); }
.dialog-done { width: 100%; }

.privacy-page { max-width: 760px; margin-inline: auto; padding: 24px 20px 64px; }
.privacy-page h1 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 40px); line-height: 1.2; letter-spacing: -1px; }
.privacy-game { margin: 0 0 32px; color: var(--muted); font-size: 16px; }
.privacy-content { font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.privacy-content h2 { margin: 32px 0 12px; font-size: 20px; line-height: 1.4; }
.privacy-content p { margin: 0 0 18px; }
.privacy-content ul { margin: 0 0 18px; padding-left: 24px; }
.privacy-content li { margin-bottom: 6px; }
.privacy-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.privacy-content a:hover { color: var(--text); }

@media (min-width: 640px) {
  .wrap { width: calc(100% - 80px); }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 24px; }
  .game-dialog[open] { grid-template-columns: 42% 58%; }
  .dialog-image { height: auto; min-height: 480px; }
  .dialog-image img { max-height: 600px; }
  .dialog-content { padding: 50px 30px 30px; }
}

@media (min-width: 1000px) {
  .wrap { width: calc(100% - 120px); }
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-cover { height: 210px; }
  .games-section { padding-bottom: 65px; }
}

@media (max-width: 479px) {
  .logo-header { padding-block: 12px 20px; }
  .site-logo { width: 230px; }
}

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