/* Belal Ezzat: header, footer, home sections. Colors and sizes come from tokens.css. */

/* Kadence chrome replaced by ours */
#masthead, #colophon { display: none; }
html.be-lock, html.be-lock body { overflow: hidden; }
body { overflow-x: clip; }
#inner-wrap { padding-top: var(--be-header-h); }
.be-has-hero #inner-wrap { padding-top: 0; }
.be-has-hero .content-container,
.be-has-hero .entry-content-wrap,
.be-has-hero .content-area,
.be-has-hero .entry.single-entry { max-width: none; padding: 0; margin: 0; box-shadow: none; background: transparent; }
.be-has-hero .entry-header { display: none; }

.be-wrap { max-width: var(--be-max); margin-inline: auto; padding-inline: var(--be-gutter); }
.be-ico-dir { flex: none; }
[dir="rtl"] .be-ico-dir { transform: scaleX(-1); }

/* Reset Kadence's global button look on our controls */
.be-burger, .be-drawer-close, .be-pause, .be-bars button, .be-filters button, .be-theme-toggle {
	appearance: none; box-shadow: none; font: inherit; line-height: 1; text-transform: none; letter-spacing: 0; min-height: 0;
}

/* ---------- Header (constant height) ---------- */
.be-header {
	position: fixed; inset-inline: 0; top: var(--wp-admin--admin-bar--height, 0px); z-index: 80;
	height: var(--be-header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px;
	padding-inline: var(--be-gutter);
	background: var(--be-bg); color: var(--be-text);
	border-bottom: 1px solid var(--be-line);
	transition: background-color 0.3s, color 0.3s, border-color 0.3s;
	overflow-anchor: none;
}
.be-has-hero .be-header:not(.is-solid) { background: transparent; color: #fff; border-color: transparent; }
.be-mark { font-weight: 600; font-size: 20px; letter-spacing: 0.01em; color: inherit; text-decoration: none; white-space: nowrap; }
.be-mark:hover { color: inherit; }
.be-nav { display: flex; gap: clamp(18px, 2.4vw, 38px); }
.be-nav-link { position: relative; color: inherit; text-decoration: none; font-size: 15px; font-weight: 500; padding-block: 12px; }
.be-nav-link::after { content: ""; position: absolute; inset-inline: 0; bottom: 6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--be-ease); }
[dir="rtl"] .be-nav-link::after { transform-origin: right; }
.be-nav-link:hover { color: inherit; }
.be-nav-link:hover::after { transform: scaleX(1); }
.be-tools { display: flex; align-items: center; gap: 4px; }
.be-lang { color: inherit; text-decoration: none; font-size: 14px; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; padding-inline: 10px; }
.be-lang:hover { color: inherit; text-decoration: underline; }
.be-burger { display: block; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.be-burger:hover, .be-burger:focus, .be-burger:active { background: transparent; color: inherit; box-shadow: none; }
.be-burger span { display: block; width: 22px; height: 1.5px; margin: 6px auto; background: currentColor; }

/* Drawer */
.be-drawer { position: fixed; inset: 0; top: var(--wp-admin--admin-bar--height, 0px); z-index: 100; background: transparent; color: var(--be-text); display: grid; grid-template-columns: 5fr 7fr; overflow: hidden; }
.be-drawer-pic { overflow: hidden; transform: translateY(-100%); transition: transform 0.7s var(--be-ease); }
.be-drawer-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.be-drawer-panel { display: flex; flex-direction: column; padding: 0 var(--be-gutter) 28px; overflow-y: auto; min-height: 0; background: var(--be-bg); transform: translateY(100%); transition: transform 0.7s var(--be-ease); }
.be-drawer.is-open .be-drawer-pic, .be-drawer.is-open .be-drawer-panel { transform: none; }
.be-drawer-pic img { transform: scale(1.12); transition: transform 1.4s var(--be-ease); }
.be-drawer.is-open .be-drawer-pic img { transform: none; }
/* Links rise in one after another once the panel is in */
.be-drawer-link, .be-drawer-foot, .be-drawer-top { opacity: 0; transform: translateY(18px); transition: opacity 0.3s, transform 0.3s, color 0.25s; }
.be-drawer.is-open .be-drawer-link, .be-drawer.is-open .be-drawer-foot, .be-drawer.is-open .be-drawer-top { opacity: 1; transform: none; transition: opacity 0.6s var(--be-ease), transform 0.6s var(--be-ease), color 0.25s; }
.be-drawer.is-open .be-drawer-top { transition-delay: 0.25s; }
.be-drawer.is-open .be-drawer-link:nth-child(1) { transition-delay: 0.3s, 0.3s, 0s; }
.be-drawer.is-open .be-drawer-link:nth-child(2) { transition-delay: 0.36s, 0.36s, 0s; }
.be-drawer.is-open .be-drawer-link:nth-child(3) { transition-delay: 0.42s, 0.42s, 0s; }
.be-drawer.is-open .be-drawer-link:nth-child(4) { transition-delay: 0.48s, 0.48s, 0s; }
.be-drawer.is-open .be-drawer-link:nth-child(5) { transition-delay: 0.54s, 0.54s, 0s; }
.be-drawer.is-open .be-drawer-link:nth-child(6) { transition-delay: 0.6s, 0.6s, 0s; }
.be-drawer.is-open .be-drawer-foot { transition-delay: 0.68s; }
/* Menu icon: the two lines cross while the menu is open */
.be-burger span { transition: transform 0.4s var(--be-ease); }
.be-burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.be-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.be-drawer[hidden] { display: none; }
.be-drawer-top { height: var(--be-header-h); display: flex; align-items: center; justify-content: space-between; flex: none; }
.be-drawer-close { width: 44px; height: 44px; padding: 0; border: 1px solid var(--be-line); border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.be-drawer-close:hover, .be-drawer-close:focus, .be-drawer-close:active { background: transparent; color: inherit; border-color: var(--be-accent); box-shadow: none; }
.be-pause:focus, .be-bars button:focus, .be-filters button:focus:not([aria-pressed="true"]), .be-rail-nav button:focus:not(:hover) { background: transparent; box-shadow: none; }
.be-pause:focus { color: #fff; }
.be-filters button:focus:not([aria-pressed="true"]) { color: var(--be-muted); }
.be-rail-nav button:focus:not(:hover) { color: inherit; }
.be-drawer-nav { display: flex; flex-direction: column; margin-top: 6vh; flex: 1; }
.be-drawer-link { color: var(--be-subtle); text-decoration: none; font-size: clamp(28px, 3.4vw, 48px); font-weight: 300; line-height: 1.5; padding-block: 4px; transition: color 0.25s; }
.be-drawer-link:hover, .be-drawer-link:focus-visible { color: var(--be-text); }
.be-drawer-foot { padding-top: 20px; border-top: 1px solid var(--be-line); }

/* ---------- Shared pieces ---------- */
.be-sec { padding-block: var(--be-section); }
.be-sec-flush { padding-top: 0; }
.be-eyebrow { font-size: 13px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--be-accent); margin: 0 0 18px; }
[dir="rtl"] .be-eyebrow { letter-spacing: 0; font-size: 15px; }
.be-statement { font-weight: 300; font-size: clamp(28px, 3.6vw, 52px); line-height: 1.2; letter-spacing: -0.01em; max-width: 22ch; margin: 0; color: var(--be-text); }
[dir="rtl"] .be-statement { line-height: 1.5; letter-spacing: 0; }
.be-statement em { font-style: normal; color: var(--be-muted); }
.be-lead { color: var(--be-muted); max-width: 46ch; font-size: 18px; margin: 0; }
.be-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--be-line); }
.be-head h2 { font-weight: 400; font-size: clamp(26px, 2.6vw, 36px); margin: 0; color: var(--be-text); }
.be-more { display: inline-flex; align-items: center; gap: 14px; margin-top: 26px; font-size: 15px; font-weight: 500; color: var(--be-text); text-decoration: none; }
.be-more:hover { color: var(--be-text); }
.be-more b { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--be-line); display: grid; place-items: center; transition: background-color 0.3s, border-color 0.3s, color 0.3s; }
.be-more:hover b { background: var(--be-accent); border-color: var(--be-accent); color: var(--be-on-accent); }
.be-btn { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 26px; border-radius: 50px; background: var(--be-accent); color: var(--be-on-accent); font-weight: 600; font-size: 15px; text-decoration: none; transition: background-color 0.3s; }
.be-btn:hover { background: var(--be-accent-2); color: var(--be-on-accent); }

