/* Hemaia — Arabic RTL. Warm paper page, soft colour blobs, oversized headlines with one serif accent
   phrase each, offset-shadow cards (mirrored for RTL). Arabic never gets letter-spacing: it breaks joins. */
:root {
  --paper: #FFFAF1;
  --paper-2: #F4EEE2;
  --line: #E6DFD1;
  --ink: #142527;
  --ink-soft: #4B5A5B;
  --teal: #273E41;
  --teal-deep: #1A2C2E;
  --red: #EC442B;
  --red-deep: #C2321B;
  --mint: #DCEAE6;
  --sand: #F6E3C1;
  --white: #FFFFFF;

  --f-display: "Alexandria", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --f-body: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
  --f-serif: "El Messiri", "Noto Naskh Arabic", "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", "IBM Plex Sans Arabic", ui-monospace, Menlo, monospace;

  --sh-c: var(--ink);                     /* shadow colour; dark surfaces switch it to red */
  --sh: -5px 5px 0 var(--sh-c);           /* the one hard shadow used everywhere */
  --sh-hover: var(--sh);                  /* hover keeps the same shadow; the element lifts 3px instead */
  --max: 1200px;
  --gutter: 20px;
  color-scheme: light;
}
@media (min-width: 760px) { :root { --gutter: 36px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.85; -webkit-font-smoothing: antialiased; overflow-x: hidden; text-align: start; }
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
li, dd, figcaption, blockquote { text-wrap: pretty; }
ul, ol { margin: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 800; letter-spacing: 0; line-height: 1.22; text-wrap: balance; }
.it { font-family: var(--f-serif); font-weight: 700; color: var(--red); font-size: 1.02em; line-height: 1.3; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-right, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px)); position: relative; }
.label { font-family: var(--f-body); font-size: 0.9rem; font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; line-height: 1.5; }
.label::before { content: ""; width: 22px; height: 2px; background: var(--red); flex: none; }
.label.plain::before { display: none; }
.skip { position: absolute; inset-inline-start: 16px; top: 8px; transform: translateY(-200%); background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 60; }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 700 1rem/1.2 var(--f-display); padding: 16px 26px; text-decoration: none; border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; white-space: nowrap; }
.btn-red { background: var(--red-deep); color: var(--white); }
.btn-red:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); }
.btn-text { background: none; color: var(--ink); padding-inline: 8px; }
.head-side .btn-text, .hero-actions .btn-text, .work-nav .btn-text { padding-inline: 0; }
.btn-text:hover { text-decoration: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.arrow { display: inline-block; transition: transform .15s ease; }
a:hover .arrow { transform: translateX(-4px); }

/* Blobs */
.blob { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 80px; }
.logo { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.logo img { height: 52px; width: auto; }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-family: var(--f-body); font-weight: 500; font-size: 0.98rem; text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--red-deep); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--red); }
.nav-end { display: flex; align-items: center; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); border-radius: 0; padding: 12px 22px; font: 700 0.95rem/1.2 var(--f-display); text-decoration: none; white-space: nowrap; transition: background .15s; }
.pill:hover { background: var(--red-deep); }
.tel-link { font-family: var(--f-mono); font-size: 0.9rem; text-decoration: none; direction: ltr; white-space: nowrap; }
.tel-link:hover { color: var(--red-deep); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; font-weight: 500; font-size: 0.95rem; padding: 9px 16px; border: 1.5px solid var(--ink); border-radius: 0; display: inline-flex; gap: 8px; align-items: center; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 18px; height: 18px; }
.menu ul { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); background: var(--white); border: 1.5px solid var(--ink); list-style: none; margin: 0; padding: 8px; min-width: 230px; }
.menu a { display: block; padding: 10px 12px; text-decoration: none; font-weight: 500; }
.menu a:hover { background: var(--mint); }
.menu li.cta a { background: var(--ink); color: var(--white); margin-top: 6px; text-align: center; font-weight: 700; }
@media (max-width: 1060px) { .tel-link { display: none; } }
@media (max-width: 920px) { .nav-links { display: none; } .menu { display: block; } .logo img { height: 46px; } .nav { height: 72px; } .nav-end .pill { padding: 10px 16px; font-size: 0.9rem; } }
@media (max-width: 400px) { .nav-end .pill { display: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: 36px 96px; }
.hero .b1 { width: 560px; height: 560px; background: var(--mint); right: -220px; top: 240px; }
.hero .b2 { width: 380px; height: 380px; background: var(--sand); left: -120px; top: -190px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; } }
.hero h1 { font-size: clamp(2.6rem, 1.2rem + 4.2vw, 4.6rem); margin-top: 24px; line-height: 1.12; }
.hero h1 .it { display: block; font-size: 1.04em; line-height: 1.12; }
.hero h1 .ln { display: block; }
.hero h1 .sub { display: block; font-family: var(--f-body); font-weight: 700; font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.3rem); line-height: 1.6; color: var(--teal); margin-top: 18px; padding-inline-start: 16px; border-inline-start: 4px solid var(--red); }
.hero .lede { margin-top: 28px; font-size: 1.18rem; max-width: 33em; color: var(--ink-soft); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; align-items: center; }

.photo { position: relative; isolation: isolate; }
.photo > svg, .photo > img, .photo > picture img { width: 100%; height: auto; border: 1.5px solid var(--ink); background: var(--white); }
.photo > svg { aspect-ratio: 4 / 5; }
.photo.wide > img, .photo.wide > picture img { aspect-ratio: 4 / 3; object-fit: cover; }
.tag { position: absolute; font-family: var(--f-body); font-size: 0.86rem; line-height: 1.5; padding: 9px 13px; font-weight: 500; }
.tag-ts { top: 18px; inset-inline-start: 18px; background: var(--white); color: var(--ink); border: 1.5px solid var(--ink); }
.tag-be { inset-inline-end: -10px; bottom: 56px; background: var(--ink); color: var(--white); }
@media (max-width: 560px) { .tag-be { inset-inline-end: -10px; } }

