/* Thmanyah Sans isn't on Google Fonts — uses a local install if present, else Tajawal. */
@font-face {
  font-family: "Thmanyah Sans";
  font-weight: 300;
  src: local("thmanyah sans Light"), local("ThmanyahSans-Light");
}
@font-face {
  font-family: "Thmanyah Sans";
  font-weight: 400;
  src: local("thmanyah sans Regular"), local("ThmanyahSans-Regular");
}
@font-face {
  font-family: "Thmanyah Sans";
  font-weight: 900;
  src: local("thmanyah sans Black"), local("ThmanyahSans-Black");
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:root {
  --bg: #0e0e0e;
  --black: #000;
  --text: #fff4f4;
  --ice: #eaf8fc;
  --bone: #f1efea;
  --text-muted: #676767;
  --grey: #404040;
  --paper: #f9f8f9;
  --lime: #caff60;
  --violet: #9860ff;
  --plum: #140128;

  --font-ui: "Space Grotesk", system-ui, sans-serif;
  --font-display: "Unbounded", "Thmanyah Sans", "Tajawal", system-ui, sans-serif;
  --font-arabic: "Thmanyah Sans", "Tajawal", sans-serif;

  /* 1 design px on the 1728px-wide Figma page, scaled to the viewport (capped at 1:1) */
  --s: calc(min(100vw, 1728px) / 1728);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

p,
h1,
h2,
h3,
ol,
ul,
figure {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

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

a,
button {
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

img {
  display: block;
}

/* A section's 1728-wide design canvas, centred; children are placed in design px. */
.stage {
  position: relative;
  width: calc(1728 * var(--s));
  margin: 0 auto;
}

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

.site-header {
  position: absolute;
  z-index: 10;
  top: calc(65 * var(--s));
  left: calc(50% - 742 * var(--s));
  width: calc(1475 * var(--s));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: calc(8.09 * var(--s));
  width: calc(191.238 * var(--s));
  height: calc(37 * var(--s));
}

.brand__mark {
  width: calc(59.3843 * var(--s));
  height: calc(37 * var(--s));
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: max(9px, calc(14.061 * var(--s)));
  line-height: normal;
  white-space: nowrap;
  color: var(--bone);
}

.nav {
  display: flex;
  align-items: center;
  gap: calc(43 * var(--s));
  font-family: var(--font-display);
  font-weight: 300;
  font-size: max(10px, calc(14.061 * var(--s)));
  line-height: normal;
  white-space: nowrap;
  color: var(--bone);
}

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

.hero {
  /* 1 design px on the 1728×1117 hero frame, fitted to the viewport */
  --u: min(calc(100vw / 1728), calc(100svh / 1117));
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--bg);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.hero__satin-fallback {
  background: var(--bg) url(assets/satin.jpg) center / cover no-repeat;
  filter: brightness(0.9);
}

/* Soft vignette so the corners hold the type */
.hero__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, rgba(11, 11, 13, 0) 45%, rgba(11, 11, 13, 0.55) 100%);
}

/* Q mark: 599.877 × 456.15 rotated -5.09deg, centred horizontally, centre at y≈513/1117 */
.hero__mark {
  position: absolute;
  left: 50%;
  top: 45.9%;
  width: calc(var(--u) * 599.877);
  aspect-ratio: 599.877 / 456.15;
  transform: translate(-50%, -50%) rotate(-5.09deg);
}

.hero__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Leans toward the cursor; --mx / --my / --mr are set by main.js */
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) rotate(var(--mr, 0deg));
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Bottom-left: left 122, block bottom at 1024 of 1117 */
.hero__meta {
  position: absolute;
  left: max(16px, calc(100vw * 122 / 1728));
  bottom: calc(var(--u) * 93);
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 5);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: max(11px, calc(var(--u) * 15));
  line-height: normal;
}

.hero__pillars {
  display: flex;
  align-items: center;
  gap: 8px;
  height: calc(var(--u) * 27);
  color: var(--text);
}

.hero__dot {
  position: relative;
  top: -0.3em;
}

.hero__tagline {
  color: var(--text-muted);
}

/* Bottom-right: 445 wide, right edge at 1597 (131 from right), bottom at 1048 (69 from bottom) */
.hero__headline {
  position: absolute;
  right: max(16px, calc(100vw * 131 / 1728));
  bottom: calc(var(--u) * 69);
  width: calc(var(--u) * 445);
  display: flex;
  flex-direction: column;
  text-align: center;
  font-weight: normal;
  line-height: normal;
  color: var(--text);
}

.hero__headline-ar {
  font-family: var(--font-arabic);
  font-weight: 900;
  font-size: calc(var(--u) * 51);
  line-height: calc(var(--u) * 64);
}

.hero__headline-en {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 200;
}

.hero__headline-en-1 {
  font-size: calc(var(--u) * 51.458);
  line-height: calc(var(--u) * 70);
  margin-bottom: calc(var(--u) * -18);
}

.hero__headline-en-2 {
  font-size: calc(var(--u) * 47.097);
  line-height: calc(var(--u) * 70);
}

/* ───────── About ───────── */

.about {
  overflow: hidden;
  background: var(--black);
}

.about__stage {
  height: calc(1117 * var(--s));
}

