/*
Theme Name: Hamlet — هاملت للحلول التسويقية
Theme URI: https://hamlet.ly/
Author: Hamlet Marketing Solutions
Description: قالب ووردبريس عربي لشركة هاملت للحلول التسويقية. سريع ومتجاوب ومتوافق مع معايير Google لتجربة الصفحة وإمكانية الوصول، مع بيانات منظمة وملف llms.txt لمحركات البحث والذكاء الاصطناعي، ونماذج استشارة وانضمام تُحفظ في لوحة التحكم.
Version: 1.1.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hamlet
Tags: rtl-language-support, one-column, custom-logo, custom-menu, featured-images, accessibility-ready, blog, translation-ready
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--ink: #141518;
	--ink-2: #1c1e22;
	--ink-3: #3a3f47;
	--muted: #4a4f57;
	--line-dark: #3a3f47;
	--paper: #f4f6f9;
	--white: #fff;
	--blue: #3f86c8;
	--blue-ink: #1a5a9a;   /* blue for text on light (AA) */
	--blue-soft: #8dbde8;  /* blue for text on dark (AA) */
	--danger: #b3261e;
	--ok: #1e7a3c;

	--f-display: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
	--f-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;

	--b: 2px solid var(--ink);
	--shadow: -8px 8px 0 var(--ink);
	--shadow-blue: -10px 10px 0 var(--blue);
	--wrap: 1240px;
	--gutter: 16px;
	--sec: 72px;
	--header-h: 68px;
}
@media (min-width: 640px) { :root { --gutter: 24px; --sec: 88px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; --sec: 112px; --header-h: 80px; } }

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
/* Keep focused/scrolled-to fields clear of the fixed mobile action bar. */
@media (max-width: 1023px) { html { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
	margin: 0;
	font-family: var(--f-body);
	font-size: 1.0625rem; /* 17px */
	line-height: 1.75;
	color: var(--ink);
	background: var(--paper);
	direction: rtl;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--blue-ink); text-underline-offset: 3px; }
