/* Home "From idea to production", Option B "bento mosaic" (Figma 366:28880, owner approved
   2026-11-22, builder P). Loads after home-contact.css, zz-fold-home.css and zz-motion*.css;
   every rule is scoped under .hm-proc--b so it beats the old process rules.
   - Desktop (>= 1024px): a 1200px bento on a 484 / 200 / 484 track grid, gap 16, rows 304px.
     Row 1: step 01 (700) + step 02 (484). Row 2: step 03 (484) + the dark summary cell (700).
   - Below 1024px: today's stacked step cards unchanged, plus the summary as the last card.
   - Vignette art keeps its own drawing and loops (zz-motion.css); here it is only placed and
     scaled to the Figma wells (phone 0.614, track 0.82, chart 0.518 x 0.82). */

/* ================================================================ All widths */
.hm-proc--b .hm-proc__bento { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.hm-proc--b .hm-step__no { display: none; }

/* Summary cell (dark). */
.hm-proc--b .hm-sum {
	--stagger: var(--stagger-pair);
	position: relative; isolation: isolate; overflow: hidden;
	display: flex; flex-direction: column; gap: 20px; padding: 22px;
	border-radius: var(--r-card); background: var(--c-ink); box-shadow: var(--sh-soft); color: var(--c-white);
}
/* Soft blue glow from the lower left (Figma radial, 55% blue to clear). Its own layer so it can drift. */
.hm-proc--b .hm-sum::before {
	content: ""; position: absolute; z-index: -1; inset: -10%; pointer-events: none;
	background: radial-gradient(ellipse 52% 46% at 15% 62%, rgba(1, 14, 208, .55), rgba(1, 14, 208, 0) 100%);
}
.hm-proc--b .hm-sum__copy { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.hm-proc--b .hm-sum__t { margin: 0; font: var(--fw-medium) 20px/28px var(--f-head); letter-spacing: -.01em; color: var(--c-white); }
.hm-proc--b .hm-sum__btns { margin: 0; }
.hm-proc--b .hm-sum__bars { display: none; }
.hm-proc--b .hm-sum__bar {
	position: relative; display: flex; justify-content: center; flex: none;
	width: var(--bw, 72px); height: var(--bh); padding-top: 11px;
	border-radius: 14px 14px 6px 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
	transform-origin: 50% 100%;
}
.hm-proc--b .hm-sum__bar--1 { --bh: calc(96px * var(--bk, 1)); background: linear-gradient(180deg, rgba(131, 138, 236, .16), rgba(131, 138, 236, .04)); }
.hm-proc--b .hm-sum__bar--2 { --bh: calc(150px * var(--bk, 1)); background: linear-gradient(180deg, rgba(131, 138, 236, .26), rgba(131, 138, 236, .06)); }
.hm-proc--b .hm-sum__bar--3 { --bh: calc(204px * var(--bk, 1)); background: linear-gradient(180deg, rgba(131, 138, 236, .42), rgba(131, 138, 236, .10)); }
.hm-proc--b .hm-sum__disc {
	display: grid; place-items: center; width: var(--dd, 36px); height: var(--dd, 36px); border-radius: 50%;
	background: rgba(255, 255, 255, .12); color: var(--c-white);
	font: var(--fw-medium) 13px/17px var(--f-head); font-style: normal;
}
.hm-proc--b .hm-sum__bar--3 .hm-sum__disc { background: var(--c-white); color: var(--c-blue); }

@media (min-width: 768px) {
	.hm-proc--b .hm-sum { flex-direction: row; align-items: flex-end; gap: 24px; padding: 28px; }
	.hm-proc--b .hm-sum__copy { flex: 1 1 380px; max-width: 380px; align-self: stretch; }
	.hm-proc--b .hm-sum__t { font-size: 22px; line-height: 30px; }
	.hm-proc--b .hm-sum__bars { --bw: 56px; --bk: .78; --dd: 32px; display: flex; align-items: flex-end; gap: 10px; margin-left: auto; }
}

/* ================================================================ Desktop bento */
@media (min-width: 1024px) {
	.hm-sec.hm-proc--b { padding: 44px 0; }
	.hm-proc--b .hm-proc__bento {
		display: grid; max-width: 1200px; gap: 16px;
		grid-template-columns: minmax(0, 484fr) minmax(0, 200fr) minmax(0, 484fr);
		grid-template-rows: minmax(304px, auto) minmax(304px, auto);
	}
	.hm-proc--b .hm-proc__grid { display: contents; }

	/* Cells: radius 20, padding 20, 2px white inside stroke (the .card ring). */
	.hm-proc--b .hm-step { display: grid; gap: 0; padding: 20px; border-radius: 20px; overflow: hidden; }
	.hm-proc--b .hm-step--1 { grid-column: 1 / 3; grid-row: 1; }
	.hm-proc--b .hm-step--2 { grid-column: 3; grid-row: 1; }
	.hm-proc--b .hm-step--3 { grid-column: 1; grid-row: 2; }
	.hm-proc--b .hm-sum { grid-column: 2 / 4; grid-row: 2; }

	.hm-proc--b .hm-step__tile { grid-area: tile; --s: 44px; width: var(--s); border-radius: 8.8px; }
	.hm-proc--b .hm-step__tile .ico { width: calc(var(--s) * .46); height: calc(var(--s) * .46); stroke-width: 2; }
	.hm-proc--b .hm-step__copy { grid-area: copy; gap: 6px; }
	.hm-proc--b .hm-step__no {
		grid-area: no; display: block; align-self: start;
		font: var(--fw-medium) 28px/32px var(--f-head); letter-spacing: -.8px; color: rgba(10, 13, 49, .5); /* 28px text: .28 gave 1.89:1, .5 gives 3.5:1 (WCAG 1.4.3 large text) */
	}
	.hm-proc--b .hm-step__vig {
		grid-area: vig; height: auto; min-height: 0; flex: none; border-radius: 13px;
		box-shadow: inset 0 1.6px 4.9px rgba(10, 13, 49, .10), inset 0 -1.6px 2.5px rgba(255, 255, 255, .9);
	}

	/* 01 (wide): left column [tile .. number] over the copy pinned to the bottom; phone well right. */
	.hm-proc--b .hm-step--1 {
		grid-template-columns: 50px minmax(0, 246fr) 24px minmax(0, 340fr);
		grid-template-rows: 50px minmax(0, 1fr) auto;
		grid-template-areas: "tile no . vig" ". . . vig" "copy copy . vig";
	}
	.hm-proc--b .hm-step--1 .hm-step__tile { --s: 50px; border-radius: 10px; }
	.hm-proc--b .hm-step--1 .hm-step__no { align-self: center; justify-self: end; }
	.hm-proc--b .hm-step--1 .hm-step__copy { gap: 8px; }
	.hm-proc--b .hm-step--1 .hm-step__vig { border-radius: 12px; box-shadow: inset 0 1.5px 4.5px rgba(10, 13, 49, .10), inset 0 -1.5px 2.2px rgba(255, 255, 255, .9); }

	/* 02 and 03 (narrow): head row [44 tile][copy][number], gap 14; the well fills the rest. */
	.hm-proc--b :is(.hm-step--2, .hm-step--3) {
		grid-template-columns: 44px minmax(0, 1fr) auto;
		grid-template-rows: auto minmax(0, 1fr);
		grid-template-areas: "tile copy no" "vig vig vig";
		column-gap: 14px; row-gap: 16px;
	}

	/* ---- Phone (0.614 of the 300 x 610 drawing, cropped by the well) */
	.hm-proc--b .hm-phone { left: calc(50% - 92px); top: 31.3px; transform: scale(.6137); transform-origin: 0 0; }
	.hm-proc--b .hm-phone__tag { padding: 4.4px 10.4px; border-radius: 22px; font-size: 8.93px; line-height: 12px; }
	.hm-proc--b .hm-phone__tag--idea { left: max(6px, calc(50% - 122px)); top: 106.4px; }
	.hm-proc--b .hm-phone__tag--click { left: calc(50% + 54.7px); top: 227.1px; }

	/* ---- Track (0.82, stops 64.7px apart as drawn in Figma, centred in the well) */
	.hm-proc--b .hm-step__vig--track .hm-track { left: calc(50% - 222px); top: calc(50% - 72px); transform: scale(.82); transform-origin: 0 0; }
	.hm-proc--b .hm-track__line, .hm-proc--b .hm-track__fill { left: 152.2px; }
	.hm-proc--b .hm-track__line { width: 236.7px; }
	.hm-proc--b .hm-track__fill { width: 157.8px; }
	.hm-proc--b .hm-track__stop { left: calc(152.2px + var(--k) * 78.9px - 50px); }

	/* ---- Chart (drawn 528 x 212, shown 273.7 x 173.8 so the grid sits at 0.518 x 0.82). Vertical
	   offsets are from the well centre so a shorter well (1024 to 1279) keeps the line in view. */
	.hm-proc--b .hm-chart { inset: calc(50% - 73px) auto auto calc(50% - 137px); width: 273.7px; height: 173.8px; }
	.hm-proc--b .hm-chart__label { left: calc(50% - 122.5px); top: 16.4px; font-size: 9.83px; line-height: 14px; }
	.hm-proc--b .hm-chart__pill { right: auto; left: calc(50% + 53.4px); top: 13.1px; padding: 4.9px 11.5px; font-size: 9.83px; line-height: 14px; }
	.hm-proc--b .hm-chart__end {
		left: calc(50% + 116.5px); top: calc(50% - 23px); width: 11.5px; height: 11.5px;
		box-shadow: 0 0 0 5.7px var(--c-lav-soft), 0 0 0 7px rgba(10, 13, 49, .2);
	}

	/* ---- Summary cell */
	.hm-proc--b .hm-sum { gap: 24px; padding: 28px; border-radius: 20px; }
	.hm-proc--b .hm-sum__t { font-size: 26px; line-height: 34px; }
	.hm-proc--b .hm-sum__bars { --bw: 72px; --bk: 1; --dd: 36px; gap: 12px; }
}
/* 1024 to 1279: the 700fr summary cell is about 550px wide, so the bars and the sentence step down. */
@media (min-width: 1024px) and (max-width: 1279px) {
	.hm-proc--b .hm-sum__t { font-size: 22px; line-height: 30px; }
	.hm-proc--b .hm-sum__bars { --bw: 56px; --bk: .78; --dd: 32px; gap: 10px; }
	.hm-proc--b .hm-step--1 .hm-h3 { font-size: 19px; }
}

/* ================================================================ Motion
   Entrance (once): the three bars rise from the bottom in order (600ms each, 120ms stagger,
   after the cell's own reveal), then the discs pop. Ambient: the glow drifts very slowly
   while the cell is on screen. Gated to motion-ok; paused, failed, reduced motion, no JS and
   print all show the static end state. */
html.motion-ok:not(.motion-paused):not(.motion-failed) .hm-proc--b .hm-sum {
	--pd: min(calc(var(--i, 0) * var(--stagger, 0ms)), var(--stagger-cap));
}
html.motion-ok:not(.motion-paused):not(.motion-failed) .hm-proc--b .hm-sum__bar {
	transition: transform 600ms var(--ease-out-quart) calc(var(--pd, 0ms) + 280ms + var(--b) * 120ms);
}
html.motion-ok:not(.motion-paused):not(.motion-failed) .hm-proc--b .hm-sum__disc {
	transition: transform 500ms var(--ease-spring-ui) calc(var(--pd, 0ms) + 900ms + var(--b) * 100ms),
		opacity 300ms var(--ease-out-quart) calc(var(--pd, 0ms) + 900ms + var(--b) * 100ms);
}
html.motion-ok:not(.motion-paused):not(.motion-failed) .hm-proc--b .hm-sum:not(.is-in) .hm-sum__bar { transform: scaleY(0); }
html.motion-ok:not(.motion-paused):not(.motion-failed) .hm-proc--b .hm-sum:not(.is-in) .hm-sum__disc { transform: scale(.6); opacity: 0; }
html.motion-ok .hm-proc--b .hm-sum.is-instant :is(.hm-sum__bar, .hm-sum__disc) { transition: none; }

@media (prefers-reduced-motion: no-preference) {
	html.motion-ok .hm-proc--b .hm-sum.is-in.is-inview::before { animation: hm-procb-glow 8s var(--ease-in-out) 1.6s infinite alternate; }
}
@keyframes hm-procb-glow { from { transform: none; } to { transform: translate(4%, -6%); } }
