/* ==========================================================================
   Balance — built from Figma "Desktop - 1" (1440 × 7517) + "iPhone 17 - 1"
   Units: Figma px are mapped to fluid values with --u (1px at 1440 wide).
   ========================================================================== */

:root {
  --black: #000;
  --white: #fff;
  --text: #dcdcdc;
  --soft: #f5f5f5;
  --muted: #5f605d;
  --orange: #ff4d00;
  --card: #d9d9d9;
  --form: rgba(39, 42, 38, 0.45);

  /* 1 design px, fluid between 1024 and 1440+, never below .72px */
  --u: clamp(0.72px, calc(100vw / 1440), 1.15px);
  --gutter: calc(66 * var(--u));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  background: var(--black);
  overscroll-behavior: none;
}

body {
  font-family: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

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

ul {
  list-style: none;
}

button,
input {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--orange);
  color: var(--black);
}

/* SplitText line masks */
.line-mask {
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

/* ==========================================================================
   Preloader
   ========================================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--black);
  display: grid;
  place-items: center;
}

.loader__mark {
  width: min(420px, 60vw);
  overflow: hidden;
}

.loader__mark img {
  width: 100%;
  transform: translateY(105%);
}

.loader__bar {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 64px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.loader__bar span {
  position: absolute;
  inset: 0;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
}

.loader__count {
  position: absolute;
  right: var(--gutter);
  bottom: 80px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Cursor (fine pointers only)
   ========================================================================== */
.cursor {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 150;
    pointer-events: none;
  }

  .cursor__dot,
  .cursor__ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    will-change: transform;
  }

  .cursor__dot {
    width: 6px;
    height: 6px;
    background: var(--orange);
  }

  .cursor__ring {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 77, 0, 0.6);
    display: grid;
    place-items: center;
    transition: width .45s var(--ease), height .45s var(--ease), background-color .45s var(--ease), border-color .45s var(--ease);
  }

  .cursor__label {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--black);
    opacity: 0;
    transform: scale(.6);
    transition: opacity .3s, transform .45s var(--ease);
  }

  .cursor.is-hover .cursor__ring {
    width: 60px;
    height: 60px;
    border-color: rgba(255, 255, 255, .5);
  }

  .cursor.is-drag .cursor__ring {
    width: 84px;
    height: 84px;
    background: var(--orange);
    border-color: var(--orange);
  }

  .cursor.is-drag .cursor__label {
    opacity: 1;
    transform: none;
  }

  .cursor.is-drag .cursor__dot {
    opacity: 0;
  }
}

/* ==========================================================================
   Header — logo 69,51 (141×30) · nav 889,66 gap 66 · 13.558px
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(51 * var(--u)) calc(56 * var(--u)) calc(20 * var(--u)) calc(69 * var(--u));
  transition: background-color .5s var(--ease), backdrop-filter .5s;
}

.header.is-scrolled {
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding-top: calc(24 * var(--u));
}

.header__logo img {
  width: calc(141 * var(--u));
  height: auto;
  min-width: 96px;
}

.nav {
  display: flex;
  gap: calc(66 * var(--u));
  margin-top: calc(15 * var(--u));
}

.header.is-scrolled .nav {
  margin-top: 4px;
}

.nav__link {
  position: relative;
  display: block;
  overflow: hidden;
  font-size: max(12px, calc(13.558 * var(--u)));
  line-height: 1.5;
}

.nav__link span {
  display: block;
  transition: transform .6s var(--ease);
}

.nav__link span::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
  color: var(--orange);
}

.nav__link:hover span {
  transform: translateY(-100%);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .6s var(--ease);
}

.nav__link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.burger {
  display: none;
  width: 28px;
  height: 28px;
  position: relative;
  z-index: 120;
}

.burger span {
  position: absolute;
  left: 3px;
  right: 3px;
  height: 1.5px;
  background: var(--white);
  transition: transform .5s var(--ease), top .5s var(--ease);
}

.burger span:nth-child(1) {
  top: 10px;
}

.burger span:nth-child(2) {
  top: 17px;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  top: 13.5px;
  transform: rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
  top: 13.5px;
  transform: rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 0 24px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}

.menu a {
  font-size: 38px;
  font-weight: 500;
  line-height: 1.1;
}

/* ==========================================================================
   Hero — 1440×811 · flame opacity .62 · title 36/600 @401 · copy 14/300 @522
   ========================================================================== */
.hero {
  position: relative;
  /* exactly one screen tall, whatever the screen's shape — sizing by width (811/1440)
     pushed the bottom row below the fold on wide, short laptop screens */
  height: max(100svh, 600px);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* flame: fully blurred at rest; a sharp copy burns through around the cursor */
.hero__flame {
  position: absolute;
  inset: 0;
  transform-origin: 60% 50%;
  will-change: transform;
}

.flame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flame--blur {
  filter: blur(34px) saturate(1.15);
  opacity: .55;
  transform: scale(1.12);
  /* hide the soft blur edge */
}

.flame--sharp {
  opacity: .95;
  --mx: -999px;
  --my: -999px;
  --r: 0px;
  /* second layer keeps the sharp flame visible at rest (~.62 like Figma);
     the cursor circle brightens it to full around the pointer */
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, .72) 38%, rgba(0, 0, 0, .25) 68%, transparent 100%), linear-gradient(rgba(0, 0, 0, .65), rgba(0, 0, 0, .65));
  mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, .72) 38%, rgba(0, 0, 0, .25) 68%, transparent 100%), linear-gradient(rgba(0, 0, 0, .65), rgba(0, 0, 0, .65));
}

.hero__fire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero__content {
  position: absolute;
  left: var(--gutter);
  /* 39.4% of the screen, but never so low it runs into the bottom row on short screens */
  top: min(39.4%, calc(100% - 368 * var(--u)));
  width: calc(470 * var(--u));
  min-width: 300px;
}

.hero__title {
  font-size: max(26px, calc(36 * var(--u)));
  font-weight: 600;
  line-height: 1.21;
  text-transform: capitalize;
  max-width: 12.1em;
  /* 435 */
}

.hero__text {
  margin-top: calc(32 * var(--u));
  font-size: max(12px, calc(14 * var(--u)));
  font-weight: 300;
  line-height: 1.21;
  text-transform: capitalize;
  max-width: 30.4em;
}

.hero__bottom {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(116 * var(--u));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Pill button — 179×41.6 · border 1.216 · radius 30.4 · 20px #f5f5f5 */
.btn-pill {
  position: relative;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  width: calc(179.23 * var(--u));
  height: calc(41.63 * var(--u));
  min-width: 140px;
  min-height: 36px;
  border: 1.216px solid var(--white);
  border-radius: 31px;
  font-size: max(16px, calc(20 * var(--u)));
  color: var(--soft);
  transition: color .5s var(--ease);
}

.btn-pill__fill {
  position: absolute;
  inset: -1px;
  background: var(--white);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .6s var(--ease);
}

.btn-pill__text {
  position: relative;
}

.btn-pill:hover {
  color: var(--black);
}

.btn-pill:hover .btn-pill__fill {
  transform: none;
}

/* filled variant (Explore Projects): white pill, black text; hover drains the fill to the outline */
.btn-pill--solid {
  color: var(--black);
  font-weight: 500;
}

.btn-pill--solid .btn-pill__fill {
  transform: none;
}

.btn-pill--solid:hover {
  color: var(--soft);
}

.btn-pill--solid:hover .btn-pill__fill {
  transform: translateY(-101%);
}

/* ==========================================================================
   Logos band — 1440×147 @877, gradient with orange core
   ========================================================================== */
.logos {
  position: relative;
  height: calc(147 * var(--u));
  min-height: 110px;
  margin-top: calc(66 * var(--u));
}

.logos__band {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(0, 0, 0, .16) 23.558%, rgba(255, 115, 68, .16) 34.135%, rgba(255, 64, 0, .16) 49.519%,
      rgba(255, 115, 68, .16) 59.615%, rgba(0, 0, 0, .16) 77.404%);
}

.logos__viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.logos__viewport {
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.logos.is-dragging .logos__viewport {
  cursor: grabbing;
}

.logos:focus-visible {
  outline: 1px solid var(--orange);
  outline-offset: -1px;
}

.logos__track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.logos__set {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: calc(150 * var(--u));
  padding-right: calc(150 * var(--u));
  /* Figma places the row starting at x=33 */
  padding-left: calc(33 * var(--u));
}

.logo {
  height: auto;
  flex-shrink: 0;
  opacity: .92;
  transition: opacity .4s;
}

.logo:hover {
  opacity: 1;
}

.logo--nrouj {
  width: calc(58.44 * var(--u));
}

.logo--arabic {
  width: calc(114.54 * var(--u));
}

.logo--zahya {
  width: calc(99.19 * var(--u));
}

.logo--alnada {
  width: calc(100.74 * var(--u));
}

.logo--olyx {
  width: calc(212.8 * var(--u));
}

/* ==========================================================================
   Pillars — scroll-driven stage modelled on cominvi.com.mx "Minerals"
   3 / 6 / 3 grid · tick dial filled by a conic mask · 3D spinning pattern
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: max(11px, calc(12 * var(--u)));
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
}

@property --angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

.pillars {
  position: relative;
}

.pillars__pin {
  --ring: min(calc(616 * var(--u)), 74vh, 46vw);
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.pillars__glow {
  position: absolute;
  inset: -10% -5%;
  pointer-events: none;
  opacity: 0;
}

.pillars__glow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotate(180deg) translate(-18%, -22%) scale(1.3);
  opacity: .2;
}

/* section label (top-left) — 20px Inter */
.pillars__label {
  position: absolute;
  top: calc(110 * var(--u));
  left: var(--gutter);
  z-index: 2;
  font-size: max(15px, calc(20 * var(--u)));
  line-height: 1.2;
}

.pillars__grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 3fr 6fr 3fr;
  align-items: center;
  padding: 0 var(--gutter);
}

/* left column */
.pillars__left {
  align-self: start;
  padding-top: calc(50vh - .5em);
}

.pillars__kicker {
  font-size: max(13px, calc(16 * var(--u)));
  line-height: 1.21;
  color: var(--text);
}

.pillars__list {
  margin-top: calc(37 * var(--u));
}

.pillars__list li {
  font-size: max(20px, calc(27.517 * var(--u)));
  line-height: 1.219;
  font-weight: 500;
  color: var(--text);
  opacity: .31;
  transition: opacity .5s var(--ease);
}

.pillars__list li.is-active {
  opacity: 1;
  font-weight: 700;
}

/* center: dial — 0.9px ring + 7px arc (orange .7) filled by a conic mask */
.pillars__center {
  display: grid;
  place-items: center;
  height: 100%;
}