/* Ticker */
.ticker { border-block: 1.5px solid var(--ink); background: var(--paper); overflow: hidden; padding-block: 16px; direction: rtl; }
.ticker-track { display: flex; gap: 44px; width: max-content; animation: tick 40s linear infinite; }
.ticker span { font-weight: 500; font-size: 1rem; white-space: nowrap; display: inline-flex; gap: 44px; align-items: center; }
.ticker i { font-style: normal; color: var(--red); }
@keyframes tick { to { transform: translateX(50%); } }

/* Clients */
.clients { padding-block: 48px; }
.clients-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; }
.clients-row .label { white-space: nowrap; }
.logos { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; align-items: center; }
.logos li { display: grid; place-items: center; height: 64px; }
.logos img { max-height: 54px; width: auto; max-width: 100%; object-fit: contain; filter: grayscale(1) contrast(1.05); opacity: .72; transition: filter .2s, opacity .2s; mix-blend-mode: multiply; }
.logos li:hover img { filter: none; opacity: 1; }
@media (max-width: 900px) { .clients-row { grid-template-columns: minmax(0, 1fr); gap: 22px; } .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; } }
@media (max-width: 520px) { .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .logos li { height: 56px; } .logos img { max-height: 44px; } }

/* Sections */
section { scroll-margin-top: 96px; position: relative; }
.section { padding-block: clamp(80px, 10vw, 136px); }
.section.tight { padding-block: clamp(56px, 7vw, 96px); }
.head { display: grid; gap: 18px; align-content: start; }
.head h2 { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4.4rem); line-height: 1.15; }
.head h2 .it { display: block; }
.head h2 .it.inl { display: inline; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: 56px; position: relative; z-index: 1; }
.head-row > p, .head-side p { max-width: 26rem; color: var(--ink-soft); }
.head-side { display: grid; gap: 18px; justify-items: start; }

