/*
 * Public site styles.
 *
 * The four brand colours arrive as CSS custom properties printed by the layout
 * from Site Settings, so changing them in the dashboard re-themes the site with
 * no build step. Everything below uses logical properties (padding-inline,
 * margin-inline-start, inset-inline) so the Arabic layout mirrors itself
 * without a second stylesheet.
 */

:root {
    --surface: #f5f4f0;
    --ink: #1a1a1a;
    --accent: #c97b3a;
    --dark: #1a1a1a;

    --muted: #6b6b6b;
    --line: #e5e3dd;
    --white: #fff;

    --radius: 20px;
    --radius-sm: 12px;
    --container: 1200px;
    --header-h: 73px;

    /* Cairo carries both alphabets, so headings and body read as one family in
       Arabic and in English and there is no seam when the language switches. */
    --font-display: 'Cairo', system-ui, sans-serif;
    --font-body: 'Cairo', system-ui, sans-serif;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Cairo already covers Arabic, so only the leading changes — Arabic needs more
   room between lines than Latin at the same size. */
[lang='ar'] {
    line-height: 1.85;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 20px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* While the menu drawer is open the page underneath stays where it was. */
body.is-menu-open {
    overflow: hidden;
}

[lang='ar'] body {
    line-height: 1.85;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 700;
    /* Cairo is not a grotesk; the tight tracking that suited the old heading
       face closes its counters up, so only a hair of negative tracking here. */
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0;
}

[lang='ar'] h1,
[lang='ar'] h2,
[lang='ar'] h3,
[lang='ar'] h4 {
    letter-spacing: 0;
    line-height: 1.35;
}

p {
    margin: 0;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}

@media (min-width: 1024px) {
    .container {
        padding-inline: 32px;
    }
}

.section {
    padding-block: 80px;
}

@media (min-width: 1024px) {
    .section {
        padding-block: 112px;
    }
}

.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 0;
    z-index: 200;
}

.skip-link:focus {
    inset-inline-start: 16px;
    top: 16px;
    background: var(--ink);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 999px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 15px 30px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s;
}

.btn:hover {
    transform: scale(1.03);
}

.btn--accent {
    background: var(--accent);
    color: var(--white);
}

.btn--dark {
    background: var(--ink);
    color: var(--white);
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn--ghost-light {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
}

.btn--ghost-light:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--white);
}

.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/*
 * A button that dials.
 *
 * inline-flex so the handset and the words share a baseline, and a gap rather
 * than a margin so the icon leads in English and in Arabic without a second
 * rule — the writing direction orders them.
 */
.btn--call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

/*
 * A ring that swells out of the handset and fades, the way a phone shows an
 * incoming call. It is drawn with box-shadow on a pseudo-element, so nothing
 * around it is pushed about as it grows — only paint changes, never layout.
 */
.btn__icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: call-ring 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes call-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
    }
    /* Held clear for the rest of the cycle, so the ring pulses rather than
       strobing — a beat between rings, like a phone ringing. */
    70%,
    100% {
        box-shadow: 0 0 0 14px rgba(255, 255, 255, 0);
    }
}

.btn--call:hover .btn__icon {
    background: rgba(255, 255, 255, 0.28);
}

