/* ==========================================================================
   templates.css — shared stylesheet for every inner page of mouazalsabbagh.com
   Loads after bootstrap.min.css + header.css + footer.css. No Noxfolio style.css.

   Brand tokens are unchanged (dark + var(--color-brand), DM Sans + Inter).
   What's new: a bilingual masthead (English title + Arabic counterpart) that every
   page opens with, a stricter type scale, and radius used by hierarchy, not by habit.
   ========================================================================== */

/* Bootstrap is only needed for the agreed footer grid. Importing it into a layer
   means every rule below wins over it without specificity fights. */
@import url("bootstrap.min.css") layer(vendor);

:root {
  --ink:var(--color-bg-deep);          /* page background */
  --surface:var(--color-bg);      /* alternate band */
  --raised:var(--color-surface-raised);       /* inputs, image wells */
  --line:var(--color-border);
  --line-strong:var(--color-border-strong);
  --text:var(--color-text-soft);
  --muted:var(--color-text-muted);
  --faint:var(--color-text-faint);
  --lime:var(--color-brand);
  --lime-ink:var(--color-on-brand);     /* text on lime */

  --f-display:var(--font-display);
  --f-body:var(--font-body);
  --f-arabic:var(--font-arabic);

  /* type scale — 1.25 steps from 16px, display sizes fluid */
  --t-xs: var(--fs-13);  /* 13 */
  --t-sm: var(--fs-14);   /* 14 */
  --t-base: var(--fs-16);     /* 16 */
  --t-md: var(--fs-18);   /* 18 */
  --t-lg: var(--fs-22);   /* 22 */
  --t-xl: var(--fs-28);    /* 28 */
  --t-2xl: var(--fs-fluid-2xl);      /* 32–44 */
  --t-3xl: var(--fs-fluid-3xl);       /* 40–64 */
  --t-mast: var(--fs-fluid-mast);        /* 56–144 */

  --wrap: 1280px;
  --gutter: 40px;
  --r-img:var(--radius-img);
  --r-btn:var(--radius-btn);
  
}

@media (max-width: 767.98px) {
  :root { --gutter: 20px;  }
}

/* ---------- base ---------- */
body.tpl {
  margin: 0;
  background: var(--ink);
  color: var(--muted);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:where(body.tpl) :where(h1, h2, h3, h4) {
  color: var(--text);
  font-family: var(--f-display);
  font-weight: 600;
  margin: 0;
}
:where(body.tpl) :where(p, ul, ol, figure, dl, dd) { margin: 0; }
:where(body.tpl) :where(a) { color: inherit; text-decoration: none; }
:where(body.tpl) :where(img) { max-width: 100%; display: block; }
body.tpl :focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 2px; }
body.tpl ::selection { background: var(--lime); color: var(--lime-ink); }
body.tpl .site-header .cta-button,
body.tpl .site-header .cta-button:hover { color: var(--color-ink); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 2000;
  background: var(--lime); color: var(--lime-ink) !important; padding: 10px 16px; border-radius: var(--r-btn);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.t-main { padding-top: var(--header-h); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

.band { padding: 120px 0; }
.band-tight { padding: 72px 0; }
.band-alt { background: var(--surface); }
@media (max-width: 767.98px) { .band { padding: 80px 0; } .band-tight { padding: 56px 0; } }

/* ---------- bilingual masthead (the signature) ---------- */
.mast { padding: 88px 0 56px; }
.mast-titles {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px 48px;
}
.mast-en {
  font-size: var(--t-mast);
  line-height: 0.88;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.mast-en .ln { display: block; overflow: hidden; padding-bottom: 0.16em; margin-bottom: -0.1em; }
.mast-en .ln > span { display: inline-block; }
.mast-ar {
  font-family: var(--f-arabic);
  font-weight: 500;
  color: var(--lime);
  font-size: calc(var(--t-mast) * 0.42);
  line-height: 1.2;
  text-align: right;
  padding-bottom: 0.2em;
}
.mast-foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}
.mast-lede {
  max-width: 58ch;
  font-size: var(--t-md);
  line-height: 1.6;
  color: var(--muted);
}
.mast-aside { font-size: var(--t-sm); color: var(--faint); text-align: right; white-space: nowrap; }
.mast-aside strong { display: block; color: var(--text); font-family: var(--f-display); font-size: var(--t-lg); font-weight: 600; }

@media (max-width: 991.98px) {
  .mast { padding: 56px 0 40px; }
  .mast-titles { grid-template-columns: 1fr; }
  .mast-ar { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .mast-foot { flex-direction: column; gap: 16px; }
  .mast-aside { text-align: left; }
}

/* The one orchestrated moment: masthead lines rise into place on load */
@media (prefers-reduced-motion: no-preference) {
  .mast-en .ln > span { animation: rise 0.9s var(--ease) both; }
  .mast-en .ln:nth-child(2) > span { animation-delay: 0.08s; }
  .mast-en .ln:nth-child(3) > span { animation-delay: 0.16s; }
  .mast-ar { animation: fade 0.9s 0.35s var(--ease) both; }
}
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- section heads ---------- */
.sec-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-bottom: 48px;
}
.sec-title { font-size: var(--t-3xl); line-height: 1.02; letter-spacing: -0.03em; }
.sec-note { max-width: 44ch; font-size: var(--t-base); color: var(--muted); }
@media (max-width: 767.98px) { .sec-head { flex-direction: column; align-items: flex-start; margin-bottom: 32px; } }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 28px;
  border-radius: var(--r-btn); border: 1px solid transparent;
  font-family: var(--f-body); font-size: var(--t-base); font-weight: 600;
  cursor: pointer; transition: background-color .25s, color .25s, border-color .25s;
}
.btn-lime { background: var(--lime); color: var(--lime-ink) !important; }
.btn-lime:hover { background: var(--color-brand-hover); }
.btn-line { background: transparent; color: var(--text) !important; border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--lime); color: var(--lime) !important; }
.btn svg { width: 18px; height: 18px; }

