/* Inner pages: About, Services, Clients, Portfolio, Blog, Contact. The same
   pale sky as the home scene, the menu's glass for the header, and the menu's
   section styles (departments, logos, cards) laid out on an ordinary page that
   scrolls. Loaded after styles.css. */
html.is-page, html.is-page body { height: auto; overflow: visible; }
/* Safari on iOS paints the strip behind the clock (and the overscroll) with the page
   background, so it carries the colour at the top of each page, and the footer's
   colour below; over the forest footer the top turns forest too, as on home. */
html.is-page {
  --edge-top: #cddde8;
  --edge-bottom: #070a08;
  background-color: var(--edge-top);
  background-image: linear-gradient(var(--edge-top) 50%, var(--edge-bottom) 50%);
}
html.is-page:has(body[data-page="about"]) { --edge-top: #cfdde8; }
html.is-page:has(body[data-page="portfolio"]) { --edge-top: #06080d; --edge-bottom: #05080c; }
html.is-page:has(body.on-forest) { --edge-top: #2b302d; }
body.page {
  --m-ink: #15171a;
  --m-dim: rgba(21, 23, 26, .62);
  --m-rule: rgba(21, 23, 26, .1);
  --m-gold: #3f5d7c;
  --m-bg: #fff;
  --glass: linear-gradient(170deg, rgba(244, 248, 252, .8), rgba(221, 232, 241, .72) 52%, rgba(248, 236, 228, .76));
  --col: clamp(20px, 5vw, 64px);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #cddde8 0, #e6eaee 460px, #f7f8fa 980px) no-repeat, #f7f8fa;
  color: var(--m-ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}
/* zero-weight, so buttons with their own colour (the viewer's Start a project) keep it */
:where(.page) a { color: inherit; }
:where(.page) ul { list-style: none; }

/* header: logo · the menu in the middle · start a project */
.page__head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px var(--col);
  background: linear-gradient(180deg, rgba(205, 221, 232, .78), rgba(230, 236, 241, .6));
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, .6);
}
.page__mark picture, .page__mark img { display: block; height: 44px; width: auto; }
.page__start {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--m-ink);
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .3s var(--ease-out), background .3s;
}
.page__tools { justify-self: end; display: flex; align-items: center; gap: 10px; }
.page__tools .page__start { justify-self: auto; }
.page .lang { height: 42px; border-color: rgba(21, 23, 26, .14); background: rgba(255, 255, 255, .5); box-shadow: none; }
.page__start:hover { transform: translateY(-1px); background: #2a2f36; }

.page__main {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 112px) var(--col) clamp(64px, 9vw, 120px);
}
.page__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--m-gold);
}
.page__title {
  margin: 14px 0 18px;
  font-size: clamp(44px, 7.4vw, 96px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.page__main > .menu__lead { max-width: 56ch; margin: 0 0 clamp(40px, 6vw, 64px); font-size: clamp(17px, 1.6vw, 20px); }
.page__main > .menu__label { display: none; }

/* the menu's sections, given room to breathe */
.page .depts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 72px); }
.page .dept {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 20px;
  background: var(--glass);
  box-shadow: 0 18px 40px rgba(40, 60, 90, .08);
}
.page .dept__name { font-size: 20px; }
.page .dept__list strong { font-size: 16px; }
.page .dept__list span { font-size: 14.5px; }
.page .logos { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.page .cards--menu { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 36px 22px; }
.page .chip { border-color: rgba(21, 23, 26, .18); background: rgba(255, 255, 255, .55); }
.page .menu__cta, .page .menu__more { margin-top: 40px; }
.page .menu__jump { color: var(--m-ink); }

/* footer: one line to start a project, then the socials */
.page__foot {
  padding: clamp(48px, 7vw, 80px) var(--col) max(28px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #e6eaee, #cddde8);
  border-top: 1px solid rgba(255, 255, 255, .7);
}
.page__cta {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.page__cta p { font-size: clamp(28px, 4vw, 48px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.page__cta p { max-width: 16ch; }
.page__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.page__btns .menu__cta { margin-top: 0; min-height: 46px; padding: 0 24px; }
.page__btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px;
  border: 1px solid var(--m-ink); border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  transition: background .3s, color .3s;
}
.page__btn:hover { background: var(--m-ink); color: #fff; }
.page__small {
  max-width: 1240px;
  margin: 40px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--m-dim);
}
.page__small nav { display: flex; gap: 18px; }
.page__small a { text-decoration: none; }
.page__small a:hover { color: var(--m-ink); }

@media (max-width: 900px) {
  .page .depts { grid-template-columns: 1fr; }
  .page .logos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* phones: logo and Start a project on one row, the menu scrolls sideways under them */
@media (max-width: 760px) {
  .page__head { grid-template-columns: 1fr auto; row-gap: 12px; padding-top: max(12px, env(safe-area-inset-top)); }
  /* one row: the logo, then the icon menu bar; Start a project waits in the
     footer (WhatsApp, Email, Call) on phones */
  .page__head { grid-template-columns: auto 1fr; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 16px 10px; }   /* the logo sits where it does on home */
  .page__head .topnav { grid-column: 2; grid-row: 1; justify-self: end; }
  .page__tools { display: none; }
  .page__mark picture, .page__mark img { height: 40px; }
  .page__start { padding: 10px 16px; }
  .page__tools { gap: 8px; }
  .page__btns { gap: 8px; flex-wrap: nowrap; }
  .page__btns .menu__cta, .page__btn { min-height: 44px; padding: 0 16px; font-size: 11px; letter-spacing: .1em; }
  .page .lang { height: 38px; padding: 0 12px; font-size: 14px; }
  .page .dept { padding: 22px; }
  .page .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page .cards--menu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
}

/* Portfolio: like a pinned preview. One tall rounded card holds three projects
   stacked, each with its name across the top; View project and a zoom button
   sit at the bottom. The cards run down the middle of the page. */
.pins { display: grid; justify-items: center; gap: clamp(36px, 5vw, 56px); margin-top: clamp(28px, 4vw, 44px); }
.pin {
  display: grid;
  width: 100%;
  grid-auto-rows: auto;
  overflow: hidden;
  border-radius: 26px;
  background: #e9e6e1;
  box-shadow: 0 30px 70px rgba(30, 45, 70, .2), 0 2px 6px rgba(30, 45, 70, .06);
}
.pin__band { position: relative; min-height: 0; overflow: hidden; cursor: pointer; outline: none; }
.pin__band:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.pin__band::before { content: ""; position: absolute; inset: 0 0 auto; height: 60%; z-index: 1; background: linear-gradient(180deg, rgba(8, 10, 14, .6), rgba(8, 10, 14, 0)); pointer-events: none; }
.pin__band img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.pin__band:hover img { transform: scale(1.04); }
.pin__cap { position: absolute; z-index: 2; top: clamp(18px, 2.4vw, 30px); left: clamp(20px, 2.6vw, 36px); max-width: 62%; color: #fff; font-size: clamp(22px, 3.4vw, 46px); font-weight: 800; line-height: 1.02; letter-spacing: -.025em; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.pin__tag { position: absolute; z-index: 2; top: clamp(22px, 2.8vw, 36px); right: clamp(20px, 2.6vw, 36px); color: rgba(255, 255, 255, .9); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.pin__view, .pin__zoom {
  position: absolute;
  z-index: 3;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  color: var(--m-ink);
  box-shadow: 0 6px 18px rgba(20, 30, 50, .14);
}
.pin__view { left: 14px; gap: 8px; padding: 0 18px 0 14px; font-size: 16px; font-weight: 600; }
.pin__zoom { right: 14px; justify-content: center; width: 46px; border: 0; cursor: pointer; }
.pin svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.page .pin__more { display: flex; margin: clamp(40px, 5vw, 56px) auto 0; }
/* portfolio page: a soft dark-blue gradient behind everything, light at the top
   where the title sits, deep navy behind the projects; the button turns light */
body.page[data-page="portfolio"] { background: #06080d url("assets/img/portfolio-bg.webp") center top / cover no-repeat; }
body.page[data-page="portfolio"] .pin__more { background: #f4f6f8; color: #0d1117; }
body.page[data-page="portfolio"] .pin__more svg { stroke: currentColor; }
.pin__more[hidden] { display: none; }
/* laptop and up */
@media (min-width: 601px) {
  /* wide: from the logo's left edge to the Start a project button's right edge
     (the header's own side margins); the three projects one under the other */
  .pins { width: calc(100vw - 2 * var(--col)); margin-inline: calc(50% - 50vw + var(--col)); }
  /* one card, 10% narrower than the logo-to-button width, square corners, the
     three projects stacked inside; each row takes its own picture's shape, so
     every picture shows whole and fills the width */
  .pin { width: 90%; grid-auto-rows: auto; border-radius: 0; background: #0a0f15; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); }
  /* each row 16:9; each picture shows whole
     in the middle, and a soft blurred copy of it fills the sides */
  .pin__band { aspect-ratio: 16 / 9; isolation: isolate; background: #0a0f15; }
  .pin__band::after { content: ""; position: absolute; inset: -40px; z-index: -1; background: var(--img) center / cover no-repeat; filter: blur(30px) brightness(.6); }
  .pin__band + .pin__band { border-top: 1px solid rgba(255, 255, 255, .12); }
  .pin__band img { object-fit: contain; object-position: 50% 50%; }
  .pin__cap { font-size: clamp(22px, 2.4vw, 34px); }
}
@media (max-width: 600px) {
  /* phones: one under the other, each at its own picture's shape; square corners */
  .pin { border-radius: 0; }
  .pin__band { aspect-ratio: var(--r, 1); }
  .pin__band img { object-fit: contain; object-position: 50% 50%; }
}
@media (prefers-reduced-motion: reduce) { .pin__band img { transition: none; } }
body.page[data-page="portfolio"] .page__eyebrow { color: rgba(225, 235, 245, .8); }
body.page[data-page="portfolio"] .page__title { color: #fff; }
body.page[data-page="portfolio"] .page__main > .menu__lead { color: rgba(255, 255, 255, .94); }
body.page[data-page="portfolio"] .chip { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); color: #fff; }
body.page[data-page="portfolio"] .chip:hover,
body.page[data-page="portfolio"] .chip[aria-pressed="true"] { border-color: #f4f6f8; background: #f4f6f8; color: #0d1117; }
/* portfolio heading: no eyebrow, title, line and filters centred and a bit bigger */
body.page[data-page="portfolio"] .page__eyebrow { display: none; }
body.page[data-page="portfolio"] .page__title { margin-top: 0; text-align: center; font-size: clamp(52px, 8.6vw, 120px); }
body.page[data-page="portfolio"] .page__main > .menu__lead { margin-inline: auto; text-align: center; font-size: clamp(19px, 1.9vw, 24px); }
body.page[data-page="portfolio"] .chips--filter { justify-content: center; }
body.page[data-page="portfolio"] .chip { font-size: 15px; padding-inline: 20px; }
.pins__empty { margin: clamp(24px, 4vw, 48px) 0; text-align: center; font-size: clamp(16px, 1.5vw, 19px); color: rgba(255, 255, 255, .8); }
/* the header has no line under it, like home: the frosted bar fades out at its
   bottom edge instead of ending on a border */
.page__head { background: none; border-bottom: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.page__head::before {
  content: "";
  position: absolute;
  inset: 0 0 -28px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(205, 221, 232, .82), rgba(230, 236, 241, .55) 60%, rgba(230, 236, 241, 0));
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  pointer-events: none;
}
/* no shade behind the header either: logo, menu and buttons float, like home */
.page__head::before { display: none; }

/* ───────── About: one big card of the home sky ─────────
   A rounded card of the home sky and cloud sea: the headline on the left, the
   founder in the middle above the clouds, a short line and the buttons on the
   right, the page's four parts on a glass strip along its foot. Then a short
   intro, the three cities as tall photo cards, and a glass band of logos.
   The header floats over the page, as it does on home. */
body.page[data-page="about"] { background: linear-gradient(180deg, #cfdde8 0, #e4ebf1 560px, #f7f9fb 1200px) no-repeat, #f7f9fb; }
body.page[data-page="about"] .page__head { position: fixed; left: 0; right: 0; }
.acard-wrap { padding: clamp(84px, 9vh, 100px) var(--col) 0; }
.acard {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: 1480px;
  height: clamp(600px, calc(100svh - 124px), 840px);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 36px;
  background: #cfdde8;
  box-shadow: 0 30px 70px rgba(40, 60, 90, .14), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.acard__sky { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.acard__sky img { display: block; width: 100%; height: 100%; object-fit: cover; animation: sky-drift 28s ease-in-out infinite alternate; will-change: transform; }
.acard__clouds { position: absolute; z-index: -1; left: -6%; right: -6%; bottom: -2%; pointer-events: none; }
.acard__clouds img { display: block; width: 100%; height: auto; animation: sea-drift 21s ease-in-out infinite alternate; }
/* the founder: his head on the card's middle line, his chair sinking into the clouds */
.acard__ceo {
  position: absolute;
  z-index: 0;
  bottom: 0;
  left: 50%;
  height: 84%;
  width: auto;
  translate: -66% 0;
  filter: drop-shadow(0 26px 34px rgba(30, 45, 70, .22));
  animation: acard-rise 1.1s var(--enter) .25s both;
}
.acard__text { position: absolute; z-index: 1; inset-inline-start: clamp(28px, 3.6vw, 56px); top: clamp(30px, 4.4vw, 60px); }
.acard .eyebrow { margin: 0 0 1.4em .15em; opacity: .66; letter-spacing: .18em; color: var(--m-ink); }
.acard .headline { font-size: clamp(3rem, 6.6vw, 7.4rem); line-height: .94; letter-spacing: -.05em; color: var(--m-ink); }
.acard .line { overflow: hidden; padding-bottom: .06em; }
.acard .line > span { display: inline-block; animation: ahero-rise .9s var(--enter) both; animation-delay: calc(.2s + var(--i) * .09s); }
.acard__side { position: absolute; z-index: 1; inset-inline-end: clamp(28px, 3.6vw, 56px); top: clamp(36px, 5vw, 68px); width: min(330px, 25%); animation: ahero-up .7s var(--enter) .45s both; }
.acard__side p { font-size: 15.5px; line-height: 1.55; color: rgba(21, 23, 26, .74); text-wrap: pretty; }
.acard__side .actions, .aintro .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 24px; }
.page .discover--solid { background: #15171a; border-color: #15171a; color: #f6f7f9; }
.page .home__see { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.page .home__see svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.acard__tag {
  position: absolute;
  z-index: 1;
  left: calc(50% + clamp(110px, 11vw, 170px));
  top: 40%;
  display: grid;
  gap: 2px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 16px;
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 12px 30px rgba(40, 60, 90, .12);
  animation: ahero-up .7s var(--enter) .8s both;
}
.acard__tag b { font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.acard__tag span { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .55; }
/* the strip along the foot: 01–04, each opens a small popup that explains it */
.acard__depts {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 24px;
  background: linear-gradient(170deg, rgba(255, 255, 255, .66), rgba(236, 242, 247, .56));
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 14px 36px rgba(40, 60, 90, .1);
}
.acard__depts button { display: grid; align-content: start; gap: 4px; padding: clamp(16px, 1.8vw, 24px) clamp(18px, 2vw, 28px); border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; transition: background .3s; }
.acard__depts button + button { border-inline-start: 1px solid rgba(21, 23, 26, .08); }
.acard__depts button:hover { background: rgba(255, 255, 255, .45); }
.acard__depts button:focus-visible { outline: 2px solid #15171a; outline-offset: -4px; }
.acard__depts button:first-child { border-start-start-radius: 23px; border-end-start-radius: 23px; }
.acard__depts button:last-child { border-start-end-radius: 23px; border-end-end-radius: 23px; }
.acard__depts small::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-start: 8px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; rotate: 45deg; translate: 0 -1px; opacity: .55; }
html[dir="rtl"] .acard__depts small::after { rotate: -135deg; }

/* About: the small popup each of 01–04 opens */
.apop { position: fixed; inset: 0; margin: auto; width: fit-content; height: fit-content; padding: 0; border: 0; background: none; max-width: none; max-height: none; overflow: visible; color: #15171a; }
.apop::backdrop { background: rgba(16, 24, 34, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.apop__card {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  padding: 30px 30px 28px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 28px;
  background: linear-gradient(170deg, #fff, #eef3f7);
  box-shadow: 0 30px 80px rgba(20, 34, 52, .22), 0 2px 0 rgba(255, 255, 255, .8) inset;
}
.apop[open] .apop__card { animation: apop-in .42s cubic-bezier(.2, .8, .2, 1) both; }
.apop[open]::backdrop { animation: apop-fade .3s ease both; }
.apop.is-closing .apop__card { animation: apop-out .22s ease both; }
.apop.is-closing::backdrop { animation: apop-fade .22s ease reverse both; }
@keyframes apop-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes apop-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes apop-fade { from { opacity: 0; } }
.apop__n { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; opacity: .45; }
.apop h2 { margin: 6px 0 18px; padding-bottom: 16px; border-bottom: 1px solid rgba(21, 23, 26, .08); font-size: 1.6rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.apop p { display: grid; gap: 4px; margin: 0; }
.apop p + p, .apop p + .apop__link { margin-top: 16px; }
.apop p b { font-size: 16px; font-weight: 700; }
.apop p span { font-size: 15px; line-height: 1.55; color: rgba(21, 23, 26, .62); }
.apop__link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: inherit; text-decoration: none; }
.apop__link svg, .apop__x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.apop__x { position: absolute; top: 16px; inset-inline-end: 16px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid rgba(21, 23, 26, .08); border-radius: 50%; background: rgba(255, 255, 255, .7); color: inherit; cursor: pointer; transition: background .2s; }
.apop__x:hover { background: #fff; }
.apop__card:focus { outline: none; }
html[lang="ar"] .apop h2, html[lang="ar"] .apop__n { letter-spacing: 0; }
body.page[data-page="about"] .page__main:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .apop[open] .apop__card, .apop[open]::backdrop, .apop.is-closing .apop__card, .apop.is-closing::backdrop { animation: none; } }
.acard__n { font-size: 11px; font-weight: 700; letter-spacing: .08em; opacity: .45; }
.acard__depts b { font-size: clamp(15px, 1.25vw, 18px); font-weight: 800; letter-spacing: -.02em; }
.acard__depts small { font-size: 13px; color: rgba(21, 23, 26, .6); }
/* a soft mist rises over his legs, so he sits in the clouds rather than ending at the strip */
.acard::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 36%; background: linear-gradient(180deg, rgba(238, 243, 247, 0), rgba(238, 243, 247, .78) 52%, #eef3f7 82%); pointer-events: none; }
/* Arabic: the headline sits on the right, so the founder moves a little left and his tag goes to his other side */
html[dir="rtl"] .acard__ceo { translate: -78% 0; }
html[dir="rtl"] .acard__tag { left: auto; right: calc(50% + clamp(150px, 15vw, 230px)); }
html[lang="ar"] .acard .headline { font-size: clamp(2.8rem, 5.4vw, 6rem); line-height: 1.12; }
html[lang="ar"] :is(.acard .eyebrow, .aintro .eyebrow, .acard__tag span, .acity__chip, .abrands__label span, .abrands__label a) { letter-spacing: 0; }
@keyframes acard-rise { from { opacity: 0; transform: translate3d(0, 40px, 0); } }
@keyframes ahero-rise { from { transform: translate3d(0, 110%, 0); } }
@keyframes ahero-up { from { opacity: 0; transform: translate3d(0, 16px, 0); } }

/* intro: a big line on the left, the story and the buttons on the right */
.aintro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
  width: 100%;
  max-width: 1240px;
  margin: clamp(80px, 9vw, 128px) auto 0;
  padding: 0 var(--col);
}
.aintro .eyebrow { margin: 0 0 1.2em .15em; opacity: .6; letter-spacing: .18em; }
.aintro h2 { font-size: clamp(2.2rem, 4.2vw, 4rem); font-weight: 800; line-height: 1; letter-spacing: -.045em; text-wrap: balance; }
.aintro__side p { font-size: clamp(16px, 1.3vw, 18px); line-height: 1.6; color: rgba(21, 23, 26, .7); text-wrap: pretty; }

/* the three cities: tall rounded photo cards */
.acities-wrap { width: 100%; max-width: 1240px; margin: clamp(48px, 5vw, 72px) auto clamp(72px, 8vw, 120px); padding: 0 var(--col); }
.acities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.acity {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 28px;
  background: #b9cad8;
  box-shadow: 0 22px 50px rgba(40, 60, 90, .14);
  isolation: isolate;
}
.acity img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.acity:hover img { transform: scale(1.04); }
.acity::after { content: ""; position: absolute; inset: 45% 0 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 14, 22, 0), rgba(8, 14, 22, .62)); }
.acity__chip {
  position: absolute;
  top: 16px;
  inset-inline-start: 16px;
  display: inline-flex;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--m-ink);
}
.acity__chip span:first-child { opacity: .5; }
.acity__text { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 6px; padding: 24px 26px 26px; color: #fff; }
.acity__text b { font-size: clamp(2rem, 3vw, 2.9rem); font-weight: 800; line-height: 1; letter-spacing: -.045em; }
.acity__text span { font-size: 14.5px; opacity: .86; }

/* the brands: one glass band, the count on one side, logos gliding by */
.abrands {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
  margin-top: clamp(24px, 3vw, 40px);
  padding: 16px;
  padding-inline-start: clamp(22px, 2.6vw, 36px);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 28px;
  background: var(--glass);
  box-shadow: 0 18px 40px rgba(40, 60, 90, .08);
}
.abrands__label { flex: none; display: grid; gap: 2px; }
.abrands__label span { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .55; }
.abrands__label b { font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.05; }
.abrands__label a { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; opacity: .7; }
.abrands__label a svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.abrands__run {
  direction: ltr;
  flex: 1;
  min-width: 0;
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.abrands__run ul { display: flex; flex-shrink: 0; animation: wall-run 90s linear infinite; }
.abrands__run:hover ul { animation-play-state: paused; }
.abrands__run li { position: relative; flex: none; width: clamp(110px, 9vw, 140px); aspect-ratio: 3 / 2; margin-right: 12px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(40, 60, 90, .08); }
.abrands__run img { position: absolute; inset: 18% 16%; width: 68%; height: 64%; object-fit: contain; filter: grayscale(1); opacity: .6; transition: filter .4s, opacity .4s; }
.abrands__run li:hover img { filter: none; opacity: 1; }

body.page[data-page="about"] .page__main { padding-top: clamp(72px, 8vw, 112px); }
body.page[data-page="about"] .dept { scroll-margin-top: 110px; }
@media (max-width: 1100px) and (min-width: 761px) {
  .acard__side { width: 30%; }
  .acard__tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .acard .line > span, .acard__side, .acard__tag, .acard__ceo, .acard__sky img, .acard__clouds img, .abrands__run ul { animation: none; }
}

/* ───────── Clients: a slow moving wall of every logo ─────────
   Four rows run the full width of the screen, gliding in turn left and right,
   in grey until you point at one. Only a transform moves, so it stays smooth. */

body.page[data-page="clients"] .page__main { max-width: none; text-align: center; }
body.page[data-page="clients"] .page__title { margin-top: 10px; font-size: clamp(48px, 8vw, 112px); }
body.page[data-page="clients"] .page__main > .menu__lead { margin-inline: auto; }
.wall {
  display: grid;
  gap: 16px;
  margin: clamp(8px, 2vw, 24px) calc(-1 * var(--col)) 0;
  direction: ltr;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.wall__row { display: flex; width: max-content; }
.wall__track { display: flex; flex-shrink: 0; animation: wall-run var(--dur) linear infinite; }
.wall__track--back { animation-direction: reverse; }
.wall__row:hover .wall__track { animation-play-state: paused; }
@keyframes wall-run { to { transform: translate3d(-100%, 0, 0); } }
.wall li {
  position: relative;
  flex: none;
  width: clamp(124px, 12vw, 184px);
  aspect-ratio: 3 / 2;
  margin-right: 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(40, 60, 90, .08);
}
.wall img {
  position: absolute;
  inset: 18% 16%;
  width: 68%;
  height: 64%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .55;
  transition: filter .4s var(--ease-out), opacity .4s var(--ease-out);
}
.wall li:hover img { filter: none; opacity: 1; }
@media (max-width: 760px) {
  .wall { gap: 10px; }
  .wall li { width: 112px; margin-right: 10px; border-radius: 10px; }
}
/* no motion: the logos sit still in one tidy block */
@media (prefers-reduced-motion: reduce) {
  .wall { max-width: 1240px; margin-inline: auto; -webkit-mask-image: none; mask-image: none; }
  .wall__row { display: contents; }
  .wall { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 0; }
  .wall__track { display: contents; animation: none; }
  .wall__track[aria-hidden] { display: none; }
}
@media (max-width: 760px) {
  body.page[data-page="clients"] .page__title { font-size: 44px; }
}

/* Portfolio keeps its own footer, in the page's dark blue */
body.page[data-page="portfolio"] .page__foot { color: #f3f1ec; background: linear-gradient(180deg, #0b1118, #05080c); border-top: 1px solid rgba(255, 255, 255, .08); }
body.page[data-page="portfolio"] .page__foot .menu__cta { background: #f4f6f8; border-color: #f4f6f8; color: #0d120f !important; }
body.page[data-page="portfolio"] .page__foot .menu__cta:hover { background: transparent; color: #f4f6f8 !important; }
body.page[data-page="portfolio"] .page__foot .page__btn { border-color: rgba(243, 241, 236, .7); }
body.page[data-page="portfolio"] .page__foot .page__btn:hover { background: #f4f6f8; border-color: #f4f6f8; color: #0d120f; }
body.page[data-page="portfolio"] .page__foot .page__small { color: rgba(243, 241, 236, .72); }
body.page[data-page="portfolio"] .page__foot .page__small a:hover { color: #fff; }

/* ───────── Every other page ends on the home page's contact scene ─────────
   A full screen of mist rolling through the pine forest (the still first,
   then the clip once you get there), the birds, and the same words, buttons
   and offices as the last scene of home. */
.pfin { position: relative; isolation: isolate; overflow: hidden; height: 100svh; min-height: 620px; color: #f3f1ec; background: linear-gradient(180deg, #2b302d 0%, #121815 55%, #070a08 100%); }
.pfin__bg { position: absolute; inset: 0; z-index: -1; }
.pfin__bg picture { position: absolute; inset: 0; }
.pfin__bg .fill { position: absolute; inset: 0; display: block; animation: sky-drift 28s ease-in-out infinite alternate; will-change: transform; }
.pfin__bg::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(6, 10, 9, .5) 0%, rgba(6, 10, 9, .38) 45%, rgba(6, 10, 9, .55) 100%); }
.pfin__text { display: flex; flex-direction: column; align-items: center; padding: 21svh var(--col) 0; text-align: center; }
.pfin :is(.title, .copy) { position: relative; inset: auto; width: auto; text-align: center; }
.pfin__social { position: absolute; left: 0; right: 0; bottom: max(26px, env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 24px; font-size: 13px; }
.pfin__social a { color: rgba(243, 241, 236, .72); text-decoration: none; transition: color .2s; }
.pfin__social a:hover { color: #fff; }
/* over the forest the logo turns light, as it does on home's contact scene */
body.on-forest .page__mark img { content: url("assets/img/brand/romeya-lockup-light.svg"); }
html[lang="ar"] body.on-forest .page__mark img { content: url("assets/img/brand/romeya-lockup-ar-light.svg"); }
@media (max-width: 760px) { body.on-forest .page__mark img, html[lang="ar"] body.on-forest .page__mark img { content: url("assets/img/brand/romeya-mark-light.svg"); } }
@media (max-width: 760px) {
  .pfin__text { padding-top: 13svh; }
  .pfin__social { gap: 18px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .pfin__bg .fill { animation: none; } }

/* ───────── Portfolio: the word itself ─────────
   One big, wide word in capitals, solid at the top and fading away to
   nothing towards its foot. */
body.page[data-page="portfolio"] .page__title {
  margin-top: 0; margin-bottom: 8px;
  /* wider than the page's column: the word runs almost edge to edge */
  margin-inline: calc((min(100vw, 1240px) - 100vw) / 2 - var(--col) + 16px);
  font-size: max(40px, calc(15.8vw - 8px));
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-indent: .06em; /* the last letter's spacing would push the word off centre */
  color: transparent;
  background: linear-gradient(180deg, #fff 12%, rgba(255, 255, 255, .55) 52%, rgba(255, 255, 255, .16) 90%);
  -webkit-background-clip: text;
  background-clip: text;
}
html[lang="ar"] body.page[data-page="portfolio"] .page__title { letter-spacing: 0; text-indent: 0; line-height: 1.3; }
/* sized to the page's column, so the word always spans it and never spills */
body.page[data-page="portfolio"] .page__main { container-type: inline-size; }
@media (max-width: 760px) {
  body.page[data-page="portfolio"] .page__title { letter-spacing: .03em; text-indent: .03em; font-size: calc(16.6vw - 6px); }
}

/* Blog: the coming-soon card on a laptop (page.js adds it; phone sizes live in mobile.css) */
@media (min-width: 761px) {
  body.page[data-page="blog"] .msoon { position: relative; max-width: 760px; margin-top: clamp(28px, 4vw, 48px); padding: clamp(36px, 4vw, 52px) clamp(32px, 4.4vw, 56px) clamp(34px, 4vw, 48px); overflow: hidden; border: 1px solid rgba(255, 255, 255, .85); border-radius: 30px; background: var(--glass); box-shadow: 0 24px 60px rgba(40, 60, 90, .12), inset 0 1px 0 rgba(255, 255, 255, .95); }
  body.page[data-page="blog"] .msoon__pen { position: absolute; right: -26px; top: -22px; width: 240px; opacity: .09; }
  html[dir="rtl"] body.page[data-page="blog"] .msoon__pen { right: auto; left: -26px; }
  body.page[data-page="blog"] .msoon b { display: block; max-width: 16ch; margin-bottom: 14px; font-size: clamp(32px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
  body.page[data-page="blog"] .msoon p { max-width: 44ch; margin: 0 0 26px; font-size: 17px; line-height: 1.55; color: var(--m-dim); }
  body.page[data-page="blog"] .msoon ul { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 12px 40px; margin: 0 0 32px; padding: 0; list-style: none; }
  body.page[data-page="blog"] .msoon li { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; }
  body.page[data-page="blog"] .msoon li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--m-gold); }
  body.page[data-page="blog"] .msoon a { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 999px; background: #25d366; color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; transition: transform .25s, box-shadow .25s; }
  body.page[data-page="blog"] .msoon a:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(37, 211, 102, .32); }
  body.page[data-page="blog"] .msoon a svg { width: 19px; height: 19px; fill: currentColor; }
  html[lang="ar"] body.page[data-page="blog"] .msoon a { letter-spacing: 0; font-size: 14px; }
}

/* Blog posts (tools/render_blog.py): the list under the Blog heading and one post page */
.posts { align-items: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(20px, 3vw, 32px); }
.post-card { border: 1px solid rgba(255, 255, 255, .75); border-radius: 20px; background: var(--glass); box-shadow: 0 18px 40px rgba(40, 60, 90, .08); overflow: hidden; }
.post-card__link { display: block; color: inherit; text-decoration: none; }
.post-card__img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card__body { display: grid; gap: 10px; padding: 22px 24px 26px; }
.post-card__date, .post__date { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--m-dim); }
.post-card__title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.post-card__excerpt { font-size: 15.5px; line-height: 1.55; color: var(--m-dim); }
.post-card__more { font-size: 14px; font-weight: 700; color: var(--m-gold); }
.post { max-width: 760px; }
.post__back { display: inline-block; margin-bottom: 18px; font-size: 14px; font-weight: 700; color: var(--m-gold); text-decoration: none; }
.post__title { font-size: clamp(34px, 5vw, 60px); }
.post__cover { display: block; width: 100%; margin: 0 0 32px; border-radius: 20px; }
.post__body { font-size: 18px; line-height: 1.75; }
.post__body > * + * { margin-top: 1.1em; }
.post__body h2 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-top: 1.8em; }
.post__body h3 { font-size: 22px; font-weight: 700; line-height: 1.25; margin-top: 1.5em; }
.post__body ul, .post__body ol { padding-inline-start: 1.4em; }
.post__body ul { list-style: disc; }
.post__body ol { list-style: decimal; }
.post__body a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.post__body img { display: block; max-width: 100%; height: auto; border-radius: 14px; }
.post__body blockquote { padding-inline-start: 1.2em; border-inline-start: 3px solid var(--m-gold); font-style: italic; }
