/* Wave 2, group scene-bento: hero scene kinds map, sliders, person, pills (loop layer),
   scene micro-motion for checks and tiers, scene modifiers, and the bento section.
   Sizes from design-refs/kit (kit3x sceneCard, PATCH3, R.bento). Phone values first,
   desktop values (kit z() first argument) from 768px, as in sections.css. */

/* ================================================================ Scene modifiers */
.sb-m-only { display: inline; }
.sb-d-only { display: none; }
@media (min-width: 768px) {
	.sb-m-only { display: none; }
	.sb-d-only { display: inline; }
}

/* ================================================================ Rows with a fixed label column (map) */
.sb-rows--fixed dt { flex: 0 0 80px; }
@media (min-width: 768px) {
	.sb-rows--fixed dt { flex-basis: 96px; }
}

/* ================================================================ Linked row value (person card)
   Underlined so it reads as a link without relying on colour; the padding gives a 44px tap
   area without changing the row height. */
.sb-rows__link {
	display: inline-block; padding-block: 11px; margin-block: -11px;
	color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.sb-rows__link:hover { color: var(--c-blue); }

/* ================================================================ Map (kit3x PATCH3) */
.sb-map {
	--g: 10px; --lx: 12px; --ly: 10px; --lb: 26px; --dx: 8px; --dy: 8px; --pin-y: 12px; --pin-x: 14%; --beth: 26px;
	position: relative; overflow: hidden; height: 170px; border-radius: 14px; background: var(--c-lav-soft);
}
.sb-map__reg {
	position: absolute; border-radius: 14px;
	background: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1.5px var(--c-white);
}
.sb-map__reg.is-on { background: var(--grad-brand); box-shadow: none; }
.sb-map__reg--md { left: 26%; top: var(--g); width: calc(74% - var(--g)); height: 44%; }
.sb-map__reg--va { left: var(--g); top: 50%; width: 60%; height: calc(50% - var(--g)); }
.sb-map__reg--dc { left: 66%; top: 50%; width: calc(34% - var(--g)); height: 32%; }
.sb-map__lab {
	position: absolute; white-space: nowrap;
	font: var(--fw-medium) 12px/18px var(--f-body); color: rgba(10, 13, 49, .7);
}
.sb-map__lab.is-on { color: var(--c-white); }
.sb-map__lab--md { left: calc(26% + var(--lx)); top: calc(var(--g) + var(--ly)); }
.sb-map__lab--va { left: calc(var(--g) + var(--lx)); top: calc(100% - var(--g) - var(--lb)); }
.sb-map__lab--dc { left: calc(66% + var(--dx)); top: calc(50% + var(--dy)); }
.sb-map__pin { position: absolute; z-index: 1; width: 14px; height: 14px; }
.sb-map__pin--office { left: var(--pin-x); top: calc(50% + var(--pin-y)); }
.sb-map__pin--bethesda { left: 42%; top: calc(var(--g) + 44% - var(--beth)); }
.sb-map__dot {
	position: absolute; inset: 0; border-radius: 5px;
	background: var(--c-blue); box-shadow: inset 0 0 0 2px var(--c-white);
}
.sb-map__pin.is-inv .sb-map__dot { background: var(--c-white); box-shadow: inset 0 0 0 2px var(--c-blue); }
.sb-map__dot::after {
	content: ""; position: absolute; inset: 0; border-radius: inherit;
	box-shadow: 0 0 0 2px var(--c-blue); opacity: 0;
}
.sb-map__tag {
	position: absolute; left: 20px; top: -5px; padding: 4px 9px; border-radius: 20px; white-space: nowrap;
	background: var(--c-white); box-shadow: var(--sh-soft);
	font: var(--fw-medium) 11px/16px var(--f-body); color: var(--c-ink);
}
@media (min-width: 768px) {
	.sb-map { --g: 12px; --lx: 16px; --ly: 12px; --lb: 30px; --dx: 12px; --dy: 10px; --pin-y: 16px; --pin-x: 30%; --beth: 30px; height: 210px; }
	.sb-map__reg { border-radius: 18px; }
	.sb-map__lab { font-size: 13px; }
	.sb-map__tag { font-size: 12px; }
}

/* ================================================================ Person (kit sceneCard person) */
.sb-person__copy { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.sb-person__pending {
	align-self: flex-start; padding: 6px 10px; border-radius: 20px; background: var(--c-lav-soft);
	font: var(--fw-medium) 11px/16px var(--f-body); color: var(--ink-72);
}
@media (min-width: 768px) { .sb-person__pending { font-size: 12px; } }

/* ================================================================ Pills highlight layer */
.sb-pill { position: relative; }
.sb-pill__on {
	position: absolute; inset: 0; display: flex; align-items: center; gap: 8px;
	padding: inherit; border-radius: inherit; white-space: nowrap;
	background: var(--grad-brand); box-shadow: var(--sh-blue); color: var(--c-white);
	opacity: 0; transition: opacity 300ms var(--ease-out-quart);
}
.sb-pill__on::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--c-white); }
.sb-pill.is-hl .sb-pill__on { opacity: 1; }