.link-u { color: var(--text); background-image: linear-gradient(var(--lime), var(--lime)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; padding-bottom: 2px; transition: color .2s; }
.link-u:hover { color: var(--lime); }

/* ---------- chips (filters, tags) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip {
  font-family: var(--f-body); font-size: var(--t-sm); font-weight: 500;
  color: var(--muted); background: transparent;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.chip .n { opacity: .6; margin-left: 6px; font-variant-numeric: tabular-nums; }
.tag { font-size: var(--t-sm); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; display: inline-block; }

/* ---------- works: toolbar, grid, index ---------- */
.works-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-bottom: 32px; margin-bottom: 40px; border-bottom: 1px solid var(--line);
}
.view-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.view-toggle button {
  background: none; border: 0; color: var(--muted); font: 500 var(--t-sm)/1 var(--f-body);
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
}
.view-toggle button[aria-pressed="true"] { background: var(--text); color: var(--ink); }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 32px; }
.work-grid[hidden], .work-index[hidden] { display: none; }
@media (max-width: 1024px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px)  { .work-grid { grid-template-columns: 1fr; gap: 40px; } }

.work-card a { display: block; }
.work-card .img { aspect-ratio: 576 / 620; overflow: hidden; border-radius: var(--r-img); background: var(--raised); }
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.work-card h3 { margin-top: 18px; font-size: var(--t-lg); letter-spacing: -0.01em; transition: color .2s; }
.work-card p { margin-top: 4px; font-size: var(--t-sm); color: var(--muted); }
.work-card a:hover img { transform: scale(1.035); }
.work-card a:hover h3 { color: var(--lime); }
.work-card[hidden] { display: none; }

