/* ==========================================================================
   Startify — site stylesheet
   The whole identity borrows from architectural drawing sets: tracing paper,
   ink linework, dimension strings, level datums, title blocks and one red
   markup pen. If a new component needs a look, ask "how would this appear on
   a drawing sheet?" before reaching for a card or a shadow.
   ========================================================================== */

:root {
  /* Colour — cool grey tracing paper, not cream. Ink, graphite, one red pen. */
  --paper: #E7E6E1;
  --paper-2: #DCDBD5;          /* a sheet laid under another sheet */
  --ink: #111110;
  --graphite: #54534E;         /* secondary text, 6.2:1 on paper */
  --line: rgba(17, 17, 16, .16);
  --line-strong: rgba(17, 17, 16, .42);
  --grid-minor: rgba(17, 17, 16, .045);
  --grid-major: rgba(17, 17, 16, .085);
  --red: #F2380F;              /* markup / redline. Graphics + large type only */
  --red-text: #B02404;         /* red that passes 4.5:1 on both paper tones for small text */
  --night: #111110;
  --night-2: #1C1C1A;
  --night-line: rgba(231, 230, 225, .16);

  /* Type */
  --f-display: "Archivo", "Noto Kufi Arabic", system-ui, sans-serif;
  --f-body: "Archivo", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Space — 8pt, with a 4 for hairline adjustments */
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px;
  --s6: 48px; --s7: 64px; --s8: 96px; --s9: 144px;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

html[lang="ar"] {
  --f-display: "Noto Kufi Arabic", "Archivo", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Archivo", system-ui, sans-serif;
}

/* ---------- Language switching: both scripts live in the markup ---------- */
html[lang="ar"] .en { display: none !important; }
html:not([lang="ar"]) .ar { display: none !important; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="ar"] body { font-size: 17.5px; line-height: 1.75; }
img, svg { display: block; max-width: 100%; }
/* Drawings keep left-to-right geometry in Arabic; Arabic text inside sets direction="rtl" itself */
svg { direction: ltr; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--red); color: var(--paper); }

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

.skip {
  position: absolute; inset-inline-start: var(--s3); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: var(--s2) var(--s3);
  font-family: var(--f-mono); font-size: 13px; text-decoration: none;
}
.skip:focus { top: var(--s3); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 10vw, 144px); position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section--night { background: var(--night); color: var(--paper); border-top: 0 !important; }
.section--night + .section { border-top: 0; }
.section--sheet { background: var(--paper-2); }

.grid-paper {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}
.section--night.grid-paper {
  background-color: var(--night);
  background-image:
    linear-gradient(rgba(231,230,225,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231,230,225,.07) 1px, transparent 1px),
    linear-gradient(rgba(231,230,225,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231,230,225,.03) 1px, transparent 1px);
}

/* ---------- Type ---------- */
.mono, .tag, .sec-tag, .caption {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .04em;
  line-height: 1.5;
  text-transform: uppercase;
  font-variation-settings: normal;
}
html[lang="ar"] .sec-tag .ar, html[lang="ar"] .tag .ar, html[lang="ar"] .caption .ar, html[lang="ar"] .mono .ar {
  font-family: "IBM Plex Sans Arabic", sans-serif; font-size: 13px; letter-spacing: 0; text-transform: none;
}

.display {
  font-family: var(--f-display);
  font-weight: 800;
  font-variation-settings: "wdth" 108;
  font-size: clamp(36px, 6.2vw, 100px);
  line-height: .94;
  letter-spacing: -.035em;
}
html[lang="ar"] .display { font-weight: 800; line-height: 1.35; letter-spacing: 0; font-size: clamp(32px, 5vw, 80px); }

.h1 {
  font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 115;
  font-size: clamp(38px, 6.2vw, 96px); line-height: .95; letter-spacing: -.03em;
}
.h2 {
  font-family: var(--f-display); font-weight: 750; font-variation-settings: "wdth" 112;
  font-size: clamp(30px, 4.2vw, 60px); line-height: 1; letter-spacing: -.025em;
}
.h3 {
  font-family: var(--f-display); font-weight: 700; font-variation-settings: "wdth" 108;
  font-size: clamp(21px, 2vw, 28px); line-height: 1.12; letter-spacing: -.012em;
}
html[lang="ar"] :is(.h1, .h2, .h3) { letter-spacing: 0; line-height: 1.35; }
html[lang="ar"] .h1 { font-size: clamp(34px, 5vw, 76px); }
html[lang="ar"] .h2 { font-size: clamp(27px, 3.4vw, 48px); }

.lede { font-size: clamp(18px, 1.55vw, 22px); line-height: 1.5; max-width: 38em; color: var(--ink); }
html[lang="ar"] .lede { line-height: 1.8; }
.muted { color: var(--graphite); }
.section--night .muted { color: rgba(231,230,225,.66); }
.measure { max-width: 34em; }

/* Section tag: "SEC. 02 ——— SERVICES" */
.sec-tag {
  display: flex; align-items: center; gap: var(--s3);
  color: var(--graphite); margin-bottom: var(--s5);
}
.sec-tag::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .5; }
.sec-tag b { color: var(--ink); font-weight: 500; }
.section--night .sec-tag { color: rgba(231,230,225,.6); }
.section--night .sec-tag b { color: var(--paper); }

/* Section heading row: title left, note right */
.sec-head {
  display: grid; gap: var(--s4); align-items: end;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  margin-bottom: clamp(40px, 6vw, 80px);
}
@media (max-width: 860px) { .sec-head { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Drawing primitives ---------- */

/* Dimension string: |←—— 9 000 ——→| */
.dim {
  display: flex; align-items: center; gap: var(--s2);
  font-family: var(--f-mono); font-size: 11px; color: var(--graphite);
  letter-spacing: .04em; white-space: nowrap;
}
.dim::before, .dim::after {
  content: ""; flex: 1; height: 9px;
  border-inline-start: 1px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
}
.dim::after { border-inline-start: 0; border-inline-end: 1px solid currentColor; }

/* Level datum: ▽ +08.00 */
.datum {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; color: var(--graphite);
}
.datum::before {
  content: ""; width: 10px; height: 8px; background: currentColor;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* Honest label for concept work */
.stamp {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--red-text); color: var(--red-text);
  padding: 3px 7px; font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1.3;
}
html[lang="ar"] .stamp .ar { font-family: "IBM Plex Sans Arabic"; letter-spacing: 0; font-size: 12px; }
.section--night .stamp { border-color: var(--red); color: var(--red); }

/* Crop marks on framed drawings */
.cropped { position: relative; }
.cropped::before, .cropped::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--line-strong); border-style: solid;
}
.cropped::before { top: -8px; inset-inline-start: -8px; border-width: 1px 0 0 1px; }
.cropped::after { bottom: -8px; inset-inline-end: -8px; border-width: 0 1px 1px 0; }
html[dir="rtl"] .cropped::before { border-width: 1px 1px 0 0; }
html[dir="rtl"] .cropped::after { border-width: 0 0 1px 1px; }

