/* ArabicWalls landing page. Hand-written, no framework. RTL uses logical properties, no separate stylesheet. */

@font-face {
	font-family: 'LamaSans';
	src: url('assets/fonts/LamaSans-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'LamaSansHeading';
	src: url('assets/fonts/LamaSans-MediumCondensed.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

:root {
	--bg: #e9e9e9;
	--text: #262e41;
	--brand: #22b4a6;
	--line: rgba(31, 31, 57, 0.1);
	--body: 'LamaSans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--heading: 'LamaSansHeading', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--wall: 20rem;
	--gap: 30px;
	--step: calc(var(--wall) + var(--gap));
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: #fff;
	color: var(--text);
	font-family: var(--body);
	line-height: 1.5;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

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

h1, h2, h3 {
	margin: 0 0 0.7em;
	font-family: var(--heading);
	line-height: 1.25;
}

p {
	margin: 0 0 1.4em;
}

::selection {
	background: var(--brand);
	color: #fff;
}

main {
	overflow-x: hidden;
}

section {
	padding-block: 4rem;
}

.container {
	width: 100%;
	margin-inline: auto;
	padding-inline: 25px;
}

.title {
	margin-bottom: 18px;
	font-size: 2.25rem;
	font-weight: 700;
	text-align: center;
}

/* ---------- header ---------- */

.top {
	position: relative;
	display: flow-root;
	padding-bottom: 1.5rem;
	background: var(--bg);
}

.lang-switch {
	position: absolute;
	inset-block-start: 1rem;
	inset-inline-end: 1.5rem;
	z-index: 3;
	font-size: 0.875rem;
	opacity: 0.7;
}

.lang-switch:hover {
	opacity: 1;
}

.logo {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 2rem;
}

.logo-icon {
	width: 6rem;
	margin-bottom: 0.25rem;
	border-radius: 1.5rem;
}

.logo-text {
	width: 12rem;
	opacity: 0.7;
}

.logo-text-en {
	margin-top: -1rem;
}

/* ---------- hero ---------- */

.hero {
	padding-top: 0;
	overflow: hidden;
	background: var(--bg);
}

.narrow h1 {
	margin-bottom: 1.5rem;
	font-size: 1.875rem;
	font-weight: 700;
	text-align: center;
}

.intro {
	margin-bottom: 2.5rem;
	padding-inline: 0.5rem;
	text-align: center;
}

.store-wrap {
	display: flex;
	justify-content: center;
	margin: 0 auto 4rem;
}

.store {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
}

.store a {
	display: flex;
	justify-content: center;
	width: 16rem;
}

.store img {
	width: 212px;
	height: 64px;
}

/* Phone frame on top, the wallpapers slide behind it. Three copies of the 8 wallpapers, the animation moves one copy so the loop is seamless. */
.reel {
	position: relative;
}

.frame {
	position: relative;
	z-index: 2;
	width: 20.55rem;
	margin-inline: auto;
	border-radius: 50px;
	pointer-events: none;
}

.track {
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	z-index: 0;
	display: flex;
	gap: var(--gap);
	width: max-content;
	margin-inline-start: calc(50% - var(--wall) / 2);
	transform: translateX(calc(var(--step) * -8));
	animation: reel 24s ease-in-out infinite;
}

.track img {
	flex: none;
	width: var(--wall);
	border-radius: 50px;
}

@keyframes reel {
	0%, 6.25% { transform: translateX(calc(var(--step) * -8)); }
	12.5%, 18.75% { transform: translateX(calc(var(--step) * -9)); }
	25%, 31.25% { transform: translateX(calc(var(--step) * -10)); }
	37.5%, 43.75% { transform: translateX(calc(var(--step) * -11)); }
	50%, 56.25% { transform: translateX(calc(var(--step) * -12)); }
	62.5%, 68.75% { transform: translateX(calc(var(--step) * -13)); }
	75%, 81.25% { transform: translateX(calc(var(--step) * -14)); }
	87.5%, 93.75% { transform: translateX(calc(var(--step) * -15)); }
	100% { transform: translateX(calc(var(--step) * -16)); }
}

/* Fade-up on load for the hero only, no scroll animation below. */
.rise {
	animation: rise 1s cubic-bezier(0.165, 0.84, 0.44, 1) var(--d, 0ms) both;
}

@keyframes rise {
	from { opacity: 0; transform: translateY(20px); }
}

/* ---------- features ---------- */

.subtitle {
	max-width: 20rem;
	margin: 0 auto 6rem;
	text-align: center;
}

.works {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	padding: 4rem;
	background: var(--bg);
	border-radius: 25px;
}

.side {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	margin-bottom: 2rem;
	text-align: center;
}

.side + .middle + .side {
	margin-bottom: 0;
}

.middle {
	position: relative;
	order: -1;
	margin-bottom: 2rem;
}

.halo {
	position: absolute;
	inset-block-start: 50%;
	inset-inline-start: 50%;
	width: 100%;
	height: 430px;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	transform: translate(-50%, -50%);
}

[dir='rtl'] .halo {
	transform: translate(50%, -50%);
}

.phone {
	position: relative;
	display: flex;
	justify-content: center;
	margin-top: -8rem;
}

.phone img {
	width: 100%;
	border-radius: 0.5rem;
}

.work-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
}

.work-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 70px;
	height: 70px;
	background: #fff;
	border-radius: 50%;
}

.work-icon img {
	width: 28px;
	height: 28px;
}

.work-card h3 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
}

.work-card p {
	margin: 0 0 1.4em;
}

/* ---------- faq ---------- */

.faq {
	padding-top: 0;
	padding-bottom: 6rem;
}

.faq .title {
	margin-bottom: 2rem;
}

.faq-list {
	padding-inline: 2rem;
}

.qa {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	padding-block: 2rem;
	border-bottom: 1px solid var(--line);
}

.qa:first-child {
	padding-top: 0;
}

.qa:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.question {
	font-family: var(--heading);
	font-size: 1.2rem;
}

.answer {
	opacity: 0.8;
}

.answer a {
	color: var(--brand);
}

/* ---------- download ---------- */

.download {
	padding-top: 6rem;
}

.download-card {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	padding: 0 3rem 5rem;
	background: var(--bg);
	border-radius: 25px;
}

.download-img {
	margin-top: -9rem;
	margin-bottom: 1.5rem;
}

.download-img img {
	width: 100%;
}

.download-text {
	text-align: center;
}

.download-text p {
	margin-bottom: 2.5rem;
}

/* ---------- footer ---------- */

.foot {
	padding-block: 4rem;
	background: var(--text);
	color: #fff;
}

.foot-row {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.foot-text {
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: 0.875rem;
	line-height: 1.25rem;
	opacity: 0.7;
}

.foot-text div {
	margin-bottom: 14px;
}

.foot-text .dim {
	opacity: 0.5;
}

.social {
	display: flex;
	align-items: center;
	gap: 1rem;
	opacity: 0.9;
}

.social svg {
	display: block;
	width: 1.875rem;
	height: 1.875rem;
}

.social a:hover {
	opacity: 0.5;
}

/* ---------- breakpoints: 640, 768, 1024, 1280, 1536 ---------- */

@media (min-width: 640px) {
	.container { max-width: 640px; }
}

@media (min-width: 768px) {
	.container { max-width: 768px; }
	.container.narrow { max-width: 42rem; }
	.store { flex-direction: row; }
	.subtitle { max-width: 56rem; }
	.phone img { width: 50%; margin-inline: auto; }
	.qa { flex-direction: row; }
	.qa > * { width: 50%; }
	.download-img { margin-top: -7rem; }
	.download-img img { width: 50%; margin-inline: auto; }
}

@media (min-width: 1024px) {
	.container { max-width: 1024px; }
	.container.narrow { max-width: 56rem; }
	section { padding-block: 6rem; }
	.top { padding-bottom: 2.5rem; }
	.logo { margin-top: 4rem; }
	.logo-text { width: 15rem; }
	.narrow h1 { margin-bottom: 3rem; font-size: 3.75rem; }
	.intro { margin-bottom: 3rem; font-size: 1.25rem; line-height: 1.75rem; }
	.intro span { display: block; }
	.store-wrap { max-width: 28rem; margin-bottom: 6rem; }
	.store a { width: 100%; }
	.subtitle { margin-bottom: 8rem; font-size: 1.125rem; line-height: 1.75rem; }
	.works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4rem; }
	.side, .side + .middle + .side { margin-bottom: 0; }
	.middle { order: 0; margin-bottom: 0; }
	.phone { transform: translateY(5rem) scale(1.25); }
	.phone img { width: 100%; }
	.features { margin-bottom: 4rem; }
	.faq { padding-top: 0; padding-bottom: 4rem; }
	.faq .title { margin-bottom: 4rem; }
	.download { padding-top: 6rem; }
	.download-card { flex-direction: row-reverse; gap: 4rem; padding: 5rem; }
	.download-img, .download-text { width: 50%; }
	.download-img { margin-top: -10rem; margin-bottom: 0; }
	.download-img img { width: 100%; }
	.download-text { text-align: start; }
	.download-text .title { margin-bottom: 2.5rem; text-align: start; }
	.download-text p { margin-bottom: 3rem; font-size: 1.125rem; line-height: 1.75rem; }
	.download-text .store { justify-content: center; }
	.foot-row { flex-direction: row; }
	.foot-text { align-items: flex-start; }
}

@media (min-width: 1280px) {
	.container { max-width: 1280px; }
	.features { margin-bottom: 8rem; }
	.faq { padding-bottom: 6rem; }
	.download { padding-top: 8rem; }
	.download-img { margin-top: -16rem; }
}

@media (min-width: 1536px) {
	.container { max-width: 1200px; }
}

@media (min-width: 1600px) {
	:root { --gap: 50px; }
}

@media (prefers-reduced-motion: reduce) {
	.rise { animation: none; }
}
