/* ==================================================================================================
   ONE SERVICE (/services/<slug>) — four sections, four different spaces.

     01 .sd-hero   A REAL OBJECT, modelled and lit, turning on a stage (assets/js/flow/svchero.js draws
                   into .sd-hero__canvas). The three beats run along the front of the stage.
     02 .sd-build  ONE PANEL holding everything the client gets: four solid blocks standing out of it,
                   and the six capabilities set along its front edge. Two lists, one object.
     03 .sd-wall   THINGS SET INTO A SURFACE — the exact opposite of 02. Each item is at the bottom of a
                   recess with four visible inner faces.
     04 .sd-close  THE POINT, AN APERTURE, AND THE WAY TO START.

   What holds four different compositions together as one page:

   ONE MEASURE. Every head, rack and object starts on the same left edge — the .rx-wrap gutter. Where a
   raked or extruded surface projects wider than its box, the stage around it is inset instead, so the edge
   the eye follows down the page never moves.

   ONE SPACING SCALE (--sd-gap between sections, --sd-sec inside one, --sd-head from a head to its
   content, --sd-item inside a rack) and ONE DEPTH SCALE (--sd-e1 … --sd-e5, plus --sd-lift for something
   chosen). A shadow says how far off the page a thing is, so a chip, a resting plate and a block standing
   out of a panel must not share one — and a recess gets an *inset* shadow, because nothing is standing off
   the page there to cast one.

   A SECTION IS A SURFACE: a plate inset from the edge of the screen with a hairline, a soft shadow and a
   gap beneath it, sized so one section and its gap come to one viewport.

   TEXT IS NEVER LEFT ROTATED, and EVERY RACK IS INERT (pointer-events) except the one control inside it —
   hit testing in preserve-3d follows 3D position, so a container at z=0 swallows anything behind it.
   AND THE HIT TARGET NEVER MOVES ON HOVER: re-projecting the element under the cursor shifts it mid
   transition and a click that began on it lands beside it. Hover moves the inert layers instead.
   ================================================================================================== */

.sw {
  /* rhythm */
  --sd-gap: clamp(34px, 5vh, 76px);
  --sd-inset: clamp(12px, 1.6vw, 26px);
  --sd-sec: clamp(34px, 4.6vh, 64px);
  --sd-head: clamp(30px, 4.4vh, 58px);
  --sd-item: clamp(14px, 1.7vw, 26px);

  /* depth */
  --sd-e1: 0 2px 6px -3px rgba(0,0,0,.55);
  --sd-e2: 0 12px 26px -18px rgba(0,0,0,.78);
  --sd-e3: 0 26px 52px -30px rgba(0,0,0,.88);
  --sd-e4: 0 44px 84px -46px rgba(0,0,0,.92);
  --sd-e5: 0 70px 120px -64px rgba(0,0,0,.95);
  --sd-lift: 0 30px 60px -32px rgba(0,0,0,.9), 0 12px 34px -22px var(--s-tint, rgba(206, 152, 153,.45));

  /* motion — long, soft and out; nothing here arrives with a bounce */
  --sd-ease: cubic-bezier(.16, .84, .3, 1);
  --sd-slow: 1.15s;
}

/* ---------- the page's own rhythm ---------- */
.sd-sec { position: relative; z-index: 2; margin: 0 0 var(--sd-gap); }
.sd-sec > .rx-wrap {
  padding-block: var(--sd-sec);
  /* a section and its gap come to one screen, and what it holds is centred in that */
  min-height: calc(100dvh - var(--rx-header-h) - var(--sd-gap));
  display: grid; align-content: center; }

/* ---------- what separates one section from the next ----------
   A hairline lying on the page's own measure with a soft shadow falling from it. That is all: the eye
   reads the break, and neither section has been put in a box to achieve it. */
.sd-hero::after, .sd-sec::after {
  content: ""; position: absolute; left: var(--rx-pad); right: var(--rx-pad);
  bottom: calc(var(--sd-gap) / -2); height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.085) 16%,
    rgba(255,255,255,.085) 84%, rgba(255,255,255,0));
  box-shadow: 0 16px 30px -14px rgba(0,0,0,.95); }

.sd-head { max-width: 62ch; margin: 0 0 var(--sd-head); }
.sd-n { font-weight: 600; color: var(--rx-c1); letter-spacing: .14em; }
.sd-n::after { content: ""; display: inline-block; width: 14px; height: 1px; margin: 0 9px 3px 10px;
  background: rgba(245,239,238,.26); vertical-align: middle; }
.sd-head .rx-eyebrow { margin: 0 0 14px; }
.sd-head__h { margin: 0; font: 500 var(--s-h2)/1.1 var(--rx-sans); letter-spacing: -.032em; max-width: 24ch; }
.sd-head__intro { margin: 15px 0 0; max-width: 58ch; font: 400 var(--s-lead)/1.72 var(--rx-sans);
  color: rgba(245,239,238,.72); }

/* ---------- WHO TAKES A POINTER ----------
   Every preserve-3d container on this page is inert and the controls opt back in. This is stated once,
   here, rather than left to each section, because it has gone wrong three times in the same way: a
   container is a flat box at z=0 spanning its children, hit testing inside preserve-3d resolves by 3D
   position rather than by z-index or DOM order, and so the container wins against its own contents and
   nothing inside it can be clicked at all. Add a new stage, rack or shelf to the first line. */
.sd-hero__inner, .sd-gates, .bd-stage, .bd-blocks, .bd-edge, .bd-keys, .sd-niches,
.bd-plinth, .sd-hero__space { pointer-events: none; }
.sd-crumbs a, .sd-hero__ctas .rx-btn, .sd-hero__canvas, .sd-gate__pick,
.bd-block__pick, .bd-key, .sd-niche__pick { pointer-events: auto; }

