/* Smart Materials — v4: from the frame to opening day.
   Brand: navy #262261, red #ee4036, orange #faaf40, on a deep night-navy base,
   with warm-sand light sections for the real project photos and client logos. */

:root {
  --bg: #0b0a1f;
  --bg-2: #121130;
  --bg-3: #1a183f;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.08);
  --glass: rgba(14, 12, 36, 0.86);
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #f6f3ee;
  --muted: #b2adc6;
  --navy: #262261;
  --orange: #faaf40;
  --red: #ee4036;
  --sand: #e9d9bf;
  --ink: #160f04;
  --font-head: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Sans Arabic", ui-monospace, monospace;
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
  --gutter: max(20px, calc((100vw - 1240px) / 2));
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.75;
  overflow-x: clip; /* clip, not hidden: hidden would make body a scroll container and break position: sticky */
  -webkit-font-smoothing: antialiased;
}

img,
svg,
canvas {
  max-width: 100%;
  display: block;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

html[lang="ar"] h1,
html[lang="ar"] h2 {
  line-height: 1.35;
  letter-spacing: 0;
}

p {
  margin: 0;
  color: var(--muted);
}

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

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.container {
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 3000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--orange);
  color: var(--ink);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html[lang="ar"] .eyebrow {
  font-family: var(--font-head);
  font-size: 0.92rem;
  letter-spacing: 0;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  transform: rotate(45deg);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s var(--ease);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--text);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}

.btn:hover::after {
  transform: none;
}

.btn-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  color: var(--ink);
  background: var(--orange);
}

.btn-ghost {
  color: var(--text);
  background: rgba(22, 20, 56, 0.72);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

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

.btn-sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.88rem;
}

.section {
  position: relative;
  padding: clamp(64px, 8vw, 110px) 0;
}

.section-head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px 48px;
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section-head h2,
.contact h2,
.profile h2 {
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
}

.section-head > p {
  max-width: 460px;
  justify-self: end;
}

/* ---------- Preloader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}

.js .loader {
  display: block;
}

.js.loader-done .loader {
  display: none;
}

.loader-panel {
  position: absolute;
  inset-inline: 0;
  height: 50.5%;
  background: var(--bg-2);
}

.loader-panel.top {
  top: 0;
}

.loader-panel.bottom {
  bottom: 0;
}

.loader-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  isolation: isolate;
}

/* faint drafting grid behind the drawing */
.loader-center::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}

.loader-build {
  width: min(400px, 82vw);
  overflow: visible;
}

.bf-struct {
  fill: var(--sand);
  opacity: 0.94;
}

.bf-glass {
  fill: rgba(250, 175, 64, 0.32);
}

.bf-sign {
  fill: var(--orange);
}

/* the rising level: the pour line the building fills up to */
.build-pour {
  stroke: var(--orange);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 3px rgba(250, 175, 64, 0.9));
  opacity: 0;
  transition: opacity 0.3s;
}

.build-hook {
  opacity: 0;
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.3;
  transform-box: view-box;
  transform-origin: 232px 16px;
  animation: hook-sway 3.2s ease-in-out infinite alternate;
}

@keyframes hook-sway {
  from {
    transform: rotate(-6deg);
  }
  to {
    transform: rotate(6deg);
  }
}

.loader-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 1.6em;
  font-family: var(--font-head);
  font-size: 0.98rem;
  color: var(--muted);
}

.loader-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  animation: dot-pulse 1.4s ease-out infinite;
}

@keyframes dot-pulse {
  from {
    box-shadow: 0 0 0 0 rgba(250, 175, 64, 0.6);
  }
  to {
    box-shadow: 0 0 0 11px rgba(250, 175, 64, 0);
  }
}

.plan-line {
  fill: none;
  stroke: rgba(246, 243, 238, 0.75);
  stroke-width: 1.3;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.plan-line.accent {
  stroke: var(--orange);
  stroke-width: 2;
}

.plan-line.thin {
  stroke-width: 0.8;
  opacity: 0.55;
}

.loader-logo {
  width: 46px;
  opacity: 0;
}

.loader-meta {
  position: absolute;
  inset-inline: 24px;
  bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  direction: ltr;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.loader-count {
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.8;
  font-weight: 600;
  color: var(--text);
}

.loader-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--red));
  transform: scaleX(0);
  transform-origin: left;
}

