/* Yangolo website. Colours come from the game's brand (game/resources/brand.tres) and its dusk sky; the type is the
   game's own (IBM Plex Sans and Plex Sans Condensed, OFL). Corners stop at 10 px like the game's UI. */

@font-face { font-family: "Plex"; src: url("fonts/IBMPlexSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("fonts/IBMPlexSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Condensed"; src: url("fonts/IBMPlexSansCondensed-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Condensed"; src: url("fonts/IBMPlexSansCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
	--night: #120f1d;
	--night-2: #191428;
	--plum: #241c3a;
	--asphalt: #3a2f55;
	--line: rgba(255, 248, 235, 0.14);
	--line-strong: rgba(255, 248, 235, 0.32);
	--cream: #fff8eb;
	--mist: #cfc4e0;
	--sun: #f5a524;
	--sun-hi: #ffc35a;
	--dusk: #d9667a;
	--teal: #0f766e;
	--panel: #1d2028;
	--radius: 10px;
	--wrap: 76rem;
	--gutter: clamp(1rem, 4vw, 2.5rem);
	--display: "Plex Condensed", "Arial Narrow", system-ui, sans-serif;
	--text: "Plex", system-ui, -apple-system, "Segoe UI", sans-serif;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--night);
	color: var(--cream);
	font: 400 1.0625rem/1.6 var(--text);
	text-rendering: optimizeLegibility;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: var(--sun-hi); text-underline-offset: 0.18em; }
a:hover { color: var(--cream); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.04; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.9em; background: var(--plum); padding: 0.05em 0.35em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--sun); color: var(--night); padding: 0.6rem 1rem; border-radius: 6px; font-weight: 600; }
.skip:focus { top: 1rem; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

kbd {
	display: inline-block;
	min-width: 1.7em;
	padding: 0.02em 0.42em 0.08em;
	font: 600 0.82em/1.4 var(--display);
	text-align: center;
	color: var(--cream);
	background: var(--plum);
	border: 1px solid #4b3f68;
	border-bottom-width: 3px;
	border-radius: 5px;
	vertical-align: 0.06em;
}

/* Buttons: the game's buttons (sentence case, solid sun for the main action). */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	min-height: 3rem;
	padding: 0.7rem 1.25rem;
	border-radius: 8px;
	border: 1.5px solid transparent;
	font: 600 1.06rem/1.1 var(--display);
	text-decoration: none;
	cursor: pointer;
	touch-action: manipulation;
	transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.08s ease;
}
.btn svg { width: 1.1em; height: 1.1em; fill: currentColor; }
.btn:active { transform: translateY(1px); }
.btn-sun { background: var(--sun); color: var(--night); }
.btn-sun:hover { background: var(--sun-hi); color: var(--night); }
.btn-line { background: rgba(18, 15, 29, 0.35); color: var(--cream); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--sun); color: var(--sun-hi); }
.btn-sm { min-height: 2.6rem; padding: 0.5rem 0.9rem; font-size: 0.98rem; }
.btn kbd { font-size: 0.72em; background: rgba(18, 15, 29, 0.18); border-color: rgba(18, 15, 29, 0.35); color: inherit; }
.btn-line kbd { background: var(--plum); border-color: #4b3f68; }
.btn[aria-disabled="true"] { background: var(--plum); color: var(--mist); border-color: var(--line); cursor: not-allowed; transform: none; }

.kicker {
	font: 600 0.84rem/1.3 var(--display);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sun);
}

/* Top bar */
.bar {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding: 0.7rem var(--gutter);
	transition: background-color 0.25s ease, border-color 0.25s ease;
	border-bottom: 1px solid transparent;
}
.bar.scrolled { background: rgba(18, 15, 29, 0.92); border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--cream); text-decoration: none; font: 600 1.35rem/1 var(--display); }
.brand img { border-radius: 50%; }
.bar nav { display: none; gap: 1.6rem; margin-left: auto; }
.bar nav a { color: var(--mist); text-decoration: none; font: 500 1.02rem/1 var(--display); padding: 0.4rem 0; }
.bar nav a:hover { color: var(--cream); }
.bar > .btn { margin-left: auto; }
@media (min-width: 760px) {
	.bar nav { display: flex; }
	.bar > .btn { margin-left: 0.4rem; }
}