/* the marks: one weight, one join, tinted by whatever they sit on */
.sd-sec .cic, .sd-hero .cic { width: 100%; height: 100%; fill: none; stroke: currentColor;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* ==================================================================================================
   ON SCROLL — each section arrives when it reaches the screen, and arrives as itself.
   ui/rise.js marks a section .is-on the first time it intersects; the rest is here. It runs once and
   never in reverse, moves in depth as well as in Y so it reads as approach rather than as a slide, and
   staggers the pieces so a section is not one block landing at once.
   Anything already carrying a transform expresses its arrival inside that transform (--rvy) or in its
   own --at, because `transform: none` would flatten it.
   ================================================================================================== */
.js [data-reveal] .sd-head > *,
.js [data-reveal] .bd-block,
.js [data-reveal] .bd-edge,
.js [data-reveal] .sd-niche,
.js [data-reveal] .sd-act__body > *,
.js [data-reveal] .sd-hero__copy > *,
.js [data-reveal] .sd-crumbs {
  opacity: 0; transform: translate3d(0, 30px, -210px);
  transition: opacity .9s var(--rx-ease), transform var(--sd-slow) var(--sd-ease);
  transition-delay: calc(var(--i, 0) * 90ms); }

.js [data-reveal].is-on .sd-head > *,
.js [data-reveal].is-on .bd-block,
.js [data-reveal].is-on .bd-edge,
.js [data-reveal].is-on .sd-niche,
.js [data-reveal].is-on .sd-act__body > *,
.js [data-reveal].is-on .sd-hero__copy > *,
.js [data-reveal].is-on .sd-crumbs { opacity: 1;
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), 0); }

.js [data-reveal] .sd-head > *:nth-child(2) { transition-delay: 110ms; }
.js [data-reveal] .sd-head > *:nth-child(3) { transition-delay: 200ms; }
.js [data-reveal] .sd-hero__copy > *:nth-child(1) { transition-delay: 90ms; }
.js [data-reveal] .sd-hero__copy > *:nth-child(2) { transition-delay: 170ms; }
.js [data-reveal] .sd-hero__copy > *:nth-child(3) { transition-delay: 250ms; }
.js [data-reveal] .sd-hero__copy > *:nth-child(4) { transition-delay: 340ms; }
/* The object is where it belongs from the first frame it exists on; only its opacity arrives. The same
   transform in both states, so the rig keeps the pointer parallax every other layer on the page has. */
.js [data-reveal] .sd-hero__rig,
.js [data-reveal].is-on .sd-hero__rig {
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), var(--sz, 0px)); }
.js [data-reveal] .sd-hero__rig { opacity: 0; transition: opacity .38s var(--rx-ease); transition-delay: 0ms; }
.js [data-reveal].is-on .sd-hero__rig { opacity: 1; }

/* the blocks come out of the panel one after another, and the edge follows them */
.js [data-reveal] .bd-block { transition-delay: calc(140ms + var(--i, 0) * 110ms); }
.js [data-reveal] .bd-edge { transition-delay: 620ms; }
.js [data-reveal] .bd-key { opacity: 0; transform: translate3d(0, 10px, -90px);
  transition: opacity .6s var(--rx-ease), transform .8s var(--sd-ease);
  transition-delay: calc(700ms + var(--i, 0) * 60ms); }
.js [data-reveal].is-on .bd-key { opacity: 1; transform: translate3d(0, 0, var(--kz, 10px)); }
.js [data-reveal] .sd-niche { transition-delay: calc(140ms + var(--i, 0) * 100ms); }

/* the gates come up out of the stage rather than forward out of it */
.js [data-reveal] .sd-gate { opacity: 0; --rvy: 30px;
  transition: opacity .8s var(--rx-ease), transform var(--sd-slow) var(--sd-ease);
  transition-delay: calc(420ms + var(--i, 0) * 90ms); }
.js [data-reveal].is-on .sd-gate { opacity: 1; --rvy: 0px; }

/* and the aperture opens: the frames travel out to their depths instead of being there already */
.js [data-reveal] .sd-act__body > *:nth-child(2) { transition-delay: 200ms; }
.js [data-reveal] .sd-act__frame { opacity: 0;
  transform: translate(-50%, -50%) translateZ(0px);
  transition: opacity .9s var(--rx-ease), transform 1.5s var(--sd-ease);
  transition-delay: calc(200ms + var(--d, 0) * 120ms); }
.js [data-reveal].is-on .sd-act__frame { opacity: calc(.07 + var(--d) * .15);
  transform: translate(-50%, -50%) translateZ(calc(var(--d) * -190px)); }
.js [data-reveal] .sd-also li { opacity: 0; transform: translate3d(0, 14px, 0);
  transition: opacity .7s var(--rx-ease), transform .9s var(--sd-ease);
  transition-delay: calc(380ms + var(--i, 0) * 70ms); }
.js [data-reveal].is-on .sd-also li { opacity: 1; transform: none; }

.no-js [data-reveal] *, .rx-no-rise [data-reveal] * { opacity: 1 !important; }

/* ==================================================================================================
   01 — THE OBJECT
   A stage with one real object on it, drawn in WebGL. The copy stands beside it on the page's own left
   edge and the three beats run along the front of the stage under both.
   ================================================================================================== */
/* what is left for the stage once the crumbs, the three cards, the gaps and the padding have had theirs */
.sd-hero { --sd-rig-h: calc((100svh - var(--rx-header-h)) * .5);
  position: relative; overflow: hidden; isolation: isolate;
  min-height: calc(100dvh - var(--rx-header-h) - var(--sd-gap));
  display: grid; align-items: center;
  padding: clamp(34px, 5.2vh, 76px) 0 clamp(16px, 2.2vh, 32px);
  margin-bottom: var(--sd-gap);
  perspective: 1500px; perspective-origin: 50% 44%; }