/* 720×900 rotated 15.76deg; rotated bounds centre at (859.2, 496.9) */
.about__itar {
  position: absolute;
  left: calc(859.22 * var(--s));
  top: calc(496.87 * var(--s));
  width: calc(720 * var(--s));
  height: calc(900 * var(--s));
  object-fit: cover;
  transform: translate(-50%, -50%) rotate(15.76deg);
}

.about__shade {
  position: absolute;
  left: calc(-4 * var(--s));
  top: calc(-4 * var(--s));
  width: calc(1728 * var(--s));
  height: calc(1117 * var(--s));
  background: rgba(0, 0, 0, 0.2);
}

.about__grid img {
  position: absolute;
  /* Figma's soft-light shows white lines over black; CSS soft-light would hide them entirely. */
  opacity: var(--grid-opacity, 0.5);
}

.about__grid-outer {
  left: calc(142 * var(--s));
  top: calc(192 * var(--s));
  width: calc(1443.495 * var(--s));
  height: calc(666.726 * var(--s));
}

.about__grid-inner {
  left: calc(151.71 * var(--s));
  top: calc(201.71 * var(--s));
  width: calc(1424.076 * var(--s));
  height: calc(647.307 * var(--s));
}

.about__title,
.about__body,
.about__more {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text);
  line-height: normal;
  text-shadow: 0 calc(1.374 * var(--s)) calc(37.995 * var(--s)) #000;
}

.about__title {
  top: calc(509 * var(--s));
  font-family: var(--font-display);
  font-weight: 200;
  font-size: calc(27.483 * var(--s));
  white-space: nowrap;
}

.about__body {
  top: calc(555.03 * var(--s));
  width: calc(669.898 * var(--s));
  font-family: var(--font-arabic);
  font-weight: 900;
  font-size: calc(21.986 * var(--s));
}

.about__more {
  top: calc(947 * var(--s));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(4.5 * var(--s));
  font-family: var(--font-arabic);
  font-size: max(11px, calc(13 * var(--s)));
}

/* 16.5×7.36 arrow turned to point down */
.about__more img {
  width: calc(16.5 * var(--s));
  height: calc(7.36396 * var(--s));
  margin-top: calc(4.57 * var(--s));
  transform: rotate(90deg);
}

/* ───────── Services ───────── */

.services {
  background: var(--black);
  color: var(--ice);
}

.services__stage {
  height: calc(1490 * var(--s));
}

.services__kicker,
.services__title {
  position: absolute;
  right: calc(200 * var(--s));
  font-family: var(--font-arabic);
  font-weight: 900;
  line-height: normal;
  text-align: right;
  white-space: nowrap;
}

.services__kicker {
  top: calc(154 * var(--s));
  font-size: calc(40 * var(--s));
}

.services__title {
  top: calc(179 * var(--s));
  font-size: calc(164 * var(--s));
}

.services__rule {
  position: absolute;
  left: calc(104.5 * var(--s));
  top: calc(461 * var(--s));
  width: calc(1519 * var(--s));
  height: 1px;
}

.services__list {
  position: absolute;
  left: calc(94.5 * var(--s));
  top: calc(563 * var(--s));
  width: calc(1539 * var(--s));
  display: flex;
  flex-direction: column;
  gap: calc(28 * var(--s));
}

.service {
  display: flex;
  flex-direction: column;
  gap: calc(50 * var(--s));
}

.service__row {
  width: calc(1484 * var(--s));
  padding: 0 calc(10 * var(--s));
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: normal;
  text-align: right;
}

.service__desc {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: calc(6 * var(--s));
}

.service--wide-en .service__desc {
  align-items: center;
}

.service__desc-ar {
  font-family: var(--font-arabic);
  font-size: calc(30.638 * var(--s));
  white-space: nowrap;
}

.service__desc-en {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: calc(19.149 * var(--s));
  letter-spacing: calc(-0.383 * var(--s));
  white-space: nowrap;
}

.service__desc-en--flat {
  letter-spacing: 0;
}

.service--wide-en .service__desc-en {
  font-size: calc(22.979 * var(--s));
  letter-spacing: 0;
}

.service__name {
  width: calc(229 * var(--s));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
}

.service__name-en {
  display: flex;
  align-items: flex-end;
  gap: calc(7 * var(--s));
  font-family: var(--font-display);
  font-weight: 300;
  font-size: calc(24 * var(--s));
}

.service__num {
  font-size: calc(18 * var(--s));
}

.service__name-ar {
  font-family: var(--font-arabic);
  font-weight: 900;
  font-size: calc(40 * var(--s));
}

.service__rule {
  width: calc(1539 * var(--s));
  height: calc(20 * var(--s));
}

/* ───────── Process ───────── */

.process {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  color: #0e0e0e;
}

.process__bg {
  position: absolute;
  left: calc(50% - 1123 * var(--s));
  top: calc(-7 * var(--s));
  width: calc(2246 * var(--s));
  height: calc(1264 * var(--s));
  /* Softened to 60%: full strength read too heavy, Figma's 35% made the lines vanish. */
  opacity: 0.6;
  pointer-events: none;
}

.process__stage {
  height: calc(2269 * var(--s));
}