/* ---------- Hero ---------- */
.be-hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: #141414; color: #fff; }
.be-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--be-ease); }
.be-slide.is-on { opacity: 1; }
.be-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.be-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.05) 28%, rgba(0, 0, 0, 0.05) 50%, rgba(0, 0, 0, 0.72) 100%); }
.be-cap { position: absolute; z-index: 2; inset-inline: var(--be-gutter); bottom: 92px; max-width: 760px; transition: opacity 0.5s; }
.be-cap.is-out { opacity: 0; }
.be-hero .be-eyebrow { color: #fff; margin-bottom: 6px; font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.be-cap-title { font-weight: 500; font-size: clamp(19px, 1.5vw, 24px); line-height: 1.35; margin: 0; color: #fff; }
[dir="rtl"] .be-cap-title { line-height: 1.45; }
.be-hero .be-btn { background: #fff; color: #141414; }
.be-hero .be-btn:hover { background: #e3c9a3; color: #141414; }
.be-ctrl { position: absolute; z-index: 2; inset-inline: var(--be-gutter); bottom: 32px; display: flex; align-items: center; gap: 16px; }
.be-bars { display: flex; gap: 8px; flex: 1; max-width: 320px; }
.be-bars button { flex: 1; height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; position: relative; cursor: pointer; }
.be-bars button:hover { background: transparent; }
.be-bars button::before, .be-bars i { content: ""; position: absolute; inset-inline: 0; top: 21px; height: 2px; background: rgba(255, 255, 255, 0.3); }
.be-bars i { background: #fff; transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .be-bars i { transform-origin: right; }
.be-count { font-size: 13px; color: rgba(255, 255, 255, 0.75); font-variant-numeric: tabular-nums; }
.be-pause { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; }
.be-pause:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.be-pause .be-i-play, .be-hero.is-paused .be-pause .be-i-pause { display: none; }
.be-hero.is-paused .be-pause .be-i-play { display: block; }
.be-down { margin-inline-start: auto; width: 52px; height: 52px; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 50%; display: grid; place-items: center; color: #fff; transition: background-color 0.3s, color 0.3s; }
.be-down:hover { background: #fff; color: #141414; }

/* ---------- Intro ---------- */
.be-intro { display: grid; grid-template-columns: 1fr 1fr; gap: var(--be-gutter); align-items: end; }

/* ---------- Tiles ---------- */
.be-tile { position: relative; display: block; overflow: hidden; background: var(--be-surface-2); border-radius: var(--be-radius); color: #fff; text-decoration: none; }
.be-tile[hidden] { display: none; }
.be-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--be-ease); }
.be-tile:hover img { transform: scale(1.04); }
.be-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.78)); }
.be-tile-t { position: absolute; z-index: 2; inset-inline: 22px; bottom: 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; color: #fff; }
.be-tile-t strong { display: block; font-weight: 500; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; }
.be-tile-t small { display: block; font-size: 13px; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.8); margin-bottom: 4px; }
[dir="rtl"] .be-tile-t small { letter-spacing: 0; }
.be-arr { flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); display: grid; place-items: center; opacity: 0; transition: opacity 0.4s; }
.be-tile:hover .be-arr, .be-tile:focus-visible .be-arr { opacity: 1; }
.be-tile:hover { color: #fff; }

.be-exp { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.be-exp .be-tile { aspect-ratio: 16 / 9; }
.be-exp .be-exp-lead { grid-column: span 7; grid-row: span 2; aspect-ratio: auto; }
.be-exp .be-exp-lead strong { font-size: clamp(26px, 3vw, 42px); font-weight: 300; }
.be-exp .be-exp-side { grid-column: span 5; }
.be-exp .be-exp-third { grid-column: span 4; }

.be-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.be-filters button { min-height: 44px; padding: 0 18px; border: 1px solid var(--be-line); border-radius: 40px; background: transparent; color: var(--be-muted); font-size: 14px; cursor: pointer; transition: background-color 0.25s, color 0.25s, border-color 0.25s; }
.be-filters button:hover, .be-filters button[aria-pressed="true"] { background: var(--be-text); border-color: var(--be-text); color: var(--be-bg); }
.be-projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.be-projects .be-tile { aspect-ratio: 16 / 9; }
.be-projects .be-wide { grid-column: span 2; aspect-ratio: 3 / 1; }

/* ---------- Materials rail ---------- */
.be-rail-nav { display: flex; gap: 8px; }
.be-rail-nav button { appearance: none; box-shadow: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--be-line); border-radius: 50%; background: transparent; color: var(--be-text); display: grid; place-items: center; cursor: pointer; transition: background-color 0.25s, color 0.25s, border-color 0.25s; }
.be-rail-nav button:hover { background: var(--be-text); border-color: var(--be-text); color: var(--be-bg); }
.be-flip { display: grid; transform: scaleX(-1); }
.be-rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 19vw, 360px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: max(var(--be-gutter), calc((100vw - var(--be-max)) / 2 + var(--be-gutter))); scroll-padding-inline: max(var(--be-gutter), calc((100vw - var(--be-max)) / 2 + var(--be-gutter))); }
.be-rail::-webkit-scrollbar { display: none; }
.be-mat { position: relative; margin: 0; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--be-radius); background: var(--be-surface-2); scroll-snap-align: start; }
.be-mat img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--be-ease); }
.be-mat:hover img { transform: scale(1.05); }
.be-mat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.78)); }
.be-mat figcaption { position: absolute; z-index: 2; inset-inline: 20px; bottom: 18px; color: #fff; }
.be-mat small { display: block; font-size: 13px; color: rgba(255, 255, 255, 0.8); margin-bottom: 4px; }
.be-mat strong { font-weight: 500; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.4; }

/* ---------- Blog ---------- */
.be-blog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.be-post { display: block; color: var(--be-text); text-decoration: none; }
.be-post:hover { color: var(--be-text); }
.be-post-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--be-radius); background: var(--be-surface-2); margin-bottom: 16px; }
.be-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s var(--be-ease); }
.be-post:hover .be-post-img img { transform: scale(1.04); }
.be-post time { display: block; font-size: 13px; color: var(--be-muted); margin-bottom: 6px; }
.be-post strong { display: block; font-weight: 500; font-size: 19px; line-height: 1.45; }
.be-post:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.be-head .be-more { margin: 0; }