.sd-hero__space { position: absolute; inset: 0; z-index: 0; pointer-events: none; transform-style: preserve-3d; }
/* ---------- the four variables every layer composes ----------
   ui/depth.js writes --px/--py (where the pointer is) and --sy/--sz (how far this section has travelled
   through the viewport) onto anything marked [data-depth], each scaled by that layer's own stated
   distance. Every rule that takes them folds them into the transform it already had rather than being
   given one, so an arrival animation and a parallax can share an element without either overwriting the
   other — which is the trap that makes this kind of thing look broken on the second scroll.

   Type-bearing layers take --sy only. Travelling in Z changes an element's size under perspective, and on
   a paragraph that is a shimmer; on a floor, a plinth, a recess or an aperture frame it is the entire
   point, and it is the one cue a flat translation cannot give. Nothing is ever rotated by this: type on
   these pages is always square to the viewer. */
.sd-hero__floor, .sd-hero__horizon, .sd-gates, .sd-hero__copy, .bd-plinth, .bd-blocks, .bd-edge,
.sd-niche__box, .sd-act__frame, .sd-act__body {
  transition: transform .5s var(--rx-ease-out); }

.sd-hero__floor { position: absolute; left: -40%; right: -40%; bottom: -22%; height: 84%;
  transform-origin: bottom center;
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), var(--sz, 0px)) rotateX(80deg);
  background:
    repeating-linear-gradient(90deg, rgba(219,169,170,.15) 0 1.5px, rgba(0,0,0,0) 1.5px 5.2%),
    repeating-linear-gradient(0deg, rgba(219,169,170,.12) 0 1.5px, rgba(0,0,0,0) 1.5px 7.5%);
  -webkit-mask-image: radial-gradient(82% 104% at 50% 104%, #000 22%, transparent 76%);
          mask-image: radial-gradient(82% 104% at 50% 104%, #000 22%, transparent 76%); }
.sd-hero__horizon { position: absolute; left: 50%; top: 56%; width: 66%; height: 240px;
  transform: translate(-50%, -50%) translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), var(--sz, 0px));
  background: radial-gradient(closest-side, var(--s-tint, rgba(206, 152, 153,.45)), rgba(206, 152, 153,0) 72%);
  opacity: .2; }

.sd-hero__inner { position: relative; z-index: 2; transform-style: preserve-3d; pointer-events: none;
  display: grid; align-items: start;
  grid-template-columns: minmax(0, 1fr) calc(var(--sd-rig-h) * 2.02) minmax(0, .04fr);
  /* Two rows, not three. The breadcrumbs used to have a full-width row of their own above the pair, so
     the space that centring a short copy block against a tall object creates fell BETWEEN the crumbs and
     the eyebrow — a hole in the middle of the composition. They belong to the words, so they sit with
     them, and the leftover falls above the whole block where it reads as the top of the page. */
  grid-template-areas: "copy rig ." "gates gates gates";
  column-gap: clamp(22px, 2.4vw, 48px); row-gap: clamp(10px, 1.8vh, 26px); }


.sd-hero__copy { grid-area: copy; position: relative; align-self: start;
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), 0);
  transition: transform .5s var(--rx-ease); }
.sd-hero__eyebrow { margin: 0 0 16px; }
.sd-hero__h { margin: 0; font: 500 var(--s-h1)/1.05 var(--rx-sans); letter-spacing: -.038em; max-width: 18ch;
  text-shadow: 0 8px 40px rgba(6,9,16,.7); }
.sd-hero__lede { margin: clamp(12px, 1.8vh, 20px) 0 0; max-width: 50ch; font: 400 var(--s-lead)/1.72 var(--rx-sans);
  color: rgba(245,239,238,.76); }
.sd-hero__ctas { margin-top: clamp(16px, 2.6vh, 32px); display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- where the object stands ----------
   The canvas is only as big as the object's own column: this is a second WebGL context on a page that
   already has the background one, and a full-window canvas here would cost the whole page. The pool of
   light under it is CSS, so the object is standing somewhere even before the scene has loaded. */
.sd-hero__rig { grid-area: rig; position: relative; width: 100%; height: var(--sd-rig-h); }
.sd-hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* The object is never half-built on screen. Until it exists there is a pool of light on the stage where
   it is going to stand (the plinth below), so the frame is never simply empty, and the canvas is not
   shown at all until it has been measured, lit and framed — at which point it crosses over that pool in
   under a fifth of a second, already finished. Gated on .js so the canvas is visible to anything that
   never runs the script. */
.js .sd-hero__canvas { opacity: 0; transition: opacity .18s linear; }
.js .sd-hero__canvas.is-ready { opacity: 1; }
.sd-hero__plinth { position: absolute; left: 8%; right: 8%; bottom: 6%; height: 26%;
  transform-origin: bottom center; transform: rotateX(76deg); border-radius: 50%;
  background: radial-gradient(closest-side, var(--s-tint, rgba(206, 152, 153,.4)), rgba(206, 152, 153,0) 72%);
  opacity: .3; pointer-events: none; }

/* ---------- the three beats, along the front of the stage ----------
   Upright and facing the viewer; the depth is where they stand — the middle one nearer than the two
   beside it, so the three make a shallow V. Their depths never go below zero and the hero's content layer
   is inert, because a gate standing behind the plane of its own container cannot be clicked at all. */
.sd-gates { grid-area: gates; list-style: none; margin: 0; padding: 0; pointer-events: none;
  transform-style: preserve-3d;
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), 0);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sd-item); }
.sd-gate { transform-style: preserve-3d;
  transform: translate3d(var(--px, 0px), calc(var(--rvy, 0px) + var(--py, 0px)), var(--gz, 0px));
  transition: transform .8s var(--sd-ease); }
