/* ==========================================================================
   CloudNex · dark glass
   - Near-black ground. Light comes from brand blue and teal, never from flat fills.
   - Glass surfaces: translucent, hairline border, a light inner top edge, and a
     sheen plus iridescent edge that follow the cursor (--mx / --my, set in main.js).
   - The hero is real glass, rendered live in WebGL2 (assets/js/glass.js).
   - The logo's diagonal (dx/dy = 0.5455, ≈28.6° off vertical) survives in the
     small markers and the hatching behind the hero glass.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Brand */
  --blue: #1a5ffc;
  --blue-hi: #4c83ff;
  --teal: #0bc2ac;
  --teal-hi: #2fd6c1;
  --navy: #0a1f3a;

  /* Ground and glass */
  --bg: #05070c;
  --bg-2: #080b13;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-2: rgba(255, 255, 255, 0.06);
  --glass-hi: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.07);

  /* Text */
  --text: #eef1f6;
  --text-2: #a2abbb;
  --text-3: #6e778a;

  /* Old names, still used by 404.html */
  --on-dark: var(--text);
  --on-dark-2: var(--text-2);

  --iris: conic-gradient(from 210deg, #8ab4ff, #6ee7d6, #c3a6ff, #ffd1e8, #8ab4ff);

  /* Geometry */
  --slope: 0.5455;
  --radius: 22px;
  --radius-m: 16px;
  --radius-s: 10px;

  /* Type */
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: clamp(0.8rem, 0.78rem + 0.12vw, 0.875rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.375rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.8vw, 1.95rem);
  --step-3: clamp(2rem, 1.5rem + 2.4vw, 3.6rem);
  --step-4: clamp(2.6rem, 1.4rem + 4.6vw, 6rem);

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-s: 0.75rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --section-y: clamp(5rem, 3rem + 7vw, 10rem);

  --container: 80rem;
  --gutter: clamp(1rem, 0.5rem + 2.2vw, 2.25rem);
  --frame: clamp(0.5rem, 0.2rem + 1vw, 1rem);
  --header-h: 4rem;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-glass: cubic-bezier(.16, 1, .3, 1);
  --ease-calm: cubic-bezier(.33, 1, .68, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--frame) * 2); }
body { margin: 0; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }

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

/* ---------- Base ---------- */
body {
  position: relative;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Ambient light the glass sits in. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 85% 10%, rgba(26, 95, 252, 0.10), transparent 60%),
    radial-gradient(50rem 36rem at 5% 60%, rgba(11, 194, 172, 0.06), transparent 60%),
    radial-gradient(40rem 30rem at 60% 100%, rgba(108, 77, 250, 0.07), transparent 60%),
    var(--bg);
}

h1, h2, h3 { font-weight: 600; line-height: 1.06; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: var(--step-4); letter-spacing: -0.045em; line-height: 0.96; }
h2 { font-size: var(--step-3); letter-spacing: -0.038em; line-height: 1.02; }
h3 { font-size: var(--step-1); letter-spacing: -0.015em; line-height: 1.25; }
p { text-wrap: pretty; }

/* Headlines are lit from above, like the glass. */
h1, h2 {
  background: linear-gradient(180deg, #ffffff 20%, #b9c2d2 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* The gradient only paints inside the box; give overhanging glyphs (Arabic commas,
     italic-ish terminals) room so they aren't clipped. */
  padding-inline: 0.12em; margin-inline: -0.12em;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue); color: #fff; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: var(--space-m); top: -100px; z-index: 200;
  background: var(--text); color: var(--bg); padding: var(--space-xs) var(--space-m); font-weight: 600; border-radius: var(--radius-s);
}
.skip-link:focus { top: var(--space-m); }

/* ---------- Glass surface ---------- */
.glass {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--edge), 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}
/* Sheen under the cursor. */
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(32rem circle at var(--mx, 50%) var(--my, -30%), rgba(160, 190, 255, 0.08), transparent 45%);
  opacity: 0; transition: opacity 400ms ease;
}
/* Iridescent edge that lights up near the cursor: a 1px ring masked out of a glow. */
.glass::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(16rem circle at var(--mx, 50%) var(--my, -30%), rgba(190, 210, 255, 0.95), rgba(110, 231, 214, 0.55) 30%, rgba(195, 166, 255, 0.25) 50%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity 400ms ease;
}
.glass:hover::before, .glass:hover::after, .glass:focus-within::before { opacity: 1; }
@media (hover: none) { .glass::before, .glass::after { display: none; } }

/* ---------- Brand mark ---------- */
.mark-c { fill: var(--mark-c, var(--blue)); }
.mark-n { fill: var(--mark-n, var(--teal)); }

.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.brand-mark { width: 1.9rem; height: auto; aspect-ratio: 708 / 580; }
.brand-name { font-weight: 600; font-size: 1.15rem; letter-spacing: -0.025em; line-height: 1; }

/* ---------- Buttons ---------- */
.btn {
  --h: 3rem;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: var(--h); padding: 0 1.35rem;
  border: 1px solid transparent; border-radius: 12px; cursor: pointer;
  font-weight: 600; font-size: 0.98rem; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap;
  transition: transform 300ms var(--ease-glass), box-shadow 300ms ease, background-color 200ms ease, border-color 200ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-sm { --h: 2.5rem; font-size: 0.9rem; padding: 0 1rem; border-radius: 10px; }

/* Light glass: near-white with a soft inner bevel. */
.btn-light, .btn-accent, .btn-primary {
  color: #0a0d14;
  background: linear-gradient(180deg, #ffffff, #d6dce6);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0, 0, 0, 0.18), 0 10px 30px -10px rgba(140, 180, 255, 0.45);
}
.btn-light:hover, .btn-accent:hover, .btn-primary:hover { box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0, 0, 0, 0.18), 0 14px 40px -8px rgba(140, 180, 255, 0.7); }
.btn-glass { color: var(--text); background: var(--glass-2); border-color: var(--line-2); box-shadow: var(--edge); backdrop-filter: blur(12px); }
.btn-glass:hover { background: var(--glass-hi); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; text-decoration: none; color: var(--text);
}
.link-arrow::after { content: "→"; transition: transform 220ms var(--ease-glass); }
.link-arrow:hover::after { transform: translateX(5px); }

/* ---------- Header ----------
   At the top it sits inside the hero's glass strip (drawn by the shader); once the
   page scrolls it becomes its own floating glass bar. */
.site-header {
  position: fixed; z-index: 60;
  top: var(--frame); left: var(--frame); right: var(--frame);
  height: var(--header-h);
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid transparent;
  transition: background-color 300ms ease, border-color 300ms ease, box-shadow 300ms ease, backdrop-filter 300ms ease;
}
.site-header.is-scrolled, .no-glass .site-header {
  background: rgba(10, 13, 20, 0.62);
  border-color: var(--line);
  box-shadow: var(--edge), 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
}
.header-inner { width: auto; height: 100%; padding-inline: clamp(1rem, 0.6rem + 1.5vw, 1.75rem); display: flex; align-items: center; justify-content: space-between; gap: var(--space-l); }

.site-nav { display: flex; align-items: center; gap: var(--space-xl); }
.site-nav ul { display: flex; gap: 0.25rem; }
.site-nav ul a {
  display: block; padding: 0.45rem 0.8rem; border-radius: 8px;
  font-size: 0.92rem; font-weight: 500; text-decoration: none; color: var(--text-2);
  transition: color 160ms ease, background-color 160ms ease;
}
.site-nav ul a:hover { color: var(--text); background: var(--glass-2); }
.site-nav ul a[aria-current="page"] { color: var(--text); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); }

.nav-toggle { display: none; width: 2.75rem; height: 2.75rem; margin-inline-end: -0.5rem; background: none; border: 0; cursor: pointer; position: relative; }
.nav-toggle-bar { position: absolute; left: 0.7rem; right: 0.7rem; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 240ms var(--ease-glass); }
.nav-toggle-bar:nth-of-type(2) { top: calc(50% - 4px); }
.nav-toggle-bar:nth-of-type(3) { top: calc(50% + 3px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(2) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(3) { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 56rem) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: var(--space-l);
    padding: var(--space-s) var(--space-l) var(--space-l);
    background: rgba(12, 15, 23, 0.86); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--edge), 0 30px 60px -20px rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
    visibility: hidden; opacity: 0; transform: translateY(-8px) scale(0.98); transform-origin: top;
    transition: opacity 220ms ease, transform 280ms var(--ease-glass), visibility 0s 280ms;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity 220ms ease, transform 280ms var(--ease-glass); }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { padding: var(--space-s) 0; border-radius: 0; font-size: var(--step-1); color: var(--text); border-bottom: 1px solid var(--line); }
  .site-nav ul a:hover { background: none; }
  .site-nav .btn { align-self: stretch; }
  .site-header:has(.is-open) { background: rgba(10, 13, 20, 0.8); border-color: var(--line); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
}

/* ---------- Shared section parts ---------- */
.section { position: relative; padding-block: var(--section-y); }
/* Sections far off screen skip layout and paint until they come near. */
.section:not(.contact) { content-visibility: auto; contain-intrinsic-size: auto 1000px; }

.eyebrow, .section-index {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.section-index { display: inline-flex; align-items: center; gap: 0.6rem; }
.section-index::before {
  content: ""; width: 0.5rem; height: 0.85rem; flex: none;
  background: linear-gradient(180deg, var(--blue-hi), var(--teal));
  clip-path: polygon(0 0, 45% 0, 100% 100%, 55% 100%);
}

.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-l);
  row-gap: var(--space-m);
  margin-bottom: var(--space-3xl);
}
.section-head h2 { grid-column: 1 / span 7; }
.section-intro { grid-column: 8 / -1; align-self: end; color: var(--text-2); max-width: 34rem; }
.section-head-stacked h2 { grid-column: 1 / -1; }

@media (max-width: 52rem) {
  .section-head { margin-bottom: var(--space-2xl); }
  .section-head h2, .section-intro { grid-column: 1 / -1; }
}

