/* RITEXA — the About page (/about). Uses the shared shell and type from ritexa.css; its own 3D pieces are
   driven by ui/about.js: the build stack (--tx / --ty / --gap), the journey line (.is-drawn), the counters,
   the portraits' tilt (--rx / --ry) and the Mission / Vision leaves (.is-open). */
.rx-about-page { padding-top: var(--rx-header-h); }
/* Sections here are sized by their content, not stretched to a screen each (the shared .rx-sec shell keeps a
   full screen as its minimum, which left a lot of empty space between these shorter blocks). */
.rx-about-page .rx-sec { min-height: 0; padding: var(--rx-sec-pad) 0; }
.rx-about-page .rx-sec + .rx-sec { margin-top: clamp(56px, 7.2vh, 104px); }
.rx-ab-hero { min-height: calc(var(--rx-view) - var(--rx-header-h)); padding-top: 0; }
/* (the page-world canvas is styled in ritexa.css: every inner page uses it) */
.rx-about-page .rx-sec { background: linear-gradient(180deg, rgba(14,19,30,0) 55%, rgba(14,19,30,.22) 100%); }
.rx-ab-head { max-width: 640px; }
.rx-ab-head--center { margin: 0 auto; text-align: center; display: grid; justify-items: center; }
.rx-ab-head--center .rx-lead { margin-left: auto; margin-right: auto; }

/* ---------- hero ---------- */
.rx-ab-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .88fr);
  gap: clamp(18px, 2.4vw, 46px); align-items: center; }
.rx-ab-hero__h { margin: 0; font: 500 clamp(38px, 4.6vw, 72px)/1.04 var(--rx-sans); letter-spacing: -.04em; }
.rx-ab-hero__h .rx-grad { display: block; }
.rx-ab-hero__pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.rx-ab-hero__pills li { padding: 9px 15px; border-radius: 999px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
  font: 500 13px/1 var(--rx-sans); color: rgba(245,239,238,.86); }
.rx-ab-hero__pills li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; border-radius: 50%; background: var(--rx-ramp); vertical-align: middle; }
.rx-ab-hero__note { margin: 22px 0 0; max-width: 52ch; font: 400 14.5px/1.7 var(--rx-sans); color: var(--rx-dim); }
.rx-ab-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* the build stack: four glass layers of a product, one level of 3D, standing apart in depth */
.rx-stack { --tx: 0deg; --ty: 0deg; --gap: clamp(34px, 3.2vw, 48px); --fan-x: calc(var(--gap) * -1.05); position: relative; height: clamp(380px, 62vh, 640px); display: grid; place-items: center; perspective: 1700px; }
.rx-stack__space { position: relative; width: min(66%, 360px); aspect-ratio: 1.22; transform-style: preserve-3d;
  transform: translate(var(--fan-x), -12%) rotateX(calc(56deg + var(--ty))) rotateZ(calc(-34deg + var(--tx))); }
/* fanned: each lower layer slides forward in its own plane, so its labelled front edge shows below the one above */
.rx-stack__layer { position: absolute; inset: 0; border-radius: 22px; padding: 20px 24px; display: grid; align-content: end; gap: 6px;
  transform: translate3d(0, calc((3 - var(--i)) * 17%), calc(var(--i) * var(--gap) + var(--up, 0px))); cursor: default;
  background: linear-gradient(145deg, rgba(34,44,68,.82), rgba(12,16,26,.9)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.09), inset 0 1px 0 rgba(255,255,255,.14), 0 40px 60px -30px rgba(0,0,0,.9); }