/* 252.401×191.927 rotated -5.09deg; rotated bounds centre at (864.2, 300.8) */
.process__mark {
  position: absolute;
  left: calc(864.21 * var(--s));
  top: calc(300.78 * var(--s));
  width: calc(252.401 * var(--s));
  height: calc(191.927 * var(--s));
  transform: translate(-50%, -50%) rotate(-5.09deg);
}

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

.process__title,
.process__sub {
  position: absolute;
  transform: translateX(-50%);
  text-align: center;
  line-height: 1.326;
}

.process__title {
  left: calc(863.5 * var(--s));
  top: calc(395 * var(--s));
  width: calc(749 * var(--s));
  font-family: var(--font-display);
  font-weight: 300;
  font-size: calc(40 * var(--s));
  color: #000;
}

.process__title strong {
  font-weight: 600;
}

.process__sub {
  left: calc(863 * var(--s));
  top: calc(505 * var(--s));
  font-family: var(--font-arabic);
  font-weight: 300;
  font-size: calc(22 * var(--s));
  white-space: nowrap;
}

.step {
  --w: 1662;
  position: absolute;
  width: calc(var(--w) * var(--s));
  height: calc(884 * var(--s));
  color: var(--card-fg);
}

/* Two motion layers (see "Steps scroll" in Motion): the swing straightens the card as it
   enters, the card tilts away as it leaves. */
.step__swing,
.step__card {
  position: relative;
  width: 100%;
  height: 100%;
}

.step__card {
  overflow: hidden;
  border-radius: calc(25 * var(--s));
  background: var(--card-bg);
}

.step--ask {
  --card-bg: var(--lime);
  --card-fg: #222020;
  --num-fg: #e0fea5;
  --label-fg: #0e0e0e;
  --tag-bg: #f8f6f5;
  --tag-fg: var(--grey);
  --num-x: 1347.5;
  --title-x: 1415;
  --label-x: 1477.5;
  --ar-right: 896;
  left: calc(100.78 * var(--s));
  top: calc(670.06 * var(--s));
  transform: rotate(-0.63deg);
}

.step--define {
  --card-bg: var(--plum);
  --card-fg: var(--lime);
  --num-fg: #240842;
  --num-x: 1347;
  --title-x: 1310;
  --label-x: 1477.5;
  left: calc(-84.38 * var(--s));
  top: calc(984.84 * var(--s));
  transform: rotate(0.47deg);
}

.step--make {
  --card-bg: var(--violet);
  --card-fg: #fff;
  --num-fg: #a371ff;
  --num-x: 1347;
  --title-x: 1345;
  --label-x: 1472.5;
  left: calc(82.36 * var(--s));
  top: calc(1321.07 * var(--s));
  transform: rotate(-0.84deg);
}

.step--launch {
  --w: 1889;
  --card-bg: #000;
  --card-fg: #fff;
  --num-fg: #262626;
  --num-x: 1544.5;
  --title-x: 1498;
  --label-x: 1699.5;
  --ar-right: 997;
  --en-left: 387;
  --tags-left: 392;
  left: calc(-81 * var(--s));
  top: calc(1629 * var(--s));
  /* +1px hides the sub-pixel seam against the section's bottom edge */
  height: calc(640 * var(--s) + 1px);
}

.step__num,
.step__label,
.step__title {
  position: absolute;
  transform: translateX(-50%);
  line-height: 1.326;
  text-align: center;
  white-space: nowrap;
}

.step__num {
  left: calc(var(--num-x) * var(--s));
  top: calc(-264 * var(--s));
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: calc(700 * var(--s));
  letter-spacing: calc(-14 * var(--s));
  color: var(--num-fg);
}

.step__head,
.step__copy {
  display: contents;
}

.step__label {
  left: calc(var(--label-x) * var(--s));
  top: calc(61 * var(--s));
  font-family: var(--font-arabic);
  font-weight: 300;
  font-size: calc(48 * var(--s));
  color: var(--label-fg, var(--card-fg));
}

.step__title {
  left: calc(var(--title-x) * var(--s));
  top: calc(101 * var(--s));
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(96 * var(--s));
}

.step__tags {
  position: absolute;
  left: calc(var(--tags-left, 165) * var(--s));
  top: calc(92 * var(--s));
  display: flex;
}

.step__tags li {
  width: calc(154 * var(--s));
  height: calc(33 * var(--s));
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(34 * var(--s));
  background: var(--tag-bg, rgba(248, 246, 245, 0.07));
  color: var(--tag-fg, var(--text));
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: max(9px, calc(15 * var(--s)));
  line-height: 1.326;
  letter-spacing: calc(-0.3 * var(--s));
  white-space: nowrap;
}

.step__copy-ar {
  position: absolute;
  right: calc(var(--ar-right, 900) * var(--s));
  top: calc(187 * var(--s));
  font-family: var(--font-arabic);
  font-size: calc(30.638 * var(--s));
  line-height: normal;
  text-align: right;
  white-space: nowrap;
}

.step__copy-en {
  position: absolute;
  left: calc(var(--en-left, 160) * var(--s));
  top: calc(225 * var(--s));
  width: calc(636 * var(--s));
  font-family: var(--font-display);
  font-weight: 300;
  font-size: calc(19.149 * var(--s));
  line-height: normal;
  letter-spacing: calc(-0.383 * var(--s));
}

