:root {
  --dark: #282d30;
  --darker: #1d2124;
  --orange: #f48847;
  --orange-hover: #e2732f;
  --sand: #e9ceb0;
  --paper: #faf8f5;
  --text: #16191b;
  --muted: #5a6066;
  --line: #e2ded8;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --arabic: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; font-family: var(--serif); font-weight: 300; color: var(--text); background: #fff; line-height: 1.6; }
html[lang="ar"] body { font-family: var(--arabic); line-height: 1.8; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 300; line-height: 1.2; margin: 0 0 .6em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-weight: 400; line-height: 1.4; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.center { text-align: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--orange-hover); margin-bottom: .75rem; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.section-intro { max-width: 640px; margin: 0 auto 3rem; color: var(--muted); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-inline: clamp(1rem, 4vw, 3rem); color: #fff; transition: background .3s, box-shadow .3s, backdrop-filter .3s; }
.site-header.scrolled { background: rgba(29, 33, 36, .72); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand span { font-size: 1rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; }
html[lang="ar"] .brand span { letter-spacing: 0; font-size: 1.1rem; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { text-decoration: none; font-size: .95rem; font-weight: 400; transition: color .2s; }
.site-nav a:hover { color: var(--orange); }
.site-nav .nav-cta { border: 1px solid rgba(255,255,255,.55); padding: .45rem 1rem; }
.site-nav .nav-cta:hover { border-color: var(--orange); }
.site-nav .lang { font-family: var(--arabic); font-weight: 500; }
html[lang="ar"] .site-nav .lang { font-family: var(--serif); }
.menu-toggle { display: none; background: none; border: 0; color: inherit; padding: .5rem; cursor: pointer; }
.menu-toggle svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; color: #fff; padding: calc(var(--header-h) + 2rem) 1rem 4rem;
  background: linear-gradient(180deg, rgba(20,24,27,.35), rgba(20,24,27,.55)), url('images/hero-video-still.jpg') center/cover no-repeat, var(--dark); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; max-width: 820px; }
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4rem); letter-spacing: .35em; text-transform: uppercase; margin-inline-end: -.35em; margin-bottom: .35em; }
html[lang="ar"] .hero h1 { letter-spacing: 0; margin-inline-end: 0; font-weight: 500; }
.tagline { font-size: clamp(1rem, 2.2vw, 1.4rem); letter-spacing: .25em; text-transform: uppercase; font-weight: 400; margin: 0 0 1.5rem; color: #ffd2b5; }
html[lang="ar"] .tagline { letter-spacing: 0; }
.hero-value { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 640px; margin: 0 auto 2.25rem; color: rgba(255,255,255,.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.scroll-cue { position: absolute; bottom: 1.75rem; left: 50%; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255,255,255,.6); border-radius: 14px; }
.scroll-cue::after { content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--orange); color: #fff; text-decoration: none; border: 1px solid var(--orange); padding: .95rem 1.8rem; font: 500 1rem inherit; font-family: inherit; letter-spacing: .02em; cursor: pointer; transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; }
.btn:hover { background: var(--orange-hover); border-color: var(--orange-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(244,136,71,.3); }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.7); }
.btn.ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; box-shadow: none; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section.dark { background: var(--dark); color: #fff; }
.section.paper { background: var(--paper); }
.wrap { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.two-col { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.lead { font-size: clamp(1.15rem, 1.9vw, 1.35rem); margin: 0; }
.band { height: clamp(160px, 24vw, 320px); background: var(--dark) center/cover no-repeat; }
@media (hover: hover) and (min-width: 900px) { .band { background-attachment: fixed; } }

/* ---------- Service cards ---------- */
.services-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.services-head h2 { margin: 0; }
.services-head p { max-width: 520px; margin: .75rem 0 0; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.card { background: #fff; border: 1px solid var(--line); padding: 2rem 1.75rem 1.5rem; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s, border-color .25s; position: relative; }
.card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--orange); transform: scaleX(0); transform-origin: inline-start; transition: transform .35s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(22,25,27,.08); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: #fdeee4; color: var(--orange-hover); margin-bottom: 1.25rem; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.35rem; margin-bottom: .4rem; }
.card > p { color: var(--muted); margin: 0 0 1rem; flex: 1; }
.card details summary { list-style: none; cursor: pointer; color: var(--orange-hover); font-weight: 500; font-size: .95rem; display: inline-flex; align-items: center; gap: .35rem; }
.card details summary::-webkit-details-marker { display: none; }
.card details summary::after { content: "+"; font-size: 1.15rem; transition: transform .2s; }
.card details[open] summary::after { transform: rotate(45deg); }
.card details p { color: var(--muted); font-size: .95rem; margin: .75rem 0 0; }

/* ---------- Approach ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: step; margin-top: 3rem; position: relative; }
.steps::before { content: ""; position: absolute; top: 28px; inset-inline: 28px 28px; height: 1px; background: linear-gradient(90deg, rgba(244,136,71,.1), rgba(244,136,71,.6), rgba(244,136,71,.1)); }
.step { position: relative; }
.step-num { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--dark); border: 1px solid var(--orange); color: var(--orange); font-size: 1.3rem; font-weight: 400; margin-bottom: 1.25rem; position: relative; }
.step h3 { font-size: 1.4rem; margin-bottom: .4rem; }
.step p { margin: 0; color: rgba(255,255,255,.75); }

/* ---------- Accordions (case studies) ---------- */
.accordion details { border-bottom: 1px solid var(--line); }
.accordion details:first-child { border-top: 1px solid var(--line); }
.accordion summary { list-style: none; cursor: pointer; padding-block: .8rem; padding-inline: 0 1.75rem; font-size: 1.05rem; position: relative; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; transition: transform .2s; }
.accordion details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.accordion details p, .accordion blockquote { margin: 0 0 1.25rem; color: var(--muted); font-size: .95rem; }
blockquote { font-style: italic; }
html[lang="ar"] blockquote { font-style: normal; }
cite { display: block; margin-top: .5rem; font-style: normal; font-weight: 600; color: var(--text); }

/* ---------- Logos ---------- */
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(1.75rem, 5vw, 4rem); margin-top: 2.5rem; }
.logos img { height: 70px; width: auto; max-width: 170px; object-fit: contain; filter: grayscale(1); opacity: .6; transition: filter .3s, opacity .3s, transform .3s; }
.logos img:hover { filter: none; opacity: 1; transform: scale(1.05); }
.partners .logos img { height: 90px; max-width: 220px; }

/* ---------- Case studies ---------- */
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 3rem 2rem; margin-top: 3rem; }
.case-img { overflow: hidden; margin-bottom: 1.25rem; }
.case-img img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; transition: transform .6s; }
.case:hover .case-img img { transform: scale(1.05); }
.case h3 { font-size: 1.5rem; margin-bottom: .2rem; }
.sector { color: var(--orange-hover); margin: 0 0 1rem; font-weight: 400; }

/* ---------- Contact ---------- */
.contact-form { display: grid; gap: 1rem; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form label { display: grid; gap: .35rem; font-size: .95rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: .85rem; font: inherit; font-weight: 400; color: #fff; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.25); border-radius: 2px; transition: border-color .2s, background .2s; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--orange); background: rgba(255,255,255,.1); }
.contact-form .btn { justify-self: start; }
.form-status { margin: 0; min-height: 1.5em; }
.hp { display: none; }
.contact-details { margin-top: 2rem; color: rgba(255,255,255,.75); }
.contact-details a { color: var(--orange); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--sand); text-align: center; padding: 3rem 1rem; }
.site-footer p { margin: 0 0 1rem; }
.footer-brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.2rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; }
html[lang="ar"] .footer-brand { letter-spacing: 0; }
.footer-brand svg { width: 26px; height: 26px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--orange-hover); }
.copy { font-size: .85rem; color: var(--muted); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .cards .reveal:nth-child(3n+2), .js .cases .reveal:nth-child(3n+2), .js .steps .reveal:nth-child(2) { transition-delay: .1s; }
.js .cards .reveal:nth-child(3n), .js .cases .reveal:nth-child(3n), .js .steps .reveal:nth-child(3) { transition-delay: .2s; }
.js .steps .reveal:nth-child(4) { transition-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue::after { animation: none; }
  .band { background-attachment: scroll !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps::before { display: none; }
}
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .site-nav { position: absolute; top: var(--header-h); inset-inline: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--darker); padding: .5rem 1rem 1.25rem; display: none; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .85rem .25rem; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-nav .nav-cta { margin-top: .75rem; text-align: center; border: 1px solid var(--orange); }
  .site-header.menu-open { background: var(--darker); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
  .contact-form .row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .logos img { height: 50px; max-width: 120px; }
  .brand span { font-size: .85rem; letter-spacing: .15em; }
}
