/* The home page: the stage (hero and chapters over one sticky ▽), the work log, the voices.
   Loaded after whc.css (tokens, artefacts, the ▽'s glass) and site.css (the chrome, .sec, the practice eyebrow, the
   contact band), so it holds only what is the home page's own. The rules are the prototype's inline styles
   (concepts/whirrcrew.html, version B with the ▽ on the right), minus what site.css now covers, with the owner's change
   of 27 Oct: during the chapters the ▽ stands in the middle of the screen, a little larger than beside the headline,
   half of it behind the chapter column, and the half behind the column is frosted. */

/* ---------- where the ▽ stands during the chapters ---------- */
/* The chapter column (three quarters of the content width, at least 760 px, owner 29 Oct: its steps, tables and
   artefacts fill it; and the room for the ▽'s visible half beside it) stands on a frosted pane, .pane, which lies in the sticky
   stage over the ▽ and its hairlines and ends --pane-pad after the column. The ▽'s middle is on the pane's edge, about
   two thirds across the screen at 1440: the half behind the pane is blurred behind the right part of the lede, the
   steps and the artefacts, and the other half stays sharp, so it reads as standing behind the words. --tri-ch is its
   width there: about 44 % of the screen (634 px at 1440, a quarter larger than beside the headline), at most 680 px,
   and short enough to fit a low window. Registered as a length so the computed value is in pixels: home.js reads it
   and the pane's edge to pose the WebGL ▽, so the stone, the pane and the column agree. */
@property --tri-ch { syntax: '<length>'; inherits: true; initial-value: 560px; }
/* owner, 29 Oct: the ▽ a little to the right of the pane's edge (--tri-shift), and the frost reaching a little further over
   it (--pane-reach past where the pane used to end, its soft fade longer); one spot for all four chapters. Registered too,
   so home.js reads them in pixels */
@property --tri-shift { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --pane-reach { syntax: '<length>'; inherits: true; initial-value: 0px; }
/* the clients' strip at the foot of the hero has a fixed height (its pieces are set below), so the hero can centre its
   words in the free band between the header and the strip, and home.js can centre the ▽ there too (owner, 30 Oct). A
   registered length, so the script reads it in pixels */
@property --strip-h { syntax: '<length>'; inherits: true; initial-value: 130px; }
:root{--strip-bottom:clamp(14px,2.4vh,26px);--strip-gap:clamp(8px,1.4vh,14px);--strip-row:52px;
  --strip-h:calc(var(--strip-bottom) + 24px + var(--strip-gap) + 20px + var(--strip-row))}
:root{--tri-ch:min(44vw, 680px, calc((100vh - 180px) * 1.1547));--tri-shift:0px;--pane-reach:clamp(48px,6vw,96px)}
/* the column: three quarters of the content width (--col-share), never under --col-max, and never into the room the
   ▽'s visible half needs (--col-room). The ▽'s middle stands on the column's edge (no --tri-shift), so the column and
   the pane's frost cover about half of it (owner, 29 Oct) */
.stage{--col-share:.75;--col-max:760px;--col-room:calc(clamp(150px,14vw,220px) + clamp(40px,5vw,80px));--pane-pad:clamp(24px,2.6vw,40px)}

/* ---------- stage: hero and the chapters share one sticky ▽ ---------- */
.stage{position:relative}
/* clipped sideways: until home.js poses it (and always without JS) the ▽ is a 1000 px box at the wrap's left edge, which
   would widen a phone's page; only sideways, so the band's fade below it (≤ 820 px) still shows */
.gl-wrap{position:sticky;top:0;height:100vh;height:100svh;margin-bottom:-100vh;margin-bottom:-100svh;z-index:0;pointer-events:none;overflow-x:clip}
#gl{width:100%;height:100%;display:block}
/* the frosted pane: the column's left edge is the .wrap's (site.css: centred, at most --max, --gx inside), its width the
   chapter column's (.chapter .inner below), then --pane-pad. A light veil of the ground and a blur of whatever passes
   behind; home.js fades it in as the chapters arrive (it follows the ▽ from beside the headline), so the hero is as it
   was. No line of its own: its last --pane-soft fades out, so the ▽ and the hairlines go out of focus as they pass
   behind it instead of being cut */
.pane{position:absolute;left:0;top:0;bottom:0;opacity:0;visibility:hidden;pointer-events:none;--pane-soft:clamp(64px,7vw,120px);
  width:calc(max(0px, (100% - var(--max)) / 2) + var(--gx) + min(min(100%, var(--max)) - 2 * var(--gx) - var(--col-room), max(var(--col-max), (min(100%, var(--max)) - 2 * var(--gx)) * var(--col-share))) + var(--pane-pad) + var(--pane-reach));
  background:color-mix(in srgb,var(--bg) 36%,transparent);-webkit-backdrop-filter:blur(10px) saturate(1.15);backdrop-filter:blur(10px) saturate(1.15);
  -webkit-mask:linear-gradient(to left,transparent,#000 var(--pane-soft));mask:linear-gradient(to left,transparent,#000 var(--pane-soft))}
/* without a backdrop blur, or for readers who ask for less transparency, the veil alone keeps the words clear */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){ .pane{background:color-mix(in srgb,var(--bg) 86%,transparent)} }
@media (prefers-reduced-transparency:reduce){ .pane{background:color-mix(in srgb,var(--bg) 92%,transparent)} }
.no-gl #gl{display:none}
/* without WebGL the ▽ is still there, still frosted; home.js poses it (beside the headline, then behind the column) */
.no-gl[data-tri] .tri{opacity:1}

/* the first screen is the hero and nothing else, at any window size (owner, 5 Nov). The words are centred in the band
   between the header and the clients' strip (owner, 30 Oct): as much free space above the headline as below the practices */
.hero{position:relative;z-index:1;min-height:100vh;min-height:100svh;display:flex;flex-direction:column;justify-content:center;
  padding-top:var(--nav-h);padding-bottom:var(--strip-h)}
.hero .wrap{width:100%}
.hero-copy{max-width:min(48vw,680px)}
.hero h1{font-weight:500;font-size:var(--t-display);line-height:1.04;letter-spacing:-.035em}
.lede{margin-top:24px;font-size:var(--t-lead);color:var(--text-2);max-width:32em;text-wrap:pretty}
.ctas{display:flex;flex-wrap:wrap;gap:12px;margin-top:34px}
/* the clients' strip runs the full width of the screen under its caption (owner, 29 Oct: larger, starting further left
   and running further right), fading at both ends; slow enough to read at its larger size */
.clients{position:absolute;left:0;right:0;bottom:var(--strip-bottom)}
.clients .wrap{font-size:var(--t-small);line-height:24px;color:var(--muted)}
.clients .marquee{--marq:130s;margin-top:var(--strip-gap);padding:10px 0;
  -webkit-mask:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent);mask:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent)}
