/* Bubble Reef 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: #2fc9de;
	--sky-bottom: #b9efef;
	--sand: #f3dea0;
	--sand-dark: #d9bd72;
	--sand-light: #fff6dc;
	--teal: #17a5a0;
	--teal-dark: #0e7f84;
	--deep: #0c4b70;
	--gold: #ffc931;
	--ink: #0d2b52;
	--red: #c9402a;
	--paper: #ffffff;
	--text: #0d2b52;
	--muted: #3d5878;
	--link: #0b5fa8;
	--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(--deep);
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

/* The sea behind the header and the hero: light rays from the surface and a few bubbles; .content below the seabed is sand. */
body {
	margin: 0;
	background:
		radial-gradient(circle at 8% 22%, rgba(255, 255, 255, 0.55) 0 5px, transparent 6px),
		radial-gradient(circle at 12% 34%, rgba(255, 255, 255, 0.4) 0 9px, transparent 10px),
		radial-gradient(circle at 93% 18%, rgba(255, 255, 255, 0.5) 0 7px, transparent 8px),
		radial-gradient(circle at 88% 40%, rgba(255, 255, 255, 0.35) 0 12px, transparent 13px),
		radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.4) 0 4px, transparent 5px),
		repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.1) 0 70px, transparent 70px 170px),
		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;
	left: 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-right: auto;
	margin-left: auto;
}

/* The seabed: sand with ripples, like the game. */

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

.ground {
	height: 52px;
	border-top: 6px solid var(--sand-dark);
	background:
		radial-gradient(ellipse at 14% 40%, rgba(217, 189, 114, 0.7) 0 14px, transparent 15px) 0 0 / 110px 52px,
		radial-gradient(ellipse at 62% 62%, rgba(217, 189, 114, 0.55) 0 10px, transparent 11px) 0 0 / 80px 52px,
		linear-gradient(180deg, var(--sand) 0, var(--sand-light) 100%);
}

/* Header */

.site-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	padding-top: 14px;
	padding-bottom: 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);
}

/*
 * 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) {
	padding-top: 7px;
	padding-bottom: 1px;
}

/*
 * The language menu: a plain <details> list, so it works without scripts. Each link goes
 * to the same page in that language.
 */
.lang-menu {
	position: relative;
}

.lang-menu summary {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 4px 14px;
	border: 3px solid var(--ink);
	border-radius: 999px;
	background: var(--ink);
	color: #fff;
	font-weight: 700;
	list-style: none;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}

.lang-menu summary::-webkit-details-marker {
	display: none;
}

.lang-menu summary:hover,
.lang-menu[open] summary {
	background: var(--red);
}

.lang-menu summary svg {
	flex: none;
	width: 18px;
	height: 18px;
}

/* A small chevron that turns over when the menu is open. */
.lang-menu summary::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 1px;
	border-right: 3px solid currentColor;
	border-bottom: 3px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

.lang-menu[open] summary::after {
	transform: translateY(2px) rotate(-135deg);
}

html:lang(ar) .lang-menu summary {
	padding-top: 7px;
	padding-bottom: 1px;
}

.lang-menu ul {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 20;
	min-width: 13rem;
	margin: 0;
	padding: 6px;
	border: 3px solid var(--ink);
	border-radius: 16px;
	background: var(--paper);
	box-shadow: 0 5px 0 var(--ink);
	list-style: none;
}

html[dir="rtl"] .lang-menu ul {
	right: auto;
	left: 0;
}

html[dir="rtl"] .lang-menu summary::after {
	margin-right: 1px;
	margin-left: 0;
}

.nav .lang-menu a {
	display: block;
	padding: 6px 12px;
	border: 0;
	border-radius: 10px;
	background: none;
	white-space: nowrap;
}

.nav .lang-menu a:hover,
.nav .lang-menu a[aria-current] {
	background: var(--gold);
}

.nav .lang-menu li a:lang(ar) {
	padding-top: 9px;
	padding-bottom: 3px;
	font-family: "Tajawal", system-ui, sans-serif;
}

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

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

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

	/*
	 * On a narrow screen the list hangs from the whole menu bar, at its start side, so it
	 * stays on screen wherever the language button wraps to.
	 */
	.nav {
		position: relative;
	}

	.lang-menu {
		position: static;
	}

	.lang-menu ul {
		right: auto;
		left: 0;
	}

	html[dir="rtl"] .lang-menu ul {
		right: 0;
		left: auto;
	}

	/* Finger-sized rows. */
	.nav .lang-menu a {
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.nav .lang-menu li a:lang(ar) {
		padding-top: 13px;
		padding-bottom: 7px;
	}
}