.pillars__stage {
  position: relative;
  width: var(--ring);
  aspect-ratio: 1;
}

.dial {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.dial--base {
  border: max(1px, calc(.9 * var(--u))) solid var(--orange);
}

.dial--fill {
  --w: calc(7 * var(--u));
  inset: calc(var(--w) / -2);
  border: var(--w) solid rgba(255, 77, 0, .7);
  -webkit-mask-image: conic-gradient(from 0deg, #000 0deg, #000 var(--angle), transparent var(--angle));
  mask-image: conic-gradient(from 0deg, #000 0deg, #000 var(--angle), transparent var(--angle));
}

/* center: spinning pattern card */
.spinner {
  /* centred without transform — GSAP animates its scale */
  --size: calc(var(--ring) * 259 / 616);
  position: absolute;
  inset: 0;
  margin: auto;
  width: var(--size);
  height: var(--size);
  perspective: calc(var(--ring) * 2.2);
}

.spinner__card {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.spinner__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.spinner__face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.spinner__face--back {
  transform: rotateY(180deg);
}

.spinner__face::after {
  /* edge-on shading, driven by --shade */
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--shade, 0);
  pointer-events: none;
}

.spinner__shadow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -16%;
  height: 10%;
  background: radial-gradient(closest-side, rgba(255, 77, 0, .28), transparent);
  filter: blur(6px);
  transform-origin: center;
}

/* right column: odometer */
.pillars__right {
  justify-self: end;
  align-self: start;
  padding-top: calc(50vh - .5em);
  font-size: max(11px, calc(12 * var(--u)));
}

.ticker {
  display: flex;
  align-items: flex-start;
  gap: .35em;
  color: rgba(255, 255, 255, .6);
}

.ticker__col {
  display: block;
  height: 1em;
  overflow: hidden;
}

.ticker__track {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.ticker__track span {
  display: block;
  height: 1em;
}

.ticker__bracket {
  display: block;
}

.ticker .ticker__bracket+.ticker__col {
  margin-left: -.25em;
  margin-right: -.25em;
}

/* ==========================================================================
   Warm section (About + Projects) — bg rotated 180 · opacity .3 × .5
   ========================================================================== */
.warm {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.warm__bg {
  position: absolute;
  inset: -12% 0 0;
  z-index: -2;
}

.warm__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotate(180deg);
  opacity: .15;
  /* .3 × .5 per Figma */
}

.warm__fade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 12%),
    linear-gradient(0deg, #000 calc(150 * var(--u)), rgba(0, 0, 0, 0) calc(380 * var(--u)));
}

.about {
  padding: calc(208 * var(--u)) var(--gutter) 0;
}

.about__title {
  font-size: max(24px, calc(32 * var(--u)));
  font-weight: 400;
  line-height: 1.21;
}

.about__text {
  margin-top: calc(72 * var(--u));
  max-width: calc(987 * var(--u));
  font-size: max(18px, calc(28 * var(--u)));
  font-weight: 300;
  line-height: 1.21;
  text-transform: capitalize;
}

.about__text .word {
  opacity: .18;
}

.label {
  font-size: max(24px, calc(32 * var(--u)));
  font-weight: 400;
  line-height: 1.2;
  padding-left: var(--gutter);
}

/* Projects carousel — center 641×404 r31 · sides 529×333 r32 · gap 75 */
.projects {
  padding-top: calc(310 * var(--u));
}

.carousel {
  --cw: calc(641 * var(--u));
  --ch: calc(404 * var(--u));
  position: relative;
  height: var(--ch);
  margin-top: calc(67 * var(--u));
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}

.carousel.is-dragging {
  cursor: grabbing;
}

.projects__progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: calc(48 * var(--u));
  color: rgba(255, 255, 255, .6);
}

.projects__count {
  color: var(--white);
  min-width: 2ch;
  text-align: right;
}

.projects__bar {
  position: relative;
  width: calc(220 * var(--u));
  min-width: 120px;
  height: 1px;
  background: rgba(255, 255, 255, .18);
}

.projects__bar i {
  position: absolute;
  inset: 0;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
}

.carousel__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--cw);
  height: var(--ch);
  margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2 - 30 * var(--u));
  background: var(--card);
  border-radius: calc(31 * var(--u));
  will-change: transform;
  overflow: hidden;
}

/* bottom-left caption: logo · project name / area, over a soft dark fade */
.carousel__card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.carousel__info {
  position: absolute;
  left: calc(var(--cw) * 28 / 641);
  bottom: calc(var(--cw) * 24 / 641);
  right: calc(var(--cw) * 28 / 641);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: calc(var(--cw) * 16 / 641);
  color: #fff;
  pointer-events: none;
}

.carousel__logo {
  height: max(20px, calc(var(--cw) * 46 / 641));
  width: auto;
  max-width: max(48px, calc(var(--cw) * 110 / 641));
  object-fit: contain;
  object-position: left center;
  padding-right: calc(var(--cw) * 16 / 641);
  border-right: 1px solid rgba(255, 255, 255, .45);
  box-sizing: content-box;
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, .35));
}

.carousel__name {
  font-size: max(11px, calc(var(--cw) * 22 / 641));
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.15;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .4);
}

.carousel__area {
  margin-top: calc(var(--cw) * 4 / 641);
  font-size: max(9px, calc(var(--cw) * 15 / 641));
  font-weight: 300;
  line-height: 1.2;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .4);
}

.label--locations {
  padding-top: calc(157 * var(--u));
  padding-bottom: calc(171 * var(--u));
}

/* ==========================================================================
   Locations — map 1455×689 @(-15) · card 393×453 @(57, +236) · 32px centered
   ========================================================================== */
.locations {
  position: relative;
  margin-bottom: calc(155 * var(--u));
}

.map {
  position: relative;
  margin-left: calc(-15 * var(--u));
  width: calc(100% + 15 * var(--u));
  aspect-ratio: 1455 / 689;
  overflow: hidden;
  background: #161616;
  /* the map's own base colour, so panning past its edge blends in */
}

/* .map__zoom takes the scroll-in zoom, .map__world the fly-to-area pan/zoom of the map image;
   pins live in .map__zoom and track .map__world's pan/zoom, so they stay on the streets at a fixed size */
.map__zoom,
.map__world {
  position: absolute;
  inset: 0;
  transform-origin: 70% 55%;
}

.map__world {
  transform-origin: 0 0;
}

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

.pin {
  position: absolute;
  /* follows .map__world's pan/zoom (JS sets --ws/--wx/--wy) without scaling itself */
  left: calc(var(--x) * var(--ws, 1) + var(--wx, 0px));
  top: calc(var(--y) * var(--ws, 1) + var(--wy, 0px));
  width: max(18px, calc(23.5 * var(--u)));
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.pin>img {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  transition: opacity .4s, filter .4s;
}

.pin::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--orange);
  animation: ripple 2.6s var(--ease) infinite;
  animation-delay: var(--d, 0s);
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: .8;
  }

  100% {
    transform: scale(3.2);
    opacity: 0;
  }
}

/* hover / chosen area: the project's logo opens in a dark disc over the pin and its name
   floats above — same treatment as the project pins on location.html */
.pin {
  --pv: max(64px, calc(76 * var(--u)));
}

.pin__preview {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--pv);
  height: var(--pv);
  z-index: 2;
  opacity: 0;
  border-radius: 50%;
  background: #0b0b0b;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.4);
  transition: transform 1s cubic-bezier(.7, 0, .3, 1), opacity 1s cubic-bezier(.7, 0, .3, 1);
}

.pin__preview img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

.pin__preview::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--pv) * 1.2);
  height: calc(var(--pv) * 1.2);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  transform: translate(-50%, -50%) scale(.5);
  transition: transform 1s cubic-bezier(.7, 0, .3, 1);
}

.pin__tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 3;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1;
  color: #ffd9c2;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .65);
  transform: translate(-50%, 6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s, transform 1s cubic-bezier(.7, 0, .3, 1);
}

.pin:hover,
.pin:focus-visible,
.pin.is-lit {
  z-index: 4;
}