.rx-stack__layer::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, rgba(206, 152, 153,.0), rgba(206, 152, 153,.35) 30%, rgba(206,152,153,.35) 70%, rgba(206,152,153,0)) top / 100% 1px no-repeat; }
.rx-stack__layer.is-up { box-shadow: inset 0 0 0 1px rgba(214,163,163,.45), inset 0 1px 0 rgba(255,255,255,.2), 0 50px 70px -30px rgba(0,0,0,.95); }
.rx-stack__layer b { font: 600 22px/1 var(--rx-sans); letter-spacing: -.01em; color: #fff; }
.rx-stack__layer span { font: 400 12px/1.3 var(--rx-sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(245,239,238,.55); }
.rx-stack__layer--design { background: linear-gradient(145deg, rgba(86,73,66,.38), rgba(16,22,38,.3)); }
.rx-stack__ui { position: absolute; left: 24px; right: 24px; top: 22px; height: 46%; border-radius: 12px; }
.rx-stack__ui--grid { background: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px) 0 0 / 100% 22%, linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px) 0 0 / 16% 100%,
  linear-gradient(135deg, rgba(206, 152, 153,.25), rgba(206,152,153,.22)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.rx-stack__ui--code { background: repeating-linear-gradient(180deg, transparent 0 12px, rgba(206, 152, 153,.28) 12px 15px, transparent 15px 26px, rgba(206,152,153,.24) 26px 29px) left / 70% 100% no-repeat; }
.rx-stack__ui--bars { background: linear-gradient(0deg, rgba(210,158,159,.55), rgba(210, 158, 159,.45)) 8% 100% / 12% 40% no-repeat, linear-gradient(0deg, rgba(210,158,159,.55), rgba(210, 158, 159,.45)) 30% 100% / 12% 70% no-repeat,
  linear-gradient(0deg, rgba(210,158,159,.55), rgba(210, 158, 159,.45)) 52% 100% / 12% 55% no-repeat, linear-gradient(0deg, rgba(196,141,142,.6), rgba(196,141,142,.45)) 74% 100% / 12% 90% no-repeat; }
.rx-stack__ui--pulse { background: radial-gradient(circle at 20% 60%, rgba(206, 152, 153,.55) 0 5px, transparent 6px), linear-gradient(90deg, rgba(206, 152, 153,.4), rgba(206,152,153,.4)) 0 60% / 100% 2px no-repeat; }
/* the mark floats above the stack. No filter on it: a filter groups it and the logo's black stops dropping out */
.rx-stack__mark { position: absolute; left: 50%; top: 1%; width: clamp(92px, 10vw, 140px); transform: translateX(-50%) translateX(var(--fan-x)); animation: rx-float 6s ease-in-out infinite; pointer-events: none; }
.rx-stack__mark::before { content: ""; position: absolute; inset: -30%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(211,159,160,.22), transparent 65%); }
.rx-stack__mark img { display: block; width: 100%; height: auto; filter: drop-shadow(0 16px 26px rgba(211,159,160,.35)); }
@keyframes rx-float { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -10px); } }

/* ---------- journey ---------- */
.rx-ab-journey .rx-wrap { display: grid; gap: clamp(38px, 6vh, 72px); }
.rx-ab-steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 38px); margin: 0; padding: 30px 0 0; list-style: none; perspective: 1200px; }
.rx-ab-steps::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 2px; border-radius: 2px; background: var(--rx-ramp); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.6s var(--rx-ease-out); }
.rx-ab-steps.is-drawn::before { transform: scaleX(1); }
.rx-ab-steps li { position: relative; padding: 26px 24px 26px; border-radius: 20px; background: linear-gradient(160deg, rgba(30,40,62,.28), rgba(10,14,22,.2));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 30px 50px -34px rgba(0,0,0,.95);
  opacity: 0; transform: translateY(40px) rotateX(-32deg); transform-origin: 50% 0;
  transition: opacity 1s var(--rx-ease), transform 1.3s var(--rx-ease-out); transition-delay: calc(.35s + var(--i) * .22s); }
