/* HolyFox Games: the same look as the Cubic Mage loading screen and site (ink backdrop, HUD frame, gold rule),
   kept genre-neutral for every game the studio makes. Type: NeoDunggeunmo Pro (OFL) on its 16 px grid.
   One game pixel = 3 CSS px on wide screens, 2 on phones (--p). */

@font-face { font-family: "NeoDGM"; src: url("/assets/fonts/neodgm-regular-latin.woff") format("woff"); font-weight: 400; font-display: swap; unicode-range: U+0020-00FF, U+2013-2026, U+20A9, U+2190-2193, U+25B6; }
@font-face { font-family: "NeoDGM"; src: url("/assets/fonts/neodgm-regular-hangul.woff") format("woff"); font-weight: 400; font-display: swap; unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+AC00-D7A3, U+FF01-FF5E; }

:root {
  --void: #070d19;
  --well: rgba(5, 12, 26, 0.72);
  --frame: #1d3557;
  --gold: #8fe3ff;          /* the studio's accent: sky (Cubic Mage keeps gold) */
  --gold-lit: #e2f8ff;
  --gold-dim: #3f8fb5;
  --text: #dfeaf5;
  --muted: rgba(223, 234, 245, 0.68);
  --p: 3px;
  --max: 1000px;
  --gutter: 16px;
  color-scheme: dark;
}
@media (max-width: 640px) { :root { --p: 2px; } }

