:root {
  --bg: #0b0b0c;
  --bg-2: #141416;
  --bg-3: #1d1d21;
  --line: #2a2a30;
  --text: #ecebe8;
  --muted: #9a9890;
  --accent: #ff4a1c;
  --accent-2: #ffb21c;
  --game: var(--accent);
  --radius: 4px;
  --max: 1180px;
  --head: "Oswald", "Arial Narrow", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* Per-game accent colours */
.g-gds { --game: #3fb6ff; }
.g-iv1 { --game: #e8242b; }
.g-iv2 { --game: #ff6a00; }
.g-iv3 { --game: #b8ff2c; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); text-transform: uppercase; letter-spacing: .02em; line-height: 1.05; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.eyebrow { font: 600 .8rem/1 var(--body); text-transform: uppercase; letter-spacing: .18em; color: var(--game); margin-bottom: 14px; display: block; }
[hidden] { display: none !important; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(11,11,12,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.15rem/1 var(--head); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.brand img { height: 36px; width: auto; }
.brand .ph { display: none; }
.brand b { color: var(--accent); font-weight: 700; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 12px; font: 500 .82rem/1 var(--body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border-radius: var(--radius); }
.nav a:hover, .nav a[aria-current] { color: var(--text); background: var(--bg-3); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); width: 42px; height: 38px; border-radius: var(--radius); font-size: 1.2rem; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 12px 14px; }
  .nav-open .nav { display: flex; }
  .nav a { padding: 14px 12px; }
}

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: var(--radius); text-decoration: none; font: 600 .85rem/1 var(--body); text-transform: uppercase; letter-spacing: .12em; border: 1px solid var(--line); background: var(--bg-3); transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-2px); border-color: var(--muted); }
.btn.primary { background: var(--game); border-color: var(--game); color: #0b0b0c; }
.btn.primary:hover { filter: brightness(1.1); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

/* Image placeholders (shown when an asset file is missing) */
.ph { display: flex; align-items: center; justify-content: center; text-align: center; background: repeating-linear-gradient(45deg, #17171a 0 14px, #1c1c20 14px 28px); border: 1px dashed #3a3a42; color: var(--muted); font-size: .8rem; padding: 12px; min-height: 120px; width: 100%; }
.ph code { color: var(--accent-2); font-size: .78rem; word-break: break-all; }

/* Hero */
.hero { position: relative; min-height: min(88vh, 820px); display: flex; align-items: flex-end; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img, .hero-bg .ph { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.hero-bg .ph { align-items: flex-start; padding-top: 90px; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(11,11,12,.15) 0%, rgba(11,11,12,.55) 55%, var(--bg) 100%), linear-gradient(90deg, rgba(11,11,12,.75), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; padding-top: 120px; padding-bottom: 72px; width: 100%; }
.hero-logo { max-width: min(560px, 90%); margin-bottom: 18px; }
.hero-logo.ph { display: none; }
.hero p.lead { font-size: 1.2rem; max-width: 620px; color: #d6d4cf; }
.hero .btns { margin-top: 28px; }

/* Sections */
section.block { padding: 96px 0; border-bottom: 1px solid var(--line); }
section.block.alt { background: var(--bg-2); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head p { max-width: 520px; margin: 0; }

/* Game cards */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card { position: relative; display: flex; flex-direction: column; text-decoration: none; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); border-color: var(--game); }
.card .cover, .card .ph { aspect-ratio: 460 / 215; width: 100%; object-fit: cover; min-height: 0; }
.card-body { padding: 20px 20px 24px; border-top: 3px solid var(--game); flex: 1; }
.card-body h3 { margin-bottom: 6px; }
.card-body p { color: var(--muted); font-size: .93rem; margin: 0; }
.tag { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--game); color: #0b0b0c; font: 700 .7rem/1 var(--body); text-transform: uppercase; letter-spacing: .12em; padding: 7px 10px; border-radius: 2px; }
.card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; }
.card.featured .cover, .card.featured .ph { aspect-ratio: auto; height: 100%; min-height: 300px; }
.card.featured .card-body { border-top: 0; border-left: 3px solid var(--game); padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.card.featured h3 { font-size: 2.2rem; }
@media (max-width: 760px) {
  .card.featured { grid-template-columns: 1fr; }
  .card.featured .cover, .card.featured .ph { min-height: 200px; aspect-ratio: 460/215; }
  .card.featured .card-body { border-left: 0; border-top: 3px solid var(--game); padding: 22px; }
}

/* About */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .ph { aspect-ratio: 4/3; border-radius: var(--radius); }
.split img { width: auto; max-width: 100%; max-height: 640px; margin: 0 auto; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.stats { display: flex; gap: 40px; margin-top: 28px; flex-wrap: wrap; }
.stats b { display: block; font: 700 2.4rem/1 var(--head); color: var(--accent); }
.stats span { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }

/* Game page */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 28px; }
.feature { background: var(--bg-3); border: 1px solid var(--line); border-left: 3px solid var(--game); padding: 22px; border-radius: var(--radius); }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.video { position: relative; aspect-ratio: 16/9; background: #000 center/cover no-repeat; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; overflow: hidden; }
.video::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.video::after { content: ""; position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--game) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%230b0b0c'/%3E%3C/svg%3E") center/38px no-repeat; transition: transform .2s; }
.video:hover::after { transform: scale(1.08); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gallery img, .gallery .ph { aspect-ratio: 16/9; object-fit: cover; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); min-height: 0; }
.gallery img { cursor: zoom-in; transition: opacity .2s; }
.gallery img:hover { opacity: .85; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 28px; }
.facts div { background: var(--bg-2); padding: 18px 20px; }
.facts dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; }
.more-games { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; padding: 40px 60px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: var(--radius); }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 3rem; cursor: pointer; padding: 10px 16px; line-height: 1; }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.contact-grid .feature a { color: var(--accent); word-break: break-all; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials a { display: inline-flex; align-items: center; padding: 10px 14px; text-decoration: none; font: 600 .78rem/1 var(--body); text-transform: uppercase; letter-spacing: .1em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-3); transition: border-color .15s, color .15s; color: var(--muted); }
.socials a:hover { border-color: var(--accent); color: var(--text); }

/* Footer */
.site-foot { padding: 48px 0; color: var(--muted); font-size: .9rem; }
.site-foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-foot nav a { text-decoration: none; }
.site-foot nav a:hover { color: var(--text); }

@media (max-width: 600px) {
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  section.block { padding: 64px 0; }
  .hero .wrap { padding-bottom: 48px; }
  .btn { padding: 13px 18px; }
}

/* Text shown when a logo image is missing */
.brand .text-fallback { display: none; }
h1 .text-fallback { display: block; }
.hero-logo-wrap img { max-width: min(560px, 90%); max-height: 260px; width: auto; }

/* Card buttons (home + "other games") */
.cover-link { display: block; }
.card h3 a { text-decoration: none; }
.card-body { display: flex; flex-direction: column; }
.card-body p { flex: 1; }
.card-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.btn.small { padding: 10px 14px; font-size: .74rem; }
.card.featured .card-body p { flex: 0; }

/* Notice banner on a game page */
.notice { display: flex; flex-direction: column; gap: 4px; max-width: 620px; margin-top: 22px; padding: 14px 18px; background: rgba(20,20,22,.85); border: 1px solid var(--game); border-left-width: 4px; border-radius: var(--radius); }
.notice b { font: 700 1rem/1.2 var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--game); }
.notice span { color: #d6d4cf; font-size: .95rem; }

/* Studio pixel-art logo */
.brand img { height: 48px; image-rendering: auto; }
.studio-logo { margin: 0 0 18px; }
.studio-logo img { width: 250px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 6px 24px rgba(0,0,0,.6)); }
@media (min-width: 900px) { .studio-logo img { width: 375px; } }
.studio-logo .text-fallback { font-size: clamp(2.6rem, 7vw, 5.5rem); }