.sd-gate:nth-child(1), .sd-gate:nth-child(3) { --gz: 0px; }
.sd-gate:nth-child(2) { --gz: 58px; }
.sd-gate__pick { -webkit-appearance: none; appearance: none; border: 0; font: inherit; color: inherit;
  background: none; cursor: pointer; text-align: left; display: block; position: relative; width: 100%;
  height: 100%; transform-style: preserve-3d;
  padding: clamp(14px, 1.7vh, 22px) clamp(16px, 1.6vw, 22px); }
.sd-gate__pick > * { pointer-events: none; }
.sd-gate__pick::before { content: ""; position: absolute; inset: 0; border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0), var(--s-tint, rgba(206, 152, 153,.45)) 38%, rgba(255,255,255,0) 86%) top left / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(70,60,54,.3), rgba(10,14,24,.2));
  border: 1px solid rgba(255,255,255,.06); box-shadow: var(--sd-e2);
  transition: background .5s var(--rx-ease), border-color .5s var(--rx-ease), box-shadow .5s var(--rx-ease); }
.sd-gate__n, .sd-gate__h, .sd-gate__line { position: relative; display: block; }
.sd-gate__n { font: 500 11.5px/1 var(--rx-sans); letter-spacing: .16em; color: var(--rx-c1); opacity: .8; }
.sd-gate__h { margin-top: 7px; font: 500 15.5px/1.3 var(--rx-sans); letter-spacing: -.012em; }
.sd-gate__line { margin-top: 6px; font: 400 13px/1.6 var(--rx-sans); color: rgba(245,239,238,.62);
  transition: color .5s var(--rx-ease); }
.sd-gate__ring { position: absolute; left: 8%; right: 8%; bottom: -16px; height: 26px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--s-tint, rgba(206, 152, 153,.55)), rgba(206, 152, 153,0) 76%);
  opacity: 0; transition: opacity .6s var(--rx-ease); }
.sd-gate.is-at .sd-gate__pick::before {
  background:
    linear-gradient(90deg, rgba(255,255,255,0), var(--s-tint, rgba(206, 152, 153,.6)) 38%, rgba(255,255,255,0) 86%) top left / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(93,79,71,.48), rgba(12,17,28,.36));
  border-color: rgba(255,255,255,.16); box-shadow: var(--sd-lift); }
.sd-gate.is-at .sd-gate__ring { opacity: 1; }
.sd-gate.is-at .sd-gate__line { color: rgba(245,239,238,.86); }

/* ==================================================================================================
   02 — THE BUILD
   One panel carrying everything the client gets. The four things Ritexa delivers are solid blocks that
   stand *out* of it — each with a front face, a lit top face and a side you can see the thickness of —
   and the six capabilities that come with all of them are set along its front edge. Two lists, one
   object, so they read as one offer rather than as two sections that happen to look alike.

   Choosing a block pushes it further out of the panel and unfolds its line. The block's own hit target
   never moves: the depth lives on the faces inside it, all of which are inert.
   ================================================================================================== */
.bd-stage { position: relative; perspective: 1500px; perspective-origin: 50% -34%;
  transform-style: preserve-3d;
  padding: clamp(24px, 2.8vw, 40px) clamp(20px, 2.2vw, 34px) clamp(20px, 2.4vw, 32px); }
/* the panel everything is mounted on */
.bd-plinth { position: absolute; inset: 0; border-radius: clamp(14px, 1.6vw, 22px); pointer-events: none;
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), var(--sz, 0px));
  background:
    linear-gradient(90deg, rgba(255,255,255,0), var(--s-tint, rgba(206, 152, 153,.4)) 34%, rgba(255,255,255,0) 82%) top left / 100% 1px no-repeat,
    linear-gradient(168deg, rgba(52,44,40,.26), rgba(10,14,24,.16));
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), var(--sd-e2); }

.bd-blocks { position: relative; list-style: none; margin: 0; padding: 0; pointer-events: none;
  transform-style: preserve-3d;
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), 0);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.5vw, 22px); }
.bd-block { transform-style: preserve-3d; --d: 30px; }
.bd-block__pick { pointer-events: auto; -webkit-appearance: none; appearance: none; border: 0; padding: 0;
  font: inherit; color: inherit; background: none; cursor: pointer; text-align: left;
  position: relative; display: block; width: 100%; min-height: clamp(178px, 16.5vw, 224px);
  transform-style: preserve-3d; }
.bd-block__pick > * { pointer-events: none; }

.bd-block__solid { position: absolute; inset: 0; transform-style: preserve-3d; }
/* the face you read it on */
.bd-block__front { position: absolute; inset: 0; border-radius: 13px;
  transform: translateZ(var(--d));
  background: linear-gradient(168deg, rgba(70,60,54,.34), rgba(12,17,28,.26));
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: var(--sd-e2);
  transition: transform .8s var(--sd-ease), background .5s var(--rx-ease),
              border-color .5s var(--rx-ease), box-shadow .6s var(--rx-ease); }
/* the top of the block, folded forward from the panel to meet the front face */
.bd-block__top { position: absolute; left: 0; right: 0; top: 0; height: var(--d);
  transform-origin: top center; transform: rotateX(-90deg); border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(214,164,164,.4), rgba(79,67,61,.3));
  transition: height .8s var(--sd-ease), background .5s var(--rx-ease); }
/* and the sides, so it has a thickness rather than an outline. Only one of the two is ever visible on a
   given block — whichever faces the middle of the row — which is what perspective does and what makes
   the four of them read as solid rather than as one repeated shape. */
.bd-block__side { position: absolute; top: 0; bottom: 0; width: var(--d);
  transition: width .8s var(--sd-ease); }
.bd-block__side--r { right: 0; transform-origin: center right; transform: rotateY(-90deg);
  background: linear-gradient(270deg, rgba(92,78,70,.34), rgba(12,17,28,.3)); }
