/* Techwave Games (/games/, /games/play, /games/studio). Hand-written. */
:root {
  --paper: #faf7f0; --panel: #f2ede1; --card: #fffdf8; --ink: #17151f; --ink-2: #3b3846; --muted: #6d6a76; --rule: #e0d9c8;
  --saffron: #e8740c; --saffron-2: #c25e05; --night: #16122b; --night-2: #231c45; --gold: #f6c453; --ok: #166534; --err: #b91c1c;
  --sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased }
a { color: inherit }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em }
h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02 }
h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.1 }
h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.3 }
p { margin: 0 0 1em }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px }
.muted { color: var(--muted) }
[hidden] { display: none !important }

/* Top bar: same brand mark as the homepage and /careers */
.top { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0 }
.brand-mark { flex: none; display: inline-flex; width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 3px 12px rgba(158, 23, 79, .25) }
.brand-mark svg { width: 40px; height: 40px; display: block }
.brand-mark .bm-tile { fill: #9E174F }
.brand-mark .bm-wave { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round }
.brand-mark .bm-wave-2 { opacity: .55 }
.brand-text { display: flex; flex-direction: column; gap: 4px; line-height: 1 }
.brand-word { font-family: var(--serif); font-weight: 500; font-size: 21px; color: #20202A; letter-spacing: -0.01em; white-space: nowrap }
.brand-eyebrow { font-size: 9.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #8a8a94 }
.top nav { display: flex; align-items: center; gap: 20px; font-size: .95rem }
.top nav a { text-decoration: none }
.top nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 3px }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--ink); color: var(--paper); font: 500 .95rem var(--sans); text-decoration: none; padding: 10px 17px; border-radius: 10px; border: 0; cursor: pointer; white-space: nowrap }
.btn:hover { background: #2e2b3a }
.btn.saffron { background: var(--saffron); color: #fff }
.btn.saffron:hover { background: var(--saffron-2) }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule) }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink) }
.btn.small { padding: 7px 12px; font-size: .86rem; border-radius: 8px }
.btn[disabled] { opacity: .5; cursor: default }

/* Hero */
.hero { padding-top: 56px; padding-bottom: 40px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: end }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--saffron-2); margin-bottom: 14px }
.hero h1 em { font-style: italic; color: var(--saffron-2) }
.lede { font-family: var(--serif); font-size: 1.22rem; line-height: 1.5; color: var(--ink-2) }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap }

/* Section heads */
.shelf { padding-top: 36px; padding-bottom: 12px }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap }
.shelf-head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch }

/* Game cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(23, 21, 31, .45) }
.cover { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden }
.cover::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 30% 20%, rgba(255,255,255,.35), transparent 60%), repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 14px, transparent 14px 28px) }
.cover .emoji { position: relative; font-size: 4.2rem; filter: drop-shadow(0 8px 14px rgba(0,0,0,.25)) }
.cover .tag { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.92); color: var(--ink); font-size: .72rem; font-weight: 600; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px }
.cover .tag.star { background: var(--night); color: var(--gold) }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1 }
.card-body p { margin: 0; color: var(--ink-2); font-size: .94rem }
.card-meta { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--muted) }
.empty { border: 1.5px dashed var(--rule); border-radius: 18px; padding: 28px; color: var(--muted); text-align: center; background: var(--card) }

/* Stars: the night sky band */
.sky { position: relative; margin: 48px 0 0; padding: 64px 0; background: radial-gradient(90% 120% at 80% 0%, #2f2462 0%, var(--night) 55%); color: #efeaff; overflow: hidden }
.sky::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .7; background-image:
  radial-gradient(1.2px 1.2px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 28% 68%, #fff, transparent), radial-gradient(1.4px 1.4px at 44% 14%, #fff, transparent),
  radial-gradient(1px 1px at 61% 52%, #fff, transparent), radial-gradient(1.6px 1.6px at 76% 30%, #ffe6a3, transparent), radial-gradient(1px 1px at 88% 74%, #fff, transparent),
  radial-gradient(1.2px 1.2px at 6% 84%, #fff, transparent), radial-gradient(1px 1px at 52% 88%, #fff, transparent), radial-gradient(1.3px 1.3px at 94% 12%, #fff, transparent) }
.sky .wrap { position: relative }
.sky h2 { color: #fff }
.sky .eyebrow { color: var(--gold) }
.sky .lede { color: #d6cff5 }
.sky-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start }
.path { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px }
.path li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 14px 16px }
.path .n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(246,196,83,.14); color: var(--gold); font-family: var(--serif); font-size: 1.25rem }
.path h3 { color: #fff; margin-bottom: 2px }
.path p { margin: 0; color: #c9c1ee; font-size: .94rem }
.stars { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 28px }
.star-card { border-radius: 14px; padding: 14px 16px; background: linear-gradient(160deg, rgba(246,196,83,.16), rgba(255,255,255,.04)); border: 1px solid rgba(246,196,83,.3) }
.star-card b { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 600 }
.star-card b::before { content: '★'; color: var(--gold) }
.star-card span { display: block; color: #cfc6f2; font-size: .88rem; margin-top: 4px }
.promise { margin-top: 26px; font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: #e8e2ff; border-left: 2px solid var(--gold); padding-left: 16px }

/* Player */
.player { padding-top: 20px; padding-bottom: 40px }
.stage-wrap { background: var(--night); border-radius: 20px; padding: 10px; box-shadow: 0 30px 60px -36px rgba(22,18,43,.7) }
.stage { display: block; width: 100%; height: min(72vh, 680px); border: 0; border-radius: 12px; background: #000 }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 6px 2px; color: #cfc6f2; font-size: .88rem; flex-wrap: wrap }
.stage-bar .btn.ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25) }
.stage-bar .btn.ghost:hover { box-shadow: inset 0 0 0 1.5px #fff }
.stage-bar .btn.ghost.on { color: #ff8fa3 }
.about-game { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; margin-top: 28px }
.about-game h1 { font-size: clamp(2rem, 4.6vw, 3rem) }
.maker-card { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 18px }
.maker-card .who { font-weight: 600; font-size: 1.05rem }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; background: var(--panel); color: var(--ink-2) }
.badge.star { background: var(--night); color: var(--gold) }
.badge.founder { background: #fde7d3; color: var(--saffron-2) }

/* Studio */
.studio { padding-top: 24px; padding-bottom: 60px }
.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 18px; padding: 24px; margin-bottom: 22px }
.panel h2 { font-size: 1.6rem; margin-bottom: 6px }
.tabs { display: flex; gap: 8px; margin: 10px 0 22px; flex-wrap: wrap }
.tabs button { font: 500 .92rem var(--sans); border: 0; background: var(--panel); color: var(--ink-2); padding: 9px 14px; border-radius: 999px; cursor: pointer }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper) }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px }
.form .full { grid-column: 1 / -1 }
label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 6px }
label small { font-weight: 400; color: var(--muted) }
input[type=text], input[type=email], textarea, select { width: 100%; font: 400 .97rem var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--rule); border-radius: 10px; padding: 10px 12px }
input:focus, textarea:focus { outline: none; border-color: var(--saffron) }
textarea { min-height: 90px; resize: vertical }
textarea.code { font: 400 .84rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 220px; white-space: pre; tab-size: 2 }
.cover-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap }
.cover-pick input[type=color] { width: 46px; height: 42px; border: 1.5px solid var(--rule); border-radius: 10px; padding: 2px; background: #fff }
.cover-pick .emoji-in { width: 70px; text-align: center; font-size: 1.4rem }
.mini-cover { width: 96px; aspect-ratio: 16/10; border-radius: 10px; display: grid; place-items: center; font-size: 1.8rem }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem }
.check input { margin-top: 4px }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.msg { font-size: .92rem; padding: 10px 12px; border-radius: 10px; background: var(--panel) }
.msg.err { background: #fde8e8; color: var(--err) }
.msg.ok { background: #e3f3e8; color: var(--ok) }
.preview { width: 100%; height: 420px; border: 0; border-radius: 12px; background: #000 }
.rows { display: grid; gap: 12px }
.row { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--rule); border-radius: 14px; background: #fff }
.row .mini-cover { width: 72px; font-size: 1.5rem }
.row h3 { font-size: 1rem }
.row .sub { font-size: .84rem; color: var(--muted) }
.row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--panel); color: var(--ink-2); margin-left: 6px; vertical-align: 2px }
.pill.wait { background: #fff1d6; color: #8a5a00 }
.pill.live { background: #e3f3e8; color: var(--ok) }
.pill.back { background: #fde8e8; color: var(--err) }
.note { margin-top: 6px; font-size: .88rem; background: var(--panel); border-radius: 10px; padding: 8px 10px }
.review-box { margin-top: 12px; display: grid; gap: 10px }
.gate { text-align: center; padding: 48px 24px }
.gate h2 { margin-bottom: 10px }

/* Footer */
.foot { border-top: 1px solid var(--rule); margin-top: 40px; padding: 26px 0; font-size: .86rem; color: var(--muted) }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap }
.foot a { margin-left: 16px; text-decoration: none }
.foot a:hover { text-decoration: underline }

@media (max-width: 860px) {
  .wrap { padding: 0 16px }
  .hero, .sky-grid, .about-game { grid-template-columns: 1fr; gap: 26px }
  .hero { padding-top: 28px; padding-bottom: 24px }
  .hide-sm { display: none }
  .brand-eyebrow { display: none }
  .brand-word { font-size: 18px }
  .form { grid-template-columns: 1fr }
  .stage { height: 64vh }
  .row { grid-template-columns: 56px 1fr; align-items: start }
  .row .mini-cover { width: 56px }
  .row .acts { grid-column: 1 / -1; justify-content: flex-start }
  .panel { padding: 18px }
  .foot a { margin: 0 14px 0 0 }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none } .card:hover { transform: none } }