/* Service cards */
.mint-band { background: var(--mint); overflow: hidden; }
.mint-band .b3 { width: 300px; height: 300px; background: var(--sand); right: -90px; top: 70px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; position: relative; z-index: 1; }
@media (max-width: 1040px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.card { padding: 26px 26px 30px; display: grid; gap: 12px; grid-template-rows: auto auto 1fr auto; min-height: 330px; border: 1.5px solid var(--ink); min-width: 0; text-decoration: none; background: var(--paper); transition: transform .15s ease, box-shadow .15s ease; }
.card:nth-child(4n+2), .card:nth-child(4n+4) { background: var(--sand); }
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); }
.card .n { font-family: var(--f-mono); font-size: 0.85rem; color: var(--red-deep); margin-bottom: 40px; display: flex; justify-content: space-between; gap: 10px; }
.card .n em { font-style: normal; font-family: var(--f-body); color: var(--ink-soft); font-size: 0.82rem; }
.card h3 { font-size: 1.3rem; line-height: 1.4; }
.cards .card, .related .card { grid-row: span 4; grid-template-rows: subgrid; }
.card p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.75; }
.card .more { font-weight: 700; font-size: 0.95rem; display: inline-flex; gap: 8px; align-items: center; margin-top: 8px; }
.card.cta-card { background: var(--ink); color: var(--white); }
.card.cta-card p { color: #C9D6D3; }
.card.cta-card .n { color: var(--sand); }
.card.cta-card:hover { box-shadow: var(--sh-hover); }
@media (max-width: 580px) { .card { min-height: 0; } .card .n { margin-bottom: 16px; } }

/* Work gallery — frames use the same hard offset shadow + lift as cards and buttons (mirrored for RTL) */
.work-viewport { position: relative; }
.work-scroll { display: flex; gap: 44px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 30px 18px; scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }
.work-scroll::-webkit-scrollbar { height: 6px; }
.work-scroll::-webkit-scrollbar-thumb { background: var(--ink); }
.work-item { flex: 0 0 min(360px, 80vw); width: min(360px, 80vw); scroll-snap-align: start; display: grid; gap: 30px; align-content: start; text-decoration: none; min-width: 0; }
.frame { position: relative; min-width: 0; }
.win { background: var(--white); border: 1.5px solid var(--ink); overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: transform .18s ease, box-shadow .18s ease; }
.work-item:hover .win, .work-item:focus-visible .win { transform: translateY(-3px); box-shadow: var(--sh-hover); }
.win-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--paper-2); border-bottom: 1.5px solid var(--ink); font-size: 0.8rem; white-space: nowrap; overflow: hidden; min-width: 0; }
.win-bar i { width: 7px; height: 7px; border-radius: 0; background: var(--ink-soft); opacity: .45; flex: none; }
.win-bar span { margin-inline-start: 6px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.win-img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.win-img img { width: 100%; height: 100%; object-fit: cover; }
.work-cap { display: grid; gap: 6px; padding-inline: 0 12px; min-width: 0; }
.work-cap .kind { margin: 0; font-family: var(--f-body); font-weight: 500; font-size: 0.86rem; color: var(--red-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-cap h3 { font-size: 1.22rem; line-height: 1.45; min-height: 2.9em; }
#work .work-cap h3 { min-height: 0; }
@media (max-width: 620px) { .work-cap h3 { min-height: 0; } }
.work-cap .brand { margin: 0; font-size: 0.95rem; line-height: 1.5; color: var(--ink-soft); }
.work-nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.work-nav button { width: 48px; height: 48px; border-radius: 0; border: 1.5px solid var(--ink); background: var(--paper); cursor: pointer; color: var(--ink); display: grid; place-items: center; transition: background .15s, color .15s; }
.work-nav button svg { width: 20px; height: 20px; }
.work-nav button:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); }
.work-nav .btn { margin-inline-start: 8px; }
.work-progress { display: none; height: 3px; background: color-mix(in srgb, var(--ink) 14%, transparent); margin-top: 22px; }
.work-progress span { display: block; height: 100%; width: 0; background: var(--red); }
/* Scroll-linked gallery (desktop): the section pins and vertical scroll moves the cards sideways */
.pin-on [data-pin] { padding-block: 0; }
.pin-on [data-pin] > .wrap { position: sticky; top: 80px; height: calc(100svh - 80px); display: flex; flex-direction: column; justify-content: center; padding-block: 28px 20px; }
.pin-on [data-pin] .head-row { margin-bottom: 26px; align-items: center; }
.pin-on [data-pin] .head h2 { font-size: clamp(2.1rem, 1rem + 2.4vw, 3.4rem); }
.pin-on [data-pin] .work-viewport { overflow-x: clip; overflow-y: visible; margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%); }
.pin-on [data-pin] .work-scroll { overflow: visible; scroll-snap-type: none; padding: 6px 0 14px; will-change: transform; }
.pin-on [data-pin] .win-img { aspect-ratio: auto; height: clamp(220px, calc(100svh - 570px), 440px); }
.pin-on [data-pin] .work-cap h3 { min-height: 0; }
.pin-on [data-pin] .work-cap .brand { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pin-on [data-pin] .work-progress { display: block; }
.pin-on [data-pin] .work-item { gap: 26px; }

/* Experience card (offer) */
.offer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: 72px; align-items: center; }
@media (max-width: 960px) { .offer-grid { grid-template-columns: minmax(0, 1fr); gap: 84px; } }
.offer-copy p.body { margin-top: 14px; color: var(--ink-soft); font-size: 1.12rem; max-width: 30em; }
.ticks { list-style: none; padding: 0; margin-top: 28px; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.ticks li::before { content: ""; width: 20px; height: 20px; margin-top: 6px; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.xp-card { position: relative; background: var(--ink); color: var(--white); padding: 36px clamp(24px, 4vw, 44px) 40px; border: 1.5px solid var(--ink); }
.xp-card .label { color: var(--white); padding-inline-end: 128px; }
.xp-card .amt { font-family: var(--f-display); font-weight: 800; font-size: clamp(5rem, 3rem + 7vw, 8rem); line-height: 1; margin-top: 40px; direction: ltr; text-align: end; font-variant-numeric: tabular-nums; }
.xp-card .amt small { font-size: 0.45em; color: var(--red); }
.xp-card .per { font-size: 1.1rem; margin-top: 10px; color: #C9D6D3; }
.xp-card dl { margin: 30px 0 0; border-top: 1px solid #3A5052; }
.xp-card dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #3A5052; font-size: 0.98rem; }
.xp-card dt { color: #C9D6D3; }
.xp-card dd { margin: 0; font-weight: 700; }
.badge { color: var(--ink); position: absolute; top: -40px; inset-inline-end: -12px; width: 132px; height: auto; padding: 14px 10px; gap: 4px; border-radius: 0; background: var(--sand); border: 1.5px solid var(--ink); display: grid; place-content: center; text-align: center; transform: rotate(-8deg); }
.badge strong { font-family: var(--f-display); font-size: 1.95rem; line-height: 1; direction: ltr; unicode-bidi: isolate; }
.badge span { font-size: 0.82rem; line-height: 1.45; font-weight: 500; }
@media (max-width: 480px) { .badge { width: 112px; top: -34px; inset-inline-end: -6px; } .badge strong { font-size: 1.5rem; } .badge span { font-size: 0.72rem; } .xp-card .label { padding-inline-end: 96px; } }

/* Process */
.sand-band { background: var(--sand); overflow: hidden; }
.sand-band .b4 { width: 420px; height: 420px; background: var(--paper); left: -140px; bottom: -160px; opacity: .7; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); position: relative; z-index: 1; }
.steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .steps.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .steps, .steps.four { grid-template-columns: minmax(0, 1fr); } }
.steps li { padding: 30px 0 10px 30px; display: grid; gap: 12px; align-content: start; min-width: 0; }
@media (min-width: 701px) { .steps li + li { padding-right: 30px; border-right: 1.5px solid var(--ink); } .steps.four li:nth-child(3) { } }
@media (min-width: 701px) and (max-width: 1000px) { .steps.four li:nth-child(3) { padding-right: 0; border-right: 0; } .steps.four li:nth-child(n+3) { border-top: 1.5px solid var(--ink); } }
@media (max-width: 700px) { .steps li { padding: 28px 0; } .steps li + li { border-top: 1.5px solid var(--ink); } }
@media (min-width: 701px) {
  .steps.multi li:nth-child(3n+1) { padding-right: 0; border-right: 0; }
  .steps.multi li:nth-child(n+4) { border-top: 1.5px solid var(--ink); margin-top: 0; }
}
.steps .n { font-family: var(--f-mono); font-size: 3rem; line-height: 1; color: var(--red-deep); font-weight: 500; }
.steps h3 { font-size: 1.5rem; line-height: 1.35; }
@media (min-width: 701px) { .steps li { grid-row: span 3; grid-template-rows: subgrid; } }
.steps p { color: var(--ink-soft); max-width: 24em; }

/* Scope / stats */
.scope-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
@media (max-width: 960px) { .scope-grid { grid-template-columns: minmax(0, 1fr); } }
.scope-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); }
@media (max-width: 520px) { .scope-list { grid-template-columns: minmax(0, 1fr); } }
.scope-list li { border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); padding: 26px 24px; display: grid; gap: 6px; background: var(--white); min-width: 0; }
.scope-list strong { font-family: var(--f-display); font-size: 2.6rem; line-height: 1.1; color: var(--red-deep); direction: ltr; text-align: end; justify-self: start; }
.scope-list span { font-weight: 500; }
.scope-note { margin-top: 26px; color: var(--ink-soft); }