.pin:hover .pin__tip,
.pin:focus-visible .pin__tip,
.pin.is-lit .pin__tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.pin--logo:hover .pin__preview,
.pin--logo:focus-visible .pin__preview,
.pin--logo.is-lit .pin__preview {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.pin--logo:hover .pin__preview::after,
.pin--logo:focus-visible .pin__preview::after,
.pin--logo.is-lit .pin__preview::after {
  transform: translate(-50%, -50%) scale(1);
}

/* logo pins: the name is anchored at the pin's centre and lifts clear of the disc + ring */
.pin--logo .pin__tip {
  bottom: 50%;
}

.pin--logo:hover .pin__tip,
.pin--logo:focus-visible .pin__tip,
.pin--logo.is-lit .pin__tip {
  transform: translate(-50%, calc(var(--pv) * -.6 - 6px));
}

.map.has-focus .pin:not(.is-lit)>img {
  opacity: .25;
  filter: grayscale(1);
}

.map.has-focus .pin:not(.is-lit)::before {
  animation: none;
  opacity: 0;
}

.map__card {
  position: absolute;
  left: calc(57 * var(--u));
  bottom: 0;
  width: calc(393 * var(--u));
  min-height: calc(453 * var(--u));
  min-width: 260px;
  background: var(--black);
  border: 1px solid rgba(255, 255, 255, .3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: calc(40 * var(--u)) calc(28 * var(--u)) calc(54 * var(--u));
  z-index: 3;
}

.map__title {
  font-size: max(14px, calc(20 * var(--u)));
  line-height: 1.3;
  font-weight: 300;
  text-align: center;
  color: var(--soft);
  padding-bottom: calc(22 * var(--u));
  margin-bottom: calc(22 * var(--u));
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  align-self: stretch;
}

.map__list {
  text-align: center;
}

.map__list button {
  font-size: max(16px, calc(24 * var(--u)));
  line-height: 1.45;
  cursor: pointer;
  transition: color .4s;
}

.map__list button:disabled {
  cursor: default;
  opacity: .5;
}

.map__list li:hover button:not(:disabled),
.map__list li.is-lit button {
  color: var(--orange);
}

.map__list li.is-active button {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: .25em;
  text-decoration-thickness: 1px;
}

/* ==========================================================================
   Footer — card 578×643 · nav/contact 27.7/700 + 20.8/400
   ========================================================================== */
.footer {
  overflow: hidden;
}

.footer__cols {
  display: grid;
  grid-template-columns: 1fr calc(577.84 * var(--u));
  padding: 0 calc(66 * var(--u)) 0 calc(67 * var(--u));
  column-gap: 40px;
}

.footer__info {
  padding-top: calc(203 * var(--u));
}

.footer__block+.footer__block {
  margin-top: calc(9 * var(--u));
}

.footer__title {
  font-size: max(20px, calc(27.737 * var(--u)));
  font-weight: 700;
  line-height: 1.21;
  color: var(--soft);
}

.footer__links {
  margin-top: calc(17 * var(--u));
}

.footer__links li {
  font-size: max(15px, calc(20.802 * var(--u)));
  line-height: 1.21;
  color: var(--soft);
}

.footer__links li+li {
  margin-top: calc(9 * var(--u));
}

.footer__links--contact {
  margin-top: calc(27 * var(--u));
}

.footer__links--contact li+li {
  margin-top: calc(11 * var(--u));
}

.footer__links a {
  position: relative;
  display: inline-block;
  transition: color .4s, transform .5s var(--ease);
}

.footer__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .6s var(--ease);
}

.footer__links a:hover {
  color: var(--orange);
  transform: translateX(6px);
}

.footer__links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* contact: email / phone links wrap on narrow columns instead of overflowing */
.footer__links--contact a {
  word-break: break-word;
}

/* social icons row */
.footer__social {
  display: flex;
  align-items: center;
  gap: max(14px, calc(18 * var(--u)));
  padding-top: calc(4 * var(--u));
}

.footer__links .footer__social a {
  display: grid;
  place-items: center;
  width: max(36px, calc(42 * var(--u)));
  height: max(36px, calc(42 * var(--u)));
  border: 1px solid rgba(245, 245, 245, .35);
  border-radius: 50%;
  transition: color .4s, border-color .4s, background-color .4s, transform .5s var(--ease);
}

.footer__links .footer__social a::after {
  display: none;
}

.footer__social svg {
  width: 50%;
  height: 50%;
}

.footer__links .footer__social a:hover {
  color: var(--black);
  background: var(--orange);
  border-color: var(--orange);
  transform: translateY(-3px);
}

.form {
  background: var(--form);
  border-radius: 10px;
  padding: calc(59 * var(--u)) calc(56 * var(--u)) calc(75 * var(--u)) calc(38 * var(--u));
  display: flex;
  flex-direction: column;
}

.form__title {
  font-size: max(18px, calc(24.319 * var(--u)));
  font-weight: 400;
  line-height: 1.21;
  text-align: center;
  padding-left: calc(18 * var(--u));
}

.form__sub {
  margin-top: calc(22 * var(--u));
  font-size: max(13px, calc(17.839 * var(--u)));
  line-height: 1.21;
  text-align: center;
  padding-left: calc(18 * var(--u));
}

.field {
  position: relative;
  display: block;
  margin-top: calc(62 * var(--u));
  padding-left: 0;
}

.field+.field {
  margin-top: calc(22 * var(--u));
}

.field__label {
  display: block;
  font-size: max(11px, calc(13 * var(--u)));
  line-height: 1.21;
}

.field input {
  display: block;
  width: calc(100% - 3.3 * var(--u));
  margin-left: calc(3.3 * var(--u));
  height: calc(62 * var(--u));
  min-height: 40px;
  outline: none;
  border-bottom: 1px solid var(--white);
  font-size: max(14px, calc(16 * var(--u)));
  border-radius: 0;
}

.field__line {
  position: absolute;
  left: calc(3.3 * var(--u));
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease);
}

.field input:focus~.field__line {
  transform: scaleX(1);
}

.field.is-invalid .field__line {
  background: #ff3b3b;
  transform: scaleX(1);
}

.form__actions {
  display: grid;
  gap: calc(6.4 * var(--u));
  margin-top: calc(27 * var(--u));
  padding-left: calc(13 * var(--u));
}

.btn-outline {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: calc(471.14 * var(--u));
  height: calc(66.85 * var(--u));
  min-height: 44px;
  border: 1px solid var(--white);
  border-radius: 27px;
  font-size: max(10px, calc(10 * var(--u)));
  color: var(--soft);
  letter-spacing: .02em;
  transition: color .5s var(--ease);
}

.btn-outline__fill {
  position: absolute;
  inset: -1px;
  background: var(--white);
  clip-path: circle(0% at var(--mx, 50%) var(--my, 50%));
  transition: clip-path .7s var(--ease);
}

.btn-outline__text {
  position: relative;
}

.btn-outline:hover {
  color: var(--black);
}

.btn-outline:hover .btn-outline__fill {
  clip-path: circle(150% at var(--mx, 50%) var(--my, 50%));
}

.form__note {
  margin-top: calc(27 * var(--u));
  text-align: center;
  padding-left: calc(18 * var(--u));
  font-size: max(9px, calc(8 * var(--u)));
  font-weight: 700;
  color: var(--muted);
  transition: color .4s;
}

.form__note.is-ok {
  color: var(--orange);
}

/* Giant wordmark — 1440×303 @ opacity .41, cut by the page edge */
.footer__mark {
  /* margin-top: calc(259 * var(--u)); */
  height: calc(288 * 100vw / 1440);
  overflow: hidden;
}

.footer__mark-inner {
  position: relative;
  transform-origin: 50% 100%;
  will-change: transform;
}

.footer__mark img {
  display: block;
  width: 100vw;
  max-width: none;
  height: auto;
  opacity: .41;
}

/* hover spotlight (sobha-privy style): a fire-filled copy of the wordmark, masked
   by the letter shapes AND a soft circle that follows the cursor */
.footer__mark-reveal {
  --x: -9999px;
  --y: -9999px;
  --r: 0px;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("../assets/img/hero-flame.png") 60% 50% / cover no-repeat;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%), url("../assets/img/balance-wordmark.png");
  mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%), url("../assets/img/balance-wordmark.png");
  -webkit-mask-size: 100% 100%, 100% 100%;
  mask-size: 100% 100%, 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  filter: saturate(1.25) brightness(1.15);
  opacity: .4;
}

.footer__mark {
  cursor: default;
}

/* ==========================================================================
   PROJECTS PAGE — Figma "Desktop - 2" (2005:34)
   hero bg 1733×913 (about-bg rotated −90°) · card 731² @256 · rows 365 apart
   ========================================================================== */
/* hero is a full-viewport stage: it pins while the black panel grows to fill it */
.phero {
  --cw: min(calc(731 * var(--u)), 88vw);
  --ch: min(calc(731 * var(--u)), calc(100vh - 150px));
  --cy: calc(50% + 40 * var(--u));
  /* card centre sits a little low, as in Figma */
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
}

/* invisible box with the card's geometry — JS measures it to drive the panel clip */
.phero__frame {
  position: absolute;
  left: 50%;
  top: var(--cy);
  width: var(--cw);
  height: var(--ch);
  transform: translate(-50%, -50%);
  visibility: hidden;
  pointer-events: none;
}

.phero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  will-change: transform;
  transform-origin: 50% 40%;
}

.phero__bg {
  position: absolute;
  left: calc(50% + 23.8 * var(--u));
  top: 50%;
  width: max(100vh, calc(913 * var(--u)));
  height: max(190vh, calc(1733.54 * var(--u)));
  max-width: none;
  object-fit: cover;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.phero__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(227 * var(--u));
  z-index: -1;
  background: linear-gradient(178.35deg, rgba(0, 0, 0, 0) 7.72%, #000 65.97%);
}

.phero .hero__fire {
  z-index: 0;
}

/* the panel is full-bleed; a clip-path inset frames it as the 731² card and opens to 0 on scroll */
.phero__panel {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  clip-path: inset(calc(var(--cy) - var(--ch) / 2) calc(50% - var(--cw) / 2) calc(100% - var(--cy) - var(--ch) / 2) calc(50% - var(--cw) / 2));
}

.phero__card {
  position: absolute;
  left: 50%;
  top: calc(50% + 40 * var(--u));
  z-index: 2;
  width: min(calc(731 * var(--u)), 88vw);
  transform: translate(-50%, -50%);
  /* GSAP takes over as x/yPercent */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--soft);
  pointer-events: none;
}

.phero__title {
  font-size: max(30px, calc(59.631 * var(--u)));
  font-weight: 400;
  line-height: 1.21;
  letter-spacing: .005em;
}

.phero__rule {
  display: block;
  width: calc(132 * var(--u));
  height: 1px;
  background: var(--soft);
  margin-top: calc(23 * var(--u));
  transform-origin: center;
}

.phero__text {
  width: min(calc(572 * var(--u)), 78vw);
  margin-top: calc(57 * var(--u));
  font-size: max(14px, calc(18 * var(--u)));
  line-height: 1.21;
}

.plist {
  position: relative;
  isolation: isolate;
  padding-top: calc(55 * var(--u));
}

.plist__bg {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  left: calc(-98 * var(--u));
  width: calc(1524 * var(--u));
  top: calc(1376 * var(--u));
  bottom: 0;
}

.plist__bg {
  overflow: hidden;
}

/* keep the parallaxing image inside the fade */
.plist__bg img {
  position: absolute;
  left: 0;
  top: -8%;
  width: 100%;
  height: 116%;
  object-fit: cover;
  opacity: .3;
}

.plist__bg::before {
  /* top fade, Figma 2005:44 (flipped) */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(227 * var(--u));
  z-index: 1;
  background: linear-gradient(1.65deg, rgba(0, 0, 0, 0) 7.72%, #000 65.97%);
}

.plist__rows {
  position: relative;
  padding-bottom: calc(211 * var(--u));
}

.proj {
  position: relative;
  min-height: calc(365 * var(--u));
  padding: calc(51 * var(--u)) var(--gutter) calc(33 * var(--u));
  display: flex;
  justify-content: center;
}

.proj:first-child {
  padding-top: calc(65 * var(--u));
  min-height: calc(447 * var(--u));
}

.proj::before {
  /* fire glow following the pointer on hover */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(calc(420 * var(--u)) circle at var(--mx, 50%) var(--my, 50%), rgba(255, 77, 0, .14), transparent 70%);
  transition: opacity .6s var(--ease);
}

.proj:hover::before {
  opacity: 1;
}

.proj__line {
  position: absolute;
  left: 50%;
  top: 0;
  width: calc(857 * var(--u));
  height: 1px;
  margin-left: calc(-428.5 * var(--u));
  background: var(--soft);
  transform-origin: center;
  transition: background-color .5s var(--ease);
}

.proj:hover .proj__line,
.proj:hover+.proj .proj__line,
.proj:last-of-type:hover~.proj__line--end {
  background: var(--orange);
}

.proj__line--end {
  top: auto;
  bottom: calc(211 * var(--u));
}

.proj__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--soft);
  max-width: calc(761 * var(--u));
}

