/*
Theme Name: Alaasif Engineering Consultancy & Real Estate
Theme URI: https://www.alaasif.om/
Author: Alaasif Engineering Consultancy & Real Estate
Description: Complete WordPress conversion of the Alaasif Engineering Consultancy & Real Estate website, including English and Arabic pages, responsive layout, animations, project filtering and assistant widget.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: alaasif
*/

/* ==========================================================================
   ALAASIF ENGINEERING CONSULTANCY & REAL ESTATE
   Design system — editorial / architectural. Single stylesheet, LTR + RTL.
   Palette sampled from the company logo and printed profile.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Brand — sampled from the Alaasif logo + printed company profile */
  --ink:        #14181D;   /* near-black, body text */
  --ink-soft:   #4A535E;   /* secondary text */
  --ink-faint:  #8A939E;   /* captions, meta */
  --navy:       #24405C;   /* profile navy */
  --navy-deep:  #16283A;
  --maroon:     #8C2434;   /* profile maroon sidebars */
  --maroon-deep:#6E1A27;
  --rose:       #C08A8A;   /* logo rose */
  --steel:      #8FA3B8;   /* logo arch */
  --steel-pale: #C6D1DC;

  --paper:      #FFFFFF;
  --sand:       #F7F4F0;   /* warm off-white */
  --sand-deep:  #EFEAE3;
  --line:       #E2DCD4;
  --line-dark:  rgba(255,255,255,.16);

  /* Type */
  --serif: "Cormorant Garamond", "Amiri", Georgia, serif;
  --sans:  "Inter", "Tajawal", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Fluid scale */
  --fs-display: clamp(2.9rem, 6.2vw, 6.4rem);
  --fs-h1:      clamp(2.4rem, 4.8vw, 4.4rem);
  --fs-h2:      clamp(1.9rem, 3.4vw, 3.1rem);
  --fs-h3:      clamp(1.22rem, 1.7vw, 1.55rem);
  --fs-lead:    clamp(1.02rem, 1.25vw, 1.2rem);
  --fs-body:    1rem;
  --fs-sm:      .875rem;
  --fs-xs:      .76rem;

  --shell: 1320px;
  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- 2. Reset / base --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.68;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.08; letter-spacing: -.015em; }
h1, h2 { font-family: var(--serif); }
h3, h4 { font-family: var(--sans); font-weight: 600; line-height: 1.28; letter-spacing: -.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--maroon); color: #fff; }

:focus-visible { outline: 2px solid var(--maroon); outline-offset: 3px; }

/* Off-screen by clipping, NOT by a negative offset — a negative `left` adds
   ~10,000px of scrollable width to an RTL document and breaks the layout. */
.skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; inset-inline-start: 1rem; top: 1rem; z-index: 999;
  width: auto; height: auto; margin: 0; padding: .8rem 1.2rem;
  clip: auto; clip-path: none; overflow: visible;
  background: var(--ink); color: #fff; font-size: var(--fs-sm);
}

/* ---------- 3. Layout ---------------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gut); }
.shell-wide { max-width: 1620px; }
.section { padding-block: clamp(4.5rem, 9vw, 9rem); }
.section-tight { padding-block: clamp(3rem, 6vw, 5.5rem); }
.bg-sand { background: var(--sand); }
.bg-ink  { background: var(--navy-deep); color: #EDF1F5; }
.bg-ink h1, .bg-ink h2, .bg-ink h3, .bg-ink h4 { color: #fff; }
.bg-ink p { color: #C2CCD6; }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.6rem); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split-40 { grid-template-columns: minmax(0,.78fr) minmax(0,1fr); }
.stack-sm > * + * { margin-top: .9rem; }

/* ---------- 4. Editorial type components -------------------------------- */
.eyebrow {
  display: flex; align-items: center; gap: .8rem;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .19em; text-transform: uppercase;
  color: var(--maroon); margin: 0 0 1.35rem;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; flex: none; }
.bg-ink .eyebrow { color: var(--rose); }
.eyebrow.no-rule::before { display: none; }

.idx { font-family: var(--sans); font-size: var(--fs-xs); letter-spacing: .16em; color: var(--ink-faint); font-weight: 600; }

