/* Static homepage styles. Served from /_home/style.css, versioned by filemtime in index.php. No server cache for this folder, see _home/.htaccess. */

@font-face {
	font-family: "MZEnglish";
	src: url("fonts/MZEnglishNormal.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "MZEnglish";
	src: url("fonts/MZEnglishBold.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}

@font-face {
	font-family: "MZArabica";
	src: url("fonts/MZArabicaNormal.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "MZArabica";
	src: url("fonts/MZArabicaBold.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}

:root {
	--bg: #0b1020;
	--bg-2: #141a36;
	--ink: #f3f5ff;
	/* Text colors are solid, never rgba: Arabic glyphs overlap and translucent fills show seams where they do. */
	--ink-2: #b4b9cf;
	--ink-3: #858ca8;
	--blue: #0386fb;
	--cyan: #22d3ee;
	--violet: #7c5cff;
	--glass: rgba(255, 255, 255, 0.06);
	--glass-2: rgba(255, 255, 255, 0.1);
	--line: rgba(255, 255, 255, 0.1);
	--line-2: rgba(255, 255, 255, 0.22);
	--radius: 22px;
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	/* Body text in MZArabica for both languages, same as the rest of the site. MZEnglish only on headings and buttons. */
	--font: "MZArabica", "Segoe UI", sans-serif;
	/* MZEnglish is switched off for now (trial). To bring it back: "MZEnglish", "MZArabica", "Segoe UI", sans-serif */
	--font-display: "MZArabica", "Segoe UI", sans-serif;
}

html[dir="rtl"] {
	--font-display: "MZArabica", "Segoe UI", sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Keep the scrollbar's space reserved while the menu locks scrolling, so the page does not jump sideways on desktop */
	scrollbar-gutter: stable;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.5;
	color: var(--ink);
	background: var(--bg);
	background-image: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 60%, #070a16 100%);
	background-attachment: fixed;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	display: block;
}

/* Soft gradient glows behind everything. Fixed, so the cards scroll over them.
   Phone first: big and central so they show on a narrow screen. Desktop values are in the media query below. */
.glow {
	position: fixed;
	z-index: -1;
	border-radius: 50%;
	filter: blur(100px);
	pointer-events: none;
	opacity: 0.4;
}

.glow-a {
	width: 120vw;
	height: 120vw;
	top: -45vw;
	left: -10vw;
	background: radial-gradient(circle, var(--blue) 0%, transparent 65%);
}

.glow-b {
	width: 90vw;
	height: 90vw;
	top: 20vh;
	right: -35vw;
	background: radial-gradient(circle, var(--cyan) 0%, transparent 65%);
	opacity: 0.22;
}

.glow-c {
	width: 110vw;
	height: 110vw;
	bottom: -50vw;
	left: -20vw;
	background: radial-gradient(circle, var(--violet) 0%, transparent 65%);
	opacity: 0.18;
}

/* No z-index here: the page must not form a stacking context, or the menu button could never rise above the drawer */
.page {
	position: relative;
	max-width: 960px;
	margin: 0 auto;
	/* Phone: 20px gutters like the WordPress pages, 10px above the header */
	padding: 10px 20px 48px;
}

/* Top bar */
.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 0 25px;
	margin-top: 15px;
}

/* One glass surface for every small control: menu button, Shop, language tab, social circles. Edit it here only. */
.glass {
	appearance: none;
	border: 1px solid var(--line);
	background: var(--glass);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
	color: var(--ink);
	font: inherit;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.glass:hover {
	border-color: var(--line-2);
	background: var(--glass-2);
}

.brand-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.brand {
	margin: 0;
	font-size: 0;
	line-height: 0;
}

/* Round glass hamburger, two thin lines */
.menu-btn {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
}

.menu-btn span {
	display: block;
	width: 16px;
	height: 1.5px;
	border-radius: 2px;
	background: var(--ink);
	transition: transform 0.45s var(--ease-out);
}

/* Open: the button stays where it is, above the drawer, and the two dashes rotate into a cross */
html.menu-open .menu-btn {
	position: relative;
	z-index: 22;
	border-color: var(--line-2);
	background: var(--glass-2);
}

html.menu-open .menu-btn span:first-child {
	transform: translateY(3.25px) rotate(45deg);
}

html.menu-open .menu-btn span:last-child {
	transform: translateY(-3.25px) rotate(-45deg);
}

/* Drawer: slides in from the start side, same glass as the cards */
.scrim {
	position: fixed;
	inset: 0;
	z-index: 20;
	background: rgba(5, 8, 20, 0.5);
	opacity: 0;
	transition: opacity 0.45s var(--ease-out);
}

.drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	inset-inline-start: 0;
	z-index: 21;
	width: min(320px, 85vw);
	padding: 96px 20px 28px;
	display: flex;
	flex-direction: column;
	border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
	/* Glossy glass: translucent so the blurred page shows through, a sheen at the top, a highlight line inside the top edge */
	background: radial-gradient(140% 50% at 50% 0%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%), linear-gradient(180deg, rgba(40, 45, 70, 0.72) 0%, rgba(14, 18, 36, 0.78) 100%);
	backdrop-filter: blur(32px) saturate(1.4);
	-webkit-backdrop-filter: blur(32px) saturate(1.4);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 60px rgba(0, 0, 0, 0.45);
	transform: translateX(-100%);
	transition: transform 0.5s var(--ease-out);
}

html[dir="rtl"] .drawer {
	transform: translateX(100%);
}

html.menu-open .scrim {
	opacity: 1;
}

html.menu-open .drawer {
	transform: translateX(0);
}

html.menu-open {
	overflow: hidden;
}

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

.drawer-links a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 4px;
	border-bottom: 1px solid var(--line);
	font-family: var(--font-display);
	font-size: 18px;
	font-weight: 700;
	color: var(--ink);
}

/* In the list the arrow is bare: no disc, no ring, no motion, flush with the end edge */
.drawer-links a .arrow {
	width: 18px;
	height: 18px;
	margin-inline-end: -2px;
	border: 0;
	background: none;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	color: var(--ink-3);
}

.drawer-links a .arrow svg {
	width: 18px;
	height: 18px;
	transition: none;
}

.drawer-links a:hover .arrow {
	color: var(--ink);
}

.drawer-social {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: auto 0 0;
	padding: 0 4px;
	list-style: none;
}

.drawer-social a {
	display: inline-flex;
	color: var(--ink-2);
	transition: color 0.2s ease;
}

.drawer-social a:hover {
	color: var(--ink);
}

.drawer-social svg {
	width: 20px;
	height: 20px;
}

.drawer-copy {
	margin: 16px 0 0;
	padding: 0 4px;
	font-size: 11px;
	color: var(--ink-3);
}

.brand img {
	width: auto;
	height: 30px;
}

.actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.btn,
.lang {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	padding: 0 16px;
	border-radius: 10px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	white-space: nowrap;
}

.btn {
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* Language switcher: the same pill as Shop, inside the side menu under the links */
.lang {
	align-self: flex-start;
	margin-top: 24px;
}

/* Hero */
.hero {
	text-align: center;
	padding: 8px 0 36px;
}

.avatar {
	position: relative;
	width: 124px;
	height: 124px;
	margin: 0 auto 28px;
	padding: 2px;
	border-radius: 50%;
	background: conic-gradient(from 160deg, var(--blue), var(--cyan), var(--violet), var(--blue));
	box-shadow: 0 10px 30px rgba(3, 134, 251, 0.18);
}

.avatar::after {
	content: "";
	position: absolute;
	inset: -10px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(34, 211, 238, 0.12), transparent 70%);
	z-index: -1;
}

.avatar img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--bg);
}

/* The name is in the logo, so the hero opens with the role as its heading */
.role {
	/* Gradient text only paints inside the box. Padding keeps descenders such as the dots of a final yeh inside it. */
	margin: 0 0 4px;
	padding: 0.15em 0 0.45em;
	font-family: var(--font-display);
	font-size: 20px;
	line-height: 1.2;
	font-weight: 700;
	/* Lighter blue, a step toward white */
	background: linear-gradient(135deg, #6db9ff 0%, #a9dcff 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.bio {
	max-width: 560px;
	margin: 0 auto 22px;
	padding: 0 5%;
	color: var(--ink-2);
	font-size: 13px;
	text-wrap: pretty;
}

/* One row, never wraps. Six icons need 314px, so the low-priority ones drop out on narrow screens instead. */
.social {
	display: flex;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 353px) {
	.social .hide-1 {
		display: none;
	}
}

@media (max-width: 299px) {
	.social .hide-2 {
		display: none;
	}
}

.social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: var(--ink-2);
}

.social a:hover {
	transform: translateY(-2px);
	color: var(--ink);
}

.social svg {
	width: 18px;
	height: 18px;
}

/* One quiet social-proof line under the icons */
.proof {
	max-width: 420px;
	margin: 16px auto 0;
	font-size: 13px;
	line-height: 1.6;
	color: var(--ink-3);
	text-wrap: pretty;
}

/* Groups and cards */
.group {
	margin: 0 0 28px;
}

.group h2 {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
	padding: 0 4px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
}

html[dir="rtl"] .group h2 {
	font-size: 14px;
	letter-spacing: 0;
}

.group h2::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, var(--line), transparent);
}