.clients .marquee .logos{height:var(--strip-row);gap:0 clamp(44px,4.4vw,72px);padding-right:clamp(44px,4.4vw,72px)}

/* the four practices, each with its figure, leading to its chapter (Vera and the owner, 5 Nov: a visitor sees what we offer
   at once); pointing at one plays its figure, as in the Services menu. It wraps when the words' column is narrow */
.prac{display:flex;flex-wrap:wrap;gap:10px 26px;margin-top:36px}
.prac a{display:block;border-radius:4px}
.prac .pe{font-size:var(--t-small);font-weight:500;gap:9px;color:var(--text-2);transition:color .2s}
.prac .pe .fig{width:20px;height:20px}
.prac a:is(:hover,:focus-visible) .pe{color:var(--text)}

@keyframes rise{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
.enter{animation:rise 1s var(--out) both;animation-delay:var(--d,0ms)}

/* ---------- the four chapters ---------- */
.cuts{position:relative;z-index:1;padding:0 0 10vh}
.chapter{min-height:100vh;display:flex;align-items:center;padding:clamp(112px,10vw,144px) 0 clamp(80px,7vw,104px)}
/* the first chapter follows the clients' strip closely (owner, 2 Nov: the gap under the strip was too large): its words
   start at the top of the chapter instead of its middle, so a tall screen adds no space above them either */
@media (min-width:821px){ .chapter:first-child{align-items:flex-start;padding-top:clamp(72px,6.4vw,96px)} }
/* the column: the headline, the steps and the artefacts take its width; the leads keep a reading measure (80 characters
   at most: they are two or three lines); the room beside it is the ▽'s visible half */
.chapter .inner{width:min(100%, calc(100% - var(--col-room)), max(var(--col-max), calc(100% * var(--col-share))))}
/* each practice chapter names its practice above the heading: the figure the field is drawing behind it, and the name
   (site.css → the practice eyebrow); the heading itself stands alone */
.chapter h2{font-weight:500;font-size:var(--t-h2);line-height:1.08;letter-spacing:-.03em;text-wrap:balance;max-width:20em}
.chapter .cp{margin-top:20px;color:var(--text-2);max-width:80ch;text-wrap:pretty}
.chapter .art{margin-top:var(--ch-block)}
.chapter .lead-person{margin-top:28px}
.chapter .tq{margin-top:36px}
/* a client's words under a case or the roles: more air, so they read as their own voice (owner, 29 Oct) */
.chapter .art>:is(.case-doc,.roster)+.tq{margin-top:clamp(60px,6vw,84px)}
.chapter .steps3{margin-top:var(--ch-block)}
.chapter .art .am-card{margin-top:0}
/* the product's own logo where the other chapters name their practice: its mark and its name, as auditmaster.ai sets them
   (the name in Poppins Medium, as outlines); masks, so the two follow the theme */
.am-logo{display:flex;align-items:center;gap:9px;margin-bottom:18px;color:#272727}
.am-logo-mark{flex:none;width:29px;height:27px;background:#1B3CF5;-webkit-mask:url(/assets/auditmaster-mark.svg) center/contain no-repeat;mask:url(/assets/auditmaster-mark.svg) center/contain no-repeat}
.am-logo-word{flex:none;width:166px;height:18px;background:currentColor;-webkit-mask:url(/assets/auditmaster-wordmark.svg) left center/contain no-repeat;mask:url(/assets/auditmaster-wordmark.svg) left center/contain no-repeat}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) .am-logo{color:var(--text)} :root:not([data-theme="light"]) .am-logo-mark{background:var(--accent)} }
:root[data-theme="dark"] .am-logo{color:var(--text)}
:root[data-theme="dark"] .am-logo-mark{background:var(--accent)}
#auditmaster .agents{margin-top:14px;font-size:var(--t-body);color:var(--text-2);max-width:80ch;text-wrap:pretty}
/* each practice ends on its service page, and on a conversation about it (the topic is chosen in the form below) */
.ch-go{display:flex;flex-wrap:wrap;align-items:center;gap:12px 32px;margin-top:clamp(36px,3.6vw,48px)}

/* ---------- breathing room (owner and team, 29 Oct: the blocks and tables felt stuck together) ---------- */
/* the rhythm inside a chapter: the eyebrow close to its heading, the lead a step below, then a clear break (--ch-block)
   before the chapter's working block (its steps or its artefact); the frameworks line stays with the steps, a larger
   break before the next group, the most before a client's words. Between chapters at least 190 px */
.chapter{--ch-block:clamp(32px,3.2vw,44px)}
.chapter .fw-line{margin-top:18px}
.chapter .fw-line+.art{margin-top:clamp(44px,4.4vw,60px)}
/* the tables: taller rows, more line height, the rules light; the label column a little wider apart from the text */
.chapter .steps3 li{grid-template-columns:40px 1fr;gap:5px 14px;padding:19px 0}
.chapter .steps3 li::before{padding-top:4px}
.chapter .steps3 span{line-height:1.55}
.chapter .roster th{padding-bottom:14px}
.chapter .roster td{padding:16px 0;line-height:1.45}
.chapter .roster td:first-child{padding-right:32px}
/* the gap analysis, smaller than the column (Vera and the owner, 5 Nov: a compact excerpt, not a full-width table) */
.chapter .doc{max-width:740px;padding:22px 26px 18px}
.chapter .doc header{padding-bottom:12px}
.chapter .doc td{padding:9px 0;line-height:1.4}
.chapter .doc footer{margin-top:12px}
.chapter .case-doc{padding:clamp(24px,2.6vw,34px) clamp(24px,2.8vw,36px)}
.chapter .case-doc dl{gap:16px 24px;margin-top:22px;line-height:1.55}
/* stacked on a phone (whc.css): each label stays with its text, the pairs apart */
@media (max-width:720px){ .chapter .case-doc dl{gap:6px} .chapter .case-doc dd{margin-bottom:14px} }
.chapter .case-doc a.more{margin-top:26px}
.chapter .qa .q{padding:20px 24px}
.chapter .qa .ans{padding:20px 24px 22px;line-height:1.6}
.chapter .qa .src{padding:0 24px 22px}
.chapter .qa .note{padding:12px 24px}
.chapter .am-card{padding:26px}
.chapter .am-card .fws{margin-top:20px}
.chapter .am-card .row-btns{margin-top:22px}
.ch-go .go-talk{color:var(--text-2);transition:color .2s}
.ch-go .go-talk:hover{color:var(--text)}

/* ---------- work: the client wall and the log ---------- */
/* a little tighter round it than the other sections (owner, 29 Oct) */
#work{padding-top:88px}
#work+#voices{padding-top:112px}
@media (max-width:820px){ #work,#work+#voices{padding-top:80px} }
.wall-h{font-size:var(--t-h3);font-weight:500;color:var(--text)}
/* the client marks, on the wall and in the hero's strip, at one optical size (owner, 29 Oct). Each is drawn at its ink:
   the mask is sized and placed so the file's own padding falls outside the box (--iw, --ih: the ink's share of the file;
   --ix, --iy: where it sits), so a mark centres on what is actually drawn. --ar is the ink's aspect ratio and --w its
   width, set per mark in home.html so all carry the same weight: a long wordmark lower, a compact crest taller, a solid
   block a little smaller, a light or open one a little larger. --logo-k scales a whole row. --oy lifts a mark whose
   weight sits low in its box, as a share of its height: IMA's letters are its lower part, under the arcs, so it stands on
   the line of the wordmarks beside it (owner, 2 Nov) */
.wall .logos li,.clients .logos li{flex:none;width:calc(var(--w) * var(--logo-k,1));height:auto;aspect-ratio:var(--ar);max-width:100%;
  -webkit-mask-size:calc(100% / var(--iw,1)) calc(100% / var(--ih,1));mask-size:calc(100% / var(--iw,1)) calc(100% / var(--ih,1));
  -webkit-mask-position:var(--ix,50%) var(--iy,50%);mask-position:var(--ix,50%) var(--iy,50%);translate:0 calc(var(--oy,0) * 100%)}
/* the wall: a strict table (owner, 29 Oct, second round): every mark centred in its cell, column under column, rows of
   a fixed height, so a short last row simply ends early on the left. Generous gaps both ways, wide enough that every
   mark keeps its optical width: five columns from 1280 px, four on a laptop or tablet, three on a small tablet, two on a
   phone */
.wall .logos{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:64px;gap:72px 56px;margin-top:44px;justify-items:center;align-items:center}
@media (max-width:1279px){ .wall .logos{grid-template-columns:repeat(4,minmax(0,1fr));gap:64px 48px} }
@media (max-width:820px){ .wall .logos{grid-template-columns:repeat(3,minmax(0,1fr));gap:56px 40px} }
@media (max-width:620px){ .wall .logos{--logo-k:.82;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:56px;gap:44px 32px;margin-top:36px} }
/* the hero's strip shows the same marks, a little smaller than the wall */
.clients .logos{--logo-k:.8}
.log{border-top:1px solid var(--line-2);margin-top:clamp(56px,5vw,72px)}
.log>*{display:grid;grid-template-columns:1.1fr 1fr 1.8fr 24px;gap:24px;align-items:baseline;padding:26px 8px;border-bottom:1px solid var(--line);transition:background .3s,padding .4s var(--out)}
.log a:hover{background:linear-gradient(90deg,color-mix(in srgb,var(--cobalt) 12%,transparent),transparent 70%);padding-left:16px}
.log .cl{font-size:var(--t-h3);font-weight:500;letter-spacing:-.02em}
.log .tag{font-size:var(--t-caption);color:var(--muted)}
.log .what{color:var(--text-2);font-size:var(--t-small)}
.log svg{color:var(--muted);transition:transform .3s,color .3s}
.log a:hover svg{transform:translateX(4px);color:var(--text)}

#voices .tq{margin-top:48px}

/* the logo's W, lit in cobalt for a moment while the ▽ arrives */
.seed{position:fixed;inset:0;width:100%;height:100%;z-index:31;pointer-events:none;overflow:visible}
.seed path{fill:var(--accent)}

/* sections rise once as they arrive; home.js marks only those still below the screen, so nothing visible blinks */
[data-r]{transition:opacity .9s var(--out),transform .9s var(--out);transition-delay:var(--d,0ms)}
[data-r].r-wait{opacity:0;transform:translateY(22px)}

/* ---------- responsive ---------- */
@media (max-width:1100px){
  .log>*{grid-template-columns:1fr 24px}
  .log .tag,.log .what{grid-column:1}
  .log svg{grid-row:1;grid-column:2}
}
@media (max-width:820px){
  /* owner, 29 Oct: no band above the words and no practice name beside the ▽. The ▽ lies under the hero's text as a soft
     background: behind the headline and the lede (home.js → phoneSpot), turning slowly, seen through the frosted pane,
     which covers the whole stage here, so the words stay perfectly readable. It belongs to the hero and scrolls away with
     it, fading out before the hero ends; the chapters read on the plain ground, each naming its practice in its eyebrow */
  .gl-wrap{position:absolute;top:0;left:0;right:0;height:100vh;height:100svh;margin:0;
    -webkit-mask:linear-gradient(transparent calc(var(--nav-h) - 24px),#000 calc(var(--nav-h) + 16px),#000 52%,transparent 92%);
    mask:linear-gradient(transparent calc(var(--nav-h) - 24px),#000 calc(var(--nav-h) + 16px),#000 52%,transparent 92%)}
  .pane{width:auto;right:0;opacity:1;visibility:visible;-webkit-mask:none;mask:none;
    background:color-mix(in srgb,var(--bg) 14%,transparent);-webkit-backdrop-filter:blur(4px) saturate(1.1);backdrop-filter:blur(4px) saturate(1.1)}
  @supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){ .pane{background:color-mix(in srgb,var(--bg) 86%,transparent)} }
  @media (prefers-reduced-transparency:reduce){ .pane{background:color-mix(in srgb,var(--bg) 92%,transparent)} }
  /* the words start right under the bar (it is fixed and clear at the top, so the hero makes room for it), and the clients'
     strip closes the first screen */
  .hero{justify-content:flex-start;padding-top:calc(var(--nav-h) + clamp(20px,6vw,40px));padding-bottom:var(--strip-bottom)}
  .prac{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;margin-top:28px}
  .hero-copy,.chapter .inner{max-width:none;width:100%}
  .clients{position:relative;bottom:auto;margin-top:auto;padding-top:32px}
  .clients .logos{--logo-k:.66}
  .clients .marquee{--marq:110s;-webkit-mask:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);mask:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}
  .cuts{padding:12px 0 4vh}
  .chapter{min-height:0;padding:64px 0}
}
@media (prefers-reduced-motion:reduce){
  .enter{animation:none}
  [data-r].r-wait{opacity:1;transform:none}
}

/* ---------- the home page turns section by section (recruiting and the owner, 10 Nov 2026) ---------- */
/* A scroll that ends near the start of a section settles on it, so a screen shows one section and not the end of one with
   the start of the next. Proximity, not mandatory: a section taller than the screen still scrolls freely inside. Wide
   screens with a mouse or trackpad only. */
@media (min-width:821px) and (hover:hover){
  html:has(.cuts){scroll-snap-type:y proximity;scroll-padding-top:72px}
  .hero,.cuts .chapter,#work,#voices,#contact{scroll-snap-align:start}
}
/* One grid: every chapter starts its words at the same height under the top bar (the first one stood 50px higher and a
   short one was centred), and the sections after the chapters share one top space. */
@media (min-width:821px){
  .chapter,.chapter:first-child{align-items:flex-start;padding-top:clamp(96px,8vw,120px)}
  #work,#work+#voices{padding-top:112px}
}
/* the clients' words that stood under the software case and the roles now stand together under the first one, so each of
   those chapters fits a screen */
.tq-pair{display:grid;gap:clamp(40px,5vw,72px);margin-top:clamp(56px,6vw,80px);padding-top:clamp(40px,4vw,56px);border-top:1px solid var(--line)}
#voices .tq-pair .tq{margin-top:0}
@media (min-width:821px){ .tq-pair{grid-template-columns:repeat(2,minmax(0,1fr))} }

/* the rail: one dot per chapter at the left edge, the current one filled; it shows where you are among the chapters and
   jumps to one. Wide screens only, and only while the chapters are on screen */
.ch-rail{position:fixed;left:clamp(20px,calc((100vw - 1360px)/2 - 72px),96px);top:50%;transform:translateY(-50%);z-index:5;display:none;flex-direction:column;gap:4px;
  opacity:0;pointer-events:none;transition:opacity .3s}
.ch-rail.on{opacity:1;pointer-events:auto}
.ch-rail a{position:relative;display:grid;place-items:center;width:28px;height:28px;color:var(--muted)}
.ch-rail a::before{content:"";width:8px;height:8px;border-radius:50%;border:1px solid currentColor;transition:background .2s,transform .2s,border-color .2s}
.ch-rail a:hover::before,.ch-rail a:focus-visible::before{transform:scale(1.3);border-color:var(--text)}
.ch-rail a[aria-current]::before{background:var(--accent);border-color:var(--accent);transform:scale(1.3)}
.ch-rail span{position:absolute;left:100%;margin-left:4px;white-space:nowrap;font-size:var(--t-caption);color:var(--text);background:var(--bg);border:1px solid var(--line);
  border-radius:6px;padding:3px 8px;opacity:0;transform:translateX(-4px);transition:opacity .2s,transform .2s;pointer-events:none}
.ch-rail a:hover span,.ch-rail a:focus-visible span{opacity:1;transform:none}
@media (min-width:1200px) and (hover:hover){ .ch-rail{display:flex} }
@media (prefers-reduced-motion:reduce){ .ch-rail,.ch-rail a::before,.ch-rail span{transition:none} }