/* Industries */
.inds { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); }
@media (max-width: 900px) { .inds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .inds { grid-template-columns: minmax(0, 1fr); } }
.inds li { border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); padding: 26px 24px 28px; display: grid; gap: 8px; background: var(--paper); min-width: 0; }
.inds li:nth-child(even) { background: var(--white); }
.inds svg { width: 34px; height: 34px; color: var(--red-deep); margin-bottom: 10px; }
.inds h3 { font-size: 1.2rem; line-height: 1.4; }
.inds p { color: var(--ink-soft); font-size: 0.96rem; line-height: 1.7; }

/* Compare table */
.table-wrap { overflow-x: auto; border: 1.5px solid var(--ink); background: var(--white); }
table.compare { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 0.97rem; }
.compare th, .compare td { text-align: start; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
.compare thead th { font-size: 0.9rem; font-weight: 700; background: var(--paper-2); border-bottom: 1.5px solid var(--ink); font-family: var(--f-display); }
.compare tbody th { font-weight: 700; width: 22%; }
.compare .us { background: var(--mint); font-weight: 700; }
.compare thead .us { background: var(--teal); color: var(--white); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.table-note { margin-top: 26px; font-size: 0.9rem; color: var(--ink-soft); max-width: 50em; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
@media (max-width: 960px) { .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.qa { display: grid; gap: 12px; }
.qa details { background: var(--paper-2); border: 1.5px solid transparent; }
.qa details[open] { border-color: var(--ink); background: var(--white); }
.qa summary { text-wrap: balance; list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; font-weight: 700; font-size: 1.05rem; line-height: 1.6; font-family: var(--f-display); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--red-deep); font-size: 1.6rem; font-weight: 500; line-height: 1; transition: transform .2s; flex: none; font-family: var(--f-mono); }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details > div { padding: 0 24px 24px; color: var(--ink-soft); max-width: 44em; }
.glance { margin-top: 36px; border-top: 1.5px solid var(--ink); }
.glance div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.97rem; }
.glance dt { font-size: 0.88rem; font-weight: 500; color: var(--ink-soft); }
.glance dd { margin: 0; font-weight: 500; }
.glance a { text-underline-offset: 4px; }

/* Guides / articles */
.guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .guides { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .guides { grid-template-columns: minmax(0, 1fr); } }
.guide { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 12px; align-content: start; border: 1.5px solid var(--ink); background: var(--white); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; min-width: 0; overflow: hidden; }
.guide:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); }
.guide .thumb { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1.5px solid var(--ink); background: var(--paper-2); }
.guide .thumb img { width: 100%; height: 100%; object-fit: cover; }
.guide .meta { padding-inline: 24px; margin-top: 10px; font-size: 0.85rem; color: var(--ink-soft); display: grid; gap: 4px; justify-items: start; }
.meta .when { white-space: nowrap; }
.guide .meta b { color: var(--red-deep); font-weight: 700; }
.guide h3 { font-size: 1.15rem; line-height: 1.55; padding-inline: 24px; }
.guide p { color: var(--ink-soft); font-size: 0.97rem; padding-inline: 24px; line-height: 1.75; }
.guide .more { font-weight: 700; font-size: 0.95rem; padding: 4px 24px 24px; display: inline-flex; gap: 8px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; list-style: none; padding: 0; }
.chips a, .chips span, .chips button { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 0; padding: 8px 16px; font: 500 0.95rem/1.5 var(--f-body); text-decoration: none; background: var(--paper); color: var(--ink); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chips a:hover, .chips button:hover { box-shadow: var(--sh-hover); transform: translateY(-3px); }
.chips a, .chips button { transition: transform .15s ease, box-shadow .15s ease; }
.chips span { cursor: default; }

/* CTA band + form */
.cta-band { background: var(--teal); color: var(--white); overflow: hidden; }
.cta-band .b5 { width: 520px; height: 520px; background: var(--teal-deep); left: -180px; top: -180px; }
.cta-band .b6 { width: 240px; height: 240px; background: var(--red); right: -90px; bottom: -120px; opacity: .9; }
.cta-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 64px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 960px) { .cta-grid { grid-template-columns: minmax(0, 1fr); } }
.cta-band .label { color: var(--sand); }
.cta-band h2 { font-size: clamp(2.3rem, 1.4rem + 2.8vw, 3.9rem); margin-top: 18px; line-height: 1.22; }
.cta-band h2 .it { color: var(--sand); display: block; }
.cta-band .lead { margin-top: 24px; font-size: 1.12rem; color: #D5E2DF; max-width: 30em; }
.contact-lines { display: grid; gap: 14px; margin-top: 32px; }
.contact-lines a { display: inline-flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font-size: 1.08rem; width: fit-content; }
.contact-lines a:hover { text-decoration: underline; text-underline-offset: 6px; }
.contact-lines .ic { width: 42px; height: 42px; border-radius: 0; border: 1.5px solid #6E8784; display: grid; place-items: center; flex: none; }
.contact-lines .ic svg { width: 18px; height: 18px; }
.contact-lines .ltr { direction: ltr; font-family: var(--f-mono); }
.lead-form { position: relative; background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); padding: clamp(22px, 3vw, 34px); display: grid; gap: 16px; min-width: 0; }
.lead-form h3 { font-size: 1.35rem; }
.lead-form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .lead-form .row { grid-template-columns: minmax(0, 1fr); } }
.lead-form label { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 500; min-width: 0; }
.lead-form input, .lead-form select, .lead-form textarea { font: 400 1rem/1.5 var(--f-body); color: var(--ink); background: var(--white); border: 1.5px solid var(--ink); border-radius: 0; padding: 11px 14px; width: 100%; text-align: start; }
.lead-form input[type="tel"], .lead-form input[type="email"] { direction: ltr; text-align: right; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus { outline: 3px solid var(--red); outline-offset: 0; }
.lead-form select { appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23142527' stroke-width='2'/%3E%3C/svg%3E") left 12px center/16px no-repeat; padding-left: 38px; }
.lead-form textarea { min-height: 110px; resize: vertical; }
.lead-form .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.lead-form .actions .btn { flex: 1 1 auto; }
.lead-form .fine { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.6; }
.form-status { font-size: 0.95rem; padding: 12px 14px; background: var(--mint); }
.form-status[hidden] { display: none; }
.form-status.err { background: #FBE3DE; color: #8A2414; }
.lead-form .opt { color: var(--ink-soft); font-weight: 400; font-size: 0.82rem; }
.lead-form .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lead-form button[disabled] { opacity: .7; cursor: progress; }
.lead-form .wa-alt { color: var(--ink); gap: 8px; padding-inline: 10px; }
.lead-form .wa-alt svg { color: #1FA855; }

/* Footer */
footer.site-footer { padding-block: 56px 30px; background: var(--paper); border-top: 1.5px solid var(--ink); }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 0.7fr)); gap: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .foot-top { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; } .foot-brand { grid-column: 1 / -1; } .foot-brand p { max-width: 34rem; } }
@media (max-width: 520px) { .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; } .foot-top > .foot-col:last-child { grid-column: 1 / -1; } .foot-col ul { gap: 6px; } }
.foot-brand img { height: 60px; width: auto; }
.foot-brand p { margin-top: 16px; color: var(--ink-soft); font-size: 0.95rem; max-width: 22rem; }
.foot-col h2 { font-size: 0.95rem; font-weight: 700; margin-bottom: 14px; font-family: var(--f-display); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.95rem; }
.foot-col a { text-decoration: none; color: var(--ink-soft); }
.foot-col a:hover { color: var(--red-deep); text-decoration: underline; text-underline-offset: 4px; }
.foot-col address { font-style: normal; color: var(--ink-soft); font-size: 0.95rem; display: grid; gap: 8px; justify-items: start; }
.foot-col .ltr { direction: ltr; unicode-bidi: isolate; text-align: right; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; font-size: 0.88rem; color: var(--ink-soft); }
.foot-bottom a { color: var(--ink-soft); }
.foot-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }


/* Inner pages */
.crumbs { padding-top: 22px; font-size: 0.9rem; color: var(--ink-soft); }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: #A5ADA9; }
.crumbs a { text-decoration: none; }
.crumbs li[aria-current] { color: var(--ink); font-weight: 500; }
@media (max-width: 620px) { .crumbs ol { flex-wrap: nowrap; } .crumbs li { white-space: nowrap; } .crumbs li:last-child { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; } }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; color: var(--ink); }
.page-hero { position: relative; overflow: hidden; padding-block: 28px 84px; }
.page-hero .b1 { width: 460px; height: 460px; background: var(--mint); right: -200px; top: 120px; }
.page-hero .b2 { width: 300px; height: 300px; background: var(--sand); left: -100px; top: -150px; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; align-items: center; position: relative; z-index: 1; margin-top: 34px; }
.page-hero-grid.solo { grid-template-columns: minmax(0, 1fr); }
.page-hero-grid.solo > div { max-width: 54rem; }
@media (max-width: 960px) { .page-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 50px; } }
.page-hero h1 { font-size: clamp(2rem, 1.25rem + 2.5vw, 3.5rem); margin-top: 20px; line-height: 1.3; }
.article-hero h1 { font-size: clamp(1.8rem, 1.15rem + 1.9vw, 2.8rem); line-height: 1.4; }
.page-hero .lede { margin-top: 24px; font-size: 1.15rem; color: var(--ink-soft); max-width: 36em; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; }
@media (max-width: 1000px) { .content-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; } }
.side { position: sticky; top: 104px; display: grid; gap: 22px; }
@media (max-width: 1000px) { .side { position: static; } }
.side-card { border: 1.5px solid var(--ink); background: var(--white); padding: 24px; display: grid; gap: 14px; }
.side-card.dark { background: var(--ink); color: var(--white); }
.side-card.dark p { color: #C9D6D3; }
.side-card h2, .side-card h3 { font-size: 1.15rem; line-height: 1.45; }
.side-card p { font-size: 0.96rem; color: var(--ink-soft); line-height: 1.7; }
.side-card .btn { width: 100%; }
.toc ol { list-style: none; padding: 0; display: grid; gap: 4px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 6px; padding: 6px 0; text-decoration: none; font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft); }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-mono); font-size: 0.78rem; color: var(--red-deep); padding-top: 3px; }
.toc a:hover { color: var(--ink); }