.proj__logo {
  position: relative;
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  margin-bottom: calc((var(--slot, 110) - var(--h)) * var(--u));
  /* reserve a logo slot (110px default) */
}

/* the clip box crops the logo to its design size; the hover lift/glow is applied to the box
   (not the image inside it) so the letters are never cut and the glow follows their shape */
.proj__logo-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transition: transform .7s var(--ease), filter .7s var(--ease);
}

.proj__logo img {
  position: absolute;
  max-width: none;
}

.proj:hover .proj__logo-clip {
  transform: translateY(-4%) scale(1.04);
  filter: drop-shadow(0 0 14px rgba(255, 120, 40, .55));
}

.proj__title {
  margin-top: calc(31 * var(--u));
  font-size: max(28px, calc(50 * var(--u)));
  font-weight: 400;
  line-height: 1.21;
  white-space: nowrap;
}

.proj__bar {
  display: inline-block;
  transform: scaleY(1.05);
  opacity: .9;
}

.proj__desc {
  margin-top: calc(22 * var(--u));
  width: calc(var(--dw, 734) * var(--u));
  font-size: max(13px, calc(16 * var(--u)));
  line-height: 1.21;
}

/* sticky image slots — one image per project, the active one wipes in */
.plist__stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.plist__sticky {
  position: relative;
  height: 100vh;
}

.slot {
  position: absolute;
  overflow: hidden;
}

.slot--l {
  left: calc(69 * var(--u));
  top: calc(50% - 40 * var(--u));
  width: calc(156 * var(--u));
  height: calc(219 * var(--u));
}

.slot--r1 {
  right: calc(74 * var(--u));
  top: calc(16% + 10 * var(--u));
  width: calc(141 * var(--u));
  height: calc(140 * var(--u));
}

.slot--r2 {
  right: calc(74 * var(--u));
  top: calc(60% + 10 * var(--u));
  width: calc(127 * var(--u));
  height: calc(178 * var(--u));
}

.slot__img {
  position: absolute;
  inset: 0;
  clip-path: inset(0 100% 0 0);
}

.slot__img>* {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.slot__ph {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px;
  background: linear-gradient(150deg, #e2e2e2, #c8c8c8);
  color: rgba(0, 0, 0, .45);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .08em;
}

.plist__rows {
  z-index: 1;
}

/* active-row system (cominvi / range style): states driven by GSAP */
.proj__line {
  opacity: .18;
}

.proj__gem {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border: 1px solid var(--orange);
  background: #000;
  transform: rotate(45deg) scale(0);
}

/* page transition */
.page-wipe {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  pointer-events: none;
  clip-path: inset(100% 0 0 0);
}

.page-wipe::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--orange);
}

/* ==========================================================================
   LOCATION PAGE — modelled on sobha-privy-collection.com/location
   pinned 3D map (CSS perspective) · fog · grain · pins projected per frame
   ========================================================================== */
.loc {
  position: relative;
}

.loc__stage {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: #0e0e0e;
  isolation: isolate;
}

.loc__scene {
  position: absolute;
  inset: 0;
  perspective: 1500px;
  perspective-origin: 50% 38%;
}

.loc__camera {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.loc__stage {
  contain: layout paint;
}

.loc__map {
  --mw: max(165vw, 1500px);
  position: absolute;
  width: var(--mw);
  aspect-ratio: 1823 / 863;
  left: calc(var(--mw) / -2);
  top: calc(var(--mw) * 863 / 1823 / -2);
  transform-style: preserve-3d;
  will-change: transform;
  font-size: calc(var(--mw) / 2376);
  /* 1em = 1 design px of the map at 1440 wide */
}

.loc__map-img {
  width: 100%;
  height: 100%;
  display: block;
}

/* edge fade + contrast baked into map-loc.webp */

/* ---- 3D buildings (CSS cuboids inside the tilted map) ---- */
.loc__city {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

.bld {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: scaleZ(1);
  transition: transform 1.5s cubic-bezier(.7, 0, .3, 1);
  transition-delay: var(--d, 0s);
}

.bld--down {
  transform: scaleZ(.015);
  transition-duration: .9s;
  transition-delay: 0s;
}

/* faces + shadow fade so a lowered building leaves no flat plate behind */
.bld .box>i,
.bld__shadow {
  transition: opacity .7s var(--ease), background-color .6s var(--ease), box-shadow .6s var(--ease);
  transition-delay: var(--d, 0s);
}

.bld--down .box>i,
.bld--down .bld__shadow {
  opacity: 0;
  transition-delay: .25s;
}

.bld.is-link {
  pointer-events: auto;
  cursor: pointer;
}

.box {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
}

.box>i {
  position: absolute;
  display: block;
  backface-visibility: visible;
  transition: background-color .6s var(--ease), box-shadow .6s var(--ease);
}

/* faces — lit from the top-left */
.f-top {
  background: #4a4643;
}

.f-front {
  background: #34312f;
  transform-origin: 50% 100%;
  transform: rotateX(-90deg);
}

.f-back {
  background: #2a2826;
  transform-origin: 50% 100%;
  transform: rotateX(-90deg);
}

.f-left {
  background: #2e2c2a;
  transform-origin: 100% 50%;
  transform: rotateY(90deg);
}

.f-right {
  background: #232120;
  transform-origin: 100% 50%;
  transform: rotateY(90deg);
}

.bld .f-front,
.bld .f-back,
.bld .f-left,
.bld .f-right {
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 7em);
}

.bld__shadow {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) translate(1.6em, 2em);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .65), transparent);
}

/* filler city blocks: quieter */
.bld--filler .f-top {
  background: #3b3836;
}

.bld--filler .f-front,
.bld--filler .f-back {
  background-color: #2b2927;
}

.bld--filler .f-left,
.bld--filler .f-right {
  background-color: #1f1e1d;
}

/* landmark glass */
.bld--landmark .f-front,
.bld--landmark .f-back {
  background-color: #3d4042;
  background-image: repeating-linear-gradient(0deg, rgba(200, 220, 235, .12) 0 1px, transparent 1px 5em), linear-gradient(180deg, rgba(255, 255, 255, .08), transparent);
}

.bld--landmark .f-left,
.bld--landmark .f-right {
  background-color: #2a2c2e;
  background-image: repeating-linear-gradient(0deg, rgba(200, 220, 235, .08) 0 1px, transparent 1px 5em);
}

.bld--landmark .f-top {
  background: #5a5d60;
}

.bld .is-gold>.f-top,
.bld .is-gold>i {
  background-color: #8a6a32 !important;
}

/* Balance projects: ember windows + glowing roof */
.bld--project .f-front,
.bld--project .f-back,
.bld--project .f-left,
.bld--project .f-right {
  background-color: #221b17;
  background-image:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .45) 0 1.2em, transparent 1.2em 6em),
    repeating-linear-gradient(0deg, transparent 0 1.6em, rgba(255, 130, 50, .55) 1.6em 3.4em, transparent 3.4em 6em);
  /* one window band per 6em floor */
}

.bld--project .f-left,
.bld--project .f-right {
  background-color: #1e1714;
}

.bld--project .f-top {
  background: #ff5a1a;
  box-shadow: 0 0 2.8em .8em rgba(255, 77, 0, .55);
}

/* hover / active */
.bld.is-hot .f-top {
  background: #f5f5f5;
}

.bld--project.is-hot .f-top {
  background: #ffd2a8;
}

.bld.is-hot .f-front,
.bld.is-hot .f-back {
  background-color: #4a4643;
}

.bld--project.is-hot .f-front,
.bld--project.is-hot .f-back {
  background-color: #4a2a1a;
}

.loc__roof {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
}

.loc__anchors {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.loc__anchor {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0;
  height: 0;
}

/* drifting smoke over the map */
.loc__fog {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.cloud {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  background: radial-gradient(closest-side, rgba(214, 204, 198, .34), rgba(214, 204, 198, .2) 35%, rgba(214, 204, 198, .07) 70%, transparent 100%);
}

.c1 {
  width: 70vw;
  height: 46vw;
  left: -18vw;
  top: 48%;
}

.c2 {
  width: 62vw;
  height: 38vw;
  left: 40vw;
  top: 58%;
}

.c3 {
  width: 54vw;
  height: 30vw;
  left: 58vw;
  top: -6%;
  opacity: .8;
}

.c4 {
  width: 46vw;
  height: 30vw;
  left: -8vw;
  top: -10%;
  opacity: .55;
}

.c5 {
  width: 80vw;
  height: 40vw;
  left: 10vw;
  top: 72%;
}

.c6 {
  width: 40vw;
  height: 26vw;
  left: 70vw;
  top: 30%;
  opacity: .7;
}

.c7 {
  width: 36vw;
  height: 24vw;
  left: 26vw;
  top: 18%;
  opacity: .45;
}

.loc__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 80% at 50% 50%, transparent 55%, rgba(0, 0, 0, .75) 100%);
}

/* title + scroll prompt */
.loc__title {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  font-family: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif; /* same family as the other pages */
  font-weight: 600;
  font-size: clamp(44px, 8vw, 128px);
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #f5f5f5;
  pointer-events: none;
  white-space: nowrap;
}

.loc__arrow {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 30px;
}

.loc__arrow-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .45);
  color: #fff;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}

.loc__arrow:hover .loc__arrow-btn {
  background: #fff;
  color: #000;
}

.loc__arrow-btn svg {
  animation: locArrow 1.8s var(--ease) infinite;
}

@keyframes locArrow {

  0%,
  100% {
    transform: translateY(-2px);
  }

  50% {
    transform: translateY(3px);
  }
}

.loc__arrow-text {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 1px 0;
  background: linear-gradient(90deg, #cfcfcf, #fff 25%, #cfcfcf 50%, #fff 75%, #cfcfcf) 0 0 / 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGradientScroll 1.5s linear infinite;
}

@keyframes textGradientScroll {
  to {
    background-position: -200% 0;
  }
}

/* film grain (texture generated in JS) */
.loc__noise {
  position: absolute;
  left: -25vw;
  top: -25vh;
  width: 150vw;
  height: 150vh;
  z-index: 4;
  pointer-events: none;
  opacity: .75;
  background-repeat: repeat;
  will-change: transform;
  animation: noiseShift .2s steps(1) infinite;
}

@keyframes noiseShift {
  0% {
    transform: translate(0, 0);
  }

  20% {
    transform: translate(-6%, 4%);
  }

  40% {
    transform: translate(5%, -7%);
  }

  60% {
    transform: translate(-3%, 8%);
  }

  80% {
    transform: translate(7%, 3%);
  }

  100% {
    transform: translate(0, 0);
  }
}

/* pins — three tiers (sobha: label / secondary / primary) */
.loc__pins {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.lpin {
  --pin: 30px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--pin);
  height: var(--pin);
  color: #fff;
  pointer-events: auto;
  will-change: transform;
  contain: layout style;
  transition: opacity 1s cubic-bezier(.7, 0, .3, 1);
}

.lpin::after {
  content: "";
  position: absolute;
  inset: -20px;
}

.lpin.is-offscreen {
  visibility: hidden;
}

.lpin__content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1s cubic-bezier(.7, 0, .3, 1);
}