* { box-sizing: border-box; }
html { background: var(--void); scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text);
  background: var(--void) url("/assets/img/backdrop.png") center / cover fixed no-repeat;
  image-rendering: pixelated;
  font-family: "NeoDGM", "Malgun Gothic", "Apple SD Gothic Neo", monospace;
  font-size: 16px; line-height: 1.75; letter-spacing: 0.02em;
  -webkit-font-smoothing: none;
}
img { max-width: 100%; height: auto; display: block; image-rendering: auto; }
img.pixel { image-rendering: pixelated; }
a { color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--gold-lit); }
:focus-visible { outline: 2px solid var(--gold-lit); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 32px; line-height: 1.3; font-weight: 400; color: var(--gold); letter-spacing: 0.08em; }
h3 { font-size: 24px; line-height: 1.35; font-weight: 400; color: var(--gold); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.frame {
  border: calc(var(--p) * 4) solid transparent;
  border-image: url("/assets/img/frame.png") 4 / calc(var(--p) * 4) stretch;
  background: var(--well); background-clip: padding-box;
}
.rule {
  width: min(420px, 80%); height: calc(var(--p) * 5); margin: 16px auto 0;
  background:
    url("/assets/img/diamond.png") left center / calc(var(--p) * 5) calc(var(--p) * 5) no-repeat,
    url("/assets/img/diamond.png") center / calc(var(--p) * 5) calc(var(--p) * 5) no-repeat,
    url("/assets/img/diamond.png") right center / calc(var(--p) * 5) calc(var(--p) * 5) no-repeat,
    linear-gradient(rgba(143, 227, 255, 0.6), rgba(143, 227, 255, 0.6)) center / calc(100% - var(--p) * 8) var(--p) no-repeat;
}
.rule.left { margin-left: 0; width: min(240px, 70%); }
.head { text-align: center; margin-bottom: 48px; }
.mt { margin-top: 12px; }

/* top bar */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { font-size: 16px; letter-spacing: 0.25em; color: var(--gold); text-decoration: none; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--gold); }
.nav .lang { color: var(--gold); }
@media (max-width: 560px) { .nav .hide-sm { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 6px 20px;
  border: calc(var(--p) * 4) solid transparent;
  border-image: url("/assets/img/frame.png") 4 / calc(var(--p) * 4) stretch;
  background: var(--well); background-clip: padding-box;
  color: var(--text); text-decoration: none;
}
.btn:hover { background-color: var(--frame); color: var(--gold-lit); }
.btn.go { background-color: var(--gold); color: var(--void); }
.btn.go:hover { background-color: var(--gold-lit); color: var(--void); }
.btn img { width: 16px; height: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px 16px; }

/* hero */
.hero {
  position: relative; min-height: min(100vh, 880px); min-height: min(100svh, 880px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 96px var(--gutter) 64px; text-align: center; overflow: hidden;
}
#motes { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
#cube { position: relative; width: 288px; height: 288px; image-rendering: pixelated; }   /* 72 texels x 4 */
@media (max-width: 640px) { #cube { width: 216px; height: 216px; } }                       /* x 3 */
.hero h1 { position: relative; margin-top: 16px; font-size: 48px; line-height: 1.2; font-weight: 400; letter-spacing: 0.26em; padding-left: 0.26em; color: var(--gold); }
.hero .tagline { position: relative; margin-top: 24px; max-width: 30em; }
.scroll { position: relative; margin-top: 40px; color: var(--muted); text-decoration: none; }
.scroll:hover { color: var(--gold); }

/* the shelf: every game as a tile in one row, locked slots for what is still to come */
.shelf { position: relative; display: flex; justify-content: center; gap: 20px; margin-top: 48px; width: 100%; max-width: 1000px; list-style: none; padding: 0; }
.shelf li { flex: 0 1 300px; min-width: 0; }
.tile { display: block; text-decoration: none; color: var(--text); }
.tile .pic {
  display: block; aspect-ratio: 920 / 430; overflow: hidden; position: relative;
  border: calc(var(--p) * 4) solid transparent;
  border-image: url("/assets/img/frame.png") 4 / calc(var(--p) * 4) stretch;
  background: var(--well); background-clip: padding-box;
  transition: transform 0.12s steps(2);
}
.tile .pic img { width: 100%; height: 100%; object-fit: cover; }
.tile .name { display: block; margin-top: 10px; }
.tile .sub { display: block; color: var(--muted); }
a.tile:hover .pic { transform: translateY(calc(var(--p) * -2)); }
a.tile:hover .pic::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 var(--p) var(--gold); }
a.tile:hover .name { color: var(--gold); }
.tile.locked .pic { display: grid; place-items: center; background-image: repeating-linear-gradient(45deg, rgba(143, 227, 255, 0.05) 0 var(--p), transparent var(--p) calc(var(--p) * 4)); }
.tile.locked .q { font-size: 48px; line-height: 1; color: var(--gold-dim); }
.tile.locked .name { color: var(--muted); }
@media (max-width: 760px) {
  .shelf { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 4px 12px; }
  .shelf li { flex: 0 0 72%; scroll-snap-align: center; }
}
@media (max-width: 520px) { .hero h1 { font-size: 32px; } }

/* sections */
.band { padding: 80px 0; }
.games { display: grid; gap: 32px; }
.game { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; }
.game .art { display: flex; align-items: center; }
.game .art img { width: 100%; height: auto; aspect-ratio: 920 / 430; }   /* the whole capsule, logo included */
.game .info { padding: 28px 28px 32px; display: flex; flex-direction: column; }
.game .info p { color: var(--text); }
.game .tags { color: var(--muted); margin-top: 4px; }
.game .info .rule { margin: 14px 0 20px; }
.game .btn-row { margin-top: auto; padding-top: 24px; }
@media (max-width: 760px) { .game { grid-template-columns: 1fr; } }

.soon { text-align: center; padding: 32px 24px; color: var(--muted); }
.soon h3 { margin-bottom: 4px; }

.about { max-width: 34em; margin: 0 auto; text-align: center; }
.about p + p { margin-top: 16px; }

.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.contact .frame { padding: 20px 24px; text-align: center; }
.contact .frame p { color: var(--muted); margin-top: 4px; }
.contact .frame a { display: inline-block; margin-top: 12px; overflow-wrap: anywhere; }

/* footer */
.foot { padding: 40px 0 48px; color: var(--muted); }
.foot .rule { margin: 0 auto 32px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }

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