.bd-block__side--l { left: 0; transform-origin: center left; transform: rotateY(90deg);
  background: linear-gradient(90deg, rgba(92,78,70,.34), rgba(12,17,28,.3)); }

.bd-block__body { position: relative; display: grid; justify-items: start;
  transform: translateZ(calc(var(--d) + 1px));
  padding: clamp(18px, 1.9vw, 26px) clamp(16px, 1.7vw, 23px);
  transition: transform .8s var(--sd-ease); }
.bd-block__ic { width: clamp(30px, 2.9vw, 38px); height: clamp(30px, 2.9vw, 38px); display: block;
  color: var(--rx-c1); transition: color .5s var(--rx-ease); }
.bd-block__h { display: block; margin-top: 14px; font: 500 15px/1.34 var(--rx-sans); letter-spacing: -.014em; }
/* the sentence belongs to the block you are on — four at once is a wall of text */
.bd-block__line { display: block; font: 400 12.8px/1.62 var(--rx-sans); color: rgba(245,239,238,.68);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .8s var(--sd-ease), opacity .55s var(--rx-ease), margin-top .8s var(--sd-ease); }

.bd-block.is-at { --d: 76px; }
.bd-block.is-at .bd-block__front {
  background: linear-gradient(168deg, rgba(96,82,74,.5), rgba(14,20,34,.42));
  border-color: rgba(255,255,255,.18); box-shadow: var(--sd-lift); }
.bd-block.is-at .bd-block__top { background: linear-gradient(180deg, var(--s-tint, rgba(206, 152, 153,.5)), rgba(79,67,61,.34)); }
.bd-block.is-at .bd-block__ic { color: #fff; }
.bd-block.is-at .bd-block__line { max-height: 9em; opacity: 1; margin-top: 9px; }

/* ---------- the front edge of the panel ---------- */
.bd-edge { position: relative; margin-top: clamp(22px, 2.6vw, 36px);
  padding-top: clamp(16px, 1.8vw, 24px); border-top: 1px solid rgba(255,255,255,.07);
  transform-style: preserve-3d;
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), 0); }
.bd-edge__label { margin: 0; font: 500 11px/1 var(--rx-sans); letter-spacing: .16em; text-transform: uppercase;
  color: rgba(245,239,238,.42); }
.bd-keys { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap;
  gap: clamp(8px, .9vw, 12px); transform-style: preserve-3d; }
.bd-key { --kz: 10px; display: flex; align-items: center; gap: 9px;
  padding: 9px 14px 9px 11px; border-radius: 999px;
  background: rgba(255,255,255,.042); border: 1px solid rgba(255,255,255,.07);
  box-shadow: var(--sd-e1); transform: translateZ(var(--kz));
  transition: transform .6s var(--sd-ease), background .4s var(--rx-ease),
              border-color .4s var(--rx-ease), box-shadow .5s var(--rx-ease); }
.bd-key__ic { width: 19px; height: 19px; flex: none; color: var(--rx-c1); opacity: .9; }
.bd-key__t { font: 400 13px/1.2 var(--rx-sans); color: rgba(245,239,238,.74); }

/* ==================================================================================================
   03 — THE WALL
   The one place on the page where content is behind the surface instead of in front of it.
   ================================================================================================== */
.sd-wall { isolation: isolate; }
.sd-niches { list-style: none; margin: 0; padding: 0; pointer-events: none;
  perspective: 2000px; perspective-origin: 50% 48%;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sd-item); }
.sd-niche { transform-style: preserve-3d; }
.sd-niche__pick { pointer-events: auto; -webkit-appearance: none; appearance: none; border: 0;
  font: inherit; color: inherit; background: none; cursor: pointer; text-align: left;
  display: block; position: relative; width: 100%; transform-style: preserve-3d;
  padding: clamp(22px, 2.1vw, 30px) clamp(22px, 2.3vw, 32px) clamp(24px, 2.3vw, 32px); }
.sd-niche__pick > * { pointer-events: none; }

.sd-niche__box { position: absolute; inset: 0; transform-style: preserve-3d; --dep: 92px; border-radius: 4px;
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), var(--sz, 0px)); }
.sd-niche__back { position: absolute; inset: 0; transform: translateZ(calc(var(--dep) * -1));
  background: linear-gradient(168deg, rgba(18,26,44,.42), rgba(7,10,18,.34));
  transition: background .55s var(--rx-ease); }
.sd-niche__side { position: absolute; background: rgba(28,38,62,.34); }
.sd-niche__side--t { left: 0; right: 0; top: 0; height: var(--dep);
  transform-origin: top center; transform: rotateX(90deg);
  background: linear-gradient(180deg, rgba(97,83,75,.42), rgba(20,28,48,.34)); }
.sd-niche__side--b { left: 0; right: 0; bottom: 0; height: var(--dep);
  transform-origin: bottom center; transform: rotateX(-90deg);
  background: linear-gradient(0deg, rgba(14,20,34,.4), rgba(24,33,55,.32)); }
.sd-niche__side--l { top: 0; bottom: 0; left: 0; width: var(--dep);
  transform-origin: center left; transform: rotateY(-90deg);
  background: linear-gradient(90deg, rgba(79,67,61,.4), rgba(17,24,41,.32)); }
.sd-niche__side--r { top: 0; bottom: 0; right: 0; width: var(--dep);
  transform-origin: center right; transform: rotateY(90deg);
  background: linear-gradient(270deg, rgba(79,67,61,.4), rgba(17,24,41,.32)); }
/* the lip of the recess: an inset shadow, because nothing stands off the page here to cast one */
.sd-niche__box::after { content: ""; position: absolute; inset: -1px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 -1px 0 rgba(255,255,255,.05);
  transition: border-color .5s var(--rx-ease); }

.sd-niche__in { position: relative; display: block;
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), -84px);
  transition: transform .9s var(--sd-ease); }