.curtain {
  position: fixed;
  inset: 0;
  z-index: 1900;
  background: var(--orange);
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}

/* ---------- Cursor + progress ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1800;
  display: none;
  pointer-events: none;
}

.has-cursor .cursor {
  display: block;
}

.cursor-dot,
.cursor-ring {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--orange);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid rgba(250, 175, 64, 0.6);
  transition: background 0.35s, border-color 0.35s;
}

.cursor.is-hover .cursor-ring {
  background: rgba(250, 175, 64, 0.1);
  border-color: transparent;
}

.scroll-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1100;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--red));
  transform: scaleX(0);
  transform-origin: left;
}

html[dir="rtl"] .scroll-progress {
  transform-origin: right;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: transform 0.5s var(--ease), background 0.4s, border-color 0.4s;
}

.site-header.is-scrolled {
  background: rgba(11, 10, 31, 0.92);
  border-bottom-color: var(--line);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

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

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

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

.brand-name {
  direction: ltr;
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  white-space: nowrap;
}

.brand-name b {
  color: var(--text);
  font-weight: 600;
}

.nav {
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 10, 31, 0.74);
}

.nav a {
  position: relative;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.3s, background 0.3s;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
  background: var(--surface-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch,
.menu-toggle {
  width: 46px;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(11, 10, 31, 0.74);
}

.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  transition: border-color 0.3s;
}

.lang-switch:hover {
  border-color: var(--orange);
}

html[lang="en"] .lang-switch {
  font-family: var(--font-head);
}

.menu-toggle {
  display: none;
  position: relative;
}

.menu-toggle i {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.45s var(--ease), top 0.45s var(--ease);
}

.menu-toggle i:nth-of-type(1) {
  top: 17px;
}

.menu-toggle i:nth-of-type(2) {
  top: 25px;
}

.menu-open .menu-toggle i:nth-of-type(1) {
  top: 21px;
  transform: rotate(45deg);
}

.menu-open .menu-toggle i:nth-of-type(2) {
  top: 21px;
  transform: rotate(-45deg);
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 990;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 30px) 24px 110px;
  background: var(--bg-2);
  clip-path: circle(0% at 50% 0%);
  visibility: hidden;
}

.menu-links {
  display: grid;
  gap: 4px;
}

.menu-links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 7vw, 2.6rem);
  font-weight: 600;
}

.menu-links small {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--orange);
}

.menu-foot {
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  color: var(--muted);
}

/* ---------- Journey ---------- */
.journey {
  position: relative;
  height: 800vh;
}

.journey-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(250, 175, 64, 0.35), transparent 60%),
    linear-gradient(#1f1d52, #6b4a6a 55%, #f0a868 85%, #cbb088 86%);
  transition: opacity 1s;
}

.has-webgl .scene-fallback {
  opacity: 0;
}

.scene-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(11, 10, 31, 0.55), transparent 22%),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(11, 10, 31, 0.45));
}

.scene-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  background: linear-gradient(to left, rgba(11, 10, 31, 0.88), rgba(11, 10, 31, 0.45) 40%, transparent 70%);
}

html[dir="ltr"] .scene-shade::after {
  background: linear-gradient(to right, rgba(11, 10, 31, 0.88), rgba(11, 10, 31, 0.45) 40%, transparent 70%);
}

.is-hero .scene-shade::after {
  opacity: 1;
}

.chapters {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.chapter {
  position: absolute;
  top: 0;
  bottom: 0;
  height: fit-content;
  margin-block: auto;
  width: min(440px, calc(100% - 40px));
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  pointer-events: none;
}

.chapter.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.chapter small {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--orange);
}

html[lang="ar"] .chapter small {
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0;
}

.chapter h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
}

.chapter p {
  color: #d6d2e4;
}

.chapter--start {
  inset-inline-start: var(--gutter);
}

.chapter--end {
  inset-inline-end: var(--gutter);
}

.chapter--center {
  inset-inline: 0;
  width: auto;
  padding: 0 20px;
  border: 0;
  background: none;
  text-align: center;
  transform: scale(0.94);
}