.lpin__bg {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: radial-gradient(81.67% 81.67% at 70% 18.33%, rgba(26, 25, 25, 0) 0, #1a1919 100%), #a79b9b;
  transition: transform 1s cubic-bezier(.7, 0, .3, 1);
}

.lpin__label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 15px);
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .65);
  transition: transform 1s cubic-bezier(.7, 0, .3, 1);
}

.lpin--hidden {
  opacity: 0;
  pointer-events: none;
}

/* label de-collision (JS): --ly lifts a project name clear of another; is-yield fades a landmark name */
.lpin__label {
  translate: 0 var(--ly, 0px);
  transition: transform 1s cubic-bezier(.7, 0, .3, 1), translate .45s var(--ease), opacity .35s;
}

.lpin__label.is-yield {
  opacity: 0;
}

.lpin--hidden .lpin__content {
  transform: translateY(30px);
}

.lpin--secondary .lpin__bg,
.lpin--primary .lpin__bg {
  opacity: 0;
}

/* buildings replace the dots */
.lpin--secondary .lpin__label,
.lpin--primary .lpin__label {
  bottom: 50%;
}

.lpin--secondary:is(:hover, .is-hover) .lpin__bg,
.lpin--secondary.is-active .lpin__bg {
  transform: scale(1.3333);
}

.lpin--secondary:is(:hover, .is-hover) .lpin__label,
.lpin--secondary.is-active .lpin__label {
  transform: translate(-50%, -5px);
}

.lpin--label {
  --pin: 4px;
  pointer-events: none;
}

.lpin--label .lpin__bg {
  background: #fff;
}

.lpin--label .lpin__label {
  bottom: auto;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, .85);
}

.lpin--primary {
  --pin: 40px;
  color: #fff;
}

.lpin--primary .lpin__bg {
  background: radial-gradient(58.33% 58.33% at 73.33% 18.33%, rgba(255, 255, 255, 0) 0, rgb(255, 120, 60) 100%), #fff;

}

.lpin__preview {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100px;
  height: 100px;
  z-index: 1;
  opacity: 0;
  border-radius: 100px;
  background: #0b0b0b;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(.4);
  transition: transform 1s cubic-bezier(.7, 0, .3, 1), opacity 1s cubic-bezier(.7, 0, .3, 1);
}

.lpin__preview img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

.lpin__preview::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  border-radius: 120px;
  border: 1px solid rgba(255, 255, 255, .2);
  transform: translate(-50%, -50%) scale(.5);
  transition: transform 1s cubic-bezier(.7, 0, .3, 1);
}

.lpin--primary:is(:hover, .is-hover) .lpin__bg,
.lpin--primary.is-active .lpin__bg {
  transform: scale(2.5);
}

.lpin--primary:is(:hover, .is-hover) .lpin__preview,
.lpin--primary.is-active .lpin__preview {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.lpin--primary:is(:hover, .is-hover) .lpin__preview::after,
.lpin--primary.is-active .lpin__preview::after {
  transform: translate(-50%, -50%) scale(1);
}

.lpin--primary:is(:hover, .is-hover) .lpin__label,
.lpin--primary.is-active .lpin__label {
  transform: translate(-50%, -62px);
}

.lpin--primary .lpin__label {
  color: #ffd9c2;
}

.lpin:hover,
.lpin.is-active {
  z-index: 5;
}

.loc__explore {
  position: absolute;
  left: 0;
  top: 200vh;
}

.loc__crumbs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 30px;
}

.loc__crumbs ol {
  display: flex;
  gap: 10px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.loc__crumbs a {
  position: relative;
  color: rgba(255, 255, 255, .6);
  transition: color .4s;
}

.loc__crumbs a:hover {
  color: #fff;
}

.loc__crumbs-div {
  margin-left: 10px;
  color: rgba(255, 255, 255, .35);
}

.loc__crumbs [aria-current] {
  color: #fff;
}

/* side panels (sobha modal--side): clip-path wipe in from the right */
.lmodal {
  position: fixed;
  inset: 0;
  z-index: 140;
  visibility: hidden;
  pointer-events: none;
}

.lmodal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.lmodal__panel {
  position: absolute;
  top: 20px;
  right: 20px;
  bottom: 20px;
  width: calc(41.667vw - 20px);
  background: #1a1919;
  color: #f5f5f5;
  overflow: hidden auto;
  overscroll-behavior: contain;
  clip-path: inset(0 0 0 100%);
}

.lmodal--project .lmodal__panel {
  width: calc(91.667vw - 20px);
  background: #f2efec;
  color: #121212;
}

.lmodal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 0;
  color: inherit;
}

.lmodal__close::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .6s var(--ease);
}

.lmodal__close:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.lpoi {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  min-height: 100%;
  padding: 70px 0 0;
}

.lpoi__top {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lpoi__image {
  width: 47.37%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.lpoi__ph {
  display: block;
  width: 100%;
  height: 100%;
  background: url("../assets/img/about-bg.png") center / cover;
  filter: grayscale(.35) contrast(1.1);
}

.lpoi__title {
  margin: -.35em auto 0;
  max-width: 330px;
  position: relative;
  text-align: center;
  font-family: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.05;
  text-transform: uppercase;
}

.lpoi__desc {
  margin: 0 auto;
  max-width: 360px;
  padding: 40px 20px;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(245, 245, 245, .78);
}

.lproj {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100%;
}

.lproj__image {
  position: relative;
  overflow: hidden;
  background: #0b0b0b;
}

.lproj__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: url("../assets/img/hero-flame.png") 60% 50% / cover;
  will-change: transform;
}

.lproj__ph img {
  width: 34%;
  max-height: 40%;
  object-fit: contain;
  filter: drop-shadow(0 6px 30px rgba(0, 0, 0, .5));
}

.lproj__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 70px 50px 50px;
}

.lproj__title {
  font-family: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 3.8vw, 60px);
  line-height: 1.05;
  text-transform: uppercase;
}

.lproj__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.lproj__tag {
  border: 1px solid rgba(0, 0, 0, .35);
  border-radius: 30px;
  padding: 7px 14px;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.lproj__logo {
  height: 56px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: invert(1);
}

.lproj__tagline {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(0, 0, 0, .6);
}

.lproj__bottom p {
  font-size: 15px;
  line-height: 1.55;
  max-width: 460px;
}

.lproj__link {
  display: inline-flex;
  gap: 10px;
  margin-top: 26px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  transition: color .4s, gap .5s var(--ease);
}

.lproj__link:hover {
  color: var(--orange);
  gap: 16px;
}

/* ==========================================================================
   PROJECT PAGE (IVORY | Al Yasmin) — Figma "Desktop - 3" (2008:122)
   hero: night → day cross-fade on scroll, then reframe (azimuteresidencial.com.br)
   ========================================================================== */
.phx {
  --ink: #141414;
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

.phx__frame {
  position: absolute;
  inset: 0;
  z-index: -1;
  will-change: opacity;
}

.phx__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform, opacity;
}

.phx--single .phx__img--night {
  display: none;
  /* only a day photo for this project */
}

.phx__img--day {
  opacity: 1;
}

/* opens on the day render; scroll fades it to night */
.phx__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, .62) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 45%);
  opacity: 0;
}

/* light mode: a soft daylight wash so dark text reads over the day render */
.phx__shade--light {
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(246, 243, 238, .32) 0%, rgba(246, 243, 238, 0) 16%, rgba(246, 243, 238, 0) 52%, rgba(246, 243, 238, .74) 100%),
    linear-gradient(90deg, rgba(246, 243, 238, .46) 0%, rgba(246, 243, 238, 0) 34%),
    linear-gradient(270deg, rgba(246, 243, 238, .36) 0%, rgba(246, 243, 238, 0) 24%);
}

.phx__content {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--ink);
}

.phx__lead {
  position: absolute;
  left: calc(69 * var(--u));
  bottom: calc(147 * var(--u) + 9vh);
  width: calc(381 * var(--u));
  min-width: 260px;
  font-size: max(15px, calc(20.653 * var(--u)));
  font-weight: 300;
  line-height: 1.21;
  color: var(--ink);
}

.phx__note {
  position: absolute;
  right: calc(69 * var(--u));
  bottom: calc(198 * var(--u) + 9vh);
  text-align: right;
  font-size: max(13px, calc(15 * var(--u)));
  line-height: 1.73;
}

.phx__stats {
  position: absolute;
  left: calc(72 * var(--u));
  right: calc(69 * var(--u));
  bottom: calc(73 * var(--u) + 7vh);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
}

.phx__stat {
  display: flex;
  flex-direction: column;
  gap: calc(17 * var(--u));
  font-size: max(15px, calc(20 * var(--u)));
  line-height: 1.21;
}

.phx__stat b {
  font-weight: 800;
}

.phx__stat span {
  font-weight: 300;
}

.phx__stat:nth-child(2) {
  text-align: center;
}

.phx__stat:nth-child(3) {
  text-align: right;
}

.phx__cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  opacity: .7;
  font-size: 10px;
  letter-spacing: .2em;
}

.phx__cue i {
  position: relative;
  width: 1px;
  height: 34px;
  background: color-mix(in srgb, var(--ink) 20%, transparent);
  overflow: hidden;
}

.phx__cue i::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -100%;
  height: 100%;
  background: var(--ink);
  animation: cueDrop 1.8s var(--ease) infinite;
}

@keyframes cueDrop {
  to {
    top: 100%;
  }
}