.work-index { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.work-index li { border-bottom: 1px solid var(--line); }
.work-index li[hidden] { display: none; }
.work-index a {
  display: grid; grid-template-columns: minmax(0,2.2fr) minmax(0,1.6fr) minmax(0,1.1fr) minmax(0,1fr); gap: 24px; align-items: baseline;
  padding: 22px 4px; transition: color .2s, padding .3s var(--ease);
}
.work-index .nm { font-family: var(--f-display); font-size: var(--t-xl); font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
.work-index .cl, .work-index .cat { font-size: var(--t-sm); color: var(--muted); }
.work-index .ar { font-family: var(--f-arabic); font-size: var(--t-md); color: var(--faint); text-align: right; }
.work-index a:hover .nm { color: var(--lime); }
.work-index a:hover { padding-left: 14px; }
@media (max-width: 767.98px) {
  .work-index a { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .work-index .nm { font-size: var(--t-lg); }
  .work-index .cat { display: none; }
  .work-index .cl { grid-column: 1; grid-row: 2; }
  .work-index .ar { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
}
.peek {
  position: fixed; top: 0; left: 0; width: 280px; aspect-ratio: 576/620; z-index: 50;
  pointer-events: none; border-radius: var(--r-img); overflow: hidden;
  opacity: 0; transform: translate(-50%, -50%) scale(.92); transition: opacity .2s, transform .3s var(--ease);
  box-shadow: 0 30px 60px rgba(0,0,0,.5);
}
.peek img { width: 100%; height: 100%; object-fit: cover; }
.peek.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (hover: none), (max-width: 767.98px) { .peek { display: none; } }

.empty-note { padding: 48px 0; color: var(--muted); }

/* ---------- project detail ---------- */
.kv { border-radius: var(--r-img); overflow: hidden; background: var(--raised); aspect-ratio: 1200 / 628; }
.kv img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0; padding: 32px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: var(--t-sm); font-weight: 400; color: var(--faint); margin-bottom: 6px; }
.facts dd { margin: 0; color: var(--text); font-size: var(--t-md); font-weight: 500; line-height: 1.4; }
@media (max-width: 767.98px) { .facts { grid-template-columns: 1fr 1fr; } }

.result {
  display: grid; grid-template-columns: auto 1fr; gap: 16px 56px; align-items: end;
  padding: 72px 0; border-bottom: 1px solid var(--line);
}
.result .num { font-family: var(--f-display); font-weight: 600; color: var(--lime); font-size: clamp(5rem, 2rem + 12vw, 12rem); line-height: .82; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.result p { max-width: 40ch; font-size: var(--t-md); color: var(--muted); padding-bottom: 12px; }
.result p strong { color: var(--text); font-weight: 600; display: block; font-size: var(--t-lg); font-family: var(--f-display); margin-bottom: 6px; }
@media (max-width: 767.98px) { .result { grid-template-columns: 1fr; padding: 48px 0; } }

.story { display: grid; grid-template-columns: 1fr 2fr; gap: 32px 72px; padding: 72px 0; border-bottom: 1px solid var(--line); }
.story h2 { font-size: var(--t-xl); letter-spacing: -0.02em; }
.story .body { max-width: 64ch; }
.story .body p + p { margin-top: 1em; }
.story .body p { font-size: var(--t-md); line-height: 1.7; }
@media (max-width: 767.98px) { .story { grid-template-columns: 1fr; padding: 48px 0; } }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery figure { margin: 0; border-radius: var(--r-img); overflow: hidden; background: var(--raised); aspect-ratio: 410 / 310; }
.gallery figure.tall { aspect-ratio: auto; }
.gallery figure.tall { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767.98px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery figure.tall { grid-row: auto; } }

.next-project a { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); }
.next-project small { display: block; font-size: var(--t-sm); color: var(--faint); margin-bottom: 8px; }
.next-project .nm { font-family: var(--f-display); font-weight: 600; color: var(--text); font-size: var(--t-3xl); letter-spacing: -0.03em; line-height: 1; transition: color .2s; }
.next-project a:hover .nm { color: var(--lime); }
.next-project .img { aspect-ratio: 1200/628; border-radius: var(--r-img); overflow: hidden; }
.next-project img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767.98px) { .next-project a { grid-template-columns: 1fr; } }

/* ---------- lists: capabilities, pipeline, timeline ---------- */
.rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.rows > li { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px 64px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.rows h3 { font-size: var(--t-xl); letter-spacing: -0.02em; }
.rows h3 .ar { display: block; text-align: left; margin-top: 8px; font-family: var(--f-arabic); font-weight: 500; font-size: var(--t-md); color: var(--lime); letter-spacing: 0; }
.rows p { font-size: var(--t-md); line-height: 1.65; max-width: 60ch; }
.rows .chips { margin-top: 20px; }
.rows .more { margin-top: 20px; display: inline-block; }
@media (max-width: 767.98px) { .rows > li { grid-template-columns: 1fr; padding: 32px 0; } }

.pipeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); counter-reset: step; border-top: 1px solid var(--line-strong); }
.pipeline li { counter-increment: step; padding: 24px 20px 0 0; position: relative; }
.pipeline li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--f-display); font-weight: 600; font-size: var(--t-sm); color: var(--lime);
  font-variant-numeric: tabular-nums; margin-bottom: 20px;
}
.pipeline li::after { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.pipeline h3 { font-size: var(--t-lg); margin-bottom: 8px; }
.pipeline p { font-size: var(--t-sm); line-height: 1.6; }
@media (max-width: 1024px) { .pipeline { grid-template-columns: repeat(3, 1fr); row-gap: 40px; } }
@media (max-width: 575.98px) { .pipeline { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line-strong); padding-left: 24px; row-gap: 32px; } .pipeline li { padding: 0; } .pipeline li::after { left: -28px; top: 4px; } .pipeline li::before { margin-bottom: 8px; } }