/* SVG linework */
.lw { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: square; stroke-linejoin: miter; vector-effect: non-scaling-stroke; }
.lw-thin { fill: none; stroke: currentColor; stroke-width: .75; opacity: .55; vector-effect: non-scaling-stroke; }
.lw-heavy { fill: none; stroke: currentColor; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.lw-dash { fill: none; stroke: currentColor; stroke-width: .9; stroke-dasharray: 5 4; opacity: .7; vector-effect: non-scaling-stroke; }
.lw-red { fill: none; stroke: var(--red); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.fill-ink { fill: currentColor; stroke: none; }
.fill-soft { fill: currentColor; opacity: .08; stroke: none; }
.svg-label { font-family: var(--f-mono); font-size: 11px; fill: currentColor; letter-spacing: .04em; }
.svg-label--red { fill: var(--red); }
.svg-type { font-family: "Archivo", sans-serif; font-weight: 800; font-variation-settings: "wdth" 115; fill: currentColor; letter-spacing: -.02em; }
.svg-type-ar { font-family: "Noto Kufi Arabic", sans-serif; font-weight: 800; fill: currentColor; }

/* Line drawing reveal. JS sets pathLength=1 on shapes inside [data-draw]. */
[data-draw] .lw, [data-draw] .lw-heavy, [data-draw] .lw-red, [data-draw] .lw-thin {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s var(--ease);
}
[data-draw].is-drawn .lw, [data-draw].is-drawn .lw-heavy, [data-draw].is-drawn .lw-red, [data-draw].is-drawn .lw-thin { stroke-dashoffset: 0; }
[data-draw] .svg-label, [data-draw] .svg-type, [data-draw] .svg-type-ar, [data-draw] .fill-ink, [data-draw] .fill-soft, [data-draw] .lw-dash, [data-draw] .hatch {
  opacity: 0; transition: opacity .6s ease .7s;
}
[data-draw].is-drawn .svg-label, [data-draw].is-drawn .svg-type, [data-draw].is-drawn .svg-type-ar, [data-draw].is-drawn .fill-ink, [data-draw].is-drawn .lw-dash, [data-draw].is-drawn .hatch { opacity: 1; }
[data-draw].is-drawn .fill-soft { opacity: .08; }
[data-draw].is-drawn .lw-thin { opacity: .55; }
.no-js [data-draw] * { stroke-dashoffset: 0 !important; opacity: 1; }

/* ---------- Buttons ---------- */
.btn {
  --bg: transparent; --fg: var(--ink); --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: space-between; gap: var(--s4);
  min-height: 52px; padding: 0 20px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  font-family: var(--f-body); font-weight: 600; font-size: 16px; text-decoration: none;
  font-variation-settings: "wdth" 106;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  border-radius: 0;
}
.btn--primary { --bg: var(--ink); --fg: var(--paper); }
.btn--primary:hover { --bg: var(--red); --bd: var(--red); --fg: var(--ink); }
.btn--ghost:hover { --bg: var(--ink); --fg: var(--paper); }
.btn--small { min-height: 40px; padding: 0 14px; font-size: 14.5px; gap: var(--s3); }
.section--night .btn { --fg: var(--paper); --bd: var(--paper); }
.section--night .btn--primary { --bg: var(--paper); --fg: var(--ink); }
.section--night .btn--primary:hover { --bg: var(--red); --bd: var(--red); --fg: var(--ink); }
.section--night .btn--ghost:hover { --bg: var(--paper); --fg: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

.arrow { width: 18px; height: 12px; flex: none; transition: transform .25s var(--ease); }
html[dir="rtl"] .arrow { transform: scaleX(-1); }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] .btn:hover .arrow, html[dir="rtl"] .link-arrow:hover .arrow { transform: scaleX(-1) translateX(4px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; text-decoration: none;
  background: linear-gradient(var(--red), var(--red)) 0 100% / 0 2px no-repeat;
  padding-bottom: 3px; transition: background-size .3s var(--ease);
}
html[dir="rtl"] .link-arrow { background-position: 100% 100%; }
.link-arrow:hover { background-size: 100% 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(231, 230, 225, .92);
  backdrop-filter: saturate(1.2) blur(8px); -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar { display: flex; align-items: center; gap: var(--s4); height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-inline-end: auto; }
.logo svg { width: 28px; height: 28px; }
.logo__word {
  font-family: "Archivo", sans-serif; font-weight: 800; font-size: 21px; letter-spacing: -.03em;
  font-variation-settings: "wdth" 120; line-height: 1;
}
.logo__loc { font-family: var(--f-mono); font-size: 10.5px; color: var(--graphite); letter-spacing: .06em; padding-inline-start: 10px; border-inline-start: 1px solid var(--line-strong); line-height: 1.2; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  font-size: 15px; font-weight: 500; text-decoration: none; background: none; border: 0;
  position: relative;
}
.nav__link[aria-current="page"]::after, .nav__link:hover::after {
  content: ""; position: absolute; inset-inline: 12px; bottom: 6px; height: 2px; background: var(--red);
}
.nav__caret { width: 9px; height: 6px; transition: transform .2s ease; }
.nav__link[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }
.lang-toggle {
  height: 40px; min-width: 44px; padding: 0 10px; border: 1px solid var(--line-strong); background: none;
  font-family: "Noto Kufi Arabic", var(--f-mono); font-size: 14px; font-weight: 600;
}
html[lang="ar"] .lang-toggle { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .06em; }
.lang-toggle:hover { border-color: var(--ink); }
.cad {
  font-family: var(--f-mono); font-size: 10.5px; color: var(--graphite); letter-spacing: .04em;
  min-width: 128px; font-variant-numeric: tabular-nums; direction: ltr;
}
@media (hover: none), (max-width: 1180px) { .cad { display: none; } }

.menu-btn { display: none; height: 40px; padding: 0 12px; border: 1px solid var(--ink); background: none; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; }
@media (max-width: 900px) {
  .nav, .site-header__bar > .btn { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .logo__loc { display: none; }
}

/* Services directory — styled like a tower lobby directory */
.directory {
  position: absolute; inset-inline: 0; top: 100%;
  background: var(--ink); color: var(--paper);
  border-top: 1px solid var(--ink);
  display: none;
}
.directory.is-open { display: block; }
.directory__inner { display: grid; grid-template-columns: 280px 1fr; gap: var(--s6); padding-block: var(--s6) var(--s7); }
.directory__intro p { color: rgba(231,230,225,.7); font-size: 15px; margin-top: var(--s3); }
.directory__list li + li { border-top: 1px solid var(--night-line); }
.directory__item {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: var(--s4);
  padding: 18px 0; text-decoration: none;
}
.directory__lvl { font-family: var(--f-mono); font-size: 12px; color: rgba(231,230,225,.55); }
.directory__name { font-family: var(--f-display); font-size: 26px; font-weight: 700; font-variation-settings: "wdth" 112; letter-spacing: -.015em; }
html[lang="ar"] .directory__name { letter-spacing: 0; font-size: 22px; }
.directory__note { font-size: 14px; color: rgba(231,230,225,.6); }
.directory__item:hover .directory__name { color: var(--red); }
.directory__item:hover .directory__lvl { color: var(--paper); }

/* Mobile menu */
.mobile-menu {
  position: fixed; z-index: 49; inset: calc(var(--header-h) + 1px) 0 auto;
  height: calc(100vh - var(--header-h) - 1px);
  height: calc(100dvh - var(--header-h) - 1px);
  background: var(--ink); color: var(--paper);
  overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
  display: none; padding-block: var(--s5) calc(var(--s7) + env(safe-area-inset-bottom));
}
.mobile-menu.is-open { display: block; }
.mobile-menu a { text-decoration: none; }
.mobile-menu__main a { display: block; font-family: var(--f-display); font-weight: 800; font-variation-settings: "wdth" 115; font-size: 40px; letter-spacing: -.02em; padding: 6px 0; }
html[lang="ar"] .mobile-menu__main a { font-size: 32px; letter-spacing: 0; }
.mobile-menu .directory__item { grid-template-columns: 48px 1fr; }
.mobile-menu .directory__note { display: none; }
.mobile-menu .directory__name { font-size: 20px; }
.mobile-menu__foot { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s6); }
.mobile-menu .btn { --fg: var(--paper); --bd: var(--paper); }
.mobile-menu .btn--primary { --bg: var(--paper); --fg: var(--ink); }
.mobile-menu .lang-toggle { border-color: var(--night-line); align-self: flex-start; }
html.menu-open, body.menu-open { overflow: hidden; }

/* ---------- Footer: a drawing sheet title block ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-top: clamp(64px, 9vw, 120px); }
.site-footer__cta { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s6); align-items: end; padding-bottom: clamp(56px, 8vw, 104px); }
@media (max-width: 860px) { .site-footer__cta { grid-template-columns: minmax(0, 1fr); } }
.site-footer__cta .btn { --fg: var(--paper); --bd: var(--paper); }
.site-footer__cta .btn--primary { --bg: var(--paper); --fg: var(--ink); }
.site-footer__cta .btn--primary:hover { --bg: var(--red); --bd: var(--red); }
.site-footer__cta .btn--ghost:hover { --bg: var(--paper); --fg: var(--ink); }

.titleblock {
  display: grid; border: 1px solid var(--night-line); margin-bottom: var(--s5);
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1.3fr;
}
.titleblock > div { padding: 14px 16px; border-inline-end: 1px solid var(--night-line); min-width: 0; }
.titleblock > div:last-child { border-inline-end: 0; }
.titleblock dt { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; color: rgba(231,230,225,.5); text-transform: uppercase; margin-bottom: 6px; }
.titleblock dd { font-size: 14.5px; line-height: 1.5; }
.titleblock dd a { text-decoration: none; }
.titleblock dd a:hover { color: var(--red); }
.titleblock__sheet dd { font-family: var(--f-display); font-weight: 800; font-size: 34px; line-height: 1; font-variation-settings: "wdth" 115; }
.titleblock__links { display: grid; gap: 2px; }
@media (max-width: 1000px) {
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock > div { border-bottom: 1px solid var(--night-line); }
  .titleblock > div:first-child { grid-column: 1 / -1; }
  .titleblock > div:nth-child(odd) { border-inline-end: 0; }
  .titleblock > div:first-child { border-inline-end: 0; }
  .titleblock > div:nth-child(even) { border-inline-end: 1px solid var(--night-line); }
}
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); padding-bottom: var(--s5); font-family: var(--f-mono); font-size: 11px; color: rgba(231,230,225,.5); letter-spacing: .04em; }
.footer-base a { text-decoration: none; }
.footer-base a:hover { color: var(--paper); }

/* ---------- Hero (home) ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px);
  padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 96px); align-items: center;
}
.hero__meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin-bottom: var(--s5); color: var(--graphite); }
.hero__meta > span + span::before { content: "/"; margin-inline-end: var(--s4); opacity: .5; }
.hero h1 { margin-bottom: var(--s6); }
.hero .lede { margin-bottom: var(--s6); }
.hero__status {
  display: inline-flex; align-items: center; gap: 10px; margin-top: var(--s5);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--graphite);
}
.hero__status i { width: 8px; height: 8px; background: var(--red); display: inline-block; animation: blink 2.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: .2; } }
@media (max-width: 1000px) { .hero__inner { grid-template-columns: minmax(0, 1fr); } }

/* Redline markup around a phrase */
.markup { position: relative; display: inline-block; white-space: nowrap; isolation: isolate; }
.markup svg {
  position: absolute; top: -24%; inset-inline-start: -7%; width: 114%; height: 142%; max-width: none;
  overflow: visible; pointer-events: none; z-index: -1;
}
.markup path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: markup 1.1s .6s var(--ease) forwards; }
@keyframes markup { to { stroke-dashoffset: 0; } }
.markup__note {
  position: absolute; inset-inline-start: 6px; top: -24px; font-family: var(--f-mono); font-size: 11px; font-weight: 400;
  letter-spacing: .04em; color: var(--red-text); white-space: nowrap; line-height: 1; opacity: 0; animation: fadein .4s 1.5s forwards;
}

@keyframes fadein { to { opacity: 1; } }

/* Hero figure: cycles through five drawings */
.fig { position: relative; }
.fig__frame { aspect-ratio: 600 / 520; position: relative; color: var(--ink); }
.fig__frame svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fig__drawing { opacity: 0; transition: opacity .5s ease; }
.fig__drawing.is-active { opacity: 1; }
.fig__caption {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3);
  border-top: 1px solid var(--ink); padding-top: 12px; margin-top: var(--s3);
}
.fig__caption a { text-decoration: none; }
.fig__caption a:hover .fig__name { color: var(--red-text); }
.fig__num { font-family: var(--f-mono); font-size: 12px; color: var(--graphite); font-variant-numeric: tabular-nums; }
.fig__name { font-weight: 600; font-size: 15px; }
.fig__pips { display: flex; gap: 6px; }
.fig__pip { width: 22px; height: 22px; border: 0; background: none; padding: 0; position: relative; }
.fig__pip::before { content: ""; position: absolute; inset: 9px 2px; background: var(--line-strong); transition: background .2s; }
.fig__pip[aria-current="true"]::before { background: var(--red); }
.fig__pip:hover::before { background: var(--ink); }

/* ---------- Site conditions (the honest part) ---------- */
.conditions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); }
.conditions__list li { display: grid; grid-template-columns: 56px 1fr; gap: var(--s3); padding: var(--s4) 0; border-top: 1px solid var(--night-line); }
.conditions__list li:last-child { border-bottom: 1px solid var(--night-line); }
.conditions__list .mono { color: var(--red); padding-top: 4px; }
.conditions__list h3 { font-size: 19px; font-weight: 650; margin-bottom: 4px; }
.conditions__list p { color: rgba(231,230,225,.7); font-size: 16px; }
@media (max-width: 860px) { .conditions { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Services: building section ---------- */
.building { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(32px, 5vw, 80px); }
.floors { border-top: 2px solid var(--ink); }
.floor { border-bottom: 1px solid var(--line-strong); }
.floor__btn {
  width: 100%; display: grid; grid-template-columns: 92px minmax(0, 1fr) 28px; align-items: center; gap: var(--s3);
  padding: 22px 0; background: none; border: 0; text-align: start;
  transition: background .2s ease, padding .25s var(--ease);
}
.floor__lvl { display: flex; flex-direction: column; gap: 4px; }
.floor__lvl .mono { color: var(--graphite); }
.floor__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.floor__sum { font-size: 15.5px; line-height: 1.45; color: var(--graphite); font-weight: 400; }
.floor.is-active .floor__sum { color: rgba(231,230,225,.72); }
.floor__name {
  font-family: var(--f-display); font-weight: 750; font-variation-settings: "wdth" 112;
  font-size: clamp(22px, 2.6vw, 36px); line-height: 1.05; letter-spacing: -.02em;
}
html[lang="ar"] .floor__name { letter-spacing: 0; line-height: 1.4; font-size: clamp(20px, 2.2vw, 30px); }
.floor__plus { width: 28px; height: 28px; position: relative; }
.floor__plus::before, .floor__plus::after { content: ""; position: absolute; background: currentColor; inset: 13px 4px; transition: transform .25s var(--ease); }
.floor__plus::after { transform: rotate(90deg); }
.floor.is-active .floor__plus::after { transform: rotate(0); }
.floor.is-active .floor__btn { background: var(--ink); color: var(--paper); padding-inline: 16px; }
.floor.is-active .floor__lvl .mono, .floor.is-active .datum { color: rgba(231,230,225,.6); }
.floor__btn:hover .floor__name { color: var(--red-text); }
.floor.is-active .floor__btn:hover .floor__name { color: var(--paper); }
.ground {
  height: 26px; margin-top: -1px;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 1px, transparent 1px 7px);
  border-top: 2px solid var(--ink); opacity: .55;
}
.ground-label { margin-top: 10px; color: var(--graphite); }

.floor__detail { display: none; }
.floor.is-active .floor__detail { display: block; }
@media (min-width: 961px) {
  .floor__detail { position: absolute; top: 0; inset-inline-start: calc(50% + clamp(16px, 2.5vw, 40px)); inset-inline-end: 0; }
}
@media (max-width: 960px) {
  .building { grid-template-columns: minmax(0, 1fr); }
  .floor__detail { padding: var(--s4) 0 var(--s5); }
  .floor__btn { grid-template-columns: 72px minmax(0, 1fr) 28px; }
}
.detail__draw { aspect-ratio: 16 / 9; color: var(--ink); margin-bottom: var(--s5); border: 1px solid var(--line-strong); background: var(--paper); }
.detail__draw svg { width: 100%; height: 100%; }
.detail__lede { font-size: 19px; margin-bottom: var(--s4); max-width: 32em; }
.detail__cols { display: grid; grid-template-columns: 1fr auto; gap: var(--s4); margin-bottom: var(--s5); }
.checklist li { position: relative; padding: 9px 0 9px 26px; border-top: 1px solid var(--line); font-size: 16px; }
html[dir="rtl"] .checklist li { padding: 9px 26px 9px 0; }
.checklist li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 18px; width: 12px; height: 1px; background: var(--ink); }
.checklist li::after { content: ""; position: absolute; inset-inline-start: 12px; top: 15px; width: 1px; height: 7px; background: var(--ink); }
.kv { font-family: var(--f-mono); font-size: 12px; color: var(--graphite); text-align: end; }
.kv b { display: block; font-family: var(--f-display); font-size: 26px; color: var(--ink); font-weight: 750; letter-spacing: -.01em; font-variation-settings: "wdth" 110; margin-top: 4px; }
html[lang="ar"] .kv .ar { font-family: "IBM Plex Sans Arabic"; font-size: 13px; }
@media (max-width: 560px) { .detail__cols { grid-template-columns: minmax(0, 1fr); } .kv { text-align: start; } }

