/* The page borrows the game's title screen (DECISIONS #65): the city behind
   a dark shade, a serif wordmark, small-capitals headers and one double-circle
   mark for ornament. Colours are the Style Bible's: plaster for text, madder
   for the one button, mud for rules and labels. */

@font-face {
	font-family: "Crimson";
	src: url("fonts/CrimsonText-Regular.ttf") format("truetype");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "Crimson";
	src: url("fonts/CrimsonText-Italic.ttf") format("truetype");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Crimson";
	src: url("fonts/CrimsonText-SemiBold.ttf") format("truetype");
	font-weight: 600;
	font-display: swap;
}

:root {
	--night: #16120e;
	--panel: #1f1914;
	--plaster: #ede2c8;
	--plaster-dim: #b8ab90;
	--mud: #c8a472;
	--madder: #a6423a;
	--madder-lit: #b8513f;
	--rule: rgba(200, 164, 114, 0.26);
	--gutter: clamp(16px, 5vw, 80px);
	/* Everything sits in one centred column this wide. */
	--page: 1200px;
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--night);
	color: var(--plaster);
	font-family: "Crimson", Georgia, serif;
	font-size: 1.1875rem;
	line-height: 1.55;
	font-variant-numeric: oldstyle-nums;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--mud); text-underline-offset: 0.15em; }
a:hover { color: var(--plaster); }

h2, h3 { font-weight: 600; line-height: 1.2; }

.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Small-capitals label with the double circle, as on the title screen. */
.label {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 18px;
	font-weight: 400;
	font-size: 1.1rem;
	font-variant: small-caps;
	text-transform: lowercase;
	letter-spacing: 0.1em;
	color: var(--mud);
}
.mark {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--mud);
	border-radius: 50%;
	position: relative;
}
.mark::after {
	content: "";
	position: absolute;
	inset: 3px;
	border: 1.5px solid var(--mud);
	border-radius: 50%;
}
/* A short centred rule between sections. */
.divider {
	width: 96px;
	height: 0;
	margin: 0 auto 88px;
	border: 0;
	border-top: 1px solid var(--mud);
	opacity: 0.6;
}

/* A section heading: the same label, larger and centred. */
.label-big {
	justify-content: center;
	gap: 14px;
	margin-bottom: 28px;
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	letter-spacing: 0.12em;
}
.label-big .mark { width: 26px; height: 26px; border-width: 2px; }
.label-big .mark::after { inset: 4px; border-width: 2px; }

/* ---------- Hero ---------- */

.hero {
	position: relative;
	width: min(var(--page), 100% - 2 * var(--gutter));
	margin: 28px auto 0;
	aspect-ratio: 16 / 9;
	min-height: 560px;
	border: 1px solid var(--rule);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}
.hero-art {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Keep the wall-top figures and the river; lose sky first. */
	object-position: 50% 78%;
}
/* Dark from the left and the bottom so the text reads; the top right of the
   town stays at full brightness. */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(0deg, rgba(22, 18, 14, 0.95) 0%, rgba(22, 18, 14, 0.6) 22%, rgba(22, 18, 14, 0) 50%),
		linear-gradient(90deg, rgba(22, 18, 14, 0.82) 0%, rgba(22, 18, 14, 0.45) 34%, rgba(22, 18, 14, 0) 58%);
}

