/* Mega Smash Truck! website. Plain CSS: no scripts, no external requests. */

@font-face {
	font-family: "Lilita One";
	src: url("fonts/LilitaOne-Regular.ttf") format("truetype");
	font-display: swap;
}

@font-face {
	font-family: "Tajawal";
	src: url("fonts/Tajawal-Regular.ttf") format("truetype");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Tajawal";
	src: url("fonts/Tajawal-Bold.ttf") format("truetype");
	font-weight: 700;
	font-display: swap;
}

@font-face {
	font-family: "Tajawal";
	src: url("fonts/Tajawal-Black.ttf") format("truetype");
	font-weight: 900;
	font-display: swap;
}

:root {
	color-scheme: light;
	--sky-top: #2f8fe8;
	--sky-bottom: #a8dbf9;
	--grass: #58c13b;
	--grass-dark: #3f9a2c;
	--dirt: #9c6633;
	--dirt-dark: #6f4521;
	--gold: #ffd43b;
	--ink: #1f1b3f;
	--red: #d8322f;
	--cream: #fff7e0;
	--paper: #ffffff;
	--text: #1f1b3f;
	--muted: #4b4872;
	--link: #0f5bb5;
	--radius: 20px;
	--font-title: "Lilita One", system-ui, sans-serif;
	--font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html:lang(ar) {
	--font-title: "Tajawal", system-ui, sans-serif;
	--font-body: "Tajawal", system-ui, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--dirt-dark);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

/* The sky behind the header and the hero; .content below the grass is cream. */
body {
	margin: 0;
	background: linear-gradient(180deg, var(--sky-top) 0, var(--sky-bottom) 760px) no-repeat, var(--sky-bottom);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	overflow-wrap: break-word;
}

html:lang(ar) body {
	font-size: 1.125rem;
	line-height: 1.8;
}

img,
svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: var(--link);
	text-underline-offset: 0.15em;
}

a:hover {
	color: var(--red);
}

:focus-visible {
	outline: 4px solid var(--ink);
	outline-offset: 3px;
	border-radius: 8px;
}

.skip {
	position: absolute;
	inset-inline-start: 16px;
	top: -100px;
	z-index: 10;
	padding: 8px 16px;
	background: var(--paper);
	color: var(--ink);
	border: 3px solid var(--ink);
	border-radius: 12px;
	font-weight: 700;
}

.skip:focus {
	top: 12px;
}

.wrap {
	width: min(100% - 32px, 1100px);
	margin-inline: auto;
}

/* Grass and dirt, like the game. */

.content {
	display: flow-root;
	background: var(--cream);
}

.ground {
	height: 52px;
	background:
		radial-gradient(circle at 12% 70%, var(--dirt-dark) 0 3px, transparent 4px) 0 0 / 90px 52px,
		radial-gradient(circle at 60% 85%, var(--dirt-dark) 0 2px, transparent 3px) 0 0 / 70px 52px,
		linear-gradient(var(--grass) 0 20px, var(--grass-dark) 20px 26px, var(--dirt) 26px 100%);
}

/* Header */

.site-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	padding-block: 14px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	font-family: var(--font-title);
	font-size: 1.4rem;
	font-weight: 900;
	line-height: 1.2;
	text-decoration: none;
	-webkit-text-stroke: 6px var(--ink);
	paint-order: stroke fill;
}

.brand:hover {
	color: var(--gold);
}

.brand img {
	width: 46px;
	height: 46px;
	border: 3px solid var(--ink);
	border-radius: 12px;
}

.nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav a {
	display: inline-block;
	padding: 4px 14px;
	border: 3px solid var(--ink);
	border-radius: 999px;
	background: var(--paper);
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}

.nav a:hover {
	background: var(--gold);
}

.nav a[aria-current="page"] {
	background: var(--gold);
}

.nav .lang a {
	background: var(--ink);
	color: #fff;
}

.nav .lang a:hover {
	background: var(--red);
}

/*
 * Tajawal draws Arabic high in its line, with room for dots and tails below, so an
 * evenly padded Arabic label looks lifted. Arabic labels get more padding above.
 */
html:lang(ar) .nav a:lang(ar),
.nav .lang a:lang(ar) {
	padding-top: 7px;
	padding-bottom: 1px;
}

.nav .lang a:lang(ar) {
	font-family: "Tajawal", system-ui, sans-serif;
}

html:lang(ar) .nav .lang a:lang(en) {
	padding-top: 5px;
	padding-bottom: 3px;
}