/* ---------- Studies (portfolio) ---------- */
.studies { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) clamp(16px, 2vw, 32px); }
.study { grid-column: span 4; display: flex; flex-direction: column; text-decoration: none; }
.study--wide { grid-column: span 8; }
.study--half { grid-column: span 6; }
@media (max-width: 960px) { .study, .study--wide, .study--half { grid-column: span 12; } }
.study__plate { position: relative; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); aspect-ratio: 4 / 3; overflow: hidden; }
.study--wide .study__plate { aspect-ratio: 16 / 9; }
.study__plate svg { width: 100%; height: 100%; transition: transform .6s var(--ease); }
.study:hover .study__plate svg { transform: scale(1.025); }
.study__plate .stamp { position: absolute; top: 12px; inset-inline-start: 12px; background: var(--paper); }
.study__id { position: absolute; top: 12px; inset-inline-end: 12px; font-family: var(--f-mono); font-size: 11px; color: var(--graphite); }
.study__meta { display: flex; justify-content: space-between; gap: var(--s3); margin-top: var(--s3); color: var(--graphite); }
.study__title { margin-top: 6px; }
.study__title .h3 { transition: color .2s; }
.study:hover .study__title .h3 { color: var(--red-text); }
.study__sum { margin-top: 8px; color: var(--graphite); font-size: 16px; max-width: 36em; }