/* An invitation, not a distraction: it stops once the button has been used. */
.btn--call:active .btn__icon::after {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .btn__icon::after {
        animation: none;
    }
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.header {
    position: sticky;
    top: 0;
    z-index: 60;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
    border-bottom: 1px solid transparent;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 16px;
    min-height: var(--header-h);
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/*
 * Below the desktop breakpoint the menu button holds the leading edge on its
 * own, so the logo takes the free space and carries the rest of the controls
 * over to the far edge with it. Above it the button is gone and this margin
 * with it, which puts the logo back at the leading edge beside the nav.
 *
 * An inline margin, so the whole arrangement swaps sides with `dir`: the menu
 * is on the left in English and on the right in Arabic either way.
 */
@media (max-width: 1023px) {
    .header__logo {
        margin-inline-start: auto;
    }
}

.header__logo img {
    height: 36px;
    width: auto;
}

.header__nav {
    display: none;
    align-items: center;
    gap: 32px;
    /*
     * The links sit beside the logo on the leading edge — left in English,
     * right in Arabic — rather than floating in the middle of the bar.
     *
     * The auto margin swallows the free space before justify-content gets to
     * share it out, which pins the actions to the far edge. Being an inline
     * margin it swaps sides with `dir` on its own, so this one rule covers
     * both languages.
     */
    margin-inline-end: auto;
    margin-inline-start: 16px;
}

@media (min-width: 1024px) {
    .header__nav {
        display: flex;
    }
}

.header__nav a {
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.header__nav a:hover,
.header__nav a[aria-current='page'] {
    color: var(--accent);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Solid bar: the default on every page except the homepage hero. */
.header--solid {
    background: rgba(245, 244, 240, 0.95);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--line);
    color: var(--ink);
}

/* Transparent over a dark hero, with light type so it stays readable. */
.header--overlay {
    background: transparent;
    color: var(--white);
}

/* Visible at every width: switching language is a primary action on a
   bilingual site, so it should not be buried inside the hamburger menu.
   It starts compact and relaxes once there is room. */
.lang {
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .lang {
        gap: 4px;
        padding: 4px;
    }
}

.header--overlay .lang {
    border-color: rgba(255, 255, 255, 0.3);
}

.lang a,
.lang span {
    border-radius: 999px;
    /* Roomy enough to be a comfortable touch target on a phone — the pill
       comes out around 44px tall — without making the bar look heavy. */
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    transition: opacity 0.2s;
    min-width: 32px;
    text-align: center;
}

/* Pointer devices do not need the extra height. */
@media (min-width: 640px) {
    .lang a,
    .lang span {
        padding: 4px 12px;
        font-size: 12px;
    }
}

.lang a {
    opacity: 0.6;
}

.lang a:hover {
    opacity: 1;
}

.lang .is-active {
    background: var(--ink);
    color: var(--white);
}

.header--overlay .lang .is-active {
    background: var(--white);
    color: var(--ink);
}

.header__cta {
    display: none;
}

@media (min-width: 768px) {
    .header__cta {
        display: inline-block;
    }
}

.burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.header--overlay .burger {
    border-color: rgba(255, 255, 255, 0.3);
}

@media (min-width: 1024px) {
    .burger {
        display: none;
    }
}

/*
 * The menu is a drawer on the leading edge — the same side as the button that
 * opens it, so it appears from under your thumb: left in English, right in
 * Arabic. It used to be a panel that pushed the page down, which moved the
 * content you were reading every time you opened it.
 */
.mobile-menu {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 70;
    width: min(320px, 84vw);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: var(--surface);
    color: var(--ink);
    border-inline-end: 1px solid var(--line);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
    /* Keep a flick inside the drawer from scrolling the page behind it. */
    overscroll-behavior: contain;
    /*
     * transform has no logical form, so this is the one place in the file that
     * needs to know which way round the page is: the drawer parks off the
     * leading edge, which is the left in English and the right in Arabic.
     */
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s 0.3s;
}

[dir='rtl'] .mobile-menu {
    transform: translateX(100%);
}

.mobile-menu.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s 0s;
}

.mobile-menu__backdrop {
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.mobile-menu__backdrop.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s 0s;
}

/* Above the drawer's breakpoint the nav bar carries the links instead. */
@media (min-width: 1024px) {
    .mobile-menu,
    .mobile-menu__backdrop {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu,
    .mobile-menu__backdrop {
        transition: none;
    }
}

.mobile-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.mobile-menu__brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
}

.mobile-menu__brand img {
    height: 30px;
    width: auto;
    display: block;
}

.mobile-menu__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.mobile-menu__close:hover {
    background: rgba(0, 0, 0, 0.04);
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu a {
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
}

.mobile-menu a[aria-current='page'] {
    background: rgba(0, 0, 0, 0.04);
    color: var(--accent);
}

.mobile-menu__langs {
    display: flex;
    gap: 8px;
    /* Sit at the foot of the drawer however short the list is. */
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.mobile-menu__langs a {
    flex: 1;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
}

.mobile-menu__langs a.is-active {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 88vh;
    margin-top: calc(var(--header-h) * -1);
    padding-top: var(--header-h);
    overflow: hidden;
}

.hero__media,
.hero__media img,
.hero__media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__media {
    background: var(--dark);
}

.hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0.2));
}

/* The container keeps its own width and centring; the body is a separate box
   inside it so the text hugs the inline-start edge instead of being centred. */
.hero__inner {
    position: relative;
    padding-bottom: 64px;
}

@media (min-width: 1024px) {
    .hero__inner {
        padding-bottom: 96px;
    }
}

.hero__body {
    max-width: 760px;
    color: var(--white);
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
}

.hero__sub {
    margin-top: 24px;
    max-width: 560px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.0625rem;
}

.hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 40px;
}