@media (max-width: 480px) {
	.nav {
		gap: 6px;
	}

	.nav a {
		padding: 2px 10px;
		font-size: 0.92rem;
	}

	html:lang(ar) .nav a:lang(ar),
	.nav .lang a:lang(ar) {
		padding-top: 4px;
		padding-bottom: 0;
	}
}

/* Titles: gold letters with a thick dark outline, as in the game's logo. */

.title {
	margin: 0 0 12px;
	color: var(--gold);
	font-family: var(--font-title);
	font-size: clamp(2.6rem, 8vw, 4.75rem);
	font-weight: 900;
	line-height: 1.08;
	letter-spacing: 0.01em;
	-webkit-text-stroke: 0.16em var(--ink);
	paint-order: stroke fill;
	text-shadow: 0 0.08em 0 var(--ink);
}

html:lang(ar) .title {
	line-height: 1.35;
	letter-spacing: 0;
}

.section-title {
	margin: 0 0 8px;
	color: var(--gold);
	font-family: var(--font-title);
	font-size: clamp(1.9rem, 5vw, 2.7rem);
	font-weight: 900;
	line-height: 1.2;
	text-align: center;
	-webkit-text-stroke: 0.16em var(--ink);
	paint-order: stroke fill;
	text-shadow: 0 0.07em 0 var(--ink);
}

.lead {
	max-width: 62ch;
	margin: 0 auto 28px;
	color: var(--muted);
	font-size: 1.15rem;
	text-align: center;
}

/* Home page hero */

.hero {
	display: grid;
	gap: 28px;
	align-items: center;
	padding-block: 16px 44px;
}

.hero-text .tagline {
	margin: 0 0 8px;
	color: var(--ink);
	font-size: clamp(1.3rem, 3vw, 1.65rem);
	font-weight: 800;
	line-height: 1.3;
}

.hero-text p {
	margin: 0 0 20px;
	max-width: 46ch;
	font-size: 1.15rem;
}

.hero-art img {
	width: 100%;
	border: 5px solid var(--ink);
	border-radius: 24px;
	box-shadow: 0 10px 0 var(--ink);
}

@media (min-width: 880px) {
	.hero {
		grid-template-columns: 1fr 1.15fr;
		gap: 40px;
		padding-block: 28px 64px;
	}
}

/* "Coming soon on Google Play" button: a plain button, not Google's badge artwork. */

.play {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 10px 24px 10px 16px;
	border: 3px solid var(--paper);
	border-radius: 16px;
	background: var(--ink);
	color: #fff;
	line-height: 1.15;
	text-decoration: none;
	box-shadow: 0 6px 0 rgba(31, 27, 63, 0.45);
}

html[dir="rtl"] .play {
	padding: 10px 16px 10px 24px;
}

.play:hover {
	background: #2d2766;
	color: #fff;
}

.play svg {
	flex: none;
	width: 34px;
	height: 34px;
}

.play span {
	display: block;
}

.play .play-small {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gold);
}

html:lang(ar) .play .play-small {
	font-size: 0.95rem;
	letter-spacing: 0;
}

.play .play-big {
	font-family: "Lilita One", system-ui, sans-serif;
	font-size: 1.55rem;
}

@media (prefers-reduced-motion: no-preference) {
	.play,
	.nav a,
	.shots a {
		transition: transform 0.15s ease;
	}

	.play:hover,
	.shots a:hover {
		transform: translateY(-3px);
	}
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}

.chips li {
	padding: 3px 14px;
	border: 3px solid var(--ink);
	border-radius: 999px;
	background: var(--paper);
	font-weight: 700;
}

html:lang(ar) .chips li {
	padding-top: 6px;
	padding-bottom: 0;
}

/* Content sections */

.section {
	padding-block: 52px;
}

.section + .section {
	padding-top: 12px;
}