/* ---------- Process: a programme bar ---------- */
.programme { border-top: 2px solid var(--ink); }
.programme__scale { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); border-bottom: 1px solid var(--line-strong); }
.programme__scale span { font-family: var(--f-mono); font-size: 10.5px; color: var(--graphite); padding: 6px 0; padding-inline-start: 6px; border-inline-start: 1px solid var(--line); overflow: hidden; white-space: nowrap; }
.phase { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); border-bottom: 1px solid var(--line); padding-block: var(--s4); gap: 0; align-items: start; }
.phase__bar { height: 14px; background: var(--ink); margin-top: 8px; position: relative; }
.phase__bar--hatch { background: repeating-linear-gradient(-45deg, var(--ink) 0 1.5px, transparent 1.5px 6px); border: 1px solid var(--ink); }
.phase__bar--red { background: var(--red); }
.phase__text { grid-column: 1 / -1; display: grid; grid-template-columns: 160px 1fr; gap: var(--s4); margin-top: var(--s3); }
.phase__text h3 { font-size: 20px; font-weight: 700; font-variation-settings: "wdth" 110; }
.phase__text p { color: var(--graphite); max-width: 42em; }
@media (max-width: 700px) {
  .programme__scale span:nth-child(even) { color: transparent; }
  .programme__scale span { padding-inline-start: 2px; font-size: 9px; }
  .phase__text { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Founding 10 ---------- */
.plots { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--night-line); border-inline-start: 1px solid var(--night-line); }
.plot { aspect-ratio: 1 / 1.1; border-inline-end: 1px solid var(--night-line); border-bottom: 1px solid var(--night-line); padding: 12px; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.plot__no { font-family: var(--f-mono); font-size: 11px; color: rgba(231,230,225,.55); }
.plot__state { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(231,230,225,.8); }
html[lang="ar"] .plot__state { font-family: "IBM Plex Sans Arabic"; text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.plot--taken { background: repeating-linear-gradient(-45deg, rgba(231,230,225,.22) 0 1px, transparent 1px 7px); }
.plot--taken .plot__state { color: var(--paper); }
.plot--next { outline: 1px solid var(--red); outline-offset: -1px; }
.plot--next .plot__state { color: var(--red); }
.founding { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .founding { grid-template-columns: minmax(0, 1fr); } }
.founding__terms li { padding: 14px 0; border-top: 1px solid var(--night-line); display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.founding__terms li::before { content: "+"; font-family: var(--f-mono); color: var(--red); }
.founding__count { font-family: var(--f-display); font-weight: 800; font-size: clamp(64px, 9vw, 128px); line-height: .9; font-variation-settings: "wdth" 118; letter-spacing: -.04em; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { border-bottom: 1px solid var(--line); }
.page-hero__inner { padding-block: clamp(48px, 8vw, 112px) clamp(40px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
@media (max-width: 960px) { .page-hero__inner { grid-template-columns: minmax(0, 1fr); } }
.page-hero .h1 { margin-top: var(--s4); }
.page-hero .lede { margin-top: var(--s4); }
.breadcrumb { display: flex; gap: 10px; color: var(--graphite); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }

/* ---------- Service pages ---------- */
.svc-draw { aspect-ratio: 600 / 420; color: var(--ink); }
.svc-draw svg { width: 100%; height: 100%; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 96px); }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: start; vertical-align: top; padding: 18px 0; border-top: 1px solid var(--line-strong); }
.spec-table tr:last-child td, .spec-table tr:last-child th { border-bottom: 1px solid var(--line-strong); }
.spec-table th { width: 38%; padding-inline-end: var(--s4); font-weight: 650; font-size: 17px; }
.spec-table td { color: var(--graphite); }
.spec-table th .mono { display: block; color: var(--graphite); font-weight: 400; margin-bottom: 4px; }
@media (max-width: 600px) { .spec-table th, .spec-table td { display: block; width: 100%; } .spec-table td { border-top: 0; padding-top: 0; } }

.fit { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); }
.fit > div { padding: clamp(20px, 3vw, 40px); }
.fit > div + div { border-inline-start: 1px solid var(--line-strong); background: var(--paper-2); }
.fit h3 { margin-bottom: var(--s3); }
.fit li { padding: 8px 0; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .fit { grid-template-columns: minmax(0, 1fr); } .fit > div + div { border-inline-start: 0; border-top: 1px solid var(--line-strong); } }

.faq details { border-top: 1px solid var(--line-strong); }
.faq details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: var(--s4); padding: 20px 0; font-weight: 650; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); font-size: 20px; line-height: 1; color: var(--graphite); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 22px; color: var(--graphite); max-width: 44em; }

.pairs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.pairs a { padding: 20px 16px 24px 0; text-decoration: none; border-bottom: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 8px; }
.pairs a + a { padding-inline-start: 16px; border-inline-start: 1px solid var(--line); }
.pairs a:hover .pairs__name { color: var(--red-text); }
.pairs__name { font-weight: 700; font-size: 19px; font-variation-settings: "wdth" 110; }
@media (max-width: 900px) { .pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pairs a:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; } }

/* ---------- Work page filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s6); }
.filter {
  height: 38px; padding: 0 14px; border: 1px solid var(--line-strong); background: none;
  font-size: 14.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px;
}
.filter .mono { font-size: 10.5px; color: var(--graphite); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter[aria-pressed="true"] .mono { color: rgba(231,230,225,.6); }
.study[hidden] { display: none; }

.study-full { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line-strong); }
.study-full:first-of-type { border-top: 2px solid var(--ink); }
.study-full[hidden] { display: none; }
.study-full__plate { border: 1px solid var(--line-strong); background: var(--paper); aspect-ratio: 4 / 3; position: relative; color: var(--ink); }
.study-full__plate svg { width: 100%; height: 100%; }
.study-full__plate .stamp { position: absolute; top: 12px; inset-inline-start: 12px; background: var(--paper); }
.study-full__head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: var(--s3); color: var(--graphite); }
.study-full dl { margin-top: var(--s4); }
.study-full dl > div { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 120px 1fr; gap: var(--s3); }
.study-full dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); padding-top: 4px; }
html[lang="ar"] .study-full dt { font-family: "IBM Plex Sans Arabic"; text-transform: none; letter-spacing: 0; font-size: 13px; }
.study-full dd { font-size: 16px; }
@media (max-width: 900px) { .study-full { grid-template-columns: minmax(0, 1fr); } .study-full dl > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Studio page ---------- */
.refusals li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s5); padding: var(--s4) 0; border-top: 1px solid var(--line-strong); }
.refusals li:last-child { border-bottom: 1px solid var(--line-strong); }
.refusals s { text-decoration-color: var(--red); text-decoration-thickness: 2px; font-weight: 650; font-size: 19px; }
.refusals p { color: var(--graphite); }
@media (max-width: 760px) { .refusals li { grid-template-columns: 1fr; gap: 6px; } }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.facts > div { padding: 20px 16px 24px 0; }
.facts > div + div { padding-inline-start: 16px; border-inline-start: 1px solid var(--line); }
.facts b { display: block; font-family: var(--f-display); font-size: clamp(26px, 3vw, 40px); font-weight: 800; font-variation-settings: "wdth" 115; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 6px; }
.facts span { color: var(--graphite); font-size: 15px; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } .facts > div:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; } .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Brief builder (contact) ---------- */
.brief { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 1000px) { .brief { grid-template-columns: minmax(0, 1fr); } }
.brief__sheet { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 1000px) { .brief__sheet { position: relative; top: 0; order: -1; } }
.sheet { background: var(--paper); border: 1px solid var(--ink); color: var(--ink); }
.sheet svg { width: 100%; height: auto; }
.sheet__block { display: grid; grid-template-columns: 1.4fr 1fr 1fr; border-top: 1px solid var(--ink); }
.sheet__block > div { padding: 10px 12px; min-width: 0; }
.sheet__block > div + div { border-inline-start: 1px solid var(--ink); }
.sheet__block dt { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .1em; color: var(--graphite); text-transform: uppercase; }
.sheet__block dd { font-weight: 650; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet__note { margin-top: 12px; color: var(--graphite); font-size: 14px; }

.step { border-top: 2px solid var(--ink); padding-block: var(--s4) var(--s6); }
.step legend { display: contents; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.step__head { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); }
.step__head .mono { color: var(--graphite); }
.step__head h2 { font-size: 22px; font-weight: 700; font-variation-settings: "wdth" 110; }
.step__hint { color: var(--graphite); font-size: 15px; margin: -12px 0 var(--s4); }

.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choices--1 { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 520px) { .choices { grid-template-columns: minmax(0, 1fr); } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice > span {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 14px;
  border: 1px solid var(--line-strong); background: var(--paper); font-weight: 550; font-size: 15.5px;
  transition: border-color .15s, background .15s, color .15s;
}
.choice > span small { font-family: var(--f-mono); font-size: 10.5px; color: var(--graphite); font-weight: 400; letter-spacing: .04em; }
.choice input:hover + span { border-color: var(--ink); }
.choice input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choice input:checked + span small { color: rgba(231,230,225,.6); }
.choice input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

.field { display: grid; gap: 6px; margin-bottom: var(--s3); }
.field label { font-weight: 600; font-size: 15px; }
.field label small { font-weight: 400; color: var(--graphite); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line-strong); background: var(--paper);
  border-radius: 0; font-size: 16px; appearance: none;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); outline: 2px solid var(--red-text); outline-offset: 2px; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 560px) { .field--row { grid-template-columns: minmax(0, 1fr); } }
