/* Cinder Lake Games: one stylesheet for the whole site. Dark by design (space, night launches); the ember orange is the
   studio's accent and the Road to Mars page borrows Mars red from the game's logo. */
:root {
	--bg: #101215; --bg-2: #16191d; --line: #262b31; --ink: #efe9df; --muted: #a39d93; --ember: #e2602a; --ember-ink: #16181b;
	--f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
	--f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
	color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--ember); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

header.site { position: sticky; top: 0; z-index: 10; background: rgb(16 18 21 / .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span { font: 700 22px/1 var(--f-display); letter-spacing: .05em; text-transform: uppercase; }
.brand small { font: 600 11px/1 var(--f-body); letter-spacing: .38em; color: var(--muted); display: block; margin-top: 3px; }
nav.site a { color: var(--muted); text-decoration: none; font-weight: 600; margin-left: 20px; }
nav.site a:hover, nav.site a[aria-current] { color: var(--ink); }

.eyebrow { font: 600 13px/1.2 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--ember); margin: 0 0 12px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.02; letter-spacing: .01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(44px, 7vw, 84px); text-transform: uppercase; }
h2 { font-size: clamp(32px, 4.4vw, 48px); text-transform: uppercase; margin-bottom: 18px; }
h3 { font-size: 24px; margin-bottom: 6px; }
.lede { font-size: clamp(18px, 2vw, 21px); color: #d8d1c6; max-width: 62ch; }
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }

/* Home */
.hero { position: relative; min-height: min(78vh, 720px); display: grid; align-items: end; padding: 0; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(16 18 21 / .1) 30%, rgb(16 18 21 / .92) 92%); }
.hero .wrap { position: relative; z-index: 1; padding-block: 64px; }
.hero .mark { width: 88px; height: 88px; margin-bottom: 22px; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 20px; }
.game-card { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg-2); color: var(--ink); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.game-card:hover, .game-card:focus-visible { transform: translateY(-3px); border-color: var(--ember); }
.game-card .art { position: relative; aspect-ratio: 16 / 9; }
.game-card .art > img { width: 100%; height: 100%; object-fit: cover; }
.game-card .art .logo { position: absolute; left: 50%; top: 50%; width: 62%; transform: translate(-50%, -50%); filter: drop-shadow(0 8px 24px rgb(0 0 0 / .6)); }
.game-card .body { padding: 20px 22px 24px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgb(226 96 42 / .16); color: var(--ember); font: 600 12px/1.6 var(--f-body); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; }
.game-card p { color: var(--muted); margin: 6px 0 0; }
.more { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--ember); }

/* Road to Mars */
.game-hero { position: relative; padding: 0; overflow: hidden; }
.game-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.game-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgb(16 18 21 / .1), rgb(16 18 21 / .95) 75%); }
.game-hero .wrap { position: relative; z-index: 1; padding-block: 56px 64px; text-align: center; }
.game-hero .logo { width: min(560px, 92%); margin: 0 auto 8px; filter: drop-shadow(0 10px 30px rgb(0 0 0 / .7)); }
.game-hero .lede { margin: 0 auto; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 36px; }
.fact { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; background: var(--bg-2); text-align: left; }
.fact b { display: block; font: 700 40px/1 var(--f-display); color: var(--ember); }
.fact span { color: var(--muted); font-size: 15px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px 32px; }
.features p { color: var(--muted); margin: 0; }
ol.acts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
ol.acts li { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: baseline; padding: 14px 20px; background: var(--bg-2); }
ol.acts .act { font: 600 13px/1.2 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ember); }
ol.acts .name { font: 700 22px/1.1 var(--f-display); }
ol.acts .years { color: var(--muted); font-variant-numeric: tabular-nums; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.gallery button { all: unset; cursor: zoom-in; display: block; border-radius: 10px; overflow: hidden; position: relative; }
.gallery button:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s ease; }
.gallery button:hover img { transform: scale(1.03); }
.gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 22px 12px 10px; font-size: 14px; background: linear-gradient(transparent, rgb(0 0 0 / .8)); }
.note { color: var(--muted); font-size: 14px; margin-top: 14px; }
.cta { text-align: center; }
.cta .lede { margin: 0 auto; }

dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
dialog.lightbox::backdrop { background: rgb(0 0 0 / .9); }
dialog.lightbox img { max-width: 96vw; max-height: 84vh; border-radius: 8px; }
dialog.lightbox p { color: var(--ink); text-align: center; margin: 10px 0 0; }

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

@media (max-width: 560px) {
	ol.acts li { grid-template-columns: 1fr; gap: 2px; }
	nav.site a { margin-left: 14px; }
	.brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
