/* =========================================================================
   WTL TECH — main.css
   Design system + shell. Section components follow in clearly marked blocks.
   Palette: deep navy canvas, teal→cyan brand, one Saudi-green accent reserved
   exclusively for the Vision 2030 band. Type: Space Grotesk (Latin display),
   IBM Plex Sans Arabic (body + Arabic), IBM Plex Mono (technical labels).
   ========================================================================= */

:root {
	--ink: #06182F;
	--ink-2: #081F3A;
	--navy: #0A2440;
	--navy-2: #0E2E52;
	--navy-3: #143a63;
	--teal: #1E6E8C;
	--cyan: #2BB1DE;
	--cyan-2: #5FD6F2;
	--paper: #F4F8FB;
	--paper-2: #E7EEF5;
	--surface: #0d2a4a;

	--text: #EAF2F9;
	--muted: #9DB4CB;
	--muted-2: #728AA1;
	--ink-text: #0C2338;
	--ink-muted: #56708A;

	--green: #2AA579;            /* Vision 2030 accent — used only there */
	--line: rgba(255, 255, 255, .10);
	--line-2: rgba(255, 255, 255, .06);
	--line-ink: rgba(12, 35, 56, .12);

	--font-display: 'Space Grotesk', 'IBM Plex Sans Arabic', system-ui, sans-serif;
	--font-body: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
	--font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

	--wrap: 1200px;
	--gutter: clamp(20px, 4.5vw, 48px);
	--r-sm: 10px;
	--r: 16px;
	--r-lg: 24px;
	--shadow: 0 24px 60px -24px rgba(2, 10, 22, .65);
	--shadow-cyan: 0 18px 44px -18px rgba(43, 177, 222, .55);
	--ease: cubic-bezier(.22, .61, .36, 1);
	--ease-out: cubic-bezier(.16, 1, .3, 1);
}