.field [aria-invalid="true"] { border-color: var(--red-text); }
.error { color: var(--red-text); font-size: 14px; font-weight: 500; }
.error:empty { display: none; }
.brief__submit { display: grid; gap: var(--s3); }
.brief__submit .btn { width: 100%; }
.brief__fine { color: var(--graphite); font-size: 14px; }
.brief__done { border: 1px solid var(--ink); padding: var(--s5); background: var(--paper); }
.brief__done[hidden] { display: none; }

/* ---------- System page ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s3); }
.swatch { border: 1px solid var(--line-strong); }
.swatch__chip { height: 120px; }
.swatch__meta { padding: 12px; font-size: 14px; }
.swatch__meta b { display: block; }
.swatch__meta .mono { color: var(--graphite); }
.specimen { border-top: 1px solid var(--line-strong); padding: var(--s5) 0; display: grid; grid-template-columns: 220px 1fr; gap: var(--s5); align-items: baseline; }
@media (max-width: 760px) { .specimen { grid-template-columns: 1fr; gap: var(--s2); } }
.specimen .mono { color: var(--graphite); }
.primitives { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.primitive { border: 1px solid var(--line-strong); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s4); min-height: 190px; justify-content: space-between; }
.primitive p { color: var(--graphite); font-size: 14.5px; }

/* ---------- Utilities ---------- */
.mt-1 { margin-top: var(--s2); } .mt-2 { margin-top: var(--s3); } .mt-3 { margin-top: var(--s4); } .mt-4 { margin-top: var(--s5); } .mt-5 { margin-top: var(--s6); } .mt-6 { margin-top: var(--s7); }
.center-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
  [data-draw] * { stroke-dashoffset: 0 !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .mobile-menu, .directory { display: none !important; }
  body { background: #fff; }
}


/* ==========================================================================
   Additions: hero service index, audience rows, responsive refinements
   ========================================================================== */

/* Hero service index — the five services, readable in one glance */
.hero-index { border-top: 1px solid var(--line-strong); background: var(--paper); position: relative; }
.hero-index .wrap { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s4); padding-block: 22px; align-items: start; }
.hero-index__label { color: var(--graphite); padding-top: 3px; }
.hero-index ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hero-index a {
  display: flex; flex-direction: column; gap: 3px; min-height: 44px; height: 100%;
  padding: 2px 16px; border-inline-start: 1px solid var(--line-strong); text-decoration: none;
}
.hero-index .mono { color: var(--red-text); }
.hero-index__name { font-weight: 700; font-size: 16px; line-height: 1.25; font-variation-settings: "wdth" 106; }
.hero-index__note { font-size: 14px; line-height: 1.4; color: var(--graphite); }
.hero-index a:hover .hero-index__name { color: var(--red-text); }
@media (max-width: 1200px) {
  .hero-index .wrap { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 900px) {
  .hero-index ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s4); }
  .hero-index a { border-inline-start: 0; border-top: 1px solid var(--line); padding: 12px 0; }
}
@media (max-width: 560px) {
  .hero-index ul { grid-template-columns: minmax(0, 1fr); }
  .hero-index a { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 8px; }
  .hero-index a .mono { grid-row: span 2; padding-top: 3px; }
}