.lead { font-size: var(--fs-lead); line-height: 1.62; color: var(--ink-soft); }
.bg-ink .lead { color: #C2CCD6; }
.measure { max-width: 62ch; }
.measure-sm { max-width: 48ch; }

.display { font-family: var(--serif); font-size: var(--fs-display); font-weight: 300; line-height: 1.02; letter-spacing: -.022em; }
.display em { font-style: italic; color: var(--rose); }

.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: clamp(2.2rem, 4vw, 3.4rem); }
.head-row .measure { margin: 0; }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.bg-ink .rule { background: var(--line-dark); }

/* ---------- 5. Buttons / links ------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .95rem 1.75rem; font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: .04em; border: 1px solid transparent;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn svg { width: 15px; height: 15px; flex: none; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
[dir="rtl"] .btn svg { transform: scaleX(-1); }
[dir="rtl"] .btn:hover svg { transform: scaleX(-1) translateX(4px); }

.btn-solid { background: var(--maroon); color: #fff; }
.btn-solid:hover { background: var(--maroon-deep); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.42); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-sm { padding: .68rem 1.25rem; font-size: var(--fs-xs); }

.tlink {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: .03em;
  padding-bottom: .3rem; border-bottom: 1px solid var(--line);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.tlink svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.tlink:hover { border-color: var(--maroon); color: var(--maroon); }
.tlink:hover svg { transform: translateX(4px); }
[dir="rtl"] .tlink svg { transform: scaleX(-1); }
[dir="rtl"] .tlink:hover svg { transform: scaleX(-1) translateX(4px); }
.bg-ink .tlink { border-color: var(--line-dark); }
.bg-ink .tlink:hover { color: var(--rose); border-color: var(--rose); }

/* ---------- 6. Header ---------------------------------------------------- */
.hdr {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .35s var(--ease), border-color .35s var(--ease);
}
.hdr-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 78px; }

.brand { display: flex; align-items: center; gap: .8rem; }
.brand img { width: 42px; height: auto; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-family: var(--serif); font-size: 1.32rem; letter-spacing: .01em; color: var(--ink); }
.brand-sub { font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }

.nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.2vw, 2.1rem); }
/* Only direct-child links are page links. The language toggle and the CTA
   button live inside .hdr-act and must keep their own colours. */
.nav > a { font-size: var(--fs-sm); font-weight: 500; letter-spacing: .01em; position: relative; padding-block: .35rem; color: var(--ink-soft); transition: color .25s var(--ease); }
.nav > a::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 0; height: 1px; background: var(--maroon); transition: width .32s var(--ease); }
.nav > a:hover, .nav > a[aria-current="page"] { color: var(--ink); }
.nav > a:hover::after, .nav > a[aria-current="page"]::after { width: 100%; }