/* About + Warranties over the warm glow */
.pwarm {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.pwarm__bg {
  position: absolute;
  left: calc(-91 * var(--u));
  width: calc(1524 * var(--u));
  top: 0;
  bottom: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.pwarm__bg img {
  position: absolute;
  left: 0;
  top: -6%;
  width: 100%;
  height: 112%;
  object-fit: cover;
  opacity: .3;
}

.pwarm__bg::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(227 * var(--u));
  z-index: 1;
  background: linear-gradient(180deg, #000 10%, rgba(0, 0, 0, 0));
}

.pwarm__bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40%;
  z-index: 1;
  background: linear-gradient(0deg, #000 20%, rgba(0, 0, 0, 0));
}

.pabout {
  padding: calc(102 * var(--u)) calc(86 * var(--u)) 0;
  color: #fff;
}

.pabout__label {
  font-size: max(13px, calc(16 * var(--u)));
}

.pabout__title {
  margin-top: calc(59 * var(--u));
  font-size: max(32px, calc(55 * var(--u)));
  font-weight: 400;
  line-height: calc(84 / 55);
}

.pabout__text {
  margin-top: calc(84 * var(--u));
  margin-left: calc(-7 * var(--u));
  max-width: calc(1033 * var(--u));
  font-size: max(16px, calc(24 * var(--u)));
  line-height: 1.21;
}

.pabout__text p+p {
  margin-top: 1.21em;
}

.pwar {
  padding: calc(104 * var(--u)) var(--gutter) calc(180 * var(--u));
  text-align: center;
  color: #fff;
}

.pwar__line {
  display: block;
  width: 1px;
  height: calc(111 * var(--u));
  margin: 0 auto;
  background: #fff;
  transform-origin: top;
}

.pwar__title {
  margin-top: calc(59 * var(--u));
  font-size: max(36px, calc(66.207 * var(--u)));
  font-weight: 700;
  line-height: 1.21;
  letter-spacing: .005em;
}

.pwar__text {
  margin: calc(99 * var(--u)) auto 0;
  max-width: calc(858 * var(--u));
  font-size: max(14px, calc(20 * var(--u)));
  font-weight: 300;
  line-height: 1.21;
}

.pwar__grid {
  margin: calc(318 * var(--u)) auto 0;
  max-width: calc(1300 * var(--u));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: calc(150 * var(--u));
}

.wcell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.wcell__icon {
  width: calc(50 * var(--u));
  height: auto;
  margin-bottom: calc(33 * var(--u));
  transition: transform .6s var(--ease);
}

.wcell:hover .wcell__icon {
  transform: translateY(-4px) scale(1.08);
}

.wcell__label {
  font-size: max(15px, calc(21.93 * var(--u)));
  line-height: 1.21;
}

.wcell__years {
  margin-top: calc(8 * var(--u));
  font-size: max(15px, calc(21.93 * var(--u)));
  line-height: 1.21;
  color: rgba(255, 255, 255, .85);
}

.wcell__num {
  font-variant-numeric: tabular-nums;
}

/* Exterior: pinned stage, the card's photo grows to full bleed */
.pext {
  position: relative;
  padding-top: calc(60 * var(--u));
}

.pext__label {
  position: relative;
  z-index: 2;
  padding-left: calc(38 * var(--u));
  font-size: max(16px, calc(24 * var(--u)));
  color: #fff;
}

.pext__stage {
  position: relative;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
}

.pext__band {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pext__band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .65;
}

.pext__band::before,
.pext__band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 25%;
  z-index: 1;
}

.pext__band::before {
  top: 0;
  background: linear-gradient(180deg, #000 15%, rgba(0, 0, 0, 0));
}

.pext__band::after {
  bottom: 0;
  background: linear-gradient(0deg, #000 15%, rgba(0, 0, 0, 0));
}

.pext__card {
  --cs: min(calc(731 * var(--u)), calc(100vh - 80px), 92vw);
  position: absolute;
  left: calc(50% - 48.5 * var(--u));
  top: 50%;
  width: var(--cs);
  height: var(--cs);
  margin: calc(var(--cs) / -2) 0 0 calc(var(--cs) / -2);
  background: #000;
  border: 2px solid rgba(253, 253, 253, .22);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--soft);
  padding-top: calc(var(--cs) * 18 / 731);
}

.pext__title {
  /* sized so "Take a closer look." sits on one line across the card (96 fit the old 11-letter title) */
  font-size: calc(var(--cs) * 62 / 731);
  font-weight: 400;
  line-height: 1.21;
  white-space: nowrap;
}

.pext__thumb {
  width: calc(var(--cs) * 341 / 731);
  height: calc(var(--cs) * 227 / 731);
  margin-top: calc(var(--cs) * 144 / 731);
}

.pext__text {
  margin-top: calc(var(--cs) * 122 / 731);
  width: calc(var(--cs) * 628 / 731);
  font-size: max(13px, calc(var(--cs) * 20 / 731));
  line-height: 1.21;
  color: #fff;
}

.pext__frame {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
}

/* JS sizes this to the thumb slot */
.pext__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  will-change: clip-path;
}

/* two more exterior renders under the full-screen photo: one row, equal height,
   each item as wide as its own shape (--r = width / height) */
.pgal {
  display: flex;
  gap: calc(24 * var(--u));
  padding: calc(120 * var(--u)) var(--gutter) calc(40 * var(--u));
}

.pgal[hidden] {
  display: none;
}

.pgal__item {
  flex: var(--r) 1 0;
  aspect-ratio: var(--r);
  overflow: hidden;
  background: #111;
}

.pgal__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

/* Project location */
.ploc {
  position: relative;
  color: #fff;
}

.ploc__line {
  position: relative;
  z-index: 2;
  display: block;
  width: 1px;
  height: calc(487 * var(--u));
  margin: calc(56 * var(--u)) auto 0;
  background: #fff;
  transform-origin: top;
}

.ploc__intro {
  position: relative;
  height: calc(732 * var(--u));
  margin-top: calc(-251 * var(--u));
  display: grid;
  place-items: center;
}

.ploc__ghost {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ploc__ghost img {
  position: absolute;
  left: calc(-26 * var(--u));
  top: 0;
  width: calc(1634 * var(--u));
  height: 100%;
  object-fit: cover;
  opacity: .25;
}

.ploc__ghost::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, #000 100%);
}

.ploc__title {
  position: relative;
  font-size: max(30px, calc(55 * var(--u)));
  font-weight: 900;
  letter-spacing: .005em;
}

.ploc__stage {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.ploc__map {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* the locations map, zoomed and centred on this project (--px/--py = its position, 0–1).
   --ww = map width; --fx/--fy = where the project sits on screen (left of the panel) */
.ploc__map {
  background: #0e0e0e;
}

.ploc__world {
  --ww: max(200vw, 2100px);
  --fx: 40%;
  --fy: 50%;
  position: absolute;
  width: var(--ww);
  height: calc(var(--ww) * 863 / 1823);
  left: calc(var(--fx) - var(--px) * var(--ww));
  top: calc(var(--fy) - var(--py) * var(--ww) * 863 / 1823);
  will-change: transform;
}

.ploc__map-img {
  display: block;
  width: 100%;
  height: 100%;
}

.ploc__world .pin {
  z-index: 3;
}

/* landmarks / areas / other Balance projects around it */
.ploc__dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  pointer-events: none;
}

.ploc__dot i {
  position: absolute;
  left: -3px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.ploc__dot b {
  position: absolute;
  left: 12px;
  top: 0;
  transform: translateY(-50%);
  white-space: nowrap;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .65);
}

.ploc__dot.is-hidden {
  display: none;
  /* would cover a label already placed (see declutterMap in projects.js) */
}

.ploc__dot--area b {
  color: rgba(255, 255, 255, .55);
}

.ploc__dot--project i {
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 77, 0, .18);
}

.ploc__dot--project b {
  color: #ffd9c2;
}

/* generated panel (projects without their own panel images) */
.ploc__info {
  position: absolute;
  inset: 0;
  padding: calc(44 * var(--u)) calc(36 * var(--u)) calc(90 * var(--u));
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
  color: var(--soft);
}

.ploc__tag {
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 30px;
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ploc__name {
  margin-top: calc(10 * var(--u));
  font-size: max(24px, calc(36 * var(--u)));
  line-height: 1.1;
  font-weight: 600;
}

.ploc__tagline {
  font-size: max(12px, calc(13 * var(--u)));
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(245, 245, 245, .6);
}

.ploc__about {
  font-size: max(14px, calc(16 * var(--u)));
  line-height: 1.55;
  color: rgba(245, 245, 245, .85);
}

.ploc__near {
  margin-top: calc(6 * var(--u));
}

.ploc__near li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: calc(14 * var(--u)) 0;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  font-size: max(15px, calc(18 * var(--u)));
}

.ploc__near small {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(245, 245, 245, .5);
}

.ploc__cta {
  position: absolute;
  left: calc(36 * var(--u));
  bottom: calc(36 * var(--u));
  z-index: 2;
  display: inline-flex;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--soft);
  transition: color .4s, gap .5s var(--ease);
}

.ploc__cta:hover {
  color: var(--orange);
  gap: 16px;
}

.ploc__panel {
  position: absolute;
  right: calc(76 * var(--u));
  top: calc(182 * var(--u));
  width: calc(389 * var(--u));
  height: calc(527 * var(--u));
  min-width: 300px;
  background: #000;
}

.ploc__slide {
  position: absolute;
  inset: 0;
}

.ploc__slide--a img {
  position: absolute;
  left: 5.4%;
  top: 31.3%;
  width: 88.9%;
  height: auto;
}

.ploc__slide--b img {
  position: absolute;
  left: 0;
  top: 0;
  width: 101.3%;
  height: auto;
  mix-blend-mode: plus-lighter;
}

.ploc__slide--b {
  opacity: 0;
}

.ploc__dots {
  position: absolute;
  right: calc(76 * var(--u));
  top: calc(182 * var(--u) + 527 * var(--u) + 22px);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .4);
}

.ploc__dots i {
  width: 60px;
  height: 1px;
  background: rgba(255, 255, 255, .2);
  position: relative;
}

.ploc__dots i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--orange);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

.ploc__dots .is-on {
  color: #fff;
}

/* "View project" link on the projects list */
.proj__more {
  display: inline-flex;
  gap: 10px;
  margin-top: calc(18 * var(--u));
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  color: var(--soft);
  transition: color .4s, gap .5s var(--ease);
  pointer-events: auto;
}

.proj__more:hover {
  color: var(--orange);
  gap: 16px;
}

/* header in light mode (project hero by day) */
.header__logo img,
.nav__link,
.burger span {
  transition: filter .6s var(--ease), color .6s var(--ease), background-color .6s var(--ease);
}

body.theme-light .header__logo img {
  filter: invert(1);
}

body.theme-light .nav__link {
  color: #141414;
}

body.theme-light .burger span {
  background: #141414;
}

body.theme-light .header.is-scrolled {
  background: rgba(246, 243, 238, .55);
}

/* ==========================================================================
   Mobile — Figma "iPhone 17 - 1" (home) + "iPhone 17 - 2" (projects), 402 wide
   Those frames are the desktop layout scaled to 402/1440, so on home/projects
   (and the shared header/footer) --u becomes 100vw/1440 and the desktop rules
   reproduce them. --m is 1 mobile-frame px for the parts drawn separately
   (hero, map, projects hero). Text keeps a readable floor via max().
   ========================================================================== */