.sd-niche__ic { display: block; width: 34px; height: 34px; color: rgba(245,239,238,.5);
  transition: color .5s var(--rx-ease); }
.sd-niche__h { display: block; margin-top: 12px; font: 500 var(--s-h3)/1.24 var(--rx-sans); letter-spacing: -.022em; }
.sd-niche__line { display: block; margin-top: 10px; font: 400 var(--s-lead)/1.7 var(--rx-sans);
  color: rgba(245,239,238,.64); transition: color .5s var(--rx-ease); }

.sd-niche.is-at .sd-niche__in { transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), -18px); }
.sd-niche.is-at .sd-niche__ic { color: var(--rx-c1); }
.sd-niche.is-at .sd-niche__line { color: rgba(245,239,238,.82); }
.sd-niche.is-at .sd-niche__back { background: linear-gradient(168deg, rgba(68,58,52,.54), rgba(10,14,26,.44)); }
.sd-niche.is-at .sd-niche__box::after { border-color: rgba(255,255,255,.2); }
.sd-niche.is-at .sd-niche__back::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, var(--s-tint, rgba(206, 152, 153,.45)), rgba(206, 152, 153,0) 62%);
  opacity: .5; }

/* ==================================================================================================
   04 — THE POINT, AND THE WAY THROUGH
   One line worth stopping on, then one aperture with the two ways on standing in front of it.
   It used to be a panel for the work beside a column for the contact — two boxes of roughly equal
   weight, one of them mostly empty, and a list of services under them that read as a sitemap. The
   aperture is not a panel beside the call to action now; it is what the call to action stands in.
   ================================================================================================== */
.sd-sec > .sd-close__inner { grid-template-columns: minmax(0, 1fr);
  row-gap: clamp(20px, 2.4vh, 32px); align-content: center; justify-items: stretch; }

/* ---------- the way through ----------
   Five frames receding across the whole measure to a light, and the words standing on a card in the near
   plane of them. The frames carry the distance; the card carries the invitation. Keeping both is what
   stops this reading either as a flat panel dropped on the page or as words floating in a hole. */
.sd-act { position: relative; display: grid; place-items: center; isolation: isolate;
  min-height: clamp(220px, 23vw, 282px);
  padding: clamp(14px, 1.6vw, 26px) 0;
  perspective: 1400px; perspective-origin: 50% 50%; }
/* inside the card, clipped by its own radius, under everything that is read */
.sd-act__space { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit; overflow: hidden; transform-style: preserve-3d; }
.sd-act__frame { position: absolute; left: 50%; top: 50%; width: 52%; aspect-ratio: 2.6;
  border: 1px solid rgba(219,169,170,.34); border-radius: 16px;
  transform: translate(-50%, -50%) translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), calc(var(--d) * -190px + var(--sz, 0px)));
  opacity: calc(.07 + var(--d) * .15);
  transition: transform 1s var(--sd-ease), border-color .6s var(--rx-ease); }
.sd-act__light { position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 2.1;
  transform: translate(-50%, -50%) translateZ(-980px);
  background: radial-gradient(closest-side, var(--s-tint, rgba(206, 152, 153,.5)), rgba(206, 152, 153,0) 74%);
  opacity: .5; transition: opacity .7s var(--rx-ease); }

.sd-act__body { position: relative; display: grid; justify-items: center; text-align: center;
  width: 100%; perspective: 1200px; perspective-origin: 50% 46%;
  padding: clamp(40px, 6.4vh, 86px) clamp(22px, 4vw, 62px) clamp(38px, 5.6vh, 76px);
  border: 1px solid rgba(219,169,170,.16); border-radius: clamp(18px, 1.5vw, 28px);
  transform: translate3d(var(--px, 0px), calc(var(--py, 0px) + var(--sy, 0px)), 0);
  gap: clamp(14px, 1.8vh, 22px);
  /* The surface: a dark glass with the service's own light pooled under the top edge, and a hairline
     along it. The whole site's cards are built this way — see .sd-niche and .bd-plinth — so this one
     belongs to the page rather than being a shape borrowed from somewhere else. */
  background:
    radial-gradient(130% 78% at 50% -16%, var(--s-tint, rgba(206, 152, 153,.45)), rgba(206, 152, 153,0) 54%),
    linear-gradient(168deg, rgba(49,42,38,.46), rgba(9,13,24,.64));
  box-shadow: var(--sd-e3), inset 0 1px 0 rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
/* the words stand on the recess, never in it */
.sd-act__body > :not(.sd-act__space) { position: relative; z-index: 1; }
.sd-act__body .rx-eyebrow { margin: 0; }
.sd-act__h { margin: 0; max-width: 20ch;
  font: 500 clamp(28px, 3.4vw, 52px)/1.1 var(--rx-sans); letter-spacing: -.036em;
  text-shadow: 0 8px 40px rgba(6,9,16,.85); }
.sd-act__p { margin: 0; max-width: 46ch;
  font: 400 clamp(13.5px, 1.05vw, 15.5px)/1.6 var(--rx-sans); color: rgba(245,239,238,.68); }
.sd-act__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: clamp(6px, 1.2vh, 14px); }

/* ---------- the studio, and the index beside it ----------
   The object on the left is the practice itself — a glass core with three rings turning on three axes and
   the work in orbit round it — and the index of the other services sits directly against it. One
   composition: the two columns are tight on purpose, because an object with a list a long way from it is
   two things on a page rather than one.
   The list is six surfaces now rather than six rules, and it has a heading of its own — which is what
   turns a sitemap at the foot of a page into a section somebody chooses something from. */
.sd-also { width: 100%; display: grid; align-items: start;
  grid-template-columns: min(420px, 34vw) minmax(0, 1fr);
  justify-content: stretch;
  grid-template-areas: 'object head' 'object list';
  grid-template-rows: auto 1fr;
  column-gap: clamp(20px, 2.6vw, 52px); row-gap: clamp(14px, 1.8vh, 24px); }
