/* runecarvergame.com: the landing page and the download page. The game's palette and type
   (docs/ui-style.md): dark carved stone, bronze trim, rune-teal light; Cinzel for display,
   Alegreya Sans for text, both self-hosted (fonts/, OFL 1.1). */

@font-face {
	font-family: "Cinzel";
	src: url("fonts/cinzel.woff") format("woff");
	font-weight: 400 900;
	font-display: swap;
}
@font-face {
	font-family: "Alegreya Sans";
	src: url("fonts/alegreya-sans-regular.woff") format("woff");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "Alegreya Sans";
	src: url("fonts/alegreya-sans-bold.woff") format("woff");
	font-weight: 700;
	font-display: swap;
}

:root {
	color-scheme: dark;
	--bg: #0d0b0a;
	--panel: #18140f;
	--panel-light: #221c16;
	--border: #6b5233;
	--border-lit: #c9a15c;
	--accent: #4fc9be;
	--gold: #e3b862;
	--text: #e9dfc9;
	--dim: #978b78;
	--accent-deep: #183c39; /* ACCENT darkened 0.7: the primary button's stone */
	--accent-edge: #43aba2; /* ACCENT darkened 0.15 */
	--accent-text: #84d9d2; /* ACCENT lightened 0.3 */
	--display: "Cinzel", "Trajan Pro", Georgia, serif;
	--body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
	--gutter: clamp(16px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 18px/1.55 var(--body);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--text); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--panel); padding: 8px 12px; }

/* --- the bar at the top --- */
.bar {
	position: absolute; inset: 0 0 auto 0; z-index: 3;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 18px var(--gutter);
}
.bar .home { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.bar .home img { width: 36px; height: 36px; }
.bar nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.bar nav a {
	font: 600 15px var(--display); letter-spacing: .08em; text-transform: uppercase;
	color: var(--dim); text-decoration: none;
}
.bar nav a:hover, .bar nav a:focus-visible { color: var(--text); }

/* --- buttons: carved stone braced with bronze; the main one lit with the rune --- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; padding: 12px 26px;
	font: 700 16px var(--display); letter-spacing: .06em; text-decoration: none;
	color: var(--text); background: var(--panel-light);
	border: 1px solid var(--border); border-radius: 3px;
	box-shadow: inset 0 1px 0 rgba(233, 223, 201, .06), 0 2px 10px rgba(0, 0, 0, .5);
	transition: border-color .15s, background-color .15s, color .15s;
}
.btn:hover, .btn:focus-visible { color: #fff; border-color: var(--border-lit); background: #2a231b; }
.btn.primary { color: var(--accent-text); background: var(--accent-deep); border-color: var(--accent-edge); }
.btn.primary:hover, .btn.primary:focus-visible {
	color: #fff; border-color: var(--accent); background: #1f4b47;
	box-shadow: 0 0 22px rgba(79, 201, 190, .25), 0 2px 10px rgba(0, 0, 0, .5);
}
.btn .ic { width: 20px; height: 20px; }
.btn small { font: 400 14px var(--body); letter-spacing: 0; color: var(--dim); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --- icons (game-icons.net, white on transparent): tinted through a mask --- */
.ic {
	display: inline-block; flex: none; width: 40px; height: 40px;
	background-color: currentColor;
	-webkit-mask: var(--i) center / contain no-repeat;
	mask: var(--i) center / contain no-repeat;
}

/* --- the rule under the logo: bronze lines either side of a teal diamond (as og-image.png) --- */
.rule { display: flex; align-items: center; gap: 14px; width: min(100%, 420px); }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.rule i { width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); }
.center .rule { margin-inline: auto; }

/* --- the hero --- */
.hero {
	position: relative; isolation: isolate; overflow: hidden;
	min-height: clamp(600px, 41.7vw, 900px);
	display: flex; align-items: center;
	padding: 110px var(--gutter) 90px;
}
.hero picture { position: absolute; inset: 0; z-index: -1; }
.hero picture img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }
.hero::after { /* the foot of the art fades into the page */
	content: ""; position: absolute; inset: auto 0 0 0; height: 120px; z-index: -1;
	background: linear-gradient(transparent, var(--bg));
}
.hero .copy { max-width: 600px; }
.hero h1 { margin: 0 0 22px; }
.hero h1 img { width: min(100%, 560px); }
.tagline {
	margin: 18px 0 10px; font: 400 clamp(17px, 1.6vw, 21px) var(--body);
	letter-spacing: .24em; text-transform: uppercase; color: var(--text);
	text-shadow: 0 1px 12px rgba(0, 0, 0, .9);
}
.lede { color: var(--dim); max-width: 34em; text-shadow: 0 1px 8px rgba(0, 0, 0, .9); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* --- sections --- */
section { padding: clamp(56px, 8vw, 104px) var(--gutter); }
.hero + section { padding-top: clamp(40px, 4vw, 64px); }
.wrap { max-width: 1160px; margin: 0 auto; }
.kicker {
	font: 600 14px var(--display); letter-spacing: .2em; text-transform: uppercase;
	color: var(--accent); margin: 0 0 12px;
}
h2 { font-size: clamp(28px, 3.4vw, 40px); color: var(--gold); margin-bottom: 18px; }
.intro { max-width: 46em; font-size: 20px; }
.intro p:last-child { margin: 0; }

/* stone panels with bronze trim and corner studs, like the game's windows */
.panel {
	position: relative; background: var(--panel);
	border: 1px solid var(--border); border-radius: 3px;
	padding: 26px 26px 22px;
	box-shadow: inset 0 1px 0 rgba(233, 223, 201, .04), 0 6px 24px rgba(0, 0, 0, .35);
}
.panel::before, .panel::after {
	content: ""; position: absolute; top: 6px; width: 5px; height: 5px; border-radius: 50%;
	background: var(--border-lit); opacity: .7;
}
.panel::before { left: 6px; }
.panel::after { right: 6px; }
.panel h3 { font-size: 21px; color: var(--text); margin-bottom: 10px; }
.panel p { color: var(--dim); font-size: 17px; }
.panel p:last-child { margin-bottom: 0; }
.panel strong { color: var(--text); font-weight: 700; }
.panel > .ic { color: var(--border-lit); margin-bottom: 14px; }

.classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.class { text-align: center; }
.class .ic { width: 64px; height: 64px; color: var(--accent); margin: 4px auto 16px; display: block; }
.class .role {
	font: 600 13px var(--display); letter-spacing: .16em; text-transform: uppercase;
	color: var(--border-lit); margin: -4px 0 12px;
}

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; }
.features .wide { grid-column: 1 / -1; }
.elements { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 14px; padding: 0; list-style: none; }
.elements li { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 16px; }
.elements .ic { width: 22px; height: 22px; }

