/* Homepage only. Shared parts live in site.css. */
main { overflow-x: clip; }

/* ================= hero: read, check, show ================= */
.hero { position: relative; height: calc(100vh - 64px); height: calc(100svh - 64px); min-height: 640px; max-height: 920px; overflow: hidden; --fade: 420ms; }
.hero__world { position: absolute; inset: 0; }
.hero__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__svg .bub { display: none; }                  /* the grid numbers would run under the copy; the drawing keeps a clear gutter instead */
.hero__copy { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-52%); z-index: 5; pointer-events: none; }
.hero__copy > * { pointer-events: auto; }
.hero__copy .h1 { font-size: clamp(40px, 4.2vw, 60px); max-width: 7.6em; }
.hero__sub { margin: 24px 0 40px; max-width: 22em; }
.findings, .srcs, .hsteps { margin: 0; padding: 0; list-style: none; }
.iso .gfA { stop-color: #000; } .iso .gfB { stop-color: #fff; }
/* 01 READ. Sources: a column of tiles beside the drawing, or a row over it on narrow screens (placed by home.js). A tile is ink while it sends its
   records, and when a finding it feeds is in focus. */
.src { position: absolute; z-index: 4; min-width: 70px; padding: 8px 7px 6px; display: grid; justify-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--hair-2);
  opacity: 0; transition: opacity var(--fade) var(--ease), border-color var(--fade) var(--ease); }
.src__logos { display: flex; align-items: center; gap: 6px; height: 18px; }
.src__logos img { display: block; height: 18px; width: auto; } .src__logos .wide { height: 10px; }
.src__own { width: 24px; height: 18px; }
.src--own { border-style: dashed; border-color: var(--sheet); }
.src .label { white-space: nowrap; transition: color var(--fade) var(--ease); }
.tight .src { min-width: 0; padding: 6px 4px 5px; } .tight .src .label { letter-spacing: 0; } .tight .src__logos .wide { display: none; }
/* beside the copy the tiles are one column of equal tiles (home.js sets .col) */
.col .src { width: 96px; min-width: 0; padding: 8px 4px 6px; } .col .src .label { letter-spacing: .03em; }
.ready .src { opacity: 1; }
.src.on { border-color: var(--ink); border-style: solid; } .src.on .label { color: var(--ink); }
/* a tile's address lines run to the places its records are about, leave each record there with its logo, and go */
.hfeed { fill: none; stroke: var(--ln-3); stroke-width: 1; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 300ms var(--ease), opacity 260ms var(--ease); }
.hfeed.on { stroke-dashoffset: 0; } .hfeed.off { opacity: 0; }
.hrec { opacity: 0; transform: translateY(-6px); transition: opacity var(--fade) var(--ease), transform var(--fade) var(--ease); }
.hrec.on { opacity: 1; transform: none; }
.hrec rect { fill: var(--paper); stroke: var(--ln); }
.hpl { transition: opacity var(--fade) var(--ease); }
/* 02 CHECK. The Buildright check: one section plane rising through the building at constant speed, a grey band in
   front of the two faces, a strong line where it cuts them, its name on a tag at its corner. A place it has passed
   turns red, or gets a grey tick. */
.hplane { opacity: 0; transition: opacity 300ms var(--ease); } .hplane.on { opacity: 1; }
.hplane .pout { transition: opacity var(--fade) var(--ease); } .hplane.parked .pout { opacity: .62; }
.hplane .pf { fill: rgba(12, 10, 9, .10); stroke: none; }
.hplane .po { fill: none; stroke: var(--ln); stroke-width: 1; stroke-linejoin: round; }
.hplane .pc { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.hplane .pb { fill: none; stroke: var(--ln-2); stroke-width: 1; opacity: 0; transition: opacity 300ms var(--ease); }
.hplane.over .pb { opacity: 1; }
.hplane .ptg rect { fill: var(--paper); stroke: var(--ink); }
.iso .hplane text { font: 500 11px var(--f-mono); letter-spacing: .04em; fill: var(--ink); }
.hero__svg .hot { transition-duration: var(--fade); }
.htick { opacity: 0; transition: opacity var(--fade) var(--ease); } .htick.on { opacity: 1; }
.htick rect { fill: var(--ground); stroke: var(--ln-2); } .htick polyline { fill: none; stroke: var(--muted); stroke-width: 1.8; }
/* named places on the building. Before the check a place is only a name; its number and the red arrive with the check */
.ptag { position: absolute; z-index: 6; height: 24px; padding: 0 8px; display: flex; gap: 7px; align-items: center; white-space: nowrap; background: var(--ground); border: 1px solid var(--sheet); border-radius: 0;
  font: 500 11px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); cursor: pointer; opacity: 0;
  transition: opacity var(--fade) var(--ease), color var(--fade) var(--ease), border-color var(--fade) var(--ease), background-color var(--fade) var(--ease); }