@media (max-width: 900px) {
  :root {
    --u: 1px;
    --gutter: 20px;
    --m: calc(100vw / 402);
  }

  .header,
  .footer,
  [data-page="home"] main,
  [data-page="projects"] main {
    --u: calc(100vw / 1440);
  }

  /* pinned stages use the visible viewport, not the address-bar-hidden one */
  .loc__stage,
  .plist__sticky {
    height: 100svh;
  }

  /* header — logo 18.7,17 · inline nav from x248, gap 18.5 (no burger) */
  .burger,
  .menu {
    display: none;
  }

  .header__logo img {
    width: max(64px, calc(141 * var(--u)));
    min-width: 0;
  }

  .nav__link {
    font-size: max(11px, calc(13.558 * var(--u)));
  }

  /* hero — 402×525 · flame 813×457 @(-235,-38) · title 18.8/600 @272 · copy 7.3/300 @344 */
  .hero {
    height: calc(525 * var(--m));
    min-height: 0;
  }

  .hero__media {
    inset: auto;
    left: calc(-235 * var(--m));
    top: calc(-38 * var(--m));
    width: calc(813 * var(--m));
    height: calc(457 * var(--m));
  }

  .hero__content {
    left: calc(18 * var(--m));
    top: calc(272 * var(--m));
    width: calc(240 * var(--m));
    min-width: 0;
  }

  .hero__title {
    font-size: max(19px, calc(18.796 * var(--m)));
  }

  .hero__text {
    margin-top: calc(18 * var(--m));
    font-size: max(11px, calc(7.309 * var(--m)));
  }

  .hero__bottom {
    left: calc(18 * var(--m));
    right: calc(18 * var(--m));
    bottom: calc(56 * var(--m));
  }

  /* Figma shows the flame sharp at .62 — no cursor on touch, so drop the burn-through mask */
  .flame--blur {
    display: none;
  }

  .flame--sharp {
    -webkit-mask-image: none;
    mask-image: none;
    opacity: .62;
  }

  .btn-pill {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 5px 14px;
    border-width: 1px;
    font-size: 11px;
  }

  /* logos band — 402×41 @525, gradient at .35 */
  .logos {
    margin-top: 0;
    height: calc(41.1 * var(--m));
    min-height: 0;
  }

  .logos__band {
    background: linear-gradient(90deg,
        rgba(0, 0, 0, .35) 23.558%, rgba(255, 115, 68, .35) 34.135%, rgba(255, 64, 0, .35) 49.519%,
        rgba(255, 115, 68, .35) 59.615%, rgba(0, 0, 0, .35) 77.404%);
  }

  /* pillars — ring 174.45 @x123.5 · list 7.8 @x20 · label 60 above centre */
  .pillars__pin {
    --ring: calc(174.45 * var(--m));
    height: 100svh;
  }

  .pillars__label {
    top: calc(50% - 60 * var(--m));
    left: calc(19.6 * var(--m));
    font-size: max(10px, calc(5.592 * var(--m)));
  }

  .pillars__grid {
    grid-template-columns: calc(103.5 * var(--m)) auto 1fr;
  }

  .pillars__kicker {
    font-size: max(10px, calc(4.531 * var(--m)));
  }

  .pillars__list li {
    font-size: max(11px, calc(7.793 * var(--m)));
  }

  /* about / projects / labels */
  .about__title {
    font-size: max(14px, calc(8.948 * var(--m)));
  }

  .about__text {
    font-size: max(12px, calc(7.829 * var(--m)));
  }

  .label {
    font-size: max(11px, calc(5.592 * var(--m)));
  }

  .projects {
    padding-top: calc(41 * var(--m));
  }

  /* carousel — centre 160.25×101 r7.75 · sides 132.25×83.25 · gap 18.75 */
  .carousel {
    --cw: calc(160.25 * var(--m));
    --ch: calc(101 * var(--m));
    margin-top: calc(71 * var(--m));
  }

  .carousel__card {
    margin-left: calc(var(--cw) / -2);
  }

  .label--locations {
    padding-top: calc(70 * var(--m));
  }

  /* map — 616×291 @(-212) · card 207×120 @(101, +248) · 12.1px list */
  .locations::before {
    /* soft black band across the map's top edge */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(-42.5 * var(--m));
    height: calc(63.5 * var(--m));
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(178.35deg, rgba(0, 0, 0, 0) 7.72%, rgba(0, 0, 0, .676) 24.4%, #000 54.51%, rgba(0, 0, 0, 0) 83%);
  }

  .map {
    width: calc(616 * var(--m));
    margin-left: calc(-212 * var(--m));
  }

  .pin {
    width: 14px;
    --pv: 50px;
  }

  /* the card now holds a heading + 9 areas, so it flows under the map (overlapping its bottom
     edge as in Figma) instead of being a fixed 120px box */
  .locations {
    margin-bottom: calc(94 * var(--m));
  }

  .map__card {
    position: relative;
    left: auto;
    bottom: auto;
    margin: calc(-43 * var(--m)) 0 0 calc(101 * var(--m));
    width: calc(207 * var(--m));
    min-height: 0;
    min-width: 0;
    padding: 14px 12px 16px;
  }

  .map__title {
    font-size: 12px;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  .map__list button {
    font-size: max(12px, calc(12.143 * var(--m)));
    line-height: 1.6;
  }

  /* footer — nav/contact left, form card right (as desktop, scaled) */
  .footer__cols {
    column-gap: 16px;
  }

  .footer__cols {
    grid-template-columns: 1fr calc(169.74 * var(--m));
    padding-right: 0;
  }

  .footer__info {
    padding-top: calc(65 * var(--m));
  }

  .footer__title {
    font-size: max(13px, calc(8.147 * var(--m)));
  }

  .footer__links li {
    font-size: max(11px, calc(6.111 * var(--m)));
  }

  .form__title {
    font-size: max(12px, calc(7.143 * var(--m)));
  }

  .form__sub {
    font-size: max(9px, calc(5.24 * var(--m)));
  }

  .field__label {
    font-size: 9px;
  }

  .field input {
    min-height: 26px;
    font-size: 16px;
  }

  /* 16px stops iOS zooming on focus */
  .btn-outline {
    min-height: 26px;
    border-radius: 13px;
    font-size: 8.5px;
  }

  .form__note {
    font-size: 7px;
  }

  .footer__mark {
    margin-top: calc(35 * var(--m));
  }
}

@media (max-width: 380px) {
  .nav {
    gap: 10px;
  }

  /* 4-link nav (projects) still clears the logo on 360px phones */
}

/* projects page — card 277 @top 70 · title 22.6 · copy 6.8 → 10px floor (card grows to fit) */
@media (max-width: 900px) {
  .phero {
    --cw: calc(277 * var(--m));
    --ch: max(330px, calc(330 * var(--m)));
    --cy: calc(70 * var(--m) + var(--ch) / 2);
    height: calc(70 * var(--m) + var(--ch) + 58 * var(--m));
    min-height: 0;
  }

  .phero__bg {
    left: 50%;
    top: calc(-2 * var(--m));
    width: calc(414 * var(--m));
    height: calc(786 * var(--m));
    transform: translateX(-50%);
  }

  .phero__card {
    top: var(--cy);
    width: calc(240 * var(--m));
  }

  .phero__title {
    font-size: max(20px, calc(22.566 * var(--m)));
  }

  .phero__rule {
    width: calc(50 * var(--m));
    margin-top: calc(8.6 * var(--m));
  }

  .phero__text {
    width: 100%;
    margin-top: calc(22 * var(--m));
    font-size: max(10px, calc(6.812 * var(--m)));
  }

  .proj__title {
    font-size: max(14px, calc(11.595 * var(--m)));
  }

  .proj__desc {
    font-size: max(10px, calc(3.71 * var(--m)));
  }

  .proj__more {
    font-size: 10px;
  }

  .slot__ph {
    font-size: 0;
    padding: 0;
  }
}

@media (max-width: 900px) {
  .loc__map {
    --mw: max(320vw, 1300px);
  }

  .loc__title {
    font-size: clamp(44px, 15vw, 80px);
  }

  .loc__arrow {
    padding: 20px;
  }

  .lpin__label {
    font-size: 9.5px;
  }

  .lmodal__panel,
  .lmodal--project .lmodal__panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 88svh;
    clip-path: none;
  }

  .lpoi {
    padding-top: 64px;
  }

  .lpoi__image {
    width: 60%;
  }

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

  .lproj__image {
    min-height: 46svh;
  }

  .lproj__content {
    padding: 32px 22px 36px;
    gap: 26px;
  }

  .loc__crumbs {
    padding: 20px;
  }
}

@media (max-width: 900px) {

  /* phone hero: name block on top, paragraph, then Location · Developer · Year in a row */
  .phx__note {
    display: block;
    right: auto;
    left: 20px;
    top: 96px;
    bottom: auto;
    text-align: left;
    font-size: 13px;
    line-height: 1.5;
  }

  .phx__note::first-line {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .02em;
  }

  .phx__lead {
    left: 20px;
    right: 20px;
    width: auto;
    bottom: 172px;
    transform: none;
    font-size: 15px;
    line-height: 1.45;
  }

  .phx__stats {
    left: 20px;
    right: 20px;
    bottom: 84px;
    /* clear of the "Explore" cue */
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 12px;
  }

  .phx__stat,
  .phx__stat:nth-child(2),
  .phx__stat:nth-child(3) {
    text-align: left;
    gap: 4px;
    font-size: 13px;
  }

  .pabout {
    padding: 80px 20px 0;
  }

  .pabout__title {
    margin-top: 24px;
    line-height: 1.25;
  }

  .pabout__text {
    margin: 36px 0 0;
  }

  .pwar {
    padding: 80px 20px 100px;
  }

  .pwar__grid {
    margin-top: 70px;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 44px;
    column-gap: 12px;
  }

  .wcell {
    justify-content: flex-start;
  }

  .pext__label {
    padding-left: 20px;
  }

  .pgal {
    flex-direction: column;
    gap: 14px;
    padding: 56px 20px 20px;
  }

  .pgal__item {
    flex: none;
    /* stacked: full width, height from the image's own shape */
    width: 100%;
  }

  .pext__card {
    left: 50%;
  }

  .ploc__line {
    height: 160px;
  }

  .ploc__intro {
    height: 300px;
    margin-top: -60px;
  }

  .ploc__panel {
    left: 20px;
    right: 20px;
    width: auto;
    top: auto;
    bottom: 70px;
    height: 62vw;
    min-width: 0;
  }

  .ploc__world {
    --ww: max(420vw, 1500px);
    --fx: 50%;
    --fy: 30%;
  }

  .ploc__panel--info {
    height: auto;
    min-height: 300px;
  }

  .ploc__panel--info .ploc__slide {
    position: relative;
    grid-area: 1 / 1;
  }

  .ploc__panel--info {
    display: grid;
  }

  .ploc__info {
    position: relative;
    inset: auto;
    padding: 22px 20px 64px;
    gap: 10px;
  }

  .ploc__cta {
    left: 20px;
    bottom: 20px;
  }

  .ploc__dots {
    right: 20px;
    top: auto;
    bottom: 36px;
  }
}

/* ==========================================================================
   Phone polish — the phone layout is the desktop design scaled to the screen,
   which left text tiny and sections floating in empty space. These rules only
   resize / reflow; every animation keeps running on the same elements.
   ========================================================================== */
@media (max-width: 900px) {

  /* home hero: fills the first screen together with the logo band — flame across the top,
     headline + copy + buttons stacked in the lower half at phone-readable sizes */
  .hero {
    height: calc(100svh - 41.1 * var(--m));
    min-height: 560px;
  }

  /* + the original logo band = one screen */
  .hero__media {
    left: -45%;
    top: -4%;
    width: 190%;
    height: 64%;
  }

  .hero__content {
    left: 20px;
    right: 20px;
    width: auto;
    top: auto;
    bottom: 250px;
  }

  .hero__title {
    font-size: clamp(30px, 8.6vw, 38px);
    line-height: 1.12;
    max-width: 11em;
  }

  .hero__text {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.5;
    max-width: 30em;
  }

  .hero__bottom {
    left: 20px;
    right: 20px;
    bottom: 44px;
    gap: 12px;
    justify-content: flex-start;
  }

  .hero__bottom .btn-pill {
    padding: 12px 22px;
    font-size: 15px;
    border-width: 1px;
  }

  .hero__bottom .btn-pill:not(.btn-pill--solid) {
    margin-left: auto;
  }

  /* section labels / about (home) */
  .label {
    font-size: 13px;
    letter-spacing: .04em;
  }

  .about__title {
    font-size: 22px;
  }

  .about__text {
    font-size: 17px;
    line-height: 1.4;
  }

  .projects {
    padding-top: 64px;
  }

  /* pillars: label + list on top, a big ring in the middle, ticker underneath */
  .pillars__pin {
    --ring: min(72vw, 40svh);
  }

  .pillars__label {
    top: 84px;
    left: 20px;
    font-size: 13px;
  }

  .pillars__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    padding: 118px 20px 7svh;
    align-items: center;
  }

  .pillars__left {
    grid-row: 1;
    grid-column: 1;
    align-self: start;
    padding-top: 0;
  }

  .pillars__center {
    grid-row: 2;
    grid-column: 1;
    height: auto;
  }

  .pillars__right {
    grid-row: 3;
    grid-column: 1;
    justify-self: center;
    align-self: end;
    padding-top: 0;
    font-size: 12px;
  }

  .pillars__kicker {
    font-size: 12px;
  }

  .pillars__list {
    margin-top: 10px;
  }

  .pillars__list li {
    font-size: 22px;
  }

  /* projects carousel: phone-sized cards and a readable caption */
  .carousel {
    --cw: min(80vw, 380px);
    --ch: var(--cw);
    margin-top: 28px;
  }

  /* square cards fill the phone screen */
  .carousel__info {
    left: 16px;
    right: 16px;
    bottom: 14px;
    gap: 12px;
  }

  .carousel__logo {
    height: 30px;
    max-width: 72px;
    padding-right: 12px;
  }

  .carousel__name {
    font-size: 16px;
  }

  .carousel__area {
    font-size: 12px;
    margin-top: 3px;
  }

  .projects__progress {
    margin-top: 26px;
    font-size: 12px;
  }

  .label--locations {
    padding-top: 72px;
  }

  /* home map card: two columns of areas, bigger text */
  .map__card {
    width: auto;
    margin-left: 20px;
    margin-right: 20px;
    padding: 18px 16px 20px;
  }

  .map__title {
    font-size: 15px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  .map__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
  }

  .map__list button {
    font-size: 15px;
    line-height: 1.9;
  }

  /* footer (every page): one column — navigation + contact, then the form full width */
  .footer {
    padding-top: 56px;
  }

  .footer__cols,
  [data-page="home"] .footer__cols {
    grid-template-columns: 1fr;
    padding: 0 20px;
    row-gap: 36px;
  }

  .footer__info {
    padding-top: 0;
  }

  .footer__info>br {
    display: none;
  }

  .footer__info .footer__block+.footer__block {
    margin-top: 28px !important;
  }

  /* overrides the inline 60px gap */
  .footer__title {
    font-size: 18px;
  }

  .footer__links {
    margin-top: 10px;
  }

  .footer__links li {
    font-size: 16px;
  }

  .footer__links li+li {
    margin-top: 8px;
  }

  .footer__links--contact li+li {
    margin-top: 10px;
  }

  .footer__links .footer__social a {
    width: 42px;
    height: 42px;
  }

  .form {
    padding: 28px 20px 24px;
  }

  .form__title {
    font-size: 20px;
  }

  .form__sub {
    font-size: 14px;
    margin-top: 10px;
  }

  .field {
    margin-top: 26px;
  }

  .field+.field {
    margin-top: 16px;
  }

  .field__label {
    font-size: 12px;
  }

  .field input {
    height: 44px;
  }

  .form__actions {
    gap: 10px;
    margin-top: 24px;
  }

  .btn-outline {
    width: 100%;
    max-width: none;
    min-height: 48px;
    border-radius: 24px;
    font-size: 12px;
    letter-spacing: .06em;
  }

  .form__actions {
    padding-left: 0;
  }

  .form__note {
    font-size: 11px;
    margin-top: 18px;
  }

  .footer__mark {
    margin-top: 48px;
  }

  /* projects page rows: readable titles / text, bigger logos */
  .proj {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .proj__logo {
    width: calc(var(--w) * var(--u) * 1.7);
    height: calc(var(--h) * var(--u) * 1.7);
    margin-bottom: calc((var(--slot, 110) - var(--h)) * var(--u) * 1.7);
  }

  .proj__title {
    font-size: 20px;
    margin-top: 14px;
  }

  .proj__desc {
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px;
  }

  .proj__more {
    font-size: 11px;
    margin-top: 14px;
  }

  /* projects page hero card: readable intro text (the card grows to fit it) */
  /* full-screen hero (like desktop): a shorter hero left the pin's scroll space as a black gap below it */
  .phero {
    --cw: calc(100vw - 40px);
    --ch: max(340px, calc(340 * var(--m)));
    --cy: 50%;
    height: 100svh;
    min-height: 560px;
  }

  .phero__card {
    top: 50%;
  }

  .phero__bg {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }

  .phero__card {
    width: calc(100vw - 80px);
  }

  .phero__title {
    font-size: 28px;
  }

  .phero__text {
    font-size: 13px;
    line-height: 1.5;
  }

  /* project page: headings sized for a phone (no words broken in half) */
  .pabout__title {
    font-size: 32px;
    line-height: 1.2;
  }

  .pabout__text {
    font-size: 17px;
    line-height: 1.5;
  }

  .pwar__title {
    font-size: 40px;
  }

  .pwar__text {
    font-size: 15px;
    line-height: 1.5;
  }

  .ploc__title {
    font-size: 30px;
    text-align: center;
    padding: 0 20px;
  }
}

/* ==========================================================================
   Languages — EN / ع switch + Arabic (right-to-left) mode
   ========================================================================== */
.lang-switch {
  align-self: center;
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 13px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .04em;
  color: inherit;
  transition: background-color .4s, color .4s, border-color .4s;
}

.lang-switch:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
}