/* ---------- Approach band ---------- */
.be-band { background: var(--be-surface-2); margin-bottom: var(--be-section); }
.be-band .be-statement { margin-bottom: 48px; }
.be-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; border-top: 1px solid var(--be-line); }
.be-step { padding-top: 26px; }
.be-step span { font-size: 13px; color: var(--be-accent); font-variant-numeric: tabular-nums; }
.be-step h3 { font-weight: 500; font-size: 20px; margin: 24px 0 8px; color: var(--be-text); }
.be-step p { color: var(--be-muted); margin: 0; font-size: 16px; }

/* ---------- Contact ---------- */
.be-contact { display: grid; grid-template-columns: 5fr 7fr; gap: var(--be-gutter); align-items: start; }
.be-form-box { background: var(--be-surface); border: 1px solid var(--be-line); border-radius: var(--be-radius); padding: clamp(20px, 3vw, 40px); }
.be-form-box .ff-el-input--label label { color: var(--be-text); font-weight: 500; }
.be-form-box .ff-el-form-control { background: var(--be-bg); color: var(--be-text); border: 1px solid var(--be-line); border-radius: var(--be-radius); min-height: 48px; font-family: inherit; font-size: 16px; }
.be-form-box textarea.ff-el-form-control { min-height: 130px; }
.be-form-box .ff-el-form-control::placeholder { color: var(--be-subtle); opacity: 1; }
.be-form-box .ff-el-form-control:focus { border-color: var(--be-accent); background: var(--be-bg); color: var(--be-text); }
.be-form-box select.ff-el-form-control option { background: var(--be-surface); color: var(--be-text); }
.be-form-box .ff-btn-submit, .be-form-box form.frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style) { background: var(--be-accent); color: var(--be-on-accent); border: 0; border-radius: 50px; min-height: 48px; padding: 0 30px; font-weight: 600; font-size: 15px; font-family: inherit; }
.be-form-box .ff-btn-submit:hover { background: var(--be-accent-2); color: var(--be-on-accent); opacity: 1; }
.be-form-box .ff-message-success { background: transparent; border: 1px solid var(--be-accent); color: var(--be-text); box-shadow: none; }