.ptag--c { transform: translateX(-50%); }
.ptag b { display: none; font-weight: 500; }
.ptag.red b { display: inline; }
.ready .ptag { opacity: 1; }
.ptag.red { color: var(--red); border-color: var(--red); }
.ptag.cur { background: var(--red); border-color: var(--red); color: #fff; }
.hcard:focus-visible { outline: 2px solid var(--p-focus); outline-offset: 2px; }
/* the three steps light as the sequence moves; the legend sits under them as one block */
.hsteps { position: absolute; z-index: 4; display: grid; gap: 9px; opacity: 0; transition: opacity var(--fade) var(--ease); }
.ready .hsteps { opacity: 1; }
.hsteps li { font: 500 11px/1 var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; transition: color var(--fade) var(--ease); }
.hsteps li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border: 1px solid currentColor; transition: background-color var(--fade) var(--ease); }
.hsteps li.done::before { background: var(--muted); }
.hsteps li.on { color: var(--ink); } .hsteps li.on::before { background: var(--ink); }
.hero__legend { position: absolute; z-index: 4; margin: 0; max-width: 300px; color: var(--muted); pointer-events: none; }
/* 03 SHOW. Four fixed frames on the right. A finding fills its frame when its place turns red, with a leader from
   the place; the frame never moves or changes size */
.findings { position: absolute; z-index: 7; right: max(48px, calc((100% - 1440px) / 2 + 48px)); top: 50%; transform: translateY(-50%); width: 280px; display: grid; gap: 8px; }
.finding { position: relative; border-radius: var(--win-r); outline: 1px dashed var(--hair-2); outline-offset: -1px; opacity: 0; transition: opacity var(--fade) var(--ease), outline-color var(--fade) var(--ease); }
.ready ~ .findings .finding { opacity: 1; }
.finding.full { outline-color: transparent; }
.hcard__no { position: absolute; left: 13px; top: 11px; z-index: 2; width: 30px; height: 20px; border: 1px solid var(--sheet); font: 500 11px/18px var(--f-mono); text-align: center; color: var(--muted);
  transition: color var(--fade) var(--ease), border-color var(--fade) var(--ease), background-color var(--fade) var(--ease); }