html[dir="rtl"] .group h2::after {
	background: linear-gradient(270deg, var(--line), transparent);
}

.grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.card {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px;
	border-radius: 18px;
	/* Translucent tile so the fixed glows show through while scrolling. No top highlight, no bottom edge:
	   the hairline is drawn by ::before, even along the top and sides and fading out toward the bottom. */
	border: 0;
	background: linear-gradient(180deg, rgba(58, 63, 86, 0.5) 0%, rgba(34, 37, 52, 0.42) 100%);
	backdrop-filter: blur(18px) saturate(1.3);
	-webkit-backdrop-filter: blur(18px) saturate(1.3);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	transition: transform 0.22s ease, background 0.22s ease;
}

.card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 0.75px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.1) 55%, rgba(255, 255, 255, 0) 100%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
	transition: opacity 0.22s ease;
}

.card:hover {
	transform: translateY(-1px);
	background: linear-gradient(180deg, rgba(70, 76, 102, 0.55) 0%, rgba(42, 46, 64, 0.47) 100%);
}

.card:hover::before {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.16) 55%, rgba(255, 255, 255, 0) 100%);
}

.thumb {
	position: relative;
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	border-radius: 14px;
	overflow: hidden;
	background: rgba(42, 45, 58, 0.6);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

/* Hairline ring over the image, slightly brighter along the top */
.thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.2);
	pointer-events: none;
}

.thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}

.title {
	font-family: var(--font-display);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	color: #ffffff;
}

.desc {
	margin-top: 3px;
	font-size: 13px;
	line-height: 1.4;
	color: #9ba1b6;
	text-wrap: pretty;
}

/* Optional third card line, such as a download count */
.meta {
	margin-top: 4px;
	font-size: 12px;
	line-height: 1.3;
	color: var(--ink-3);
}

/* Bare thin arrow, no disc, at the end of the row */
.arrow {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin-inline-end: 4px;
	color: var(--ink-3);
}

.arrow svg {
	width: 18px;
	height: 18px;
	transition: transform 0.22s ease;
}

html[dir="rtl"] .arrow svg {
	transform: scaleX(-1);
}

.card:hover .arrow {
	color: var(--ink);
}

@media (hover: hover) {
	.card:hover .arrow svg {
		transform: translateX(2px);
	}

	html[dir="rtl"] .card:hover .arrow svg {
		transform: scaleX(-1) translateX(2px);
	}
}

/* Footer */
.foot {
	text-align: center;
	padding-top: 20px;
	font-size: 11px;
	color: var(--ink-3);
}

.foot p {
	margin: 0 0 10px;
}

.foot a {
	color: var(--ink-2);
}

.foot a:hover {
	color: var(--ink);
}

.legal {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0 12px;
}

/* Separator dimmed through the element, never through the text color */
.sep {
	opacity: 0.35;
}

/* Staging build stamp, only printed while served from /_home */
.stamp {
	font-family: ui-monospace, Consolas, monospace;
	font-size: 11px;
	color: var(--ink-3);
	opacity: 0.7;
}

/* Desktop */
@media (min-width: 720px) {
	.glow {
		filter: blur(120px);
		opacity: 0.28;
	}

	.glow-a {
		width: 60vw;
		height: 60vw;
		max-width: 640px;
		max-height: 640px;
		top: -20vw;
		left: -15vw;
	}

	.glow-b {
		width: 50vw;
		height: 50vw;
		max-width: 520px;
		max-height: 520px;
		top: 10vh;
		right: -18vw;
		opacity: 0.18;
	}

	.glow-c {
		width: 70vw;
		height: 70vw;
		max-width: 720px;
		max-height: 720px;
		bottom: -30vw;
		left: 20vw;
		opacity: 0.16;
	}

	.page {
		padding: 28px 24px 64px;
	}

	.topbar {
		padding: 8px 0 40px;
	}

	.brand img {
		height: 40px;
	}

	.hero {
		padding-bottom: 48px;
	}

	.role {
		font-size: 24px;
	}

	.bio {
		font-size: 16px;
		padding: 0;
	}

	.proof {
		font-size: 14px;
	}

	.grid {
		grid-template-columns: 1fr 1fr;
		gap: 16px;
	}

	/* A lone last card takes the full row, so an odd count never leaves a hole */
	.grid .card:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	/* No arrows on desktop, the hover state is enough and the row reads cleaner */
	.card .arrow {
		display: none;
	}

	.card {
		padding: 16px;
	}

	.title {
		font-size: 16px;
	}

	.desc {
		font-size: 14px;
	}

	.thumb {
		width: 72px;
		height: 72px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	/* The drawer keeps its slide even here: it shows where the panel comes from. Only the decorative hover motion is dropped. */
	.card,
	.glass,
	.social a,
	.arrow {
		transition: none;
	}
}