.rx-ab-steps.is-drawn li { opacity: 1; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.rx-ab-steps.is-live li { transition: opacity 1s var(--rx-ease), transform .35s var(--rx-ease-out); transition-delay: 0s; }
.rx-ab-steps li::before { content: ""; position: absolute; left: 24px; top: -27px; width: 12px; height: 12px; border-radius: 50%; background: #0b0f18;
  box-shadow: 0 0 0 2px var(--rx-c2), 0 0 18px rgba(202,148,148,.6); }
.rx-ab-steps i { font: 500 11px/1 var(--rx-sans); font-style: normal; letter-spacing: .22em; color: var(--rx-c1); }
.rx-ab-steps b { display: block; margin-top: 0; font: 500 22px/1.2 var(--rx-sans); letter-spacing: -.02em; }
.rx-ab-steps span { display: block; margin-top: 10px; font: 400 14.5px/1.65 var(--rx-sans); color: var(--rx-dim); }

/* the numbers, extruded in the logo's blue */
.rx-ab-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; text-align: center; perspective: 900px; }
/* each number stands on its own glass tile, tipped back, leaning to the cursor */
.rx-ab-stats li { display: grid; justify-items: center; grid-template-columns: auto auto; justify-content: center; align-items: start; padding: clamp(22px, 3vw, 38px) 12px;
  border-radius: 24px; background: linear-gradient(160deg, rgba(30,40,64,.55), rgba(10,14,22,.7)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), inset 0 1px 0 rgba(255,255,255,.1), 0 40px 60px -40px rgba(0,0,0,.95);
  transform: rotateX(calc(10deg + var(--rx, 0deg))) rotateY(var(--ry, 0deg)); transition: transform .35s var(--rx-ease-out); }
.rx-ab-stats b, .rx-ab-stats i { font: 700 clamp(64px, 8vw, 124px)/1 var(--rx-sans); font-style: normal; letter-spacing: -.05em; color: #fff0ee; font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 #d7a4a5, 0 2px 0 #d6a3a3, 0 3px 0 #d4a0a1, 0 4px 0 #d29e9f, 0 5px 0 #cf9a9b, 0 6px 0 #c68f90, 0 7px 0 #b3797a, 0 18px 26px rgba(201,146,147,.45); }
.rx-ab-stats i { background: var(--rx-gold); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.rx-ab-stats span { grid-column: 1 / -1; margin-top: 18px; font: 500 12px/1 var(--rx-sans); letter-spacing: .22em; text-transform: uppercase; color: var(--rx-dim); }

/* ---------- team ---------- */
.rx-ab-team__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--rx-gap); align-items: center; }
.rx-ab-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 34px); perspective: 1400px; }
.rx-person { --rx: 0deg; --ry: 0deg; margin: 0; }
.rx-person__frame { position: relative; transform-style: preserve-3d; aspect-ratio: 4 / 5; border-radius: 24px; padding: 1.5px; background: linear-gradient(150deg, rgba(206, 152, 153,.7), rgba(206,152,153,.25) 40%, rgba(206,152,153,.6));
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .18s linear; box-shadow: 0 50px 70px -40px rgba(0,0,0,.95); }
.rx-person__frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; border-radius: 22.5px; }
.rx-person__frame::after { content: ""; position: absolute; inset: 1.5px; border-radius: 22.5px; pointer-events: none;
  background: linear-gradient(180deg, rgba(3,4,7,0) 55%, rgba(3,4,7,.55)), linear-gradient(120deg, rgba(255,255,255,.08), transparent 40%); }
