/* RetainrWorks landing + templates market. Values are lifted from Landing.dc.html. */
body.site { font-size: 16px; line-height: 1.6; }

.wrap { max-width: 1320px; margin: 0 auto; padding-inline: clamp(20px, 4vw, 56px); }
.section { border-bottom: 1px solid var(--divider); }
.section > .wrap { padding-block: clamp(72px, 9vw, 120px); }

/* Section heads */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.head-text { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.kicker { font-family: var(--mono); font-size: 12px; color: var(--accent-hi); letter-spacing: .08em; }
[data-lang="ar"] .kicker { letter-spacing: 0; }
.h2 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: var(--h2); line-height: var(--lh-h); letter-spacing: var(--ls-h); text-wrap: balance; }
.lead { margin: 0; color: var(--muted); max-width: 56ch; text-wrap: pretty; }

/* Buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; border: 1px solid var(--divider); background: transparent; color: var(--text); font-family: var(--fh); font-weight: 600; letter-spacing: .02em; height: 42px; padding: 0 14px; font-size: 15px; transition: background-color .15s, border-color .15s; }
[data-lang="ar"] .btn { letter-spacing: 0; }
.btn:hover { border-color: var(--mark); color: var(--text); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-press); border-color: var(--accent); color: var(--on-accent); }
.btn-sm { height: 38px; padding: 0 16px; }
.btn-lg { height: 54px; padding: 0 24px; font-size: 18px; }
.btn:disabled { opacity: .75; }

/* Header */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--divider); }
.nav-bar { height: 68px; display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 26px; margin-inline-start: 20px; font-size: 15px; }
.nav-links a { display: inline-block; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; background: transparent; border: 1px solid var(--divider); color: var(--muted); }
.icon-btn:hover { color: var(--text); border-color: var(--mark); }
.lang-btn { height: 38px; padding: 0 14px; display: inline-flex; align-items: center; background: transparent; border: 1px solid var(--divider); font-family: var(--mono); font-size: 13px; color: var(--text); }
.lang-btn:hover { border-color: var(--mark); color: var(--text); }
.theme-sun, [data-theme="light"] .theme-moon { display: block; }
.theme-moon, [data-theme="light"] .theme-sun { display: none; }
.menu-btn { display: none; color: var(--text); }
.menu { display: none; border-top: 1px solid var(--divider); padding: 12px clamp(20px, 4vw, 56px) 24px; flex-direction: column; background: var(--bg); }
.menu a { padding: 14px 0; border-bottom: 1px solid var(--divider); color: var(--text); font-family: var(--fh); font-size: 24px; font-weight: 600; }
.menu .btn { margin-top: 20px; height: 50px; font-size: 17px; border-bottom: 1px solid var(--accent); }
.nav.open .menu { display: flex; }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--divider); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-fade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 70%, transparent) 0%, color-mix(in srgb, var(--bg) 20%, transparent) 55%, transparent 100%), linear-gradient(180deg, transparent 60%, var(--bg) 100%); }
[dir="rtl"] .hero-fade { background: linear-gradient(270deg, color-mix(in srgb, var(--bg) 70%, transparent) 0%, color-mix(in srgb, var(--bg) 20%, transparent) 55%, transparent 100%), linear-gradient(180deg, transparent 60%, var(--bg) 100%); }
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 55% at 78% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%); }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 72px 72px; -webkit-mask-image: radial-gradient(ellipse 90% 80% at 60% 20%, #000 35%, transparent 80%); mask-image: radial-gradient(ellipse 90% 80% at 60% 20%, #000 35%, transparent 80%); }
.beam-col { position: absolute; top: 0; bottom: 0; width: 1px; overflow: hidden; }
.beam-col span { position: absolute; left: 0; top: 0; width: 1px; height: 180px; background: linear-gradient(transparent, var(--accent-hi), transparent); animation: rw-beam 6s linear infinite; }
.beam-row { position: absolute; left: 0; right: 0; height: 1px; overflow: hidden; }
.beam-row span { position: absolute; top: 0; left: 0; height: 1px; width: 200px; background: linear-gradient(90deg, transparent, var(--accent-hi), transparent); animation: rwBeamX 9s linear infinite; }
.hero-spot { position: absolute; inset: 0; pointer-events: none; opacity: var(--hon, 0); transition: opacity .5s; background: radial-gradient(560px circle at var(--hx, 70%) var(--hy, 0%), color-mix(in srgb, var(--accent-hi) 30%, transparent), transparent 65%); }
.hero-inner { position: relative; pointer-events: none; padding-top: clamp(64px, 10vw, 128px); padding-bottom: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px; align-items: end; }
.hero-copy { display: flex; flex-direction: column; gap: 28px; min-width: 0; pointer-events: auto; }
.hero h1 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: var(--hero); line-height: var(--lh-h); letter-spacing: var(--ls-h); text-wrap: balance; max-width: 13ch; }
.hero h1 [data-repel] { display: inline-block; transition: transform .4s cubic-bezier(.2,1.3,.4,1); will-change: transform; }
.hero h1 .acc { color: var(--accent-hi); }
.hero-sub { margin: 0; max-width: 56ch; color: var(--muted); font-size: var(--text-lead); text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.cta-shimmer { position: relative; display: inline-flex; border: 1px solid var(--accent); }
.cta-shimmer > span { position: relative; overflow: hidden; height: 52px; padding: 0 24px; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: var(--on-accent); font-family: var(--fh); font-weight: 600; font-size: 18px; letter-spacing: .02em; }
.cta-shimmer:hover > span { background: var(--accent-press); }
.cta-shimmer i { position: absolute; inset: 0; background-image: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.32) 50%, transparent 62%); background-size: 250% 100%; animation: rw-shimmer 3.2s ease-in-out infinite; }
.cta-shimmer b { position: relative; font-weight: inherit; }
.btn-ghost { height: 54px; padding: 0 24px; font-size: 18px; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.marquee { display: flex; align-items: center; gap: 20px; }
.marquee-label { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; white-space: nowrap; }
.marquee-view { flex: 1; min-width: 0; overflow: hidden; direction: ltr; -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; gap: 48px; width: max-content; animation: rw-marquee 40s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: 48px; font-family: var(--fh); font-weight: 600; font-size: 24px; color: var(--muted); white-space: nowrap; }
.marquee-track em { font-style: normal; color: var(--accent); font-family: var(--mono); font-size: 14px; }

/* Spec card */
.spec { position: relative; pointer-events: auto; border: 1px solid var(--divider); background: var(--bg); max-width: 440px; width: 100%; justify-self: end; }
.spec-head { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--divider); font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.spec-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--divider); font-size: 14px; }
.spec-row span:first-child { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.spec-foot { padding: 12px 16px; font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* Cursor glow used on [data-fx] cards */
.glow { position: absolute; inset: 0; pointer-events: none; z-index: 3; opacity: var(--on, 0); transition: opacity .3s; background: radial-gradient(var(--glow-r, 420px) circle at var(--px, 50%) var(--py, 50%), color-mix(in srgb, var(--accent-hi) var(--glow-a, 24%), transparent), transparent 60%); }

/* Placeholder imagery (diagonal stripes) and real images */
.ph { display: grid; place-items: center; border: 1px solid var(--divider); background: repeating-linear-gradient(135deg, var(--stripe) 0 1px, transparent 1px 11px); overflow: hidden; }
.ph span { font-family: var(--mono); font-size: 12px; color: var(--muted); direction: ltr; padding: 0 12px; text-align: center; }
.ph { position: relative; }
/* Pinned to the frame instead of sized by the grid: iOS Safari resolves height:100% on grid children differently,
   which left tall images (CV pages) hanging off the bottom of their box. */
.ph > img, .ph > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Selected work */
.work-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.work-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--divider); background: var(--surface); color: var(--text); transform-style: preserve-3d; will-change: transform; }
.work-card:hover { border-color: var(--accent-hi); color: var(--text); }
.work-card .ph { margin: 12px 12px 0; transform: translate(calc(var(--mx, 0) * -34px), calc(var(--my, 0) * -26px)) scale(calc(1 + var(--on, 0) * .05)); transition: transform .25s ease-out; }
.work-body { position: relative; z-index: 2; padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--mono); font-size: 11px; padding: 4px 8px; border: 1px solid var(--divider); color: var(--muted); }
.work-name { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.work-name h3 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: var(--h3); line-height: 1.1; letter-spacing: var(--ls-h); transform: translate(calc(var(--mx, 0) * 18px), calc(var(--my, 0) * 10px)) skewX(calc(var(--mx, 0) * -10deg)); transition: transform .2s ease-out; }
.work-name span { color: var(--muted); font-size: 15px; }
.work-desc { margin: 0; color: var(--muted); font-size: 15px; max-width: 62ch; text-wrap: pretty; flex: 1; }
.work-more { margin-top: 6px; font-family: var(--fh); font-weight: 600; font-size: 15px; color: var(--accent-hi); letter-spacing: calc(.02em + var(--on, 0) * .18em); transition: letter-spacing .5s cubic-bezier(.2,.8,.2,1); }