/* ── Page hero (inner pages) ─────────────────────────────────────────────── */

.page-hero {
    border-bottom: 1px solid var(--line);
    padding-block: 64px 56px;
}

@media (min-width: 1024px) {
    .page-hero {
        padding-block: 96px 80px;
    }
}

.page-hero h1 {
    margin-top: 16px;
    font-size: clamp(2.2rem, 5vw, 3.75rem);
    max-width: 900px;
}

.page-hero__text {
    margin-top: 24px;
    max-width: 640px;
    color: var(--muted);
}

.eyebrow {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
}

/* ── Section headings ────────────────────────────────────────────────────── */

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

.section-head h2 {
    margin-top: 16px;
    font-size: clamp(1.85rem, 3.5vw, 3rem);
}

.section-head__text {
    margin-top: 20px;
    max-width: 620px;
    color: var(--muted);
}

/* ── Stats ───────────────────────────────────────────────────────────────── */

.stats {
    border-bottom: 1px solid var(--line);
}

/*
 * Each counter is centred over its own label, at every width. A number and the
 * words underneath it read as one unit, and centring keeps that unit together
 * whether they sit in a row or stack into a column on a phone.
 *
 * Flex rather than fixed columns, because the dashboard no longer caps how many
 * counters there can be. Three used to be the only case; a fourth in a
 * three-column grid dropped to a second row on its own. Here the row shares
 * itself out evenly however many there are, and anything that wraps is centred
 * rather than left hanging at the leading edge.
 */
.stats__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding-block: 56px;
    text-align: center;
}

.stats__grid > * {
    /* Grows to share the row, but never so wide that a short number floats in
       the middle of an empty column. */
    flex: 1 1 200px;
    max-width: 360px;
}

@media (max-width: 639px) {
    .stats__grid {
        gap: 32px;
    }

    .stats__grid > * {
        flex-basis: 100%;
    }
}

.stat__value {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.stat__label {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}

/* ── Logo marquee ────────────────────────────────────────────────────────── */

.marquee {
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    padding-block: 40px;
}

.marquee__track {
    display: flex;
    align-items: center;
    gap: 64px;
    width: max-content;
    animation: marquee 40s linear infinite;
}

.marquee:hover .marquee__track {
    animation-play-state: paused;
}

/* Too few logos to fill the strip: centre them and stop the scroll rather than
   sliding a short row past a long gap. */
.marquee--static {
    overflow-x: auto;
}

.marquee--static .marquee__track {
    animation: none;
    width: auto;
    justify-content: center;
}

.marquee img {
    /* Logos arrive at every shape, so cap both axes and let each sit in its own
       box — a wide wordmark and a square badge then read as the same weight. */
    height: 38px;
    max-width: 150px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.55;
    filter: grayscale(1);
    transition: opacity 0.3s, filter 0.3s;
}

.marquee img:hover {
    opacity: 1;
    filter: none;
}

@media (max-width: 639px) {
    .marquee {
        padding-block: 28px;
    }

    .marquee__track {
        gap: 40px;
    }

    .marquee img {
        height: 30px;
        max-width: 110px;
    }
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* RTL scrolls the other way, or the logos march off the wrong edge. */
[dir='rtl'] .marquee__track {
    animation-name: marquee-rtl;
}

@keyframes marquee-rtl {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(50%);
    }
}

/* ── Grids and cards ─────────────────────────────────────────────────────── */

.grid {
    display: grid;
    gap: 24px;
    margin-top: 48px;
}

.grid--2 {
    grid-template-columns: 1fr;
}

.grid--3,
.grid--4 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid--4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.grid--gap-lg {
    gap: 32px;
}

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    transition: box-shadow 0.3s, transform 0.3s var(--ease);
}

.card:hover {
    box-shadow: 0 24px 48px -24px rgba(26, 26, 26, 0.18);
}