/* ───────── Work ───────── */

.work {
  overflow: hidden;
  background: var(--black);
  color: var(--ice);
}

.work__stage {
  height: calc(2093 * var(--s));
}

.work__head {
  position: absolute;
  /* Raised 48px from Figma's 104 and layered over the cards, so the first card's glass blur
     (and its parallax drift) never covers the last line */
  z-index: 2;
  left: calc(116 * var(--s));
  top: calc(56 * var(--s));
  width: calc(1496 * var(--s));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  white-space: nowrap;
}

.work__title {
  position: relative; /* anchors its flow-title canvas */
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(48 * var(--s));
  line-height: 1.326;
}

.work__kicker {
  display: flex;
  align-items: flex-end;
  gap: calc(12 * var(--s));
  font-family: var(--font-display);
  font-size: max(11px, calc(19.149 * var(--s)));
  letter-spacing: calc(-0.383 * var(--s));
  line-height: normal;
}

.work-card {
  --bw: 499.868;
  position: absolute;
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(5.136px);
  -webkit-backdrop-filter: blur(5.136px);
}

.work-card__media {
  position: absolute;
  object-fit: cover;
}

.work-card__label {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.326;
  white-space: nowrap;
}

.work-card--ai-model,
.work-card--3d {
  left: calc(116 * var(--s));
  width: calc(499.868 * var(--s));
  height: calc(855.938 * var(--s));
}

.work-card--ai-model {
  top: calc(272 * var(--s));
}

.work-card--3d {
  top: calc(1165 * var(--s));
}

.work-card--ai-model .work-card__media,
.work-card--3d .work-card__media {
  left: calc(30.13 * var(--s));
  top: calc(32.87 * var(--s));
  width: calc(444.103 * var(--s));
  height: calc(789.517 * var(--s));
}

.work-card--ai-model .work-card__label,
.work-card--3d .work-card__label {
  left: calc(42.45 * var(--s));
  top: calc(761.44 * var(--s));
  font-size: calc(27.39 * var(--s));
}

.work-card--editing {
  left: calc(632 * var(--s));
  top: calc(291 * var(--s));
  width: calc(980 * var(--s));
  height: calc(550.314 * var(--s));
  backdrop-filter: blur(3.302px);
  -webkit-backdrop-filter: blur(3.302px);
}

.work-card--editing .work-card__media {
  left: calc(22.01 * var(--s));
  top: calc(21.13 * var(--s));
  width: calc(935.975 * var(--s));
  height: calc(508.05 * var(--s));
}

.work-card--editing .work-card__label {
  left: calc(43.14 * var(--s));
  top: calc(489.56 * var(--s));
  font-size: calc(17.61 * var(--s));
}

.work-card--scene {
  left: calc(645 * var(--s));
  top: calc(899 * var(--s));
  width: calc(365 * var(--s));
  height: calc(625 * var(--s));
  backdrop-filter: blur(3.75px);
  -webkit-backdrop-filter: blur(3.75px);
}

.work-card--scene .work-card__media {
  left: calc(22 * var(--s));
  top: calc(24 * var(--s));
  width: calc(324 * var(--s));
  height: calc(577 * var(--s));
}

.work-card--scene .work-card__label {
  left: calc(31 * var(--s));
  top: calc(556 * var(--s));
  font-size: calc(20 * var(--s));
}

.work-card--graphics {
  left: calc(1040 * var(--s));
  top: calc(899 * var(--s));
  width: calc(578.018 * var(--s));
  height: calc(989.756 * var(--s));
  backdrop-filter: blur(5.939px);
  -webkit-backdrop-filter: blur(5.939px);
}

.work-card--graphics .work-card__media {
  left: calc(34.84 * var(--s));
  top: calc(38.01 * var(--s));
  width: calc(513.535 * var(--s));
  height: calc(912.951 * var(--s));
}

.work-card--graphics .work-card__label {
  left: calc(49.09 * var(--s));
  top: calc(880.49 * var(--s));
  font-size: calc(31.672 * var(--s));
}

.work__partner {
  position: absolute;
  left: calc(604.38 * var(--s));
  top: calc(1541 * var(--s));
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.99;
  white-space: nowrap;
}

.work__partner-1 {
  font-size: calc(54 * var(--s));
}

.work__partner-2 {
  font-size: calc(74.25 * var(--s));
}

.work__partner-3 {
  font-size: calc(59.625 * var(--s));
}

.cta {
  position: absolute;
  left: calc(646 * var(--s));
  top: calc(1889 * var(--s));
  width: calc(365 * var(--s));
  height: calc(98 * var(--s));
  overflow: hidden;
  background: #2d3334;
}

.cta:hover {
  opacity: 1;
}

.cta__text {
  position: absolute;
  left: calc(18 * var(--s));
  top: calc(53 * var(--s));
  font-family: var(--font-display);
  font-size: calc(27.39 * var(--s));
  line-height: 1.326;
  white-space: nowrap;
}