/* ================================================================ Sliders: AI ROI Calculator (B5-05) */
.sb-roi { display: flex; flex-direction: column; gap: 12px; }
.sb-roi__in { display: flex; flex-direction: column; gap: 8px; }
.sb-roi__line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sb-roi__label { font-size: 13px; line-height: 20px; color: var(--ink-72); }
.sb-roi__val { font: var(--fw-medium) 12px/20px var(--f-body); color: var(--ink-60); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-roi__track { position: relative; height: 6px; }
.sb-roi__rail { position: absolute; inset: 0; overflow: hidden; border-radius: 3px; background: var(--c-lav-glow); }
.sb-roi__fill { position: absolute; inset: 0; background: var(--c-blue); transform-origin: 0 50%; transform: scaleX(var(--p, .5)); }
.sb-roi__knob-rail {
	/* A 16px box placed by left (a full-width translated rail overflowed the page at 1440). */
	position: absolute; left: calc(var(--p, .5) * 100% - 8px); top: -5px; width: 16px; height: 16px; pointer-events: none;
}
.sb-roi__knob {
	display: block; width: 16px; height: 16px; border-radius: 5px;
	background: var(--c-white); box-shadow: inset 0 0 0 2px var(--c-blue);
	transition: transform var(--dur-fast) var(--ease-out-quart), box-shadow var(--dur-fast) var(--ease-out-quart);
}
/* Transparent native input on top: 24px tall hit area, 24px thumb whose centre runs the
   full track width (the input is 24px wider than the track), so it lines up with the knob. */
.sb-roi__range {
	position: absolute; z-index: 2; left: -12px; top: -9px; width: calc(100% + 24px); height: 24px; margin: 0;
	opacity: 0; cursor: pointer; background: transparent; -webkit-appearance: none; appearance: none;
	touch-action: pan-y;
}
.sb-roi__range::-webkit-slider-runnable-track { height: 24px; background: transparent; }
.sb-roi__range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border: 0; }
.sb-roi__range::-moz-range-track { height: 24px; background: transparent; }
.sb-roi__range::-moz-range-thumb { width: 24px; height: 24px; border: 0; background: transparent; }
.sb-roi__range:focus-visible { outline: none; }
.sb-roi__range:focus-visible ~ .sb-roi__knob-rail .sb-roi__knob { box-shadow: inset 0 0 0 2px var(--c-blue), var(--focus); }
.sb-roi__range:active ~ .sb-roi__knob-rail .sb-roi__knob { transform: scale(1.12); }
@media (hover: hover) and (pointer: fine) {
	.sb-roi__range:hover ~ .sb-roi__knob-rail .sb-roi__knob { box-shadow: inset 0 0 0 2px var(--c-blue), 0 0 0 4px rgba(1, 14, 208, .14); }
	.sb-roi__range:focus-visible:hover ~ .sb-roi__knob-rail .sb-roi__knob { box-shadow: inset 0 0 0 2px var(--c-blue), var(--focus); }
}
[data-scene="sliders"] .scene__result b { font-variant-numeric: tabular-nums; }
@media (min-width: 768px) {
	.sb-roi { gap: 14px; }
	.sb-roi__label { font-size: 14px; }
	.sb-roi__val { font-size: 13px; }
}

/* ================================================================ Scene micro-motion (4.4 kinds) */
/* Contents start 300ms after the card (card at 200ms), as in motion.css. Reduced motion and
   the pause control remove every animation through motion.css. */
