/* Cruise release site. The colours are the game's: the "NOW ENTERING" banner (src/ui/environment_banner.gd)
   and the HUD plates (src/ui/hud_style.gd). System fonts only: nothing is loaded from the internet. */
:root {
	--title: #ffd23c;
	--outline: #1c0c34;
	--shadow: #d8305a;
	--stripe-1: #ffb030;
	--stripe-2: #ff5a5a;
	--stripe-3: #c83a9a;
	--ink: #f4f0e0;
	--dim: #b8bfd0;
	--plate: rgba(16, 18, 30, 0.9);
	--plate-edge: #2c3050;
	--bg: #0e0b1c;
	--bg-2: #1c0c34;
	--amber: #ffb030;
	--seg: #ff3b2f;
	--sans: "DejaVu Sans", "Liberation Sans", "Noto Sans", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
	--mono: "DejaVu Sans Mono", "Liberation Mono", "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
	--display: "Arial Black", "DejaVu Sans", "Liberation Sans", "Helvetica Neue", Impact, sans-serif;
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: linear-gradient(180deg, var(--bg-2) 0, var(--bg) 60rem) no-repeat, var(--bg);
	color: var(--ink);
	font: 16px/1.55 var(--sans);
	-webkit-text-size-adjust: 100%;
}
a { color: var(--amber); }
a:hover { color: var(--title); }
code { font-family: var(--mono); font-size: 0.9em; background: rgba(255, 255, 255, 0.07); padding: 0.05em 0.3em; border-radius: 3px; }
strong { color: #fff; }
img { max-width: 100%; height: auto; }

/* ---- Hero: the drive at sunset behind the banner ---- */
.hero {
	position: relative;
	min-height: min(86vh, 50rem);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 4rem 1rem 3rem;
	background:
		linear-gradient(180deg, rgba(28, 12, 52, 0.35) 0%, rgba(28, 12, 52, 0.15) 45%, rgba(14, 11, 28, 0.85) 85%, var(--bg-2) 100%),
		var(--hero) center 60% / cover no-repeat,
		linear-gradient(180deg, #2a1650, #c83a9a 55%, #ffb030);
	image-rendering: pixelated;
	overflow: hidden;
}
.hero::after { /* a light CRT scanline over the picture */
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
}
.hero-inner { position: relative; z-index: 1; max-width: 46rem; image-rendering: auto; }
.logo {
	width: 88px;
	height: 88px;
	image-rendering: pixelated;
	border: 3px solid var(--outline);
	border-radius: 18px;
	box-shadow: 4px 4px 0 var(--shadow);
}

.banner {
	margin: 0.6rem 0 0;
	font: 900 clamp(4rem, 17vw, 9rem)/1 var(--display);
	letter-spacing: 0.04em;
}
.banner-text {
	display: inline-block;
	transform: skewX(-12deg);
	color: var(--title);
	-webkit-text-stroke: 0.09em var(--outline);
	paint-order: stroke fill;
	text-shadow: 0.06em 0.06em 0 var(--shadow), 0.06em 0.06em 0 var(--shadow);
}
.stripes { display: grid; gap: 3px; justify-items: center; margin: 0.4rem auto 1rem; }
.stripes i { display: block; height: 5px; width: min(26rem, 80%); }
.stripes i:nth-child(1) { background: var(--stripe-1); }
.stripes i:nth-child(2) { background: var(--stripe-2); width: min(22rem, 68%); }
.stripes i:nth-child(3) { background: var(--stripe-3); width: min(18rem, 56%); }

.tagline {
	margin: 0 auto 0.6rem;
	font-weight: 800;
	font-size: clamp(1.1rem, 3.6vw, 1.45rem);
	text-shadow: 2px 2px 0 var(--outline), -1px -1px 0 var(--outline), 1px -1px 0 var(--outline), -1px 1px 0 var(--outline);
}
.pitch { max-width: 36rem; margin: 0 auto 1.4rem; color: #fff4dc; text-shadow: 1px 1px 0 var(--outline), 0 0 8px rgba(28, 12, 52, 0.9); }
.cta { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin: 0 0 1rem; }
.hero-note {
	display: inline-block;
	margin: 0 auto 1rem;
	padding: 0.35rem 0.8rem;
	font: 700 0.85rem var(--mono);
	color: var(--title);
	background: var(--plate);
	border: 2px solid var(--amber);
	border-radius: 4px;
	box-shadow: 3px 3px 0 var(--outline);
}
.build-line { font: 0.8rem var(--mono); color: var(--dim); text-shadow: 1px 1px 0 var(--outline); }
.build-line code { background: none; padding: 0; }

.btn {
	display: inline-block;
	padding: 0.7rem 1.3rem;
	font: 800 1rem var(--mono);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-decoration: none;
	color: var(--outline);
	background: var(--title);
	border: 3px solid var(--outline);
	border-radius: 4px;
	box-shadow: 4px 4px 0 var(--shadow);
	transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { color: var(--outline); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow); }
.btn-ghost { background: var(--plate); color: var(--ink); border-color: var(--plate-edge); box-shadow: 4px 4px 0 var(--outline); }
.btn-ghost:hover { color: var(--title); box-shadow: 5px 5px 0 var(--outline); }
.btn small { font-weight: 600; opacity: 0.75; margin-left: 0.4em; }

/* ---- Nav: like the HUD's RADIO / MAP / MENU buttons ---- */
.topnav {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.4rem;
	padding: 0.5rem;
	background: rgba(14, 11, 28, 0.92);
	border-bottom: 2px solid var(--outline);
	box-shadow: 0 3px 0 rgba(200, 58, 154, 0.35);
}
.topnav a {
	font: 700 0.78rem var(--mono);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	color: var(--ink);
	padding: 0.3rem 0.65rem;
	background: var(--plate);
	border: 2px solid var(--plate-edge);
	border-radius: 3px;
}
.topnav a:hover { color: var(--title); border-color: var(--amber); }

/* ---- Sections ---- */
main { max-width: 72rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
section { margin: 3rem 0; scroll-margin-top: 3.5rem; }
.plate {
	background: var(--plate);
	border: 2px solid var(--plate-edge);
	border-radius: 6px;
	padding: 1.2rem 1.4rem;
	box-shadow: 0 0 0 2px var(--outline), 6px 6px 0 rgba(0, 0, 0, 0.35);
}
.section-title {
	margin: 0 0 1.1rem;
	font: 900 clamp(1.6rem, 6vw, 2.4rem)/1.1 var(--display);
	letter-spacing: 0.03em;
	text-transform: uppercase;
}
.section-title span {
	display: inline-block;
	transform: skewX(-12deg);
	color: var(--title);
	-webkit-text-stroke: 0.12em var(--outline);
	paint-order: stroke fill;
	text-shadow: 0.07em 0.07em 0 var(--shadow);
}
.section-title::after {
	content: "";
	display: block;
	height: 4px;
	width: 7rem;
	margin-top: 0.35rem;
	background: linear-gradient(90deg, var(--stripe-1) 0 33%, var(--stripe-2) 33% 66%, var(--stripe-3) 66%);
}
#about p { max-width: 50rem; margin: 0.7rem 0; }
.lead { color: var(--dim); }

/* ---- Gallery ---- */
.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
	grid-auto-flow: dense;
	gap: 0.9rem;
}
.shot {
	position: relative;
	display: block;
	overflow: hidden;
	border: 2px solid var(--plate-edge);
	border-radius: 5px;
	box-shadow: 0 0 0 2px var(--outline);
	background: #000;
	aspect-ratio: 16 / 9;
}
.shot img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 0.25s; }
.shot:hover img { transform: scale(1.04); }
.shot:hover { border-color: var(--amber); }
.shot span {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 1.4rem 0.7rem 0.45rem;
	font: 700 0.8rem var(--mono);
	color: var(--ink);
	background: linear-gradient(180deg, transparent, rgba(16, 18, 30, 0.92));
}
@media (min-width: 52rem) {
	.shot-wide { grid-column: span 2; }
}

.lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 20;
	align-items: center;
	justify-content: center;
	background: rgba(8, 6, 16, 0.94);
}
.lightbox:target { display: flex; }
.lb-close { position: absolute; inset: 0; }
.lightbox figure { position: relative; margin: 0; max-width: 96vw; pointer-events: none; }
.lightbox img {
	display: block;
	max-width: 96vw;
	max-height: 84vh;
	width: auto;
	image-rendering: pixelated;
	border: 2px solid var(--plate-edge);
	box-shadow: 0 0 0 2px var(--outline), 0 0 40px rgba(200, 58, 154, 0.35);
}
.lightbox figcaption { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.2rem; font: 700 0.9rem var(--mono); }
.lb-count { color: var(--dim); }
.lb-nav, .lb-x {
	position: absolute;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 2.8rem;
	height: 2.8rem;
	font: 700 1.1rem var(--mono);
	text-decoration: none;
	color: var(--ink);
	background: var(--plate);
	border: 2px solid var(--plate-edge);
	border-radius: 4px;
}
.lb-nav:hover, .lb-x:hover { color: var(--title); border-color: var(--amber); }
.lb-prev { left: 0.6rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.6rem; top: 50%; transform: translateY(-50%); }
.lb-x { right: 0.6rem; top: 0.6rem; }

/* ---- Features ---- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; }
.feature h3 {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 0.6rem;
	font: 800 1.05rem var(--mono);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--amber);
}
.icon { width: 32px; height: 32px; flex: none; fill: var(--title); filter: drop-shadow(2px 2px 0 var(--shadow)); }
.feature ul, .changes { margin: 0; padding-left: 1.1rem; }
.feature li, .changes li { margin: 0.3rem 0; }
.feature li::marker, .changes li::marker { color: var(--stripe-2); }

/* ---- What's new ---- */
.change-title { margin: 1rem 0 0.4rem; font: 800 1rem var(--mono); color: var(--amber); }
.change-title:first-of-type { margin-top: 0; }
.change-title time { margin-left: 0.5rem; color: var(--seg); font-weight: 700; letter-spacing: 0.08em; }
/* Everything older than the newest three, folded; open, a scrolling list inside the plate. */
.older-changes { margin-top: 1.4rem; }
.older-list {
	max-height: 28rem;
	overflow-y: auto;
	margin-top: 0.6rem;
	padding-right: 0.8rem;
	scrollbar-color: var(--amber) transparent;
}
.older-list .change-title:first-child { margin-top: 0.4rem; }

/* ---- Downloads ---- */
.downloads { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 48rem) {
	.downloads { grid-template-columns: 1fr 1fr; }
}
.dl { display: flex; flex-direction: column; gap: 0.8rem; }
.dl-head { display: flex; align-items: center; gap: 0.7rem; }
.dl-head h3 { margin: 0; font: 900 1.5rem var(--display); }
.dl-glyph {
	font: 800 0.8rem var(--mono);
	color: var(--seg);
	background: #120607;
	border: 2px solid #3a1514;
	border-radius: 3px;
	padding: 0.2rem 0.4rem;
	letter-spacing: 0.1em;
	text-shadow: 0 0 6px rgba(255, 59, 47, 0.7);
}
.dl-web { margin-top: 1rem; }
.dl-btn { align-self: flex-start; }
.dl-meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 0.8rem; margin: 0; font-size: 0.86rem; }
.dl-meta dt { color: var(--dim); font: 700 0.75rem/1.8 var(--mono); text-transform: uppercase; }
.dl-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hash { font-size: 0.7rem; word-break: break-all; background: none; padding: 0; color: var(--dim); }
details { border-top: 1px solid var(--plate-edge); padding-top: 0.6rem; }
summary { cursor: pointer; font: 800 0.85rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--amber); }
details ol { margin: 0.6rem 0 0; padding-left: 1.2rem; font-size: 0.92rem; }
details li { margin: 0.35rem 0; }
/* The browser card's notice: what the browser version lacks, as a warning plate, not small print. */
.notice {
	list-style: none;
	margin: 0;
	padding: 0.8rem 1rem;
	display: grid;
	gap: 0.6rem;
	background: rgba(255, 176, 48, 0.1);
	border: 2px solid var(--amber);
	border-radius: 4px;
	box-shadow: 4px 4px 0 var(--shadow);
	font-size: 1.02rem;
}
.notice li { position: relative; padding-left: 2.2rem; }
.notice li::before {
	content: "!";
	position: absolute;
	left: 0;
	top: 0.1rem;
	display: grid;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	font: 900 1rem var(--mono);
	color: var(--outline);
	background: var(--title);
	border: 2px solid var(--outline);
	border-radius: 3px;
}
.notice strong { color: var(--title); }
.dl-note { margin: 0; font-size: 0.86rem; color: var(--dim); }
.notes { margin-top: 1rem; font-size: 0.92rem; color: var(--dim); }
.notes p { margin: 0.4rem 0; }