/* 15.6×14.73 arrow rotated -38.04deg, centred at (344.75, 15.5); its layers stack in one cell */
.cta__arrow {
  position: absolute;
  left: calc(344.75 * var(--s));
  top: calc(15.5 * var(--s));
  width: calc(15.604 * var(--s));
  height: calc(14.7279 * var(--s));
  display: grid;
  transform: translate(-50%, -50%);
}

.cta__arrow-layer {
  grid-area: 1 / 1;
  background: var(--ice);
  -webkit-mask: url(assets/arrow-ne.svg) center / contain no-repeat;
  mask: url(assets/arrow-ne.svg) center / contain no-repeat;
  transform: rotate(-38.04deg);
  transition:
    translate 0.75s var(--ease-out),
    opacity 0.4s var(--ease-out);
}

.cta__arrow-layer.is-main {
  z-index: 3;
}

.cta__arrow-layer:not(.is-main) {
  opacity: 0;
  transform: translate(-100%, 100%) rotate(-38.04deg);
}

.cta__arrow-layer.is-first { background: var(--lime); }
.cta__arrow-layer.is-second { background: #5b6cff; } /* the blue on the chrome Q's edges */
.cta__arrow-layer.is-third { background: var(--violet); }

@media (hover: hover) and (pointer: fine) {
  .cta:is(:hover, :focus-visible) .cta__arrow-layer {
    translate: 100% -100%;
    opacity: 0;
  }

  .cta:is(:hover, :focus-visible) .cta__arrow-layer:is(.is-first, .is-second, .is-third) {
    transition-delay: calc((4 - var(--i)) * 0.052s);
    opacity: 1;
  }

  .cta:is(:hover, :focus-visible) .cta__arrow-layer.is-reveal {
    opacity: 1;
  }
}

/* ───────── Clients ───────── */

.clients {
  overflow: hidden;
  background: var(--black);
}

.clients__stage {
  height: calc(622 * var(--s));
}

.clients__row {
  position: absolute;
}

.clients__row--a {
  left: calc(-121 * var(--s));
  top: calc(79 * var(--s));
}

.clients__row--b {
  left: calc(-165 * var(--s));
  top: calc(311 * var(--s));
}

.clients__track {
  display: flex;
  align-items: center;
  width: max-content;
}

.logo-tile {
  position: relative;
  flex: none;
  width: calc(225 * var(--s));
  height: calc(212 * var(--s));
  overflow: hidden;
  margin-right: calc(23 * var(--s));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* White client logos (assets/clients); each one's width is set inline for equal visual weight */
.logo-tile img {
  height: auto;
  max-height: 54%;
  object-fit: contain;
}

/* Blurred ellipse (686×1178 at 521,-182) whose SVG bleeds 25.6% / 14.91% for the blur */
.clients__glow {
  position: absolute;
  left: calc(345.38 * var(--s));
  top: calc(-357.6 * var(--s));
  width: calc(1037.2 * var(--s));
  height: calc(1529.2 * var(--s));
  pointer-events: none;
}

.clients__title {
  position: absolute;
  left: calc(562.53 * var(--s));
  top: calc(234 * var(--s));
  width: calc(601.935 * var(--s));
  font-family: var(--font-display);
  font-weight: 900;
  font-size: calc(74.408 * var(--s));
  line-height: normal;
  text-align: center;
  color: var(--ice);
}

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

.contact {
  overflow: hidden;
  background: var(--black);
}

.contact__stage {
  height: calc(905 * var(--s));
}

.contact__bar {
  position: absolute;
  left: calc(122 * var(--s));
  top: calc(65 * var(--s));
  width: calc(1475 * var(--s));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.nav--footer {
  margin-top: calc(2 * var(--s));
}

.contact__intro {
  position: absolute;
  left: calc(122 * var(--s));
  top: calc(245 * var(--s));
  width: calc(523 * var(--s));
  color: var(--text);
  line-height: normal;
}

.contact__ar {
  width: calc(368 * var(--s));
  font-family: var(--font-arabic);
  font-size: calc(30.638 * var(--s));
  white-space: nowrap;
}

.contact__title {
  margin-top: calc(4 * var(--s));
  font-family: var(--font-display);
  font-weight: 200;
  font-size: calc(36 * var(--s));
}

.contact__details,
.contact__located {
  position: absolute;
  left: calc(122 * var(--s));
  width: calc(224 * var(--s));
  display: flex;
  flex-direction: column;
  font-family: var(--font-arabic);
  line-height: normal;
}

.contact__details {
  top: calc(419 * var(--s));
  gap: calc(14 * var(--s));
  font-size: calc(24 * var(--s));
  color: var(--grey);
}

.contact__located {
  top: calc(532 * var(--s));
  gap: calc(4 * var(--s));
}

.contact__located-label {
  font-size: calc(24 * var(--s));
  color: var(--grey);
}

.contact__countries {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: max(11px, calc(15 * var(--s)));
  color: var(--ice);
  white-space: nowrap;
}

.contact-form {
  position: absolute;
  left: calc(955 * var(--s));
  top: calc(293 * var(--s));
  width: calc(642 * var(--s));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(15 * var(--s));
  font-family: var(--font-arabic);
  font-size: max(13px, calc(16 * var(--s)));
  line-height: normal;
}

.field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: calc(5 * var(--s));
}

.field__label {
  color: #818181;
}

.field__input {
  width: 100%;
  height: max(40px, calc(48 * var(--s)));
  padding: 0 calc(40 * var(--s));
  border: 0;
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.field__input::placeholder {
  color: #3b3b3b;
}

.contact-form__submit {
  width: calc(171 * var(--s));
  min-width: 120px;
  height: max(34px, calc(38 * var(--s)));
  margin-top: calc(12 * var(--s));
  border: 0;
  border-radius: 0;
  background: var(--text);
  color: #000;
  font: inherit;
  cursor: pointer;
}

.contact-form__submit:hover {
  background: #fff;
}

.contact__rule {
  position: absolute;
  left: calc(864 * var(--s) - 50vw);
  top: calc(664 * var(--s));
  width: 100vw;
  height: 1px;
}

.contact__logo {
  position: absolute;
  left: calc(122 * var(--s));
  top: calc(715 * var(--s));
  width: calc(112.349 * var(--s));
  height: calc(70 * var(--s));
}

.contact__copy,
.contact__social {
  position: absolute;
  font-family: var(--font-arabic);
  font-size: max(11px, calc(16 * var(--s)));
  line-height: normal;
  white-space: nowrap;
  color: var(--grey);
}

.contact__copy {
  right: calc(135 * var(--s));
  top: calc(749 * var(--s));
}

.contact__social {
  left: calc(1318 * var(--s));
  top: calc(785 * var(--s));
  display: flex;
  gap: calc(33 * var(--s));
}

/* ───────── Phone ───────── */

@media (max-width: 767px) {
  :root {
    --s: 1px;
  }

  .stage {
    width: auto;
    height: auto;
    padding: 96px 16px;
  }

  .site-header {
    top: 24px;
    left: 16px;
    right: 16px;
    width: auto;
  }

  .brand {
    width: auto;
    height: 25px;
    gap: 6px;
  }

  .brand__mark {
    width: 40px;
    height: 25px;
  }

  .brand__name {
    font-size: 11px;
  }

  .site-header,
  .contact__bar {
    gap: 12px;
  }

  .nav,
  .nav--footer {
    gap: 10px;
    font-size: 10px;
  }

  .hero {
    --u: calc(100vw / 820);
  }

  .hero__mark {
    top: 40%;
    width: min(78vw, 420px);
  }

  .hero__headline {
    left: 16px;
    right: 16px;
    bottom: 120px;
    width: auto;
  }

  .hero__headline-ar {
    font-size: clamp(30px, 9vw, 44px);
    line-height: 1.25;
  }

  .hero__headline-en-1 {
    font-size: clamp(28px, 8.4vw, 42px);
    line-height: 1.36;
    margin-bottom: -0.35em;
  }

  .hero__headline-en-2 {
    font-size: clamp(26px, 7.7vw, 38px);
    line-height: 1.36;
  }

  .hero__meta {
    bottom: 40px;
  }

  /* About */
  .about__stage {
    min-height: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
  }

  .about__itar {
    left: 50%;
    top: 45%;
    width: 300px;
    height: 375px;
  }

  .about__shade,
  .about__grid {
    display: none;
  }

  .about__title,
  .about__body,
  .about__more {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
  }

  .about__title {
    font-size: 18px;
    white-space: normal;
  }

  .about__body {
    font-size: 18px;
  }

  .about__more {
    margin-top: 48px;
  }

  /* Services */
  .services__kicker,
  .services__title,
  .services__rule,
  .services__list {
    position: static;
  }

  .services__kicker {
    font-size: 24px;
  }

  .services__title {
    font-size: clamp(48px, 15vw, 72px);
    line-height: 1;
    white-space: normal;
  }

  .services__rule {
    width: 100%;
    margin: 40px 0;
  }

  .services__list {
    width: 100%;
    gap: 24px;
  }

  .service {
    gap: 24px;
  }

  .service__row {
    width: 100%;
    padding: 0;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 12px;
  }

  .service__desc,
  .service--wide-en .service__desc {
    align-items: flex-end;
  }

  .service__desc-ar,
  .service__desc-en,
  .service__name {
    white-space: normal;
    width: auto;
  }

  .service__desc-ar {
    font-size: 20px;
  }

  .service__desc-en,
  .service--wide-en .service__desc-en {
    font-size: 14px;
  }

  .service__name-en {
    font-size: 18px;
  }

  .service__num {
    font-size: 14px;
  }

  .service__name-ar {
    font-size: 30px;
  }

  .service__rule {
    width: 100%;
    height: 20px;
  }

  /* Process */
  .process__bg {
    left: 0;
    width: 100%;
    height: 640px;
  }

  .process__stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .process__mark,
  .process__title,
  .process__sub {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
  }

  .process__mark {
    width: 180px;
    height: 137px;
    transform: rotate(-5.09deg);
  }

  .process__title {
    width: 100%;
    font-size: 26px;
  }

  /* Let the headings wrap naturally instead of at the desktop line breaks */
  .process__title br,
  .work__title br {
    display: none;
  }

  .process__sub {
    font-size: 18px;
    white-space: normal;
  }

  .steps {
    width: 100%;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .step {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
  }

  .step__swing,
  .step__card {
    height: auto;
  }

  .step__card {
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-radius: 20px;
  }

  .step--launch {
    margin: 0 -16px -96px;
  }

  .step--launch .step__card {
    padding-bottom: 96px;
    border-radius: 20px 20px 0 0;
  }

  .step__num {
    left: auto;
    right: -12px;
    top: -60px;
    transform: none;
    font-size: 220px;
    letter-spacing: -4px;
  }

  .step__head {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .step__label,
  .step__title {
    position: static;
    transform: none;
  }

  .step__label {
    font-size: 28px;
  }

  .step__title {
    font-size: 48px;
    line-height: 1.1;
  }

  .step__tags {
    position: relative;
    left: auto;
    top: auto;
    flex-wrap: wrap;
    gap: 6px;
  }

  .step__tags li {
    width: auto;
    height: 30px;
    padding: 0 14px;
    font-size: 13px;
  }

  .step__copy {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  .step__copy-ar,
  .step__copy-en {
    position: static;
    width: auto;
    white-space: normal;
  }

  .step__copy-ar {
    font-size: 20px;
  }

  .step__copy-en {
    align-self: stretch;
    font-size: 14px;
  }

  /* Work */
  .work__stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: row dense;
    gap: 12px;
  }

  .work__head,
  .work-card,
  .work__partner,
  .cta {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
  }

  .work__head {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .work__title {
    font-size: clamp(20px, 6vw, 30px);
    white-space: normal;
  }

  .work-card {
    aspect-ratio: 9 / 16;
  }

  .work-card--editing {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
  }

  .work-card .work-card__media {
    left: 8px;
    top: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
  }

  .work-card .work-card__label {
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 16px;
    font-size: 14px;
    line-height: 1.2;
    white-space: normal;
  }

  .work__partner {
    grid-column: 1 / -1;
    margin-top: 32px;
  }

  .work__partner-1 {
    font-size: 30px;
  }

  .work__partner-2 {
    font-size: 42px;
  }

  .work__partner-3 {
    font-size: 34px;
  }

  .cta {
    grid-column: 1 / -1;
    height: 88px;
  }

  .cta__text {
    top: auto;
    bottom: 12px;
    font-size: 24px;
  }

  .cta__arrow {
    left: auto;
    right: 12px;
    top: 16px;
    transform: none;
  }

  /* Clients */
  .clients__stage {
    height: 380px;
    padding: 0;
  }

  .clients__row--a {
    left: -60px;
    top: 40px;
  }

  .clients__row--b {
    left: -110px;
    top: 200px;
  }

  .logo-tile {
    width: 150px;
    height: 141px;
  }


  .clients__glow {
    left: 50%;
    top: -200px;
    width: 520px;
    height: 780px;
    transform: translateX(-50%);
  }

  .clients__title {
    left: 0;
    right: 0;
    top: 50%;
    width: auto;
    transform: translateY(-50%);
    font-size: 40px;
  }

  /* Contact */
  .contact__stage {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-top: 40px;
  }

  .contact__bar,
  .contact__intro,
  .contact__details,
  .contact__located,
  .contact-form,
  .contact__logo,
  .contact__copy,
  .contact__social {
    position: static;
    width: auto;
  }

  .contact__bar {
    margin-bottom: 32px;
  }

  .contact__logo {
    width: 90px;
    height: 56px;
  }

  .contact__ar {
    width: auto;
    font-size: 24px;
    white-space: normal;
  }

  .contact__title {
    font-size: 28px;
  }

  .contact__details,
  .contact__located-label {
    font-size: 20px;
  }

  .contact__countries {
    flex-wrap: wrap;
  }

  .field__input {
    padding: 0 16px;
  }

  .contact__rule {
    position: static;
    width: auto;
    margin: 0 -16px;
  }

  .contact__copy,
  .contact__social {
    white-space: normal;
  }

  .contact__social {
    order: 10;
  }
}

/* ───────── Motion ─────────
   Offsets use the independent `translate` / `rotate` / `scale` properties so they compose
   with the layout transforms (centring, card tilts) instead of overwriting them. */

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-duration: 1000ms;
}

/* Hero intro */
.js .site-header {
  animation: rise-in 900ms var(--ease-out) 900ms both;
}

.js .hero__mark {
  animation:
    mark-settle 1600ms var(--ease-out) 100ms both,
    mark-float 7s ease-in-out 1700ms infinite;
}

.js .hero__headline-ar,
.js .hero__headline-en-1,
.js .hero__headline-en-2,
.js .hero__pillars,
.js .hero__tagline {
  animation: rise-in 1100ms var(--ease-out) both;
}

.js .hero__headline-ar { animation-delay: 700ms; }
.js .hero__headline-en-1 { animation-delay: 820ms; }
.js .hero__headline-en-2 { animation-delay: 940ms; }
.js .hero__pillars { animation-delay: 1000ms; }
.js .hero__tagline { animation-delay: 1100ms; }

@keyframes rise-in {
  from {
    opacity: 0;
    translate: 0 24px;
  }
}

@keyframes mark-settle {
  from {
    opacity: 0;
    scale: 0.82;
    rotate: 9deg;
  }
}

@keyframes mark-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 calc(-14 * var(--u));
  }
}

/* Scroll reveals (data-reveal is added by main.js) */
.js [data-reveal] {
  opacity: 0;
  translate: 0 40px;
  transition:
    opacity var(--reveal-duration) var(--ease-out),
    translate var(--reveal-duration) var(--ease-out),
    rotate var(--reveal-duration) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  translate: 0 0;
  rotate: 0deg;
}

/* Steps scroll (after 1minus1.com's services cards): main.js sets --enter / --exit (0–1) from
   scroll. Entering, a card swings in from ±8deg and a 10% sideways shift around its top corner;
   leaving, it tilts the opposite way around the middle of the same side. Pivots alternate sides. */
.step {
  --swing: -8deg;
  --shift: 10%;
  --pivot: right;
}

.step--define,
.step--launch {
  --swing: 8deg;
  --shift: -10%;
  --pivot: left;
}

.step__swing {
  transform-origin: var(--pivot) top;
  rotate: calc(var(--swing) * (1 - var(--enter, 1)));
  translate: calc(var(--shift) * (1 - var(--enter, 1))) 0;
  will-change: rotate, translate;
}

.step__card {
  transform-origin: var(--pivot) center;
  rotate: calc(var(--swing) * -1 * var(--exit, 0));
  will-change: rotate;
}

/* Logo wall: rows drift in opposite directions (tracks are duplicated in main.js) */
.clients__track {
  animation: marquee 48s linear infinite;
}

.clients__row--b .clients__track {
  animation-direction: reverse;
  animation-duration: 56s;
}

@keyframes marquee {
  to {
    translate: -50% 0;
  }
}

/* Hover */
@media (hover: hover) {
  /* Service rows invert on hover: a light panel wipes up behind the row and the text turns dark */
  .service__row {
    position: relative;
    isolation: isolate;
    transition: color 0.35s var(--ease-out);
  }

  .service__row::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: calc(-25 * var(--s)) calc(-14 * var(--s));
    background: var(--ice);
    clip-path: inset(100% 0 0 0);
    transition: clip-path 0.45s var(--ease-out);
  }

  .service:hover .service__row {
    color: var(--black);
  }

  .service:hover .service__row::before {
    clip-path: inset(0 0 0 0);
  }

  .work-card {
    overflow: hidden;
  }

  .work-card__media {
    transition: scale 0.8s var(--ease-out);
  }

  .work-card:hover .work-card__media {
    scale: 1.04;
  }

  .step__tags li {
    transition: translate 0.3s var(--ease-out);
  }

  .step__tags li:hover {
    translate: 0 -3px;
  }
}

/* Parallax: main.js sets --py / --px per layer from scroll position */
.hero__bg,
.hero__headline,
.hero__meta,
.about__grid,
.process__bg,
.work-card--ai-model,
.work-card--3d,
.work-card--graphics,
.clients__title,
.clients__glow {
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}

.hero__mark {
  transform: translate3d(0, var(--py, 0px), 0) translate(-50%, -50%) rotate(-5.09deg);
  will-change: transform;
}

.about__itar {
  transform: translate3d(0, var(--py, 0px), 0) translate(-50%, -50%) rotate(15.76deg);
  will-change: transform;
}

.process__mark {
  transform: translate3d(0, var(--py, 0px), 0) translate(-50%, -50%) rotate(-5.09deg);
}

.step__num {
  transform: translate3d(0, var(--py, 0px), 0) translateX(-50%);
}

.services {
  overflow-x: clip;
}

.services__title {
  transform: translate3d(var(--px, 0px), 0, 0);
  will-change: transform;
}

@media (max-width: 767px) {
  .process__mark {
    transform: translate3d(0, var(--py, 0px), 0) rotate(-5.09deg);
  }

  .step__num {
    transform: translate3d(0, var(--py, 0px), 0);
  }

  .clients__title {
    transform: translate3d(0, var(--py, 0px), 0) translateY(-50%);
  }

  .clients__glow {
    transform: translate3d(0, var(--py, 0px), 0) translateX(-50%);
  }
}

/* Flow titles (main.js): the WebGL canvas draws the title; the live text stays for
   screen readers and search, with only its fill hidden. */
.flow-title--live,
.flow-title--live * {
  -webkit-text-fill-color: transparent;
}

.flow-title__canvas {
  position: absolute;
  pointer-events: none;
}

@media (max-width: 767px) {
  /* Anchor for the canvas; reset the desktop offsets, which relative positioning would apply */
  .services__title {
    position: relative;
    top: auto;
    right: auto;
  }
}

/* Text roll on buttons and nav links (after supersolid.agency): main.js doubles the label; on
   hover the label slides up and blurs out while its copy rises in from 85% scale. */
.roll {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.roll__text,
.roll__dup {
  display: inline-block;
  transition:
    transform 0.75s var(--ease-out),
    filter 0.4s var(--ease-out);
}

.roll__dup {
  position: absolute;
  left: 0;
  top: 0;
  transform: scale(0.85) translateY(105%);
}

.roll-host:hover {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .roll-host:is(:hover, :focus-visible) .roll__text {
    transform: translateY(-120%);
    filter: blur(3px);
  }

  .roll-host:is(:hover, :focus-visible) .roll__dup {
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-reveal] {
    opacity: 1;
    translate: none;
    rotate: none;
  }
}