/* Hero: the live 3D street, the title like a game's title screen, and an offer card from the game's phone. */
.hero {
	position: relative;
	min-height: max(36rem, 100svh);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	isolation: isolate;
}
.hero-sky {
	position: absolute;
	inset: 0;
	z-index: -4;
	/* The game's dusk sky; its horizon band meets the fog colour of the 3D scene (#e98a62). */
	background: linear-gradient(180deg, #1f173d 0%, #3d2563 16%, #7b3a78 29%, #c75a7b 39%, #ef8a64 46%, #e98a62 49%, #3a2f55 70%, #2a2142 100%);
}
@media (max-width: 959px) {
	.hero-sky { background: linear-gradient(180deg, #2a1d4f 0%, #7b3a78 9%, #c75a7b 16%, #ef8a64 21%, #e98a62 24%, #3a2f55 45%, #2a2142 100%); }
}
.hero-still {
	position: absolute;
	inset: 0 0 0 auto;
	z-index: -3;
	width: min(100%, 72rem);
	height: 100%;
	object-fit: cover;
	object-position: 30% 60%;
	transition: opacity 0.6s ease;
}
#scene {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.9s ease;
}
.scene-ready #scene { opacity: 1; }
.scene-ready .hero-still { opacity: 0; }
.no-webgl #scene { display: none; }
.hero-shade {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(18, 15, 29, 0.9) 0%, rgba(18, 15, 29, 0.62) 30%, rgba(18, 15, 29, 0) 58%),
		linear-gradient(0deg, rgba(18, 15, 29, 0.85) 0%, rgba(18, 15, 29, 0) 34%);
}
.hero-inner {
	width: min(100% - 2 * var(--gutter), var(--wrap));
	margin-inline: auto;
	padding: 7rem 0 clamp(2rem, 6vh, 4rem);
	display: grid;
	gap: 2rem;
	align-items: end;
}
.hero-copy { max-width: 36rem; }
.wordmark {
	margin-top: 0.35rem;
	font-size: clamp(4.2rem, 13vw, 9.6rem);
	line-height: 0.9;
	letter-spacing: -0.025em;
	padding-bottom: 0.12em;   /* room for the g's descender above the tagline */
}
.tagline {
	margin-top: 0.3rem;
	font: 500 clamp(1.4rem, 3.2vw, 2.15rem)/1.15 var(--display);
	color: var(--sun);
}
.pitch { margin-top: 1.1rem; max-width: 33rem; color: var(--mist); font-size: 1.08rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }
.cta-note { margin-top: 0.8rem; font-size: 0.92rem; color: var(--mist); }

.offer {
	justify-self: end;
	width: min(100%, 22.5rem);
	padding: 1rem 1.05rem 1.05rem;
	background: rgba(29, 32, 40, 0.94);
	border: 1px solid rgba(255, 255, 255, 0.13);
	border-radius: var(--radius);
	color: var(--cream);
	font-size: 0.98rem;
}
.offer-top { display: flex; align-items: center; gap: 0.5rem; color: var(--mist); font-size: 0.9rem; }
.offer-ico { width: 1.35rem; height: 1.35rem; color: var(--sun); }
.offer-clock { margin-left: auto; font-variant-numeric: tabular-nums; }
.offer-name { margin-top: 0.55rem; font: 600 1.45rem/1.1 var(--display); }
.offer-fare { margin-top: 0.3rem; font: 600 1.6rem/1.15 var(--display); font-variant-numeric: tabular-nums; }
.offer-badge { display: inline-block; margin-left: 0.25rem; font: 500 0.92rem/1 var(--display); color: var(--sun); vertical-align: 0.2em; }
.offer-route { margin-top: 0.5rem; font-weight: 600; }
.offer-meta { color: var(--mist); font-size: 0.92rem; }
.offer-bar { height: 4px; margin: 0.8rem 0 0.85rem; background: rgba(255, 255, 255, 0.1); border-radius: 2px; overflow: hidden; }
.offer-bar span { display: block; height: 100%; background: var(--sun); transform-origin: left; animation: countdown 14s linear infinite; }
@keyframes countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.offer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.offer.swap .offer-name, .offer.swap .offer-fare, .offer.swap .offer-route, .offer.swap .offer-meta { animation: swap-in 0.32s ease-out; }
@keyframes swap-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (min-width: 960px) {
	.hero-inner { grid-template-columns: 1fr auto; }
}
@media (max-width: 959px) {
	.hero { align-items: flex-end; }
	.hero-shade { background: linear-gradient(0deg, rgba(18, 15, 29, 0.95) 0%, rgba(18, 15, 29, 0.75) 45%, rgba(18, 15, 29, 0.1) 75%); }
	.hero-inner { padding-top: 45svh; }
	.offer { justify-self: start; }
}
@media (max-width: 520px) {
	.offer { display: none; }
}

/* The taxi's checker band, as on the game's taxi. */
.checker {
	height: 26px;
	background: repeating-conic-gradient(var(--night) 0 25%, var(--sun) 0 50%) 0 0 / 26px 26px;
}

/* Sections */
.band { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.sec-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.sec-head h2 { margin-top: 0.5rem; font-size: clamp(2.1rem, 4.8vw, 3.7rem); }
.sec-lead { margin-top: 0.9rem; color: var(--mist); font-size: 1.1rem; max-width: 40rem; }
.sec-head-row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; }
.sec-head-row .sec-lead { margin: 0; }

.demo { background: var(--night-2); }
.player { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; object-fit: cover; }
.play {
	position: absolute;
	inset: 50% auto auto 50%;
	transform: translate(-50%, -50%);
	width: clamp(4.5rem, 10vw, 6.5rem);
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	background: var(--sun);
	color: var(--night);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.16s ease, transform 0.16s ease;
}
.play svg { width: 42%; height: 42%; fill: currentColor; margin-left: 8%; }
.play:hover { background: var(--sun-hi); transform: translate(-50%, -50%) scale(1.04); }
.player.playing .play { display: none; }

/* The loop: three steps, screenshot and text side by side, alternating. */
.step {
	display: grid;
	gap: clamp(1.4rem, 3vw, 3rem);
	align-items: center;
	margin-top: clamp(2.5rem, 6vw, 5rem);
}
.step:first-of-type { margin-top: 0; }
.step-shot { margin: 0; }
.step-shot img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.step-text { max-width: 30rem; }
.step-text h3 { margin-top: 0.8rem; font-size: clamp(2rem, 3.6vw, 2.8rem); }
.step-text p:last-child { margin-top: 0.8rem; color: var(--mist); }
.step-no {
	display: inline-block;
	padding: 0.1rem 0.6rem 0.05rem;
	background: var(--sun);
	color: var(--night);
	border-radius: 6px 6px 2px 2px;
	font: 600 1rem/1.4 var(--display);
	letter-spacing: 0.06em;
}
@media (min-width: 960px) {
	.step { grid-template-columns: 7fr 5fr; }
	.step-flip .step-shot { order: 2; }
	.step-flip { grid-template-columns: 5fr 7fr; }
}

/* The city */
.city { background: var(--night-2); }
.city-grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.city-text h2 { margin-top: 0.5rem; font-size: clamp(2.1rem, 4.8vw, 3.7rem); }
.city-text > p { margin-top: 1rem; color: var(--mist); max-width: 34rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1.5rem; margin: 2rem 0 0; }
.facts div { border-top: 2px dashed var(--line-strong); padding-top: 0.7rem; }
.facts dt { font: 600 clamp(1.9rem, 3.4vw, 2.6rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.facts dd { margin: 0.25rem 0 0; color: var(--mist); font-size: 0.95rem; }
.plates { list-style: none; display: flex; flex-wrap: wrap; gap: 0.55rem; padding: 0; margin: 2rem 0 0; }
.plates li {
	padding: 0.42rem 0.8rem 0.36rem;
	background: var(--teal);
	color: var(--cream);
	font: 600 0.92rem/1 var(--display);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 4px;
	box-shadow: inset 0 0 0 2px var(--teal), inset 0 0 0 3.5px var(--cream);
}
.city-map { margin: 0; }
.city-map img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.city-map figcaption { margin-top: 0.7rem; color: var(--mist); font-size: 0.9rem; }
@media (min-width: 960px) { .city-grid { grid-template-columns: 5fr 7fr; } }

/* Modes: three columns separated like road lanes. */
.mode-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.mode-list li { padding: 1.5rem 0; border-top: 2px dashed var(--line-strong); }
.mode-list h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--sun); }
.mode-list p { margin-top: 0.6rem; color: var(--mist); max-width: 26rem; }
@media (min-width: 860px) {
	.mode-list { grid-template-columns: repeat(3, 1fr); }
	.mode-list li { border-top: 0; padding: 0.4rem 2rem 0.4rem 0; }
	.mode-list li + li { border-left: 2px dashed var(--line-strong); padding-left: 2rem; }
}

/* Screenshot strip */
.shots { background: var(--night-2); padding-bottom: clamp(3rem, 6vw, 5rem); }
.strip {
	list-style: none;
	display: flex;
	gap: 1rem;
	margin: 0;
	padding: 0 var(--gutter) 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gutter);
	scrollbar-color: var(--asphalt) transparent;
}
@media (min-width: 1300px) { .strip { padding-inline: calc((100vw - var(--wrap)) / 2); scroll-padding-inline: calc((100vw - var(--wrap)) / 2); } }
.strip li { flex: 0 0 min(80vw, 30rem); scroll-snap-align: start; }
.strip button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); transition: border-color 0.16s ease; }
.strip button:hover img { border-color: var(--sun); }
.strip span { display: block; margin-top: 0.6rem; color: var(--mist); font-size: 0.94rem; }