.timeline { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 180px 1fr auto; gap: 8px 40px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.timeline .yr { font-family: var(--f-display); font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; font-size: var(--t-base); }
.timeline .role { color: var(--text); font-family: var(--f-display); font-weight: 600; font-size: var(--t-lg); }
.timeline .org { display: block; font-family: var(--f-body); font-weight: 400; font-size: var(--t-base); color: var(--muted); margin-top: 2px; }
.timeline .loc { font-size: var(--t-sm); color: var(--faint); }
.timeline li.now .yr { color: var(--lime); }
@media (max-width: 767.98px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- about ---------- */
.about-intro { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: start; }
.about-intro .portrait { border-radius: var(--r-img); overflow: hidden; background: var(--surface); }
.about-intro .portrait img { width: 100%; height: auto; }
.about-intro .lead { font-family: var(--f-display); color: var(--text); font-size: var(--t-2xl); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; }
.about-intro .body { margin-top: 32px; max-width: 60ch; }
.about-intro .body p { font-size: var(--t-md); line-height: 1.7; }
.about-intro .body p + p { margin-top: 1em; }
@media (max-width: 991.98px) { .about-intro { grid-template-columns: 1fr; gap: 40px; } .about-intro .portrait { max-width: 420px; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stats div { padding: 28px 24px 0 0; }
.stats strong { display: block; font-family: var(--f-display); font-weight: 600; color: var(--text); font-size: var(--t-3xl); letter-spacing: -0.03em; line-height: 1; }
.stats span { display: block; margin-top: 10px; font-size: var(--t-sm); color: var(--muted); }
@media (max-width: 767.98px) { .stats { grid-template-columns: 1fr 1fr; row-gap: 32px; } }

.awards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 40px; }
.awards li { padding: 22px 0; border-top: 1px solid var(--line); }
.awards .medal { font-family: var(--f-display); font-weight: 600; color: var(--text); font-size: var(--t-lg); }
.awards .medal .gold { color: var(--lime); }
.awards p { font-size: var(--t-sm); margin-top: 4px; }

.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.logos li { list-style: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 28px 20px; min-height: 110px; }
.logos img { max-height: 48px; width: auto; object-fit: contain; opacity: .85; }
.logos { padding: 0; margin: 0; }

/* ---------- AI engine ---------- */
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 64px; border-top: 1px solid var(--line); }
.cap-grid article { padding: 36px 0; border-bottom: 1px solid var(--line); }
.cap-grid h3 { font-size: var(--t-xl); letter-spacing: -0.02em; margin-bottom: 12px; }
.cap-grid p { font-size: var(--t-base); line-height: 1.7; max-width: 52ch; }
.cap-grid .chips { margin-top: 18px; }
@media (max-width: 767.98px) { .cap-grid { grid-template-columns: 1fr; } }

.toolbelt { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.toolbelt li { list-style: none; font-family: var(--f-display); font-weight: 500; color: var(--text); font-size: var(--t-lg); padding: 10px 20px; border: 1px solid var(--line-strong); border-radius: 999px; }
.toolbelt { padding: 0; margin: 0; }

/* ---------- blog ---------- */
.feature-post a { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
.feature-post .img { border-radius: var(--r-img); overflow: hidden; aspect-ratio: 406/373; background: var(--raised); }
.feature-post img, .post-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.feature-post a:hover img, .post-card a:hover img { transform: scale(1.03); }
.post-meta { font-size: var(--t-sm); color: var(--faint); display: flex; gap: 16px; flex-wrap: wrap; }
.post-meta .cat { color: var(--lime); }
.feature-post h2 { font-size: var(--t-3xl); letter-spacing: -0.03em; line-height: 1.05; margin: 16px 0 20px; transition: color .2s; }
.feature-post p { font-size: var(--t-md); max-width: 46ch; }
.feature-post a:hover h2, .post-card a:hover h3 { color: var(--lime); }
@media (max-width: 991.98px) { .feature-post a { grid-template-columns: 1fr; gap: 28px; } }

.post-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 40px; margin-top: 96px; padding-top: 56px; border-top: 1px solid var(--line); }
.post-card .img { border-radius: var(--r-img); overflow: hidden; aspect-ratio: 406/373; background: var(--raised); margin-bottom: 20px; }
.post-card h3 { font-size: var(--t-xl); line-height: 1.2; letter-spacing: -0.02em; margin: 10px 0; transition: color .2s; }
.post-card p { font-size: var(--t-base); max-width: 52ch; }
@media (max-width: 767.98px) { .post-list { grid-template-columns: 1fr; margin-top: 64px; } }

/* article */
.art-head { padding: 72px 0 88px; }
.art-head .wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: 64px; align-items: end; }
.art-head figure { margin: 0; border-radius: var(--r-img); overflow: hidden; aspect-ratio: 406/373; }
.art-head figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 991.98px) { .art-head { padding: 48px 0 56px; } .art-head .wrap { grid-template-columns: 1fr; gap: 40px; } }
.art-head h1 { font-size: var(--t-3xl); line-height: 1.04; letter-spacing: -0.035em; margin: 20px 0 24px; max-width: 18ch; }
.art-head .dek { font-size: var(--t-lg); color: var(--muted); max-width: 56ch; line-height: 1.5; }
.art-hero { border-radius: var(--r-img); overflow: hidden; margin: 0 0 72px; }
.art-hero img { width: 100%; max-height: 640px; object-fit: cover; }
.prose { font-size: var(--fs-18); line-height: 1.75; color: rgba(242,243,245,.78); }
.prose > * + * { margin-top: 1.1em; }
.prose > h2 { font-size: var(--t-xl); letter-spacing: -0.02em; line-height: 1.25; margin-top: 2.2em; }
.prose > h2 + * { margin-top: .5em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--lime); text-underline-offset: 3px; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--lime); }
.prose blockquote { margin: 2em 0; padding: 0 0 0 28px; border-left: 3px solid var(--lime); font-family: var(--f-display); font-size: var(--t-xl); line-height: 1.35; color: var(--text); font-weight: 500; letter-spacing: -0.01em; }
.prose figure { margin: 2em 0; }
.prose figcaption { font-size: var(--t-sm); color: var(--faint); margin-top: 10px; }
.art-foot { margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--line); display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.author { display: flex; gap: 16px; align-items: center; }
.author img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.author strong { display: block; color: var(--text); font-weight: 600; }
.author span { font-size: var(--t-sm); }
.share { display: flex; gap: 8px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
@media (max-width: 991.98px) { .contact-grid { grid-template-columns: 1fr; gap: 56px; } }
body.tpl .mail-hero { font-family: var(--f-display); font-weight: 600; color: var(--text); font-size: clamp(1.75rem, 0.9rem + 2.6vw, 2.875rem); letter-spacing: -0.035em; line-height: 1.1; overflow-wrap: anywhere; }
body.tpl .mail-hero:hover { color: var(--lime); }
.copy-row { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.reach { margin-top: 56px; border-top: 1px solid var(--line); }
.reach div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.reach dt { font-weight: 400; color: var(--faint); font-size: var(--t-sm); padding-top: 3px; }
.reach dd { margin: 0; color: var(--text); font-size: var(--t-md); }
.reach dd a:hover { color: var(--lime); }

.form { display: grid; gap: 22px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 575.98px) { .form .two { grid-template-columns: 1fr; } }
.field label { display: block; font-size: var(--t-sm); color: var(--text); margin-bottom: 8px; font-weight: 500; }
.field label .opt { color: var(--faint); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--raised); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; font: 400 var(--t-base)/1.5 var(--f-body);
  transition: border-color .2s, box-shadow .2s; appearance: none;
}
.field textarea { min-height: 168px; resize: vertical; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23F2F3F5' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field select option { background: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(var(--color-brand-rgb),.15); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field .err { display: none; color: var(--color-error); font-size: var(--t-sm); margin-top: 6px; }
.field.invalid input, .field.invalid textarea { border-color: var(--color-error); }
.field.invalid .err { display: block; }
.form-status { font-size: var(--t-sm); min-height: 1.5em; }
.form-status.ok { color: var(--lime); }
.form-status.bad { color: var(--color-error); }

/* ---------- closing band (before footer) ---------- */
.closer { padding: 120px 0; border-top: 1px solid var(--line); }
.closer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.closer h2 { font-size: var(--t-3xl); letter-spacing: -0.035em; line-height: 1.02; max-width: 14ch; }
.closer h2 .ar { display: block; text-align: left; font-family: var(--f-arabic); font-weight: 500; color: var(--lime); font-size: .5em; letter-spacing: 0; margin-top: 14px; }
.closer .acts { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 767.98px) { .closer { padding: 80px 0; } }

/* ---------- 404 ---------- */
.lost { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 72px 0 120px; }
.lost img { width: 100%; max-width: 520px; border-radius: var(--r-img); }
.lost h2 { font-size: var(--t-2xl); letter-spacing: -0.02em; margin-bottom: 16px; }
.lost p { font-size: var(--t-md); max-width: 46ch; margin-bottom: 28px; }
.lost ul { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.lost li a { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--text); font-family: var(--f-display); font-weight: 500; font-size: var(--t-lg); }
.lost li a span { color: var(--faint); font-family: var(--f-body); font-size: var(--t-sm); font-weight: 400; }
.lost li a:hover { color: var(--lime); }
@media (max-width: 991.98px) { .lost { grid-template-columns: 1fr; padding-top: 24px; } .lost img { max-width: 320px; } }

/* ---------- footer tweaks for inner pages (bootstrap reboot sets blue links) ---------- */
body.tpl .main-footer { overflow-x: clip; }
body.tpl .main-footer a { color: inherit; }
body.tpl .social-style-one a { display: flex; align-items: center; justify-content: center; line-height: 1; }
body.tpl .main-footer .copyright-text a { color: var(--lime); }
body.tpl .main-footer .footer-sitemap a { color: rgba(255,255,255,.45); }
body.tpl .main-footer .footer-sitemap a:hover,
body.tpl .main-footer .widget_nav_menu a:hover { color: var(--lime); }
body.tpl .main-footer .widget_nav_menu ul li a { color: rgba(255,255,255,.65); }

/* utilities */
.mt-s { margin-top: 24px; } .mt-m { margin-top: 48px; } .mt-l { margin-top: 96px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   v2 additions — components for the full content set (Oct 2026)
   ========================================================================== */

/* statement line under the masthead title (the page's real headline) */
.mast-statement {
  margin-top: 32px; max-width: 26ch;
  font-family: var(--f-display); font-weight: 500; color: var(--text);
  font-size: var(--t-2xl); line-height: 1.15; letter-spacing: -0.02em;
}
.mast-quote {
  margin-top: 40px; max-width: 40ch; padding-left: 24px; border-left: 3px solid var(--lime);
  font-family: var(--f-display); font-weight: 500; color: var(--text);
  font-size: var(--t-xl); line-height: 1.35; letter-spacing: -0.01em;
}
.mast-aside .tagline { display: block; color: var(--muted); font-size: var(--t-sm); white-space: normal; max-width: 22ch; margin-left: auto; }
@media (max-width: 991.98px) { .mast-aside .tagline { margin-left: 0; } }

/* project cards without a key visual yet */
.work-card .img.noimg, .next-project .img.noimg {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 24px;
  background: var(--surface); border: 1px solid var(--line);
}
.noimg .ar { font-family: var(--f-arabic); font-weight: 500; color: var(--lime); font-size: var(--t-xl); line-height: 1.3; text-align: right; }
.noimg .en { font-size: var(--t-sm); color: var(--faint); }
.work-card .metric { margin-top: 10px; font-size: var(--t-sm); color: var(--lime); font-weight: 500; }

/* small stat row (project detail, pillar pages) */
.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.minis strong { display: block; font-family: var(--f-display); font-weight: 600; color: var(--text); font-size: var(--t-2xl); letter-spacing: -0.02em; line-height: 1.05; }
.minis span { display: block; margin-top: 6px; font-size: var(--t-sm); color: var(--muted); max-width: 30ch; }
@media (max-width: 767.98px) { .minis { grid-template-columns: 1fr; } }

/* split statement block: heading left, prose right */
.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px 72px; padding: 72px 0; border-top: 1px solid var(--line); }
.split h2 { font-size: var(--t-3xl); letter-spacing: -0.03em; line-height: 1.02; }
.split .body p { font-size: var(--t-md); line-height: 1.7; max-width: 60ch; }
.split .body p + p { margin-top: 1em; }
.split .note { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text); font-size: var(--t-base); line-height: 1.6; max-width: 60ch; }
@media (max-width: 991.98px) { .split { grid-template-columns: 1fr; padding: 48px 0; } }

/* client names, typographic */
.clients { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.clients li { padding: 28px 24px 28px 0; border-bottom: 1px solid var(--line); font-family: var(--f-display); font-weight: 500; color: var(--text); font-size: var(--t-xl); letter-spacing: -0.015em; }
.clients li span { display: block; font-family: var(--f-body); font-weight: 400; font-size: var(--t-sm); color: var(--faint); letter-spacing: 0; margin-top: 4px; }
@media (max-width: 767.98px) { .clients { grid-template-columns: 1fr 1fr; } .clients li { font-size: var(--t-lg); } }

/* sectors list */
.sectors { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 64px; }
.sectors li { break-inside: avoid; padding: 16px 0; border-top: 1px solid var(--line); color: var(--text); font-size: var(--t-md); }
@media (max-width: 767.98px) { .sectors { columns: 1; } }

/* AI engine steps with tools */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; border-top: 1px solid var(--line-strong); }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 80px 1fr 1.5fr; gap: 16px 40px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.steps > li::before { content: counter(s, decimal-leading-zero); font-family: var(--f-display); font-weight: 600; color: var(--lime); font-size: var(--t-lg); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: var(--t-xl); letter-spacing: -0.02em; }
.steps .tools { margin-top: 10px; font-size: var(--t-sm); color: var(--muted); }
.steps p { font-size: var(--t-base); line-height: 1.7; max-width: 60ch; }
@media (max-width: 767.98px) { .steps > li { grid-template-columns: 1fr; gap: 8px; padding: 28px 0; } }

/* module blocks (AI pipeline) */
.module { padding: 64px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.5fr; gap: 32px 72px; }
.module h2 { font-size: var(--t-2xl); letter-spacing: -0.02em; line-height: 1.1; }
.module h2 small { display: block; margin-top: 10px; font-family: var(--f-body); font-weight: 400; font-size: var(--t-base); color: var(--muted); letter-spacing: 0; }
.module dl { margin: 0; }
.module dl div { padding: 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 160px 1fr; gap: 12px 24px; }
.module dl div:first-child { border-top: 0; padding-top: 0; }
.module dt { color: var(--text); font-weight: 600; font-size: var(--t-base); }
.module dd { margin: 0; font-size: var(--t-base); line-height: 1.7; }
@media (max-width: 991.98px) { .module { grid-template-columns: 1fr; padding: 48px 0; } .module dl div { grid-template-columns: 1fr; gap: 4px; } }

/* tech matrix */
.matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; }
.matrix section { border-top: 2px solid var(--lime); padding-top: 20px; }
.matrix h3 { font-size: var(--t-lg); margin-bottom: 16px; }
.matrix ul { list-style: none; padding: 0; margin: 0; }
.matrix li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: var(--t-base); line-height: 1.45; }
@media (max-width: 1024px) { .matrix { grid-template-columns: 1fr 1fr; row-gap: 48px; } }
@media (max-width: 575.98px) { .matrix { grid-template-columns: 1fr; } }

