/* ============================================================================
   ApexEvolv — OUR MISSION

   The sections under the Mission page's hero (the hero itself is the
   services' split, in service-hero.css). Loaded on mission.html after
   light.css and service-hero.css, and on expertise.html, which shares the
   chapter opener (.ms-ch), the copy, the warm plate and the close. Written 19 Nov 2026 for the client's
   redesign brief; the copy is the client's.

   THE CHAPTERS. Beginnings, The evolution, Our approach and A broader
   perspective open the same way: a fine champagne rule across the content
   width, the label, then the headline, on a 12-column grid whose left edge
   is the hero's. No numerals: the client took them off on 19 Nov 2026, from
   the chapters, the evolution's stages and the principles alike.

   Each chapter then composes its text differently, so the page has a
   rhythm rather than four copies of one layout:
     01 Beginnings      the copy steps right, under the end of the headline
     02 The evolution   a horizontal line through four stages
     03 Our approach    headline and copy side by side, three principles
                        across on hairlines under them
     04 Perspective     the largest headline, the copy under it on the left

   OUT OF THE SYSTEM. Daniel's introduction is personal, so it is a warm-white
   plate (#F4F3EF, the hero's ground and the cards' colour), not a chapter
   under a rule. The close is a dark block with the footer (see below).

   SPACING keeps the site's 99px between sections (light.css). The warm
   plate is painted, so the sections either side carry the whole gap.

   PHONE AND TABLET. Below 960px everything stacks in reading order; the
   evolution runs down a vertical line, and the principles become ruled
   rows.
   ============================================================================ */

.ms{--msRule:rgba(124,94,36,.42);          /* the champagne hairline */
  --msGap:clamp(16px,2.2vw,32px)}

/* ---- the chapter opener ------------------------------------------------------ */
.ms-ch{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));
  column-gap:var(--msGap);border-top:1px solid var(--msRule);
  padding-top:clamp(30px,4.4vh,48px)}
.ms-ch > .lab{grid-column:1 / -1;grid-row:1;margin:0}

.ms-h{grid-column:1 / 9;grid-row:2;margin:clamp(20px,2.8vh,28px) 0 0;max-width:none;
  font-size:clamp(1.9rem,3.4vw,3.1rem);font-weight:600;letter-spacing:-.042em;
  line-height:1.06;color:var(--ink)}
.ms-h--lg{grid-column:1 / -1;font-size:clamp(2.1rem,4.3vw,3.85rem)}
/* where a phone has to wrap one of the headline's lines, it wraps it evenly
   rather than leaving its last word alone */
.ms-h .mline > span{text-wrap:balance}

.ms-copy{display:grid;gap:16px;align-content:start;max-width:60ch}
/* align-content:start: in a grid cell taller than the copy (beside a
   picture) the paragraphs keep their spacing instead of spreading out */
.ms-copy p{font-size:var(--t-lede);line-height:1.7;color:var(--mu)}

/* 01: the copy steps right, under the end of the headline */
.ms-copy--step{grid-column:5 / -1;grid-row:3;margin-top:clamp(36px,5vh,56px)}

/* ---- 02: the evolution ----------------------------------------------------------
   One line across all four stages, drawn as the list is read: --p comes from
   the shared [data-rail] in motion.js, which sets it to 1 at once when the
   reader prefers reduced motion. A short upright mark where each stage
   begins; the stage and its sentence below. The last stage is where the
   firm is now, so its name takes champagne. */
.ms-evo{grid-column:1 / -1;grid-row:2;position:relative;list-style:none;
  margin:clamp(44px,6.4vh,68px) 0 0;padding:0;
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.ms-evo::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;
  background:var(--goldDeep);opacity:.55;
  transform-origin:0 50%;transform:scaleX(var(--p,1));transition:transform .25s linear}
.ms-evo li{position:relative;padding-right:clamp(16px,2.4vw,36px)}
.ms-evo li::before{content:"";position:absolute;left:0;top:-5px;
  width:1px;height:11px;background:var(--goldDeep)}
.ms-evo h3{margin-top:30px;font-size:.9rem;font-weight:700;letter-spacing:.14em;
  line-height:1.4;text-transform:uppercase;color:var(--ink)}
.ms-evo li:last-child h3{color:var(--goldDeep)}
.ms-evo p{margin-top:12px;max-width:30ch;font-size:var(--t-sm);line-height:1.65;color:var(--mu)}

