/* xcode — shared stylesheet for signup, shop login and payment pages (the home page uses xcode.css).
   Tokens first; every colour, radius and shadow below comes from them. */

/* Readex Pro (Arabic + Latin, variable) and JetBrains Mono — self-hosted (SIL OFL, see ../fonts) */
@font-face { font-family: "Readex Pro"; font-weight: 160 700; font-display: swap; src: url("../fonts/readexpro-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Readex Pro"; font-weight: 160 700; font-display: swap; src: url("../fonts/readexpro-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }

:root {
	/* xcode family (same tokens as website/tailwind.config.js) */
	--espresso: #0e1116;   /* ink: dark panels */
	--roast: #0e1116;
	--roast-deep: #1a1f27;
	--copper: #4e6b00;     /* lime, dark enough for text on paper */
	--copper-bright: #c6f24e;
	--crema: #f2f7df;
	--mint: #0b6b3d;
	/* surfaces */
	--bg: #f6f5f1;
	--bg-alt: #eeece5;
	--card: #ffffff;
	--ink: #0e1116;
	--ink-soft: #3d4249;
	--muted: #6b6f76;
	--line: #e3e1da;
	--cta: #0e1116;
	--cta-ink: #ffffff;
	--bad: #b42318;
	--ok: #1f8a4c;
	--shadow: 0 1px 2px rgba(14, 17, 22, 0.06), 0 12px 32px -12px rgba(14, 17, 22, 0.18);
	--shadow-lg: 0 2px 4px rgba(14, 17, 22, 0.06), 0 32px 64px -24px rgba(14, 17, 22, 0.32);
	--r: 10px;
	--r-lg: 16px;
	--display: "Readex Pro", "Segoe UI", Tahoma, sans-serif;
	--text: "Readex Pro", "Segoe UI", Tahoma, Arial, sans-serif;
	--wrap: 1140px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0e1116; --bg-alt: #1a1f27; --card: #1a1f27; --ink: #f2f2ef; --ink-soft: #c5c9cf; --muted: #9aa1ab;
		--line: #2a3039; --cta: #c6f24e; --cta-ink: #0e1116; --crema: #1f2a10; --copper: #c6f24e; --bad: #ff8a7a; --ok: #56c98a;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
		--shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 32px 64px -24px rgba(0, 0, 0, 0.7);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0e1116; --bg-alt: #1a1f27; --card: #1a1f27; --ink: #f2f2ef; --ink-soft: #c5c9cf; --muted: #9aa1ab;
	--line: #2a3039; --cta: #c6f24e; --cta-ink: #0e1116; --crema: #1f2a10; --copper: #c6f24e; --bad: #ff8a7a; --ok: #56c98a;
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
	--shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 32px 64px -24px rgba(0, 0, 0, 0.7);
	color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font-family: var(--text); font-size: 17px; line-height: 1.8;
	-webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: 0; font-family: var(--display); }
p { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.eyebrow { color: var(--copper); font-weight: 700; font-size: 14px; }
.lead { color: var(--ink-soft); font-size: clamp(17px, 1.6vw, 20px); }
.center { text-align: center; }

/* ---------- brand lockup ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: 0.2px; }
.brand img { width: 38px; height: 38px; display: block; }
.brand small { font-weight: 500; font-size: 13px; color: var(--muted); margin-inline-start: 2px; }

/* ---------- buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
	border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
	cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--cta); color: var(--cta-ink); }
.btn-primary:hover { background: var(--roast-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; border-radius: 8px; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid var(--copper-bright); outline-offset: 2px; }
.btn[disabled] { opacity: 0.6; cursor: default; transform: none; }

/* ---------- header ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.nav.scrolled { border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.nav nav { display: flex; gap: 26px; }
.nav nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 16px; }
.nav nav a:hover { color: var(--ink); }
.nav .actions { display: flex; gap: 10px; align-items: center; }
.nav .btn { min-height: 42px; padding: 0 16px; font-size: 15px; }
@media (max-width: 860px) { .nav nav { display: none; } .nav .btn-ghost { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(28px, 6vw, 72px) 0 clamp(40px, 6vw, 88px); overflow: hidden; }
.hero::before {
	content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--copper) 22%, transparent), transparent 70%); pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 62px); line-height: 1.22; }
.hero h1 em { font-style: normal; color: var(--copper); }
.hero .lead { margin-top: 18px; max-width: 34em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .note { margin-top: 14px; color: var(--muted); font-size: 14px; }
.stage { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 560px; margin-inline: auto; }
.stage canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.stage .fallback { position: absolute; inset: 8%; display: grid; place-items: center; }
.stage .fallback img { width: 100%; border-radius: 28%; box-shadow: var(--shadow-lg); }
.stage.ready .fallback { display: none; }
.stage .hint { position: absolute; inset-inline: 0; bottom: 2%; text-align: center; font-size: 13px; color: var(--muted); opacity: 0; transition: opacity 0.6s; }
.stage.ready .hint { opacity: 1; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .stage { max-width: 420px; order: -1; } .hero { text-align: center; } .hero .cta { justify-content: center; } .hero .lead { margin-inline: auto; } }

/* ---------- strip ---------- */
.strip { border-block: 1px solid var(--line); background: var(--bg-alt); }
.strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-block: 18px; }
.strip div { display: flex; align-items: center; gap: 10px; justify-content: center; font-weight: 500; color: var(--ink-soft); font-size: 15px; }
.strip svg { width: 22px; height: 22px; color: var(--copper); flex: none; }
@media (max-width: 760px) { .strip .wrap { grid-template-columns: repeat(2, 1fr); } }

/* ---------- sections ---------- */
section { padding: clamp(56px, 8vw, 104px) 0; }
.head { max-width: 720px; margin: 0 auto clamp(28px, 4vw, 52px); text-align: center; }
.head h2 { font-size: clamp(26px, 3.4vw, 40px); margin-top: 6px; }
.head p { margin-top: 12px; color: var(--ink-soft); }
.alt { background: var(--bg-alt); }

.grid { display: grid; gap: 18px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .g4, .g2 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow); }
.feature .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--copper) 16%, transparent); color: var(--copper); margin-bottom: 14px; }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 19px; }
.feature p { color: var(--ink-soft); font-size: 15.5px; margin-top: 6px; }