.card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--line);
}

.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.card:hover .card__media img {
    transform: scale(1.05);
}

.card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 26px;
}

.card__body h3 {
    margin-top: 16px;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.card:hover .card__body h3 {
    color: var(--accent);
}

.card__desc {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag {
    align-self: flex-start;
    border-radius: 999px;
    background: rgba(201, 123, 58, 0.12);
    color: var(--accent);
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
}

.card__meta {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    display: grid;
    gap: 8px;
}

.card__meta div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.card__meta dt {
    color: var(--muted);
}

.card__meta dd {
    margin: 0;
    font-weight: 500;
    text-align: end;
}

/* Project card: image with a floating category chip. */
.project-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--line);
}

.project-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.project-card:hover .project-card__media img {
    transform: scale(1.05);
}

.project-card__chip {
    position: absolute;
    top: 16px;
    inset-inline-start: 16px;
    border-radius: 999px;
    background: rgba(245, 244, 240, 0.92);
    backdrop-filter: blur(6px);
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
}

.project-card__title {
    margin-top: 10px;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.project-card:hover .project-card__title {
    color: var(--accent);
}

.project-card__location,
.post-card__meta {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.project-card__body {
    margin-top: 20px;
}

.post-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--line);
}

.post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.post-card:hover .post-card__media img {
    transform: scale(1.05);
}

.post-card__body {
    margin-top: 20px;
}

.post-card__meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.post-card__meta .cat {
    color: var(--accent);
}