.hero-column {
	position: relative;
	z-index: 2;
	width: min(40rem, 100%);
	padding: 120px var(--gutter) 72px;
}
.seal {
	width: 72px;
	height: 72px;
	border-radius: 6px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
	margin-bottom: 18px;
}
.wordmark {
	margin: 0 -0.14em 0 0;
	font-weight: 600;
	font-size: clamp(3.4rem, 9vw, 6.2rem);
	line-height: 0.95;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.tagline {
	margin: 16px 0 0;
	font-size: clamp(1.45rem, 3vw, 1.9rem);
	line-height: 1.25;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

/* ---------- Signup ---------- */

.signup { margin-top: 28px; max-width: 28rem; }
.signup-row { display: flex; }
.signup input {
	flex: 1 1 auto;
	min-width: 0;
	font: inherit;
	font-size: 1.1rem;
	padding: 11px 14px;
	color: var(--plaster);
	background: rgba(22, 18, 14, 0.55);
	border: 1px solid rgba(237, 226, 200, 0.4);
	border-right: 0;
	border-radius: 2px 0 0 2px;
}
.signup input::placeholder { color: rgba(237, 226, 200, 0.45); }
.signup input:focus { outline: none; border-color: var(--mud); background: rgba(22, 18, 14, 0.75); }
.signup button {
	flex: 0 0 auto;
	font: inherit;
	font-weight: 600;
	font-size: 1.1rem;
	padding: 11px 20px;
	color: var(--plaster);
	background: var(--madder);
	border: 1px solid var(--madder);
	border-radius: 0 2px 2px 0;
	cursor: pointer;
}
.signup button:hover { background: var(--madder-lit); border-color: var(--madder-lit); }
.signup button:focus-visible { outline: 2px solid var(--plaster); outline-offset: 2px; }
.signup-note { margin: 8px 0 0; font-size: 1rem; font-style: italic; color: var(--plaster-dim); }
.signup-status { margin: 8px 0 0; font-size: 1rem; color: var(--mud); }

/* ---------- Sections ---------- */

main > section {
	max-width: calc(var(--page) + 2 * var(--gutter));
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.summary {
	padding-top: 88px !important;
	padding-bottom: 80px !important;
	text-align: center;
}
.summary-text { max-width: 46rem; margin: 0 auto; }
.summary h2 {
	margin: 0 0 20px;
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	line-height: 1.2;
	text-wrap: balance;
}
.summary p { margin: 0; font-size: 1.35rem; line-height: 1.5; }

/* The gameplay clip, centred under the summary and narrower than the column,
   so the first scroll shows the game itself and not only the painting. */
.motion { max-width: 860px; margin: 44px auto 0; }
.motion video { width: 100%; border: 1px solid var(--rule); }
.motion figcaption { margin-top: 8px; font-style: italic; font-size: 1rem; color: var(--plaster-dim); }

/* Gallery: a strip of thumbnails, about three and a half in view so it
   reads as something to scroll. Click one to open it full size. */
.gallery { padding-bottom: 88px !important; }
.gallery-strip {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-strip figure {
	flex: 0 0 calc((100% - 3 * 14px) / 3.4);
	margin: 0;
	scroll-snap-align: start;
}
.gallery-strip figcaption { display: none; }
.shot {
	display: block;
	width: 100%;
	padding: 0;
	border: 1px solid var(--rule);
	background: none;
	cursor: zoom-in;
}
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: opacity 0.15s; }
.shot:hover img { opacity: 0.85; }
.shot:focus-visible { outline: 2px solid var(--mud); outline-offset: 2px; }
.gallery-controls {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 14px;
}
.gallery-controls button, .lightbox-prev, .lightbox-next {
	width: 44px;
	height: 44px;
	font: inherit;
	font-size: 1.3rem;
	color: var(--plaster);
	background: transparent;
	border: 1px solid var(--rule);
	border-radius: 50%;
	cursor: pointer;
}
.gallery-controls button:hover, .lightbox-prev:hover, .lightbox-next:hover { border-color: var(--mud); color: var(--mud); }

/* Features: image and text side by side, the image switching sides. */
.features { display: grid; gap: 88px; padding-bottom: 96px !important; }
.feature {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: clamp(28px, 4vw, 56px);
	align-items: center;
}
.feature:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature:nth-child(even) img { order: 2; }
.feature img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--rule); }
.feature h3 { margin: 0 0 12px; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.feature p { margin: 0; }

.record {
	padding-bottom: 80px !important;
}
.record { text-align: center; }
.record > p { max-width: 38em; margin: 0 auto; text-wrap: balance; }

.signup-band {
	width: min(var(--page), 100% - 2 * var(--gutter));
	padding: 64px 32px 72px !important;
	background: var(--panel);
	border: 1px solid var(--rule);
	text-align: center;
}
.signup-band h2 { margin: 0 0 10px; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.signup-band p { margin: 0 auto; max-width: 32em; color: var(--plaster-dim); }
.signup-band .signup { margin: 26px auto 0; }

.news { padding-top: 72px !important; padding-bottom: 88px !important; }
.news-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.news-head a { font-size: 1.05rem; }
.news-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 28px;
}
.news-card {
	display: flex;
	flex-direction: column;
	color: var(--plaster);
	text-decoration: none;
}
.news-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--rule); margin-bottom: 12px; }
.news-card:hover .news-title { color: var(--mud); }
.news-date { font-size: 0.95rem; color: var(--mud); font-variant: small-caps; text-transform: lowercase; letter-spacing: 0.06em; }
.news-title { font-size: 1.35rem; font-weight: 600; line-height: 1.25; margin: 2px 0 6px; }
.news-summary { font-size: 1.05rem; color: var(--plaster-dim); }