body.lang-ar {
	--font-display: 'IBM Plex Sans Arabic', system-ui, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* Defensive: some hosts (GoDaddy Managed WP, some builders) inject a max-width
   on html/body/#page. Force full-width so the theme's own layout controls it. */
html, body { max-width: none !important; width: 100%; margin: 0 !important; padding: 0 !important; background: var(--ink); }
#page, .site, .wp-site-blocks { max-width: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Anchor targets (#vendors, #contact…) land below the sticky header, not under it. */
html { scroll-padding-top: 130px; }
@media (max-width: 900px) { html { scroll-padding-top: 80px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	font-family: var(--font-body);
	background: var(--ink);
	color: var(--text);
	line-height: 1.65;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }

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

.skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 200;
	background: var(--cyan); color: var(--ink); padding: 10px 16px; border-radius: 8px;
	font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.wtl-icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; }
.lang-ar h1, .lang-ar h2, .lang-ar h3, .lang-ar h4 { line-height: 1.3; letter-spacing: 0; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.site-main { display: block; overflow-x: hidden; overflow-x: clip; }

/* ---------- Cross-document page transitions (View Transitions API) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: wtl-page-out 260ms cubic-bezier(.22, .61, .36, 1) both; }
::view-transition-new(root) { animation: wtl-page-in  420ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes wtl-page-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes wtl-page-in  { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
	::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

.section { position: relative; padding-block: clamp(64px, 9vw, 122px); }
.section--tight { padding-block: clamp(44px, 6vw, 72px); }
.section--paper { background: var(--paper); color: var(--ink-text); }
.section--paper .section-lead { color: var(--ink-muted); }

/* soft ambient glow for dark sections */
.section--glow::before {
	content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
	background:
		radial-gradient(60% 55% at 82% 8%, rgba(43, 177, 222, .12), transparent 60%),
		radial-gradient(50% 50% at 12% 92%, rgba(30, 110, 140, .14), transparent 60%);
}
.section > .wrap { position: relative; z-index: 1; }

/* ---------- Section head + eyebrow ---------- */
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

.eyebrow {
	display: inline-flex; align-items: center; gap: 9px;
	font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
	letter-spacing: .18em; text-transform: uppercase; color: var(--cyan);
	margin-bottom: 18px;
}
.lang-ar .eyebrow { letter-spacing: .04em; font-family: var(--font-mono); }
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(43, 177, 222, .18); }
.section--paper .eyebrow { color: var(--teal); }
.section--paper .eyebrow__dot { background: var(--teal); box-shadow: 0 0 0 4px rgba(30, 110, 140, .16); }

.section-title { font-size: clamp(28px, 4.4vw, 46px); }
.section-lead { margin-top: 16px; font-size: clamp(16px, 1.6vw, 18.5px); color: var(--muted); line-height: 1.7; }
.section--paper .section-title { color: var(--ink-text); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	font-weight: 600; font-size: 15px; line-height: 1;
	padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
	transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .2s var(--ease);
	white-space: nowrap;
}
.btn .wtl-icon { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn--primary { background: linear-gradient(120deg, var(--cyan), var(--teal)); color: #04121f; box-shadow: var(--shadow-cyan); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 22px 50px -16px rgba(43, 177, 222, .7); }
.btn--primary:hover .wtl-icon { transform: translateX(4px); }
.lang-ar .btn--primary:hover .wtl-icon { transform: translateX(-4px); }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, .02); }
.btn--ghost:hover { border-color: rgba(95, 214, 242, .5); background: rgba(43, 177, 222, .08); transform: translateY(-2px); }
.section--paper .btn--ghost { border-color: var(--line-ink); color: var(--ink-text); }
.section--paper .btn--ghost:hover { border-color: var(--teal); background: rgba(30, 110, 140, .06); }
.btn--sm { padding: 11px 18px; font-size: 14px; }
.btn--lg { padding: 17px 30px; font-size: 16px; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
/* z-index must stay ABOVE .drawer-backdrop (140): the drawer lives inside this
   sticky header's stacking context, while the backdrop is appended to <body>.
   With a lower value the backdrop paints over the drawer — links look dimmed
   and taps hit the backdrop instead of the menu. */
.site-header { position: sticky; top: 0; z-index: 150; }

.topbar {
	background: rgba(4, 16, 33, .92);
	border-bottom: 1px solid var(--line-2);
	font-family: var(--font-mono); font-size: 12.5px;
}
.topbar__in { display: flex; align-items: center; gap: 24px; min-height: 40px; }
.topbar__link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); transition: color .2s var(--ease); }
.topbar__link .wtl-icon { width: 14px; height: 14px; color: var(--cyan); }
.topbar__link:hover { color: var(--text); }
.topbar__spacer { flex: 1; }
.lang-switch { display: inline-flex; align-items: center; gap: 8px; letter-spacing: .04em; }
.lang-switch a { color: var(--muted-2); padding: 3px 4px; transition: color .2s var(--ease); }
.lang-switch a.is-active { color: var(--cyan); font-weight: 500; }
.lang-switch a:hover { color: var(--text); }