.post-card h3 {
    margin-top: 12px;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.post-card:hover h3 {
    color: var(--accent);
}

.post-card__excerpt {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Dark band (process, why) ────────────────────────────────────────────── */

.band-dark {
    background: var(--dark);
    color: var(--white);
}

.band-dark .section-head h2 {
    color: var(--white);
}

.band-dark .section-head__text {
    color: rgba(255, 255, 255, 0.6);
}

.steps {
    display: grid;
    gap: 40px;
    margin-top: 56px;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

@media (min-width: 768px) {
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

.steps li {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 24px;
}

.steps__num {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(201, 123, 58, 0.7);
}

.steps li h3 {
    margin-top: 20px;
    font-size: 1.25rem;
    color: var(--white);
}

.steps li p {
    margin-top: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.why-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--dark);
    color: var(--white);
    padding: 32px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.why-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
}

.why-card__body {
    position: relative;
}

.why-card .stat__label {
    color: rgba(255, 255, 255, 0.7);
}

/* ── Testimonials ────────────────────────────────────────────────────────── */

.testimonials {
    background: var(--white);
    border-block: 1px solid var(--line);
}

.slide {
    display: none;
    max-width: 760px;
    margin-inline: auto;
    text-align: center;
}

.slide.is-active {
    display: block;
    animation: fade-up 0.5s var(--ease);
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.slide blockquote {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.6vw, 1.9rem);
    line-height: 1.4;
}

.slide figcaption {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.slide img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.slide__name {
    font-weight: 600;
}

.slide__company {
    margin-top: 4px;
    font-size: 14px;
    color: var(--muted);
}

.dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    background: var(--line);
    cursor: pointer;
    padding: 0;
    transition: background-color 0.25s;
}

.dots button.is-active {
    background: var(--accent);
}

/* ── CTA banner ──────────────────────────────────────────────────────────── */

.cta {
    border-radius: var(--radius);
    background: var(--dark);
    color: var(--white);
    padding: 64px 32px;
    text-align: center;
}

@media (min-width: 1024px) {
    .cta {
        padding: 96px 64px;
    }
}

.cta h2 {
    max-width: 760px;
    margin-inline: auto;
    color: var(--white);
    font-size: clamp(1.85rem, 4vw, 3rem);
}

.cta p {
    max-width: 560px;
    margin: 24px auto 0;
    color: rgba(255, 255, 255, 0.6);
}

.cta .btn {
    margin-top: 40px;
}

/* ── Filters, pagination ─────────────────────────────────────────────────── */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filters a {
    border-radius: 999px;
    border: 1px solid var(--line);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.filters a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filters a.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 56px;
    font-size: 14px;
}

.pagination a,
.pagination span {
    border-radius: 999px;
    border: 1px solid var(--line);
    padding: 10px 20px;
}

.pagination span {
    border-color: transparent;
    color: var(--muted);
}

/* ── Detail pages ────────────────────────────────────────────────────────── */

.detail {
    display: grid;
    gap: 48px;
    align-items: start;
}

@media (min-width: 1024px) {
    .detail {
        grid-template-columns: 2fr 1fr;
    }
}

.detail__lead {
    font-size: 1.0625rem;
    line-height: 1.8;
}

.facts {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    padding-inline: 28px;
    margin: 0;
}

.facts > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding-block: 20px;
    border-bottom: 1px solid var(--line);
}

.facts > div:last-child {
    border-bottom: 0;
}

.facts dt {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.facts dd {
    margin: 0;
    font-weight: 500;
    text-align: end;
}

.wide-image {
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
    border-radius: var(--radius);
}

/* Rich text from the dashboard editor. */
.prose {
    line-height: 1.85;
    max-width: 72ch;
}

.prose > * + * {
    margin-top: 1.15em;
}

.prose h2 {
    font-size: 1.6rem;
    margin-top: 2em;
}

.prose h3 {
    font-size: 1.3rem;
    margin-top: 1.75em;
}

.prose ul,
.prose ol {
    padding-inline-start: 1.5rem;
}

.prose ul {
    list-style: disc;
}

.prose ol {
    list-style: decimal;
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.prose blockquote {
    border-inline-start: 3px solid var(--accent);
    padding-inline-start: 20px;
    margin-inline: 0;
    font-style: italic;
    color: var(--muted);
}

.prose img {
    border-radius: var(--radius-sm);
}

/* ── Gallery + lightbox ──────────────────────────────────────────────────── */

.gallery {
    display: grid;
    gap: 16px;
    margin-top: 40px;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery button {
    padding: 0;
    border: 0;
    background: var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: zoom-in;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.gallery button:hover img {
    transform: scale(1.05);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    padding: 24px;
}

.lightbox.is-open {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.lightbox__close {
    position: absolute;
    top: 24px;
    inset-inline-end: 24px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

/* ── Team ────────────────────────────────────────────────────────────────── */

.member__photo {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--line);
}

.member__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member h3 {
    margin-top: 20px;
    font-size: 1.125rem;
}

.member__role {
    margin-top: 4px;
    font-size: 14px;
    color: var(--accent);
}

.member__bio {
    margin-top: 12px;
    font-size: 14px;
    color: var(--muted);
}

.member__links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

.member__links a:hover {
    color: var(--accent);
}

/* ── Contact ─────────────────────────────────────────────────────────────── */

.contact-grid {
    display: grid;
    gap: 56px;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* The enquiry block on the homepage. A white band separates it from the
   sections above and from the closing banner below. */
.contact-block {
    background: var(--white);
    border-block: 1px solid var(--line);
    /* The header is sticky, so an anchor jump must clear it. */
    scroll-margin-top: var(--header-h);
}

@media (max-width: 1023px) {
    .contact-block .contact-grid {
        gap: 40px;
    }
}

.field {
    margin-bottom: 24px;
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: inherit;
    padding: 13px 16px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
}

.field textarea {
    resize: vertical;
    min-height: 140px;
}

.field__error {
    margin-top: 8px;
    font-size: 12px;
    color: #c0392b;
}

.field--error input,
.field--error textarea {
    border-color: #c0392b;
}

.field-row {
    display: grid;
    gap: 24px;
}

@media (min-width: 640px) {
    .field-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* The honeypot: off-screen for people, irresistible to bots. */
.hp {
    position: absolute;
    inset-inline-start: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    border-radius: var(--radius);
    padding: 18px 24px;
    font-size: 14px;
    margin-bottom: 32px;
}

.alert--success {
    background: rgba(201, 123, 58, 0.12);
    border: 1px solid rgba(201, 123, 58, 0.3);
}

.alert--error {
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.3);
    color: #922b21;
}

.info-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    padding: 32px;
    margin: 0;
}

.info-card > div + div {
    margin-top: 24px;
}

.info-card dt {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.info-card dd {
    margin: 8px 0 0;
    white-space: pre-line;
}

.map {
    margin-top: 32px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    line-height: 0;
}

.map iframe {
    width: 100%;
    height: 340px;
    border: 0;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
    background: var(--dark);
    color: var(--white);
}

.footer__grid {
    display: grid;
    gap: 48px;
    padding-block: 64px;
}

@media (min-width: 640px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer__grid {
        grid-template-columns: repeat(4, 1fr);
        padding-block: 80px;
    }
}

.footer h2 {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.4);
}

.footer ul {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
    font-size: 14px;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--accent);
}

.footer__logo img {
    height: 40px;
    width: auto;
}

.footer__tagline {
    margin-top: 20px;
    max-width: 280px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.footer__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.footer__socials a {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 500;
}

.footer__socials a:hover {
    border-color: var(--accent);
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__bottom .container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-block: 24px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 640px) {
    .footer__bottom .container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.footer__bottom nav {
    display: flex;
    gap: 20px;
}

/* ── 404 ─────────────────────────────────────────────────────────────────── */

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding-block: 96px;
}

.error-page__code {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--accent);
}

.error-page h1 {
    margin-top: 24px;
    font-size: 2rem;
}

.error-page p {
    margin-top: 16px;
    max-width: 420px;
    color: var(--muted);
}

/* ── Scroll reveal ───────────────────────────────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Anyone who asks for less motion gets the page, just still. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .marquee__track,
    .slide.is-active {
        animation: none;
    }

    .btn:hover,
    .card:hover .card__media img,
    .project-card:hover .project-card__media img {
        transform: none;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
 * Phone refinements
 *
 * Measured on a 375px viewport against the real page rather than guessed: the
 * small uppercase labels sat at 12–13px, and the footer and inline links were
 * around 26–30px tall, which is under the size a finger can hit reliably.
 *
 * Scoped to phones so the desktop layout keeps its tighter, more editorial
 * proportions.
 * ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 639px) {
    /* Small type: 12–13px is fine under a mouse and too small on a phone,
       Arabic especially, where the shapes carry more detail per character. */
    .eyebrow,
    .tag,
    .stat__label,
    .project-card__location,
    .post-card__meta,
    .facts dt,
    .info-card dt {
        font-size: 13px;
    }

    .card__desc,
    .post-card__excerpt,
    .footer ul,
    .steps li p {
        font-size: 15px;
    }

    /* Tap targets. The links themselves grow rather than the gaps, so the
       spacing between them stays as designed. */
    .footer ul {
        gap: 2px;
    }

    .footer ul a,
    .info-card dd a {
        display: inline-block;
        padding-block: 9px;
    }

    .footer__bottom nav a {
        display: inline-block;
        padding-block: 8px;
    }

    /* Filter chips are scrolled past and tapped, so they need the room too. */
    .filters a {
        padding: 12px 18px;
    }

    .pagination a,
    .pagination span {
        padding: 12px 20px;
    }

    /* Buttons: full width reads as a clearer target than a floating pill, and
       stops two of them sitting awkwardly side by side. */
    .hero__buttons .btn,
    .contact-block form .btn,
    .cta .btn {
        width: 100%;
        text-align: center;
    }

    .hero__buttons {
        gap: 12px;
    }

    /* Form controls at 16px stop iOS zooming the page when one is focused. */
    .field input,
    .field textarea,
    .field select {
        font-size: 16px;
        padding: 13px 14px;
    }

    /* Section rhythm tightens up so a phone is not mostly whitespace. */
    .section {
        padding-block: 56px;
    }

    .grid {
        margin-top: 32px;
    }

    .cta {
        padding: 48px 24px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
 * Arabic typography
 *
 * Last in the file on purpose. Arabic is cursive — letters join — and the
 * positive tracking used on the Latin labels and eyebrows pulls those joins
 * apart into something that reads as broken. Those rules are plain class
 * selectors defined further up, so an override needs both the extra
 * specificity and the later position to win.
 *
 * A page is one language throughout, so this can never reach Latin text.
 * ────────────────────────────────────────────────────────────────────────── */

html[lang='ar'] *,
html[lang='ar'] *::before,
html[lang='ar'] *::after {
    letter-spacing: normal;
}

/* A few labels stayed at 12px, which is small for Arabic on a phone. */
@media (max-width: 639px) {
    .project-card__chip,
    .footer h2,
    .footer__socials a,
    .footer__bottom .container,
    .card__meta {
        font-size: 13px;
    }
}