.lang-switch:lang(ar) {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 14px;
}

body.theme-light .lang-switch {
  border-color: rgba(20, 20, 20, .45);
}

/* nothing may widen the page sideways: in right-to-left the wide map/flame overflow
   to the left, which phones would otherwise turn into a wider, shifted page */
html,
body {
  overflow-x: clip;
}

/* Arabic is cursive: letter-spacing pulls the joined letters apart */
html[lang="ar"] body,
html[lang="ar"] body * {
  letter-spacing: 0 !important;
}

html[lang="ar"] body {
  font-family: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
}

/* Arabic: blocks the design places on the left move to the right (mirrored layout) */
html[dir="rtl"] .header { padding-left: calc(56 * var(--u)); padding-right: calc(69 * var(--u)); }
html[dir="rtl"] .hero__content { left: auto; right: var(--gutter); }
html[dir="rtl"] .pillars__label { left: auto; right: var(--gutter); }
html[dir="rtl"] .label { padding-left: 0; padding-right: var(--gutter); }
html[dir="rtl"] .map__card { left: auto; right: calc(57 * var(--u)); }
html[dir="rtl"] .pext__label { padding-left: 0; padding-right: calc(38 * var(--u)); }
html[dir="rtl"] .footer__links a:hover { transform: translateX(-6px); }
html[dir="rtl"] .phx__lead { left: auto; right: calc(69 * var(--u)); }
html[dir="rtl"] .phx__note { right: auto; left: calc(69 * var(--u)); text-align: left; }
html[dir="rtl"] .phx__stat { text-align: right; }
html[dir="rtl"] .phx__stat:nth-child(3) { text-align: left; }
html[dir="rtl"] .carousel__logo { padding-right: 0; border-right: 0; padding-left: calc(var(--cw) * 16 / 641); border-left: 1px solid rgba(255, 255, 255, .45); }

@media (max-width: 900px) {
  html[dir="rtl"] .header { padding-left: 20px; padding-right: 20px; }
  html[dir="rtl"] .hero__content { left: 20px; right: 20px; }
  html[dir="rtl"] .pillars__label { left: auto; right: 20px; }
  html[dir="rtl"] .map__card { right: auto; }
  html[dir="rtl"] .phx__lead { left: 20px; right: 20px; }
  html[dir="rtl"] .phx__note { left: auto; right: 20px; text-align: right; }
  html[dir="rtl"] .phx__stat,
  html[dir="rtl"] .phx__stat:nth-child(3) { text-align: right; }
}

/* pieces positioned/animated in left-to-right coordinates keep that direction
   (their text still reads right-to-left) */
html[dir="rtl"] :is(.logos__viewport, .carousel, .projects__progress, .locations, .map, .loc__stage, .ploc__map,
  .ticker, .footer__mark, .plist__stage, .phero__frame, .pext__stage, .proj__line, .loader) {
  direction: ltr;
}

/* …but the text inside them reads right-to-left (keeps punctuation on the correct side) */
html[dir="rtl"] :is(.carousel__info, .pext__card, .lpin__label, .ploc__dot b, .pin__tip, .pgal, .map__card) {
  direction: rtl;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}