.nav {
	background: rgba(9, 32, 58, .72);
	backdrop-filter: blur(16px) saturate(140%);
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	border-bottom: 1px solid var(--line);
	transition: background .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-scrolled .nav { background: rgba(6, 20, 40, .92); }
.nav__in { display: flex; align-items: center; gap: 20px; min-height: 74px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 42px; height: 42px; object-fit: contain; }
.brand__word { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--font-display); line-height: 1; }
.brand__word b { font-weight: 700; font-size: 20px; letter-spacing: .01em; color: #fff; }
.brand__word span { font-weight: 500; font-size: 13px; letter-spacing: .34em; color: var(--cyan); }
.custom-logo { max-height: 46px; width: auto; }

.nav__menu { display: flex; align-items: center; gap: 3px; margin-inline: auto; }
.nav__link { position: relative; padding: 9px 13px; font-size: 14.5px; color: var(--muted); border-radius: 8px; transition: color .2s var(--ease); }
.nav__link:hover { color: var(--text); }
.nav__link.is-active { color: var(--cyan); }
.nav__link::after {
	content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 2px;
	background: var(--cyan); border-radius: 2px;
	transform: scaleX(0); transform-origin: center; transition: transform .3s var(--ease-out);
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__actions { display: inline-flex; align-items: center; gap: 12px; }

.nav__toggle { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); align-items: center; justify-content: center; color: var(--text); }
.nav__toggle .wtl-icon { width: 22px; height: 22px; }
.nav__toggle .i-close { display: none; }

/* mobile drawer */
.drawer { display: none; }

/* ---------- Reveal animations ---------- */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); will-change: opacity, transform; }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
[data-reveal-stagger].is-visible > * { opacity: 1; transform: none; }
[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: .05s; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: .12s; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: .19s; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: .26s; }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: .33s; }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: .40s; }
[data-reveal-stagger].is-visible > *:nth-child(7) { transition-delay: .47s; }
[data-reveal-stagger].is-visible > *:nth-child(8) { transition-delay: .54s; }

@media (prefers-reduced-motion: reduce) {
	[data-reveal], [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; transition: none !important; }
	.drawer__lang, .drawer__link, .drawer__foot { opacity: 1 !important; transform: none !important; transition: none !important; }
	.nav__link::after { transition: none !important; }
}

/* ---------- Prose (generic pages) ---------- */
.prose { max-width: 760px; color: var(--muted); line-height: 1.8; }
.prose h2 { color: var(--text); margin: 1.6em 0 .5em; font-size: 26px; }
.prose h3 { color: var(--text); margin: 1.3em 0 .4em; font-size: 20px; }
.prose p { margin: 0 0 1.1em; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.section--paper .prose { color: var(--ink-muted); }
.section--paper .prose h2, .section--paper .prose h3 { color: var(--ink-text); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--navy-2), var(--ink) 70%); border-top: 1px solid var(--line); }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 120% at 85% 50%, rgba(43, 177, 222, .16), transparent 60%); }
.cta-band__in { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-block: clamp(44px, 6vw, 68px); flex-wrap: wrap; }
.cta-band__text { max-width: 620px; }
.cta-band__text h2 { font-size: clamp(24px, 3.4vw, 36px); }
.cta-band__text p { margin-top: 12px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-2); border-top: 1px solid var(--line); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1.4fr; gap: 40px; padding-block: clamp(48px, 6vw, 72px); }
.footer__brand .brand { margin-bottom: 18px; }
.footer__tagline { color: var(--muted); font-size: 14.5px; line-height: 1.75; max-width: 42ch; }
.footer__social { display: flex; gap: 10px; margin-top: 20px; }
.footer__social a { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: all .25s var(--ease); }
.footer__social a:hover { color: var(--cyan); border-color: rgba(43, 177, 222, .5); transform: translateY(-2px); }
.footer__col h3 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin-bottom: 18px; }
.footer__col a, .footer__addr { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14.5px; padding: 6px 0; transition: color .2s var(--ease); }
.footer__col a:hover { color: var(--text); }
.footer__col .wtl-icon { width: 16px; height: 16px; color: var(--cyan); flex: none; }
.footer__addr { align-items: flex-start; color: var(--muted); }
.footer__bar { border-top: 1px solid var(--line-2); }
.footer__bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; flex-wrap: wrap; }
.footer__bar p { font-size: 13.5px; color: var(--muted-2); }
.footer__vision { font-family: var(--font-mono); letter-spacing: .04em; }

