/* MG Smart main stylesheet */

:root {
	--bg: #061323;
	--bg2: #0a1c33;
	--panel: #0c1f37;
	--line: rgba(150, 185, 230, .16);
	--text: #e8eef7;
	--muted: #93a7c0;
	--gold: #d9ae4f;
	--gold-hi: #f1d089;
	--cyan: #52d6e6;
	--ok: #5ee0a4;
	--bad: #ff8d8d;
	--wrap: 1180px;
	--f-en: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
	--f-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: 88px;
	-webkit-text-size-adjust: 100%;
	color-scheme: dark;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--f-en);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
html[data-lang="ar"] body { font-family: var(--f-ar); line-height: 1.9; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* ---------- language switching ---------- */
html[data-lang="en"] [data-l="ar"],
html[data-lang="ar"] [data-l="en"] { display: none !important; }

.lang .to-en { display: none; }
html[data-lang="ar"] .lang .to-en { display: inline; }
html[data-lang="ar"] .lang .to-ar { display: none; }

/* ---------- type ---------- */
h1, h2, h3 { font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 5.3vw, 4.3rem); line-height: 1.05; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.12; }
h3 { font-size: 1.28rem; line-height: 1.3; }
html[data-lang="en"] h1,
html[data-lang="en"] h2 { letter-spacing: -.025em; }
html[data-lang="ar"] h1 { font-size: clamp(2.05rem, 4.5vw, 3.5rem); line-height: 1.32; }
html[data-lang="ar"] h2 { line-height: 1.32; }
html[data-lang="ar"] h3 { line-height: 1.5; }
p { text-wrap: pretty; }

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

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sec { padding-block: clamp(4.5rem, 9vw, 8rem); }
.sec-title { margin-bottom: clamp(2rem, 4vw, 3.2rem); max-width: 22ch; }