/* ---------- Footer ---------- */
.be-footer { border-top: 1px solid var(--be-line); padding: 52px 0 32px; background: var(--be-bg); color: var(--be-text); }
.be-footer-top, .be-footer-mid, .be-footer-bot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.be-footer-top { margin-bottom: 36px; }
.be-footer-top .be-more { margin: 0; }
.be-footer-mid { margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid var(--be-line); }
.be-footer-nav { display: flex; gap: 8px 26px; flex-wrap: wrap; }
.be-footer-nav a, .be-footer-bot a { color: var(--be-muted); text-decoration: none; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.be-footer-nav a:hover, .be-footer-bot a:hover { color: var(--be-text); }
.be-footer-bot { font-size: 14px; color: var(--be-muted); }
.be-footer-bot i { font-style: normal; margin-inline: 6px; }
.be-soc { display: flex; gap: 8px; }
.be-soc a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--be-line); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--be-text); text-decoration: none; }
.be-soc a:hover { background: var(--be-accent); border-color: var(--be-accent); color: var(--be-on-accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.be-header .be-lang { display: none; }
	.be-drawer { grid-template-columns: 1fr; }
	.be-drawer-pic { display: none; }
	.be-intro, .be-contact { grid-template-columns: 1fr; }
	.be-exp { grid-template-columns: 1fr 1fr; }
	.be-exp .be-exp-lead { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
	.be-exp .be-exp-side, .be-exp .be-exp-third { grid-column: span 1; }
	.be-steps { grid-template-columns: 1fr 1fr; gap: 28px; }
	.be-blog { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
	:root { --be-header-h: 64px; }
	.be-exp, .be-projects, .be-steps, .be-blog { grid-template-columns: 1fr; }
	.be-rail { grid-auto-columns: 68vw; }
	.be-exp .be-exp-lead, .be-exp .be-exp-side, .be-exp .be-exp-third, .be-projects .be-wide { grid-column: auto; }
	.be-projects .be-tile, .be-projects .be-wide { aspect-ratio: 4 / 3; }
	.be-arr { opacity: 1; }
	.be-cap { bottom: 96px; }
	.be-drawer-link { font-size: clamp(28px, 8vw, 40px); border-bottom: 1px solid var(--be-line); color: var(--be-text); }
	.be-count { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.be-slide, .be-tile img, .be-cap { transition: none; }
	.be-drawer-pic, .be-drawer-panel, .be-drawer-pic img, .be-drawer-link, .be-drawer-foot, .be-drawer-top, .be-burger span,
	.be-drawer.is-open .be-drawer-link, .be-drawer.is-open .be-drawer-foot, .be-drawer.is-open .be-drawer-top { transition: none; transform: none; opacity: 1; }
}
