/* ==========================================================================
   Saadcorp — main stylesheet
   Logical properties throughout (inline-start/end), so RTL mirrors for free.
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
	font-family: "League Spartan";
	src: url("../fonts/league-spartan.woff") format("woff");
	font-weight: 100 900;
	font-display: swap;
}
@font-face {
	font-family: "Readex Pro";
	src: url("../fonts/readex-pro-arabic.woff") format("woff");
	font-weight: 160 700;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F, U+0660-0669;
}

/* ---------- Tokens ---------- */
:root {
	--paper: #ffffff;
	--ink: #100b1d;
	--muted: #5d5870;
	--line: #e6e3ee;
	--soft: #f5f4f8;
	--inv-bg: #100b1d;
	--inv-fg: #ffffff;
	--danger: #c8102e;
	--ok: #1d7a4f;

	--alu-1: #e9e8ee;
	--alu-2: #c9c7d1;
	--alu-3: #a8a5b3;

	--font: "League Spartan", "Readex Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--fs-display: clamp(3.1rem, 1.2rem + 8vw, 9.25rem);
	--fs-1: clamp(2.6rem, 1.3rem + 4.6vw, 5.75rem);
	--fs-2: clamp(2rem, 1.2rem + 2.8vw, 3.75rem);
	--fs-3: clamp(1.45rem, 1.1rem + 1.2vw, 2.25rem);
	--fs-4: 1.375rem;
	--fs-body: 1.125rem;
	--fs-sm: 0.9375rem;

	--gutter: clamp(16px, 4vw, 56px);
	--max: 1360px;
	--section: clamp(5rem, 3rem + 8vw, 11rem);
	--ease: cubic-bezier(0.2, 0.7, 0.1, 1);
	--header-h: 76px;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--paper: #100b1d;
		--ink: #ffffff;
		--muted: #aaa5bb;
		--line: #2b2542;
		--soft: #18122a;
		--inv-bg: #ffffff;
		--inv-fg: #100b1d;
		--danger: #ff7a85;
		--ok: #5fd39b;
		--alu-1: #4a4757;
		--alu-2: #33303f;
		--alu-3: #24212e;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--paper: #100b1d;
	--ink: #ffffff;
	--muted: #aaa5bb;
	--line: #2b2542;
	--soft: #18122a;
	--inv-bg: #ffffff;
	--inv-fg: #100b1d;
	--danger: #ff7a85;
	--ok: #5fd39b;
	--alu-1: #4a4757;
	--alu-2: #33303f;
	--alu-3: #24212e;
	color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: calc(var(--fs-body) * var(--k-body, 1));
	line-height: 1.55;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	transition: background-color 0.4s ease, color 0.4s ease;
}
:lang(ar) body, body.lang-ar { --font: "Readex Pro", "League Spartan", ui-sans-serif, system-ui, "Segoe UI", Tahoma, sans-serif; line-height: 1.75; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 700; line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.lang-ar h1, .lang-ar h2, .lang-ar h3 { letter-spacing: 0; line-height: 1.3; font-weight: 600; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
.flip-rtl { transform: scaleX(1); }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
	position: absolute; inset-inline-start: 16px; top: -100px; z-index: 100;
	background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ---------- Buttons ---------- */
.btn {
	--b-bg: transparent; --b-fg: var(--ink); --b-bd: var(--line);
	display: inline-flex; align-items: center; gap: 0.6em;
	padding: 0.78em 1.35em 0.72em;
	border-radius: 999px; border: 1px solid var(--b-bd);
	background: var(--b-bg); color: var(--b-fg);
	font-weight: 500; font-size: calc(1rem * var(--k-button, 1)); line-height: 1.1; text-decoration: none; white-space: nowrap;
	cursor: pointer;
	transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s, color 0.25s;
}
.btn svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--lg { font-size: calc(1.0625rem * var(--k-button, 1)); padding: 1em 1.7em 0.94em; }
.btn--solid { --b-bg: var(--ink); --b-fg: var(--paper); --b-bd: var(--ink); }
.btn--ghost:hover { --b-bd: var(--ink); }
.btn--inverse { --b-bg: var(--inv-fg); --b-fg: var(--inv-bg); --b-bd: var(--inv-fg); }

.icon-btn {
	display: inline-grid; place-items: center;
	width: 44px; height: 44px; border-radius: 50%;
	background: transparent; border: 1px solid var(--line); cursor: pointer;
	transition: border-color 0.25s, transform 0.4s var(--ease);
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Theme toggle shows the mode you'd switch to. */
.theme-toggle > span { display: grid; grid-area: 1 / 1; transition: opacity 0.3s, transform 0.5s var(--ease); }
.theme-toggle__sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
:root[data-theme="dark"] .theme-toggle__sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle__moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle__sun { opacity: 1; transform: none; }
	:root:not([data-theme="light"]) .theme-toggle__moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
}

/* ---------- Logo ---------- */
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.logo { height: 28px; width: auto; }
.logo--on-dark { display: none; }
:root[data-theme="dark"] .logo--on-light { display: none; }
:root[data-theme="dark"] .logo--on-dark { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .logo--on-light { display: none; }
	:root:not([data-theme="light"]) .logo--on-dark { display: block; }
}
.wordmark {
	font-family: "League Spartan", sans-serif; font-weight: 800; font-size: 1.6rem;
	letter-spacing: -0.045em; line-height: 1;
}

/* ---------- Header ---------- */
.site-header {
	position: fixed; inset-inline: 0; top: 0; z-index: 50;
	transition: background-color 0.35s, box-shadow 0.35s, transform 0.45s var(--ease);
}
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.site-header.is-scrolled {
	background: color-mix(in srgb, var(--paper) 82%, transparent);
	-webkit-backdrop-filter: saturate(160%) blur(16px);
	backdrop-filter: saturate(160%) blur(16px);
	box-shadow: 0 1px 0 var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); box-shadow: none; }
.site-header__inner {
	max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
	height: var(--header-h); display: flex; align-items: center; gap: 24px;
}
.nav { margin-inline-start: auto; }
.nav__list { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.nav__list a:not(.btn) { text-decoration: none; font-weight: 500; font-size: calc(1rem * var(--k-nav, 1)); position: relative; padding-block: 6px; }
.nav__list a:not(.btn)::after {
	content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1.5px; background: currentColor;
	transform: scaleX(0); transform-origin: var(--origin, left); transition: transform 0.35s var(--ease);
}
[dir="rtl"] .nav__list a { --origin: right; }
.nav__list a:not(.btn):hover::after, .nav__list a[aria-current="page"]::after { transform: scaleX(1); }
.site-header__tools { display: flex; align-items: center; gap: 10px; }
/* Language menu */
.langs { position: relative; }
.langs__btn { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding-inline: 10px 12px; border-radius: 999px; font-weight: 500; font-size: calc(0.95rem * var(--k-nav, 1)); user-select: none; }
.langs__btn::-webkit-details-marker { display: none; }
.langs__btn:hover, .langs[open] .langs__btn { background: var(--soft); }
.langs__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.langs__btn span { font-family: "League Spartan", sans-serif; letter-spacing: 0.02em; }
.langs__menu {
	position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; min-width: 168px;
	padding: 6px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line);
	box-shadow: 0 18px 40px -18px rgba(16, 11, 29, 0.35); animation: fade-in 0.25s var(--ease) both;
}
.langs__menu a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; font-weight: 500; }
.langs__menu a:hover { background: var(--soft); }
.langs__menu a[aria-current] { font-weight: 700; }
.langs__menu a[aria-current]::after { content: "•"; margin-inline-start: 8px; color: var(--muted); }
.langs__menu a[lang="ar"] { font-family: "Readex Pro", sans-serif; }
.langs__menu a:not([lang="ar"]) { font-family: "League Spartan", sans-serif; }