.chapter--center h2 {
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.chapter--center p {
  font-family: var(--font-head);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  color: var(--text);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.chapter--hero {
  inset-inline-start: var(--gutter);
  width: min(640px, calc(100% - 40px));
  padding: 0;
  border: 0;
  background: none;
}

.chapter--hero h1 {
  margin-bottom: 20px;
  font-size: clamp(2.3rem, 4.6vw, 4.4rem);
  font-weight: 800;
}

.chapter--hero h1 em {
  font-style: normal;
  color: var(--orange);
}

.chapter--hero p {
  max-width: 540px;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* Swatch picker in the final chapter */
.picker {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.picker-group {
  display: grid;
  gap: 8px;
}

.picker-group > span {
  font-size: 0.8rem;
  color: var(--muted);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  transition: border-color 0.3s, background 0.3s;
}

html[dir="rtl"] .swatch {
  padding: 5px 5px 5px 12px;
}

.swatch i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.swatch.is-on {
  border-color: var(--orange);
  background: rgba(250, 175, 64, 0.14);
}

.swatch:hover {
  border-color: var(--orange);
}

/* Story rail */
.rail {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 22px;
  display: flex;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 10, 31, 0.84);
  transform: translateX(-50%);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.is-hero .rail {
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
}

.rail button {
  position: relative;
  min-width: 96px;
  padding: 8px 14px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.3s, background 0.3s;
}

.rail button:hover {
  color: var(--text);
}

.rail button.is-on {
  color: var(--text);
  background: var(--surface-2);
}

.rail button i {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-2);
  overflow: hidden;
}

.rail button i b {
  display: block;
  height: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
}

html[dir="rtl"] .rail button i b {
  transform-origin: right;
}

.scroll-hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 24px;
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: translateX(-50%);
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--text);
  transition: opacity 0.5s;
}

.scroll-hint i {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--orange), transparent);
  transform-origin: top;
  animation: cue 1.8s var(--ease) infinite;
}

.journey-sticky:not(.is-hero) .scroll-hint {
  opacity: 0;
}

@keyframes cue {
  0% { transform: scaleY(0); }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  perspective: 1400px;
}

.service {
  --gx: 50%;
  --gy: 50%;
  position: relative;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--bg-3), var(--bg-2));
  transform-style: preserve-3d;
  overflow: hidden;
  transition: border-color 0.4s;
}

.service::before,
.service::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.service::before {
  background-image:
    linear-gradient(rgba(250, 175, 64, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 175, 64, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

.service::after {
  background: radial-gradient(420px circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.12), transparent 45%);
}

.service:hover {
  border-color: rgba(250, 175, 64, 0.4);
}

.service:hover::before,
.service:hover::after {
  opacity: 1;
}

.service > * {
  position: relative;
  z-index: 1;
}

.service-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.service-icon {
  width: 60px;
  height: 60px;
  margin: 18px 0 20px;
  color: var(--orange);
  transform: translateZ(50px);
}

.service h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  transform: translateZ(36px);
}

.service p {
  font-size: 0.95rem;
  transform: translateZ(22px);
}

/* ---------- Before / after ---------- */
.ba {
  --pos: 50%;
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-2);
  user-select: none;
}

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

.ba-before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--text);
  pointer-events: none;
}

.ba-handle i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  font-style: normal;
  font-size: 1.3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
}

.ba-tag {
  position: absolute;
  top: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(11, 10, 31, 0.7);
  font-family: var(--font-head);
  font-size: 0.85rem;
  pointer-events: none;
}

.ba-tag--before {
  left: 18px;
}

.ba-tag--after {
  right: 18px;
}

.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.ba-range:focus-visible ~ .ba-handle i,
.ba:focus-within .ba-handle i {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* ---------- Light sections (projects, clients) ---------- */
.section--light {
  --text: #17152f;
  --muted: #5f5b72;
  --line: rgba(23, 21, 47, 0.1);
  --line-2: rgba(23, 21, 47, 0.2);
  --surface: #ffffff;
  --surface-2: rgba(23, 21, 47, 0.06);
  --accent: #c6392f;
  color: var(--text);
  background: #f4efe7;
}

.section--light .eyebrow {
  color: var(--accent);
}

.section--light + .section--light {
  padding-top: 0;
}

.section--light ::selection {
  background: var(--navy);
  color: #fff;
}

/* ---------- Case study ---------- */
.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
}

.case .ba {
  aspect-ratio: 1;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.case-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-2);
}

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

.case-photo:hover img {
  transform: scale(1.06);
}

.case-n {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(11, 10, 31, 0.78);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--orange);
}

.case-step h3 {
  margin: 12px 0 4px;
  font-size: 1rem;
}