footer {
	padding: 32px var(--gutter) 44px;
	border-top: 1px solid var(--rule);
	color: var(--plaster-dim);
	font-size: 1rem;
}
footer p { max-width: var(--page); margin: 0 auto; }

.lightbox {
	padding: 0;
	border: 0;
	background: transparent;
	max-width: 100vw;
	max-height: 100vh;
	overflow: visible;
}
.lightbox[open] { display: flex; align-items: center; gap: 16px; }
.lightbox::backdrop { background: rgba(10, 8, 6, 0.94); }
.lightbox figure { margin: 0; }
/* Leave room either side for the two 44 px arrows and their gaps. */
.lightbox img { max-width: min(100vw - 160px, 1600px); max-height: 84vh; width: auto; border: 1px solid var(--rule); }
.lightbox figcaption { margin-top: 10px; font-style: italic; color: var(--plaster-dim); }
.lightbox-prev, .lightbox-next { flex: 0 0 auto; background: rgba(22, 18, 14, 0.6); }
.lightbox-close {
	position: fixed;
	top: 12px;
	right: 16px;
	width: 44px;
	height: 44px;
	font-size: 2rem;
	line-height: 1;
	color: var(--plaster);
	background: transparent;
	border: 0;
	cursor: pointer;
}

/* ---------- Devlog pages ---------- */

.topbar {
	max-width: calc(var(--page) + 2 * var(--gutter));
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px var(--gutter);
	border-bottom: 1px solid var(--rule);
}
.topbar-mark {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--plaster);
	text-decoration: none;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-size: 1.2rem;
}
.topbar-mark img { border-radius: 3px; }
.topbar-links { display: flex; gap: 22px; font-variant: small-caps; text-transform: lowercase; letter-spacing: 0.1em; }
.topbar-links a { color: var(--plaster); text-decoration: none; }
.topbar-links a:hover { color: var(--mud); }

.prose { max-width: 46rem; margin: 0 auto; padding: 56px var(--gutter) 80px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.15; margin: 0 0 28px; font-weight: 600; }
.prose h2 { font-size: 1.6rem; margin: 2em 0 0.5em; }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; border: 1px solid var(--rule); }
.prose figcaption { margin-top: 8px; font-style: italic; font-size: 1rem; color: var(--plaster-dim); }
.prose blockquote {
	margin: 1.6em 0;
	padding: 0.2em 0 0.2em 1.2em;
	border-left: 2px solid var(--mud);
	color: var(--plaster-dim);
}
.prose blockquote p:first-child { margin-top: 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { width: 96px; margin: 2.4em auto; border: 0; border-top: 1px solid var(--mud); opacity: 0.6; }
.post-date { margin: 0 0 6px; color: var(--mud); font-variant: small-caps; text-transform: lowercase; letter-spacing: 0.08em; }
.post-back { margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--rule); }
.prose .news-grid { margin-top: 12px; }

/* ---------- Narrow screens ---------- */

@media (max-width: 760px) {
	.hero { width: 100%; margin-top: 0; aspect-ratio: auto; min-height: 86vh; min-height: 86svh; border: 0; }
	.topbar { padding: 12px 16px; }
	.signup-band { width: 100%; border-left: 0; border-right: 0; padding: 56px 16px 64px !important; }
	.hero::before {
		background: linear-gradient(0deg, rgba(22, 18, 14, 0.97) 0%, rgba(22, 18, 14, 0.75) 38%, rgba(22, 18, 14, 0) 68%);
	}
	.hero-column { padding: 0 16px 40px; }
	.hero-art { object-position: 34% 70%; }
	.seal { width: 60px; height: 60px; }
	.feature, .feature:nth-child(even) { grid-template-columns: 1fr; gap: 18px; }
	.feature:nth-child(even) img { order: 0; }
	.features { gap: 56px; }
	.summary { padding-top: 56px !important; }
	.gallery-strip figure { flex-basis: 72%; }
	.lightbox[open] { flex-direction: column; }
	.lightbox img { max-width: 100vw; }
	.lightbox figcaption { padding: 0 16px; }
	.lightbox-prev, .lightbox-next { position: fixed; bottom: 20px; }
	.lightbox-prev { left: 16px; }
	.lightbox-next { right: 16px; }
	.signup button { padding: 11px 14px; }
}