/* ---- 03: our approach ----------------------------------------------------------- */
.ms-h--side{grid-column:1 / 6}
.ms-copy--side{grid-column:7 / -1;grid-row:2;margin-top:clamp(24px,3.2vh,34px)}
/* the principles: three columns on hairlines, numbered, no boxes */
.ms-pr{grid-column:1 / -1;grid-row:3;list-style:none;margin:clamp(52px,7vh,84px) 0 0;padding:0;
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--line2)}
.ms-pr li{padding:clamp(24px,3.4vh,34px) clamp(18px,2.2vw,32px) 0}
.ms-pr li:first-child{padding-left:0}
.ms-pr li + li{border-left:1px solid var(--line)}
.ms-pr h3{margin-top:0;font-size:clamp(1.3rem,1.9vw,1.7rem);font-weight:600;
  letter-spacing:-.03em;line-height:1.15;color:var(--ink)}
.ms-pr p{margin-top:12px;max-width:34ch;font-size:var(--t-sm);line-height:1.65;color:var(--mu)}

/* ---- 04: a broader perspective -------------------------------------------------- */
.ms-copy--under{grid-column:1 / 8;grid-row:3;margin-top:clamp(32px,4.6vh,48px)}
.ms-link{margin-top:10px}

/* ---- the experience behind ApexEvolv: the warm plate ----------------------------- */
.sec.ms-ground{background:var(--box);padding:var(--sec-gap) 0}
section:has(+ .ms-ground){padding-bottom:var(--sec-gap)}
.ms-ground + section{padding-top:var(--sec-gap)}
.ms-who{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));
  column-gap:var(--msGap);align-items:start}
.ms-who__id{grid-column:1 / 6}
.ms-who__id .lab{margin:0}
.ms-name{margin-top:clamp(20px,2.8vh,28px);max-width:none;
  font-size:clamp(2.4rem,4.6vw,4.2rem);font-weight:600;letter-spacing:-.045em;
  line-height:1;color:var(--ink)}
.ms-role{max-width:22rem;margin-top:clamp(20px,2.6vh,26px);padding-top:clamp(16px,2.2vh,22px);
  border-top:1px solid var(--msRule);
  font-size:var(--t-micro);font-weight:700;letter-spacing:.14em;text-transform:uppercase;
  color:var(--goldDeep)}
.ms-who__bio{grid-column:7 / -1;padding-top:clamp(36px,5vh,52px)}

/* ---- the close ----------------------------------------------------------------------
   Since 23 Nov 2026 (the client's brief) the close and the footer under it
   are one dark block, on every page with a section#close: the four service
   pages, Our Mission and Expertise. Warm black, the full width of the
   window, under a champagne rule, with no gap below: the footer's deeper
   black (mono.css) is the divide. The tokens are the dark chapter's
   (.svc-dark), so the label, the button and the focus outline take their
   dark-ground values, and motion.js, which reads each section's ground,
   treats the header and the section marks as over the other dark chapters.

   The copy is one column on the left, at most 640px: label, headline,
   paragraph, then the page's button (styled as the landing's) with "Submit
   your CV" beside it (the landing's underlined link). Under them, across
   the container, the landings' fact strip, the same three facts on every
   page. Behind both, from 30% across to the right edge, the rails
   (close-rails.jpg) under two veils in the ground's own colour, solid at
   the picture's left edge and at its foot, so it has no edge and melts into
   the footer. The copy and the strip reveal; the picture does not move. */