.prose { font-size: 1.08rem; line-height: 2; max-width: 46rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); margin-top: 2.2em; line-height: 1.35; scroll-margin-top: 104px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.3rem; margin-top: 1.8em; line-height: 1.45; }
.prose p { color: #24383A; }
.prose ul, .prose ol { padding-inline-start: 1.3em; display: grid; gap: .45em; }
.prose li::marker { color: var(--red-deep); }
.prose a { color: var(--red-deep); text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.prose .callout { border-inline-start: 4px solid var(--red); background: var(--sand); padding: 18px 22px; font-weight: 500; }
.prose figure { margin: 2em 0; }
.prose figure img { border: 1.5px solid var(--ink); width: 100%; }
.prose figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 8px; }
.prose table.compare { min-width: 560px; font-size: 0.95rem; }

.sys-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .sys-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .sys-grid { grid-template-columns: minmax(0, 1fr); } }
.sys { border: 1.5px solid var(--ink); background: var(--white); padding: 24px 24px 26px; display: grid; gap: 10px; align-content: start; min-width: 0; grid-row: span 3; grid-template-rows: subgrid; }
.sys:nth-child(even) { background: var(--paper); }
.sys .n { font-family: var(--f-mono); font-size: 0.82rem; color: var(--red-deep); justify-self: start; }
.sys h3 { font-size: 1.15rem; line-height: 1.5; }
@media (min-width: 961px) { .sys-grid .sys:last-child:nth-child(3n+1) { grid-column: 1 / -1; } .sys-grid .sys:last-child:nth-child(3n+1) p { max-width: 46em; } .sys-grid .sys:last-child:nth-child(3n+2) { grid-column: span 2; } }
@media (min-width: 581px) and (max-width: 960px) { .sys-grid .sys:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.sys p { color: var(--ink-soft); font-size: 0.97rem; line-height: 1.75; }

.sub-h { font-size: 1.15rem; margin: 40px 0 14px; }
.app-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; border-top: 1.5px solid var(--ink); }
.app-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 500; line-height: 1.6; }
.app-list li::before { content: ""; width: 9px; height: 9px; background: var(--red); transform: translateY(-1px); }
@media (max-width: 620px) { .app-list { grid-template-columns: minmax(0, 1fr); } }
.std-table { list-style: none; padding: 0; margin: 0; border: 1.5px solid var(--ink); background: var(--white); }
.std-table li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 18px; align-items: baseline; padding: 13px 18px; border-bottom: 1px solid var(--line); line-height: 1.6; }
.std-table li:last-child { border-bottom: 0; }
.std-table .code { font-family: var(--f-mono); font-weight: 500; font-size: 0.9rem; color: var(--red-deep); text-align: right; white-space: nowrap; }
.std-table .d { color: var(--ink-soft); font-size: 0.97rem; }
@media (max-width: 520px) { .std-table li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.side-links { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.side-links a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: 0.98rem; transition: color .15s, padding .15s; }
.side-links a .arrow { color: var(--red-deep); }
.side-links a:hover { color: var(--red-deep); padding-inline-start: 6px; }

.facts { border-top: 1.5px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.97rem; }
.side-card .facts { border-top-color: var(--line); }
.facts dt { color: var(--ink-soft); font-size: 0.9rem; }
.facts dd { margin: 0; font-weight: 500; }

.proj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 36px; }
@media (max-width: 960px) { .proj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .proj-grid { grid-template-columns: minmax(0, 1fr); } }
.proj-grid .work-item { width: auto; flex: none; }
.proj-grid .win-img { aspect-ratio: 4 / 3; }
.proj-grid .work-item[hidden] { display: none; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 620px) { .gallery { grid-template-columns: minmax(0, 1fr); } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1.5px solid var(--ink); }
.empty-note { border: 1.5px dashed var(--ink); padding: 34px; text-align: center; color: var(--ink-soft); background: var(--white); }

.map-frame { border: 1.5px solid var(--ink); background: var(--paper-2); aspect-ratio: 16 / 10; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.values { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); }
@media (max-width: 1000px) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .values { grid-template-columns: minmax(0, 1fr); } }
.values li { padding: 26px 0 26px 22px; display: grid; gap: 8px; align-content: start; }
@media (min-width: 1001px) { .values li + li { padding-right: 22px; border-right: 1.5px solid var(--ink); } }
@media (max-width: 1000px) { .values li { border-bottom: 1px solid var(--line); padding-inline: 0; } }
.values .n { font-family: var(--f-mono); color: var(--red-deep); font-size: 0.85rem; }
.values h3 { font-size: 1.2rem; }
.values p { color: var(--ink-soft); font-size: 0.97rem; line-height: 1.7; }

.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .related { grid-template-columns: minmax(0, 1fr); } }
.related .card { min-height: 0; grid-template-rows: auto auto 1fr auto; }
.related .card .n { margin-bottom: 14px; }

.legal { max-width: 46rem; }
.notfound { min-height: 60vh; display: grid; align-content: center; }

.lt { white-space: nowrap; }
bdi { unicode-bidi: isolate; }