/* Who we work with */
.audience { border-top: 2px solid var(--ink); }
.audience__row {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr) minmax(0, 1.2fr);
  gap: var(--s5); padding: 28px 0; border-bottom: 1px solid var(--line-strong); align-items: start;
}
.audience__row > p { font-size: 18px; line-height: 1.5; }
.audience__start { font-weight: 600; margin-top: 8px; line-height: 1.6; }
.audience__lvl {
  display: inline-block; font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .04em;
  border: 1px solid var(--ink); padding: 1px 6px; margin-inline-end: 6px; vertical-align: 2px;
}
@media (max-width: 900px) {
  .audience__row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 24px 0; }
}

.founding__count-label { font-size: 13px !important; letter-spacing: .06em; margin-inline-start: 12px; vertical-align: top; }

/* Tablet: keep the hero drawing from towering over the page */
@media (max-width: 1000px) {
  .fig { max-width: 620px; }
  .hero__inner { gap: var(--s6); }
}

/* Phones */
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .section { padding-block: 64px; }
  .btn-row .btn { flex: 1 1 100%; }
  .hero__meta { margin-bottom: var(--s4); }
  .hero .lede { margin-bottom: var(--s5); }
  .floor__btn { grid-template-columns: 58px minmax(0, 1fr) 24px; gap: 12px; padding: 18px 0; }
  .floor.is-active .floor__btn { padding-inline: 10px; }
  .floor__sum { font-size: 14.5px; }
  .detail__lede { font-size: 17px; }
  .titleblock { grid-template-columns: minmax(0, 1fr); }
  .titleblock > div, .titleblock > div:nth-child(even) { border-inline-end: 0; }
  .study-full dl > div { padding: 12px 0; }
  .sec-tag { margin-bottom: var(--s4); }
  .faq summary { font-size: 17px; }
  .founding__count { font-size: 72px; }
  .plot { padding: 8px; }
  .fit > div { padding: 20px; }
}
@media (max-width: 360px) {
  :root { --gutter: 14px; }
  .display { font-size: 34px; }
  html[lang="ar"] .display { font-size: 30px; }
  .logo__word { font-size: 19px; }
  .site-header__bar { gap: 10px; }
}