.skip {
	position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
	background: var(--gold); color: #201400; padding: .6rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
	padding: .85rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
	font: inherit; font-size: .98rem; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: background .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: #201400; }
.btn-gold:hover { background: var(--gold-hi); }
.btn-ghost { border-color: var(--line); background: rgba(255, 255, 255, .03); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-sm { padding: .6rem 1.1rem; font-size: .92rem; }

/* ---------- header ---------- */
.site-header {
	position: fixed; inset: 0 0 auto 0; z-index: 50;
	border-bottom: 1px solid transparent;
	transition: background .3s, border-color .3s;
}
.site-header.scrolled {
	background: rgba(6, 19, 35, .82);
	-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
	border-color: var(--line);
}
.bar { display: flex; align-items: center; gap: 2rem; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; margin-inline-end: auto; }
.brand img { height: 38px; width: auto; }
.mark {
	display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
	border: 1.5px solid var(--gold); color: var(--gold);
	font: 800 .95rem/1 var(--f-en); letter-spacing: .02em;
}
.brand-text { font-weight: 600; font-size: 1.02rem; }
.nav { display: flex; gap: 1.7rem; }
.nav a { color: var(--muted); text-decoration: none; font-size: .96rem; transition: color .2s; }
.nav a:hover { color: var(--text); }
.actions { display: flex; align-items: center; gap: .8rem; }
.lang {
	background: none; border: 1px solid var(--line); color: var(--text); border-radius: 999px;
	padding: .42rem .95rem; font: inherit; font-size: .9rem; cursor: pointer; transition: border-color .2s;
}
.lang:hover { border-color: var(--cyan); }
.lang .to-ar { font-family: var(--f-ar); }
.burger { display: none; width: 42px; height: 42px; background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; position: relative; }
.burger span { position: absolute; inset-inline: 11px; height: 2px; background: var(--text); transition: transform .25s, top .25s; }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 24px; }
.site-header.open .burger span:first-child { top: 20px; transform: rotate(45deg); }
.site-header.open .burger span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
	position: relative; isolation: isolate; overflow: hidden;
	min-height: 100svh; display: flex; align-items: center;
	padding-block: 7.5rem 4.5rem;
}
#net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(58% 72% at 26% 46%, rgba(6, 19, 35, .88), transparent 72%),
		linear-gradient(to bottom, transparent 72%, var(--bg));
}
html[dir="rtl"] .hero::before {
	background:
		radial-gradient(58% 72% at 74% 46%, rgba(6, 19, 35, .88), transparent 72%),
		linear-gradient(to bottom, transparent 72%, var(--bg));
}
.hero-grid {
	display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
	gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.hero-copy { display: grid; gap: 1.6rem; justify-items: start; }
.lead { max-width: 34rem; font-size: 1.18rem; color: #c3d0e1; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.proof { display: flex; flex-wrap: wrap; gap: .6rem 1.8rem; margin-top: .6rem; color: var(--muted); font-size: .94rem; }
.proof li { padding-inline-start: .85rem; border-inline-start: 2px solid var(--gold); line-height: 1.3; }

/* page-load sequence (the one orchestrated moment) */
.js .rise { opacity: 0; transform: translateY(18px); }
.js .slide.is-active .rise { animation: rise .85s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 120ms + 120ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* sample invoice */
.invoice {
	padding: 1.4rem 1.5rem 1.5rem; border-radius: 20px;
	border: 1px solid var(--line);
	background: linear-gradient(180deg, rgba(17, 40, 69, .8), rgba(9, 26, 46, .82));
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .65);
	max-width: 30rem; justify-self: end; width: 100%;
}
html[dir="rtl"] .invoice { justify-self: start; }
.invoice figcaption { font-size: .8rem; color: var(--muted); margin-bottom: 1rem; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--line); }
.inv-type { display: block; color: var(--muted); font-size: .86rem; }
.inv-no { font: 600 1.05rem var(--f-mono); letter-spacing: .02em; }
.stamp {
	flex: none; padding: .3rem .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
	border: 1px solid var(--line); color: var(--muted); transition: color .3s, border-color .3s, background .3s;
}
.stamp .s-ok { display: none; }
.stamp.ok { color: var(--ok); border-color: rgba(94, 224, 164, .55); background: rgba(94, 224, 164, .1); }
.stamp.ok .s-pend { display: none; }
.stamp.ok .s-ok { display: inline; }
.inv-rows { display: grid; gap: .45rem; padding-block: 1rem; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.inv-rows > div { display: flex; justify-content: space-between; gap: 1rem; }
.inv-rows dt { color: var(--muted); }
.inv-rows dd { font-family: var(--f-mono); font-size: .92rem; }
.inv-rows .tot { font-weight: 700; padding-top: .45rem; border-top: 1px solid var(--line); margin-top: .2rem; }
.inv-rows .tot dt { color: var(--text); }
.steps { display: grid; gap: .6rem; margin-top: 1.1rem; font-size: .94rem; }
.steps li { display: flex; align-items: center; gap: .75rem; color: var(--muted); transition: color .3s; }
.steps li::before {
	content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%;
	border: 1.5px solid var(--line); display: grid; place-items: center;
	font-size: .72rem; font-weight: 800; color: #04210f; transition: background .3s, border-color .3s;
}
.steps li.run { color: var(--text); }
.steps li.run::before { border-color: var(--cyan); animation: pulse 1s ease-in-out infinite; }
.steps li.done { color: var(--text); }
.steps li.done::before { content: "\2713"; background: var(--ok); border-color: var(--ok); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(82, 214, 230, .18); } }

/* ---------- services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.svc {
	position: relative; isolation: isolate; overflow: hidden;
	display: flex; flex-direction: column; gap: .8rem;
	padding: 1.9rem; border: 1px solid var(--line); border-radius: 18px; background: var(--panel);
}
.svc::before {
	content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
	background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(82, 214, 230, .13), transparent 62%);
}
.svc:hover::before { opacity: 1; }
.w7 { grid-column: span 7; }
.w5 { grid-column: span 5; }
.w4 { grid-column: span 4; }
.w12 { grid-column: span 12; }
.svc .ico { width: 30px; height: 30px; color: var(--gold); margin-bottom: .4rem; }
.svc p { color: var(--muted); max-width: 44ch; }
.lead-svc { border-color: rgba(217, 174, 79, .38); border-radius: 24px; padding: 2.2rem; }
.lead-svc h3 { font-size: 1.7rem; }
.lead-svc p { color: #b9c8dc; }
.checks { display: grid; gap: .65rem; margin-top: .6rem; }
.checks li { position: relative; padding-inline-start: 1.7rem; color: #cbd7e7; font-size: .98rem; }
.checks li::before {
	content: ""; position: absolute; inset-inline-start: 0; top: .5em; width: 12px; height: 7px;
	border-inline-start: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
	transform: rotate(-45deg) translateY(-50%);
}
html[dir="rtl"] .checks li::before { transform: rotate(45deg) translateY(-50%) scaleX(-1); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .6rem; }
.tags li { font: 500 .8rem var(--f-mono); padding: .25rem .65rem; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.more { margin-top: auto; padding-top: .4rem; color: var(--cyan); font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }
.svc.wide { flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; }
.svc.wide h3 { margin-bottom: .3rem; }

/* ---------- Saudi rules ---------- */
.saudi { border-block: 1px solid var(--line); background: var(--bg2); }
.saudi-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.saudi-intro { display: grid; gap: 1.2rem; position: sticky; top: 110px; }
.saudi-intro p { color: var(--muted); max-width: 32ch; }
.rules { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
.rules > div { padding-block: 1.4rem; border-top: 1px solid var(--line); }
.rules dt { font-weight: 700; font-size: 1.15rem; color: var(--gold); margin-bottom: .35rem; }
.rules dd { color: var(--muted); font-size: .98rem; }

/* ---------- AI assistant ---------- */
.ai-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.ai-copy { display: grid; gap: 1.3rem; justify-items: start; }
.ai-copy > p { color: #b9c8dc; max-width: 36rem; }

.chat { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); overflow: hidden; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .7); }
.chat-head { display: flex; align-items: center; gap: .6rem; padding: .95rem 1.2rem; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.chat-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(94, 224, 164, .15); }
.chat-note { margin-inline-start: auto; color: var(--muted); font-size: .8rem; }
.chat-body { display: grid; gap: .8rem; padding: 1.3rem; min-height: 21rem; align-content: start; }
.msg { max-width: 88%; padding: .8rem 1rem; border-radius: 14px; font-size: .96rem; line-height: 1.55; }
.msg.me { justify-self: end; background: rgba(217, 174, 79, .16); border: 1px solid rgba(217, 174, 79, .35); border-end-end-radius: 4px; }
.msg.bot { justify-self: start; background: rgba(82, 214, 230, .07); border: 1px solid rgba(82, 214, 230, .22); border-end-start-radius: 4px; }
.msg ul { display: grid; gap: .3rem; margin-top: .55rem; }
.msg li { color: #c3d0e1; font-size: .92rem; }
.msg b { font: 600 .85rem var(--f-mono); color: var(--cyan); margin-inline-end: .35rem; }
.typing { display: flex; gap: 5px; padding: 0 .4rem; justify-self: start; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.js .chat .msg { opacity: 0; transform: translateY(8px); }
.js .chat .typing { opacity: 0; height: 0; overflow: hidden; }
.js .chat.play .msg { animation: msgin .5s ease forwards; animation-delay: var(--d, 0s); }
.js .chat.play .m1 { --d: .2s; }
.js .chat.play .m2 { --d: 2.5s; }
.js .chat.play .m3 { --d: 3.7s; }
.js .chat.play .typing { animation: typing 1.3s 1.1s both; }
@keyframes msgin { to { opacity: 1; transform: none; } }
@keyframes typing { 0% { opacity: 0; height: 0; } 10% { opacity: 1; height: 20px; } 90% { opacity: 1; height: 20px; } 100% { opacity: 0; height: 0; } }

/* ---------- process ---------- */
.process-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.process-grid .sticky { position: sticky; top: 110px; display: grid; gap: 1.2rem; }
.process-grid .sticky p { color: var(--muted); max-width: 30ch; }
.rail { position: relative; padding-inline-start: 4rem; --p: 0; }
.rail::before { content: ""; position: absolute; top: 16px; bottom: 16px; inset-inline-start: 15px; width: 2px; background: var(--line); }
.rail::after {
	content: ""; position: absolute; top: 16px; inset-inline-start: 15px; width: 2px;
	height: calc((100% - 32px) * var(--p)); background: linear-gradient(var(--gold), var(--cyan));
}
.step { position: relative; padding-bottom: 3.4rem; display: grid; gap: .5rem; }
.step:last-child { padding-bottom: 0; }
.step p { color: var(--muted); max-width: 42ch; }
.step-n {
	position: absolute; inset-inline-start: -4rem; top: -2px; width: 32px; height: 32px; border-radius: 50%;
	display: grid; place-items: center; background: var(--bg); border: 1.5px solid var(--line);
	font: 600 .85rem var(--f-mono); color: var(--muted); transition: border-color .3s, color .3s, background .3s;
}
.step.on .step-n { border-color: var(--gold); color: var(--gold); background: rgba(217, 174, 79, .1); }

/* ---------- contact ---------- */
.contact { background: var(--bg2); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact-copy { display: grid; gap: 1.2rem; position: sticky; top: 110px; }
.contact-copy > p { color: var(--muted); max-width: 30ch; }
.channels { display: grid; gap: 1rem; margin-top: .8rem; }
.channels li { display: grid; gap: .1rem; }
.ch-label { color: var(--muted); font-size: .85rem; }
.channels a { font-weight: 600; font-size: 1.08rem; text-decoration: none; width: fit-content; border-bottom: 1px solid var(--line); }
.channels a:hover { border-color: var(--gold); }

.form { display: grid; gap: 1.1rem; }
.form label { display: grid; gap: .4rem; }
.form label > span { font-size: .9rem; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form input, .form select, .form textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--text);
	background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 10px;
	padding: .8rem 1rem; transition: border-color .2s, background .2s;
}
.form textarea { resize: vertical; min-height: 8rem; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: rgba(150, 185, 230, .35); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--cyan); background: rgba(82, 214, 230, .05); }
.form select option { background: #0c1f37; color: var(--text); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.form-foot small { color: var(--muted); font-size: .85rem; }
.notice { padding: .9rem 1.1rem; border-radius: 10px; font-weight: 500; }
.notice.ok { background: rgba(94, 224, 164, .1); border: 1px solid rgba(94, 224, 164, .45); color: var(--ok); }
.notice.bad { background: rgba(255, 141, 141, .08); border: 1px solid rgba(255, 141, 141, .4); color: var(--bad); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem; color: var(--muted); font-size: .95rem; }
.foot { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 1.5rem 3rem; align-items: start; }
.foot-brand { display: grid; gap: .9rem; }
.foot-brand p { max-width: 38ch; }
.foot-brand .brand { color: var(--text); }
.foot-nav { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; justify-content: flex-end; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { color: var(--text); }
.copy { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; }

/* ---------- inner pages ---------- */
.page-main { padding-block: 9rem 5rem; min-height: 70vh; }
.prose { max-width: 46rem; }
.prose h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; }
.entry > * + * { margin-top: 1.1rem; }
.entry h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.entry h3 { margin-top: 1.8rem; }
.entry a { color: var(--cyan); }
.entry ul, .entry ol { padding-inline-start: 1.4rem; }
.entry ul { list-style: disc; }
.entry ol { list-style: decimal; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
	.burger { display: block; }
	.nav {
		position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
		background: rgba(6, 19, 35, .98); border-bottom: 1px solid var(--line);
		padding: .6rem 1.25rem 1.2rem; transform: translateY(-130%); transition: transform .3s; visibility: hidden;
	}
	.site-header.open .nav { transform: none; visibility: visible; }
	.nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
	.actions .btn { display: none; }
	.site-header.open, .site-header.scrolled { background: rgba(6, 19, 35, .95); }

	.hero { min-height: auto; padding-block: 7rem 3.5rem; }
	.hero-grid, .saudi-grid, .ai-grid, .process-grid, .contact-grid { grid-template-columns: 1fr; }
	.invoice, html[dir="rtl"] .invoice { justify-self: stretch; max-width: none; }
	.w7, .w5, .w4 { grid-column: span 12; }
	.svc.wide { flex-direction: column; align-items: flex-start; }
	.saudi-intro, .process-grid .sticky, .contact-copy { position: static; }
	.foot { grid-template-columns: 1fr; }
	.foot-nav { justify-content: flex-start; }
}
@media (max-width: 600px) {
	.rules, .row2 { grid-template-columns: 1fr; }
	.lead { font-size: 1.08rem; }
	.svc, .lead-svc { padding: 1.5rem; }
	.chat-body { padding: 1rem; }
	.msg { max-width: 94%; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
	.js .rise, .js .chat .msg { opacity: 1; transform: none; animation: none !important; }
	.js .chat .typing { display: none; }
}


/* ---------- hero slider ---------- */
.hero > .wrap { display: grid; gap: 2.2rem; }
.slides { display: grid; }
.slide {
	grid-area: 1 / 1; opacity: 0; visibility: hidden; pointer-events: none;
	transition: opacity .5s ease, visibility 0s linear .5s;
}
.slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .5s ease; }

.panel, .invoice {
	padding: 1.4rem 1.5rem 1.5rem; border-radius: 20px; border: 1px solid var(--line);
	background: linear-gradient(180deg, rgba(17, 40, 69, .8), rgba(9, 26, 46, .82));
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .65);
	max-width: 30rem; justify-self: end; width: 100%;
}
html[dir="rtl"] .panel { justify-self: start; }
.panel figcaption, .panel-head { font-size: .82rem; color: var(--muted); margin-bottom: 1rem; }
.dev-card .steps { margin-top: 0; gap: .9rem; font-size: 1rem; }

.app-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.app-tiles li {
	display: grid; gap: .15rem; padding: .9rem 1rem; border-radius: 12px;
	border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
	animation: tile 9s ease-in-out infinite; animation-delay: calc(var(--k) * 1.2s);
}
.app-tiles b { font-weight: 700; font-size: 1rem; }
.app-tiles i { font-style: normal; font-size: .8rem; color: var(--muted); line-height: 1.35; }
@keyframes tile {
	0%, 16%, 100% { border-color: var(--line); background: rgba(255, 255, 255, .03); }
	4%, 12% { border-color: rgba(217, 174, 79, .7); background: rgba(217, 174, 79, .1); }
}

.slider-ui { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.arrow {
	width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
	background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text); cursor: pointer;
	transition: border-color .2s;
}
.arrow:hover { border-color: var(--cyan); }
html[dir="rtl"] .arrow svg { transform: scaleX(-1); }
.dots { display: flex; gap: .8rem; flex-wrap: wrap; }
.dots button {
	display: grid; gap: .5rem; min-width: 8.5rem; padding: 0; background: none; border: 0;
	color: var(--muted); font: inherit; font-size: .9rem; text-align: start; cursor: pointer; transition: color .2s;
}
.dots button:hover, .dots button.is-active { color: var(--text); }
.dots .bar { display: block; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.dots .bar::after { content: ""; display: block; height: 100%; width: 0; background: var(--gold); }
.dots button.is-active .bar::after { width: 100%; animation: fill var(--dur, 7s) linear; }
html[dir="rtl"] .dots .bar::after { margin-inline-start: auto; }
.slider-paused .dots button.is-active .bar::after { animation-play-state: paused; }
.slider-static .dots button.is-active .bar::after { animation: none; }
@keyframes fill { from { width: 0; } to { width: 100%; } }

/* ---------- services: extra width ---------- */
.w6 { grid-column: span 6; }

/* ---------- Odoo apps ---------- */
.apps-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: end; margin-bottom: clamp(2rem, 4vw, 3.4rem); }
.apps-intro p { color: var(--muted); max-width: 44ch; }
.app-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 2rem; }
.app-group { border-top: 2px solid var(--gold); padding-top: 1.1rem; }
.app-group h3 { margin-bottom: 1rem; }
.app-group dl { display: grid; gap: 1.1rem; }
.app-group dt { font-weight: 600; margin-bottom: .15rem; }
.app-group dd { color: var(--muted); font-size: .94rem; line-height: 1.5; }

@media (max-width: 1100px) {
	.app-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem 2rem; }
}
@media (max-width: 960px) {
	.panel, html[dir="rtl"] .panel { justify-self: stretch; max-width: none; }
	.w6 { grid-column: span 12; }
	.apps-intro { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 600px) {
	.app-groups { grid-template-columns: 1fr; }
	.dots button { min-width: 6.5rem; font-size: .82rem; }
	.app-tiles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.app-tiles li { animation: none; }
}