.hdr-act { display: flex; align-items: center; gap: .7rem; }
.lang {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em;
  padding: .5rem .8rem; border: 1px solid var(--line); color: var(--ink-soft);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.lang:hover { border-color: var(--ink); color: var(--ink); }

.burger { display: none; width: 42px; height: 42px; position: relative; }
.burger span { position: absolute; inset-inline: 10px; height: 1.5px; background: var(--ink); transition: transform .34s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 7. Hero ------------------------------------------------------ */
.hero { position: relative; min-height: clamp(560px, 84vh, 860px); display: flex; align-items: flex-end; overflow: hidden; background: var(--navy-deep); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .5; filter: grayscale(1) contrast(1.06); }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,18,26,.62) 0%, rgba(10,18,26,.34) 38%, rgba(10,18,26,.9) 100%);
}
.hero-body { position: relative; z-index: 2; width: 100%; padding-block: clamp(3rem, 7vw, 5.5rem); color: #fff; }
.hero .display { max-width: 17ch; }
.hero .lead { color: #CBD5DF; max-width: 54ch; margin-top: 1.6rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.4rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: clamp(1.5rem,4vw,3.5rem); margin-top: clamp(2.5rem,5vw,4rem); padding-top: 1.8rem; border-top: 1px solid rgba(255,255,255,.18); }
.hero-meta div { min-width: 110px; }
.hero-meta b { display: block; font-family: var(--serif); font-size: clamp(1.7rem,2.6vw,2.4rem); font-weight: 300; color: #fff; line-height: 1; }
.hero-meta span { display: block; margin-top: .5rem; font-size: var(--fs-xs); letter-spacing: .13em; text-transform: uppercase; color: #9FADBB; }

/* Page hero (inner pages) */
.phero { position: relative; background: var(--navy-deep); color: #fff; overflow: hidden; }
.phero-media { position: absolute; inset: 0; }
.phero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .34; filter: grayscale(1); }
.phero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,22,32,.72), rgba(12,22,32,.94)); }
.phero-body { position: relative; z-index: 2; padding-block: clamp(3.6rem, 8vw, 7rem); }
.phero h1 { font-weight: 300; max-width: 18ch; }
.phero .lead { color: #B9C5D1; margin-top: 1.3rem; }
.crumbs { display: flex; gap: .5rem; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: #8895A3; margin-bottom: 1.6rem; }
.crumbs a:hover { color: #fff; }
.crumbs span { color: #5D6B79; }

/* ---------- 8. Cards / media -------------------------------------------- */
.figure { position: relative; overflow: hidden; background: var(--sand-deep); }
.figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.figure:hover img { transform: scale(1.045); }
.ar-4-3  { aspect-ratio: 4/3; }
.ar-3-2  { aspect-ratio: 3/2; }
.ar-16-9 { aspect-ratio: 16/9; }
.ar-3-4  { aspect-ratio: 3/4; }
.ar-1-1  { aspect-ratio: 1/1; }

/* Service card */
.svc { padding: clamp(1.6rem,2.6vw,2.3rem); background: var(--paper); border: 1px solid var(--line); height: 100%; display: flex; flex-direction: column; transition: border-color .35s var(--ease), transform .35s var(--ease); }
.svc:hover { border-color: var(--steel); transform: translateY(-3px); }
.svc-num { font-size: var(--fs-xs); letter-spacing: .16em; color: var(--maroon); font-weight: 700; margin-bottom: 1.5rem; }
.svc h3 { margin-bottom: .7rem; }
.svc p { font-size: var(--fs-sm); color: var(--ink-soft); }
.svc .tlink { margin-top: auto; padding-top: 1.4rem; border: 0; }
.svc .tlink { border-bottom: 0; }

/* Project card */
.proj { display: block; position: relative; }
.proj .figure { margin-bottom: 1.1rem; }
.proj-tag { font-size: var(--fs-xs); letter-spacing: .15em; text-transform: uppercase; color: var(--maroon); font-weight: 700; }
.proj h3 { margin: .55rem 0 .3rem; font-size: 1.08rem; }
.proj-loc { font-size: var(--fs-sm); color: var(--ink-faint); }
.proj-stats { display: flex; gap: 1.4rem; margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.proj-stats div { font-size: var(--fs-xs); }
.proj-stats b { display: block; font-weight: 600; color: var(--ink); font-size: var(--fs-sm); }
.proj-stats span { color: var(--ink-faint); letter-spacing: .08em; text-transform: uppercase; font-size: .68rem; }
.proj.is-hidden { display: none; }

/* Filter bar */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(2rem,4vw,3rem); }
.filters button {
  padding: .6rem 1.15rem; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line); color: var(--ink-soft);
  transition: all .28s var(--ease);
}
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Letter (CEO / MD) */
.letter { display: grid; grid-template-columns: minmax(0,.38fr) minmax(0,1fr); gap: clamp(2rem,4.5vw,4.5rem); align-items: start; }
.letter-portrait { position: relative; }
.letter-portrait img { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: top center; }
.letter-name { margin-top: 1.2rem; font-family: var(--serif); font-size: 1.42rem; }
.letter-role { font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--maroon); margin-top: .3rem; font-weight: 600; }
.letter-body p { color: var(--ink-soft); }
.letter-body p:first-of-type { font-family: var(--serif); font-size: clamp(1.28rem,2.1vw,1.72rem); line-height: 1.44; color: var(--ink); font-weight: 300; }
.bg-ink .letter-body p:first-of-type { color: #fff; }

/* Value / stat blocks */
.val { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.bg-ink .val { border-color: var(--line-dark); }
.val h3 { margin-bottom: .55rem; }
.val p { font-size: var(--fs-sm); color: var(--ink-soft); }
.bg-ink .val p { color: #A9B6C3; }

.stat b { display: block; font-family: var(--serif); font-size: clamp(2.4rem,4.4vw,3.7rem); font-weight: 300; line-height: 1; color: var(--ink); }
.bg-ink .stat b { color: #fff; }
.stat span { display: block; margin-top: .7rem; font-size: var(--fs-xs); letter-spacing: .13em; text-transform: uppercase; color: var(--ink-faint); }

/* Service detail row */
.svc-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: clamp(2rem,5vw,4.5rem); align-items: center; padding-block: clamp(2.6rem,5vw,4.4rem); border-top: 1px solid var(--line); }
.svc-row:first-of-type { border-top: 0; }
.svc-row:nth-child(even) .svc-row-media { order: -1; }
[dir="rtl"] .svc-row:nth-child(even) .svc-row-media { order: 0; }
[dir="rtl"] .svc-row:nth-child(odd)  .svc-row-media { order: -1; }
.tick { display: grid; gap: .55rem; margin: 1.4rem 0 1.8rem; }
.tick li { position: relative; padding-inline-start: 1.4rem; font-size: var(--fs-sm); color: var(--ink-soft); }
.tick li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 6px; height: 6px; background: var(--rose); }

/* Logo wall */
.logowall { background: #fff; border: 1px solid var(--line); padding: clamp(1.6rem,3vw,2.6rem); }
.logowall img { width: 100%; height: auto; }

.certs { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; }
.certs figure { margin: 0; border: 1px solid var(--line); background: #fff; padding: .9rem; }
.certs figcaption { margin-top: .8rem; font-size: var(--fs-xs); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint); text-align: center; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: clamp(2rem,5vw,4.5rem); align-items: start; }
.cinfo { display: grid; gap: 1.9rem; }
.cinfo h4 { font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--maroon); margin-bottom: .55rem; font-weight: 700; }
.cinfo p, .cinfo a { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.75; }
.cinfo a:hover { color: var(--maroon); }

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .45rem; }
.field label { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; background: #fff;
  border: 1px solid var(--line); font-size: var(--fs-sm);
  transition: border-color .25s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); outline: none; }
.field textarea { min-height: 138px; resize: vertical; }
.form-note { padding: .9rem 1.1rem; background: #EAF3EC; border-inline-start: 3px solid #2F7D46; font-size: var(--fs-sm); color: #1F5C33; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.map { width: 100%; aspect-ratio: 16/9; border: 1px solid var(--line); filter: grayscale(1); transition: filter .4s var(--ease); }
.map:hover { filter: grayscale(0); }

/* Socials */
.socials { display: flex; gap: .6rem; }
.socials a {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink-soft);
  transition: all .28s var(--ease);
}
.socials a svg { width: 17px; height: 17px; }
.socials a:hover { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.bg-ink .socials a { border-color: var(--line-dark); color: #C2CCD6; }
.bg-ink .socials a:hover { background: #fff; border-color: #fff; color: var(--navy-deep); }

/* CTA band */
.cta { position: relative; overflow: hidden; background: var(--navy-deep); color: #fff; text-align: center; }
.cta-media { position: absolute; inset: 0; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; opacity: .22; filter: grayscale(1); }
.cta-body { position: relative; z-index: 2; padding-block: clamp(3.5rem,7vw,6rem); }
.cta .eyebrow { justify-content: center; color: var(--rose); }
.cta h2 { color: #fff; max-width: 20ch; margin-inline: auto; font-weight: 300; }
.cta p { color: #B9C5D1; max-width: 52ch; margin: 1.2rem auto 0; }
.cta-act { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 2.2rem; }

/* ---------- 9. Footer ---------------------------------------------------- */
.ftr { background: var(--navy-deep); color: #A9B6C3; padding-block: clamp(3.2rem,6vw,5rem) 2rem; font-size: var(--fs-sm); }
.ftr-grid { display: grid; grid-template-columns: 1.55fr 1fr 1fr 1.25fr; gap: clamp(1.8rem,4vw,3.5rem); }
.ftr .brand-name { color: #fff; }
.ftr .brand-sub { color: #7F8D9B; }
.ftr h4 { color: #fff; font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.15rem; font-weight: 600; }
.ftr li + li { margin-top: .6rem; }
.ftr a:hover { color: #fff; }
.ftr-about { max-width: 34ch; margin: 1.3rem 0 1.6rem; line-height: 1.75; }
.ftr-btm { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-top: clamp(2.4rem,5vw,3.5rem); padding-top: 1.6rem; border-top: 1px solid var(--line-dark); font-size: var(--fs-xs); color: #7F8D9B; }

/* ---------- 10. Chatbot --------------------------------------------------- */
.cb-open {
  position: fixed; inset-inline-end: 22px; bottom: 22px; z-index: 95;
  width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--maroon); color: #fff; border-radius: 50%;
  box-shadow: 0 12px 32px rgba(20,24,29,.26);
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.cb-open:hover { transform: translateY(-3px); background: var(--maroon-deep); }
.cb-open svg { width: 23px; height: 23px; }
.cb-open .x { display: none; }
.cb-open[aria-expanded="true"] .x { display: block; }
.cb-open[aria-expanded="true"] .c { display: none; }

.cb-panel {
  position: fixed; inset-inline-end: 22px; bottom: 90px; z-index: 96;
  width: min(376px, calc(100vw - 44px)); max-height: min(600px, calc(100vh - 130px));
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(20,24,29,.2);
  display: none; flex-direction: column; overflow: hidden;
}
.cb-panel.open { display: flex; }
.cb-hd { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.15rem; background: var(--navy-deep); color: #fff; }
.cb-hd img { width: 30px; }
.cb-hd b { display: block; font-size: .92rem; font-weight: 600; }
.cb-hd span { display: block; font-size: .7rem; color: #94D3A2; }
.cb-log { flex: 1; overflow-y: auto; padding: 1.15rem; display: flex; flex-direction: column; gap: .7rem; background: var(--sand); }
.msg { max-width: 84%; padding: .7rem .9rem; font-size: .855rem; line-height: 1.55; }
.msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.msg.me { background: var(--navy); color: #fff; align-self: flex-end; }
.cb-quick { display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem 1.15rem; border-top: 1px solid var(--line); background: #fff; }
.cb-quick button { padding: .42rem .75rem; font-size: .74rem; border: 1px solid var(--line); color: var(--ink-soft); transition: all .22s var(--ease); }
.cb-quick button:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.cb-form { display: flex; gap: .5rem; padding: .8rem 1.15rem 1rem; border-top: 1px solid var(--line); background: #fff; }
.cb-form input { flex: 1; padding: .62rem .8rem; border: 1px solid var(--line); font-size: .85rem; }
.cb-form input:focus { outline: none; border-color: var(--navy); }
.cb-form button { width: 40px; display: grid; place-items: center; background: var(--maroon); color: #fff; }
.cb-form button svg { width: 16px; height: 16px; }
[dir="rtl"] .cb-form button svg { transform: scaleX(-1); }

/* ---------- 11. Reveal (progressive enhancement) ------------------------- */
/* Content is visible by default. main.js adds .js-rv to <html> only once it
   can guarantee every element gets .in — so a blocked/slow/failed script can
   never leave a section invisible. */
.js-rv .rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js-rv .rv.in { opacity: 1; transform: none; }
.rv-1 { transition-delay: .07s; } .rv-2 { transition-delay: .14s; }
.rv-3 { transition-delay: .21s; } .rv-4 { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) { .js-rv .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- 12. RTL ------------------------------------------------------- */
[dir="rtl"] body { font-family: "Tajawal", var(--sans); }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] .display, [dir="rtl"] .brand-name,
[dir="rtl"] .letter-name, [dir="rtl"] .stat b, [dir="rtl"] .hero-meta b,
[dir="rtl"] .letter-body p:first-of-type { font-family: "Amiri", "Tajawal", serif; }
[dir="rtl"] { letter-spacing: 0 !important; }
[dir="rtl"] .eyebrow, [dir="rtl"] .proj-tag, [dir="rtl"] .filters button,
[dir="rtl"] .stat span, [dir="rtl"] .hero-meta span, [dir="rtl"] .crumbs,
[dir="rtl"] .brand-sub, [dir="rtl"] .letter-role, [dir="rtl"] .field label,
[dir="rtl"] .ftr h4, [dir="rtl"] .cinfo h4, [dir="rtl"] .proj-stats span { text-transform: none; }
[dir="rtl"] .brand-name { font-size: 1.5rem; }

/* ---------- 13. Responsive ------------------------------------------------ */
@media (max-width: 1080px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .ftr-grid { grid-template-columns: 1fr 1fr; }
  .letter { grid-template-columns: minmax(0,.46fr) minmax(0,1fr); }
}
@media (max-width: 900px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 78px 0 auto; z-index: 88;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .5rem var(--gut) 1.6rem;
    transform: translateY(-14px); opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
    max-height: calc(100vh - 78px); overflow-y: auto;
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav > a { padding: .95rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav > a::after { display: none; }
  .hdr-act { margin-top: 1.1rem; margin-inline-start: 0 !important; }
  .g-3, .split, .split-40, .svc-row, .letter, .contact-grid, .certs { grid-template-columns: 1fr; }
  .svc-row:nth-child(even) .svc-row-media,
  [dir="rtl"] .svc-row:nth-child(odd) .svc-row-media { order: 0; }
  .letter-portrait { max-width: 260px; }
  .certs { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 620px) {
  .g-2, .g-4, .f2, .certs { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; }
  .hero-meta div { min-width: 44%; }
  .ftr-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}

@media print {
  .hdr, .cb-open, .cb-panel, .cta, .filters { display: none !important; }
  body { color: #000; }
}

/* ==========================================================================
   14. CINEMATIC LAYER — full-bleed hero slider, image bands, showcase
   Added for the tender-focused homepage. Progressive enhancement throughout:
   everything below degrades to a static, readable page without JavaScript.
   ========================================================================== */

/* ---- 14.1 Full-viewport hero slider ------------------------------------ */
.vhero {
  position: relative; height: 100svh; min-height: 620px; max-height: 1080px;
  overflow: hidden; background: #0B141D; color: #fff;
  display: flex; align-items: flex-end;
}
.vhero-stage { position: absolute; inset: 0; }
.vslide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1.5s var(--ease);
}
.vslide.on { opacity: 1; }
.vslide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06); transform-origin: center;
}
/* Ken-Burns only on the active slide, only if motion is welcome */
.vslide.on img { animation: kb 13s linear forwards; }
@keyframes kb { from { transform: scale(1.02); } to { transform: scale(1.14); } }
@media (prefers-reduced-motion: reduce) {
  .vslide.on img { animation: none; transform: scale(1.02); }
  .vslide { transition: none; }
}
.vhero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8,14,20,.80) 0%, rgba(8,14,20,.30) 30%, rgba(8,14,20,.55) 62%, rgba(8,14,20,.94) 100%),
    linear-gradient(90deg, rgba(8,14,20,.72) 0%, rgba(8,14,20,.10) 62%);
}
/* Top padding clears the sticky header (78px) so the eyebrow is never
   hidden behind it when the headline runs to three lines. */
.vhero-body { position: relative; z-index: 2; width: 100%;
  padding-top: calc(78px + clamp(1.2rem, 3vw, 2.4rem));
  padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.vhero h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.5rem, 5.6vw, 5.4rem); line-height: 1.02; letter-spacing: -.025em;
  max-width: 16ch; color: #fff;
}
.vhero h1 em { font-style: italic; color: var(--rose); }
.vhero .lead { color: #D3DCE4; max-width: 50ch; margin-top: 1.5rem; }
.vhero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }

/* slide caption + controls */
.vhero-foot {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; margin-top: clamp(2.2rem, 5vw, 4rem);
  padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.2);
}
.vcap { min-height: 2.8em; }
.vcap-k { font-size: var(--fs-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--rose); font-weight: 700; }
.vcap-t { font-size: 1.02rem; color: #fff; margin-top: .35rem; font-weight: 500; }
.vcap-l { font-size: var(--fs-sm); color: #94A3B1; }
.vdots { display: flex; align-items: center; gap: .55rem; }
.vdots button {
  width: 34px; height: 3px; background: rgba(255,255,255,.28); position: relative; overflow: hidden;
  transition: background .3s var(--ease);
}
.vdots button[aria-current="true"] { background: rgba(255,255,255,.5); }
.vdots button[aria-current="true"]::after {
  content: ""; position: absolute; inset: 0; background: var(--rose);
  transform-origin: left; animation: bar 7s linear forwards;
}
[dir="rtl"] .vdots button[aria-current="true"]::after { transform-origin: right; }
@keyframes bar { from { transform: scaleX(0);} to { transform: scaleX(1);} }
@media (prefers-reduced-motion: reduce) { .vdots button[aria-current="true"]::after { animation: none; transform: scaleX(1);} }
.vscroll {
  position: absolute; z-index: 2; inset-inline-end: var(--gut); bottom: clamp(2.5rem,6vw,5rem);
  writing-mode: vertical-rl; font-size: .62rem; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(255,255,255,.55); display: flex; align-items: center; gap: .9rem;
}
.vscroll::after { content: ""; width: 1px; height: 54px; background: linear-gradient(rgba(255,255,255,.5), transparent); }
@media (max-width: 900px) { .vscroll { display: none; } }

/* ---- 14.2 Credential strip --------------------------------------------- */
.credbar { background: var(--maroon); color: #fff; }
/* auto-fit grid distributes the five credentials evenly instead of
   leaving one orphan on a second line */
.credbar .shell { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: center; gap: .6rem 1.6rem; padding-block: 1.05rem; }
.credbar span { font-size: var(--fs-xs); letter-spacing: .13em; text-transform: uppercase; font-weight: 600; display: flex; align-items: center; gap: .6rem; }
.credbar span::before { content: ""; width: 5px; height: 5px; background: rgba(255,255,255,.75); flex: none; }
[dir="rtl"] .credbar span { text-transform: none; letter-spacing: 0; }

/* ---- 14.3 Full-bleed image band ---------------------------------------- */
.band { position: relative; min-height: clamp(460px, 62vw, 660px); display: flex; align-items: center; overflow: hidden; background: #0B141D; color: #fff; }
.band-media { position: absolute; inset: 0; }
.band-media img { width: 100%; height: 100%; object-fit: cover; }
.band-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,14,20,.90) 0%, rgba(8,14,20,.66) 46%, rgba(8,14,20,.24) 100%);
}
[dir="rtl"] .band-media::after { background: linear-gradient(270deg, rgba(8,14,20,.90) 0%, rgba(8,14,20,.66) 46%, rgba(8,14,20,.24) 100%); }
.band.flip .band-media::after { background: linear-gradient(270deg, rgba(8,14,20,.90) 0%, rgba(8,14,20,.66) 46%, rgba(8,14,20,.24) 100%); }
[dir="rtl"] .band.flip .band-media::after { background: linear-gradient(90deg, rgba(8,14,20,.90) 0%, rgba(8,14,20,.66) 46%, rgba(8,14,20,.24) 100%); }
.band-body { position: relative; z-index: 2; width: 100%; padding-block: clamp(3rem, 6vw, 5rem); }
.band-inner { max-width: 46ch; }
.band.flip .band-inner { margin-inline-start: auto; }
.band h2 { color: #fff; font-weight: 300; }
.band p { color: #C3CDD7; }
.band .tick li { color: #B4C0CB; }
.band .tick li::before { background: var(--rose); }

/* ---- 14.4 Project showcase (large tiles) -------------------------------- */
.showcase { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(.7rem, 1.2vw, 1.1rem); }
.tile { position: relative; overflow: hidden; display: block; background: #0B141D; min-height: 240px; }
.tile img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform 1.2s var(--ease); }
.tile:hover img, .tile:focus-visible img { transform: scale(1.07); }
.tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,14,20,0) 34%, rgba(8,14,20,.86) 100%);
  transition: opacity .5s var(--ease);
}
.tile-txt { position: absolute; z-index: 2; inset-inline: 0; bottom: 0; padding: clamp(1.1rem,2vw,1.7rem); color: #fff; }
/* children are <span> so the markup stays inside one <a>; force block flow */
.tile-txt > span { display: block; }
.tile-k { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--rose); font-weight: 700; }
.tile-t { font-size: clamp(1rem,1.4vw,1.28rem); font-weight: 600; margin-top: .3rem; line-height: 1.25; }
.tile-l { font-size: var(--fs-sm); color: #A9B6C3; margin-top: .15rem; }
.tile-m { font-size: var(--fs-xs); color: #8C9AA8; margin-top: .55rem; letter-spacing: .04em; }
[dir="rtl"] .tile-k, [dir="rtl"] .tile-m { letter-spacing: 0; text-transform: none; }
/* Uniform row height keeps a mixed mosaic flush — no ragged gaps. */
.showcase { grid-auto-rows: clamp(160px, 15.5vw, 232px); }
.t-6  { grid-column: span 6;  grid-row: span 2; }
.t-4  { grid-column: span 4;  grid-row: span 2; }
.t-8  { grid-column: span 8;  grid-row: span 2; }
.t-3  { grid-column: span 3;  grid-row: span 2; }
.t-12 { grid-column: span 12; grid-row: span 1; }

/* ---- 14.5 Parallax figure ----------------------------------------------- */
/* NOTE: .plx is only ever applied to containers that are ALREADY absolutely
   positioned (.band-media, .cta-media). It must not declare `position` itself —
   same specificity as those classes, so it would win by source order, collapse
   them out of the absolute layer and render the photo at zero height. */
.plx { overflow: hidden; }
.plx img { width: 100%; height: 118%; object-fit: cover; position: absolute; inset-block-start: -9%; inset-inline: 0; will-change: transform; }

/* ---- 14.6 Leadership pair ----------------------------------------------- */
.leads { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem,3.5vw,3.2rem); }
.lead-card { display: grid; grid-template-columns: 128px 1fr; gap: 1.4rem; align-items: start; }
.lead-card img { width: 128px; aspect-ratio: 3/4; object-fit: cover; object-position: top center; }
.lead-card h3 { color: #fff; font-size: 1.12rem; }
.lead-card .r { font-size: var(--fs-xs); letter-spacing: .15em; text-transform: uppercase; color: var(--rose); font-weight: 600; margin: .25rem 0 .8rem; }
.lead-card p { font-size: var(--fs-sm); color: #AEBAC6; }
[dir="rtl"] .lead-card .r { letter-spacing: 0; text-transform: none; }

/* ---- 14.7 Numbered capability list -------------------------------------- */
.caplist { border-top: 1px solid var(--line); }
.cap {
  display: grid; grid-template-columns: 68px minmax(0,1fr) minmax(0,1.25fr) 44px;
  gap: clamp(1rem,2.5vw,2.4rem); align-items: center;
  padding-block: clamp(1.5rem,2.6vw,2.2rem); border-bottom: 1px solid var(--line);
  transition: background .35s var(--ease), padding-inline .35s var(--ease);
}
.cap:hover { background: var(--sand); padding-inline: clamp(.6rem,1.6vw,1.5rem); }
.cap-n { font-size: var(--fs-xs); letter-spacing: .14em; color: var(--maroon); font-weight: 700; }
.cap h3 { font-size: clamp(1.1rem,1.7vw,1.42rem); }
.cap p { font-size: var(--fs-sm); color: var(--ink-soft); }
.cap-a { display: grid; place-items: center; color: var(--ink-faint); transition: color .3s var(--ease), transform .3s var(--ease); }
.cap-a svg { width: 20px; height: 20px; }
[dir="rtl"] .cap-a svg { transform: scaleX(-1); }
.cap:hover .cap-a { color: var(--maroon); transform: translateX(5px); }
[dir="rtl"] .cap:hover .cap-a { transform: translateX(-5px); }

/* ---- 14.8 Responsive ---------------------------------------------------- */
@media (max-width: 980px) {
  .t-6, .t-4, .t-8, .t-3 { grid-column: span 6; grid-row: span 2; }
  .t-12 { grid-column: span 12; grid-row: span 2; }
  .leads { grid-template-columns: 1fr; }
  .cap { grid-template-columns: 44px minmax(0,1fr); }
  .cap p { grid-column: 2; }
  .cap-a { display: none; }
}
@media (max-width: 620px) {
  .t-6, .t-4, .t-8, .t-3, .t-12 { grid-column: span 12; grid-row: span 2; }
  .vhero { height: 92svh; min-height: 540px; }
  .vhero-foot { flex-direction: column; align-items: flex-start; }
  .lead-card { grid-template-columns: 96px 1fr; }
  .lead-card img { width: 96px; }
  .credbar .shell { gap: .65rem 1.4rem; }
}