.finding.full .hcard__no { color: var(--red); border-color: var(--red); }
.finding.full.cur .hcard__no { background: var(--red); color: #fff; }
.hcard { height: 100%; opacity: 0; transform: translateY(6px); transition: opacity 460ms var(--ease), transform 460ms var(--ease); }
.finding.full .hcard { opacity: 1; transform: none; }
.hcard .win__body { padding: 11px 13px 12px; }
.hcard__top { display: flex; align-items: center; gap: 8px; min-height: 20px; padding-left: 38px; }
.hcard__place { font: 500 11px/1 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.hcard__top .p-chip { margin-left: auto; }
.hcard .p-sig__title { margin: 9px 0; font-size: 14px; }
.hcard .p-chip img { display: block; height: 13px; width: auto; }
.hcard .p-sig__meta { margin-top: 7px; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.hlead { fill: none; stroke: var(--red); stroke-width: 1; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: opacity 300ms var(--ease); }
.hlead.on { stroke-dashoffset: 0; transition: stroke-dashoffset 360ms var(--ease), opacity 300ms var(--ease); }
.hlead.off { opacity: 0; }
/* the planned roof is an outline only: level 4 under it stays open to view */
.hero__svg .plan .face { fill: none; }
/* the crane's jib comes in with the building, which draws in quickly here */
.hero__svg .dyn { transition-delay: calc(var(--u) * 5 + var(--late, 0ms)); }
.fnav { display: none; }
/* at rest: a finding in focus (hover, focus or click on its card or its place) keeps its card, its place and its
   two records; the rest step back */
.hero.has-cur:not([data-mode="phone"]) .finding:not(.cur), .hero.has-cur:not([data-mode="phone"]) .ptag:not(.cur) { opacity: .42; }
.hero.has-cur:not([data-mode="phone"]) .src:not(.on) { opacity: .42; }
.hero.has-cur:not([data-mode="phone"]) .hero__svg .hot.on:not(.cur) { opacity: .28; }
.hero.has-cur:not([data-mode="phone"]) .hpl:not(.cur) { opacity: .3; }
/* a low desktop window: the four cards tighten so the column still fits */
@media (min-width: 1200px) and (max-height: 840px) {
  .findings { gap: 6px; }
  .hcard .win__body { padding: 10px 13px 11px; }
  .hcard__no { top: 10px; }
  .hcard .p-sig__title { margin: 7px 0 8px; }
  .hcard .p-sig__meta { display: none; }
}
/* under 1200: copy, then the drawing, then the four findings in two columns (home.js uses the same widths) */
@media (max-width: 1199px) {
  .hero { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; overflow: hidden; }
  .hero__copy { position: relative; top: auto; transform: none; padding-top: 48px; width: 100%; }
  .hero__copy .h1 { font-size: clamp(36px, 6.4vw, 52px); max-width: 14em; }
  .hero__sub { margin: 16px 0 28px; font-size: 17px; max-width: 32em; }
  .hero__world { position: relative; inset: auto; height: 560px; margin-top: 20px; overflow: hidden; }
  .findings { position: relative; right: auto; top: auto; transform: none; width: auto; margin: 10px var(--gutter) 26px; grid-template-columns: 1fr 1fr; gap: 10px; }
}
/* landscape tablet: the copy beside the drawing, the first row of findings in the first screen, the legend last */
@media (min-width: 761px) and (max-width: 1199px) and (orientation: landscape) {
  .hero { --side: clamp(440px, calc(100svh - 64px - 150px), 560px); }
  .hero__world { position: absolute; inset: 0 0 auto 0; height: var(--side); margin: 0; }
  .hero__copy { height: var(--side); padding-top: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
  .hero__copy .h1 { font-size: clamp(34px, 4.4vw, 46px); max-width: 7.6em; }
  .hero__sub { max-width: 21em; font-size: 16px; margin: 14px 0 22px; }
  .findings { margin: 0 var(--gutter) 14px; }
  .hero__legend { position: static; max-width: none; padding: 0 var(--gutter) 24px; }
}
/* phone: tiles three by two, one finding at a time in one fixed frame; the numbers and the place tags switch it */
@media (max-width: 760px) {
  .eyebrow-cat { display: none; }
  .hero__copy { padding-top: 24px; }
  .hero__copy .h1 { font-size: 36px; }
  .hero__sub { margin: 12px 0 20px; font-size: 15.5px; }
  .hero .btn { height: 44px; }
  .hero__world { margin-top: 14px; }
  .src, .tight .src { min-width: 0; width: calc((100vw - 24px) / 3); height: 30px; padding: 0 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
  .src .label, .tight .src .label { letter-spacing: 0; }
  .src__logos { height: 16px; gap: 4px; } .src__logos img { height: 16px; } .src__logos .wide { display: none; } .src__logos img[src*="hmsreg"] { height: 13px; } .src__own { width: 21px; height: 16px; }
  .ptag { height: 24px; padding: 0 6px; } .ptag span { display: none; } .ptag:not(.red) { visibility: hidden; }
  .hsteps { display: flex; gap: 12px; } .hsteps li { letter-spacing: .03em; } .hsteps li::before, .hsteps .x { display: none; }
  .findings { grid-template-columns: 1fr; margin: 4px var(--gutter) 0; border-radius: var(--win-r); outline: 1px dashed var(--hair-2); outline-offset: -1px; }
  .finding { grid-area: 1 / 1; outline: 0; }
  .ready ~ .findings .finding:not(.cur) { opacity: 0; pointer-events: none; }
  .hcard .win__body { padding: 12px 14px 12px; }
  .fnav { display: flex; gap: 6px; margin: 10px var(--gutter) 0; }
  .fnav button { width: 44px; height: 30px; padding: 0; border: 1px solid var(--sheet); border-radius: 0; background: var(--ground); font: 500 11px/1 var(--f-mono); color: var(--muted); cursor: pointer;
    transition: color var(--fade) var(--ease), border-color var(--fade) var(--ease), background-color var(--fade) var(--ease); }
  .fnav button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
  .hero__legend { position: static; max-width: none; padding: 14px var(--gutter) 24px; }
}

/* ================= problems ================= */
.problems__grid { display: grid; grid-template-columns: calc((100% + 64px) / 3 - 32px) calc((100% + 64px) / 3) calc((100% + 64px) / 3 - 32px); }
.prob { padding: 0 32px; display: grid; align-content: start; gap: 14px; }
.prob:first-child { padding-left: 0; } .prob:last-child { padding-right: 0; }
.prob + .prob { border-left: 1px solid var(--hair); }
.prob .h3 { max-width: 12.5em; min-height: 2.36em; }
.prob__fig { position: relative; aspect-ratio: 4 / 3; margin-bottom: 18px; }
.prob__fig .detail { position: absolute; inset: 26px 22px 22px; width: calc(100% - 44px); height: calc(100% - 48px); }
.fig-no { position: absolute; left: 14px; top: 12px; color: var(--faint); }
.detail text { font: 500 11.5px var(--f-mono); letter-spacing: .05em; fill: var(--muted); paint-order: stroke; stroke: var(--ground); stroke-width: 3px; }
.detail .red-t { fill: var(--red); } .detail .ink-t { fill: var(--ink); }
.mv { transition: transform calc(var(--u) * 6) var(--ease); }
.sweep { transition: transform calc(var(--u) * 10) var(--ease); }
.detail .pop { opacity: 0; transition: opacity calc(var(--u) * 4) var(--ease), transform calc(var(--u) * 4) var(--ease); } .detail .pop.on { opacity: 1; }
.detail .rise { transform: translateY(-8px); } .detail .rise.on { transform: none; }
.detail .op { font-size: 17px; } .detail tspan.op { font-size: 1.48em; }
.detail .join polyline { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset calc(var(--u) * 4) var(--ease); } .detail .join.on polyline { stroke-dashoffset: 0; }
@media (max-width: 1199px) { .problems__grid { grid-template-columns: 1fr; gap: 56px; } .prob, .prob + .prob { padding: 0; border: 0; } .prob .h3 { min-height: 0; } .prob__fig { aspect-ratio: auto; height: 260px; } }

/* ================= how it works: five steps in one row ================= */
.how__grid { margin: 28px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 32px; }
.hstep { position: relative; display: grid; align-content: start; gap: 10px; }
.hstep__fig { height: 252px; margin-bottom: 14px; display: flex; flex-direction: column; justify-content: center; }
.hstep__fig svg { display: block; max-width: 100%; height: auto; margin: 0 auto; flex: none; }
.hstep + .hstep::before { content: "\2192"; position: absolute; left: -24px; top: 119px; width: 16px; text-align: center; font: 400 14px/1 var(--f-mono); color: var(--sheet); }
.hstep__t { font: 600 18px/1.25 var(--f-display); letter-spacing: -.01em; text-wrap: balance; }
.hstep > p:not(.label) { color: var(--muted); font-size: 15px; line-height: 1.5; }
.how__ex { margin-top: 32px; color: var(--faint); }
.how .iso text, .how .iso .lbl { font-size: 11px; } .how .iso .lbl.mid { font: 600 20px var(--f-text); }
/* step 01: the six source types, two by three. Each tile carries the logos of two systems of its type; the last
   is a source only your company has (the figure is drawn by home.js) */
.logos { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.logos li { height: 68px; padding: 2px 4px 0; display: grid; align-content: center; justify-items: center; gap: 9px; background: var(--paper); border: 1px solid var(--hair-2); }
.logos__marks { display: flex; align-items: center; gap: 8px; height: 22px; }
.logos img { display: block; height: 22px; width: auto; } .logos img.wide { height: 12px; }
.logos__own { width: 29px; height: 22px; }
.logos .label { white-space: nowrap; }
.logos .logos__yours { border-style: dashed; border-color: var(--sheet); }
.co { background: var(--paper); border: 1px solid var(--hair-2); padding: 12px 14px; font-size: 13.5px; line-height: 1.45; }
.co .label { display: block; margin-bottom: 6px; }
.co__rule { font: 400 13px/1.55 var(--f-mono); color: var(--ink); }
.co__t { font-weight: 500; }
.co__rows { margin: 0; padding: 0; list-style: none; }
.co__rows li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 8px 0; font-size: 13px; }
.co__rows li + li { border-top: 1px solid var(--hair); } .co__rows li:first-child { padding-top: 0; } .co__rows li:last-child { padding-bottom: 0; }
.co__rows code { font: 400 12px var(--f-mono); color: var(--muted); }
.co__rows em { font: normal 500 11px var(--f-mono); color: var(--faint); letter-spacing: .05em; text-transform: uppercase; justify-self: end; }
.co__rows span { grid-column: 1 / -1; }
/* under 1200: one step per row, figure beside the text; phone: figure above the text */
@media (max-width: 1199px) {
  .how__grid { grid-template-columns: 1fr; gap: 40px; }
  .hstep { grid-template-columns: 240px minmax(0, 1fr); column-gap: 32px; }
  .hstep__fig { grid-row: 1 / span 4; height: auto; min-height: 150px; margin: 0; }
  .hstep + .hstep::before { content: none; }
}
@media (max-width: 600px) {
  .hstep { grid-template-columns: 1fr; }
  .hstep__fig { grid-row: auto; height: auto; margin-bottom: 8px; }
  .logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logos li { height: 62px; gap: 8px; } .logos .label { letter-spacing: .03em; }
  .logos__marks { height: 18px; gap: 6px; } .logos img { height: 18px; } .logos img.wide { height: 10px; } .logos__own { width: 24px; height: 18px; }
}

/* tighter rhythm on the homepage */
main > .sec { padding-top: clamp(64px, 7vw, 104px); padding-bottom: clamp(64px, 7vw, 104px); }

/* ================= proof: logo band, counters, render cards (cards in site.css) ================= */
.band__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: clamp(40px, 5vw, 72px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--hair); }
.band__n { font: 600 clamp(40px, 4.4vw, 64px)/1 var(--f-display); letter-spacing: -.035em; color: var(--ink); }
.band__stats dd { margin: 12px 0 0; display: grid; gap: 4px; }
.band__stats dd b { font-weight: 500; font-size: 17px; color: var(--ink); }
.band__stats dd span { font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .band__stats { grid-template-columns: 1fr; gap: 28px; } }
.cases .cases__grid { margin-top: clamp(48px, 6vw, 88px); }

.case__t { color: var(--ink); font-weight: 500; }

/* quotes inside the proof section */
.cases__quotes { margin-top: clamp(40px, 5vw, 72px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--hair); }

.cases__line { margin-top: clamp(32px, 4vw, 48px); }
/* five logos do not fit beside the heading: the row goes under it */
.cases .ab-trust { grid-template-columns: 1fr; }
.cases .ab-names { justify-content: space-between; }

/* ---- the need, in a customer's own words: heading and subline left, the anonymous quote right ---- */
.need__in { align-items: center; }
.need__copy { display: grid; gap: 18px; }
.need__copy .lead { max-width: 26em; }
.need__quote { padding-left: clamp(20px, 2.4vw, 36px); border-left: 1px solid var(--sheet); }
.need__quote .quote__q p { font: 600 clamp(24px, 2.4vw, 36px)/1.18 var(--f-display); letter-spacing: -.02em; max-width: 18em; text-wrap: balance; }
.need__quote .quote__role { font-size: 15px; }
@media (max-width: 1023px) { .need__quote { padding-left: 20px; } }
