/* City Apps: the home page and one page per game. Each game page sets --accent and --deep on <body>. */
:root {
  --bg: #0d1017;
  --panel: #161b25;
  --line: #262d3b;
  --text: #eef1f6;
  --dim: #a3acbd;
  --accent: #7aa2ff;
  --deep: #18213a;
  --radius: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }

/* Top bar */
.top { border-bottom: 1px solid var(--line); background: rgba(13,16,23,.85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; }
.top nav { margin-left: auto; display: flex; gap: 4px; overflow-x: auto; }
.top nav a { text-decoration: none; color: var(--dim); font-size: 15px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); background: var(--panel); }

/* Home hero */
.hero { padding: 72px 0 40px; }
.hero h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1.02; margin: 0 0 16px; letter-spacing: -.03em; font-weight: 800; }
.hero p { font-size: clamp(18px, 2.2vw, 21px); color: var(--dim); margin: 0; max-width: 40em; }
.skyline { display: block; width: 100%; height: 64px; margin-top: 48px; color: var(--line); }

/* Game cards on the home page */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr)); gap: 24px; padding-bottom: 72px; }
.card {
  --accent: #7aa2ff; --deep: #18213a;
  display: flex; flex-direction: column; text-decoration: none; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card .shot { aspect-ratio: 16 / 9; background: var(--deep) center / cover no-repeat; position: relative; }
.card .shot.phone { background-size: auto 140%; background-position: center 12%; }
.card .body { padding: 20px 22px 22px; display: grid; grid-template-columns: 52px 1fr; gap: 4px 16px; align-items: start; }
.card .body img { width: 52px; height: 52px; grid-row: span 2; border-radius: 12px; }
.card h2 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--dim); font-size: 16px; }
.card .tags { grid-column: 2; margin-top: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 13px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); }

/* Game page */
.ghero { background: radial-gradient(120% 140% at 85% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%), var(--deep); border-bottom: 1px solid var(--line); }
.ghero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 56px 0; }
.ghero .icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.ghero h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.02; margin: 18px 0 10px; letter-spacing: -.03em; }
.ghero .tagline { font-size: 21px; color: var(--text); opacity: .85; margin: 0 0 18px; }
.ghero .tags span { border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.8); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 700; font-size: 18px;
  padding: 14px 26px; border-radius: 14px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--accent); color: #0b0d12;
}
.btn.ghost { background: rgba(255,255,255,.08); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.btn:hover { filter: brightness(1.08); }
.btn svg { width: 20px; height: 20px; }
.ghero .shot { border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.1); }
.ghero .shot.phone { max-width: 300px; justify-self: center; }

/* The built-in player */
.player { padding: 48px 0 8px; }
.player h2, .about h2 { font-size: 28px; margin: 0 0 16px; letter-spacing: -.01em; }
.stage {
  position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 82vh; background: #000;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
}
.stage.phone { aspect-ratio: 9 / 18; height: min(82vh, 820px); width: auto; max-width: 100%; max-height: none; margin: 0 auto; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage .poster { position: absolute; inset: 0; background: var(--deep) center / cover no-repeat; display: grid; place-items: center; }
.stage .poster::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.stage .poster .btn { position: relative; font-size: 20px; padding: 18px 32px; }
.stagebar { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.stagebar button, .stagebar a { font: inherit; font-size: 15px; color: var(--dim); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; cursor: pointer; text-decoration: none; }
.stagebar button:hover, .stagebar a:hover { color: var(--text); }
.stage.phone + .stagebar { max-width: 420px; margin-left: auto; margin-right: auto; }
.note { color: var(--dim); font-size: 15px; margin: 12px 0 0; }

/* Description */
.about { padding: 48px 0 72px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.about p { margin: 0 0 16px; }
.about ul { margin: 0 0 16px; padding-left: 20px; }
.about li { margin-bottom: 8px; }
.about li::marker { color: var(--accent); }
.about aside { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; align-self: start; }
.about aside h3 { margin: 0 0 10px; font-size: 18px; }
.about aside h3:not(:first-child) { margin-top: 22px; }
.about aside p, .about aside li { font-size: 15px; color: var(--dim); }
kbd { font: 600 13px/1 ui-monospace, monospace; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }

/* More games strip */
.more { border-top: 1px solid var(--line); padding: 40px 0 64px; }
.more h2 { font-size: 20px; margin: 0 0 16px; }
.more .row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.more a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.more a:hover { border-color: var(--dim); }
.more img { width: 40px; height: 40px; border-radius: 10px; }
.more small { display: block; font-weight: 400; color: var(--dim); font-size: 14px; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 820px) {
  .ghero .wrap, .about { grid-template-columns: 1fr; gap: 28px; }
  .ghero .wrap { padding: 36px 0; }
  .ghero .shot { display: none; }
  .hero { padding: 48px 0 28px; }
  .top nav { display: none; }
}
/* On phones the player opens the game on its own page (play.js), so "Play on this page" would do the same as Play. */
@media (max-width: 700px) { .actions .btn.ghost { display: none; } }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