.sec.ms.ms-close{
  --ink:#FFFFFF; --onIvory:#FFFFFF;
  --mu:rgba(244,243,239,.74); --onIvoryMu:rgba(244,243,239,.74);
  --gold:#D6BE93; --goldDeep:#D6BE93; --goldHi:#EBD9B4; --onGold:#12100A;
  --line:rgba(244,243,239,.2); --line2:rgba(244,243,239,.32);
  position:relative;isolation:isolate;overflow:hidden;
  padding:104px 0 0;border-top:1px solid rgba(214,190,147,.5);
  background:#12110F;color:var(--ink)}
.ms-close__ph{position:absolute;top:0;bottom:0;left:30%;right:0;z-index:-1;margin:0}
/* from 960 to about 1280px the copy keeps its 640px while 30% of the window
   shrinks, so at 30% the rails stood behind the headline and the paragraph
   (as low as 1.6:1 at 960). There the picture starts further right: where
   the paragraph's 520px measure ends 24% across it, under the 80% veil, as
   at 1440. From about 1280px up this is less than 30% and 30% holds.
   (26% - half the container + 520px) / .76 solves for that edge. */
@media(min-width:960px){
  .ms-close__ph{left:max(30%,calc((26% - min(600px,44%) + 520px) / .76))}}
.ms-close__ph img{display:block;width:100%;height:100%;object-fit:cover;object-position:62% 46%}
.ms-close__ph::after{content:"";position:absolute;inset:0;
  background:
    linear-gradient(90deg,rgb(18,17,15) 0%,rgba(18,17,15,.8) 24%,rgba(18,17,15,.22) 60%,rgba(18,17,15,.42) 100%),
    linear-gradient(180deg,rgba(18,17,15,.62) 0%,rgba(18,17,15,0) 30%,rgba(18,17,15,0) 58%,rgb(18,17,15) 100%)}
.ms-close__copy{max-width:640px}
/* Our Mission's "shape what comes next" is 10.44 times its size wide, 643px
   at the full 61.6px, and broke onto a third line in the 640px column; it is
   eased down by at most 1.6px so it holds two lines (on a phone,
   service-page.css eases it further) */
.shero--mis ~ .ms-close .ms-h--lg{font-size:min(3.85rem,4.3vw,calc(640px / 10.6))}
.ms-close .lab{margin:0}
.ms-close__r{margin-top:28px}
.ms-close__r p{max-width:520px;font-size:var(--t-lede);line-height:1.7;color:rgba(244,243,239,.74)}
.ms-close__acts{display:flex;flex-wrap:wrap;align-items:center;gap:18px 30px;margin-top:32px}
.ms-close .ms-close__cta{padding:18px 28px;font-size:.76rem;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase}
/* this link's arrow points forward, so it moves forward (the landing's points down) */
.ms-close .shero__more:hover svg,.ms-close .shero__more:focus-visible svg{transform:translateX(4px)}
/* the landings' fact strip (.shero__facts), on this ground's .2 hairlines */
.ms-close__facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:92px 0 0;
  border-top:1px solid rgba(244,243,239,.2)}
.ms-close__facts > div{padding:clamp(18px,2.6vh,24px) clamp(16px,2vw,28px) clamp(22px,3.2vh,30px)}
.ms-close__facts > div:first-child{padding-left:0}
.ms-close__facts > div + div{border-left:1px solid rgba(244,243,239,.2)}
.ms-close__facts dt{font-size:var(--t-micro);font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;color:#D6BE93}
.ms-close__facts dd{margin:8px 0 0;font-size:var(--t-sm);font-weight:500;line-height:1.45;
  color:rgba(244,243,239,.94)}
/* below 960px the copy runs nearly the width of the container, so the
   rails would stand behind the words: the picture covers the whole block
   under one veil instead (the brief's phone treatment, from tablet down) */
@media(max-width:959px){
  .ms-close__ph{left:0}
  .ms-close__ph::after{background:linear-gradient(180deg,rgba(18,17,15,.8) 0%,rgba(18,17,15,.86) 55%,rgb(18,17,15) 100%)}
}
@media(max-width:620px){
  .sec.ms.ms-close{padding-top:72px}
  .ms-close .ms-close__cta{padding:16px 20px;letter-spacing:.1em}
  .ms-close__facts{grid-template-columns:minmax(0,1fr);margin-top:56px}
  .ms-close__facts > div{padding:14px 0}
  .ms-close__facts > div + div{border-left:0;border-top:1px solid rgba(244,243,239,.2)}
}

/* ---- tablet and phone ----------------------------------------------------------- */
@media(max-width:959px){
  .ms-ch,.ms-who{grid-template-columns:minmax(0,1fr)}
  .ms-ch > *,.ms-who > *{grid-column:1 / -1 !important;grid-row:auto !important}
  .ms-copy--side{margin-top:clamp(24px,3.4vh,32px)}
  .ms-copy--step,.ms-copy--under{margin-top:clamp(28px,4vh,40px)}
  .ms-who__bio{padding-top:clamp(32px,4.4vh,44px)}

  /* the evolution runs down */
  .ms-evo{grid-template-columns:minmax(0,1fr);--evoPad:clamp(28px,6vw,44px);
    padding-left:var(--evoPad)}
  /* the line and the marks meet the middle of each stage's name */
  .ms-evo::before{left:0;right:auto;top:.63rem;bottom:0;width:1px;height:auto;
    transform-origin:50% 0;transform:scaleY(var(--p,1))}
  .ms-evo li{padding:0 0 clamp(30px,4.6vh,40px)}
  .ms-evo li:last-child{padding-bottom:0}
  .ms-evo li::before{left:calc(-1 * var(--evoPad));top:.63rem;width:11px;height:1px}
  .ms-evo h3{margin-top:0}
}
@media(max-width:620px){
  .ms-pr{grid-template-columns:minmax(0,1fr)}
  .ms-pr li{padding:22px 0}
  .ms-pr li:last-child{padding-bottom:0}
  .ms-pr li + li{border-left:0;border-top:1px solid var(--line)}
}
@media(prefers-reduced-motion:reduce){.ms-evo::before{transition:none}}