/* Services */
.svc-list { border-top: 1px solid var(--divider); }
.svc { position: relative; overflow: hidden; display: grid; grid-template-columns: 64px minmax(0,1.1fr) minmax(0,1.4fr) minmax(0,.8fr); gap: 16px 32px; align-items: baseline; padding: 28px 8px; border-bottom: 1px solid var(--divider); transition: background .2s; }
.svc:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.svc-tile { position: absolute; z-index: 2; left: var(--px, 50%); top: var(--py, 50%); width: 150px; height: 96px; display: grid; place-items: center; background: #6E9BF0; color: #0E1114; mix-blend-mode: difference; font-family: var(--fh); font-weight: 600; font-size: 56px; pointer-events: none; transform: translate(-50%, -50%) rotate(calc(var(--mx, 0) * 40deg)) scale(var(--on, 0)); transition: transform .45s cubic-bezier(.3,1.7,.5,1), left .18s ease-out, top .18s ease-out; }
.svc-n { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.svc h3 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1; letter-spacing: var(--ls-h); transform: translateX(calc(var(--on, 0) * 28px)) skewX(calc(var(--mx, 0) * -14deg)); transition: transform .35s cubic-bezier(.2,1.4,.4,1); }
[dir="rtl"] .svc h3 { transform: translateX(calc(var(--on, 0) * -28px)) skewX(calc(var(--mx, 0) * -14deg)); }
.svc p { margin: 0; color: var(--muted); font-size: 16px; text-wrap: pretty; }
.svc-tags { font-family: var(--mono); font-size: 12px; color: var(--text); justify-self: start; }

/* Template cards (landing + market) */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 20px; }
.tpl-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--divider); background: var(--surface); will-change: transform; --glow-r: 340px; --glow-a: 22%; }
.tpl-card .ph { aspect-ratio: 4 / 3; margin: 10px 10px 0; transform: translate(calc(var(--mx, 0) * -22px), calc(var(--my, 0) * -18px)) rotate(calc(var(--mx, 0) * -3deg)); transition: transform .25s ease-out; }
.tpl-card .ph span { font-size: 11px; }
.tpl-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tpl-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chip-cat { font-family: var(--mono); font-size: 11px; padding: 4px 8px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-hi); }
.tpl-code { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tpl-card h3 { margin: 6px 0 0; font-family: var(--fh); font-weight: 600; font-size: 24px; line-height: 1.15; letter-spacing: var(--ls-h); }
.tpl-card h3 a { color: inherit; }
.tpl-feat { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 10px; }
.price b { display: inline-block; font-family: var(--fh); font-weight: 600; font-size: 32px; line-height: 1; direction: ltr; transform: scale(calc(1 + var(--on, 0) * .35)) rotate(calc(var(--on, 0) * -6deg)); transform-origin: left bottom; transition: transform .45s cubic-bezier(.3,1.7,.5,1); }
.price span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tpl-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); border-top: 1px solid var(--divider); }
.step { position: relative; padding: 28px 0 8px; padding-inline-end: 24px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--divider); perspective: 600px; }
.step-bar { position: absolute; top: -5px; inset-inline-start: 0; width: calc(9px + var(--on, 0) * (100% - 33px)); height: 9px; background: var(--accent); transition: width .6s cubic-bezier(.2,.9,.2,1); }
.step-n { display: inline-block; align-self: flex-start; font-family: var(--fh); font-weight: 500; font-size: 64px; line-height: 1; color: color-mix(in srgb, var(--accent-hi) calc(var(--on, 0) * 100%), var(--muted)); direction: ltr; transform: rotateX(calc(var(--on, 0) * 360deg)) translateY(calc(var(--on, 0) * -6px)); transition: transform .9s cubic-bezier(.2,.8,.2,1), color .3s; }
.step h3 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: var(--h3); line-height: 1.1; letter-spacing: var(--ls-h); }
.step p { margin: 0 0 20px; color: var(--muted); font-size: 15px; text-wrap: pretty; }