/* ---------- Responsive shell ---------- */
@media (max-width: 980px) {
	.footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
	.footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
	.topbar { display: none; }
	.nav__menu { display: none; }
	.nav__actions .btn { display: none; }
	.nav__toggle { display: inline-flex; }
	.nav__in { min-height: 64px; }
	/* With the desktop menu hidden its auto margins are gone, so push the
	   toggle to the far edge ourselves (right in LTR, left in RTL). */
	.nav__actions { margin-inline-start: auto; }
	/* Keep the bar (brand + X toggle) above the open drawer panel so the
	   menu can always be closed with the X. */
	.nav { position: relative; z-index: 160; }

	.drawer { display: block; position: fixed; inset: 0 0 0 auto; width: min(88vw, 380px); z-index: 150;
		background: var(--navy); border-inline-start: 1px solid var(--line);
		transform: translateX(100%); transition: transform .38s var(--ease-out);
		padding: 88px 26px 32px; overflow-y: auto; }
	.lang-ar .drawer { inset: 0 auto 0 0; border-inline-start: 0; border-inline-end: 1px solid var(--line); transform: translateX(-100%); }
	body.drawer-open .drawer { transform: translateX(0); }
	body.drawer-open { overflow: hidden; }
	.drawer__menu { display: flex; flex-direction: column; gap: 4px; }
	.drawer__link { padding: 14px 12px; font-size: 17px; color: var(--muted); border-bottom: 1px solid var(--line-2); border-radius: 8px; }
	.drawer__link.is-active { color: var(--cyan); }

	/* Language switch — the topbar (and its EN/العربية toggle) is hidden on
	   mobile, so the drawer must offer one. */
	.drawer__lang { display: flex; gap: 10px; margin-bottom: 20px; }
	.drawer__lang a {
		flex: 1; text-align: center; padding: 12px 10px; border: 1px solid var(--line);
		border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 15px;
		transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
	}
	.drawer__lang a.is-active { color: var(--cyan); border-color: rgba(43, 177, 222, .5); background: rgba(43, 177, 222, .08); }

	/* Staggered slide-in when the drawer opens. */
	.drawer__lang, .drawer__link, .drawer__foot {
		opacity: 0; transform: translateX(26px);
		transition: opacity .4s var(--ease-out), transform .4s var(--ease-out), color .2s var(--ease);
	}
	.lang-ar .drawer__lang, .lang-ar .drawer__link, .lang-ar .drawer__foot { transform: translateX(-26px); }
	body.drawer-open .drawer__lang, body.drawer-open .drawer__link, body.drawer-open .drawer__foot { opacity: 1; transform: none; }
	body.drawer-open .drawer__link:nth-child(1) { transition-delay: .05s; }
	body.drawer-open .drawer__link:nth-child(2) { transition-delay: .09s; }
	body.drawer-open .drawer__link:nth-child(3) { transition-delay: .13s; }
	body.drawer-open .drawer__link:nth-child(4) { transition-delay: .17s; }
	body.drawer-open .drawer__link:nth-child(5) { transition-delay: .21s; }
	body.drawer-open .drawer__link:nth-child(6) { transition-delay: .25s; }
	body.drawer-open .drawer__link:nth-child(7) { transition-delay: .29s; }
	body.drawer-open .drawer__link:nth-child(8) { transition-delay: .33s; }
	body.drawer-open .drawer__foot { transition-delay: .38s; }

	.drawer__foot { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
	.drawer__contact { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-family: var(--font-mono); font-size: 14px; }
	.drawer__contact .wtl-icon { width: 16px; height: 16px; color: var(--cyan); }
	.nav__toggle[aria-expanded="true"] .i-menu { display: none; }
	.nav__toggle[aria-expanded="true"] .i-close { display: block; }

	.cta-band__in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
	.footer__grid { grid-template-columns: 1fr; }
	.brand__word span { display: none; }
}

/* drawer backdrop */
.drawer-backdrop { position: fixed; inset: 0; z-index: 140; background: rgba(3, 12, 25, .6); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease); backdrop-filter: blur(2px); }
body.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