/* Scroll reveal (only once main.js has run; without JS everything is visible).
   Elements drift gently into focus: a slight blur and a short lift, eased slowly. */
.reveal-ready [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(10px); filter: blur(4px); }
.reveal-ready [data-reveal] { transition: opacity 1200ms var(--ease-calm), transform 1400ms var(--ease-calm), filter 1200ms var(--ease-calm); transition-delay: var(--d, 0ms); }
.reveal-ready [data-reveal].is-in { filter: none; }

/* ---------- Hero ---------- */
.hero { padding: var(--frame); }
.hero-frame {
  position: relative;
  min-height: calc(100vh - 2 * var(--frame));
  min-height: calc(100svh - 2 * var(--frame));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--header-h) 1fr auto;
  border-radius: var(--radius);
  overflow: hidden;
  /* Fallback when WebGL2 isn't available. */
  background:
    radial-gradient(50rem 30rem at 75% 70%, rgba(26, 95, 252, 0.35), transparent 60%),
    radial-gradient(30rem 24rem at 92% 10%, rgba(11, 194, 172, 0.25), transparent 60%),
    #070a12;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 600ms ease; }
.hero-canvas.is-live { opacity: 1; }

.hero-copy {
  position: relative; grid-row: 2; align-self: center;
  padding: clamp(2rem, 1rem + 3vh, 4rem) clamp(1.5rem, 0.5rem + 4.5vw, 6rem);
  max-width: 50rem;
}
.hero-copy h1 { margin-top: var(--space-l); max-width: 13ch; font-size: min(var(--step-4), 8.6svh); }
.hero-copy h1 em { font-style: normal; background: linear-gradient(100deg, #9fc0ff 0%, #6fe3d2 55%, #c7b3ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin-top: var(--space-l); font-size: var(--step-1); line-height: 1.5; color: var(--text-2); max-width: 32rem; }
.hero-actions { margin-top: clamp(1.5rem, 4svh, 3rem); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-l) var(--space-xl); }

.hero-copy > * { animation: rise 1100ms var(--ease-glass) both; animation-delay: 500ms; }
.hero-copy > :nth-child(2) { animation-delay: 600ms; }
.hero-copy > :nth-child(3) { animation-delay: 720ms; }
.hero-copy > :nth-child(4) { animation-delay: 840ms; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* The stack, as a quiet row of labels along the bottom of the glass. */
.hero-stack {
  position: relative; grid-row: 3;
  padding: 0 clamp(1.5rem, 0.5rem + 4.5vw, 6rem) clamp(1.5rem, 1rem + 2vw, 2.75rem);
  animation: rise 1100ms var(--ease-glass) 1000ms both;
}
.hero-stack ol { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero-stack li {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line); border-radius: 12px;
  /* Solid-ish instead of backdrop-filter: blurring the live canvas every frame is costly. */
  background: rgba(10, 13, 21, 0.72);
  box-shadow: var(--edge);
  transition: border-color 200ms ease, background-color 200ms ease, transform 300ms var(--ease-glass);
}
.hero-stack li:hover { border-color: var(--line-2); background: rgba(20, 26, 40, 0.55); transform: translateY(-2px); }
.hero-stack li { position: relative; cursor: default; }
.hero-stack li.is-active { border-color: rgba(140, 180, 255, 0.45); background: rgba(30, 45, 80, 0.55); box-shadow: var(--edge), 0 0 0 4px rgba(76, 131, 255, 0.12), 0 10px 30px -10px rgba(76, 131, 255, 0.6); transform: translateY(-2px); }
.hero-stack li.is-active small { color: var(--text-2); }
.hero-stack b { font-size: 0.9rem; font-weight: 600; line-height: 1.2; }
/* Tools stay in the markup for the pane label and screen readers; the chips show titles only. */
.hero-stack small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* Label that floats in the hovered pane (positioned by glass.js). */
.pane-label {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  display: grid; gap: 0.15rem; justify-items: center; text-align: center;
  padding: 0.6rem 1rem; border-radius: 14px;
  background: rgba(10, 13, 21, 0.82); border: 1px solid var(--line-2);
  box-shadow: var(--edge), 0 20px 40px -20px rgba(0, 0, 0, 0.8);
  opacity: 0; scale: 0.94;
  transition: opacity 350ms ease, scale 450ms var(--ease-glass);
}
.pane-label.is-on { opacity: 1; scale: 1; }
.pane-label b { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.pane-label small { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-2); white-space: nowrap; }
@media (max-width: 40rem) { .pane-label small { display: none; } }
.hero-showcase { display: none; }
@media (max-width: 40rem) {
  /* Phones: copy and chips share the top pane; the four practice panes get a
     showcase of their own below (glass.js reads [data-showcase] for the split). */
  .hero-frame { min-height: 0; grid-template-rows: var(--header-h) auto auto auto; }
  .hero-copy { align-self: start; padding: var(--space-2xl) var(--space-l) var(--space-l); }
  .hero-stack { padding: 0 var(--space-l) var(--space-l); }
  .hero-stack li { padding: 0.45rem 0.7rem; cursor: pointer; }
  .hero-stack b { font-size: 0.8rem; }
  /* No glass on phones (glass.js exits early): no canvas, no showcase panes. */
  .hero-canvas, .hero-showcase, .pane-label { display: none; }
  .hero-stack { padding-bottom: var(--space-2xl); }
}

/* ---------- Band ---------- */
.band {
  overflow: hidden; padding-block: var(--space-xl);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.band-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.band-track span {
  display: inline-flex; align-items: center; gap: 2rem; padding-inline-start: 2rem;
  font-size: var(--step-2); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; line-height: 1;
  color: var(--text-3);
}
.band-track span::after {
  content: ""; width: 0.5rem; height: 0.9rem;
  background: linear-gradient(180deg, var(--blue-hi), var(--teal));
  clip-path: polygon(0 0, 45% 0, 100% 100%, 55% 100%);
}
.band:hover .band-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-m); }
.services:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.service { padding: var(--space-xl); }
.service:nth-child(2) { --d: 90ms; }
.service:nth-child(3) { --d: 180ms; }
.service-num {
  display: block;
  font-size: clamp(4rem, 3rem + 4vw, 7rem); font-weight: 600; line-height: 0.8; letter-spacing: -0.06em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.02));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: var(--space-xl);
  transition: filter 400ms ease;
}
.service:hover .service-num { background-image: linear-gradient(180deg, #9fc0ff, #6fe3d2 70%, rgba(111, 227, 210, 0.1)); }
.service h3 { font-size: var(--step-2); }
/* The whole card is clickable through the title link. */
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.service { display: flex; flex-direction: column; }
.service-more { margin-top: auto; padding-top: var(--space-l); color: var(--text-2); transition: color 200ms ease; }
.service:hover .service-more { color: var(--text); }
.service:hover .service-more::after { transform: translateX(5px); }
[dir="rtl"] .service:hover .service-more::after { transform: translateX(-5px); }
.service-summary { margin-top: var(--space-m); color: var(--text-2); }
.service-list { margin-top: var(--space-xl); }
.service-list li {
  position: relative;
  padding-block: 0.7rem; padding-inline: 1.25rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem; line-height: 1.45; color: var(--text);
}
.service-list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 1.05rem;
  width: 0.4rem; height: 0.65rem; background: var(--text-3);
  clip-path: polygon(0 0, 45% 0, 100% 100%, 55% 100%);
  transition: background-color 200ms ease;
}
.service:hover .service-list li::before { background: var(--teal); }

@media (max-width: 60rem) {
  .services { grid-template-columns: 1fr; }
  .service-list { columns: 2; column-gap: var(--space-xl); }
  .service-list li { break-inside: avoid; }
}
@media (max-width: 36rem) { .service-list { columns: 1; } .service { padding: var(--space-l); } }

/* ---------- Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-m);
}
.work-card { grid-column: span 5; display: flex; flex-direction: column; gap: var(--space-l); padding: var(--space-s); padding-bottom: var(--space-l); text-decoration: none; }
.work-card-lg { grid-column: span 7; }

.work-shot { border-radius: calc(var(--radius) - var(--space-s)); overflow: hidden; background: #0b0f18; border: 1px solid var(--line); }
.work-bar {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-m);
  padding: 0.55rem 0.85rem;
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-3);
  border-bottom: 1px solid var(--line);
}
.work-bar span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-bar span:first-child::before { content: "● ● ●"; letter-spacing: 0.15em; margin-inline-end: 0.8rem; color: rgba(255, 255, 255, 0.14); }
.work-bar span:last-child { color: var(--teal); transition: transform 300ms var(--ease-glass); }
.work-viewport { aspect-ratio: 16 / 10; overflow: hidden; background: #fff; container-type: inline-size; }
/* On hover the screenshot scrolls through the whole page, down to its footer.
   62.5cqw is the viewport's own height (16:10), so the image stops flush at the bottom. */
.work-viewport img { width: 100%; height: auto; transform: translateY(0); transition: transform 1.2s cubic-bezier(.45, .05, .35, 1); }
.work-card:hover .work-viewport img, .work-card:focus-visible .work-viewport img {
  transform: translateY(calc(-100% + 62.5cqw));
  transition-duration: var(--scroll, 6s);
  transition-timing-function: cubic-bezier(.3, 0, .5, 1);
}
.work-card:hover .work-bar span:last-child { transform: translate(2px, -2px); }

.work-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-m) var(--space-xl); align-items: start; padding-inline: var(--space-s); }
.work-meta h3 { font-size: var(--step-2); }
.work-meta p { margin-top: var(--space-s); color: var(--text-2); max-width: 36rem; }
.work-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; padding-top: 0.4rem; }
.work-tags li { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-2); border: 1px solid var(--line); padding: 0.2rem 0.55rem; border-radius: 999px; white-space: nowrap; background: var(--glass); }