/* Stats */
.stats { background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stat { padding: 44px 0; padding-inline-end: 24px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--divider); }
.stat-v { align-self: flex-start; transform: translate(calc(var(--mx, 0) * 50px), calc(var(--my, 0) * 30px)) skewX(calc(var(--mx, 0) * -24deg)) scale(calc(1 + var(--on, 0) * .12)); transition: transform .3s cubic-bezier(.2,1.4,.4,1); font-family: var(--fh); font-weight: 600; font-size: clamp(64px, 7vw, 96px); line-height: .9; letter-spacing: -0.02em; direction: ltr; font-variant-numeric: tabular-nums; }
.stat-l { font-family: var(--fh); font-weight: 600; font-size: 20px; }
.stat-n { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Contact */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-copy { display: flex; flex-direction: column; gap: 20px; }
.contact-copy .lead { max-width: 44ch; }
.contact-links { display: flex; flex-direction: column; border-top: 1px solid var(--divider); margin-top: 12px; }
.contact-links a { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--divider); color: var(--text); }
.contact-links a:hover { color: var(--accent-hi); }
.contact-links span:last-child { font-family: var(--mono); font-size: 14px; direction: ltr; }
.panel { position: relative; border: 1px solid var(--divider); background: var(--surface); padding: clamp(20px, 3vw, 36px); }

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 18px 16px; }
.form[hidden], .ok[hidden], .alert[hidden], .err[hidden] { display: none; }
.full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 13px; color: var(--muted); }
.field-label small { font-size: inherit; opacity: .7; }
.input { height: 46px; padding: 0 14px; background: var(--bg); border: 1px solid var(--divider); outline: none; text-align: start; border-radius: 0; }
.input:focus { border-color: var(--accent); }
select.input { padding: 0 12px; cursor: pointer; }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.field.invalid .input, .field.invalid .phone { border-color: var(--err); }
.phone { display: flex; height: 46px; border: 1px solid var(--divider); background: var(--bg); direction: ltr; }
.phone:focus-within { border-color: var(--accent); }
.phone span { display: grid; place-items: center; padding: 0 12px; border-right: 1px solid var(--divider); font-family: var(--mono); font-size: 14px; color: var(--muted); }
.phone input { flex: 1; min-width: 0; padding: 0 12px; background: transparent; border: 0; outline: none; font-family: var(--mono); }
.err { font-size: 12px; color: var(--err); }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); border: 1px solid var(--divider); gap: 1px; background: var(--divider); }
.seg button { height: 44px; border: 0; background: var(--bg); color: var(--text); font-family: var(--mono); font-size: 13px; direction: ltr; }
.seg button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 4px; }
.form-foot > span { font-size: 13px; color: var(--muted); }
.submit { height: 52px; padding: 0 26px; font-size: 18px; gap: 10px; }
.spinner { width: 14px; height: 14px; border: 1.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: rwSpin .7s linear infinite; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--err); background: var(--err-tint); }
.alert svg { flex: none; margin-top: 3px; }
.alert div { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.alert strong { font-weight: 600; }
.alert div span { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ok { display: flex; flex-direction: column; gap: 16px; min-height: 420px; justify-content: center; }
.ok-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--ok); color: var(--ok); }
.ok h3 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: clamp(30px, 3vw, 40px); line-height: 1.1; }
.ok p { margin: 0; color: var(--muted); max-width: 44ch; }
.ok-ref { font-family: var(--mono); font-size: 12px; color: var(--muted); direction: ltr; text-align: start; }
.ok .btn { align-self: flex-start; margin-top: 8px; height: 44px; padding: 0 18px; font-size: 16px; }