a:hover { color: #0e3d6b; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.3; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.site-main:focus { outline: none; }
::selection { background: var(--blue); color: #fff; }

.sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; inset-inline-start: 16px; top: -100px; z-index: 100;
	background: var(--ink); color: #fff; padding: 12px 20px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 860px; }
.stack { display: flex; flex-direction: column; gap: 32px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
@media (min-width: 1024px) { .stack-lg { gap: 56px; } }
.plain { list-style: none; margin: 0; padding: 0; }

/* Typography */
.eyebrow { font-weight: 700; color: var(--blue-ink); font-size: .9375rem; }
.eyebrow--light { color: var(--blue-soft); }
.h2 { font-weight: 800; font-size: clamp(1.75rem, 1.1rem + 2.6vw, 2.875rem); }
.h2--md { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem); }
.h2--sm { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); }
.h3 { font-weight: 700; font-size: 1.1875rem; line-height: 1.45; }
.h3--lg { font-size: 1.375rem; }
.h3--xl { font-size: clamp(1.375rem, 1.2rem + .6vw, 1.75rem); }
.accent { color: var(--blue-ink); }
.muted { font-weight: 400; color: var(--muted); }
.req { color: var(--danger); }

/* Sections */
.sec { padding-block: var(--sec); }
.sec--tight { padding-block: calc(var(--sec) * .75) 24px; }
.sec--flush-top { padding-top: 24px; }
.sec--white { background: var(--white); border-block: var(--b); }
.sec--dark { background-color: var(--ink); color: #fff; }
.sec--dark p { color: #c9ced6; }
.sec--dark .h2, .sec--dark .h3 { color: #fff; }

.sec-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.sec-head__lead { font-size: 1.125rem; color: var(--ink-3); }
.sec-head--row { max-width: none; flex-direction: column; gap: 16px; }
.sec-head__aside { color: var(--ink-3); max-width: 440px; }
.sec-head--center { align-items: center; text-align: center; margin-inline: auto; }
@media (min-width: 1024px) {
	.sec-head--row { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 32px; }
	.sec-head--row > div { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
}
.sec-head--row > div { display: flex; flex-direction: column; gap: 12px; }

/* Patterns from the logo frame */
.hatch {
	background-color: #fff;
	background-image:
		repeating-linear-gradient(45deg, rgba(20,21,24,.55) 0 1px, transparent 1px 5px),
		repeating-linear-gradient(-45deg, rgba(20,21,24,.45) 0 1px, transparent 1px 6px);
}
.hatch-dark {
	background-image:
		repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 1px, transparent 1px 6px),
		repeating-linear-gradient(-45deg, rgba(255,255,255,.05) 0 1px, transparent 1px 7px);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; padding: 0 26px;
	font-family: var(--f-body); font-weight: 700; font-size: 1rem; line-height: 1.2;
	text-decoration: none; border: var(--b); border-radius: 0; cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
	-webkit-tap-highlight-color: transparent;
}
.btn .ico { transition: transform .25s ease; }
.btn:hover .ico-arrow { transform: translateX(-6px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { color: #fff; transform: translate(3px, -3px); box-shadow: -6px 6px 0 var(--blue); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { color: var(--ink); background: #fff; }
.btn--white { background: #fff; }
.btn--blue { background: var(--blue); color: var(--ink); border-color: #fff; }
.btn--blue:hover { color: var(--ink); transform: translate(3px, -3px); box-shadow: -6px 6px 0 #fff; }
.btn--block { width: 100%; }
.btn--lg { min-height: 58px; font-size: 1.0625rem; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row--center { justify-content: center; }
@media (max-width: 479px) { .hero .btn-row .btn { flex: 1 1 100%; } }

/* ==========================================================================
   Header & navigation
   ========================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(244,246,249,.96);
	border-bottom: var(--b);
	transition: box-shadow .2s;
}
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(244,246,249,.88); backdrop-filter: blur(10px); } }
.admin-bar .site-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(20,21,24,.08); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 48px; }
.brand:hover { color: var(--ink); }
.brand .logo-img { width: 48px; height: 48px; object-fit: contain; }
@media (min-width: 1024px) { .brand .logo-img { width: 52px; height: 52px; } }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--f-display); font-weight: 900; font-size: 1.375rem; }
.brand__tag { font-size: .75rem; font-weight: 500; color: var(--muted); }
.brand--light { color: #fff; }
.brand--light:hover { color: #fff; }
.brand__logo-bg { background: #fff; display: inline-flex; padding: 2px; }

.nav-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; padding: 0; background: #fff; border: var(--b); cursor: pointer;
}
.nav-toggle__close { display: none; }
.nav-open .nav-toggle__open { display: none; }
.nav-open .nav-toggle__close { display: inline-flex; }

.site-nav {
	position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
	display: flex; flex-direction: column; gap: 20px;
	padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
	background: var(--paper); border-top: var(--b);
	overflow-y: auto; overscroll-behavior: contain;
	visibility: hidden; opacity: 0; transform: translateY(-8px);
	transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.admin-bar .site-nav { top: calc(var(--header-h) + 46px); }
.nav-open .site-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
.nav-open body { overflow: hidden; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.site-nav .menu a {
	display: flex; align-items: center; min-height: 56px; padding-inline: 4px;
	font-family: var(--f-display); font-weight: 700; font-size: 1.25rem;
	color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(20,21,24,.15);
}
.site-nav .menu a:hover, .site-nav .menu .current-menu-item > a { color: var(--blue-ink); }
.site-nav__cta { width: 100%; }

@media (min-width: 1024px) {
	.nav-toggle { display: none; }
	.site-nav {
		position: static; inset: auto; flex-direction: row; align-items: center; gap: 28px;
		padding: 0; background: none; border: 0; overflow: visible;
		visibility: visible; opacity: 1; transform: none; transition: none;
	}
	.site-nav .menu { flex-direction: row; gap: 22px; }
	.site-nav .menu a {
		position: relative; min-height: 48px; font-family: var(--f-body); font-weight: 500; font-size: .9375rem; border: 0;
	}
	.site-nav .menu a::after {
		content: ""; position: absolute; inset-inline: 4px; bottom: 8px; height: 2px; background: var(--blue);
		transform: scaleX(0); transform-origin: right; transition: transform .3s;
	}
	.site-nav .menu a:hover::after { transform: scaleX(1); }
	.site-nav__cta { width: auto; min-height: 46px; padding: 0 20px; font-size: .9375rem; }
	.nav-open body { overflow: auto; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: 48px 72px; }
@media (min-width: 1024px) { .hero { padding-block: 96px 96px; } }
.hero__grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; } }
.hero__copy { display: flex; flex-direction: column; gap: 22px; }
.hero__title { display: flex; flex-direction: column; gap: 10px; }
.hero__kicker { font-family: var(--f-body); font-weight: 700; font-size: clamp(1rem, .9rem + .5vw, 1.25rem); color: var(--blue-ink); }
.hero__main { font-weight: 900; font-size: clamp(2.125rem, 1.1rem + 4.4vw, 4rem); line-height: 1.25; }
.hero__lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--ink-3); max-width: 600px; }
.badge {
	align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
	border: var(--b); background: #fff; padding: 6px 14px; font-weight: 600; font-size: .875rem;
}
.badge__dot { width: 10px; height: 10px; background: var(--blue); border: var(--b); }
.mark {
	padding: 0 10px; color: #fff;
	background: linear-gradient(var(--blue), var(--blue)) right / 100% 100% no-repeat;
	-webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .9375rem; font-weight: 500; color: var(--ink-3); }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks .ico, .checklist .ico { color: var(--blue-ink); flex: none; stroke-width: 2.6; }

.hero__art { display: flex; justify-content: center; padding-inline: 18px; }
.frame { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1 / 1; border: var(--b); padding: 18px; }
.frame--sm { max-width: 380px; }
.frame__inner { width: 100%; height: 100%; background: var(--blue); border: var(--b); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.frame__inner img { width: 100%; height: 100%; object-fit: contain; transform-origin: center; }
.float-card {
	position: absolute; bottom: -24px; right: -14px;
	display: flex; align-items: center; gap: 12px; padding: 12px 18px;
	background: #fff; border: var(--b); box-shadow: -6px 6px 0 var(--ink);
}
.float-card .ico { color: var(--blue-ink); }
.float-card span { display: flex; flex-direction: column; line-height: 1.3; }
.float-card strong { font-family: var(--f-display); font-size: 1rem; }
.float-card small { font-size: .8125rem; color: var(--muted); }
.float-tag {
	position: absolute; top: -18px; left: -12px;
	background: var(--ink); color: #fff; padding: 8px 14px;
	font-family: var(--f-display); font-weight: 700; font-size: .875rem; transform: rotate(-4deg);
}
.float-tag--dark { top: auto; left: auto; bottom: -22px; right: -14px; transform: none; box-shadow: -6px 6px 0 var(--blue); font-size: 1rem; padding: 12px 18px; }

/* Marquee */
.marquee { background: var(--ink); color: #fff; border-block: var(--b); padding: 16px 0; overflow: hidden; }
.marquee__track {
	display: flex; gap: 40px; width: max-content; white-space: nowrap;
	font-family: var(--f-display); font-weight: 700; font-size: 1.125rem;
	animation: marquee 40s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__star { color: var(--blue-soft); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ==========================================================================
   Cards & grids
   ========================================================================== */
.grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
	.grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
	.grid { gap: 24px; }
	.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.card { background: #fff; border: var(--b); transition: transform .18s ease, box-shadow .18s ease; }
@media (hover: hover) { .card:hover { transform: translate(3px, -3px); box-shadow: var(--shadow); } }
.card--pad { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 1024px) { .card--pad { padding: 32px; } }
.card p { color: var(--ink-3); }
.card--dark { background: var(--ink); color: #fff; }
.card--dark p { color: #d5d9e0; }
.card--dark .h3 { color: #fff; }
.card--dark .icon-box { border-color: #fff; }
.card--dark .tags span { border-color: #fff; }
.card--dark .num { -webkit-text-stroke-color: #fff; }
.card--dark .checklist { border-top-color: var(--line-dark); }
.card--dark .checklist .ico { color: var(--blue-soft); }
.card__top { display: flex; align-items: center; justify-content: space-between; }
.num { font-family: var(--f-display); font-weight: 900; font-size: 2rem; line-height: 1; color: var(--blue); -webkit-text-stroke: 1.5px var(--ink); }
.icon-box { width: 58px; height: 58px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--blue); border: var(--b); color: var(--ink); }
.icon-box--lg { width: 64px; height: 64px; }
.icon-box .ico { transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
@media (hover: hover) { .card:hover .icon-box .ico { transform: rotate(-10deg) scale(1.15); } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; font-size: .8125rem; font-weight: 600; margin-top: auto; }
.tags span { border: 1.5px solid var(--ink); padding: 2px 10px; }
.checklist { list-style: none; margin: 0; padding: 16px 0 0; border-top: var(--b); display: flex; flex-direction: column; gap: 10px; font-size: .9375rem; font-weight: 500; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; }
.checklist li .ico { margin-top: 5px; }
.cta-box__card .checklist, .apply__prep .checklist { border-top: 0; padding-top: 0; }

/* Clients: the grid adapts to however many logos are uploaded. */
.logos {
	list-style: none; margin: 0; padding: 0; display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	border-top: var(--b); border-right: var(--b);
}
@media (min-width: 1024px) { .logos { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.logos__cell { height: 120px; display: flex; align-items: center; justify-content: center; padding: 22px; background: #fff; border-left: var(--b); border-bottom: var(--b); }
.logos__cell img { max-height: 64px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .25s, opacity .25s; }
.logos__cell:hover img { filter: none; opacity: 1; }

/* About */
.about { display: grid; gap: 24px; }
@media (min-width: 1024px) { .about { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; } }
.about__head { display: flex; flex-direction: column; gap: 12px; }
.about__body { display: flex; flex-direction: column; gap: 16px; color: var(--ink-3); font-size: 1.0625rem; border-inline-start: 4px solid var(--blue); padding-inline-start: 24px; }
.about__lead { font-size: 1.25rem; color: var(--ink); line-height: 1.7; }

/* Stats */
.stats { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: var(--b); background: #fff; }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats__item { padding: 22px; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; border-left: var(--b); border-bottom: var(--b); }
.stats__item:nth-child(2n) { border-left: 0; }
@media (min-width: 1024px) {
	.stats__item { padding: 28px; border-bottom: 0; }
	.stats__item:nth-child(2n) { border-left: var(--b); }
	.stats__item:last-child { border-left: 0; }
}
@media (max-width: 1023px) { .stats__item:nth-last-child(-n+2) { border-bottom: 0; } }
.stats dt { font-size: .9375rem; color: var(--ink-3); font-weight: 500; }
.stats dd { margin: 0; font-family: var(--f-display); font-weight: 900; font-size: clamp(2rem, 1.6rem + 1.2vw, 2.75rem); line-height: 1.15; }
.stats__item--blue { background: var(--blue); }
.stats__item--blue dt { color: var(--ink); font-weight: 600; }
.stats__item--blue dd { font-size: clamp(1.5rem, 1.3rem + .6vw, 1.875rem); }

/* Sectors */
.sectors { display: flex; flex-direction: column; gap: 14px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; font-weight: 600; font-size: .9375rem; }
.chips li { background: #fff; padding: 9px 16px; border: var(--b); }
.chips li.is-dark { background: var(--ink); color: #fff; }

/* Steps */
.steps { display: grid; grid-template-columns: minmax(0, 1fr); border: var(--b); background: #fff; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps__item { padding: 28px; display: flex; flex-direction: column; gap: 12px; border-bottom: var(--b); }
.steps__item p { color: var(--ink-3); font-size: .9375rem; }
.steps__item:last-child { background: var(--blue); border-bottom: 0; }
.steps__item:last-child p { color: var(--ink); }
.steps__num { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-family: var(--f-display); font-weight: 800; font-size: 1.375rem; }
.steps__item:last-child .steps__num { background: #fff; color: var(--ink); border: var(--b); }
@media (min-width: 640px) and (max-width: 1023px) {
	.steps__item:nth-child(odd) { border-left: var(--b); }
	.steps__item:nth-child(3) { border-bottom: 0; }
}
@media (min-width: 1024px) {
	.steps__item { border-bottom: 0; border-left: var(--b); }
	.steps__item:last-child { border-left: 0; }
}

/* Why */
.why { display: grid; gap: 40px; }
@media (min-width: 1024px) { .why { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 64px; align-items: start; } .why__head { position: sticky; top: calc(var(--header-h) + 40px); } }
.why__head { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.why__head p { font-size: 1.125rem; }
.dark-card { border: 2px solid var(--line-dark); background: var(--ink-2); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.dark-card .ico { color: var(--blue-soft); }
.dark-card p { font-size: .9375rem; }
.dark-card__num { font-family: var(--f-display); font-weight: 900; font-size: 2rem; color: var(--blue-soft); line-height: 1; }

/* ==========================================================================
   Forms
   ========================================================================== */
.cta-box { display: grid; border: var(--b); background: #fff; box-shadow: var(--shadow-blue); }
@media (min-width: 1024px) { .cta-box { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }
.cta-box__side { padding: 20px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; border-bottom: var(--b); }
@media (min-width: 640px) { .cta-box__side { padding: 40px; } }
@media (min-width: 1024px) { .cta-box__side { border-bottom: 0; border-left: var(--b); padding: 48px; } }
.cta-box__card { background: #fff; border: var(--b); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 640px) { .cta-box__card { padding: 32px; } }
.cta-box__card > p { color: var(--ink-3); }
.cta-box__form { padding: 24px; }
@media (min-width: 640px) { .cta-box__form { padding: 40px; } }
@media (min-width: 1024px) { .cta-box__form { padding: 48px; } }
.pill, .cta-box__card > .pill { align-self: flex-start; background: var(--blue); color: var(--ink); border: var(--b); padding: 3px 14px; font-weight: 700; font-size: .875rem; }

.form { display: flex; flex-direction: column; gap: 20px; }
.form__row { display: grid; gap: 20px; }
@media (min-width: 640px) { .form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form__note { font-size: .8125rem; color: var(--muted); text-align: center; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .choice__legend { font-weight: 600; font-size: .9375rem; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, .search-form input {
	width: 100%; min-height: 52px; padding: 12px 14px;
	font-size: 1rem; /* 16px+ prevents iOS zoom */
	background: #fff; color: var(--ink); border: var(--b); border-radius: 0;
	-webkit-appearance: none; appearance: none;
}
.field select {
	background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
	background-position: 18px 22px, 24px 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-left: 40px;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.field input[dir=ltr] { text-align: right; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid { border-color: var(--danger); }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.notice-error { border: 2px solid var(--danger); background: #fdecea; color: #7a1712; padding: 14px 16px; font-weight: 600; }

.success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 32px 8px; animation: pop .5s cubic-bezier(.3,1.4,.5,1) both; }
.success:focus { outline: none; }
.success p { color: var(--ink-3); max-width: 440px; }
.success__icon { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; background: var(--blue); border: var(--b); box-shadow: -6px 6px 0 var(--ink); }

/* Join form */
.apply { display: grid; gap: 40px; }
@media (min-width: 1024px) { .apply { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 48px; align-items: start; } .apply__side { position: sticky; top: calc(var(--header-h) + 32px); } }
.apply__side { display: flex; flex-direction: column; gap: 18px; }
.apply__side > p { color: var(--ink-3); font-size: 1.0625rem; }
.apply__prep { border: var(--b); padding: 14px; }
.apply__prep > div { background: #fff; border: var(--b); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.apply__box { border: var(--b); background: #fff; box-shadow: var(--shadow-blue); padding: 24px; }
@media (min-width: 640px) { .apply__box { padding: 44px; } }
.form--join { gap: 28px; }
.form--join > fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.form--join > fieldset + fieldset { border-top: var(--b); padding-top: 26px; }
.form--join > fieldset > legend { float: right; width: 100%; font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; padding: 0; margin-bottom: 18px; }
.form--join > fieldset > legend + * { clear: both; }
.choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice__legend { padding: 0; margin-bottom: 10px; }
.choice__list { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-input { position: relative; cursor: pointer; }
.chip-input input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip-input span {
	display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px;
	border: var(--b); background: #fff; font-weight: 600; font-size: .9375rem;
	transition: background-color .15s, color .15s, transform .15s;
}
.chip-input:hover span { transform: translateY(-2px); }
.chip-input input:checked + span { background: var(--ink); color: #fff; }
.chip-input--blue input:checked + span { background: var(--blue); color: var(--ink); }
.chip-input input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.upload { display: flex !important; align-items: center; gap: 16px; padding: 18px; border: 2px dashed var(--ink); background: var(--paper); cursor: pointer; }
.upload:hover { background: #eaf2fa; }
.upload__text { display: flex; flex-direction: column; line-height: 1.5; font-weight: 400; }
.upload__name { font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.upload__name.is-error { color: var(--danger); font-weight: 600; }
.upload__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upload__input:focus-visible ~ .upload, .field:focus-within .upload { outline: 3px solid var(--blue); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; color: var(--ink-3); cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--ink); flex: none; }

.hire-steps { display: grid; grid-template-columns: minmax(0, 1fr); border: 2px solid #fff; }
@media (min-width: 640px) { .hire-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hire-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hire-steps li { padding: 18px 22px; display: flex; align-items: center; gap: 14px; font-weight: 600; border-bottom: 2px solid var(--line-dark); }
.hire-steps li:last-child { background: var(--blue); color: var(--ink); border-bottom: 0; }
.hire-steps span { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--blue); color: var(--ink); font-family: var(--f-display); font-weight: 800; }
.hire-steps li:last-child span { background: var(--ink); color: #fff; }
@media (min-width: 1024px) { .hire-steps li { border-bottom: 0; border-left: 2px solid var(--line-dark); } .hire-steps li:last-child { border-left: 0; } }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item { border: var(--b); background: #fff; }
.faq__item summary {
	list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 18px 20px; min-height: 64px;
}
@media (min-width: 640px) { .faq__item summary { padding: 22px 28px; } }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.faq__q { font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); font-weight: 700; }
.faq__sign { flex: none; position: relative; width: 36px; height: 36px; background: var(--blue); border: var(--b); transition: background-color .2s; }
.faq__sign::before, .faq__sign::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 14px; height: 2px; background: var(--ink); transform: translate(-50%, -50%); transition: transform .25s, background-color .2s; }
.faq__sign::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] .faq__sign { background: var(--ink); }
.faq__item[open] .faq__sign::before, .faq__item[open] .faq__sign::after { background: #fff; }
.faq__item[open] .faq__sign::after { transform: translate(-50%, -50%) rotate(0); }
.faq__item p { padding: 0 20px 22px; color: var(--ink-3); }
@media (min-width: 640px) { .faq__item p { padding: 0 28px 24px; } }

/* Final CTA */
.final-cta { background: var(--blue); border-block: var(--b); }
.final-cta__in { padding-block: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.final-cta__title { font-family: var(--f-display); font-weight: 900; font-size: clamp(1.625rem, 1.1rem + 2vw, 2.625rem); line-height: 1.35; max-width: 760px; color: var(--ink); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: #c9ced6; padding-bottom: 72px; }
@media (min-width: 1024px) { .site-footer { padding-bottom: 0; } }
.site-footer a { color: #c9ced6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__grid { padding-block: 56px 36px; display: grid; gap: 36px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; } }
.site-footer__about { display: flex; flex-direction: column; gap: 14px; }
.site-footer__about p { max-width: 340px; font-size: .9375rem; }
.site-footer__title { font-size: 1rem; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.site-footer__col a, .site-footer__col li { display: inline-flex; min-height: 36px; align-items: center; }
.site-footer address { font-style: normal; }
.socials { flex-direction: row !important; flex-wrap: wrap; gap: 8px 16px !important; }
.socials a { min-height: 44px; display: inline-flex; align-items: center; }
.site-footer__bottom { border-top: 1px solid var(--line-dark); padding-block: 10px; font-size: .8125rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.site-footer__bottom a { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 8px; }

/* Mobile action bar (WhatsApp / call) */
.action-bar {
	position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
	display: flex; gap: 0; background: var(--ink); border-top: 2px solid var(--ink);
	padding-bottom: env(safe-area-inset-bottom);
}
.action-bar__btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; color: #fff; font-weight: 700; text-decoration: none; }
.action-bar__btn:hover { color: #fff; }
.action-bar__btn--wa { background: var(--blue); color: var(--ink); }
.action-bar__btn--wa:hover { color: var(--ink); }
@media (min-width: 1024px) { .action-bar { display: none; } }
.nav-open .action-bar { display: none; }

/* ==========================================================================
   Blog & inner pages
   ========================================================================== */
.crumbs { font-size: .875rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.page-hero { padding-block: 48px 32px; }
@media (min-width: 1024px) { .page-hero { padding-block: 72px 40px; } }
.page-hero .wrap { display: flex; flex-direction: column; gap: 14px; }
.page-hero__title { font-weight: 900; font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem); }
.page-hero__lead { font-size: 1.125rem; color: var(--ink-3); max-width: 720px; }
.post-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-card { display: flex; flex-direction: column; }
.post-card__img { display: block; border-bottom: var(--b); aspect-ratio: 16 / 9; overflow: hidden; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__meta { font-size: .875rem; color: var(--muted); }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a:hover { color: var(--blue-ink); }
.post-card__more { margin-top: auto; font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: var(--b); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; }
.pagination .page-numbers.current { background: var(--ink); color: #fff; }
.empty { align-items: flex-start; }
.search-form { display: flex; gap: 8px; width: 100%; max-width: 520px; }
.search-form .btn { flex: none; }

.entry-content { font-size: 1.125rem; line-height: 1.9; padding-bottom: 40px; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-top: 1.8em; }
.entry-content h3 { font-size: 1.375rem; margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4em; }
.entry-content li + li { margin-top: .4em; }
.entry-content blockquote { margin: 1.5em 0; padding: 16px 24px; border-inline-start: 4px solid var(--blue); background: #fff; font-weight: 500; }
.entry-content img { border: var(--b); }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--ink); padding: 10px 12px; text-align: start; }
.entry-content .alignwide { max-width: 1100px; margin-inline: auto; }
.entry-content .alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .875rem; color: var(--muted); margin-top: 8px; }
.article__img { margin-bottom: 32px; }
.article__img img { width: 100%; border: var(--b); }
.article__cta { padding-bottom: 56px; }
.cta-inline { border: var(--b); background: #fff; box-shadow: var(--shadow-blue); padding: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.comments { padding-bottom: 56px; }
.comment-list { padding: 0; list-style: none; }
.comment-form input:not([type=checkbox]):not([type=submit]), .comment-form textarea { width: 100%; border: var(--b); padding: 12px; min-height: 48px; }
.comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; }
.comment-form-cookies-consent input { width: 20px; height: 20px; margin-top: 4px; }
.notfound { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.notfound__code { font-family: var(--f-display); font-weight: 900; font-size: clamp(5rem, 3rem + 8vw, 9rem); line-height: 1; color: var(--blue); -webkit-text-stroke: 3px var(--ink); }

/* ==========================================================================
   Motion (respects prefers-reduced-motion)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
	@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
	.rise { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
	.d1 { animation-delay: .05s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .32s; } .d4 { animation-delay: .46s; } .d5 { animation-delay: .6s; }

	.mark { animation: mark .9s .9s cubic-bezier(.7,0,.2,1) both; }
	@keyframes mark { from { background-size: 0% 100%; color: var(--ink); } to { background-size: 100% 100%; color: #fff; } }

	.pulse { animation: pulse 1.8s ease-out infinite; }
	@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63,134,200,.7); } 100% { box-shadow: 0 0 0 12px rgba(63,134,200,0); } }

	.frame-in { animation: frame 1s .2s cubic-bezier(.2,.7,.2,1) both; }
	@keyframes frame { from { opacity: 0; transform: rotate(-6deg) scale(.9); } to { opacity: 1; transform: none; } }

	.cat-float { animation: float 5s ease-in-out infinite; }
	@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(-1.5deg); } }

	.bob { animation: bob 4s ease-in-out 1.2s infinite; }
	@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
	.bob2 { animation: bob2 4.6s ease-in-out infinite; }
	@keyframes bob2 { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-7px); } }

	@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

	.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1), box-shadow .18s ease; }
	.js .reveal.is-in { opacity: 1; transform: none; }
	@media (hover: hover) { .js .card.reveal.is-in:hover { transform: translate(3px, -3px); } }
}
@media (prefers-reduced-motion: reduce) {
	.marquee__track { animation: none; }
	*, *::before, *::after { transition-duration: .01ms !important; }
}

/* Print */
@media print {
	.site-header, .action-bar, .marquee, .site-footer, .hero__art, .cta-box__form { display: none !important; }
	body { background: #fff; }
}

/* ==========================================================================
   Portfolio (أعمالنا)
   ========================================================================== */
.works { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.work { display: flex; }
.work[hidden] { display: none; }
.work__link { display: flex; flex-direction: column; width: 100%; color: var(--ink); text-decoration: none; }
.work__link:hover { color: var(--ink); }
.work__img { display: block; aspect-ratio: 10 / 7; overflow: hidden; border-bottom: var(--b); background: var(--blue); }
.work__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) { .work:hover .work__img img { transform: scale(1.05); } }
.work__noimg { display: block; width: 100%; height: 100%; }
.work__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.work__type { font-size: .8125rem; font-weight: 700; color: var(--blue-ink); }
.work__title { font-family: var(--f-display); font-weight: 700; font-size: 1.25rem; line-height: 1.4; }
.work__client { font-size: .9375rem; color: var(--muted); }
.work__result { margin-top: auto; padding-top: 12px; border-top: var(--b); display: flex; gap: 8px; align-items: flex-start; font-weight: 600; font-size: .9375rem; }
.work__result .ico { color: var(--blue-ink); flex: none; margin-top: 4px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filters__btn {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
	border: var(--b); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: .9375rem;
	text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s;
}
.filters__btn:hover { color: var(--ink); background: #eaf2fa; }
.filters__btn[aria-pressed="true"], .filters__btn[aria-current="page"] { background: var(--ink); color: #fff; }

.case__grid { display: grid; gap: 32px; padding-bottom: 24px; }
@media (min-width: 1024px) { .case__grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; } .case__side { position: sticky; top: calc(var(--header-h) + 24px); } }
.case__img { margin-bottom: 32px; }
.case__img img { width: 100%; border: var(--b); }
.case__side { display: flex; flex-direction: column; gap: 16px; }
.case__result { background: var(--blue); border: var(--b); box-shadow: var(--shadow); padding: 22px; }
.case__result-label { font-weight: 700; font-size: .875rem; }
.case__result p { font-family: var(--f-display); font-weight: 800; font-size: 1.375rem; line-height: 1.4; }
.case__facts { margin: 0; border: var(--b); background: #fff; }
.case__facts div { padding: 14px 18px; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(20,21,24,.2); }
.case__facts div:last-child { border-bottom: 0; }
.case__facts dt { color: var(--muted); }
.case__facts dd { margin: 0; font-weight: 600; text-align: left; }

/* Admin-only hints for empty sections */
.admin-hint { border: 2px dashed var(--blue-ink); background: #eaf2fa; padding: 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.admin-hint p { max-width: 720px; }
.logos--empty .logos__cell { color: #6b717a; font-weight: 600; font-size: .875rem; }