/* PetraPrint spotlight. */
.spotlight {
  --box: #eff0f4; /* the 3D viewer's own background, so the frames sit seamlessly */
  margin-top: var(--space-3xl);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-2xl) var(--space-xl);
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  overflow: hidden;
}
.spotlight .eyebrow { color: var(--teal); }
.spot-copy { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: var(--space-l); }
.spot-copy h3 { font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; }
.spot-copy > p { color: var(--text-2); max-width: 32rem; }
.spot-facts { display: grid; border-top: 1px solid var(--line); margin-top: var(--space-s); }
.spot-facts > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: var(--space-m); padding: var(--space-s) 0; border-bottom: 1px solid var(--line); }
.spot-facts dt { font-family: var(--font-mono); font-size: 0.75rem; color: var(--teal); padding-top: 0.2rem; }
.spot-facts dd { font-size: 0.95rem; color: var(--text); }

.fold { grid-column: 6 / -1; align-self: start; display: flex; flex-direction: column; gap: var(--space-s); }
.fold-stage { position: relative; background: var(--box); aspect-ratio: 640 / 533; overflow: hidden; border-radius: var(--radius-m); box-shadow: 0 30px 80px -30px rgba(26, 95, 252, 0.45); }
.fold-stage img { width: 100%; height: 100%; object-fit: cover; }
.fold-badge {
  position: absolute; inset-inline-start: 0.75rem; top: 0.75rem;
  font-family: var(--font-mono); font-size: 0.7rem; color: #fff;
  background: rgba(10, 13, 20, 0.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: 0.3rem 0.65rem; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.fold-badge::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.fold-controls { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-m); font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.fold-controls input { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; border-radius: 3px; background: var(--line-2); cursor: ew-resize; margin: 0; }
.fold-controls input::-webkit-slider-thumb { -webkit-appearance: none; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: linear-gradient(180deg, #fff, #cfd6e2); border: 0; box-shadow: 0 0 0 4px rgba(11, 194, 172, 0.25), 0 2px 8px rgba(0, 0, 0, 0.5); }
.fold-controls input::-moz-range-thumb { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: linear-gradient(180deg, #fff, #cfd6e2); border: 0; box-shadow: 0 0 0 4px rgba(11, 194, 172, 0.25), 0 2px 8px rgba(0, 0, 0, 0.5); }
.fold-controls input::-moz-range-progress { background: var(--teal); height: 3px; border-radius: 3px; }
.fold-controls input:focus-visible { outline: 2px solid var(--teal); outline-offset: 6px; }
.fold figcaption { font-size: 0.85rem; color: var(--text-2); }
.fold figcaption a { color: var(--teal); }

.spot-studio { grid-column: 3 / -1; border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; background: #0b0f18; }
.spot-studio img { width: 100%; height: auto; }

/* Also inside: uneven grid of feature crops from the other sites. */
.extras {
  margin-top: var(--space-3xl);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-2xl) var(--space-xl);
}
.extra { display: flex; flex-direction: column; gap: var(--space-m); }
.extra img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-m); background: #0b0f18; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.extra figcaption { font-size: 0.95rem; color: var(--text-2); max-width: 40rem; }
.extra figcaption .eyebrow { display: block; font-size: 0.7rem; margin-bottom: 0.35rem; }
.extra figcaption strong { color: var(--text); font-weight: 600; }
.extra-wide { grid-column: 1 / span 7; }
.extra-tall { grid-column: 8 / -1; --d: 100ms; }
.extra-tall img { aspect-ratio: 640 / 580; object-fit: cover; }
.extra-map { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-xl); align-items: end; }
.extra-map img { grid-column: 1 / span 9; }
.extra-map figcaption { grid-column: 10 / -1; padding-bottom: var(--space-xs); }

@media (max-width: 60rem) {
  .spotlight, .extras, .extra-map { grid-template-columns: minmax(0, 1fr); }
  .spot-copy, .fold, .spot-studio { grid-column: 1 / -1; }
  .extra-wide, .extra-tall, .extra-map img, .extra-map figcaption { grid-column: 1 / -1; }
}
@media (max-width: 36rem) { .spot-facts > div { grid-template-columns: 1fr; gap: 0.15rem; } }

.work-more {
  margin-top: var(--space-3xl); padding-top: var(--space-l); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-m) var(--space-xl);
  font-size: var(--step-1); font-weight: 500; letter-spacing: -0.01em; color: var(--text-2);
}
.work-more .link-arrow { font-size: 1rem; }

@media (max-width: 60rem) {
  .work-card, .work-card-lg { grid-column: 1 / -1; }
}
@media (max-width: 36rem) {
  .work-meta { grid-template-columns: 1fr; }
  .work-tags { flex-direction: row; flex-wrap: wrap; align-items: flex-start; padding-top: 0; }
}

/* ---------- Approach ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-m); }
.step { padding: var(--space-xl) var(--space-l) var(--space-l); display: flex; flex-direction: column; }
.step:nth-child(2) { --d: 80ms; }
.step:nth-child(3) { --d: 160ms; }
.step:nth-child(4) { --d: 240ms; }
.step-marker { position: absolute; top: -1px; left: var(--space-l); right: var(--space-l); height: 1px; background: linear-gradient(90deg, transparent, var(--teal), transparent); opacity: 0.6; }
.step h3 { font-size: var(--step-2); }
.step p { margin-top: var(--space-m); color: var(--text-2); font-size: 0.96rem; }
.step .step-out { margin-top: auto; padding-top: var(--space-m); color: var(--text); border-top: 1px solid var(--line); }
.step p:not(.step-out) { margin-bottom: var(--space-l); }

@media (max-width: 60rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 36rem) { .steps { grid-template-columns: 1fr; } }

/* ---------- Principles ---------- */
.principles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-l); row-gap: var(--space-2xl); }
.principles-title { grid-column: 1 / span 4; font-size: var(--step-3); position: sticky; top: calc(var(--header-h) + var(--space-3xl)); align-self: start; }
.principles-list { grid-column: 6 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xl) var(--space-xl); }
.principles-list > div { border-top: 1px solid var(--line-2); padding-top: var(--space-m); position: relative; }
.principles-list > div::before { content: ""; position: absolute; top: -1px; inset-inline-start: 0; width: 2.5rem; height: 1px; background: linear-gradient(90deg, var(--blue-hi), var(--teal)); }
.principles-list dt { font-weight: 600; font-size: var(--step-1); line-height: 1.25; letter-spacing: -0.015em; }
.principles-list dd { margin-top: var(--space-s); color: var(--text-2); }

@media (max-width: 60rem) { .principles-title, .principles-list { grid-column: 1 / -1; position: static; } }
@media (max-width: 36rem) { .principles-list { grid-template-columns: 1fr; } }

/* ---------- Engagements ---------- */
.plans {
  display: grid;
  grid-template-columns: minmax(7rem, 0.5fr) repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(5, auto);
  font-size: 0.96rem; line-height: 1.5;
  padding: var(--space-s);
}
.plans-labels, .plan, .plan dl { display: grid; grid-row: 1 / -1; grid-template-rows: subgrid; }
.plan dl { grid-row: 2 / -1; }
.plan dl > div { display: contents; }
.plans-labels > span, .plan h3, .plan dd { padding: var(--space-m) var(--space-l); border-bottom: 1px solid var(--line); }
.plan dl > div:last-child dd, .plans-labels > span:last-child { border-bottom: 0; }
.plans-labels > span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); padding-top: calc(var(--space-m) + 0.2rem); }
.plan h3 { font-size: var(--step-2); letter-spacing: -0.025em; line-height: 1.15; padding-top: var(--space-xl); padding-bottom: var(--space-l); align-self: end; }
.plan dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plan dd { color: var(--text-2); }
.plan { position: relative; border-radius: var(--radius-m); }
.plan.is-featured {
  background: linear-gradient(180deg, rgba(76, 131, 255, 0.14), rgba(11, 194, 172, 0.05) 60%, transparent);
  box-shadow: inset 0 0 0 1px rgba(140, 180, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.plan.is-featured dd { color: var(--text); }

@media (max-width: 52rem) {
  .plans { grid-template-columns: 1fr; grid-template-rows: none; gap: var(--space-s); }
  .plans-labels { display: none; }
  .plan, .plan dl { display: block; grid-row: auto; }
  .plan h3 { border-bottom: 1px solid var(--line); padding: var(--space-l) var(--space-m) var(--space-m); }
  .plan dl > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--space-m); padding: var(--space-s) var(--space-m); border-bottom: 1px solid var(--line); }
  .plan dl > div:last-child { border-bottom: 0; }
  .plan dt { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); padding-top: 0.2rem; }
  .plan dd { padding: 0; border: 0; }
}
@media (max-width: 30rem) { .plan dl > div { grid-template-columns: 1fr; gap: 0.15rem; } }

.tag {
  display: inline-block; vertical-align: middle; margin-inline-start: 0.4rem; transform: translateY(-0.15em);
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.04em;
  color: #cfe0ff; border: 1px solid rgba(140, 180, 255, 0.35); background: rgba(76, 131, 255, 0.15);
  padding: 0.15rem 0.5rem; border-radius: 999px;
}

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-l); }
.faq-grid .section-head { grid-column: 1 / span 4; display: block; margin: 0; }
.faq-grid .section-head h2 { margin-top: var(--space-m); }
.faq { grid-column: 6 / -1; padding: var(--space-xs) var(--space-xl); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-l);
  padding: var(--space-l) 0;
  font-weight: 600; font-size: var(--step-1); line-height: 1.3; letter-spacing: -0.015em;
  transition: color 160ms ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem;
  border: 1px solid var(--line-2); border-radius: 50%;
  font-family: var(--font-mono); font-weight: 400; font-size: 1rem; line-height: 1; color: var(--text-2);
  transition: transform 300ms var(--ease-glass), background-color 200ms ease, color 200ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--text); color: var(--bg); }