/* ---- Footer ---- */
/* The footer is MagneticMango's (Cruise is a MagneticMango project): its night sky, the pink glow and
   the dot field gathering at the pole bottom right, the magneticmango.dev lockup (not recoloured), and
   Mango-chan peeking over the top edge (her graphic's lower edge sits on the footer's). */
footer {
	position: relative;
	text-align: center;
	padding: 1.5rem 1rem 13rem;
	border-top: 1px solid #3a2a63; /* the line Mango-chan peeks over */
	color: #b9a8d6;
	font-size: 0.85rem;
	background:
		radial-gradient(60rem 22rem at 100% 100%, rgba(255, 79, 139, 0.22), transparent 70%),
		linear-gradient(180deg, var(--bg), #1c0f3a 40%, #2e1446);
}
footer::after { /* below the text, never behind it */
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: min(100%, 880px);
	height: 12rem;
	background: url("img/field.svg") right bottom / 880px 360px no-repeat;
	pointer-events: none;
}
footer .peek { position: absolute; bottom: 100%; right: max(2rem, calc(50% - 30rem)); width: 64px; height: auto; }
footer p { position: relative; max-width: 46rem; margin: 0.5rem auto; }
footer code { background: #2f2056; }
footer .small { font-size: 0.78rem; opacity: 0.85; }
footer .brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 1.6rem auto 1.4rem; }
footer .brand span { font: 700 0.75rem var(--mono); letter-spacing: 0.04em; color: #ffa04d; }
footer .brand img { display: block; width: 220px; height: auto; }

@media (max-width: 40rem) {
	body { font-size: 15px; }
	.plate { padding: 1rem; }
	.hero { min-height: auto; padding-top: 3rem; }
	.features, .downloads { grid-template-columns: 1fr; }
	.gallery { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
	.shot span { font-size: 0.68rem; padding: 1rem 0.4rem 0.3rem; }
	.lb-nav { top: auto; bottom: 0.6rem; transform: none; }
	footer { padding-bottom: 9rem; }
	footer::after { height: 8rem; background-size: 560px 229px; }
	footer .peek { width: 44px; }
}
@media (max-width: 24rem) {
	.gallery { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.shot img, .btn { transition: none; }
}