/* checks: each tick pops 80ms after its row (rows start at 420ms + i * 70ms). */
.hero [data-scene="checks"] .scene__checks li .scene__tick { animation: sb-pop40 500ms var(--ease-spring-ui) both; animation-delay: calc(500ms + var(--i, 0) * 70ms); }
.hero [data-scene="tiers"] .scene__tier { animation-name: sb-rise8; animation-delay: calc(420ms + var(--i, 0) * 80ms); }
.hero [data-scene="tiers"] .scene__tier.is-on { animation-name: sb-rise8-ring; }
.hero [data-scene="pills"] .scene__pill { animation: sb-pop92 500ms var(--ease-spring-ui) both; animation-delay: calc(420ms + var(--i, 0) * 40ms); }
.hero [data-scene="map"] .sb-map { animation: sb-fade 600ms var(--ease-out-quart) 420ms both; }
.hero [data-scene="map"] .sb-map__pin { animation: sb-drop 500ms var(--ease-spring-ui) 600ms both; }
.hero [data-scene="map"] .sb-map__pin--office .sb-map__dot::after { animation: sb-ring 2s var(--ease-out-quart) 1.2s infinite; animation-play-state: paused; }
html.motion-ok .hero [data-scene="map"].is-inview .sb-map__pin--office .sb-map__dot::after { animation-play-state: running; }
.hero [data-scene="person"] .sb-person__disc { animation: sb-pop92 500ms var(--ease-spring-ui) 420ms both; }
.hero [data-scene="sliders"] .sb-roi__in { animation: sb-row 600ms var(--ease-out-quart) both; animation-delay: calc(420ms + var(--i, 0) * 70ms); }
/* Thumbs glide from 0 to their values; "backwards" fill so live input values win afterwards. */
.hero [data-scene="sliders"] .sb-roi__fill { animation: sb-fill 1200ms var(--ease-out-expo) backwards; animation-delay: calc(420ms + var(--i, 0) * 80ms); }
.hero [data-scene="sliders"] .sb-roi__knob-rail { animation: sb-knob 1200ms var(--ease-out-expo) backwards; animation-delay: calc(420ms + var(--i, 0) * 80ms); }
.hero [data-scene="sliders"].is-live .sb-roi__fill,
.hero [data-scene="sliders"].is-live .sb-roi__knob-rail { animation: none; }