/* downloads */
.dl-group + .dl-group { margin-top: 96px; }
.dl-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.dl-list li { display: grid; grid-template-columns: 1.2fr 1.8fr auto; gap: 16px 40px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); }
.dl-list h3 { font-size: var(--t-lg); letter-spacing: -0.01em; }
.dl-list .fmt { display: block; margin-top: 6px; font-size: var(--t-sm); color: var(--faint); }
.dl-list p { font-size: var(--t-base); line-height: 1.6; max-width: 56ch; }
.dl-list .roles { display: block; margin-top: 8px; font-size: var(--t-sm); color: var(--text); }
@media (max-width: 991.98px) { .dl-list li { grid-template-columns: 1fr; } .dl-list .btn { justify-self: start; } }

/* sitemap directory */
.dir { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.dir li a { display: grid; grid-template-columns: 1.1fr 0.9fr 2fr; gap: 8px 32px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.dir .nm { color: var(--text); font-family: var(--f-display); font-weight: 600; font-size: var(--t-lg); transition: color .2s; }
.dir .path { font-size: var(--t-sm); color: var(--faint); }
.dir .ds { font-size: var(--t-base); color: var(--muted); }
.dir li a:hover .nm { color: var(--lime); }
@media (max-width: 767.98px) { .dir li a { grid-template-columns: 1fr; gap: 4px; } }
.cs-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; }
.cs-cols h3 { font-size: var(--t-lg); border-top: 2px solid var(--lime); padding-top: 16px; margin-bottom: 8px; }
.cs-cols ul { list-style: none; padding: 0; margin: 0; }
.cs-cols li a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: var(--t-base); line-height: 1.4; }
.cs-cols li a:hover { color: var(--lime); }
@media (max-width: 1024px) { .cs-cols { grid-template-columns: 1fr 1fr; row-gap: 48px; } }
@media (max-width: 575.98px) { .cs-cols { grid-template-columns: 1fr; } }