.case-step p {
  font-size: 0.86rem;
  line-height: 1.6;
}

/* ---------- Projects ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filters button {
  position: relative;
  padding: 10px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: none;
  font-family: var(--font-head);
  font-size: 0.9rem;
  color: var(--muted);
  isolation: isolate;
  transition: color 0.3s, border-color 0.3s;
}

.filters button:hover {
  border-color: var(--navy);
  color: var(--text);
}

.filters button.is-active {
  border-color: transparent;
  color: #fff;
}

.filters .pill {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--navy);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1199px) {
  .project--wide {
    grid-column: span 2;
  }

  .project--wide .project-media {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    aspect-ratio: 8 / 3;
  }

  .project--wide .project-alt {
    position: static;
    opacity: 1;
  }
}

.project-open {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  text-align: start;
  box-shadow: 0 0 0 1px var(--line), 0 24px 44px -30px rgba(23, 21, 47, 0.45);
  transition: translate 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.project-open:hover {
  translate: 0 -6px;
  box-shadow: 0 0 0 1px var(--line-2), 0 34px 60px -30px rgba(23, 21, 47, 0.55);
}

.project-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e4ddd2;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease), opacity 0.6s var(--ease);
}

.project-alt {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.project-open:hover .project-media img {
  transform: scale(1.04);
}

.project-open:hover .project-alt {
  opacity: 1;
}

/* Wide screens: four across, so all eight projects fit in two rows */
@media (min-width: 1200px) {
  .project-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .project-body h3 {
    font-size: 1.1rem;
  }
}

/* The featured card shows two photos side by side */

.project-count {
  position: absolute;
  bottom: 12px;
  inset-inline-start: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(11, 10, 31, 0.74);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 22px;
}

.project-place {
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--accent);
}

.project-body h3 {
  font-size: 1.25rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.78rem;
  color: var(--muted);
}

.project-cta {
  display: inline-flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-head);
  font-size: 0.88rem;
  color: var(--navy);
}

.project-cta i {
  font-style: normal;
  transition: transform 0.4s var(--ease);
}

.project-open:hover .project-cta i {
  transform: translate(3px, -3px);
}

html[dir="rtl"] .project-cta i {
  transform: scaleX(-1);
}

html[dir="rtl"] .project-open:hover .project-cta i {
  transform: scaleX(-1) translate(3px, -3px);
}

/* ---------- Clients ---------- */
.client-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.client {
  flex: 0 1 calc(14.28% - 11px);
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 10px 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 20px 40px -30px rgba(23, 21, 47, 0.45);
  transition: translate 0.5s var(--ease);
}

.client:hover {
  translate: 0 -4px;
}

.client img {
  height: 50px;
  width: auto;
  max-width: 92%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.client span {
  font-family: var(--font-head);
  font-size: 0.74rem;
  text-align: center;
  color: var(--muted);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}

.about-copy h2 {
  margin-bottom: 20px;
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
}

.about-copy p {
  max-width: 620px;
  font-size: 1.05rem;
}

.about-cards {
  display: grid;
  gap: 14px;
}

.about-card {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.about-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
  color: var(--orange);
}

.profile-band h3 {
  margin-bottom: 6px;
  font-size: 1.4rem;
}

/* ---------- Project photo viewer ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px clamp(14px, 3vw, 36px) max(20px, env(safe-area-inset-bottom));
  background: rgba(8, 7, 22, 0.95);
}

.lightbox[hidden] {
  display: none;
}

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

.lb-top h3 {
  font-size: 1.2rem;
}

.lb-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.lb-close {
  flex: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  transition: border-color 0.3s;
}

.lb-close:hover {
  border-color: var(--orange);
}

.lb-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  touch-action: pan-y;
}

.lb-stage img {
  width: min(100%, 800px);
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-nav {
  position: absolute;
  top: 50%;
  width: 54px;
  height: 54px;
  margin-top: -27px;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  font-size: 1.9rem;
  line-height: 1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.lb-prev {
  inset-inline-start: 0;
}

.lb-next {
  inset-inline-end: 0;
}

html[dir="rtl"] .lb-nav span {
  display: inline-block;
  transform: scaleX(-1);
}

.lb-thumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
}

.lb-thumbs button {
  flex: none;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: none;
  opacity: 0.5;
  transition: opacity 0.3s, border-color 0.3s;
}

.lb-thumbs button.is-on,
.lb-thumbs button:hover {
  opacity: 1;
}

.lb-thumbs button.is-on {
  border-color: var(--orange);
}

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

/* ---------- Coverage map ---------- */
.coverage {
  background: radial-gradient(ellipse at 70% 50%, rgba(59, 54, 144, 0.35), transparent 60%);
}

.coverage-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}