/* the role, floating in front of the portrait */
.rx-person__badge { position: absolute; left: 16px; bottom: 16px; transform: translateZ(46px); padding: 8px 13px; border-radius: 999px;
  background: rgba(8,10,16,.66); box-shadow: inset 0 0 0 1px rgba(216,164,165,.35), 0 14px 26px -10px rgba(0,0,0,.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 600 11px/1 var(--rx-sans); letter-spacing: .16em; text-transform: uppercase; color: #fff; }
.rx-person figcaption { display: grid; gap: 6px; margin-top: 18px; }
.rx-person figcaption b { font: 500 20px/1.2 var(--rx-sans); letter-spacing: -.02em; }
.rx-person figcaption i { font: 500 11px/1.3 var(--rx-sans); font-style: normal; letter-spacing: .2em; text-transform: uppercase; color: var(--rx-c1); }
.rx-person figcaption span { font: 400 14px/1.6 var(--rx-sans); color: var(--rx-dim); }

/* ---------- mission & vision: two leaves standing open toward each other ---------- */
.rx-ab-mv .rx-wrap { display: grid; gap: clamp(32px, 4.8vh, 60px); }
.rx-ab-leaves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 40px); perspective: 1600px; }
.rx-leaf { --rx: 0deg; --ry: 0deg; position: relative; padding: clamp(28px, 3.4vw, 50px); border-radius: 26px; overflow: hidden;
  background: radial-gradient(100% 90% at 0% 0%, #342c28 0%, #0f1524 55%, #0a0e17 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 50px 80px -44px rgba(0,0,0,.95);
  transition: transform 1.4s var(--rx-ease-out); }
.rx-leaf--l { transform-origin: 100% 50%; transform: rotateY(38deg) rotateX(var(--rx)); }
.rx-leaf--r { transform-origin: 0% 50%; transform: rotateY(-38deg) rotateX(var(--rx)); }
.rx-ab-leaves.is-open .rx-leaf--l { transform: rotateY(calc(9deg + var(--ry))) rotateX(var(--rx)); }
.rx-ab-leaves.is-open .rx-leaf--r { transform: rotateY(calc(-9deg + var(--ry))) rotateX(var(--rx)); }
.rx-ab-leaves.is-open .rx-leaf { transition: transform 1.4s var(--rx-ease-out); }
.rx-ab-leaves.is-live .rx-leaf { transition: transform .25s linear; }
.rx-leaf::before { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(210,158,159,.22), transparent 70%); }
.rx-leaf__k { margin: 0; display: inline-flex; align-items: center; gap: 12px; font: 500 11.5px/1 var(--rx-sans); letter-spacing: .24em; text-transform: uppercase; color: var(--rx-c1); }
.rx-leaf__k::before { content: ""; width: 26px; height: 1px; background: var(--rx-ramp); }
.rx-leaf__lead { margin: 22px 0 0; font: 400 clamp(20px, 1.8vw, 27px)/1.4 var(--rx-sans); letter-spacing: -.015em; color: var(--rx-ink); text-wrap: balance; }
.rx-leaf__body { margin: 18px 0 0; font: 400 15px/1.7 var(--rx-sans); color: var(--rx-dim); }

/* ---------- close ---------- */
.rx-ab-cta { min-height: 0; }
.rx-ab-cta__inner { display: grid; justify-items: center; text-align: center; }
.rx-ab-cta__h { margin: 0; font: 500 var(--rx-close)/1.05 var(--rx-sans); letter-spacing: -.04em; }
.rx-ab-cta__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 34px; }

/* A narrow desktop has the least room of anything: the copy still wants its measure, and the fan needs
   about one and a half times the width of the box it is drawn in. Under 1400 the artwork comes down a
   step so its lower-left corner stops reaching across the last line of type.

   The pull towards the copy is measured from the window, not from the gap. The artwork is drawn inside a
   column that narrows faster than the copy does, so by about 980 there is nothing left to pull in: the
   offset has to fade to zero by then rather than stay a fixed share of anything, or the fan walks back
   across the text on exactly the screens with the least room for it. */
@media (min-width: 981px) and (max-width: 1400px) {
  /* The column split moves before anything else does. Pulling the artwork left only trades one fault for
     the other on these widths — far enough in to sit beside the copy is far enough in to cross it — so the
     room comes from the split instead, and the copy gives up the width it does not need for its measure. */
  .rx-ab-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
  .rx-stack { --gap: clamp(28px, 2.6vw, 38px);
    --fan-x: calc(var(--gap) * -0.6 + (100vw - 980px) * -0.09); }
  .rx-stack__space { width: min(59%, 366px);
    transform: translate(var(--fan-x), -12%) rotateX(calc(56deg + var(--ty))) rotateZ(calc(-34deg + var(--tx))); }
}

/* Between a phone and a desktop the two halves are already stacked, so the artwork is centred in the
   full width rather than squeezed into a column — the fan is taken out of the middle, not off the side. */