.city-links { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: -10px 0 40px; }
.city-links > span { font-weight: 500; color: var(--ink-soft); }
.side-links .cnt { margin-inline-start: auto; color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Audit fixes ---------- */
/* Adjacent cream sections share one padding instead of stacking two */
.section:not(.mint-band):not(.sand-band):not(.cta-band) + .section:not(.mint-band):not(.sand-band):not(.cta-band) { padding-top: 0; }
/* Supporting headings under an article never out-shout the article title */
main > article ~ section .head h2 { font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.5rem); }
/* Mobile: table of contents before the article, other sidebar cards after it */
@media (max-width: 1000px) { .side { display: contents; } .side .toc { order: -1; } }
/* Mobile menu: phone keeps the shared right edge; active page marked */
.menu a bdi { unicode-bidi: isolate; }
.menu a[aria-current="page"] { color: var(--red-deep); box-shadow: inset -3px 0 0 var(--red); }
/* Dark sidebar CTA: keep the hard shadow visible on ink */
.side-card.dark .btn-light:hover { box-shadow: var(--sh-hover); }
/* Hero illustration doesn't swallow the tablet viewport */
/* Phone: trust stats as three equal columns */
@media (max-width: 480px) {
}
/* Client logos: centred rows instead of ragged grid at tablet/phone */
@media (max-width: 900px) { .logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 24px; } .logos li { flex: 0 0 calc((100% - 48px) / 3); } }
@media (max-width: 520px) { .logos li { flex-basis: calc((100% - 24px) / 2); } }
/* Odd last article card at 2 columns spans the row as a horizontal card */
@media (min-width: 621px) and (max-width: 960px) {
  .guides > .guide:last-child:nth-child(odd) { grid-column: 1 / -1; grid-row: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; column-gap: 0; }
  .guides > .guide:last-child:nth-child(odd) .thumb { grid-column: 2; grid-row: 1 / -1; aspect-ratio: auto; position: relative; min-height: 260px; border-bottom: 0; border-right: 1.5px solid var(--ink); }
  .guides > .guide:last-child:nth-child(odd) .thumb img { position: absolute; inset: 0; }
  .guides > .guide:last-child:nth-child(odd) > :not(.thumb) { grid-column: 1; }
}
/* Comparison table (home/services): sticky row labels + swipe hint on narrow screens */
.table-hint { display: none; }
@media (min-width: 621px) and (max-width: 760px) {
  table.compare { min-width: 620px; font-size: .92rem; }
  .compare th, .compare td { padding: 12px 14px; }
  .compare tbody th, .compare thead th:first-child { position: sticky; right: 0; z-index: 1; background: var(--white); box-shadow: -1px 0 0 var(--line); width: 112px; min-width: 112px; }
  .compare thead th:first-child { background: var(--paper-2); }
  .table-hint { display: block; font-size: .85rem; color: var(--ink-soft); margin: 0 0 10px; }
}
/* Article tables: stacked cards on phones */
@media (max-width: 620px) {
  .prose .table-wrap { overflow: visible; border: 0; background: none; box-shadow: none; margin-left: 0; }
  .prose table.compare, .prose .compare tbody { display: block; min-width: 0; width: auto; }
  .prose .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .prose .compare tr { display: block; border: 1.5px solid var(--ink); background: var(--white); margin: 0 0 18px; }
  .prose .compare tbody th { display: block; position: static; width: auto; min-width: 0; box-shadow: none; background: var(--paper-2); font-weight: 700; padding: 12px 14px; border-bottom: 1.5px solid var(--ink); }
  .prose .compare td { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 10px; padding: 10px 14px; }
  .prose .compare td::before { content: attr(data-label); font-weight: 700; color: var(--ink); font-size: .85rem; }
  .prose .compare td:last-child { border-bottom: 0; }
}
/* Legal pages: clearer heading hierarchy */
.prose.legal h2 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.75rem); }
.page-hero-grid > div > h1:first-child { margin-top: 0; }
/* 404: recovery links as an even grid */
@media (max-width: 480px) { .notfound .chips { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .notfound .chips a { display: block; text-align: center; } }
.notfound .chips li:last-child a { background: var(--ink); color: var(--paper); }
/* Home/services comparison: stacked rows on phones */
@media (max-width: 620px) {
  .table-wrap:has(.stack) { overflow: visible; }
  table.compare.stack { min-width: 0; }
  .compare.stack, .compare.stack tbody, .compare.stack tr, .compare.stack th, .compare.stack td { display: block; width: auto; }
  .compare.stack thead { display: none; }
  .compare.stack tr { border-bottom: 1.5px solid var(--ink); }
  .compare.stack tr:last-child { border-bottom: 0; }
  .compare.stack tbody th { background: var(--paper-2); padding: 12px 16px; position: static; min-width: 0; box-shadow: none; }
  .compare.stack td { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
  .compare.stack td:last-child { border-bottom: 0; }
  .compare.stack td::before { content: attr(data-label); font-weight: 700; font-size: .85rem; color: var(--ink); }
}
/* English term under system titles: own line, lighter, wraps if needed */
.sys { grid-template-columns: minmax(0, 1fr); }
.sys h3 .lt { display: block; white-space: normal; font-size: .8em; font-weight: 600; color: var(--ink-soft); margin-top: 2px; }
.values .n { justify-self: start; }

.gallery figure:last-child:nth-child(odd) { grid-column: 1 / -1; }
.gallery figure:last-child:nth-child(odd) img { aspect-ratio: 16 / 8; }
/* Inner-page heroes: long titles stay compact next to the photo on desktop */
@media (min-width: 961px) { .page-hero h1 { font-size: clamp(2rem, 1rem + 2.2vw, 2.9rem); line-height: 1.32; } .page-hero-grid:not(.solo) { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
/* Tablet TOC in two columns */
@media (min-width: 641px) and (max-width: 1000px) { .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; } }
/* About mission block balance */
#mission-h { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); }
@media (min-width: 961px) { .scope-grid:has(#mission-h) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } .scope-grid:has(#mission-h) .scope-list { align-self: center; } }
/* Stats stay 2-up on phones */
@media (max-width: 520px) { .scope-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .scope-list li { padding: 18px 16px; } .scope-list strong { font-size: 2rem; } }
.sys h3 { text-wrap: pretty; }

/* Section headers keep the split layout: the headline wraps inside its half instead of pushing the intro below */
.head-row > .head { flex: 1 1 0; min-width: min(100%, 440px); }
.head-row > .head-side { flex: 0 1 26rem; }
.head-row > .head-side:has(.work-nav):not(:has(p)) { flex: 0 0 auto; }

/* ---------- Home hero: one real project photo ---------- */
.hero-shot { display: block; color: inherit; text-decoration: none; }
.hero-shot .win-img { aspect-ratio: 1 / 0.86; }
.hero-copy .btn-text .arrow { margin-inline-start: 4px; }
@media (max-width: 960px) { .hero-shot { max-width: 620px; width: 100%; justify-self: center; } .hero-shot .win-img { aspect-ratio: 4 / 3; } }

@media (min-width: 961px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }

/* ---------- Header: square controls in the site's hard-shadow language ---------- */
.pill { border-radius: 0; background: var(--red-deep); color: var(--white); transition: transform .15s ease, box-shadow .15s ease; }
.pill:hover { background: var(--red-deep); transform: translateY(-3px); box-shadow: var(--sh-hover); }
.menu summary { width: 46px; height: 46px; padding: 0; border: 1.5px solid var(--ink); border-radius: 0; background: var(--white); display: grid; place-items: center; transition: transform .15s ease, box-shadow .15s ease; }
.menu summary:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); }
.menu[open] summary { background: var(--ink); }
.bars { position: relative; display: block; width: 20px; height: 14px; }
.bars i { position: absolute; inset-inline: 0; height: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease, top .2s ease; }
.bars i:nth-child(1) { top: 0; } .bars i:nth-child(2) { top: 6px; } .bars i:nth-child(3) { top: 12px; }
.menu[open] .bars i { background: var(--white); }
.menu[open] .bars i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu[open] .bars i:nth-child(2) { opacity: 0; }
.menu[open] .bars i:nth-child(3) { top: 6px; transform: rotate(-45deg); }
.menu-panel { position: fixed; top: 72px; left: 0; right: 0; background: var(--paper); border-block: 1.5px solid var(--ink); padding: 6px var(--gutter) 22px; max-height: calc(100svh - 72px); overflow: auto; }
.menu .menu-panel ul { position: static; border: 0; box-shadow: none; background: none; padding: 0; margin: 0; min-width: 0; list-style: none; }
.menu .menu-panel li a { display: flex; justify-content: space-between; align-items: center; padding: 15px 2px; border-bottom: 1px solid var(--line); font-size: 1.08rem; font-weight: 500; }
.menu .menu-panel li a::after { content: "←"; color: var(--red-deep); font-weight: 400; }
.menu .menu-panel li a:hover { background: none; color: var(--red-deep); }
.menu .menu-panel li a[aria-current="page"] { color: var(--red-deep); box-shadow: none; }
.menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.menu .menu-actions .btn { grid-column: 1 / -1; display: flex; justify-content: center; padding: 15px 20px; }
.menu .menu-contact { display: inline-flex; white-space: nowrap; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--ink); padding: 12px; text-decoration: none; font-weight: 500; background: var(--white); }
.menu-contact svg { width: 18px; height: 18px; flex: none; }
.menu-contact bdi { font-family: var(--f-mono); font-size: .9rem; }
/* Breadcrumb: quiet, aligned, with RTL chevrons */
.crumbs { padding-top: 20px; font-size: 0.86rem; }
.crumbs ol { gap: 4px 0; }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: ""; width: 6px; height: 6px; border-left: 1.5px solid #9AA4A0; border-bottom: 1.5px solid #9AA4A0; transform: rotate(45deg); margin: 0 10px 0 12px; flex: none; }
.crumbs a { color: var(--ink-soft); }

.byline { margin-top: 22px; color: var(--ink-soft); font-size: .95rem; }
/* Projects documented without photos: designed tile, never a borrowed photo */
.ph { width: 100%; height: 100%; min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px;
  color: var(--white); background-color: var(--teal);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px); }
.ph svg { width: 54px; height: 54px; color: var(--sand); }
.ph strong { font-family: var(--f-display); font-size: 1.15rem; line-height: 1.5; max-width: 16em; }
.ph span { font-size: .92rem; color: #C9D6D3; }
.ph-big { aspect-ratio: 4 / 3; border: 1.5px solid var(--ink); }
.ph-big svg { width: 72px; height: 72px; }
.ph-big strong { font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem); }

/* Blog index: featured lead article */
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); border: 1.5px solid var(--ink); background: var(--white); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--sh-hover); }
.feature-img { border-inline-end: 1.5px solid var(--ink); min-height: 320px; position: relative; order: 2; }
.feature-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-body { padding: clamp(24px, 3vw, 40px); display: grid; gap: 14px; align-content: center; order: 1; }
.feature-body .meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: .88rem; color: var(--ink-soft); }
.feature-body .meta b { color: var(--red-deep); }
.feature-body h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); line-height: 1.4; }
.feature-body p { color: var(--ink-soft); }
.feature-body .more { font-weight: 700; display: inline-flex; gap: 8px; }
@media (max-width: 860px) { .feature { grid-template-columns: minmax(0, 1fr); } .feature-img { order: 0; border-inline-end: 0; border-bottom: 1.5px solid var(--ink); min-height: 0; aspect-ratio: 16 / 9; } }
.guides .guide[hidden] { display: none; }