/* German and Estonian have long compound words: hyphenate headings instead of overflowing. */
.lang-de :is(h1, h2, h3, dt), .lang-et :is(h1, h2, h3, dt) { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
.menu-toggle { display: none; }
.menu-toggle > span { display: grid; grid-area: 1 / 1; }
.menu-toggle__close { display: none !important; }

@media (max-width: 899px) {
	.menu-toggle { display: inline-grid; }
	.nav {
		position: fixed; inset: 0; z-index: -1;
		background: var(--paper);
		padding: calc(var(--header-h) + 32px) var(--gutter) 40px;
		opacity: 0; visibility: hidden;
		transition: opacity 0.35s, visibility 0.35s;
	}
	.nav__list { flex-direction: column; align-items: flex-start; gap: 8px; }
	.nav__list a:not(.btn) { font-size: calc(var(--fs-2) * var(--k-nav, 1)); font-weight: 700; letter-spacing: -0.03em; }
	.nav__cta { margin-top: 24px; }
	.menu-open .nav { opacity: 1; visibility: visible; }
	/* backdrop-filter/transform on the header would trap the fixed overlay inside the header bar */
	.menu-open .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; transform: none; background: var(--paper); box-shadow: none; }
	.menu-open .menu-toggle__open { display: none; }
	.menu-open .menu-toggle__close { display: grid !important; }
	.menu-open { overflow: hidden; }
	.site-header__inner { gap: 12px; }
	.site-header__tools { margin-inline-start: auto; }
}

/* ---------- Hero ---------- */
.hero {
	position: relative;
	min-height: min(100svh, 940px);
	display: flex; align-items: center;
	padding-block: calc(var(--header-h) + clamp(24px, 4vh, 56px)) clamp(40px, 7vh, 88px);
	overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(24px, 4vw, 72px); }
.hero__copy { display: grid; gap: clamp(20px, 3.2vh, 32px); }
.hero__title {
	font-size: calc(clamp(2.6rem, 1.1rem + 4.3vw, 5.75rem) * var(--k-title, 1));
	font-weight: 700;
	line-height: 0.94;
	letter-spacing: -0.045em;
	max-width: 12ch;
}
.hero__eyebrow {
	display: block; margin-bottom: 0.9rem; font-size: calc(clamp(0.8rem, 0.75rem + 0.2vw, 0.95rem) * var(--k-eyebrow, 1)); font-weight: 600;
	letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.3; color: var(--muted);
	animation: fade-in 0.9s var(--ease) 0.05s both;
}
.lang-ar .hero__eyebrow { letter-spacing: 0; text-transform: none; font-size: calc(clamp(0.9rem, 0.85rem + 0.2vw, 1.05rem) * var(--k-eyebrow, 1)); }
.lang-de .hero__title, .lang-et .hero__title { max-width: 14ch; font-size: calc(clamp(2.3rem, 1rem + 3.7vw, 5rem) * var(--k-title, 1)); }
.lang-ar .hero__title { line-height: 1.25; letter-spacing: 0; max-width: 14ch; font-size: calc(clamp(2.3rem, 1rem + 3.6vw, 4.6rem) * var(--k-title, 1)); }
.hero__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.lang-ar .hero__title .w { padding-block: 0.1em 0.2em; margin-block: -0.1em -0.2em; }
.hero__title .w > span { display: inline-block; animation: rise 1.1s var(--ease) both; animation-delay: calc(var(--i) * 80ms + 120ms); }
@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero__lede { max-width: 44ch; font-size: calc(clamp(1.075rem, 1rem + 0.3vw, 1.3rem) * var(--k-lede, 1)); color: var(--muted); line-height: 1.55; animation: fade-in 1s var(--ease) 0.6s both; }
.lang-ar .hero__lede { line-height: 1.85; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; animation: fade-in 1s var(--ease) 0.75s both; }
.hero__scroll {
	position: absolute; right: var(--gutter); bottom: 32px;
	display: none; flex-direction: column; align-items: center; gap: 12px;
	font-size: 0.8rem; color: var(--muted);
	writing-mode: vertical-rl;
}
[dir="rtl"] .hero__scroll { right: auto; left: var(--gutter); }
.hero__scroll i { width: 1px; height: 48px; background: linear-gradient(var(--ink) 50%, transparent 50%) 0 0 / 1px 200%; animation: drip 2.2s linear infinite; }
@keyframes drip { to { background-position: 0 -96px; } }
@media (min-width: 1100px) and (min-height: 760px) { .hero__scroll { display: flex; } }

/* Hero illustration */
.hero-art {
	--mx: 0; --my: 0;
	--card: #ffffff; --card-line: rgba(16,11,29,.08); --card-shadow: 0 30px 60px -28px rgba(16,11,29,.28), 0 6px 16px -8px rgba(16,11,29,.12);
	--chip: #f1eff7; --chip-2: #e4e0f0; --accent: #6e5cf0;
	position: relative;
	width: 100%; max-width: 540px; justify-self: end;
	aspect-ratio: 1 / 0.92;
}
.hero-art > .ha, .hero-art > .ha-cursor { opacity: 0; animation-name: bob, pop; animation-duration: calc(6s + var(--d, 0) * 0.7s), .9s; animation-timing-function: ease-in-out, var(--ease); animation-iteration-count: infinite, 1; animation-fill-mode: none, forwards; animation-delay: calc(var(--d, 0) * -1.3s), calc(var(--d, 0) * 110ms + 400ms); }
.hero-art > .ha-cursor { animation-name: var(--cur), pop; animation-duration: 10s, .9s; animation-delay: 0s, 1.2s; }
@keyframes pop { from { opacity: 0; scale: .92; } to { opacity: 1; scale: 1; } }
:root[data-theme="dark"] .hero-art { --card: #1a1430; --card-line: rgba(255,255,255,.08); --card-shadow: 0 30px 60px -24px rgba(0,0,0,.6); --chip: #2a2245; --chip-2: #352c56; --accent: #8f80ff; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .hero-art { --card: #1a1430; --card-line: rgba(255,255,255,.08); --card-shadow: 0 30px 60px -24px rgba(0,0,0,.6); --chip: #2a2245; --chip-2: #352c56; --accent: #8f80ff; }
}
[dir="rtl"] .hero-art { justify-self: start; }
.ha {
	position: absolute;
	background: var(--card);
	border: 1px solid var(--card-line);
	border-radius: 18px;
	box-shadow: var(--card-shadow);
	transform: translate(calc(var(--mx) * var(--p, 10) * 1px), calc(var(--my) * var(--p, 10) * 1px));
	transition: transform .6s var(--ease);
}
@keyframes bob { 50% { translate: 0 -8px; } }
.ha__bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--card-line); }
.ha__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--chip-2); }