.faq summary:hover { color: #fff; }
.faq details p { padding: 0 0 var(--space-l); padding-inline-end: 3rem; color: var(--text-2); max-width: 44rem; }
.faq details[open] p { animation: rise 600ms var(--ease-glass) both; }

@media (max-width: 60rem) {
  .faq-grid .section-head, .faq { grid-column: 1 / -1; }
  .faq-grid .section-head { margin-bottom: var(--space-xl); }
}
@media (max-width: 36rem) { .faq { padding: 0 var(--space-l); } .faq details p { padding-inline-end: 0; } }

/* ---------- Contact ---------- */
.contact { overflow: hidden; }
.contact::before {
  content: ""; position: absolute; left: 50%; top: 40%; width: min(70rem, 120vw); aspect-ratio: 1.6; translate: -50% -50%; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(26, 95, 252, 0.22), rgba(11, 194, 172, 0.08) 55%, transparent);
}
.contact-ghost {
  --mark-c: rgba(255, 255, 255, 0.025); --mark-n: rgba(255, 255, 255, 0.025);
  position: absolute; left: -6%; bottom: -18%;
  width: min(60vw, 52rem); height: auto; aspect-ratio: 708 / 580;
  pointer-events: none;
}
.contact-grid { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-l); row-gap: var(--space-2xl); align-items: start; }
.contact-copy { grid-column: 1 / span 5; position: sticky; top: calc(var(--header-h) + var(--space-3xl)); }
.contact-copy h2 { font-size: var(--step-2); }
.next-steps { margin-top: var(--space-xl); display: grid; gap: var(--space-l); counter-reset: none; }
.next-steps b { font-weight: 600; font-size: var(--step-1); letter-spacing: -0.01em; }
.next-steps p { color: var(--text-2); margin-top: 0.2rem; }
.contact-copy .section-intro { margin-top: var(--space-l); }
.contact-direct { margin-top: var(--space-xl); color: var(--text-2); }
.contact-direct a { color: var(--text); }
.contact-form { grid-column: 7 / -1; display: grid; gap: var(--space-l); padding: clamp(1.25rem, 0.8rem + 2vw, 2.5rem); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-l); }
.field { display: grid; gap: var(--space-xs); }
.field label, .field legend { font-size: 0.88rem; font-weight: 500; color: var(--text-2); }
.field legend { margin-bottom: var(--space-xs); }
.optional { color: var(--text-3); font-weight: 400; margin-inline-start: 0.25rem; }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 200ms ease;
}
.contact-form textarea { resize: vertical; min-height: 7rem; }
.contact-form ::placeholder { color: var(--text-3); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: rgba(11, 194, 172, 0.6); background: rgba(0, 0, 0, 0.36); box-shadow: 0 0 0 4px rgba(11, 194, 172, 0.12); }
.contact-form [aria-invalid="true"] { border-color: #ff8a7a; }

.choices { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-block; padding: 0.5rem 0.95rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); font-size: 0.9rem; background: var(--glass); transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 200ms ease; }
.choice:hover span { border-color: rgba(255, 255, 255, 0.28); }
.choice input:checked + span { background: linear-gradient(180deg, #fff, #d6dce6); border-color: transparent; color: #0a0d14; font-weight: 500; box-shadow: 0 6px 20px -8px rgba(140, 180, 255, 0.6); }
.choice input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-m) var(--space-l); margin-top: var(--space-xs); }
.form-status { font-size: 0.9rem; color: var(--text-2); }
.form-status.is-error { color: #ff8a7a; }

@media (max-width: 60rem) { .contact-copy, .contact-form { grid-column: 1 / -1; position: static; } }
@media (max-width: 36rem) { .field-row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { position: relative; color: var(--text-3); border-top: 1px solid var(--line); padding-top: var(--space-2xl); font-size: 0.9rem; overflow: hidden; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--space-2xl) var(--space-3xl); }
.footer-brand { display: grid; gap: var(--space-s); }
.footer-mail a { color: var(--text); text-decoration: none; }
.footer-mail a:hover { text-decoration: underline; }
.footer-cols { display: grid; grid-template-columns: repeat(3, auto); gap: var(--space-xl) var(--space-3xl); }
.footer-head { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--space-s); }
.footer-col ul { display: grid; gap: 0.45rem; }
.footer-col a { text-decoration: none; color: var(--text-2); }
.footer-col a:hover { color: var(--text); }
.footer-legal { grid-column: 1 / -1; padding-top: var(--space-l); border-top: 1px solid var(--line); }
[dir="rtl"] .footer-head { font-family: var(--font-sans); text-transform: none; font-size: 0.85rem; }

/* Oversized lockup that bleeds off the bottom of the page, lit from above. */
.footer-word {
  display: flex; align-items: baseline; gap: 0.12em;
  width: min(100% - 2 * var(--gutter), var(--container)); margin: var(--space-2xl) auto 0;
  font-size: clamp(3.5rem, 15vw, 15rem); font-weight: 600; letter-spacing: -0.055em; line-height: 1;
  margin-bottom: -0.11em;
}
/* Every part of the lockup shares one light: --mx / --my are set per part by main.js
   (relative to that part), so the shine lines up across the mark and the letters. */