/* Footer */
.footer { padding-top: 64px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 48px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; align-items: flex-end; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.footer-brand p { margin: 0; color: var(--muted); }
.logo-xl { font-size: clamp(48px, 7vw, 96px); letter-spacing: -0.05em; line-height: .9; }
.logo-xl .logo-dot { width: .22em; height: .22em; margin: 0 .08em; margin-bottom: .12em; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; min-width: 150px; border: 1px solid var(--divider); color: var(--text); }
.social:hover { border-color: var(--accent); color: var(--text); }
.social span:first-child { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.social span:last-child { direction: ltr; text-align: start; font-size: 14px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid var(--divider); font-size: 13px; color: var(--muted); }
.footer-bottom > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer .lang-btn { height: 34px; padding: 0 12px; font-size: 12px; }

/* Cookie bar + mobile CTA */
.cookie { position: fixed; z-index: 60; inset-inline-start: 16px; bottom: 16px; max-width: min(420px, calc(100% - 32px)); padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--raise); border: 1px solid var(--divider); box-shadow: var(--shadow-pop); font-size: 14px; }
.cookie[hidden] { display: none; }
.cookie div { display: flex; gap: 8px; }
.cookie .btn { height: 38px; }
.mcta { display: none; }

/* Market */
.market-head { padding-top: clamp(56px, 7vw, 96px); padding-bottom: 32px; display: flex; flex-direction: column; gap: 16px; }
.market-head h1 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: var(--hero); line-height: var(--lh-h); letter-spacing: var(--ls-h); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { height: 38px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--divider); color: var(--muted); font-family: var(--mono); font-size: 12px; }
.chip:hover { color: var(--text); border-color: var(--mark); }
.chip[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip small { font-size: 11px; opacity: .7; }
.market-grid { padding-bottom: clamp(72px, 9vw, 120px); }
.empty { padding: 64px 0; color: var(--muted); text-align: center; border: 1px solid var(--divider); }

.back { display: inline-flex; gap: 8px; color: var(--muted); font-size: 14px; }
.back:hover { color: var(--text); }
.detail { padding-top: 32px; padding-bottom: clamp(72px, 9vw, 120px); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery-main { aspect-ratio: 4 / 3; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gallery-thumbs button { aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--divider); background: none; overflow: hidden; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--accent-hi); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.info { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 18px; }
.info h1 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: var(--h2); line-height: var(--lh-h); letter-spacing: var(--ls-h); }
.info .price { margin: 0; }
.info .price b { font-size: 56px; transform: none; }
.info-note { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.info p { margin: 0; color: var(--muted); text-wrap: pretty; }
.features { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--divider); }
.features li { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.features li::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--accent); transform: translateY(-2px); }
.features-title { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.info-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.info-actions .btn { height: 52px; font-size: 17px; padding: 0 20px; }

/* Case study */
.work-card .ph img, .case-cover .ph img { object-position: top center; }
.case-live { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 18px; border: 1px solid var(--divider); background: var(--surface); color: var(--text); font-family: var(--mono); font-size: 14px; }
.case-live:hover { border-color: var(--accent-hi); color: var(--text); }
.case-live b { margin-inline-start: auto; font-family: var(--fh); font-weight: 600; font-size: 16px; color: var(--accent-hi); }
.case-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.case-hero > .wrap { padding-top: 40px; padding-bottom: clamp(56px, 7vw, 96px); display: flex; flex-direction: column; gap: clamp(32px, 5vw, 64px); }
.case-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px; align-items: end; }
.case-intro { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.case-intro h1 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: var(--hero); line-height: var(--lh-h); letter-spacing: var(--ls-h); }
.case-intro h1 span { display: block; margin-top: .2em; font-size: .32em; line-height: 1.2; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.case-intro .lead { font-size: var(--text-lead); }
.case-cover-wrap { padding-block: clamp(32px, 4vw, 56px); }
.case-cover { position: relative; }
.case-cover .ph { height: clamp(280px, 44vw, 600px); transform: translate(calc(var(--mx, 0) * -20px), calc(var(--my, 0) * -14px)) scale(calc(1 + var(--on, 0) * .015)); transition: transform .3s ease-out; }
.case-body { padding-block: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(32px, 4vw, 56px); }
.case-block { display: flex; flex-direction: column; gap: 18px; padding-top: 24px; border-top: 1px solid var(--divider); position: relative; }
.case-block::before { content: ""; position: absolute; top: -5px; inset-inline-start: 0; width: 9px; height: 9px; background: var(--accent); }
.case-block .kicker, .legal-toc .kicker, .case-next .kicker { text-transform: var(--tt); }
.case-block .features { border-top: 0; }
.case-block p { margin: 0; font-size: 17px; text-wrap: pretty; }
.case-shots { padding-block: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; }
.case-shots .ph { aspect-ratio: 4 / 3; transform: translate(calc(var(--mx, 0) * -14px), calc(var(--my, 0) * -10px)); transition: transform .3s ease-out; }
/* Gallery images keep their own shape (screenshots, full CV pages), capped so a lone image doesn't fill the screen. */
.case-shots { justify-items: center; }
.case-shots .ph:has(img) { aspect-ratio: auto; width: 100%; max-width: 760px; }
.case-shots .ph > img { position: static; height: auto; }
.case-next { position: relative; display: flex; flex-direction: column; gap: 12px; padding-block: clamp(56px, 7vw, 96px); color: var(--text); }
.case-next:hover { color: var(--text); }
.case-next-name { font-family: var(--fh); font-weight: 600; font-size: var(--hero); line-height: var(--lh-h); letter-spacing: var(--ls-h); display: inline-flex; align-items: baseline; gap: .3em; transform: translateX(calc(var(--on, 0) * 24px)); transition: transform .45s cubic-bezier(.2,1.4,.4,1); }
[dir="rtl"] .case-next-name { transform: translateX(calc(var(--on, 0) * -24px)); }
.case-next-name b { color: var(--accent-hi); font-weight: inherit; }
.case-next-desc { color: var(--muted); max-width: 62ch; }
.band { padding-block: clamp(56px, 7vw, 96px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.band > div { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }

/* Legal */
.legal-head { padding-bottom: clamp(40px, 5vw, 64px); }
.legal-head h1 { font-size: var(--h2); }
.legal { padding-block: clamp(32px, 4vw, 56px) clamp(72px, 9vw, 120px); display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.legal-toc { position: sticky; top: 92px; display: flex; flex-direction: column; border-top: 1px solid var(--divider); }
.legal-toc .kicker { padding: 14px 0; }
.legal-toc a { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--divider); color: var(--muted); font-size: 14px; }
.legal-toc a:hover { color: var(--text); }
.legal-toc a span { font-family: var(--mono); font-size: 12px; color: var(--accent-hi); padding-top: 1px; }
.legal-toc .legal-swap { margin-top: 12px; border-top: 1px solid var(--divider); color: var(--accent-hi); font-family: var(--fh); font-weight: 600; font-size: 15px; }
.legal-body { display: flex; flex-direction: column; max-width: 72ch; }
.legal-body section { padding: 28px 0; border-top: 1px solid var(--divider); scroll-margin-top: 80px; }
.legal-body h2 { margin: 0 0 14px; display: flex; gap: 14px; align-items: baseline; font-family: var(--fh); font-weight: 600; font-size: var(--h3); line-height: 1.15; letter-spacing: var(--ls-h); }
.legal-body h2 span { font-family: var(--mono); font-size: 13px; color: var(--accent-hi); font-weight: 400; letter-spacing: 0; }
.legal-body p { margin: 0 0 12px; text-wrap: pretty; }
.legal-body p:last-child { margin-bottom: 0; }

/* ===================== Landing: Order CV band + nav button ===================== */
.nav-order { height: 38px; padding: 0 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; background: var(--text); color: var(--bg); border: 1px solid var(--text); font-family: var(--fh); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.nav-order:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: var(--bg); }
.nav-order span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
[data-lang="ar"] .nav-order { letter-spacing: 0; text-transform: none; }
.order-band { position: relative; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--divider); }
.order-band > a { position: relative; display: block; color: var(--text); }
.order-band > a:hover { color: var(--text); }
.order-glow { position: absolute; inset: 0; pointer-events: none; opacity: var(--on, 0); transition: opacity .3s; background: radial-gradient(520px circle at var(--px, 50%) var(--py, 50%), rgba(47,111,224,.35), transparent 70%); }
.order-inner { position: relative; padding-block: clamp(48px, 6vw, 88px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: clamp(40px, 6vw, 96px); align-items: center; }
.order-copy { display: flex; flex-direction: column; gap: 22px; }
.order-kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: .1em; color: var(--accent-hi); }
[data-lang="ar"] .order-kicker { letter-spacing: 0; }
.order-kicker i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 calc(4px + var(--on, 0) * 8px) rgba(47,111,224,.25); transition: box-shadow .4s; }
.order-copy h2 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: clamp(72px, 11vw, 176px); line-height: .94; letter-spacing: -0.025em; text-transform: var(--tt); }
[data-lang="ar"] .order-copy h2 { font-size: clamp(56px, 8.5vw, 132px); line-height: 1.15; letter-spacing: 0; }
.order-copy h2 span { display: block; transform: translateX(calc(var(--mx, 0) * -40px)); transition: transform .4s cubic-bezier(.2,.9,.2,1); }
.order-copy h2 span + span { color: var(--accent); transform: translateX(calc(var(--mx, 0) * 60px)) skewX(calc(var(--mx, 0) * -10deg)); }
.order-copy p { margin: 0; max-width: 44ch; color: var(--muted); font-size: clamp(16px, 1.4vw, 20px); text-wrap: pretty; }
.order-btn { align-self: flex-start; position: relative; overflow: hidden; height: 76px; padding: 0 36px; display: inline-flex; align-items: center; gap: 18px; white-space: nowrap; background: var(--accent); color: var(--on-accent); font-family: var(--fh); font-weight: 600; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: .04em; text-transform: var(--tt); box-shadow: calc(var(--on, 0) * 12px) calc(var(--on, 0) * 12px) 0 var(--text); transform: translate(calc(var(--on, 0) * -6px), calc(var(--on, 0) * -6px)); transition: transform .3s, box-shadow .3s; }
.order-btn i { position: absolute; inset: 0; background-image: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.32) 50%, transparent 62%); background-size: 250% 100%; animation: rw-shimmer 3.2s ease-in-out infinite; }
.order-btn b { position: relative; font-weight: inherit; }
.order-btn em { position: relative; font-style: normal; display: inline-block; font-size: 1.2em; transform: translateX(calc(var(--on, 0) * 10px)); transition: transform .3s; }
.order-sheets { position: relative; height: clamp(340px, 34vw, 460px); perspective: 1000px; --w: clamp(210px, 19vw, 270px); }
.order-sheet { position: absolute; top: 50%; left: 50%; width: var(--w); aspect-ratio: 1 / 1.35; margin: calc(var(--w) * -.675) 0 0 calc(var(--w) * -.5); color: #0E1114; padding: 22px 20px; display: flex; flex-direction: column; gap: 9px; box-shadow: 0 24px 60px rgba(0,0,0,.45); transition: transform .55s cubic-bezier(.2,.9,.2,1.35);
  transform: translate(calc(var(--x) * 1px + var(--on, 0) * var(--fx) * 1px + var(--mx, 0) * var(--px2) * 1px), calc(var(--y) * 1px + var(--on, 0) * var(--fy) * 1px + var(--my, 0) * var(--py2) * 1px)) rotate(calc(var(--r) * 1deg + var(--on, 0) * var(--fr) * 1deg)) rotateY(calc(var(--mx, 0) * 20deg)) rotateX(calc(var(--my, 0) * -16deg)); }