.ha--browser { --p: 8; inset: 6% 12% 30% 4%; overflow: hidden; }
.ha-browser__hero { margin: 16px; height: 46%; border-radius: 12px; padding: 16px; display: grid; align-content: center; gap: 10px;
	background: linear-gradient(125deg, #2f22a8, #6e5cf0 50%, #b08cff) 0 0 / 200% 100%; animation: sheen 8s ease-in-out infinite alternate; }
.ha-browser__hero b { display: block; height: 12px; width: 62%; border-radius: 6px; background: rgba(255,255,255,.9); }
.ha-browser__hero b + b { width: 40%; height: 8px; background: rgba(255,255,255,.55); }
.ha-browser__hero span { width: 74px; height: 22px; border-radius: 99px; background: #fff; }
.ha-browser__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 16px; }
.ha-browser__grid i { height: 54px; border-radius: 10px; background: var(--chip); }

.ha--tokens { --p: 16; width: 40%; inset-inline-end: 0; top: 0; padding: 14px; display: grid; gap: 12px; }
.ha-tokens__type { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -0.03em; }
.ha-tokens__type span[lang] { font-family: "Readex Pro", sans-serif; font-weight: 600; letter-spacing: 0; }
.ha-tokens__swatches { display: flex; gap: 6px; }
.ha-tokens__swatches i { flex: 1; aspect-ratio: 1; border-radius: 8px; background: var(--ink); }
.ha-tokens__swatches i:nth-child(2) { background: #6e5cf0; } .ha-tokens__swatches i:nth-child(3) { background: #b08cff; }
.ha-tokens__swatches i:nth-child(4) { background: #ffcf8a; } .ha-tokens__swatches i:nth-child(5) { background: var(--chip-2); }
.ha-tokens__toggle { width: 46px; height: 26px; border-radius: 99px; background: var(--accent); position: relative; }
.ha-tokens__toggle span { position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; animation: toggle 4s var(--ease) infinite; }
@keyframes toggle { 0%, 40% { translate: 0 0; } 50%, 90% { translate: 20px 0; } }
[dir="rtl"] .ha-tokens__toggle span { animation-name: toggle-rtl; }
@keyframes toggle-rtl { 0%, 40% { translate: 0 0; } 50%, 90% { translate: -20px 0; } }

.ha--code { --p: 14; inset-inline-start: 0; bottom: 6%; width: 52%; padding: 14px 16px; font: 500 clamp(11px, 0.95vw, 13.5px)/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; background: #120d22; color: #d9d4f2; border-color: rgba(255,255,255,.06); }
.ha--code p { white-space: nowrap; overflow: hidden; }
.ha--code em { font-style: normal; color: #8c84b0; } .ha--code b { color: #ff9ac1; font-weight: 500; } .ha--code i { font-style: normal; color: #8fd6c4; } .ha--code s { text-decoration: none; color: #ffcf8a; }
.ha-code__typing span { display: inline-block; overflow: hidden; vertical-align: bottom; border-inline-end: 2px solid #d9d4f2; animation: type 4.5s steps(13) infinite, caret .8s step-end infinite; }
@keyframes type { 0% { width: 0; } 50%, 90% { width: 13ch; } 100% { width: 0; } }
@keyframes caret { 50% { border-color: transparent; } }

.ha--phone { --p: 22; inset-inline-end: 3%; bottom: 0; width: 30%; aspect-ratio: 9 / 17.6; border-radius: 28px; padding: 30px 10px 12px; display: flex; flex-direction: column; gap: 8px; border: 4px solid #0e0b18; }
.ha-phone__island { position: absolute; top: 7px; left: 50%; width: 34%; height: 10px; border-radius: 99px; background: #0e0b18; translate: -50% 0; animation: none; }
.ha-phone__card { height: 34%; border-radius: 14px; background: linear-gradient(140deg, #3d2fb8, #8a78ff); }
.ha-phone__row { height: 12%; border-radius: 10px; background: var(--chip); }
.ha-phone__row--short { width: 70%; }
.ha-phone__btn { margin-top: auto; height: 12%; border-radius: 99px; background: var(--ink); }

.ha--chart { --p: 12; top: 44%; inset-inline-end: 22%; width: 34%; height: 18%; padding: 12px; overflow: hidden; }
.ha-chart__dot { position: absolute; top: 12px; inset-inline-start: 12px; width: 8px; height: 8px; border-radius: 50%; background: #28c76f; box-shadow: 0 0 0 0 rgba(40,199,111,.5); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(40,199,111,0); } 100% { box-shadow: 0 0 0 0 rgba(40,199,111,0); } }
.ha--chart svg { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 70%; }
.ha-chart__area { fill: var(--accent); opacity: .12; }
.ha-chart__line { fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 2.4s var(--ease) 1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.ha-cursor { position: absolute; z-index: 2; display: flex; align-items: flex-start; gap: 2px; pointer-events: none; }
.ha-cursor i { width: 18px; height: 18px; background: currentColor; clip-path: polygon(0 0, 100% 45%, 45% 55%, 30% 100%); }
.ha-cursor b { font-size: 11px; font-weight: 600; color: #fff; padding: 3px 8px; border-radius: 99px; margin-top: 14px; background: currentColor; }
.ha-cursor b { color: #fff; background: var(--c); }
.ha-cursor--design { --c: #e5484d; --cur: cur-design; color: #e5484d; }
.ha-cursor--dev { --c: #4c7bff; --cur: cur-dev; color: #4c7bff; }
@keyframes cur-design { 0%, 100% { left: 30%; top: 20%; } 33% { left: 62%; top: 34%; } 66% { left: 18%; top: 50%; } }
@keyframes cur-dev { 0%, 100% { left: 40%; top: 78%; } 40% { left: 70%; top: 60%; } 75% { left: 22%; top: 70%; } }

@media (max-width: 960px) {
	.hero__inner { grid-template-columns: 1fr; }
	.hero-art { justify-self: center !important; max-width: 460px; margin-top: 8px; }
	.hero { min-height: auto; }
}
@media (max-width: 560px) {
	.hero-art { aspect-ratio: 1 / 0.95; }
	.ha--code { width: 64%; }
	.ha--tokens { width: 46%; }
}

/* ==========================================================================
   Scroll scene — laptop + phone (CSS 3D, driven by --open/--phone/etc.)
   ========================================================================== */
.scene {
	--open: 0; --zoom: 0.86; --research: 1; --wire: 0; --final: 0; --phone: 0; --lift: 0;
	position: relative;
	height: 460vh;
}
.scene__sticky {
	position: sticky; top: 0;
	height: 100vh; height: 100svh;
	max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	align-items: center;
	gap: clamp(24px, 4vw, 64px);
	overflow: hidden;
}

/* Captions */
.scene__captions { display: grid; }
.scene__caption {
	grid-area: 1 / 1;
	opacity: 0; transform: translateY(24px);
	transition: opacity 0.6s var(--ease), transform 0.8s var(--ease);
	pointer-events: none;
}
.scene[data-stage="0"] [data-caption="0"],
.scene[data-stage="1"] [data-caption="1"],
.scene[data-stage="2"] [data-caption="2"] { opacity: 1; transform: none; pointer-events: auto; }
.scene__count { display: block; font-size: calc(var(--fs-sm) * var(--k-small, 1)); color: var(--muted); margin-bottom: 20px; font-variant-numeric: tabular-nums; }
.scene__title { font-size: calc(var(--fs-2) * var(--k-heading, 1)); max-width: 12ch; }
.scene__text { margin-top: 22px; color: var(--muted); max-width: 36ch; font-size: calc(clamp(1.05rem, 1rem + 0.25vw, 1.25rem) * var(--k-lede, 1)); }

/* Progress */
.scene__progress {
	position: absolute; inset-inline-start: var(--gutter); bottom: clamp(24px, 6vh, 56px);
	display: flex; gap: 8px;
}
.scene__progress i { width: 36px; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.scene__progress i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: var(--origin, left); transition: transform 0.6s var(--ease); }
[dir="rtl"] .scene__progress i { --origin: right; }
.scene[data-stage="0"] .scene__progress i:nth-child(-n+1)::after,
.scene[data-stage="1"] .scene__progress i:nth-child(-n+2)::after,
.scene[data-stage="2"] .scene__progress i::after { transform: scaleX(1); }

/* Device stage */
.scene__device {
	--lw: min(84%, 720px, 92vh);
	position: relative;
	display: grid; place-items: center;
	padding-block: 6vh 10vh;
}
.rig { position: relative; width: var(--lw); }

/* ---- Laptop (thin-bezel notebook, CSS 3D) ---- */
.laptop {
	--frame: #0b0b0e;
	--deck-1: #e3e4e8; --deck-2: #c9cbd1; --deck-3: #a9acb4; --keys: #1b1c20; --well: #c2c4ca;
	width: 100%;
	perspective: 2600px;
	perspective-origin: 50% -40%;
	transform: translateY(calc(var(--lift) * -4%)) scale(var(--zoom));
	transition: transform 0.12s linear;
}
:root[data-theme="dark"] .laptop { --deck-1: #3b3c42; --deck-2: #2c2d32; --deck-3: #1d1e22; --keys: #0d0d10; --well: #26272c; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .laptop { --deck-1: #3b3c42; --deck-2: #2c2d32; --deck-3: #1d1e22; --keys: #0d0d10; --well: #26272c; }
}
.laptop__body { position: relative; aspect-ratio: 16 / 10.4; transform-style: preserve-3d; }
.laptop__lid {
	position: absolute; inset: 0;
	transform-origin: 50% 100%;
	transform-style: preserve-3d;
	transform: rotateX(calc((var(--open) * 95 - 88) * 1deg));
}
.laptop__screen, .laptop__back {
	position: absolute; inset: 0;
	border-radius: 3.2% 3.2% 1.2% 1.2% / 5% 5% 1.8% 1.8%;
	-webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.laptop__screen {
	background: var(--frame);
	padding: 1.7% 1.7% 2.4%;
	box-shadow: 0 0 0 1.5px var(--deck-3), inset 0 0 0 1px #2b2b31;
	overflow: hidden;
}
.laptop__notch { position: absolute; z-index: 3; top: 1.7%; left: 50%; width: 11%; height: 3.4%; border-radius: 0 0 0.8vw 0.8vw; background: var(--frame); transform: translateX(-50%); }
.laptop__notch::after { content: ""; position: absolute; top: 30%; left: 50%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: #1d2333; box-shadow: inset 0 0 0 1px #2c3550; transform: translateX(-50%); }
.laptop__glare {
	position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit;
	background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.04) 28%, transparent 42%);
	mix-blend-mode: screen;
}
.laptop__back {
	transform: rotateY(180deg);
	background: linear-gradient(165deg, var(--deck-1), var(--deck-2) 55%, var(--deck-3));
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
	display: grid; place-items: center;
}
.laptop__mark { width: 7%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(255,255,255,.55), rgba(255,255,255,.08) 70%); }
.laptop__deck {
	position: absolute;
	left: -1.5%; width: 103%;
	top: 100%; height: 66%;
	transform-origin: 50% 0;
	transform: rotateX(90deg);
	transform-style: preserve-3d;
	border-radius: 0 0 3.5% 3.5% / 0 0 6% 6%;
	background: linear-gradient(180deg, var(--deck-2), var(--deck-1) 10%, var(--deck-1) 85%, var(--deck-2));
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
	display: grid;
	grid-template-columns: 9% 1fr 9%;
	grid-template-rows: 7% 47% 1fr;
	column-gap: 2%;
	padding: 0 3%;
}
.laptop__keys {
	grid-column: 2; grid-row: 2;
	border-radius: 1.4%/3%;
	background-color: var(--well);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Crect x='2' y='3' width='16' height='14' rx='3' fill='%23303137'/%3E%3C/svg%3E");
	background-size: calc(100% / 15) calc(100% / 6);
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
.laptop__speaker {
	grid-row: 2;
	background-image: radial-gradient(circle, rgba(0,0,0,.35) 0.6px, transparent 0.9px);
	background-size: 5px 5px;
	border-radius: 2px;
	opacity: .7;
}
.laptop__speaker:first-child { grid-column: 1; }
.laptop__speaker:nth-child(3) { grid-column: 3; }
.laptop__pad {
	grid-column: 2; grid-row: 3;
	justify-self: center; width: 46%; margin: 4% 0 6%;
	border-radius: 3%/7%;
	background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.02));
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.09);
}
.laptop__lip {
	position: absolute; left: 0; right: 0; top: 100%; height: 3.5%;
	transform-origin: 50% 0; transform: rotateX(-90deg);
	background: linear-gradient(90deg, var(--deck-3), var(--deck-2) 20%, var(--deck-2) 80%, var(--deck-3));
	border-radius: 0 0 40% 40% / 0 0 100% 100%;
}
.laptop__lip::after { content: ""; position: absolute; left: 42%; right: 42%; top: 0; height: 55%; border-radius: 0 0 50% 50%; background: var(--deck-3); }
.laptop__shadow {
	margin: -1% auto 0; width: 108%; margin-inline-start: -4%; height: 30px;
	background: radial-gradient(closest-side, rgba(16,11,29,.35), transparent);
	filter: blur(8px);
	opacity: calc(0.45 + var(--open) * 0.55);
}

/* ---- Screen content: a fictional client product, scaled with container units ---- */
.mock {
	position: relative; width: 100%; height: 100%;
	border-radius: 0.5% 0.5% 0 0;
	overflow: hidden;
	container-type: inline-size;
	background: #f6f5fb;
	font-family: "League Spartan", "Readex Pro", sans-serif;
	color: #18132a;
	opacity: min(1, calc(var(--open) * 1.6));
}
.mock__chrome {
	position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: 5.2cqw;
	display: flex; align-items: center; gap: 0.9cqw; padding-inline: 2.2cqw;
	background: rgba(255,255,255,.86); border-bottom: 1px solid rgba(24,19,42,.07);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.mock__chrome i { width: 1.1cqw; aspect-ratio: 1; border-radius: 50%; background: #e2e0ea; }
.mock__chrome i:first-child { background: #ff6159; } .mock__chrome i:nth-child(2) { background: #ffbd2e; } .mock__chrome i:nth-child(3) { background: #28c941; }
.mock__chrome span { margin-inline-start: 6cqw; padding: 0.5cqw 6cqw; border-radius: 1cqw; background: #efeef4; font-size: 1.4cqw; color: #6b6780; direction: ltr; }
.mock__layer { position: absolute; inset: 5.2cqw 0 0; padding: 3.4cqw 5cqw; }
.mock--research { opacity: var(--research); background: #fbfaf7; }
.mock--wire { opacity: var(--wire); background: #f3f3f6; }
.mock--final { opacity: var(--final); background: #f6f4ff; }

/* Shared: animated cursor */
.cursor {
	position: absolute; width: 2.4cqw; aspect-ratio: 1; z-index: 3;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 9-6.5 1.5L9 19z' fill='%2318132a' stroke='white' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	filter: drop-shadow(0 .3cqw .4cqw rgba(0,0,0,.2));
}
.cursor--a { animation: cur-a 7s var(--ease) infinite; }
.cursor--b { animation: cur-b 6s var(--ease) infinite; }
@keyframes cur-a { 0%,100% { left: 70%; top: 70%; } 30% { left: 30%; top: 78%; } 45% { left: 30%; top: 78%; transform: scale(.85); } 50% { transform: none; } 75% { left: 52%; top: 46%; } }
@keyframes cur-b { 0%,100% { left: 60%; top: 26%; } 35% { left: 80%; top: 52%; } 55% { left: 80%; top: 52%; transform: scale(.85); } 60% { transform: none; } 80% { left: 40%; top: 74%; } }

/* Research */
.jm__head { display: flex; align-items: center; justify-content: space-between; font-size: 2cqw; }
.jm__users { display: flex; align-items: center; }
.jm__users i { width: 2.6cqw; aspect-ratio: 1; border-radius: 50%; border: .3cqw solid #fbfaf7; margin-inline-start: -0.8cqw; background: #c9b8ff; }
.jm__users i:nth-child(2) { background: #ffcf8a; } .jm__users i:nth-child(3) { background: #8fd6c4; }
.jm__users em { font-style: normal; font-size: 1.4cqw; color: #6b6780; margin-inline-start: .8cqw; }
.jm__stages { display: flex; justify-content: space-between; margin-top: 2.4cqw; font-size: 1.55cqw; font-weight: 600; color: #4a4560; }
.jm__stages span { padding: 0.6cqw 1.2cqw; border-radius: 1cqw; background: #ecebf3; }
.jm__curve { width: 100%; height: 21cqw; margin-top: 2cqw; overflow: visible; }
.jm__area { fill: url(#jmg); opacity: var(--research-draw, 1); }
.jm__line { fill: none; stroke: #6e5cf0; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 700; stroke-dashoffset: calc(700 - var(--research-draw, 1) * 700); vector-effect: non-scaling-stroke; }
.jm__curve circle { fill: #18132a; opacity: var(--research-draw, 1); }
.jm__curve .jm__pain { fill: #e5484d; animation: pulse 1.8s ease-in-out infinite; transform-origin: 270px 118px; transform-box: view-box; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .55; } }
.jm__flag {
	position: absolute; left: 50%; top: 33cqw; transform: translateX(-36%);
	font-size: 1.5cqw; font-weight: 600; color: #fff; background: #e5484d; padding: 0.5cqw 1.2cqw; border-radius: 1cqw; white-space: nowrap;
	box-shadow: 0 .6cqw 1.4cqw rgba(229,72,77,.35);
}
[dir="rtl"] .jm__flag { transform: translateX(-64%); }
.jm__notes { position: absolute; left: 5cqw; right: 5cqw; bottom: 3.4cqw; display: grid; grid-template-columns: repeat(7, 1fr); gap: 1.4cqw; }
.jm__notes i { aspect-ratio: 1; border-radius: 0.6cqw; background: #ffe68a; box-shadow: 0 0.4cqw 0.8cqw rgba(0,0,0,.08); animation: note 7s var(--ease) infinite both; }
.jm__notes i:nth-child(3n+2) { background: #c9e4ff; } .jm__notes i:nth-child(3n) { background: #ffd3e0; }
.jm__notes i:nth-child(2) { animation-delay: .25s; } .jm__notes i:nth-child(3) { animation-delay: .5s; } .jm__notes i:nth-child(4) { animation-delay: .75s; }
.jm__notes i:nth-child(5) { animation-delay: 1s; } .jm__notes i:nth-child(6) { animation-delay: 1.25s; } .jm__notes i:nth-child(7) { animation-delay: 1.5s; }
@keyframes note { 0% { opacity: 0; transform: translateY(1.5cqw) scale(.8) rotate(-4deg); } 10%, 88% { opacity: 1; transform: rotate(-2deg); } 100% { opacity: 0; transform: rotate(-2deg); } }

/* Wireframe + design tool overlay */
.wf__grid { position: absolute; inset: 0 5cqw; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2cqw; pointer-events: none; }
.wf__grid i { background: rgba(255, 90, 120, .07); }
.wf__nav, .wf__hero, .wf__cards { position: relative; }
.wf__nav { display: flex; justify-content: space-between; align-items: center; }
.wf__nav > i { width: 12cqw; height: 2.4cqw; border-radius: 0.5cqw; background: #c9c9d1; }
.wf__nav span { display: flex; gap: 2cqw; }
.wf__nav span i { width: 7cqw; height: 1.6cqw; border-radius: 0.4cqw; background: #d8d8de; }
.wf__hero { margin-top: 3.4cqw; height: 24cqw; border: 0.25cqw dashed #b9b9c3; border-radius: 1.4cqw; padding: 4cqw; display: grid; align-content: center; gap: 1.6cqw; }
.wf__hero i { display: block; height: 2.6cqw; border-radius: 0.5cqw; background: #c4c4cc; animation: sketch 6s var(--ease) infinite; transform-origin: left; }
[dir="rtl"] .wf__hero i { transform-origin: right; }
.wf__hero .l1 { width: 58%; height: 4cqw; } .wf__hero .l2 { width: 46%; animation-delay: .2s; } .wf__hero .l3 { width: 36%; animation-delay: .4s; }
@keyframes sketch { 0% { transform: scaleX(0); } 15%, 100% { transform: scaleX(1); } }
.wf__hero b { width: 14cqw; height: 4.4cqw; border-radius: 4cqw; border: 0.25cqw solid #a9a9b4; }
.wf__select { position: absolute; inset: -0.6cqw; border: 0.22cqw solid #4c7bff; border-radius: 1.6cqw; animation: select 6s var(--ease) infinite; }
.wf__select::before, .wf__select::after { content: ""; position: absolute; width: 1.2cqw; aspect-ratio: 1; background: #fff; border: 0.22cqw solid #4c7bff; }
.wf__select::before { top: -0.7cqw; left: -0.7cqw; } .wf__select::after { bottom: -0.7cqw; right: -0.7cqw; }
.wf__select em { position: absolute; top: -3cqw; inset-inline-start: 0; font-style: normal; font-size: 1.3cqw; padding: .3cqw .8cqw; border-radius: .6cqw; background: #4c7bff; color: #fff; white-space: nowrap; direction: ltr; }
@keyframes select { 0%, 45% { opacity: 0; } 55%, 92% { opacity: 1; } 100% { opacity: 0; } }
.wf__cards { margin-top: 2.6cqw; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; }
.wf__cards i { height: 12cqw; border-radius: 1.2cqw; background: #e4e4ea; border: 0.25cqw dashed #c4c4cc; }

/* Final product */
.ui__nav { display: flex; align-items: center; gap: 2cqw; }
.ui__nav b { width: 11cqw; height: 2.4cqw; border-radius: 0.6cqw; background: #18132a; }
.ui__nav span { display: flex; gap: 2cqw; margin-inline-start: auto; }
.ui__nav span i { width: 6.5cqw; height: 1.5cqw; border-radius: 1cqw; background: #dcd6fa; }
.ui__nav em { width: 3cqw; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(135deg, #ffcf8a, #ff8fb1); }
.ui__hero {
	margin-top: 3cqw; height: 22cqw; border-radius: 2cqw; padding: 3.4cqw 4cqw;
	display: grid; grid-template-columns: 1fr auto; align-items: center;
	background: linear-gradient(120deg, #2f22a8, #6e5cf0 45%, #b08cff 70%, #6e5cf0) 0 0 / 220% 100%;
	color: #fff; overflow: hidden;
	animation: sheen 9s ease-in-out infinite alternate;
}
@keyframes sheen { to { background-position: 100% 0; } }
.ui__title { font-size: 3.9cqw; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.lang-ar .ui__title { letter-spacing: 0; font-size: 3.3cqw; line-height: 1.4; }
.ui__sub { margin-top: 1.2cqw; font-size: 1.7cqw; opacity: 0.85; }
.ui__btn { display: inline-block; margin-top: 2.2cqw; padding: 1cqw 2.4cqw; border-radius: 4cqw; background: #fff; color: #3d2fb8; font-weight: 600; font-size: 1.6cqw; }
.ui__orb { width: 16cqw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0, #e4dcff 18%, rgba(255,255,255,0) 62%); box-shadow: 0 0 8cqw rgba(255,255,255,.35); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-1.6cqw); } }
.ui__row { margin-top: 2.6cqw; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2cqw; }
.ui__card { height: 13cqw; border-radius: 1.6cqw; background: #fff; box-shadow: 0 1cqw 3cqw rgba(61,47,184,.10); padding: 1.8cqw; position: relative; overflow: hidden; }
@property --n { syntax: "<integer>"; inherits: false; initial-value: 0; }
.ui__k { font-size: 3.2cqw; font-weight: 700; letter-spacing: -0.02em; direction: ltr; display: inline-block; }
.ui__num { font-style: normal; --n: 0; counter-reset: n var(--n); animation: count 2.4s var(--ease) forwards; animation-play-state: paused; }
.ui__num::after { content: counter(n); }
@keyframes count { to { --n: var(--to); } }
.ui__card--chart svg { position: absolute; left: 0; right: 0; bottom: 1cqw; width: 100%; height: 6cqw; }
.ui__card--chart path { fill: none; stroke: #6e5cf0; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-dasharray: 300; stroke-dashoffset: calc(300 - var(--final) * 300); }
.ui__card--bars { display: flex; align-items: flex-end; gap: 1cqw; }
.ui__card--bars i { flex: 1; border-radius: .6cqw .6cqw .2cqw .2cqw; background: linear-gradient(#8a78ff, #5b48e0); height: 30%; transform-origin: bottom; animation: bar 3.6s var(--ease) infinite alternate; }
.ui__card--bars i:nth-child(2) { height: 55%; animation-delay: .2s; } .ui__card--bars i:nth-child(3) { height: 42%; animation-delay: .4s; }
.ui__card--bars i:nth-child(4) { height: 75%; animation-delay: .6s; } .ui__card--bars i:nth-child(5) { height: 62%; animation-delay: .8s; } .ui__card--bars i:nth-child(6) { height: 90%; animation-delay: 1s; }
@keyframes bar { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.ui__card--list { display: grid; align-content: center; gap: 1.4cqw; }
.ui__card--list i { height: 2.2cqw; border-radius: 1cqw; background: linear-gradient(90deg, #ece8ff 25%, #f7f5ff 50%, #ece8ff 75%) 0 0 / 300% 100%; animation: shimmer 2.2s linear infinite; }
.ui__card--list i:nth-child(2) { width: 80%; } .ui__card--list i:nth-child(3) { width: 60%; }
@keyframes shimmer { to { background-position: -300% 0; } }
.ui__toast {
	position: absolute; bottom: 3cqw; inset-inline-start: 5cqw;
	display: flex; align-items: center; gap: 1.2cqw;
	padding: 1.2cqw 2cqw; border-radius: 1.4cqw; background: #18132a; color: #fff; font-size: 1.6cqw;
	box-shadow: 0 1.4cqw 3cqw rgba(24,19,42,.3);
	animation: toast 6s var(--ease) infinite; animation-delay: 1.2s;
}
.ui__toast b { display: grid; place-items: center; width: 2.4cqw; aspect-ratio: 1; border-radius: 50%; background: #28c76f; font-size: 1.4cqw; }
@keyframes toast { 0%, 8% { opacity: 0; transform: translateY(2cqw) scale(.96); } 16%, 70% { opacity: 1; transform: none; } 80%, 100% { opacity: 0; transform: translateY(1cqw); } }

/* Screen animations only run while the scene is on screen. */
.scene .mock *, .scene .phone * { animation-play-state: paused; }
.scene.is-live .mock *, .scene.is-live .phone * { animation-play-state: running; }
.scene.is-live[data-stage="2"] .ui__num { animation-play-state: running; }

/* ---- Phone (titanium frame, Dynamic Island) ---- */
.phone {
	--dir: 1;
	position: absolute;
	inset-inline-end: -7%;
	bottom: -4%;
	width: 27%;
	aspect-ratio: 9 / 17.6;
	container-type: inline-size;
	border-radius: 15% / 7.7%;
	padding: 1.3%;
	background: linear-gradient(145deg, #c9c6c1, #8d8a86 30%, #5f5d5a 55%, #a8a5a0);
	box-shadow: 0 34px 60px -24px rgba(16,11,29,.5), 0 0 0 1px rgba(0,0,0,.25);
	opacity: var(--phone);
	transform:
		translateX(calc((1 - var(--phone)) * 70% * var(--dir)))
		translateY(calc((1 - var(--phone)) * 20%))
		rotate(calc((1 - var(--phone)) * 10deg * var(--dir)));
	transition: transform 0.12s linear, opacity 0.12s linear;
}
:root[data-theme="dark"] .phone { background: linear-gradient(145deg, #4a4a50, #26262a 35%, #141416 60%, #3a3a40); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .phone { background: linear-gradient(145deg, #4a4a50, #26262a 35%, #141416 60%, #3a3a40); }
}
[dir="rtl"] .phone { --dir: -1; }
.phone__btn { position: absolute; width: 1.4%; border-radius: 2px; background: inherit; filter: brightness(.85); }
.phone__btn--a { left: -1.2%; top: 18%; height: 6%; } .phone__btn--b { left: -1.2%; top: 27%; height: 10%; } .phone__btn--c { right: -1.2%; top: 25%; height: 14%; }
.phone__screen {
	position: relative; height: 100%;
	border-radius: 13.5% / 6.9%;
	overflow: hidden;
	background: #f6f4ff;
	border: 2.2cqw solid #060608;
	padding: 21cqw 6cqw 6cqw;
	font-family: "League Spartan", "Readex Pro", sans-serif;
	color: #18132a;
	display: flex; flex-direction: column; gap: 5cqw;
}
.ph__status { position: absolute; top: 3.6cqw; left: 7cqw; right: 7cqw; display: flex; justify-content: space-between; align-items: center; font-size: 4.6cqw; direction: ltr; }
.ph__status span { display: flex; gap: 1.2cqw; align-items: flex-end; }
.ph__status span i { width: 1.4cqw; background: #18132a; border-radius: 1px; height: 2.4cqw; }
.ph__status span i:nth-child(2) { height: 3.2cqw; } .ph__status span i:nth-child(3) { height: 4cqw; }
.phone__island { position: absolute; top: 2.6cqw; left: 50%; width: 30cqw; height: 8.6cqw; border-radius: 8cqw; background: #060608; transform: translateX(-50%); z-index: 2; }
.ph__notify {
	position: absolute; z-index: 3; top: 3cqw; left: 4cqw; right: 4cqw;
	display: flex; align-items: center; gap: 3cqw; padding: 3.4cqw;
	border-radius: 6cqw; background: rgba(255,255,255,.92); box-shadow: 0 3cqw 8cqw rgba(24,19,42,.18);
	font-size: 4.2cqw; line-height: 1.2;
	animation: notify 6s var(--ease) infinite; animation-delay: 2s;
}
.ph__notify i { flex: none; width: 9cqw; aspect-ratio: 1; border-radius: 2.4cqw; background: #18132a; }
.ph__notify span { display: grid; } .ph__notify em { font-style: normal; color: #6b6780; }
@keyframes notify { 0%, 6% { opacity: 0; transform: translateY(-14cqw); } 14%, 62% { opacity: 1; transform: none; } 72%, 100% { opacity: 0; transform: translateY(-14cqw); } }
.ph__hello { font-size: 8.4cqw; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.lang-ar .ph__hello { font-size: 7.4cqw; line-height: 1.4; letter-spacing: 0; }
.ph__card { position: relative; border-radius: 6cqw; padding: 6cqw; color: #fff; background: linear-gradient(140deg, #3d2fb8, #8a78ff); display: grid; gap: 1.6cqw; overflow: hidden; }
.ph__card span { font-size: 5cqw; opacity: .85; }
.ph__card strong { font-size: 9cqw; font-weight: 700; }
.ph__ring { position: absolute; inset-inline-end: 4cqw; top: 50%; width: 16cqw; transform: translateY(-50%) rotate(-90deg); }
.ph__ring circle { fill: none; stroke: rgba(255,255,255,.25); stroke-width: 3.2; }
.ph__ring .ph__ring-fill { stroke: #fff; stroke-linecap: round; stroke-dasharray: 95; stroke-dashoffset: 95; animation: ring 3s var(--ease) infinite alternate; }
@keyframes ring { to { stroke-dashoffset: 24; } }
.ph__rows { display: grid; gap: 3cqw; }
.ph__rows i { height: 11cqw; border-radius: 4cqw; background: #fff; box-shadow: 0 2cqw 5cqw rgba(61,47,184,.08); }
.ph__btn { margin-top: auto; text-align: center; padding: 4cqw; border-radius: 10cqw; background: #18132a; color: #fff; font-size: 5.4cqw; font-weight: 600; }
.ph__tabs { display: flex; justify-content: space-around; padding-top: 3cqw; border-top: 1px solid rgba(24,19,42,.08); }
.ph__tabs i { width: 6cqw; aspect-ratio: 1; border-radius: 2cqw; background: #d6d0f5; }
.ph__tabs i:first-child { background: #18132a; }

/* Scene: mobile layout — device on top, caption below */
@media (max-width: 899px) {
	.scene { height: 420vh; }
	.scene__sticky {
		grid-template-columns: 1fr;
		grid-template-rows: minmax(0, 1fr) auto;
		align-content: center;
		padding-block: calc(var(--header-h) + 8px) 72px;
		gap: 16px;
	}
	.scene__device { order: -1; --lw: min(78vw, 520px, 54vh); padding-block: 0 4vh; }
	.phone { inset-inline-end: -5%; width: 28%; }
	.scene__title { font-size: calc(clamp(1.75rem, 1.2rem + 3vw, 2.5rem) * var(--k-heading, 1)); }
	.scene__text { margin-top: 12px; }
	.scene__count { margin-bottom: 10px; }
	.scene__progress { bottom: 28px; }
}

/* Scene: static fallback for reduced motion and no-JS */
@media (prefers-reduced-motion: reduce) {
	.scene { height: auto; --open: 1; --zoom: 1; --research: 0; --wire: 0; --final: 1; --phone: 1; }
	.scene__sticky { position: relative; height: auto; padding-block: var(--section); overflow: visible; }
	.scene__caption { position: static; opacity: 1; transform: none; grid-area: auto; margin-bottom: 40px; }
	.scene__progress { display: none; }
}
html:not(.js) .scene { height: auto; --open: 1; --zoom: 1; --research: 0; --wire: 0; --final: 1; --phone: 1; }
html:not(.js) .scene__sticky { position: relative; height: auto; padding-block: var(--section); overflow: visible; }
html:not(.js) .scene__caption { opacity: 1; transform: none; grid-area: auto; margin-bottom: 40px; }
html:not(.js) .scene__progress { display: none; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: var(--section); }
.section__head {
	display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end;
	margin-bottom: clamp(40px, 6vw, 88px);
}
.section__title { font-size: calc(var(--fs-1) * var(--k-heading, 1)); }
.section__lede { color: var(--muted); max-width: 44ch; font-size: calc(clamp(1.1rem, 1rem + 0.3vw, 1.3rem) * var(--k-lede, 1)); justify-self: end; }
@media (max-width: 720px) {
	.section__head { grid-template-columns: 1fr; }
	.section__lede { justify-self: start; }
}

/* Services list (home) */
.svc-list { border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }
.svc__link {
	display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr) 48px; gap: 32px; align-items: center;
	padding-block: clamp(28px, 3.4vw, 48px);
	text-decoration: none;
}
.svc__title {
	font-size: calc(var(--fs-3) * var(--k-subheading, 1)); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05;
	transition: transform 0.5s var(--ease);
}
.svc__summary { color: var(--muted); max-width: 48ch; }
.svc__arrow { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.5s var(--ease); }
.svc__arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.svc__link:hover .svc__title, .svc__link:focus-visible .svc__title { transform: translateX(calc(12px * var(--dir, 1))); }
[dir="rtl"] .svc__link { --dir: -1; }
.svc__link:hover .svc__arrow, .svc__link:focus-visible .svc__arrow { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: rotate(calc(-45deg * var(--dir, 1))); }
@media (max-width: 720px) {
	.svc__link { grid-template-columns: 1fr 40px; gap: 12px 20px; }
	.svc__summary { grid-column: 1; grid-row: 2; font-size: calc(1rem * var(--k-body, 1)); }
	.svc__arrow { grid-column: 2; grid-row: 1; width: 40px; height: 40px; }
}

/* Approach: a real sequence, so it's numbered */
.approach { background: var(--soft); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); counter-reset: step; }
.step { border-top: 1.5px solid var(--ink); padding-top: 24px; }
.step__n { display: block; font-size: calc(var(--fs-sm) * var(--k-small, 1)); color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 40px; }
.step__title { font-size: calc(var(--fs-3) * var(--k-subheading, 1)); font-weight: 600; margin-bottom: 14px; }
.step__text { color: var(--muted); font-size: calc(1.0625rem * var(--k-body, 1)); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step__n { margin-bottom: 16px; } }

/* Boutique */
.boutique__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 120px); align-items: start; }
.boutique__title { font-size: calc(var(--fs-display) * var(--k-heading, 1)); line-height: 0.9; letter-spacing: -0.05em; max-width: 8ch; }
.lang-ar .boutique__title { font-size: calc(var(--fs-1) * var(--k-heading, 1)); line-height: 1.25; letter-spacing: 0; }
.boutique__text { margin-top: 40px; max-width: 44ch; font-size: calc(clamp(1.15rem, 1rem + 0.4vw, 1.4rem) * var(--k-lede, 1)); color: var(--muted); }
/* FAQ */
.faq__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
.faq .section__title { font-size: calc(var(--fs-2) * var(--k-heading, 1)); position: sticky; top: calc(var(--header-h) + 24px); }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 24px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__q { font-size: calc(var(--fs-4) * var(--k-subheading, 1)); font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.lang-ar .faq__q { letter-spacing: 0; line-height: 1.6; }
.faq__icon { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); position: relative; transition: transform 0.35s var(--ease), background-color 0.25s; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; inset: 50% 25% auto; height: 1.5px; margin-top: -0.75px; background: currentColor; transition: transform 0.35s var(--ease); }
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon { transform: rotate(180deg); background: var(--soft); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }
.faq__item summary:hover .faq__icon { background: var(--soft); }
.faq__a { color: var(--muted); max-width: 62ch; padding-bottom: 26px; margin-top: -6px; }
@media (max-width: 899px) {
	.faq__inner { grid-template-columns: 1fr; }
	.faq .section__title { position: static; }
}

/* About: at a glance */
.facts__list { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 64px); border-top: 1px solid var(--line); }
.facts__list > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: 16px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.facts__list dt { font-weight: 600; }
.facts__list dd { color: var(--muted); }
@media (max-width: 899px) {
	.facts__list { grid-template-columns: 1fr; }
	.facts__list > div { grid-template-columns: 1fr; gap: 6px; }
}

.boutique__points { display: grid; gap: 0; border-top: 1px solid var(--line); }
.boutique__points > div { padding-block: 28px; border-bottom: 1px solid var(--line); }
.boutique__points dt { font-weight: 600; font-size: calc(var(--fs-4) * var(--k-subheading, 1)); margin-bottom: 6px; }
.boutique__points dd { color: var(--muted); }
@media (max-width: 900px) { .boutique__inner { grid-template-columns: 1fr; } }

/* Stack: endless marquee */
.stack { padding-block: 0 var(--section); overflow: hidden; }
.stack__title { font-size: calc(var(--fs-sm) * var(--k-small, 1)); font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: 28px; }
.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; gap: 0 1.2em; font-size: var(--fs-2); font-weight: 600; letter-spacing: -0.035em; line-height: 1.15; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track li { color: var(--muted); font-family: "League Spartan", sans-serif; transition: color .3s; display: flex; align-items: center; gap: 1.2em; white-space: nowrap; }
.marquee__track li::after { content: ""; width: .28em; height: .28em; border-radius: 50%; background: var(--line); }
.marquee__track li:hover { color: var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* CTA */
.cta { background: var(--inv-bg); color: var(--inv-fg); padding-block: var(--section); }
.cta__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; align-items: end; }
.cta__title { font-size: calc(var(--fs-display) * var(--k-heading, 1)); line-height: 0.9; letter-spacing: -0.05em; max-width: 9ch; }
.lang-ar .cta__title { font-size: calc(var(--fs-1) * var(--k-heading, 1)); line-height: 1.25; letter-spacing: 0; }
.cta__text { font-size: calc(clamp(1.15rem, 1rem + 0.4vw, 1.4rem) * var(--k-lede, 1)); opacity: 0.75; margin-bottom: 28px; max-width: 30ch; }
.cta ::selection { background: var(--inv-fg); color: var(--inv-bg); }
.cta :focus-visible { outline-color: var(--inv-fg); }
@media (max-width: 800px) { .cta__inner { grid-template-columns: 1fr; } }

/* ---------- Inner pages ---------- */
.page-hero { padding-block: calc(var(--header-h) + clamp(56px, 10vw, 140px)) clamp(48px, 6vw, 96px); }
.page-hero__title { font-size: calc(var(--fs-1) * var(--k-title, 1)); max-width: 14ch; }
.page-hero__title--sm { font-size: calc(var(--fs-2) * var(--k-title, 1)); }
.page-hero__lede { margin-top: 28px; max-width: 52ch; color: var(--muted); font-size: calc(clamp(1.15rem, 1rem + 0.4vw, 1.4rem) * var(--k-lede, 1)); }
.jump { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { text-decoration: none; padding: 0.55em 1em 0.5em; border: 1px solid var(--line); border-radius: 999px; font-size: 0.95rem; transition: border-color 0.25s, background-color 0.25s; }
.jump a:hover { border-color: var(--ink); }

.svc-detail {
	display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px;
	padding-block: clamp(48px, 6vw, 96px);
	border-top: 1px solid var(--line);
}
.svc-detail__title { font-size: calc(var(--fs-2) * var(--k-heading, 1)); max-width: 12ch; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.svc-detail__summary { font-size: calc(clamp(1.15rem, 1rem + 0.4vw, 1.4rem) * var(--k-lede, 1)); margin-bottom: 28px; }
.svc-detail__points li { padding-block: 14px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.svc-detail__points li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 0.55em; border-radius: 50%; background: var(--ink); }
.tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: calc(0.9rem * var(--k-small, 1)); padding: 0.4em 0.85em 0.35em; border-radius: 999px; background: var(--soft); color: var(--muted); }
@media (max-width: 800px) { .svc-detail { grid-template-columns: 1fr; } .svc-detail__title { position: static; } }

.prose-cols { columns: 2 340px; column-gap: clamp(32px, 5vw, 80px); }
.prose-cols p { break-inside: avoid; margin-bottom: 1.4em; font-size: calc(1.1875rem * var(--k-body, 1)); }
.values__list { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.values__list > div { border-top: 1.5px solid var(--ink); padding-top: 24px; }
.values__list dt { font-size: calc(var(--fs-3) * var(--k-subheading, 1)); font-weight: 600; margin-bottom: 12px; }
.values__list dd { color: var(--muted); }
@media (max-width: 800px) { .values__list { grid-template-columns: 1fr; } }

.prose { max-width: 68ch; margin-top: 40px; }
.prose h2 { font-size: calc(var(--fs-4) * var(--k-subheading, 1)); letter-spacing: -0.01em; margin: 2em 0 0.6em; line-height: 1.2; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.1em; }
.prose ul { list-style: disc; padding-inline-start: 1.2em; }

.notfound__code { font-size: clamp(6rem, 3rem + 16vw, 16rem); font-weight: 800; line-height: 0.8; letter-spacing: -0.06em; color: var(--line); margin-bottom: 24px; }
.notfound .btn { margin-top: 32px; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 120px); align-items: start; }
.contact__reply { margin-top: 28px; font-weight: 500; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; margin-bottom: 28px; border: 0; padding: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label, .field legend { font-weight: 500; font-size: 1rem; padding: 0; }
.field__opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
	width: 100%;
	font: inherit; font-size: 1.125rem; color: var(--ink);
	background: transparent;
	border: 0; border-bottom: 1.5px solid var(--line);
	padding: 12px 0;
	border-radius: 0;
	transition: border-color 0.25s;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 0.95rem; }
.chips legend { margin-bottom: 12px; }
.chips__list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 0.6em 1.05em 0.55em; border: 1px solid var(--line); border-radius: 999px; font-size: 0.95rem; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 18px 22px; border-radius: 14px; margin-bottom: 28px; font-weight: 500; }
.notice:focus { outline: none; }
.notice--ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); font-size: 1.25rem; }
.notice--error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
button[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 64px 40px; border-top: 1px solid var(--line); font-size: calc(1em * var(--k-footer, 1)); }
.site-footer__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 48px; }
.site-footer__brand p { margin-top: 14px; color: var(--muted); max-width: 32ch; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: start; }
.site-footer__nav a { text-decoration: none; font-weight: 500; }
.site-footer__nav a:hover { text-decoration: underline; }
.site-footer__legal { grid-column: 1 / -1; color: var(--muted); font-size: calc(var(--fs-sm) * var(--k-footer, 1)); padding-top: 32px; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Motion: scroll reveals and illustrations
   ========================================================================== */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: var(--rd, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Service illustrations: drawn on reveal, nudged on hover */
.svc__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--soft); color: var(--ink); transition: background-color .3s, color .3s, transform .5s var(--ease); }
.svc__icon--lg { width: 72px; height: 72px; border-radius: 20px; }
.ill { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ill .ill-accent { stroke: #6e5cf0; }
.js .ill * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease); }
.js .is-in .ill * { stroke-dashoffset: 0; }
.js .is-in .ill *:nth-child(2) { transition-delay: .12s; } .js .is-in .ill *:nth-child(3) { transition-delay: .24s; }
.js .is-in .ill *:nth-child(4) { transition-delay: .36s; } .js .is-in .ill *:nth-child(5) { transition-delay: .48s; } .js .is-in .ill *:nth-child(6) { transition-delay: .6s; }
.svc__link:hover .svc__icon, .svc__link:focus-visible .svc__icon { background: var(--ink); color: var(--paper); transform: rotate(-6deg) scale(1.06); }
.svc__link:hover .ill .ill-accent { stroke: #b08cff; }

.svc__link { grid-template-columns: 56px minmax(0, 5fr) minmax(0, 5fr) 48px; }
@media (max-width: 720px) {
	.svc__link { grid-template-columns: 48px 1fr 40px; }
	.svc__icon { width: 48px; height: 48px; border-radius: 14px; }
	.svc__summary { grid-column: 2 / 4; grid-row: 2; }
	.svc__arrow { grid-column: 3; grid-row: 1; }
}
.svc-detail__head { display: grid; gap: 20px; align-content: start; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.svc-detail__head .svc-detail__title { position: static; }
@media (max-width: 800px) { .svc-detail__head { position: static; } }

/* Approach: the line between steps draws itself */
.steps { position: relative; }
.step { border-top-color: transparent; position: relative; }
.step::before { content: ""; position: absolute; top: -1.5px; inset-inline: 0; height: 1.5px; background: var(--ink); transform: scaleX(0); transform-origin: var(--origin, left); transition: transform 1s var(--ease); }
[dir="rtl"] .step::before { --origin: right; }
.steps.is-in .step::before { transform: none; }
.steps.is-in .step:nth-child(2)::before { transition-delay: .2s; } .steps.is-in .step:nth-child(3)::before { transition-delay: .4s; } .steps.is-in .step:nth-child(4)::before { transition-delay: .6s; }
.js .steps .step__n, .js .steps .step__title, .js .steps .step__text { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.steps.is-in .step__n, .steps.is-in .step__title, .steps.is-in .step__text { opacity: 1; transform: none; }
.steps.is-in .step:nth-child(2) * { transition-delay: .2s; } .steps.is-in .step:nth-child(3) * { transition-delay: .4s; } .steps.is-in .step:nth-child(4) * { transition-delay: .6s; }

/* ==========================================================================
   Work
   ========================================================================== */
.section__side { display: grid; gap: 20px; justify-items: start; justify-self: end; }
.section__side .section__lede { justify-self: start; }
@media (max-width: 720px) { .section__side { justify-self: start; } }

.work--page { padding-top: 0; }
.work__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 80px) clamp(24px, 3vw, 48px); }
.work__grid--home { gap: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 40px); }
@media (max-width: 760px) { .work__grid { grid-template-columns: 1fr; } }

.proj { display: grid; gap: 24px; align-content: start; }
.proj__media { position: relative; display: block; text-decoration: none; border-radius: 14px; }
.browser {
	display: block; overflow: hidden;
	border-radius: 14px;
	background: var(--paper);
	border: 1px solid var(--line);
	box-shadow: 0 30px 70px -40px rgba(16,11,29,.45);
	transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.browser__bar { display: flex; align-items: center; gap: 6px; height: 34px; padding-inline: 14px; border-bottom: 1px solid var(--line); background: var(--soft); }
.browser__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.browser__bar span { margin-inline: auto; font-size: 12px; color: var(--muted); padding: 3px 14px; border-radius: 6px; background: var(--paper); direction: ltr; }
.browser__view { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); }
.browser__view img { position: absolute; top: 0; left: 0; width: 100%; height: auto; transform: translateY(0); transition: transform 5s cubic-bezier(.45,.05,.35,1); }
.proj__media:hover .browser__view img, .proj__media:focus-visible .browser__view img { transform: translateY(calc(-100% + var(--vh, 300px))); }
.proj__media:hover .browser { transform: translateY(-6px); box-shadow: 0 40px 80px -40px rgba(16,11,29,.55); }
.mini-phone {
	position: absolute; inset-inline-end: -4%; bottom: -8%;
	width: 22%; aspect-ratio: 9 / 18.6;
	border-radius: 16% / 7.8%;
	padding: 0.9%;
	background: linear-gradient(145deg, #c9c6c1, #8d8a86 30%, #5f5d5a 55%, #a8a5a0);
	box-shadow: 0 24px 50px -20px rgba(16,11,29,.5);
	transition: transform .6s var(--ease);
}
:root[data-theme="dark"] .mini-phone { background: linear-gradient(145deg, #4a4a50, #26262a 35%, #141416 60%, #3a3a40); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mini-phone { background: linear-gradient(145deg, #4a4a50, #26262a 35%, #141416 60%, #3a3a40); } }
.mini-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 14% / 6.9%; border: 2px solid #060608; background: #fff; }
.proj__media:hover .mini-phone { transform: translateY(-14px) rotate(-2deg); }
[dir="rtl"] .proj__media:hover .mini-phone { transform: translateY(-14px) rotate(2deg); }
.proj__sector { font-size: calc(var(--fs-sm) * var(--k-small, 1)); color: var(--muted); margin-bottom: 6px; }
.proj__title { font-size: calc(var(--fs-3) * var(--k-subheading, 1)); font-weight: 600; letter-spacing: -0.03em; }
.proj__summary { color: var(--muted); margin-top: 10px; max-width: 52ch; }
.proj .tags { margin-top: 16px; }
.proj__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .3s; }
.proj__link:hover { border-color: var(--ink); }
.proj__link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Feature layout on the Work page: big media + text side by side, alternating */
.proj--feature { grid-column: 1 / -1; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: center; gap: clamp(32px, 5vw, 96px); padding-bottom: 4%; }
.proj--feature:nth-child(even) { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.proj--feature:nth-child(even) .proj__media { order: 2; }
.proj--feature .proj__title { font-size: calc(var(--fs-2) * var(--k-subheading, 1)); }
@media (max-width: 860px) {
	.proj--feature, .proj--feature:nth-child(even) { grid-template-columns: 1fr; padding-bottom: 6%; }
	.proj--feature:nth-child(even) .proj__media { order: 0; }
}
.js .proj[data-reveal] .browser { transform: translateY(40px) rotate(-1deg); opacity: .001; transition: transform 1.1s var(--ease), opacity .9s var(--ease); }
.js .proj[data-reveal].is-in .browser { transform: none; opacity: 1; }
.js .proj[data-reveal] .mini-phone { transform: translateY(60px); opacity: 0; transition: transform 1.2s var(--ease) .2s, opacity .9s var(--ease) .2s; }
.js .proj[data-reveal].is-in .mini-phone { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
	.js [data-reveal], .js .ill *, .js .steps * { opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
	.marquee__track { animation: none; flex-wrap: wrap; width: auto; }
	.hero-art > * { opacity: 1 !important; }
}
.js .proj.is-in .proj__media:hover .mini-phone { transform: translateY(-14px) rotate(-2deg); }