@property --mx { syntax: "<length-percentage>"; inherits: true; initial-value: -40%; }
.footer-word { --my: 30%; }
.footer-word .fw-text, .footer-word .fw-c, .footer-word .fw-n {
  --shine: radial-gradient(11rem circle at var(--mx) var(--my), rgba(255, 255, 255, 0.95), rgba(200, 222, 255, 0.55) 22%, transparent 55%),
           radial-gradient(24rem circle at var(--mx) var(--my), rgba(110, 231, 214, 0.32), rgba(195, 166, 255, 0.22) 40%, transparent 70%);
}
.footer-word .fw-text {
  background: var(--shine), linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.04) 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* The glass rim: a light top edge and a faint lower one (text-stroke would show the
     variable font's overlapping contours). */
  filter: drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.22)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.05));
}
.footer-word .fw-mark { filter: drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.2)); position: relative; width: 0.86em; aspect-ratio: 708 / 580; flex: none; align-self: center; translate: 0 0.06em; }
.footer-word .fw-c, .footer-word .fw-n { position: absolute; inset: 0; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.footer-word .fw-c { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 708 580'%3E%3Cpath d='M125 0H409L476 122H150A30 30 0 0 0 120 152V428A30 30 0 0 0 150 458H342L393 367L509 580H125A125 125 0 0 1 0 455V125A125 125 0 0 1 125 0Z'/%3E%3C/svg%3E"); background: var(--shine), linear-gradient(180deg, rgba(26, 95, 252, 0.75), rgba(26, 95, 252, 0.06) 90%); }
.footer-word .fw-n { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 708 580'%3E%3Cpath d='M337 122H476L587 325V0H708V580H587Z'/%3E%3C/svg%3E"); background: var(--shine), linear-gradient(180deg, rgba(11, 194, 172, 0.75), rgba(11, 194, 172, 0.06) 90%); }
/* Real glass (glass-type.js) draws over the same layout; the HTML stays as the fallback. */
.footer-word { position: relative; }
.fw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.footer-word.is-live .fw-text, .footer-word.is-live .fw-mark { opacity: 0; }
/* No cursor on touch screens: a slow sweep of light instead. */
@media (hover: none) {
  .footer-word { animation: shine-sweep 7s ease-in-out infinite; }
  .footer-word [class^="fw-"] { --mx: inherit; }
}
@keyframes shine-sweep { 0% { --mx: -40%; } 55%, 100% { --mx: 140%; } }

@media (max-width: 52rem) { .footer-inner { grid-template-columns: 1fr; } }
@media (max-width: 36rem) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Language switch ---------- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.8rem; border-radius: 8px;
  font-size: 0.92rem; font-weight: 500; text-decoration: none; color: var(--text-2);
  border: 1px solid var(--line); transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.lang-switch:hover { color: var(--text); border-color: var(--line-2); background: var(--glass-2); }
.lang-switch::before { content: ""; width: 0.95rem; height: 0.95rem; flex: none; opacity: 0.8;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 3.8 5.6 3.8 9s-1.3 6.4-3.8 9c-2.5-2.6-3.8-5.6-3.8-9S9.5 5.6 12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.lang-switch:lang(ar) { font-family: "IBM Plex Sans Arabic", var(--font-sans); }
@media (max-width: 56rem) { .site-nav .lang-switch { align-self: flex-start; } }

/* ---------- Arabic (right-to-left) ----------
   Arabic letters join, so no letter-spacing anywhere except the Latin wordmarks.
   Plex Mono and uppercase labels have no Arabic, so labels use the Arabic sans. */
[dir="rtl"] {
  --font-sans: "IBM Plex Sans Arabic", "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
}
[dir="rtl"] body { line-height: 1.85; }
[dir="rtl"] *:not(.brand-name, .footer-word .fw-text, .work-bar span, .service-num, .band-track span:lang(en)) { letter-spacing: 0 !important; }
[dir="rtl"] h1 { line-height: 1.22; font-weight: 700; max-width: 15ch; }
[dir="rtl"] h2 { line-height: 1.3; font-weight: 700; }
[dir="rtl"] h3, [dir="rtl"] .faq summary, [dir="rtl"] .principles-list dt { line-height: 1.5; }
[dir="rtl"] :is(.eyebrow, .section-index, .plans-labels > span, .plan dt, .spot-facts dt, .fold-controls, .tag, .work-tags li) {
  font-family: var(--font-sans); text-transform: none; font-size: 0.92rem;
}
[dir="rtl"] .link-arrow::after { content: "←"; }
[dir="rtl"] .link-arrow:hover::after { transform: translateX(-5px); }
[dir="rtl"] .work-card:hover .work-bar span:last-child { transform: translate(-2px, -2px); }
/* The marquee runs the same way in both languages; each word keeps its own direction. */
[dir="rtl"] .band { direction: ltr; }
[dir="rtl"] .band-track span { direction: rtl; }
[dir="rtl"] .footer-word, [dir="rtl"] .brand { direction: ltr; }
[dir="rtl"] .footer-word { justify-content: flex-end; }
[dir="rtl"] .contact-ghost { left: auto; right: -6%; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none;
  border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text-2); cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-2); background: var(--glass-2); }
.theme-icon { width: 1.15rem; height: 1.15rem; background: currentColor; transition: transform 500ms var(--ease-glass);
  /* moon (shown in dark mode: "switch to light" is the sun below) */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4.2'/%3E%3Cpath d='M12 2.5v2.2M12 19.3v2.2M2.5 12h2.2M19.3 12h2.2M5.3 5.3l1.6 1.6M17.1 17.1l1.6 1.6M5.3 18.7l1.6-1.6M17.1 6.9l1.6-1.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4.2'/%3E%3Cpath d='M12 2.5v2.2M12 19.3v2.2M2.5 12h2.2M19.3 12h2.2M5.3 5.3l1.6 1.6M17.1 17.1l1.6 1.6M5.3 18.7l1.6-1.6M17.1 6.9l1.6-1.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
[data-theme="light"] .theme-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z'/%3E%3C/svg%3E");
  transform: rotate(-20deg);
}
.header-inner > .theme-toggle { order: 2; }
.header-inner > .nav-toggle { order: 3; }
@media (max-width: 56rem) { .header-inner > .theme-toggle { margin-inline-start: auto; } }
@media (min-width: 56.0625rem) { .header-inner > .site-nav { margin-inline-start: auto; } .header-inner { justify-content: flex-start; } }
/* Smooth cross-fade only while switching, so normal hovers stay snappy. */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after { transition: background-color 400ms ease, color 400ms ease, border-color 400ms ease, box-shadow 400ms ease !important; }

/* ---------- Light theme ----------
   Same glass, daylight version: frosted white panes on a cool pale ground, ink text.
   Teal fails contrast as text on light, so text accents use --teal-ink. */
:root { --teal-ink: var(--teal); }
[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f6;
  --bg-2: #e6eaf1;
  --glass: rgba(255, 255, 255, 0.5);
  --glass-2: rgba(255, 255, 255, 0.72);
  --glass-hi: rgba(255, 255, 255, 0.9);
  --line: rgba(15, 25, 45, 0.10);
  --line-2: rgba(15, 25, 45, 0.18);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --text: #0b1020;
  --text-2: #475165;
  --text-3: #6b7486;
  --teal-ink: #067a6c;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(60rem 40rem at 85% 10%, rgba(26, 95, 252, 0.10), transparent 60%),
    radial-gradient(50rem 36rem at 5% 60%, rgba(11, 194, 172, 0.10), transparent 60%),
    radial-gradient(40rem 30rem at 60% 100%, rgba(108, 77, 250, 0.08), transparent 60%),
    var(--bg);
}
[data-theme="light"] :is(h1, h2) { background-image: linear-gradient(180deg, #0b1020 30%, #3b4762 120%); }
[data-theme="light"] .hero-copy h1 em { background-image: linear-gradient(100deg, #1a5ffc 0%, #089a89 55%, #6b4df5 100%); }

[data-theme="light"] .glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.5));
  box-shadow: var(--edge), 0 30px 60px -32px rgba(20, 40, 80, 0.22);
}
[data-theme="light"] .glass::before { background: radial-gradient(32rem circle at var(--mx, 50%) var(--my, -30%), rgba(255, 255, 255, 0.85), transparent 45%); }
[data-theme="light"] .glass::after { background: radial-gradient(16rem circle at var(--mx, 50%) var(--my, -30%), rgba(26, 95, 252, 0.7), rgba(11, 194, 172, 0.5) 30%, rgba(107, 77, 245, 0.25) 50%, transparent 70%); }

[data-theme="light"] :is(.btn-light, .btn-accent, .btn-primary) {
  color: #fff;
  background: linear-gradient(180deg, #232b3e, #0b1020);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 30px -10px rgba(26, 95, 252, 0.5);
}
[data-theme="light"] :is(.btn-light, .btn-accent, .btn-primary):hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 14px 40px -8px rgba(26, 95, 252, 0.65); }

[data-theme="light"] .site-header.is-scrolled { background: rgba(246, 248, 252, 0.72); box-shadow: var(--edge), 0 20px 50px -24px rgba(20, 40, 80, 0.25); }
@media (max-width: 56rem) {
  [data-theme="light"] .site-nav { background: rgba(248, 250, 253, 0.92); box-shadow: var(--edge), 0 30px 60px -20px rgba(20, 40, 80, 0.3); }
  [data-theme="light"] .site-header:has(.is-open) { background: rgba(246, 248, 252, 0.85); }
}
[data-theme="light"] .hero-frame {
  background:
    radial-gradient(50rem 30rem at 75% 70%, rgba(26, 95, 252, 0.18), transparent 60%),
    radial-gradient(30rem 24rem at 92% 10%, rgba(11, 194, 172, 0.16), transparent 60%),
    #e4e9f1;
}
[data-theme="light"] .hero-stack li { background: rgba(255, 255, 255, 0.82); }
[data-theme="light"] .hero-stack li:hover { background: rgba(255, 255, 255, 0.8); }
[data-theme="light"] .hero-stack li.is-active { border-color: rgba(26, 95, 252, 0.45); background: rgba(232, 240, 255, 0.9); box-shadow: var(--edge), 0 0 0 4px rgba(26, 95, 252, 0.10), 0 10px 30px -12px rgba(26, 95, 252, 0.45); }
[data-theme="light"] .pane-label { background: rgba(255, 255, 255, 0.9); box-shadow: var(--edge), 0 20px 40px -20px rgba(20, 40, 80, 0.35); }

[data-theme="light"] .service-num { background-image: linear-gradient(180deg, rgba(11, 16, 32, 0.16), rgba(11, 16, 32, 0.02)); }
[data-theme="light"] .service:hover .service-num { background-image: linear-gradient(180deg, #1a5ffc, #089a89 70%, rgba(8, 154, 137, 0.1)); }
[data-theme="light"] .service:hover .service-list li::before { background: var(--teal-ink); }
[data-theme="light"] :is(.work-shot, .spot-studio, .extra img) { background: #fff; }
[data-theme="light"] .work-bar span:first-child::before { color: rgba(11, 16, 32, 0.18); }
[data-theme="light"] :is(.spotlight .eyebrow, .spot-facts dt, .fold figcaption a, .work-bar span:last-child) { color: var(--teal-ink); }
[data-theme="light"] .fold-stage { box-shadow: 0 30px 80px -30px rgba(26, 95, 252, 0.3); }
[data-theme="light"] .plan.is-featured {
  background: linear-gradient(180deg, rgba(26, 95, 252, 0.09), rgba(11, 194, 172, 0.04) 60%, transparent);
  box-shadow: inset 0 0 0 1px rgba(26, 95, 252, 0.22), inset 0 1px 0 #fff;
}
[data-theme="light"] .tag { color: #1450d9; border-color: rgba(26, 95, 252, 0.35); background: rgba(26, 95, 252, 0.08); }
[data-theme="light"] .faq summary:hover { color: #1450d9; }
[data-theme="light"] .contact::before { background: radial-gradient(closest-side, rgba(26, 95, 252, 0.12), rgba(11, 194, 172, 0.06) 55%, transparent); }
[data-theme="light"] .contact-ghost { --mark-c: rgba(11, 16, 32, 0.03); --mark-n: rgba(11, 16, 32, 0.03); }
[data-theme="light"] .contact-form :is(input[type="text"], input[type="email"], textarea) { background: rgba(255, 255, 255, 0.75); box-shadow: inset 0 1px 2px rgba(15, 25, 45, 0.06); }
[data-theme="light"] .contact-form :is(input, textarea):focus { background: #fff; border-color: rgba(6, 122, 108, 0.6); box-shadow: 0 0 0 4px rgba(11, 194, 172, 0.14); }
[data-theme="light"] .contact-form [aria-invalid="true"] { border-color: #d0402a; }
[data-theme="light"] .form-status.is-error { color: #c0341f; }
[data-theme="light"] .choice:hover span { border-color: rgba(15, 25, 45, 0.3); }
[data-theme="light"] .choice input:checked + span { background: linear-gradient(180deg, #232b3e, #0b1020); color: #fff; box-shadow: 0 6px 20px -8px rgba(26, 95, 252, 0.5); }

/* ---------- Inner pages ---------- */
.page main { padding-top: calc(var(--header-h) + var(--frame) * 2); }
.section-tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.page-hero { position: relative; padding-block: clamp(3rem, 2rem + 5vw, 7rem) clamp(1.5rem, 1rem + 2vw, 3rem); overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 140%; z-index: -1; pointer-events: none;
  background: radial-gradient(40rem 22rem at 80% 30%, rgba(26, 95, 252, 0.16), transparent 70%), radial-gradient(30rem 18rem at 10% 80%, rgba(11, 194, 172, 0.10), transparent 70%);
}
.page-hero h1 { margin-top: var(--space-l); max-width: 18ch; font-size: clamp(2.4rem, 1.4rem + 4vw, 4.8rem); }
.page-hero .lede { color: var(--text-2); max-width: 40rem; }
.page-hero .hero-actions { margin-top: var(--space-xl); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.4rem; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.crumbs li + li::before { content: "/"; margin-inline-end: 0.4rem; color: var(--text-3); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); }
[dir="rtl"] .crumbs ol { font-family: var(--font-sans); text-transform: none; font-size: 0.88rem; }

.tool-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--space-xl); }
.tool-list li { padding: 0.35rem 0.75rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: 0.85rem; color: var(--text-2); background: var(--glass); }

.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--space-m); }
.feature-list li { padding: var(--space-xl); }
.feature-list h3 { font-size: var(--step-1); }
.feature-list p { margin-top: var(--space-s); color: var(--text-2); }

.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: var(--space-m); }
.stack-grid a { display: grid; gap: 0.3rem; padding: var(--space-l); text-decoration: none; }
.stack-grid b { font-weight: 600; font-size: var(--step-1); }
.stack-grid small { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-3); }
.stack-grid a::after { content: "→"; color: var(--text-3); margin-top: var(--space-s); transition: transform 220ms var(--ease-glass), color 200ms ease; }
.stack-grid a:hover::after { transform: translateX(5px); color: var(--text); }
[dir="rtl"] .stack-grid a::after { content: "←"; }
[dir="rtl"] .stack-grid a:hover::after { transform: translateX(-5px); }

.cta-band { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: var(--space-xl) var(--space-3xl); align-items: end; padding: clamp(1.75rem, 1rem + 3vw, 3.5rem); overflow: hidden; }
.cta-band h2 { font-size: var(--step-3); max-width: 18ch; }
.cta-band .section-intro { margin-top: var(--space-m); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-l) var(--space-xl); }
.cta-band::before { opacity: 1; background: radial-gradient(40rem 20rem at 90% 0%, rgba(26, 95, 252, 0.14), transparent 70%); }
@media (max-width: 52rem) { .cta-band { grid-template-columns: 1fr; } }

.case-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--space-2xl); align-items: start; }
.case-shot { grid-column: auto; }
.case-built h2 { font-size: var(--step-2); }
.case-built .service-list { margin-top: var(--space-l); }
.case-feature { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-xl); align-items: end; }
.case-feature.is-tall { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.case-feature.is-tall img { max-width: 34rem; }
@media (max-width: 60rem) { .case-grid, .case-feature, .case-feature.is-tall { grid-template-columns: 1fr; } }
.spot-title { font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.035em; }

.next-project { display: grid; gap: var(--space-s); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); text-decoration: none; }
.next-name { font-size: var(--step-3); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.next-name::after { content: " →"; color: var(--text-3); transition: color 200ms ease; }
.next-project:hover .next-name::after { color: var(--text); }
[dir="rtl"] .next-name::after { content: " ←"; }
.next-summary { color: var(--text-2); max-width: 44rem; }

.statement { display: grid; gap: var(--space-m); padding: clamp(1.75rem, 1rem + 3vw, 3.5rem); }
.statement h2 { font-size: var(--step-3); max-width: 20ch; }
.statement p { color: var(--text-2); max-width: 44rem; font-size: var(--step-1); }

/* A lit hero pane is a link on desktop: say so in its label. */
@media (hover: hover) { .pane-label b::after { content: " →"; color: var(--text-3); } [dir="rtl"] .pane-label b::after { content: " ←"; } }

/* =====================================================================
   Colour & motion pass
   Accents come from the logo (blue, teal) plus the violet already in the hero's
   light. Each practice owns one: IT solutions teal, Websites blue, Infrastructure
   violet. Projects use their clients' own colours (--c1 / --c2, set inline).
   ===================================================================== */
.ac-teal   { --ac: #0bc2ac; --ac2: #1a5ffc; --ac-hi: #5eead4; }
.ac-blue   { --ac: #1a5ffc; --ac2: #0bc2ac; --ac-hi: #9bb8ff; }
.ac-violet { --ac: #6b4df5; --ac2: #1a5ffc; --ac-hi: #b9a9ff; }
.ac-client { --ac: var(--c1); --ac2: var(--c2); --ac-hi: var(--c1); }
[data-theme="light"] .ac-teal   { --ac-hi: #067a6c; }
[data-theme="light"] .ac-blue   { --ac-hi: #1450d9; }
[data-theme="light"] .ac-violet { --ac-hi: #4f35d2; }

/* ---------- Header navigation: one glass bar of tabs ---------- */
@media (min-width: 56.0625rem) {
  .header-inner { gap: var(--space-m); }
  .header-inner > .site-nav { flex: 1; margin-inline-start: 0; gap: var(--space-s); }
  .site-nav ul {
    margin-inline: auto; gap: 2px; padding: 4px;
    border: 1px solid var(--line); border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    box-shadow: var(--edge);
  }
  .site-nav ul a { position: relative; padding: 0.42rem 0.95rem; border-radius: 9px; font-size: 0.9rem; }
  .site-nav ul a[aria-current="page"] {
    color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 0 1px var(--line);
  }
  .site-nav ul a[aria-current="page"]::after {
    content: ""; position: absolute; left: 30%; right: 30%; bottom: 3px; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, var(--blue-hi), var(--teal));
    box-shadow: 0 0 10px rgba(76, 131, 255, 0.8);
  }
  [data-theme="light"] .site-nav ul { background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.55)); }
  [data-theme="light"] .site-nav ul a[aria-current="page"] { background: #fff; box-shadow: 0 1px 2px rgba(15, 25, 45, 0.08), 0 0 0 1px var(--line); }
}
/* Every header control shares one height and radius. */
.lang-switch, .theme-toggle, .site-header .btn-sm { height: 2.5rem; border-radius: 10px; }
.lang-switch { padding-block: 0; }

/* ---------- Icon tiles ---------- */
.icon-tile {
  display: grid; place-items: center; width: 3.25rem; height: 3.25rem; flex: none; border-radius: 14px;
  color: var(--ac-hi, var(--text));
  background: linear-gradient(140deg, color-mix(in srgb, var(--ac, #1a5ffc) 34%, transparent), color-mix(in srgb, var(--ac2, #0bc2ac) 10%, transparent));
  border: 1px solid color-mix(in srgb, var(--ac, #1a5ffc) 45%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 30px -14px var(--ac, #1a5ffc);
}
.icon-tile svg { width: 1.75rem; height: 1.75rem; overflow: visible; }
[data-theme="light"] .icon-tile { background: linear-gradient(140deg, color-mix(in srgb, var(--ac) 16%, #fff), color-mix(in srgb, var(--ac2) 6%, #fff)); }
/* Small life in the icons. */
.ic-led { animation: ic-blink 2.4s steps(1) infinite; }
.ic-led.d2 { animation-delay: -0.8s; animation-duration: 1.7s; }
.ic-led.d3 { animation-delay: -1.3s; animation-duration: 3.1s; }
@keyframes ic-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0.25; } }
.ic-blink { animation: ic-blink 1.6s steps(1) infinite; }
.ic-type { stroke-dasharray: 24; animation: ic-type 3.2s ease-in-out infinite; }
@keyframes ic-type { 0% { stroke-dashoffset: 24; } 45%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -24; } }
.ic-up { animation: ic-up 2.6s ease-in-out infinite; }
@keyframes ic-up { 0%, 100% { transform: translateY(2px); opacity: 0.6; } 50% { transform: translateY(-2px); opacity: 1; } }
.ic-check { stroke-dasharray: 20; animation: ic-check 3s ease-in-out infinite; }
@keyframes ic-check { 0%, 20% { stroke-dashoffset: 20; } 50%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 20; } }
.ic-packet { offset-path: path("M24 9 L9 37 L39 37 Z"); animation: ic-packet 3.6s linear infinite; }
@keyframes ic-packet { to { offset-distance: 100%; } }

/* ---------- Service cards ---------- */
.service { overflow: hidden; }
.service::before { opacity: 1; background: radial-gradient(26rem 16rem at 100% 0%, color-mix(in srgb, var(--ac) 16%, transparent), transparent 70%); }
.service .icon-tile { margin-bottom: var(--space-xl); }
.service-list li::before { background: var(--ac-hi, var(--text-3)); opacity: 0.55; transition: opacity 600ms ease; }
.service:hover .service-list li::before { background: var(--ac-hi, var(--text-3)); opacity: 1; }
/* Case studies: bullets in the client's colour. */
.case-built .service-list li::before { background: var(--c1, var(--text-3)); opacity: 0.9; }
/* The big letter: a quiet watermark that fills with the practice colour slowly on hover. */
.service-num {
  position: absolute; top: 0.9rem; inset-inline-end: 1.4rem; margin: 0;
  font-size: clamp(4.5rem, 3rem + 4vw, 7.5rem);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.01)) !important;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.service-num::after {
  content: attr(data-l); position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--ac-hi), color-mix(in srgb, var(--ac) 30%, transparent) 75%, transparent);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transition: opacity 1200ms cubic-bezier(.4, 0, .2, 1);
}
.service:hover .service-num::after { opacity: 1; }
[data-theme="light"] .service-num { background-image: linear-gradient(180deg, rgba(11, 16, 32, 0.12), rgba(11, 16, 32, 0.01)) !important; }
.service-more { color: var(--ac-hi); }

/* ---------- Places: where the work runs, each with its live local time ---------- */
.places { padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) clamp(2rem, 1rem + 3vw, 4rem); }
.places-grid { margin-top: var(--space-l); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-m); }
.place { position: relative; display: grid; gap: 0.2rem; padding: var(--space-l) 0 0; border-top: 1px solid var(--line); }
.place::before { content: ""; position: absolute; top: -1px; inset-inline-start: 0; width: 3rem; height: 2px; background: linear-gradient(90deg, var(--ac), var(--ac2)); box-shadow: 0 0 14px var(--ac); }
.place-time { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ac-hi); display: inline-flex; align-items: center; gap: 0.5rem; direction: ltr; justify-self: start; }
.place-time::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--ac); box-shadow: 0 0 10px var(--ac); animation: pulse 2.4s ease-in-out infinite; }
.place-name {
  margin-top: var(--space-s); font-size: clamp(2.2rem, 1.4rem + 3vw, 4rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.04em;
  background: linear-gradient(120deg, var(--ac-hi), var(--ac2) 130%); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-inline: 0.05em; margin-inline: -0.05em;
}
.place-country { color: var(--text-2); }
.place-projects { margin-top: var(--space-s); display: flex; flex-wrap: wrap; gap: 0.4rem; }
.place-project { justify-self: start; font-size: 0.9rem; color: var(--text); text-decoration: none; padding: 0.3rem 0.75rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ac) 40%, var(--line)); background: color-mix(in srgb, var(--ac) 10%, transparent); transition: background-color 200ms ease; }
.place-project:hover { background: color-mix(in srgb, var(--ac) 22%, transparent); }
[dir="rtl"] .place-name { line-height: 1.35; }
@media (max-width: 52rem) { .places-grid { grid-template-columns: 1fr; gap: var(--space-xl); } }

/* ---------- Band: two rows, the second outlined and running the other way ---------- */
.band { display: grid; gap: 0.6rem; }
.band-track span { color: transparent; background: linear-gradient(90deg, #9bb8ff, #5eead4 50%, #b9a9ff); -webkit-background-clip: text; background-clip: text; }
.band-track-alt { animation-direction: reverse; animation-duration: 75s; }
.band-track-alt span { background: none; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.18); }
[data-theme="light"] .band-track span { background-image: linear-gradient(90deg, #1450d9, #067a6c 50%, #4f35d2); }
[data-theme="light"] .band-track-alt span { background: none; -webkit-text-stroke-color: rgba(11, 16, 32, 0.18); }

/* ---------- Section colour pools that drift slowly ---------- */
.aura { isolation: isolate; }
.aura::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: 5% -10% auto auto; width: min(60rem, 90vw); aspect-ratio: 1.4;
  background: radial-gradient(closest-side, var(--pool), transparent);
  opacity: 0.55; animation: drift 22s ease-in-out infinite alternate;
}
.aura-teal   { --pool: rgba(11, 194, 172, 0.16); }
.aura-blue   { --pool: rgba(26, 95, 252, 0.18); }
.aura-violet { --pool: rgba(107, 77, 245, 0.18); }
.aura-violet::before, .aura:nth-of-type(even)::before { inset: 10% auto auto -12%; }
@keyframes drift { to { transform: translate(-6%, 8%) scale(1.12); } }

/* ---------- Approach: a timeline with light running along it ---------- */
.timeline { position: relative; padding-top: 1.5rem; }
.timeline-rail { position: absolute; top: 0; inset-inline: 0; height: 2px; list-style: none; background: linear-gradient(90deg, rgba(11, 194, 172, 0.5), rgba(26, 95, 252, 0.5), rgba(107, 77, 245, 0.5), rgba(11, 194, 172, 0.5)); border-radius: 2px; overflow: hidden; }
.timeline-rail::after { content: ""; position: absolute; top: -2px; bottom: -2px; width: 18%; background: linear-gradient(90deg, transparent, #fff, transparent); filter: drop-shadow(0 0 6px #9bb8ff); animation: rail 4.5s cubic-bezier(.5, 0, .5, 1) infinite; }
[dir="rtl"] .timeline-rail::after { animation-direction: reverse; }
@keyframes rail { from { transform: translateX(-110%); } to { transform: translateX(560%); } }
.step { overflow: hidden; }
.step::before { opacity: 1; background: radial-gradient(18rem 12rem at 0% 0%, color-mix(in srgb, var(--ac) 14%, transparent), transparent 70%); }
.step-marker { background: linear-gradient(90deg, transparent, var(--ac), transparent); opacity: 0.9; }
@media (max-width: 60rem) { .timeline-rail { display: none; } }

/* ---------- Glowing gradient border that slowly turns ---------- */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.glow-border { position: relative; }
.glow-border::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 1;
  background: conic-gradient(from var(--spin), transparent 0 55%, #4c83ff 70%, #0bc2ac 80%, #8e7bff 90%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin 9s linear infinite;
}
@keyframes spin { to { --spin: 360deg; } }
.plan.is-featured.glow-border::after { inset: 0; }

/* ---------- Work cards in their clients' colours ---------- */
.work-card { transition: transform 500ms var(--ease-glass), box-shadow 500ms ease, border-color 500ms ease; }
.work-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c1) 45%, transparent); box-shadow: var(--edge), 0 40px 80px -36px color-mix(in srgb, var(--c1) 70%, transparent), 0 20px 50px -30px color-mix(in srgb, var(--c2) 60%, transparent); }
.work-card::before { background: radial-gradient(30rem circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c1) 16%, transparent), transparent 50%); }
.work-bar span:first-child::before { color: var(--c1); opacity: 0.8; }
.work-tags li { border-color: color-mix(in srgb, var(--c1) 30%, var(--line)); }
.work-card:hover .work-tags li { color: var(--text); background: color-mix(in srgb, var(--c1) 14%, transparent); }
.next-project { overflow: hidden; }
.next-project::before { opacity: 1; background: radial-gradient(40rem 20rem at 100% 50%, color-mix(in srgb, var(--c1) 22%, transparent), transparent 70%); }
.next-name { background: linear-gradient(100deg, var(--text) 40%, var(--c1) 80%, var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Inner page headers: colour pool + a giant outlined title far behind ---------- */
.page-hero::before { -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.page-hero::before { background: radial-gradient(42rem 24rem at 82% 28%, color-mix(in srgb, var(--ac) 26%, transparent), transparent 70%), radial-gradient(30rem 18rem at 8% 85%, color-mix(in srgb, var(--ac2) 16%, transparent), transparent 70%); }
.page-hero[data-word]::after {
  content: attr(data-word); position: absolute; z-index: -1; pointer-events: none; white-space: nowrap;
  inset-inline-end: -2vw; bottom: -0.18em; font-size: clamp(6rem, 3rem + 14vw, 18rem); font-weight: 700; letter-spacing: -0.06em; line-height: 1;
  /* A faint gradient fill (an outline would show the variable font's overlapping contours). */
  color: transparent; background: linear-gradient(180deg, color-mix(in srgb, var(--ac-hi) 16%, transparent), transparent 85%);
  -webkit-background-clip: text; background-clip: text;
}
[dir="rtl"] .page-hero[data-word]::after { letter-spacing: 0; }
.page-hero h1 { background-image: linear-gradient(180deg, #fff 30%, color-mix(in srgb, var(--ac-hi) 70%, #b9c2d2) 120%); }
[data-theme="light"] .page-hero h1 { background-image: linear-gradient(180deg, #0b1020 40%, var(--ac-hi) 140%); }
.crumbs [aria-current] { color: var(--ac-hi); }
.tool-list li { border-color: color-mix(in srgb, var(--ac, #1a5ffc) 35%, var(--line)); }

/* ---------- Feature lists, principles, contact steps ---------- */
.feature-list li { position: relative; overflow: hidden; }
.feature-list li::before { opacity: 1; background: radial-gradient(16rem 10rem at 100% 0%, color-mix(in srgb, var(--ac) 12%, transparent), transparent 70%); }
.principles-list > div::before { background: linear-gradient(90deg, var(--ac), var(--ac2)); box-shadow: 0 0 12px var(--ac); }
.principles-list .icon-tile { margin-bottom: var(--space-m); width: 2.75rem; height: 2.75rem; border-radius: 12px; }
.principles-list .icon-tile svg { width: 1.45rem; height: 1.45rem; }
.stack-grid .icon-tile { margin-bottom: var(--space-s); }
.stack-grid li:hover { border-color: color-mix(in srgb, var(--ac) 45%, transparent); }

/* ---------- The horizon: every page looks out toward a lit horizon ----------
   A perspective grid recedes to a glowing line in the logo colours; it drifts
   toward you very slowly. One fixed layer, animated with transform only. */
.horizon { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; perspective: 340px; perspective-origin: 50% 62%; }
.horizon-grid {
  position: absolute; left: -60%; right: -60%; top: 62%; height: 160%;
  transform-origin: 50% 0; transform: rotateX(78deg);
  background:
    repeating-linear-gradient(90deg, rgba(120, 160, 255, 0.16) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(120, 160, 255, 0.16) 0 1px, transparent 1px 80px);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 40%, transparent 85%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 40%, transparent 85%);
  animation: approach 14s linear infinite;
  opacity: 0.55;
}
@keyframes approach { from { transform: rotateX(78deg) translateY(0); } to { transform: rotateX(78deg) translateY(80px); } }
.horizon-glow {
  position: absolute; left: 0; right: 0; top: calc(62% - 30vh); height: 60vh;
  /* A wide, soft bloom: no hard edges anywhere. */
  background:
    radial-gradient(70% 22% at 50% 50%, rgba(26, 95, 252, 0.16), transparent 75%),
    radial-gradient(34% 18% at 36% 52%, rgba(11, 194, 172, 0.10), transparent 75%),
    radial-gradient(34% 18% at 66% 48%, rgba(107, 77, 245, 0.10), transparent 75%);
}
/* The horizon itself: one crisp hairline that fades out toward both ends. */
.horizon-glow::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.55) 25%, rgba(220, 232, 255, 0.85) 50%, rgba(185, 169, 255, 0.55) 75%, transparent);
  box-shadow: 0 0 12px 1px rgba(120, 160, 255, 0.35);
}
/* Distant points of light above the horizon. */
.horizon::before {
  content: ""; position: absolute; inset: 0 0 40% 0; opacity: 0.6;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #cfe0ff, transparent), radial-gradient(1px 1px at 28% 38%, #9bb8ff, transparent),
    radial-gradient(1.5px 1.5px at 46% 14%, #fff, transparent), radial-gradient(1px 1px at 63% 33%, #5eead4, transparent),
    radial-gradient(1px 1px at 78% 18%, #cfe0ff, transparent), radial-gradient(1.5px 1.5px at 88% 41%, #b9a9ff, transparent),
    radial-gradient(1px 1px at 7% 47%, #9bb8ff, transparent), radial-gradient(1px 1px at 54% 51%, #fff, transparent),
    radial-gradient(1px 1px at 36% 8%, #5eead4, transparent), radial-gradient(1px 1px at 95% 9%, #fff, transparent);
}
[data-theme="light"] .horizon-grid { background: repeating-linear-gradient(90deg, rgba(26, 60, 140, 0.10) 0 1px, transparent 1px 80px), repeating-linear-gradient(0deg, rgba(26, 60, 140, 0.10) 0 1px, transparent 1px 80px); }
[data-theme="light"] .horizon-glow { background: radial-gradient(70% 22% at 50% 50%, rgba(26, 95, 252, 0.06), transparent 75%); }
[data-theme="light"] .horizon-glow::before { background: linear-gradient(90deg, transparent, rgba(26, 95, 252, 0.22) 30%, rgba(26, 95, 252, 0.32) 50%, rgba(107, 77, 245, 0.22) 70%, transparent); box-shadow: none; }
[data-theme="light"] .horizon::before { opacity: 0; }
@media (max-width: 40rem) { .horizon { perspective: 260px; } .horizon-grid { opacity: 0.4; } }

/* Phones: no oversized footer lockup (and so no footer glass to render). */
@media (max-width: 40rem) {
  .footer-word { display: none; }
  .site-footer { padding-bottom: var(--space-2xl); }
}

/* Arabic: gradient text is painted only inside its box, and Arabic letters reach well
   below (ي ج ح) and above (أ) the line. Extend the paint area with padding and cancel
   the layout shift with an equal negative margin, so nothing is cropped. */
[dir="rtl"] :is(h1, h2, .place-name, .next-name, .service-num, .fact-n) {
  padding-block: 0.12em 0.32em; margin-block-end: -0.32em;
}
[dir="rtl"] :is(h1, h2) { margin-block-start: -0.12em; }
[dir="rtl"] :is(.hero-copy h1 em, .band-track span, .footer-word span) { padding-block: 0.15em 0.35em; }
[dir="rtl"] .band-track span { line-height: 1.5; }
[dir="rtl"] .page-hero[data-word]::after { line-height: 1.4; bottom: -0.3em; }

/* Project cards: the edge light, sheen and coloured glow ease in slowly. The reveal rule
   also sets transitions on these cards, so both are listed here together. */
.work-card::before, .work-card::after { transition: opacity 1200ms cubic-bezier(.4, 0, .2, 1); }
.work-card, .reveal-ready .work-card[data-reveal] {
  transition: opacity 1200ms var(--ease-calm), transform 1400ms var(--ease-calm), filter 1200ms var(--ease-calm), box-shadow 1200ms cubic-bezier(.4, 0, .2, 1), border-color 1200ms cubic-bezier(.4, 0, .2, 1);
  transition-delay: 0ms;
}

/* A full-width project card: screenshot beside the text instead of above it. */
.work-card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-xl); align-items: center; padding: var(--space-s); }
.work-card-wide .work-meta { grid-template-columns: 1fr; padding: var(--space-l); }
.work-card-wide .work-tags { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
@media (max-width: 60rem) { .work-card-wide { grid-template-columns: 1fr; } }

/* ---------- Client logo row (home + Work) ----------
   Calm on purpose: no glow, no motion beyond a hover lift. Logos sit on a light tile in both themes
   so every client's own colours read correctly. */
.clients { padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) 0; }
.clients-tight { padding-block: 0 clamp(1rem, 0.5rem + 2vw, 2rem); }
.clients-list { margin-top: var(--space-m); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-s); list-style: none; padding: 0; }
.client { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.9rem 0.6rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius-m); color: var(--text-2); text-decoration: none; transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease; min-height: 4.25rem; }
[dir="rtl"] .client { padding: 0.6rem 0.6rem 0.6rem 0.9rem; }
.client:hover, .client:focus-visible { border-color: var(--line-2); color: var(--text); transform: translateY(-2px); }
.client-tile { flex: none; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: var(--radius-s); background: #f6f5f1; }
.client-tile img { display: block; width: auto; height: auto; max-width: 2.6rem; max-height: 2.5rem; }
.client-name { font-size: 0.95rem; font-weight: 500; line-height: 1.25; }
[data-theme="light"] .client-tile { background: #fff; box-shadow: inset 0 0 0 1px rgba(10, 31, 58, 0.08); }
@media (max-width: 980px) { .clients-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Phone: no cards. One row of the five marks, evenly spaced; names stay for screen readers. */
@media (max-width: 620px) {
  .clients { padding-bottom: var(--space-l); }
  .clients-list { display: flex; justify-content: space-between; gap: var(--space-xs); margin-top: var(--space-s); }
  .client { padding: 0; border: 0; min-height: 0; border-radius: var(--radius-s); }
  [dir="rtl"] .client { padding: 0; }
  .client:hover, .client:focus-visible { transform: none; }
  .client-tile { width: 3.25rem; height: 3.25rem; }
  .client-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .client { transition: none; } .client:hover { transform: none; } }

/* ---------- Cards are opaque: the background horizon line must not show through them ---------- */
.glass { background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)), var(--bg-2); }
[data-theme="light"] .glass { background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.5)), var(--bg-2); }

/* ---------- Phone pass (≤620px): calmer labels, fewer strips, a shorter home page ---------- */
@media (max-width: 620px) {
  /* Section labels in normal case, not spaced mono capitals that wrap into noise. */
  .section-index { font-family: var(--font-sans); font-size: 0.95rem; letter-spacing: 0; text-transform: none; color: var(--text-2); line-height: 1.4; }

  /* No ticker band, no clocks. */
  .band, .place-time { display: none; }

  /* Places: one compact row per place: name and country on the left, projects on the right. */
  .places-grid { gap: 0; margin-top: var(--space-s); }
  .place { grid-template-columns: 1fr auto; column-gap: var(--space-s); align-items: center; padding: var(--space-s) 0; }
  .place::before { width: 2rem; }
  .place-name { margin: 0; font-size: 1.75rem; }
  .place-country { grid-column: 1; font-size: 0.9rem; }
  .place-projects { grid-column: 2; grid-row: 1 / span 2; margin: 0; flex-direction: column; align-items: flex-end; }
  .place-project { font-size: 0.8rem; padding: 0.25rem 0.6rem; }

  /* Home only (the home body has no .page class): trim cards to what is needed to choose. */
  body:not(.page) #services .service-list { display: none; }
  body:not(.page) #work .work-viewport { aspect-ratio: 16 / 9; }
  body:not(.page) #work .work-tags { display: none; }
  body:not(.page) #approach .step-out { display: none; }
  body:not(.page) #work .work-meta p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

  /* In a single column the fixed horizon hairline crosses headings and text as you scroll: drop it on phones. */
  .horizon-glow::before { display: none; }
}

/* RTL: something positioned outside <body> widened the Arabic page by ~50px on phones; clip at the root too. */
html { overflow-x: clip; }

/* ---------- Phone review fixes ---------- */
.clients-where { display: none; }
@media (max-width: 56rem) {
  /* Solid menu panel: a blurred backdrop inside the blurred header doesn't blur, so the hero showed through. */
  .site-nav { background: #0c0f17; -webkit-backdrop-filter: none; backdrop-filter: none; }
  [data-theme="light"] .site-nav { background: #f8fafd; }
}
@media (max-width: 60rem) {
  /* The wide (Zifaf) card lines up with the other cards once it is a single column. */
  .work-card-wide { gap: var(--space-l); align-items: stretch; padding-bottom: var(--space-l); }
  .work-card-wide .work-meta { padding: 0 var(--space-s); }
}
@media (max-width: 620px) {
  /* Tighter rhythm between sections. */
  :root { --section-y: 3.5rem; }
  .work-more { margin-top: var(--space-xl); }

  /* One section for clients and places: the logos, then one line saying where the work runs. */
  .places { display: none; }
  .clients { padding-bottom: var(--space-s); }
  .clients-where { display: block; margin-top: var(--space-m); color: var(--text-2); font-size: 0.95rem; }

  /* Home: the three strongest projects; the rest are one tap away under "All work". */
  body:not(.page) #work .work-card:nth-child(n + 4) { display: none; }

  /* Footer links: comfortable tap targets. */
  .footer-col ul { gap: 0; }
  .footer-col a, .footer-mail a { display: inline-block; padding-block: 0.45rem; }
}

/* ---------- Phone: hero bottom and the clients block read as one tidy unit ---------- */
@media (max-width: 620px) {
  .hero-stack { padding-bottom: var(--space-l); }
  .clients { padding-top: var(--space-2xl); }
  /* Logos sit at a fixed gap from the start edge instead of being spread across the width. */
  .clients-list { justify-content: flex-start; gap: 0.75rem; }
  /* Where the work runs: a small line of places with a dot in each place's colour, not a second sentence. */
  .clients-where { margin-top: var(--space-m); font-size: 0.85rem; color: var(--text-2); }
  .clients-places { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
  .clients-places span { display: inline-flex; align-items: center; gap: 0.45rem; }
  .clients-places span::before { content: ""; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--ac); }
}

/* ---------- Phone review 5–9 ---------- */
@media (max-width: 620px) {
  /* 5. Hero says it once: no spaced-capitals line, no chips (the services section right below covers them). */
  .hero-stack { display: none; }
  .hero-copy { padding-bottom: var(--space-2xl); }

  /* 6. Services: no ghost letters; icon beside the title; a compact card for one sentence. */
  .service-num { display: none; }
  .service { padding: var(--space-l); display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-m); align-items: center; }
  .service .icon-tile { margin: 0; width: 2.75rem; height: 2.75rem; border-radius: 12px; }
  .service .icon-tile svg { width: 1.4rem; height: 1.4rem; }
  .service h3 { font-size: var(--step-1); }
  .service-summary, .service-list, .service-more { grid-column: 1 / -1; }
  .service-summary { margin-top: var(--space-s); font-size: 0.95rem; }
  .service-more { padding-top: var(--space-s); }

  /* 7. How we work (home): a plain list, not four cards. */
  body:not(.page) #approach .steps { gap: 0; padding-top: 0; }
  body:not(.page) #approach .step { display: block; padding: var(--space-m) 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; overflow: visible; }
  body:not(.page) #approach .step::before, body:not(.page) #approach .step::after, body:not(.page) #approach .step-marker { display: none; }
  body:not(.page) #approach .step h3 { font-size: var(--step-1); }
  body:not(.page) #approach .step p { margin: 0.3rem 0 0; }

  /* 9. Footer headings in normal case, like every other label on the phone. */
  .footer-head { font-family: var(--font-sans); font-size: 0.85rem; letter-spacing: 0; text-transform: none; }
}