/* pillar switcher at the end of pillar pages */
.pillar-nav { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.pillar-nav a { padding: 28px 24px 28px 0; border-bottom: 1px solid var(--line); }
.pillar-nav a strong { display: block; color: var(--text); font-family: var(--f-display); font-weight: 600; font-size: var(--t-lg); transition: color .2s; }
.pillar-nav a span { font-size: var(--t-sm); color: var(--muted); }
.pillar-nav a:hover strong, .pillar-nav a[aria-current] strong { color: var(--lime); }
@media (max-width: 767.98px) { .pillar-nav { grid-template-columns: 1fr 1fr; } }

.closer .manifesto { margin-top: 20px; max-width: 52ch; font-size: var(--t-base); color: var(--muted); }

@media (max-width: 479.98px) { .mast-en { font-size: clamp(2.5rem, 12vw, 3.5rem); } }
.mast-quote + .mast-foot, .mast-statement + .mast-foot { margin-top: 40px; }

/* ==========================================================================
   v3 additions — client archive, trusted-by list (Oct 12 2026)
   ========================================================================== */
.filter-note { font-size: var(--t-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.sub-title { font-size: var(--t-xl); letter-spacing: -0.02em; margin: 0 0 28px; }

.archive-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line-strong); }
.archive { width: 100%; border-collapse: collapse; font-size: var(--t-base); }
.archive thead th { text-align: left; font-weight: 500; font-size: var(--t-sm); color: var(--faint); padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.archive tbody th, .archive td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.archive tbody th { text-align: left; font-family: var(--f-display); font-weight: 600; color: var(--text); font-size: var(--t-md); }
.archive tbody th a { color: var(--text); background-image: linear-gradient(var(--lime), var(--lime)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat; }
.archive tbody th a:hover { color: var(--lime); }
.archive .cs { margin-left: 10px; font-family: var(--f-body); font-weight: 500; font-size: var(--fs-12); color: var(--lime-ink); background: var(--lime); border-radius: 999px; padding: 2px 8px; vertical-align: 2px; }
.archive td { color: var(--muted); font-size: var(--t-sm); }
.archive .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 0; }
.archive tbody td.num:last-child { color: var(--text); font-family: var(--f-display); font-weight: 600; font-size: var(--t-md); }
.archive tr[hidden] { display: none; }
@media (max-width: 767.98px) {
  .archive thead th:nth-child(3), .archive td:nth-child(3), .archive thead th:nth-child(2), .archive td:nth-child(2) { display: none; }
}

.trusted { list-style: none; padding: 0; margin: 0; columns: 4; column-gap: 40px; border-top: 1px solid var(--line); padding-top: 12px; }
.trusted li { break-inside: avoid; padding: 9px 0; color: var(--text); font-family: var(--f-display); font-weight: 500; font-size: var(--t-md); border-bottom: 1px solid var(--line); }
@media (max-width: 1024px) { .trusted { columns: 3; } }
@media (max-width: 767.98px) { .trusted { columns: 2; column-gap: 24px; } .trusted li { font-size: var(--t-base); } }
.awards .medal { display: block; }

/* Visible breadcrumb (matches the BreadcrumbList JSON-LD) */
.crumbs { margin: 0 0 28px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin: 0; padding: 0; list-style: none; font-size: var(--fs-14); letter-spacing: .02em; }
.crumbs li { display: inline-flex; align-items: center; color: rgba(255,255,255,.55); }
.crumbs li + li::before { content: "/"; margin: 0 12px; color: rgba(255,255,255,.28); }
.crumbs a { color: rgba(255,255,255,.75); text-decoration: none; transition: color .2s; }
.crumbs a:hover, .crumbs a:focus-visible { color: var(--color-brand); }
.crumbs [aria-current="page"] { color: var(--color-brand); }

/* Footer on template pages — match index.html exactly (style.css isn't loaded here) */
body.tpl .main-footer .row { --bs-gutter-x: 30px; }
body.tpl .main-footer .widget_nav_menu { width: fit-content; margin-left: auto; }
body.tpl .main-footer hr { opacity: 1; border: 0; border-top: 1px solid transparent; color: var(--color-coal); background-color: var(--color-coal); }
body.tpl .main-footer .social-style-one a { display: block; color: var(--color-grey-450); font-size: var(--fs-14); line-height: 40px; text-align: center; }
@media (max-width: 767.98px) { body.tpl .main-footer .widget_nav_menu { margin-left: auto; margin-right: auto; } }
body.tpl .main-footer .social-style-one a img { display: inline-block; vertical-align: middle; }
body.tpl .main-footer .widget_logo .logo-outer, body.tpl .main-footer .widget_logo .logo { display: inline-block; }

/* Figma Component 27, node 798:77725; scoped to Contact submission. */
@font-face {
  font-family: 'Contact Envelope';
  src: url('../vendor/fontawesome-5.15.4/webfonts/fa-regular-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
.form .contact-submit {
  --contact-submit-green:var(--color-brand);
  box-sizing: border-box;
  width: 172px;
  height: 50px;
  min-height: 50px;
  padding: 10px 17px;
  gap: 8px;
  border: 0;
  border-radius: 15px;
  background: var(--contact-submit-green);
  color: var(--color-ink) !important;
  font-family: var(--f-body);
  font-size: var(--fs-16);
  font-weight: 600;
  line-height: 30px;
  text-transform: none;
  white-space: nowrap;
}


.contact-submit-icon {
  display: inline-block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  font-family: 'Contact Envelope';
  font-style: normal;
  font-weight: 400;
  font-size: var(--fs-16);
  line-height: 16px;
  text-align: center;
}
.contact-submit-icon::before { content: '\f0e0'; }

/* Contact profile destinations wrap without crowding on small screens. */
.contact-profiles { display:flex; flex-wrap:wrap; gap:10px 16px; align-items:baseline; }