/* 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;
}

html:lang(hi) .title,
html:lang(hi) .title [lang="en"],
.brand [lang="en"] {
	font-family: "Lilita One", system-ui, sans-serif;
	letter-spacing: 0.01em;
}

.section-title {
	line-height: 1.45;
	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-top: 16px;
	padding-bottom: 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-top: 28px;
		padding-bottom: 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(13, 43, 82, 0.45);
}

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

.play:hover {
	background: #14447a;
	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-top: 52px;
	padding-bottom: 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: #dcf6ee;
}

.panel-parents {
	background: #e0f1ff;
}

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

.ticks li {
	position: relative;
	margin-top: 10px;
	margin-bottom: 10px;
	padding-left: 36px;
}

.ticks li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0.15em;
	width: 26px;
	height: 26px;
	border: 2px solid var(--ink);
	border-radius: 50%;
	background: var(--teal);
	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%, 240px), 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: #fff0b8;
}

.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-top: 8px;
	padding-bottom: 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-left: 1.4em;
}

.doc li {
	margin-top: 0.35em;
	margin-bottom: 0.35em;
}

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

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

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

.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 #d6e4f0;
	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-top: 2px;
	margin-bottom: 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(--sand);
	background: var(--deep);
	color: #fff;
	padding-top: 28px;
	padding-bottom: 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;
}

.footer-langs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	font-size: 0.95rem;
}

.footer-langs a[aria-current] {
	color: var(--gold);
	text-decoration: none;
}

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

/* Right-to-left pages put the start-side spacing above on the right. */

html[dir="rtl"] .skip {
	left: auto;
	right: 16px;
}

html[dir="rtl"] .ticks li {
	padding-left: 0;
	padding-right: 36px;
}

html[dir="rtl"] .ticks li::before {
	left: auto;
	right: 0;
}

html[dir="rtl"] .doc ul {
	padding-left: 0;
	padding-right: 1.4em;
}

/*
 * Older browsers ignore gap in flex rows: Safari before 14.1, which is as far as iPhones up to
 * the 6 and 6 Plus go (iOS 12). They also lack `inset`, so this block reaches only them and
 * spaces the same rows with margins instead.
 */
@supports not (inset: 0) {
	.site-header > * {
		margin: 6px 0;
	}

	.brand img,
	.play svg {
		margin-right: 10px;
	}

	.lang-menu summary svg {
		margin-right: 7px;
	}

	.lang-menu summary::after {
		margin-left: 8px;
	}

	.nav > li,
	.chips > li {
		margin: 0 8px 8px 0;
	}

	.footer-links > li {
		margin: 0 22px 8px 0;
	}

	.footer-langs > li {
		margin: 0 18px 6px 0;
	}

	html[dir="rtl"] .brand img,
	html[dir="rtl"] .play svg {
		margin-right: 0;
		margin-left: 10px;
	}

	html[dir="rtl"] .lang-menu summary svg {
		margin-right: 0;
		margin-left: 7px;
	}

	html[dir="rtl"] .lang-menu summary::after {
		margin-right: 8px;
		margin-left: 0;
	}

	html[dir="rtl"] .nav > li,
	html[dir="rtl"] .chips > li {
		margin: 0 0 8px 8px;
	}

	html[dir="rtl"] .footer-links > li {
		margin: 0 0 8px 22px;
	}

	html[dir="rtl"] .footer-langs > li {
		margin: 0 0 6px 18px;
	}
}

/* Bubble Reef additions: the six seas, the phone picture and the trailer link. */

.seas {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

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

.seas li:nth-child(6n + 1) { background: #bff3ee; }
.seas li:nth-child(6n + 2) { background: #c9f2c0; }
.seas li:nth-child(6n + 3) { background: #ffe6b0; }
.seas li:nth-child(6n + 4) { background: #d6ecff; }
.seas li:nth-child(6n + 5) { background: #ffc9b8; }
.seas li:nth-child(6n + 6) { background: #d9d0f5; }

html:lang(ar) .seas li {
	padding-top: 9px;
	padding-bottom: 3px;
}

.phone-shot {
	display: block;
	max-width: 560px;
	margin: 0 auto 32px;
	overflow: hidden;
	border: 4px solid var(--ink);
	border-radius: 16px;
	box-shadow: 0 6px 0 var(--ink);
}

.phone-shot img {
	width: 100%;
	aspect-ratio: 16 / 9;
}

.trailer {
	margin: 0 0 20px;
}

.hero-text .trailer {
	margin-top: 18px;
	margin-bottom: 0;
	font-weight: 700;
}

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