.order-sheet-0 { background: #E3EAF6; --x: -70; --y: 20; --r: -10; --fx: -130; --fy: 30; --fr: -14; --px2: -30; --py2: -20; }
.order-sheet-1 { background: #FFFFFF; --x: 0; --y: -10; --r: 2; --fx: 0; --fy: -40; --fr: -3; --px2: 20; --py2: 16; }
.order-sheet-2 { background: #C9D6EE; --x: 70; --y: 24; --r: 12; --fx: 130; --fy: 40; --fr: 16; --px2: 50; --py2: 30; }
.order-sheet > span { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: #2F6FE0; }
.order-sheet strong { font-family: var(--fh); font-weight: 600; font-size: clamp(30px, 2.8vw, 40px); line-height: 1; text-transform: var(--tt); }
.order-sheet hr { width: 100%; height: 1px; border: 0; background: #C3CAD4; margin: 4px 0; }
.order-sheet em { display: block; height: 5px; background: #D5DAE1; }
.order-sheet em:nth-of-type(2), .order-sheet em:nth-of-type(5) { width: 84%; }
.order-sheet em:nth-of-type(3), .order-sheet em:nth-of-type(6) { width: 92%; }
.order-sheet b { display: block; width: 40%; height: 7px; background: #0E1114; margin-top: 8px; }
.order-sheet small { margin-top: auto; align-self: flex-start; padding: 4px 8px; background: #0E1114; color: #EEF1F4; font-family: var(--mono); font-size: 11px; }

/* ===================== Marketplace ===================== */
.mk-nav { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--divider); }
.mk-nav-bar { height: 68px; display: flex; align-items: center; gap: 20px; }
.mk-dot { color: var(--accent); }
.mk-tag { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--muted); padding-inline-start: 16px; border-inline-start: 1px solid var(--divider); }
.mk-nav-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.mk-lang { height: 40px; }
.mk-cart-btn { position: relative; height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg); border: 1px solid var(--text); font-family: var(--fh); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: var(--tt); transition: transform .2s; }
.mk-cart-btn:hover { transform: translateY(-2px) rotate(-2deg); background: var(--accent-hi); border-color: var(--accent-hi); }
.mk-cart-count { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: 12px; }
.mk-cart-count.pop { animation: mk-pop .4s; }
@keyframes mk-pop { 0% { transform: scale(.6); opacity: 0 } 60% { transform: scale(1.15) } 100% { transform: scale(1); opacity: 1 } }
@keyframes mk-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes mk-slide { from { transform: translateX(var(--from, 100%)) } to { transform: none } }

.mk-kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; color: var(--accent-hi); }
[data-lang="ar"] .mk-kicker, [data-lang="ar"] .mk-tag { letter-spacing: 0; }
.mk-hero { border-bottom: 1px solid var(--divider); }
.mk-hero .wrap { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(32px, 4vw, 48px); display: flex; flex-direction: column; gap: 20px; }
.mk-hero h1 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: clamp(56px, 11vw, 168px); line-height: .86; letter-spacing: -0.02em; text-transform: var(--tt); text-wrap: balance; }
[data-lang="ar"] .mk-hero h1 { font-size: clamp(48px, 8.5vw, 128px); line-height: 1.15; letter-spacing: 0; }
.mk-hero h1 span { color: var(--accent); }
.mk-hero p { margin: 0; max-width: 52ch; color: var(--muted); font-size: clamp(16px, 1.4vw, 20px); text-wrap: pretty; }
.mk-shop { padding-top: 40px; padding-bottom: 120px; display: flex; flex-direction: column; gap: 32px; }
.mk-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-tabs button { height: 44px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; border: 1px solid var(--divider); background: transparent; color: var(--text); font-family: var(--fh); font-weight: 600; font-size: 16px; letter-spacing: .03em; text-transform: var(--tt); transition: transform .2s; }
.mk-tabs button:hover { transform: translateY(-3px); }
.mk-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.mk-tabs span { font-family: var(--mono); font-size: 12px; opacity: .7; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.mk-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--divider); transition: transform .35s cubic-bezier(.2,.9,.2,1.3), border-color .2s, box-shadow .35s; }
.mk-card[hidden] { display: none; }
@media (hover: hover) { .mk-card:hover { transform: translateY(-10px) rotate(-1.2deg) scale(1.02); border-color: var(--accent); box-shadow: 14px 14px 0 var(--accent); } }
.mk-badge { position: absolute; z-index: 2; top: 14px; inset-inline-end: 14px; padding: 4px 10px; background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; }
.mk-thumb { position: relative; height: 220px; overflow: hidden; border: 0; border-bottom: 1px solid var(--divider); padding: 0; display: grid; place-items: center; cursor: pointer; }
.mk-thumb-doc { background: linear-gradient(160deg, #1A2028, #0E1114); }
.mk-thumb-web { background: linear-gradient(160deg, #16243F, #0E1114); }
.mk-thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.mk-code { position: absolute; bottom: 12px; inset-inline-start: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.mk-thumb > img ~ .mk-code { padding: 2px 6px; background: rgba(14,17,20,.8); color: #EEF1F4; }
.mk-sheets { position: relative; width: 128px; height: 168px; display: block; }
.mk-sheets > i { position: absolute; inset: 0; transition: transform .45s cubic-bezier(.2,.9,.2,1.4); }
.mk-sheets > i:first-child { background: #C9D6EE; transform: rotate(-9deg) translate(-26px, 6px); }
.mk-sheets > i:nth-child(2) { background: #E3EAF6; transform: rotate(6deg) translate(22px, 4px); }
.mk-card:hover .mk-sheets > i:first-child { transform: rotate(-16deg) translate(-40px, 8px); }
.mk-card:hover .mk-sheets > i:nth-child(2) { transform: rotate(12deg) translate(36px, 4px); }
.mk-sheets > span { position: absolute; inset: 0; background: #fff; padding: 16px 14px; display: flex; flex-direction: column; gap: 7px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.mk-sheets b { display: block; width: 42%; height: 9px; background: #0E1114; }
.mk-sheets b + b { width: 70%; height: 4px; background: #2F6FE0; }
.mk-sheets hr { width: 100%; height: 1px; border: 0; background: #D5DAE1; margin: 4px 0; }
.mk-sheets em { display: block; height: 4px; background: #D5DAE1; }
.mk-sheets em:nth-of-type(2) { width: 86%; } .mk-sheets em:nth-of-type(3) { width: 92%; } .mk-sheets em:nth-of-type(5) { width: 78%; }
.mk-sheets b.mk-sub { width: 36%; height: 5px; background: #0E1114; margin-top: 6px; }
.mk-browser { width: 76%; height: 150px; display: flex; flex-direction: column; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.35); transform: perspective(600px) rotateX(10deg) rotateY(-12deg); transition: transform .45s cubic-bezier(.2,.9,.2,1.4); }
.mk-card:hover .mk-browser { transform: perspective(600px) rotateX(4deg) rotateY(-4deg) scale(1.04); }
.mk-browser > span:first-child { height: 18px; display: flex; align-items: center; gap: 4px; padding: 0 8px; background: #E3EAF6; }
.mk-browser > span:first-child i { width: 6px; height: 6px; border-radius: 50%; background: #A3ACB6; }
.mk-browser > span:last-child { flex: 1; padding: 12px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.mk-browser > span:last-child > span:first-child { display: flex; flex-direction: column; gap: 6px; }
.mk-browser > span:last-child > span:last-child { background: #C9D6EE; }
.mk-browser b { display: block; width: 80%; height: 10px; background: #0E1114; } .mk-browser b + b { width: 60%; }
.mk-browser em { display: block; width: 90%; height: 4px; background: #D5DAE1; margin-top: 4px; }
.mk-browser strong { display: block; width: 40%; height: 14px; background: #2F6FE0; margin-top: 6px; }
.mk-card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mk-meta { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--accent-hi); }
.mk-card h3 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: 26px; line-height: 1.1; text-transform: var(--tt); }
.mk-card p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; text-wrap: pretty; }
.mk-price { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 12px; }
.mk-price > span:first-child { font-size: 13px; color: var(--muted); }
.mk-price b { font-family: var(--fh); font-weight: 600; font-size: 34px; line-height: 1; direction: ltr; }
.mk-price b + span { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.mk-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.mk-btn { height: 46px; padding: 0 14px; background: transparent; border: 1px solid var(--divider); color: var(--text); font-family: var(--fh); font-weight: 600; font-size: 15px; letter-spacing: .03em; text-transform: var(--tt); transition: transform .15s, background .2s; }
.mk-btn:hover { border-color: var(--text); }
.mk-btn-accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.mk-btn-accent:hover { transform: scale(1.04); border-color: var(--accent); }
.mk-btn-accent:active { transform: scale(.94); }
.mk-btn-accent.is-added { background: oklch(0.62 0.14 155); border-color: oklch(0.62 0.14 155); }
.mk-btn-big { min-height: 56px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); font-family: var(--fh); font-weight: 600; font-size: 18px; letter-spacing: .03em; text-transform: var(--tt); transition: transform .15s; }
.mk-btn-big:hover { color: var(--on-accent); transform: scale(1.03); background: var(--accent-press); }
.mk-btn-quiet { background: transparent; color: var(--text); border-color: var(--divider); }
.mk-btn-quiet:hover { color: var(--text); background: transparent; border-color: var(--text); }
.mk-x { width: 44px; height: 44px; flex: none; background: transparent; border: 1px solid var(--divider); font-size: 20px; color: var(--text); }
.mk-x:hover { border-color: var(--text); }

/* Details modal + cart drawer */
.mk-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(5,7,9,.72); display: grid; place-items: center; padding: 20px; animation: mk-fade .2s; }
.mk-overlay[hidden] { display: none; }
.mk-modal { width: min(640px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; overflow-x: hidden; background: var(--raise); border: 1px solid var(--divider); display: flex; flex-direction: column; animation: mk-pop .35s; }
.mk-modal-head { padding: 24px; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--divider); }
.mk-modal-head > div { display: flex; flex-direction: column; gap: 6px; }
.mk-modal-head h2 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: 36px; line-height: 1; text-transform: var(--tt); }
.mk-modal-body { padding: 24px; display: flex; flex-direction: column; gap: 24px; }
.mk-modal-body > p { margin: 0; color: var(--muted); text-wrap: pretty; }
.mk-incl { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mk-incl li { display: flex; gap: 10px; }
.mk-incl li::before { content: "✓"; color: var(--accent-hi); }
.mk-group { display: flex; flex-direction: column; gap: 10px; }
.mk-group > span { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.mk-group > div { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-group button { min-height: 48px; padding: 8px 16px; text-align: start; background: transparent; color: var(--text); border: 1px solid var(--divider); display: flex; flex-direction: column; line-height: 1.3; }
.mk-group button b { font-weight: 600; }
.mk-group button small { font-size: 12px; opacity: .8; }
.mk-group button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.mk-modal-foot { position: sticky; bottom: 0; padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--divider); background: var(--raise); }
.mk-modal-price b { font-family: var(--fh); font-weight: 600; font-size: 40px; line-height: 1; direction: ltr; }
.mk-modal-price small, .mk-total small, .mk-drawer-total small { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.mk-overlay-drawer { display: block; padding: 0; background: rgba(5,7,9,.6); }
.mk-overlay-drawer[hidden] { display: none; }
.mk-drawer { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(440px, 100%); background: var(--raise); border-inline-start: 1px solid var(--divider); display: flex; flex-direction: column; animation: mk-slide .35s cubic-bezier(.2,.9,.2,1); --from: 100%; }
[dir="rtl"] .mk-drawer { --from: -100%; }
.mk-drawer-head { height: 68px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--divider); font-family: var(--fh); font-weight: 600; font-size: 24px; text-transform: var(--tt); }
.mk-drawer-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 32px; text-align: center; }
.mk-drawer-empty[hidden], .mk-drawer-full[hidden] { display: none; }
.mk-drawer-empty > span { font-family: var(--fh); font-weight: 600; font-size: 32px; text-transform: var(--tt); }
.mk-drawer-full { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.mk-drawer-lines { flex: 1; overflow: auto; }
.mk-line { padding: 16px 20px; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; border-bottom: 1px solid var(--divider); animation: mk-fade .3s; }
.mk-line b { font-weight: 600; }
.mk-line span:nth-child(2) { font-family: var(--mono); direction: ltr; }
.mk-line small { font-size: 13px; color: var(--muted); }
.mk-line button { justify-self: end; background: transparent; border: 0; padding: 0; color: var(--err); font-size: 13px; }
.mk-drawer-foot { padding: 20px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--divider); }
.mk-promo { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.mk-promo input { height: 46px; padding: 0 12px; min-width: 0; background: var(--surface); border: 1px solid var(--divider); font-family: var(--mono); text-transform: uppercase; outline: none; border-radius: 0; }
.mk-promo input:focus { border-color: var(--accent); }
.mk-promo button { height: 46px; padding: 0 16px; background: transparent; border: 1px solid var(--divider); font-family: var(--fh); font-weight: 600; text-transform: var(--tt); }
.mk-promo button:hover { border-color: var(--text); }
.mk-promo-msg { font-size: 13px; color: var(--err); }
.mk-promo-msg.ok { color: var(--ok); }
.mk-promo-msg[hidden] { display: none; }
.mk-drawer-total { display: flex; justify-content: space-between; align-items: baseline; }
.mk-drawer-total > span:first-child { color: var(--muted); }
.mk-drawer-total b { font-family: var(--fh); font-weight: 600; font-size: 32px; direction: ltr; }
.mk-drawer-foot .mk-btn-big { min-height: 60px; font-size: 21px; }
.mk-toast { position: fixed; z-index: 80; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 14px 20px; display: flex; align-items: center; gap: 14px; background: var(--text); color: var(--bg); font-weight: 600; box-shadow: 8px 8px 0 var(--accent); animation: mk-pop .35s; max-width: calc(100% - 32px); }
.mk-toast[hidden] { display: none; }
.mk-toast button { background: transparent; border: 0; padding: 0; color: var(--accent); font-family: var(--fh); font-weight: 600; text-transform: var(--tt); white-space: nowrap; }

/* Checkout */
[data-view][hidden] { display: none; }
.mk-checkout { padding-top: 40px; padding-bottom: 120px; display: flex; flex-direction: column; gap: 32px; }
.mk-back { align-self: flex-start; background: transparent; border: 0; padding: 0; color: var(--accent-hi); font-family: var(--fh); font-weight: 600; font-size: 16px; }
.mk-checkout > h1 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: clamp(48px, 7vw, 96px); line-height: .9; text-transform: var(--tt); }
[data-lang="ar"] .mk-checkout > h1 { line-height: 1.15; }
.mk-co-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.mk-co-form { display: flex; flex-direction: column; gap: 40px; }
.mk-co-form fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mk-co-form fieldset[hidden] { display: none; }
.mk-co-form h2 { margin: 0; display: flex; gap: 12px; align-items: baseline; font-family: var(--fh); font-weight: 600; font-size: 28px; text-transform: var(--tt); }
.mk-co-form h2 span { font-family: var(--mono); font-size: 14px; color: var(--accent-hi); }
.mk-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.mk-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.mk-field input, .mk-field textarea { height: 50px; padding: 0 14px; background: var(--surface); border: 1px solid var(--divider); color: var(--text); font-size: 16px; outline: none; border-radius: 0; }
.mk-field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.mk-field input:focus, .mk-field textarea:focus { border-color: var(--accent); }
.mk-field.invalid input { border-color: var(--err); }
.mk-field .err, .mk-co-form > fieldset > .err { color: var(--err); font-size: 13px; }
.mk-upload { position: relative; display: flex; align-items: center; gap: 16px; padding: 22px; border: 1px dashed var(--mark); background: var(--surface); cursor: pointer; }
.mk-upload:hover, .mk-upload:focus-within { border-color: var(--accent); background: var(--raise); }
.mk-upload.invalid { border-color: var(--err); }
.mk-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mk-upload-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 22px; }
.mk-upload > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.mk-upload b { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-upload > span:last-child > span { font-size: 13px; color: var(--muted); }
.mk-pay { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.mk-pay button { height: 64px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface); border: 1px solid var(--divider); color: var(--text); font-family: var(--fh); font-weight: 600; font-size: 18px; transition: transform .2s; }
.mk-pay button:hover { transform: translateY(-3px); }
.mk-pay button i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--divider); }
.mk-pay button[aria-checked="true"] { background: var(--raise); border-color: var(--accent); }
.mk-pay button[aria-checked="true"] i { border-color: var(--accent); background: var(--accent); }
.mk-pay-note { margin: 0; font-size: 14px; color: var(--muted); }
.mk-summary { position: sticky; top: 92px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--divider); }
.mk-summary-head { padding: 20px; border-bottom: 1px solid var(--divider); font-family: var(--fh); font-weight: 600; font-size: 22px; text-transform: var(--tt); }
.mk-sumline { padding: 14px 20px; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--divider); }
.mk-sumline > span:first-child { display: flex; flex-direction: column; }
.mk-sumline b { font-weight: 600; }
.mk-sumline small { font-size: 13px; color: var(--muted); }
.mk-sumline > span:last-child { font-family: var(--mono); direction: ltr; white-space: nowrap; }
.mk-totals { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.mk-totals > div { display: flex; justify-content: space-between; }
.mk-totals > div > span:first-child { color: var(--muted); }
.mk-totals > div > span:last-child { font-family: var(--mono); direction: ltr; }
.mk-totals .mk-discount, .mk-totals .mk-discount > span:first-child { color: var(--ok); }
.mk-totals .mk-discount[hidden] { display: none; }
.mk-total { align-items: baseline; padding-top: 12px; border-top: 1px solid var(--divider); }
.mk-totals .mk-total > span:first-child { color: var(--text); font-family: var(--fh); font-weight: 600; font-size: 20px; text-transform: var(--tt); }
.mk-totals .mk-total > span:last-child { font-family: var(--fh); }
.mk-total b { font-family: var(--fh); font-weight: 600; font-size: 36px; direction: ltr; }
.mk-pay-cta { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.mk-pay-cta > span { font-size: 12px; color: var(--muted); text-align: center; }
.mk-pay-btn { position: relative; height: 64px; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); font-family: var(--fh); font-weight: 600; font-size: 22px; letter-spacing: .04em; text-transform: var(--tt); display: flex; align-items: center; justify-content: center; gap: 12px; transition: transform .2s; }
.mk-pay-btn:hover { transform: scale(1.03); background: var(--accent-press); }
.mk-pay-btn:disabled { transform: none; opacity: .85; }
.mk-checkout .alert { margin: 0; }

/* Order confirmed */
.mk-done { max-width: 900px; margin: 0 auto; padding: clamp(64px, 10vw, 140px) clamp(20px, 4vw, 56px); display: flex; flex-direction: column; align-items: flex-start; gap: 28px; animation: mk-fade .5s; }
.mk-done-icon { width: 84px; height: 84px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 44px; animation: mk-pop .6s; }
.mk-done-icon.failed { background: var(--err); }
.mk-done-icon.pending { background: var(--surface); color: var(--accent-hi); border: 1px solid var(--divider); }
.mk-done h1 { margin: 0; font-family: var(--fh); font-weight: 600; font-size: clamp(56px, 9vw, 128px); line-height: .86; text-transform: var(--tt); }
[data-lang="ar"] .mk-done h1 { line-height: 1.15; }
.mk-done-sub { margin: 0; max-width: 50ch; color: var(--muted); font-size: 19px; }
.mk-done-sub:empty { display: none; }
.mk-next { align-self: stretch; display: flex; flex-direction: column; border-top: 1px solid var(--divider); }
.mk-next > div { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--divider); }
.mk-next > div > span:first-child { font-family: var(--mono); color: var(--accent-hi); }
.mk-receipt { align-self: stretch; background: var(--surface); border: 1px solid var(--divider); }
.mk-receipt > div { padding: 14px 20px; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--divider); }
.mk-receipt > div:last-child { border-bottom: 0; }
.mk-receipt > div > span:first-child { display: flex; flex-direction: column; }
.mk-receipt small { font-size: 13px; color: var(--muted); }
.mk-receipt > div > span:last-child { font-family: var(--mono); white-space: nowrap; }
.mk-receipt .mk-discount { color: var(--ok); }
.mk-receipt .mk-total b { font-size: 30px; }
.mk-done-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 899px) {
  .mk-co-grid { grid-template-columns: 1fr; }
  .mk-summary { position: static; }
  .mk-cart-label { display: none; }
  .mk-tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mk-card:hover { transform: none; }
}

/* Mobile: below 1000px the nav collapses (matches the prototype's container breakpoint). */
@media (max-width: 999px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: grid; }
  .work-card { grid-column: span 6 !important; }
  .work-card .ph { height: 220px !important; }
  .svc { grid-template-columns: 40px 1fr; }
  .svc p, .svc-tags { grid-column: 2; }
  .detail { grid-template-columns: 1fr; }
  .info { position: static; }
  .mcta { display: grid; position: fixed; z-index: 55; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); grid-template-columns: 1fr auto; gap: 8px; background: var(--bg); border-top: 1px solid var(--divider); }
  .mcta .btn { height: 50px; font-size: 17px; }
  .mcta .btn:last-child { padding: 0 16px; font-size: 16px; }
  body.site { padding-bottom: 76px; }
  .cookie { bottom: 88px; }
  .spec { justify-self: stretch; max-width: none; }
  .legal { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}