.features {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.card,
.panel,
.platform,
.doc,
.maker {
	border: 4px solid var(--ink);
	border-radius: var(--radius);
	background: var(--paper);
	box-shadow: 0 6px 0 var(--ink);
}

.card {
	padding: 18px 18px 20px;
}

.card svg {
	width: 56px;
	height: 56px;
}

.card h3 {
	margin: 10px 0 4px;
	color: var(--red);
	font-family: var(--font-title);
	font-size: 1.35rem;
	font-weight: 900;
	line-height: 1.25;
}

.card p {
	margin: 0;
}

.panels {
	display: grid;
	gap: 20px;
}

@media (min-width: 780px) {
	.panels {
		grid-template-columns: 1fr 1fr;
	}
}

.panel {
	padding: 22px 24px;
}

.panel h3 {
	margin: 0 0 6px;
	font-family: var(--font-title);
	font-size: 1.6rem;
	font-weight: 900;
	line-height: 1.25;
}

.panel-kids {
	background: #e7f8dd;
}

.panel-parents {
	background: #e2f0ff;
}

.ticks {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ticks li {
	position: relative;
	margin-block: 10px;
	padding-inline-start: 36px;
}

.ticks li::before {
	content: "✓";
	position: absolute;
	inset-inline-start: 0;
	top: 0.15em;
	width: 26px;
	height: 26px;
	border: 2px solid var(--ink);
	border-radius: 50%;
	background: var(--grass);
	color: #fff;
	font-family: system-ui, sans-serif;
	font-size: 0.9rem;
	font-weight: 900;
	line-height: 22px;
	text-align: center;
}

.shots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.shots a {
	display: block;
	overflow: hidden;
	border: 4px solid var(--ink);
	border-radius: 16px;
	background: var(--sky-bottom);
	box-shadow: 0 6px 0 var(--ink);
}

.shots img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.platforms {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	gap: 20px;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
}

.platform {
	padding: 22px 20px;
	text-align: center;
}

.platform svg {
	width: 64px;
	height: 64px;
	margin: 0 auto 8px;
}

.platform h3 {
	margin: 0 0 4px;
	font-size: 1.2rem;
	line-height: 1.3;
}

.platform p {
	margin: 0;
}

.center {
	text-align: center;
}

.maker {
	display: grid;
	gap: 20px;
	align-items: center;
	padding: 24px;
	background: #fff3c4;
}

.maker img {
	width: 96px;
	height: 96px;
	border: 4px solid var(--ink);
	border-radius: 22px;
}

.maker h2 {
	margin: 0 0 6px;
	font-family: var(--font-title);
	font-size: 1.8rem;
	font-weight: 900;
	line-height: 1.25;
}

.maker p {
	margin: 0;
}

@media (min-width: 640px) {
	.maker {
		grid-template-columns: auto 1fr;
		padding: 28px 32px;
	}
}

/* Privacy and support pages */

.page-hero {
	padding-block: 8px 36px;
	text-align: center;
}

.page-hero .title {
	font-size: clamp(2.3rem, 7vw, 3.8rem);
}

.page-hero p {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
}

.doc {
	max-width: 840px;
	margin: 44px auto 56px;
	padding: clamp(20px, 4vw, 44px);
}

.doc > :first-child {
	margin-top: 0;
}

.doc h2 {
	margin: 1.7em 0 0.4em;
	color: var(--red);
	font-family: var(--font-title);
	font-size: 1.55rem;
	font-weight: 900;
	line-height: 1.3;
}

.doc h3 {
	margin: 1.4em 0 0.3em;
	font-size: 1.15rem;
	line-height: 1.35;
}

.doc ul {
	padding-inline-start: 1.4em;
}

.doc li {
	margin-block: 0.35em;
}

.meta {
	margin: 0 0 1.2em;
	color: var(--muted);
}

.summary {
	margin: 0 0 1.4em;
	padding: 14px 18px;
	border: 3px solid var(--grass-dark);
	border-radius: 14px;
	background: #e7f8dd;
}

.contact-box {
	margin-top: 0.6em;
	padding: 14px 18px;
	border: 3px solid var(--ink);
	border-radius: 14px;
	background: #e2f0ff;
}

.contact-box p {
	margin: 0.2em 0;
}

.keys {
	width: 100%;
	margin: 0.6em 0 1em;
	border-collapse: collapse;
}

.keys th,
.keys td {
	padding: 10px 12px;
	border-bottom: 2px solid #e4e1f2;
	text-align: start;
	vertical-align: top;
}

.keys th {
	width: 34%;
	font-weight: 700;
}

.keys thead th {
	border-bottom: 3px solid var(--ink);
}

kbd {
	display: inline-block;
	min-width: 2.2em;
	margin-block: 2px;
	padding: 1px 8px;
	border: 2px solid var(--ink);
	border-bottom-width: 4px;
	border-radius: 8px;
	background: var(--paper);
	color: var(--ink);
	font-family: inherit;
	font-size: 0.95em;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
}

/* Footer */

.site-footer {
	border-top: 22px solid var(--grass);
	background: var(--dirt-dark);
	color: #fff;
	padding-block: 28px 36px;
}

.site-footer a {
	color: #fff;
}

.site-footer a:hover {
	color: var(--gold);
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
	font-weight: 700;
}

.site-footer p {
	margin: 6px 0 0;
	font-size: 0.95rem;
	opacity: 0.92;
}