@keyframes sb-pop40 { from { transform: scale(.4); } to { transform: none; } }
@keyframes sb-pop92 { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes sb-rise8 { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sb-rise8-ring { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sb-drop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes sb-ring { 0% { opacity: .5; transform: scale(1); } 100% { opacity: 0; transform: scale(2.1); } }
@keyframes sb-row { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes sb-fill { from { transform: scaleX(0); } }
@keyframes sb-knob { from { transform: translateX(0); } }

/* ================================================================ Bento (kit3x R.bento) */
.bento { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.bento__lead {
	position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end;
	min-height: 260px; margin-bottom: 12px; border-radius: 20px;
	background: var(--c-night); box-shadow: var(--sh-big); color: var(--c-white);
}
.bento__img { position: absolute; inset: 0; z-index: -2; overflow: hidden; border-radius: inherit; }
.bento__img img { width: 100%; height: 100%; object-fit: cover; }
.bento__lead::after {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: linear-gradient(180deg, rgba(7, 10, 36, 0) 30%, rgba(7, 10, 36, .8) 72%, rgba(7, 10, 36, .94) 100%);
}
.bento__lead.is-ph { background: none; color: var(--c-ink); }
.bento__lead.is-ph::after { display: none; }
.bento__lead.is-ph .bento__img { min-height: 0; }
.bento__lead-copy { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 560px; padding: 20px; }
.bento__lead-t { font: var(--fw-medium) 22px/28px var(--f-head); letter-spacing: -.6px; text-wrap: balance; }
.bento__lead-d { font-size: 14px; line-height: 21px; color: rgba(255, 255, 255, .86); }
.bento__lead.is-ph .bento__lead-d { color: var(--ink-72); }

.bento__tile {
	display: flex; flex-direction: column; justify-content: space-between; gap: 0;
	padding: 18px; border-radius: 18px; color: var(--c-ink);
}
.bento__tile--card { background: var(--c-mist); box-shadow: var(--ring-card), var(--sh-soft); }
.bento__tile--lav { background: var(--c-lav-soft); box-shadow: var(--sh-inset); }
.bento__tile--ink { background: var(--c-ink); box-shadow: var(--sh-big); color: var(--c-white); }
.bento__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bento__ico.tile { --s: 36px; }
.bento__ico--ink {
	display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 12px;
	background: rgba(255, 255, 255, .12); color: var(--c-white);
}
.bento__ico--ink .ico { width: 16px; height: 16px; stroke-width: 2; }
.bento__k { font: var(--fw-medium) 13px/20px var(--f-head); letter-spacing: -.4px; color: var(--c-blue); }
.bento__k.is-long { font-size: 16px; line-height: 22px; }
.bento__tile--ink .bento__k { color: var(--c-lavender); }
.bento__copy { display: flex; flex-direction: column; gap: 4px; }
.bento__t { font: var(--fw-medium) 17px/23px var(--f-head); letter-spacing: -.3px; text-wrap: balance; }
.bento__d { font-size: 14px; line-height: 20px; color: var(--ink-72); }
.bento__tile--ink .bento__d { color: rgba(255, 255, 255, .72); }

@media (min-width: 768px) {
	.bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.bento__lead { grid-column: 1 / -1; min-height: 360px; margin-bottom: 0; border-radius: 24px; }
	.bento__lead-copy { max-width: 592px; padding: 36px; }
	.bento__lead-t { font-size: 30px; line-height: 36px; }
	.bento__lead-d { font-size: 16px; line-height: 24px; }
	.bento__tile { gap: 8px; min-height: 224px; padding: 24px; border-radius: 24px; }
	.bento__ico.tile { --s: 44px; }
	.bento__ico--ink { width: 44px; height: 44px; }
	.bento__ico--ink .ico { width: 20px; height: 20px; }
	.bento__k { font-size: 15px; }
	.bento__k.is-long { font-size: 20px; line-height: 26px; }
	.bento__copy { gap: 8px; }
	.bento__t { font-size: 21px; line-height: 27px; }
	.bento__d { font-size: 15px; line-height: 22px; }
}

@media (min-width: 1024px) {
	.bento__lead { min-height: 0; }
	.bento__tile { min-height: 0; }
	/* a: lead 576 + two tile columns of 288, rows of 248 (lead 520 tall) */
	.bento--a { grid-template-columns: minmax(0, 576fr) minmax(0, 288fr) minmax(0, 288fr); grid-template-rows: repeat(2, minmax(248px, auto)); }
	.bento--a .bento__lead { grid-column: 1; grid-row: 1 / 3; }
	.bento--a.bento--flip { grid-template-columns: minmax(0, 288fr) minmax(0, 288fr) minmax(0, 576fr); }
	.bento--a.bento--flip .bento__lead { grid-column: 3; }
	/* wide: lead 792x420 with tile 1 (384x420) beside it, tiles 2 to 4 at 384x224 below */
	.bento--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(420px, auto) minmax(224px, auto); }
	.bento--wide .bento__lead { grid-column: 1 / 3; grid-row: 1; }
	.bento--wide .bento__tile--n1 { grid-column: 3; grid-row: 1; }
	.bento--wide.bento--flip .bento__lead { grid-column: 2 / 4; }
	.bento--wide.bento--flip .bento__tile--n1 { grid-column: 1; }
	.bento--wide .bento__tile--n2, .bento--wide .bento__tile--n3, .bento--wide .bento__tile--n4 { grid-row: 2; }
	/* center: lead 384x520 in the middle, tiles 1 and 2 left, 3 and 4 right */
	.bento--center { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(248px, auto)); }
	.bento--center .bento__lead { grid-column: 2; grid-row: 1 / 3; }
	.bento--center .bento__tile--n1 { grid-column: 1; grid-row: 1; }
	.bento--center .bento__tile--n2 { grid-column: 1; grid-row: 2; }
	.bento--center .bento__tile--n3 { grid-column: 3; grid-row: 1; }
	.bento--center .bento__tile--n4 { grid-column: 3; grid-row: 2; }
}