.sd-also__object { grid-area: object; position: relative; align-self: center;
  width: 100%; aspect-ratio: 1; }
.sd-also__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the light it stands in, so there is something there before the scene loads */
.sd-also__pool { position: absolute; left: 14%; right: 14%; bottom: 12%; height: 26%;
  transform-origin: bottom center; transform: rotateX(76deg); border-radius: 50%;
  background: radial-gradient(closest-side, var(--s-tint, rgba(206, 152, 153,.4)), rgba(206, 152, 153,0) 72%);
  opacity: .26; pointer-events: none; }
.sd-also__head { grid-area: head; align-self: end; }
.sd-also__head .rx-eyebrow { margin: 0 0 clamp(10px, 1.4vh, 16px); }
.sd-also__h { margin: 0;
  font: 500 clamp(24px, 2.5vw, 38px)/1.12 var(--rx-sans); letter-spacing: -.034em; }

.sd-also ul { grid-area: list; list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(6px, .7vh, 9px); }
.sd-also li { min-width: 0; --c: var(--rx-c1); }
.sd-also a { position: relative; display: grid; align-items: center;
  grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: clamp(11px, 1.1vw, 17px);
  padding: clamp(9px, .85vw, 12px) clamp(12px, 1.1vw, 16px);
  border: 1px solid rgba(255,255,255,.07); border-radius: 12px;
  background: linear-gradient(168deg, rgba(53,45,41,.34), rgba(9,13,24,.4));
  text-decoration: none; color: rgba(245,239,238,.78);
  transition: border-color .4s var(--rx-ease), background .4s var(--rx-ease),
              transform .5s var(--sd-ease), box-shadow .5s var(--rx-ease); }
/* the row's own light, held at nothing until it is pointed at */
.sd-also a::after { content: ""; position: absolute; inset: -1px; border-radius: 14px; pointer-events: none;
  background: radial-gradient(120% 160% at 0% 50%, color-mix(in srgb, var(--c) 30%, transparent), transparent 58%);
  opacity: 0; transition: opacity .45s var(--rx-ease); }