/* Downloads */
.get { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); }
.platforms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.plat {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.9rem 1.2rem;
	align-items: center;
	padding: 1.3rem 0.4rem;
	border-bottom: 1px solid var(--line);
}
.plat-ico { width: 2.6rem; height: 2.6rem; fill: currentColor; color: var(--cream); }
.plat-info h3 { font-size: 1.55rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.plat-info p { margin-top: 0.3rem; color: var(--mist); font-size: 0.97rem; }
.plat-meta { color: var(--cream); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plat .btn { grid-column: 1 / -1; justify-self: start; }
.plat-tag { font: 600 0.74rem/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--night); background: var(--sun); padding: 0.32rem 0.5rem 0.28rem; border-radius: 4px; }
.plat.mine { background: linear-gradient(90deg, rgba(245, 165, 36, 0.12), rgba(245, 165, 36, 0) 70%); box-shadow: inset 4px 0 0 var(--sun); padding-left: 1.2rem; order: -1; }
@media (min-width: 720px) {
	.plat { grid-template-columns: auto 1fr auto; padding-inline: 1rem; }
	.plat .btn { grid-column: auto; min-width: 13rem; }
}
.apple-note { margin-top: 1.2rem; color: var(--mist); }
.howto { display: grid; gap: 0 2rem; margin-top: 2.5rem; }
@media (min-width: 860px) { .howto { grid-template-columns: 1fr 1fr; } }
.howto details { border-bottom: 1px solid var(--line); }
.howto summary { cursor: pointer; padding: 1rem 0; font: 600 1.1rem/1.3 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: "+"; color: var(--sun); font-size: 1.4rem; line-height: 1; }
.howto details[open] summary::after { content: "–"; }
.howto details p { padding: 0 0 1.1rem; color: var(--mist); }

/* Controls */
.keys-grid { display: grid; gap: 2.5rem; }
.keylist { margin: 0; display: grid; }
.keylist div { display: grid; grid-template-columns: minmax(9rem, 15rem) 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.keylist dt { color: var(--mist); }
.keylist dd { margin: 0; }
.keylist .or { color: var(--mist); font-size: 0.9em; margin: 0 0.2rem; }
.keys-side p { color: var(--mist); }
.keys-side p + p { margin-top: 1rem; }
.keys-side strong { color: var(--cream); font-weight: 600; }
@media (min-width: 960px) { .keys-grid { grid-template-columns: 7fr 5fr; } }
@media (max-width: 520px) { .keylist div { grid-template-columns: 1fr; gap: 0.3rem; } }

/* Coming soon, over the Wouri bridges at sunset */
.soon {
	position: relative;
	background:
		linear-gradient(90deg, rgba(18, 15, 29, 0.94) 0%, rgba(18, 15, 29, 0.7) 55%, rgba(18, 15, 29, 0.35) 100%),
		url("img/bridge-1280.webp") center 62% / cover no-repeat;
}
.soon-inner { max-width: var(--wrap); }
.soon h2 { margin-top: 0.5rem; font-size: clamp(2.1rem, 4.8vw, 3.7rem); }
.soon-inner > p:last-child { margin-top: 1rem; max-width: 36rem; color: var(--mist); font-size: 1.1rem; }

/* Footer */
.foot { padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--mist); }
.foot-inner { display: grid; gap: 1.5rem; }
.foot-brand { display: flex; align-items: center; gap: 0.8rem; }
.foot-brand img { border-radius: 50%; }
.foot-name { font: 600 1.3rem/1 var(--display); color: var(--cream); }
.credits p + p { margin-top: 0.5rem; }
@media (min-width: 860px) { .foot-inner { grid-template-columns: auto 1fr; gap: 3rem; } }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1600px); color: var(--cream); }
.lightbox::backdrop { background: rgba(10, 8, 18, 0.9); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: var(--radius); }
.lightbox p { margin-top: 0.7rem; text-align: center; color: var(--mist); }
.lb-close { position: fixed; top: 1rem; right: 1rem; width: 3rem; height: 3rem; display: grid; place-items: center; background: var(--panel); color: var(--cream); border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer; }
.lb-close svg { width: 1.4rem; height: 1.4rem; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