.coverage-copy h2 {
  margin-bottom: 16px;
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
}

.coverage-copy .btn {
  margin-top: 30px;
}

html[dir="ltr"] .arrow-fwd {
  display: inline-block;
  transform: scaleX(-1);
}

.map {
  margin: 0;
}

.ksa-map {
  width: 100%;
  height: auto;
  direction: ltr;
  overflow: visible;
}

.map-nb {
  fill: rgba(255, 255, 255, 0.035);
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 1;
}

.map-ksa {
  fill: url(#mapFill);
  stroke: var(--orange);
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.map-ksa-dots {
  fill: url(#mapDots);
  stroke: none;
  pointer-events: none;
}

.map-route {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.3;
  stroke-dasharray: 1;
  opacity: 0.42;
}

.map-link {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1;
  stroke-dasharray: 3 6;
  opacity: 0.3;
}

/* Light running out along each route once the map has drawn */
.map-pulse {
  fill: none;
  stroke: #ffd79a;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 0.035 0.965;
  stroke-dashoffset: 1;
  opacity: 0;
}

.ksa-map.is-live .map-pulse {
  opacity: 0.9;
  animation: map-pulse 3.2s linear infinite;
}

@keyframes map-pulse {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.map-node {
  fill: var(--orange);
  stroke: #161444;
  stroke-width: 1.5;
}

/* Ripples spreading from Riyadh: we reach every corner */
.hq-waves circle {
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: hq-wave 3.6s ease-out infinite;
}

@keyframes hq-wave {
  0% { transform: scale(0.2); opacity: 0.55; }
  100% { transform: scale(5.5); opacity: 0; }
}


.pin {
  cursor: default;
}

.pin-dot {
  fill: var(--red);
  stroke: #fff;
  stroke-width: 3;
  transition: fill 0.3s;
}

.pin--hq .pin-dot {
  fill: var(--orange);
}

.pin-ring {
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: pin-pulse 2.6s ease-out infinite;
}

.pin--hq .pin-ring {
  stroke: var(--orange);
}

.pin-label {
  font-family: var(--font-head);
  font-size: 23px;
  font-weight: 600;
  fill: #f6f3ee;
  paint-order: stroke;
  stroke: #161444;
  stroke-width: 6px;
  stroke-linejoin: round;
  transition: fill 0.3s;
}

.pin--hq .pin-label {
  font-size: 26px;
  fill: var(--orange);
}

.pin.is-hot .pin-dot {
  fill: var(--orange);
}

.pin.is-hot .pin-label {
  fill: var(--orange);
}

@keyframes pin-pulse {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ---------- Clients strip (inside projects) ---------- */
.clients-strip {
  margin-top: clamp(44px, 6vw, 70px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
}

.clients-strip h3 {
  margin-bottom: 18px;
  font-size: 1.15rem;
  text-align: center;
}

/* ---------- Features (inside about) ---------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: clamp(28px, 4vw, 44px) 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.feature-list svg {
  flex: none;
  width: 30px;
  height: 30px;
  color: var(--orange);
}

.feature-list span {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
}

.feature-list b {
  display: block;
  margin-bottom: 2px;
  font-family: var(--font-head);
  font-size: 0.98rem;
  color: var(--text);
}

/* ---------- Profile band ---------- */
.profile-band {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 36px;
  align-items: center;
  padding: clamp(28px, 4vw, 50px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: radial-gradient(circle at 10% 50%, rgba(250, 175, 64, 0.16), transparent 40%), var(--bg-2);
}

html[dir="rtl"] .profile-band {
  background: radial-gradient(circle at 90% 50%, rgba(250, 175, 64, 0.16), transparent 40%), var(--bg-2);
}

.profile-mark {
  width: 84px;
}

.profile h2 {
  margin-bottom: 10px;
}

.profile .eyebrow {
  margin-bottom: 10px;
}

/* ---------- Contact ---------- */
.contact {
  background: radial-gradient(circle at 15% 20%, rgba(250, 175, 64, 0.07), transparent 35%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: start;
}

.contact-copy h2 {
  margin-bottom: 16px;
}

.contact-info {
  display: grid;
  gap: 10px;
  margin-top: 32px;
}

.contact-info > * {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 0.3s, translate 0.4s var(--ease);
}

.contact-info a:hover {
  border-color: var(--orange);
  translate: 4px 0;
}

html[dir="rtl"] .contact-info a:hover {
  translate: -4px 0;
}

.contact-info i {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(250, 175, 64, 0.12);
  color: var(--orange);
  font-style: normal;
}

.contact-info span {
  display: grid;
}

.contact-info small {
  font-size: 0.78rem;
  color: var(--muted);
}

.contact-info b {
  font-weight: 500;
}

.quote-form {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--bg-2);
}

.quote-form h3 {
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}

.field {
  position: relative;
  margin-bottom: 14px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 28px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: none;
  outline: none;
  font-size: 1rem;
}

html[dir="rtl"] .field input[dir="ltr"] {
  text-align: right;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
}

.field select option {
  background: var(--bg-2);
}

.field.select::before {
  content: "";
  position: absolute;
  top: 34px;
  inset-inline-end: 4px;
  width: 8px;
  height: 8px;
  border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  pointer-events: none;
}

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

.field label {
  position: absolute;
  top: 26px;
  inset-inline-start: 0;
  color: var(--muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.35s var(--ease), color 0.35s;
}

html[dir="rtl"] .field label {
  transform-origin: right top;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label,
.field select:valid + label {
  transform: translateY(-22px) scale(0.8);
  color: var(--orange);
}

.field::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform 0.5s var(--ease);
}

.field:focus-within::after {
  transform: scaleX(1);
}

.field.invalid::after {
  background: var(--red);
  transform: scaleX(1);
}

/* Visually hidden in place: an off-screen offset would widen the page in RTL */
.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
  pointer-events: none;
}

.submit {
  width: 100%;
  margin-top: 14px;
}

.submit-check {
  position: absolute;
  width: 26px;
  height: 26px;
  opacity: 0;
}

.submit-check path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
}

.form-status {
  min-height: 26px;
  margin-top: 14px;
  font-size: 0.92rem;
}

.form-status.error {
  color: #ff8a80;
}

.form-status.success {
  color: #8ff0b1;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  padding: 80px 0 28px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.7fr;
  gap: 40px;
}

.footer-brand img {
  width: 54px;
  height: auto;
  margin-bottom: 18px;
}

.footer-brand p {
  max-width: 380px;
}

.footer h4 {
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: var(--orange);
}

.footer-grid a {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  transition: color 0.3s;
}

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

.wordmark {
  margin-top: 60px;
  direction: ltr;
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 10.4vw, 10.8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.18);
  background: linear-gradient(90deg, var(--orange), var(--red)) no-repeat;
  background-size: 0% 100%;
  -webkit-background-clip: text;
  background-clip: text;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
  font-size: 0.85rem;
  color: var(--muted);
}

.to-top {
  padding: 8px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: none;
  font-size: 0.85rem;
  transition: border-color 0.3s, color 0.3s;
}

.to-top:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ---------- Floating UI ---------- */
.float-whatsapp {
  position: fixed;
  z-index: 950;
  right: 22px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--ease), opacity 0.4s;
}

.float-whatsapp:hover {
  transform: scale(1.08);
}

html[dir="rtl"] .float-whatsapp {
  right: auto;
  left: 22px;
}

.float-whatsapp svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

/* Hidden during the journey so it doesn't sit on the story */
.in-journey .float-whatsapp {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
}

.mobile-nav {
  display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .rail button {
    min-width: 0;
  }
}

@media (max-width: 960px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .section-head > p {
    justify-self: start;
  }

  .profile-band {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-list,
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-grid,
  .about-grid,
  .coverage-grid {
    grid-template-columns: 1fr;
  }

  .map {
    order: -1;
  }

  .case .ba {
    position: relative;
    top: auto;
    aspect-ratio: 4 / 3;
  }

  .client {
    flex-basis: calc(25% - 9px);
  }
}

@media (max-width: 860px) {
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  body {
    padding-bottom: 76px;
  }

  .brand-name,
  .header-cta,
  .has-cursor .cursor {
    display: none;
  }

  .journey {
    height: 700vh;
  }

  /* Story cards sit at the bottom of the screen on phones */
  .chapter,
  .chapter--start,
  .chapter--end {
    inset-inline: 14px;
    top: auto;
    bottom: 88px;
    margin: 0;
    width: auto;
    padding: 20px 22px;
  }

  .chapter h2 {
    font-size: 1.45rem;
  }

  .chapter p {
    font-size: 0.92rem;
  }

  .chapter--center {
    top: 0;
    bottom: 0;
    margin-block: auto;
    padding: 0 16px;
  }

  .chapter--hero {
    inset-inline: 16px;
    bottom: 92px;
    padding: 0;
  }

  .chapter--hero h1 {
    font-size: clamp(2rem, 8.6vw, 2.6rem);
  }

  .chapter--hero p {
    font-size: 0.95rem;
  }

  .hero-actions .btn {
    flex: 1;
    min-height: 50px;
    padding: 0 16px;
  }

  .is-hero .scene-shade::after,
  html[dir="ltr"] .is-hero .scene-shade::after {
    background: linear-gradient(to top, rgba(11, 10, 31, 0.95) 30%, transparent 70%);
  }

  .rail {
    top: calc(var(--header-h) + 8px);
    bottom: auto;
    gap: 2px;
    padding: 5px;
  }

  .rail button {
    padding: 6px 9px 10px;
    font-size: 0.7rem;
  }

  .rail button i {
    left: 9px;
    right: 9px;
    bottom: 4px;
  }

  /* Colour dots only on phones so the room stays visible */
  .chapter--final .picker {
    gap: 8px;
    margin-top: 12px;
  }

  .picker-group {
    grid-template-columns: 5.5em 1fr;
    align-items: center;
  }

  .swatch,
  html[dir="rtl"] .swatch {
    padding: 3px;
  }

  .swatch-name {
    display: none;
  }

  .swatch i {
    width: 26px;
    height: 26px;
  }

  .scroll-hint {
    display: none;
  }

  .ba {
    aspect-ratio: 3 / 4;
  }

  .float-whatsapp {
    bottom: 88px;
    width: 50px;
    height: 50px;
  }

  .mobile-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 980;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(18, 17, 48, 0.95);
  }

  .mobile-nav a {
    min-height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-family: var(--font-head);
    font-size: 0.78rem;
    color: var(--muted);
  }

  .mobile-nav a.is-active {
    color: var(--text);
    background: var(--surface-2);
  }

  .mobile-nav a.is-cta {
    color: var(--ink);
    background: var(--orange);
  }
}

@media (max-width: 600px) {
  .service-grid {
    grid-template-columns: 1fr;
  }

  /* Phones: compact two-up cards keep the page short */
  .project-grid,
  .feature-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .project-body {
    gap: 4px;
    padding: 12px 12px 14px;
  }

  .project-body h3 {
    font-size: 0.95rem;
  }

  .project-place {
    font-size: 0.74rem;
  }

  .project-tags,
  .project-cta,
  .case-step p {
    display: none;
  }

  .project-count {
    bottom: 8px;
    inset-inline-start: 8px;
    font-size: 0.66rem;
  }

  .feature-list li {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .feature-list span {
    font-size: 0.78rem;
  }


  .project--wide {
    grid-column: auto;
  }

  .project--wide .project-media {
    aspect-ratio: 4 / 3;
    grid-template-columns: 1fr;
  }

  .project--wide .project-alt {
    display: none;
  }

  .case-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 8px;
  }

  .case-step h3 {
    margin-top: 8px;
    font-size: 0.78rem;
  }

  .client {
    flex-basis: calc(33.333% - 8px);
    padding: 12px 6px 10px;
  }

  .client img {
    height: 40px;
  }

  .pin-label {
    font-size: 30px;
  }

  .pin--hq .pin-label {
    font-size: 32px;
  }

  .lb-nav {
    top: auto;
    bottom: 8px;
    width: 46px;
    height: 46px;
    margin: 0;
  }

  .service {
    min-height: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .loader-meta span:first-child {
    display: none;
  }

  .rail button span {
    display: none;
  }

  .rail button.is-on span {
    display: inline;
  }

  .rail button:not(.is-on) {
    width: 26px;
    padding-inline: 0;
  }

  .rail button:not(.is-on) i {
    left: 6px;
    right: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .journey {
    height: auto;
  }

  .journey-sticky {
    position: relative;
  }
}