.menu .menu-actions .btn:hover, .menu .menu-actions .btn:focus { background: var(--red-deep); color: var(--white); }
.menu .menu-contact:hover { background: var(--white); color: var(--ink); }
/* Arabic headlines need room for dots and descenders between lines */
h1, h2 { line-height: 1.32; }
.hero h1 { line-height: 1.3; }
.hero h1 .it, .head h2 .it, .cta-band h2 .it { line-height: 1.32; margin-top: .06em; }
.head h2, .cta-band h2 { line-height: 1.3; }

/* ---------- Shadow system ----------
   Nothing has a shadow at rest. Every clickable box behaves exactly like the service cards:
   on hover (or keyboard focus) it lifts 3px and shows the one shadow, var(--sh) = -5px 5px 0, both animated over .15s.
   The shadow is ink everywhere; inside dark (ink) cards it is red, because ink on ink would be invisible. */
.side-card.dark { --sh-c: var(--red); --sh: -5px 5px 0 var(--sh-c); --sh-hover: var(--sh); }
.btn-red, .btn-ink, .btn-light, .card, .guide, .feature, .win, .work-nav button, .chips a, .chips button, .pill, .menu summary, .menu .menu-contact {
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-red:hover, .btn-ink:hover, .btn-light:hover, .card:hover, .guide:hover, .feature:hover, .work-nav button:hover,
.chips a:hover, .chips button:hover, .pill:hover, .menu summary:hover, .menu .menu-contact:hover,
.work-item:hover .win, .work-item:focus-visible .win, .hero-shot:hover .win, .hero-shot:focus-visible .win {
  transform: translateY(-3px); box-shadow: var(--sh);
}

/* Phone gallery: cards line up with the column edge and the next one peeks in, so the row reads as scrollable */
@media (max-width: 899px) {
  .work-scroll { gap: 16px; padding: 6px 0 30px; }
  .work-item { flex: 0 0 85%; width: 85%; }
}