/* Touch screens: bigger targets for the small controls */
@media (pointer: coarse) {
  .fig__pip { width: 34px; height: 34px; }
  .fig__pip::before { inset: 15px 5px; }
  .filter { min-height: 44px; }
  .nav__link, .lang-toggle, .menu-btn { height: 44px; }
}

/* Short landscape phones: the menu has to scroll, the header stays compact */
@media (max-height: 480px) and (orientation: landscape) {
  .mobile-menu__main a { font-size: 28px; }
}

/* Large desktop displays */
@media (min-width: 1800px) {
  :root { --max: 1600px; }
  body { font-size: 18px; }
}

@media (max-width: 420px) {
  .pairs { grid-template-columns: minmax(0, 1fr); }
  .pairs a, .pairs a + a { border-inline-start: 0; padding-inline: 0; }
}
.pairs__name { overflow-wrap: anywhere; }

/* Phones and small tablets: every tappable thing at least 44 px tall */
@media (max-width: 760px) {
  .fig__pip { width: 34px; height: 44px; }
  .fig__pip::before { inset: 20px 5px; }
  .filter { min-height: 44px; }
  .logo { min-height: 44px; }
  .mono, .sec-tag, .study__meta { font-size: 12.5px; }
}

@media (max-width: 560px) {
  .markup__note { display: none; }
  .fig__caption { grid-template-columns: auto 1fr; grid-template-areas: "num pips" "name name"; row-gap: 6px; }
  .fig__num { grid-area: num; }
  .fig__caption > a { grid-area: name; }
  .fig__pips { grid-area: pips; justify-self: end; }
  .conditions__list li { grid-template-columns: 28px minmax(0, 1fr); }
}

html[lang="ar"] .menu-btn .ar { font-family: "IBM Plex Sans Arabic", sans-serif; font-size: 14px; letter-spacing: 0; }
@media (max-width: 560px) { .hero h1 { margin-bottom: var(--s5); } }