@media (min-width: 761px) and (max-width: 980px) {
  .rx-stack { --gap: clamp(30px, 4vw, 44px); --fan-x: calc(var(--gap) * -.52); }
  .rx-stack__space { width: min(46%, 400px); transform: translate(var(--fan-x), 0) rotateX(calc(56deg + var(--ty))) rotateZ(calc(-34deg + var(--tx))); }
}

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .rx-ab-hero__grid, .rx-ab-team__grid { grid-template-columns: minmax(0, 1fr); }
  .rx-stack { order: -1; height: clamp(300px, 52vw, 440px); }
  .rx-ab-hero__copy { order: 0; }
}
@media (max-width: 760px) {
  .rx-ab-steps { grid-template-columns: 1fr; padding: 0 0 0 28px; gap: 16px; }
  .rx-ab-steps::before { left: 5px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; transform: scaleY(0); transform-origin: 50% 0; }
  .rx-ab-steps.is-drawn::before { transform: scaleY(1); }
  .rx-ab-steps li::before { left: -28px; top: 30px; }
  .rx-ab-stats { gap: 8px; }
  .rx-ab-stats li { padding: 18px 4px; border-radius: 16px; }
  .rx-ab-stats span { font-size: 10px; letter-spacing: .14em; margin-top: 12px; }
  .rx-ab-people { gap: 14px; }
  .rx-person figcaption b { font-size: 17px; } .rx-person figcaption span { font-size: 13px; }
  .rx-ab-leaves { grid-template-columns: 1fr; }
  .rx-leaf--l, .rx-leaf--r { transform-origin: 50% 0; transform: rotateX(-28deg); }
  .rx-ab-leaves.is-open .rx-leaf--l, .rx-ab-leaves.is-open .rx-leaf--r { transform: rotateX(var(--rx)); }
  .rx-ab-hero__h { font-size: clamp(34px, 9vw, 44px); }
  .rx-stack { --gap: 34px; --fan-x: calc(var(--gap) * -.52); height: clamp(320px, 86vw, 400px); }
  .rx-stack__space { width: 61%; transform: translate(var(--fan-x), 2%) rotateX(calc(56deg + var(--ty))) rotateZ(calc(-34deg + var(--tx))); }
  .rx-stack__layer { padding: 14px 16px; } .rx-stack__layer b { font-size: 17px; } .rx-stack__layer span { font-size: 9.5px; }
  .rx-stack__ui { left: 16px; right: 16px; top: 14px; }
  .rx-stack__mark { top: -2%; width: 76px; }
  .rx-ab-stats b, .rx-ab-stats i { font-size: clamp(40px, 12vw, 58px); }
}
@media (prefers-reduced-motion: reduce) {
  .rx-stack__mark { animation: none; }
  .rx-ab-steps li, .rx-leaf, .rx-ab-steps::before { transition: none; }
}
.no-js .rx-ab-steps li { opacity: 1; transform: none; }
.no-js .rx-ab-steps::before { transform: none; }
.no-js .rx-leaf { transform: none; }

/* ==================================================================================================
   THE SHORT SCREEN — the same page, inside a laptop's 768 pixels.
   The shared tier in ritexa.css brings the type and the section padding down; these are this page's own
   dense blocks, which it cannot know about: the journey's three cards, the three counters whose figures
   are set at eight per cent of the viewport WIDTH and so do not shrink when the height runs out, and the
   hero's build stack. Nothing is dropped — everything is here, one screenful at a time.
   ================================================================================================== */
@media (min-width: 901px) and (max-height: 1000px) {
  .rx-ab-journey .rx-wrap { gap: clamp(34px, 5.4vh, 64px); }
  .rx-ab-steps { padding-top: 30px; }
  .rx-ab-steps li { padding: clamp(20px, 2.8vh, 28px) clamp(18px, 1.6vw, 26px); }
  .rx-ab-steps li::before { top: -27px; }
  .rx-ab-stats li { padding: clamp(20px, 2.8vh, 32px) 10px; }
  .rx-ab-stats b, .rx-ab-stats i { font-size: clamp(50px, 6vw, 96px); }
  .rx-ab-stats span { margin-top: clamp(12px, 1.8vh, 18px); }
  .rx-stack { height: clamp(300px, 44vh, 520px); }
  .rx-stack__mark { top: calc(1% - 86px); }
  .rx-ab-hero__note { margin-top: clamp(12px, 2vh, 20px); }
  .rx-ab-hero__pills { margin-top: clamp(14px, 2.2vh, 24px); }
  .rx-ab-hero__ctas { margin-top: clamp(16px, 2.6vh, 28px); }
}