/* ---------- business types with a POS mock ---------- */
.biz { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.biz + .biz { margin-top: clamp(48px, 7vw, 96px); }
.biz.flip .mock { order: -1; }
.biz h3 { font-size: clamp(22px, 2.6vw, 30px); }
.biz ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.biz li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); }
.biz li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 4px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
@media (max-width: 900px) { .biz { grid-template-columns: 1fr; } .biz.flip .mock { order: 0; } }

.mock { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.mock .bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.mock .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.mock .bar b { margin-inline-start: auto; color: var(--ink); font-weight: 700; }
.mock .body { display: grid; grid-template-columns: 1.5fr 1fr; }
.mock .items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
.mock .it { border: 1px solid var(--line); border-radius: 14px; padding: 8px; font-size: 12.5px; line-height: 1.4; background: var(--card); }
.mock .it img { width: 100%; border-radius: 10px; display: block; aspect-ratio: 1; }
.mock .it b { display: block; margin-top: 6px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock .it span { color: var(--copper); font-weight: 700; }
.mock .cart { border-inline-start: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; background: var(--bg-alt); }
.mock .row { display: flex; justify-content: space-between; gap: 8px; }
.mock .row span:last-child { font-weight: 700; }
.mock .total { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; }
.mock .pay { background: var(--cta); color: var(--cta-ink); border-radius: 10px; padding: 9px; text-align: center; font-weight: 700; }
.mock .offline { display: inline-flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--mint); border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
@media (max-width: 520px) { .mock .body { grid-template-columns: 1fr; } .mock .cart { border-inline-start: 0; border-top: 1px solid var(--line); } }

/* ---------- steps ---------- */
.step { position: relative; padding-top: 30px; }
.step .n { position: absolute; top: -22px; inset-inline-start: 24px; width: 44px; height: 44px; border-radius: 14px; background: var(--espresso); color: #ffffff; display: grid; place-items: center; font-weight: 700; font-size: 19px; box-shadow: var(--shadow); }
.step h3 { font-size: 19px; }
.step p { color: var(--ink-soft); margin-top: 6px; font-size: 15.5px; }

/* ---------- pricing ---------- */
.plan { display: flex; flex-direction: column; gap: 14px; }
.plan.pop { border-color: var(--copper); box-shadow: var(--shadow-lg); position: relative; }
.plan.pop::before { content: "الأكثر طلبًا"; position: absolute; top: -13px; inset-inline-start: 24px; background: var(--copper); color: #fff; font-size: 12.5px; font-weight: 700; border-radius: 99px; padding: 2px 12px; }
.plan h3 { font-size: 21px; }
.plan .price { font-size: 34px; font-weight: 700; line-height: 1.2; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--ink-soft); font-size: 15.5px; }
.plan li::before { content: "✓"; color: var(--mint); font-weight: 700; margin-inline-end: 8px; }
.plan .btn { margin-top: auto; }

/* ---------- faq ---------- */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--copper); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--ink-soft); padding-bottom: 16px; }