/* the closing call */
.cta { text-align: center; background:
	radial-gradient(ellipse 60% 70% at 50% 100%, rgba(79, 201, 190, .07), transparent 70%),
	linear-gradient(var(--bg), var(--panel)); border-top: 1px solid #2b231a; }
.cta h2 { margin-bottom: 14px; }
.cta p { color: var(--dim); max-width: 36em; margin-inline: auto; }
.cta .actions { justify-content: center; }

footer {
	padding: 36px var(--gutter) 44px; background: var(--panel); border-top: 1px solid var(--border);
	color: var(--dim); font-size: 15px;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: flex-start; }
footer .credits { max-width: 46em; }
footer .credits p { margin: 0 0 6px; }
footer .mark { display: flex; align-items: center; gap: 12px; }
footer .mark img { width: 220px; opacity: .85; }

/* --- the download page --- */
.page { padding-top: 120px; }
.page h1 { font-size: clamp(30px, 4vw, 44px); color: var(--gold); margin-bottom: 8px; }
.page .lede { margin-bottom: 30px; }
.downloads { display: grid; gap: 14px; max-width: 760px; }
.dl {
	display: flex; align-items: center; gap: 18px; padding: 18px 22px; text-decoration: none;
	background: var(--panel-light); border: 1px solid var(--border); border-radius: 3px; color: var(--text);
}
.dl:hover, .dl:focus-visible { border-color: var(--border-lit); background: #2a231b; color: #fff; }
.dl.primary { background: var(--accent-deep); border-color: var(--accent-edge); }
.dl.primary:hover, .dl.primary:focus-visible { border-color: var(--accent); background: #1f4b47; }
.dl img { width: 34px; height: 34px; flex: none; }
.dl b { display: block; font: 700 18px var(--display); letter-spacing: .03em; }
.dl span { color: var(--dim); font-size: 15px; }
.page h2 { font-size: 22px; margin: 44px 0 14px; color: var(--text); }
.note { color: var(--dim); font-size: 16px; max-width: 46em; margin-top: 14px; }
.note code { color: var(--text); font-size: 15px; }

/* --- narrow screens --- */
@media (max-width: 900px) {
	.classes { grid-template-columns: 1fr; }
	.features { grid-template-columns: 1fr; }
	.class { display: grid; grid-template-columns: 56px 1fr; gap: 0 16px; text-align: left; }
	.class .ic { width: 52px; height: 52px; margin: 2px 0 0; grid-row: span 3; }
}
@media (max-width: 700px) {
	body { font-size: 17px; }
	.bar { padding-block: 14px; }
	.bar .home img { width: 30px; height: 30px; }
	.bar nav a { font-size: 13px; }
	/* the phone's art (key-art-phone) on top, full width, the bar over its dark top; the words
	   under it, the lockup over its faded foot */
	.hero { display: block; min-height: 0; padding: 0 var(--gutter); }
	.hero picture { display: block; position: relative; inset: auto; z-index: -1; margin: 0 calc(-1 * var(--gutter)); }
	.hero picture img { height: auto; aspect-ratio: 5 / 6; }
	.hero::after { display: none; }
	.hero .copy { position: relative; text-align: center; margin: -22vw auto 0; }
	.hero .rule { margin-inline: auto; }
	.tagline { letter-spacing: .14em; }
	.actions { justify-content: center; }
	.actions .btn { flex: 1 1 100%; }
	.intro { font-size: 18px; }
	.panel { padding: 22px 20px 18px; }
	footer .mark img { width: 180px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- the changelog: one stone panel per version, newest first --- */
.releases { display: grid; gap: 20px; max-width: 820px; }
.release {
	background: var(--panel); border: 1px solid var(--border); border-radius: 3px;
	padding: 22px 26px 18px;
}
.release header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.release h2 { font-size: 24px; margin: 0; }
.release h2 a { color: var(--gold); text-decoration: none; }
.release h2 a:hover { color: var(--text); }
.release time { color: var(--dim); font-size: 15px; }
.release h3 { font-size: 18px; color: var(--accent-text); margin: 14px 0 6px; }
.release ul { margin: 10px 0 0; padding-left: 20px; }
.release li { color: var(--text); font-size: 17px; margin-bottom: 6px; }
.release li::marker { color: var(--border-lit); }
.release p { color: var(--dim); font-size: 17px; margin: 10px 0 0; }
.release strong { color: #fff; }
.release code { color: var(--text); font-size: 15px; }
@media (max-width: 700px) {
	.release { padding: 18px 18px 14px; }
}
/* four links in the bar: on a phone "The game" goes (the sigil is the way home) */
.bar nav a { white-space: nowrap; }
@media (max-width: 460px) {
	.bar nav a[href$="#game"] { display: none; }
}