/* Hero: headline spans the full width, copy and drawing share the row below */
.hero__inner { align-items: start; row-gap: clamp(28px, 4vw, 56px); }
.hero__head { grid-column: 1 / -1; }
.hero__head h1 { margin-bottom: 0 !important; max-width: 15.5em; }
html[lang="ar"] .hero__head h1 { max-width: 16em; }
.hero .display { font-size: clamp(36px, 6.6vw, 112px); }
html[lang="ar"] .hero .display { font-size: clamp(32px, 5.4vw, 88px); }
.hero__copy { padding-top: 8px; }
@media (max-width: 360px) { .hero .display { font-size: 34px; } html[lang="ar"] .hero .display { font-size: 30px; } }
/* Figure caption: number and pips on one row, the name underneath (reads well at every width) */
.fig__caption { grid-template-columns: auto 1fr; grid-template-areas: "num pips" "name name"; row-gap: 6px; }
.fig__num { grid-area: num; }
.fig__caption > a { grid-area: name; }
.fig__pips { grid-area: pips; justify-self: end; }

/* R02: clear service labels and a shorter route to enquiry. */
[hidden] { display: none !important; }
.mobile-contact, .preview-toggle { display: none; }
.service-fit { color: var(--graphite); font-size: 16px; line-height: 1.6; }
.founding--new { grid-template-columns: minmax(0, 1fr); max-width: 850px; }
#questions { scroll-margin-top: calc(var(--header-h) + 20px); }
#questions > .wrap > .btn-row { grid-column: 1; }
.floor__btn { grid-template-columns: minmax(0, 1fr) 64px 28px; }
.floor__text { grid-column: 1; grid-row: 1; }
.floor__lvl { grid-column: 2; grid-row: 1; }
.floor__plus { grid-column: 3; grid-row: 1; }
.pairs a { display: flex; flex-direction: column; }
.pairs__name { order: -1; }
@media (max-width: 1000px) {
  .brief__sheet { order: -1; position: sticky; top: var(--header-h); z-index: 15; display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; align-items: center; background: var(--paper); border-block: 1px solid var(--ink); padding: 6px; }
  .preview-toggle { display: block; text-align: start; padding: 10px; min-height: 44px; background: transparent; color: var(--ink); border: 0; font: inherit; font-size: 14px; cursor: pointer; }
  .brief__sheet .sheet { pointer-events: none; }
  .brief__sheet .sheet svg { display: block; max-height: 72px; }
  .brief__sheet .sheet__block, .brief__sheet .sheet__note { display: none; }
  .brief__sheet.is-expanded { grid-template-columns: minmax(0, 1fr); }
  .brief__sheet.is-expanded .sheet svg { max-height: 190px; }
  .brief { gap: 18px; }
  #brief { scroll-margin-top: calc(var(--header-h) + 100px); }
  #brief input, #brief textarea { scroll-margin-top: calc(var(--header-h) + 105px); }
  body[data-page="contact"] .page-hero__inner { padding-block: 28px; gap: 18px; }
  body[data-page="contact"] .page-hero .h1 { font-size: clamp(28px, 5vw, 48px); }
  body[data-page="contact"] .page-hero .lede { font-size: 17px; }
  body[data-page="contact"] main > .section { padding-top: 20px; }
}
@media (max-width: 900px) {
  .has-mobile-contact { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .mobile-contact { display: flex; position: fixed; z-index: 45; inset-inline: 0; bottom: 0; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--ink); }
  .mobile-contact .btn { flex: 1; min-height: 48px; padding-inline: 10px; font-size: 14px; }
  .menu-open .mobile-contact { display: none; }
  body[data-page="home"] .hero [data-fig], body[data-page="home"] .hero-index { display: none; }
  body[data-page="home"] .hero__inner { padding-block: 36px; gap: 20px; }
  body[data-page="home"] .section { padding-block: 40px; }
  body[data-page="home"] .sec-head { gap: 16px; margin-bottom: 24px; }
  body[data-page="home"] .hero__status { margin-top: 20px; }
  body[data-page="home"] .study__drawing { max-height: 220px; }
  .floor__btn { grid-template-columns: minmax(0, 1fr) 30px 24px; gap: 10px; }
  .floor__lvl .datum { display: none; }
  .floor__name { font-size: 22px; }
  .floor__sum { font-size: 14px; }
}
@media print { .mobile-contact, .preview-toggle { display: none !important; } .has-mobile-contact { padding-bottom: 0; } }

/* R03: an open mobile panel must never survive a desktop breakpoint. */
@media (min-width: 901px) { .mobile-menu, .mobile-menu.is-open { display: none; } }

/* R04: logo reference specimens. The shared header keeps its proven dimensions. */
.brand-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border:1px solid var(--ink); }
.brand-tile { min-height:280px; display:flex; align-items:center; justify-content:center; padding:32px; }
.brand-tile--paper { background:var(--paper); color:var(--ink); }
.brand-tile--ink { background:var(--ink); color:var(--paper); }
.brand-tile > svg { width:144px; height:144px; }
.brand-lockup { display:flex; align-items:center; justify-content:center; gap:18px; direction:ltr; }
.brand-lockup svg { width:64px; height:64px; flex:none; }
.brand-lockup > span { font-family:"Archivo",sans-serif; font-weight:800; font-size:clamp(28px,4vw,64px); font-variation-settings:"wdth" 120; letter-spacing:-.03em; }
.brand-sizes { display:flex; flex-wrap:wrap; gap:32px; align-items:flex-end; margin-block:32px; }
.brand-sizes > div { display:grid; gap:12px; justify-items:center; align-items:end; }
.brand-sizes > div > span { display:block; }
.brand-sizes svg { display:block; width:100%; height:100%; }
.brand-sizes small { font-family:var(--f-mono); font-size:11px; }
.brand-sizes p { max-width:24em; color:var(--graphite); }
@media(max-width:760px) { .brand-grid { grid-template-columns:minmax(0,1fr); } .brand-tile { min-height:220px; padding:20px; } .brand-lockup { gap:12px; } .brand-lockup svg { width:48px; height:48px; } }