/* ---------- final cta + footer ---------- */
.final { background: var(--espresso); color: #ffffff; border-radius: clamp(20px, 3vw, 36px); padding: clamp(32px, 6vw, 72px); text-align: center; position: relative; overflow: hidden; }
.final::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; background: radial-gradient(closest-side, rgba(198, 242, 78, 0.10), transparent 70%); }
.final h2 { font-size: clamp(26px, 3.6vw, 42px); position: relative; }
.final p { color: rgba(255,255,255,.68); margin-top: 12px; position: relative; }
.final .btn { margin-top: 26px; background: var(--copper-bright); color: #0e1116; position: relative; }
footer { padding: 36px 0 44px; color: var(--muted); font-size: 14.5px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ---------- forms (signup, shop login, staff login) ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-side { background: var(--espresso); color: #ffffff; padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; inset: auto auto -30% -20%; width: 620px; height: 620px; background: radial-gradient(closest-side, rgba(198, 242, 78, 0.10), transparent 70%); pointer-events: none; }
.auth-side .brand { color: #ffffff; position: relative; z-index: 1; }
.auth-side h2 { font-size: clamp(26px, 3vw, 38px); position: relative; z-index: 1; }
.auth-side p { color: rgba(255,255,255,.68); margin-top: 12px; max-width: 30em; position: relative; z-index: 1; }
.auth-side ul { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; position: relative; z-index: 1; color: rgba(255,255,255,.82); }
.auth-side li::before { content: "✓"; color: var(--copper-bright); font-weight: 700; margin-inline-end: 10px; }
.auth-side .stage { max-width: 340px; margin: 12px auto 0; }
.auth-main { display: grid; place-items: center; padding: clamp(20px, 4vw, 48px) 16px; }
.auth-card { width: min(480px, 100%); }
.auth-card h1 { font-size: clamp(24px, 3vw, 32px); }
.auth-card .sub { color: var(--ink-soft); margin-top: 6px; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { padding: 20px 16px; } .auth-side .more { display: none; } }

.field { margin-top: 14px; }
.field label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 5px; }
.field input, .field select {
	width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px;
	background: var(--card); color: var(--ink);
}
.field input:focus, .field select:focus { outline: 3px solid color-mix(in srgb, var(--copper-bright) 55%, transparent); outline-offset: 0; border-color: var(--copper); }
.field .addr { display: flex; align-items: center; gap: 8px; direction: ltr; }
.field .addr span { color: var(--muted); white-space: nowrap; font-size: 15px; }
.field .hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.field .err, .form-err { color: var(--bad); font-size: 13.5px; margin-top: 4px; }
.field .okmsg { color: var(--ok); font-size: 13.5px; margin-top: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.types label { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 700; background: var(--card); }
.types input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.types img { width: 44px; height: 44px; border-radius: 12px; }
.types label:has(input:checked) { border-color: var(--copper); box-shadow: 0 0 0 3px color-mix(in srgb, var(--copper-bright) 30%, transparent); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); opacity: 0; pointer-events: none; }
.progress { height: 12px; background: var(--line); border-radius: 8px; overflow: hidden; margin: 18px 0 10px; }
.progress div { height: 100%; width: 5%; background: linear-gradient(90deg, var(--copper), var(--copper-bright)); border-radius: 8px; transition: width 0.7s; }
.done h2 { color: var(--ok); }
.small { font-size: 14px; color: var(--muted); }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } .btn { transition: none; } }

@media (hover: none) { .stage .hint { display: none; } }

.biz-types { margin-top: clamp(56px, 8vw, 104px); }
.biz-types h3 { text-align: center; font-size: clamp(20px, 2.4vw, 26px); margin: 0 0 22px; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.type-card { display: flex; gap: 14px; align-items: center; background: var(--card, #fff); border: 1px solid rgba(107, 62, 38, .12); border-radius: 18px; padding: 14px; }
.type-card img { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.type-card b { display: block; font-size: 17px; margin-bottom: 2px; }
.type-card span { display: block; font-size: 14px; opacity: .78; line-height: 1.6; }