.sd-also__n { font: 500 10.5px/1 var(--rx-sans); letter-spacing: .16em;
  color: color-mix(in srgb, var(--c) 72%, #f5efee); transition: color .4s var(--rx-ease); }
.sd-also__g { display: grid; place-items: center; width: 20px; height: 20px; color: var(--c); }
.sd-also__g svg { width: 100%; height: 100%; fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sd-also__t { font: 400 clamp(13px, 1.05vw, 15px)/1.32 var(--rx-sans);
  transition: color .4s var(--rx-ease); }
/* the way in: a button, so it reads as somewhere to go rather than as punctuation */
.sd-also__go { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03);
  transition: border-color .4s var(--rx-ease), background .4s var(--rx-ease); }
.sd-also__go i { font-style: normal; font-size: 13px; line-height: 1; color: rgba(245,239,238,.5);
  transition: transform .45s var(--sd-ease), color .4s var(--rx-ease); }
/* a browser without color-mix still gets a readable row, just without the per-service tint */
@supports not (color: color-mix(in srgb, red, blue)) {
  .sd-also__n { color: rgba(245,239,238,.5); }
  .sd-also__g { color: var(--rx-c1); }
}

/* ==================================================================================================
   POINTING AT THINGS — desktop only, and never at the cost of the click.
   Nothing here moves the element being pointed at.
   ================================================================================================== */
@media (hover: hover) and (pointer: fine) {
  .sd-gate__pick:hover::before { border-color: rgba(255,255,255,.13); box-shadow: var(--sd-e3); }
  .bd-block__pick:hover .bd-block__front { border-color: rgba(255,255,255,.16); box-shadow: var(--sd-e3); }
  .bd-block__pick:hover .bd-block__ic { color: #fff; }
  .bd-key:hover { --kz: 30px; background: rgba(255,255,255,.085);
    border-color: rgba(255,255,255,.16); box-shadow: var(--sd-e2); }
  .bd-key:hover .bd-key__ic { opacity: 1; }
  .sd-niche__pick:hover .sd-niche__box::after { border-color: rgba(255,255,255,.15); }
  .sd-niche__pick:hover .sd-niche__ic { color: rgba(245,239,238,.8); }
  /* moving across the band deepens it, so the way through answers before it is taken */
  .sd-act:hover .sd-act__frame { transform: translate(-50%, -50%) translateZ(calc(var(--d) * -252px));
    border-color: rgba(219,169,170,.32); }
  .sd-act:hover .sd-act__light { opacity: 1; }
  .sd-also a:hover { transform: translateX(4px); border-color: rgba(255,255,255,.16);
    box-shadow: var(--sd-e3); }
  .sd-also a:hover::after { opacity: 1; }
  .sd-also a:hover .sd-also__t { color: #fff; }
  .sd-also a:hover .sd-also__go { border-color: color-mix(in srgb, var(--c) 55%, transparent);
    background: color-mix(in srgb, var(--c) 16%, transparent); }
  .sd-also a:hover .sd-also__go i { color: #fff; transform: translateX(3px); }
}

/* ---------- one page, six personalities ----------
   The compositions are the same on every service; the light and the angle are not. .sw--<scene> also
   carries --s-tint, which every section reads for its own light (services.css). */
.sw--mobile .sd-hero__floor, .sw--brand .sd-hero__floor { transform: rotateX(82deg); }
.sw--security .sd-hero__floor { transform: rotateX(76deg); opacity: .8; }

/* ---------- focus: visible, and never only a colour ---------- */
.sd-gate__pick:focus-visible, .bd-block__pick:focus-visible, .sd-niche__pick:focus-visible,
.sd-also a:focus-visible, .sd-crumbs a:focus-visible, .sd-act__ctas .rx-btn:focus-visible {
  outline: 2px solid var(--rx-c1); outline-offset: 3px; border-radius: 10px; }

/* ==================================================================================================
   NARROW — composed for the phone, not scaled down.
   A phone stacks what a desktop lays out side by side, so a rack of four is naturally taller than one
   screen and there is no honest way to make it fit but to hide content. The plate is sized to what it
   holds here instead of to the viewport, which also stops a short section being padded into a screen of
   nothing. The choosing moves to the scroll position (ui/console.js marks whatever is nearest the middle
   of the screen), so the page stays interactive without anyone having to aim at anything.
   ================================================================================================== */
@media (max-width: 1080px) {
  .sd-hero__inner { grid-template-columns: minmax(0, 1fr) calc(var(--sd-rig-h) * 1.9) minmax(0, .03fr); }
  .sd-hero { --sd-rig-h: calc((100svh - var(--rx-header-h)) * .48); }
  .sd-sec > .sd-close__inner { grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "eyebrow" "point" "door" "start"; }
}

@media (max-width: 900px) {
  .sw { --sd-sec: clamp(26px, 3.4vh, 42px); --sd-head: clamp(24px, 3.4vh, 38px); --sd-item: 12px;
        --sd-gap: clamp(20px, 2.6vh, 34px); }
  .sd-sec > .rx-wrap { min-height: 0; }
  .sd-head__h { max-width: none; }

  /* the hero becomes one column: the words, then the object, then the three beats */
  .sd-hero { min-height: calc(100dvh - var(--rx-header-h));
    padding: clamp(14px, 2vh, 30px) 0 clamp(14px, 2vh, 28px); perspective: 900px; }
  .sd-hero__inner { grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "crumbs" "copy" "rig" "gates"; row-gap: clamp(11px, 1.9vh, 24px); }
  .sd-hero__h { max-width: 18ch; }
  .sd-hero__lede { max-width: none; }
  .sd-hero__floor { height: 60%; bottom: -12%; }
  .sd-hero { --sd-rig-h: min(calc((100svh - var(--rx-header-h)) * .62), 116vw); }
  .sd-hero__rig { width: calc(100% + var(--rx-pad) * 2); max-width: none;
    margin-inline: calc(var(--rx-pad) * -1); justify-self: stretch;
    aspect-ratio: 1 / .86; }
  .sd-gates { display: flex; grid-template-columns: none; gap: 10px; pointer-events: auto;
    transform-style: flat; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; touch-action: pan-x; scrollbar-width: none; }
  .sd-gates::-webkit-scrollbar { display: none; }
  .sd-gate { flex: 0 0 min(78%, 300px); scroll-snap-align: start; }
  .sd-gate, .sd-gate.is-at { --gz: 0px; }
  .sd-gate__ring { display: none; }

  /* the blocks become two rows of two and stand less far out: at phone perspective a block at 76px
     projects over the one beside it */
  .bd-stage { perspective: 900px; padding: clamp(16px, 4vw, 22px); }
  .bd-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bd-block { --d: 16px; }
  .bd-block.is-at { --d: 34px; }
  .bd-block__pick { min-height: 190px; }
  .bd-block__side { display: none; }
  .bd-key { --kz: 6px; }

  /* the recesses become one column and shallower: a 92px hole at this perspective swallows the words */
  .sd-niches { grid-template-columns: minmax(0, 1fr); perspective: 900px; }
  .sd-niche__box { --dep: 46px; }
  .sd-niche__in { transform: translate3d(0, var(--sy, 0px), -40px); }
  .sd-niche.is-at .sd-niche__in { transform: translate3d(0, var(--sy, 0px), -8px); }

  .sd-act { min-height: 0; padding-inline: 0; }
  .sd-act__body { padding: clamp(30px, 5vh, 44px) clamp(18px, 5vw, 30px) clamp(28px, 4.4vh, 40px); }
  .sd-act__frame { display: none; }
  .sd-act__light { width: 74%; aspect-ratio: 1.7; opacity: .42; }

  /* a phone has no room for an object beside a list, so the object goes above the index it belongs to —
     still tight against it, so the two are one composition rather than two stacked things */
  .sd-also { max-width: none; grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "object" "head" "list"; grid-template-rows: auto auto 1fr;
    row-gap: clamp(14px, 2.2vh, 22px); align-items: start; }
  .sd-also__object { width: min(74%, 264px); justify-self: center; align-self: auto; }
  .sd-also__head { align-self: auto; }
  .sd-also a { padding-block: 12px; }
}

@media (max-width: 560px) {
  .bd-blocks { grid-template-columns: minmax(0, 1fr); }
  .bd-block__pick { min-height: 0; }
  /* one column, one block on screen at a time: there is room to simply say it */
  .bd-block__line { max-height: none; opacity: 1; margin-top: 9px; }
}

@media (max-width: 760px) {
  .sd-hero__ctas .rx-btn { flex: 1 1 auto; justify-content: center; }
  .sd-hero__rig { aspect-ratio: 1 / 1.04; }
}

/* ==================================================================================================
   REDUCED MOTION — the arrangements stay, the travel between them does not.
   ================================================================================================== */
@media (max-width: 900px) and (max-height: 720px) {
  .sd-hero { padding: clamp(10px, 1.6vh, 20px) 0 clamp(10px, 1.6vh, 18px); }
  .sd-hero__inner { row-gap: clamp(9px, 1.5vh, 18px); }
  .sd-hero__rig { aspect-ratio: 1 / .84; }
  .sd-hero__eyebrow { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .sd-gate, .sd-gate__pick::before, .bd-block__front, .bd-block__top, .bd-block__side, .bd-block__body,
  .bd-block__line, .bd-key, .sd-niche__in, .sd-act__frame, .sd-act__light {
    transition-duration: .01ms; }
}
