/* Shared kit for animated case study hero visuals. Sizes scale with the container (cqw).
   Each page sets --c (brand) and --cl (light tint) on .hk. Motion plays once when hero-kit.js adds .hk-play. */
.hk { --c: #2563eb; --cl: #eef3ff; --ink: #1d2433; --mut: #6b7280; --line: #e8ebf0; --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  position: relative; width: 100%; aspect-ratio: 3 / 2; container-type: inline-size; color: var(--ink); font-family: inherit; }
.hk * { box-sizing: border-box; }
.hk p, .hk h4, .hk h5, .hk h6 { margin: 0; }
.hk-blob { position: absolute; background: var(--cl); border-radius: 48% 52% 40% 60% / 50% 45% 55% 50%; }
.hk-win { position: absolute; background: #fff; border-radius: 1.3cqw; overflow: hidden; display: grid; grid-template-rows: 2.8cqw 1fr;
  box-shadow: 0 .3cqw 1cqw rgb(20 30 50 / 7%), 0 2cqw 4cqw rgb(20 30 50 / 10%); }
.hk-bar { display: flex; align-items: center; gap: .45cqw; padding: 0 1.1cqw; border-bottom: 1px solid var(--line); }
.hk-bar i { width: .65cqw; height: .65cqw; border-radius: 50%; background: #f87171; }
.hk-bar i:nth-child(2) { background: #fbbf24; } .hk-bar i:nth-child(3) { background: #34d399; }
.hk-in { display: grid; min-height: 0; }
.hk-side { padding: 1.1cqw .8cqw; font-size: .85cqw; color: #4b5563; display: grid; align-content: start; gap: .2cqw; border-right: 1px solid var(--line); }
.hk-side span { display: flex; align-items: center; gap: .55cqw; padding: .4cqw .5cqw; border-radius: .4cqw; white-space: nowrap; overflow: hidden; }
.hk-side span::before { content: ""; width: .8cqw; height: .8cqw; border-radius: .2cqw; border: .12cqw solid currentColor; opacity: .6; flex: none; }
.hk-side span.on { background: var(--cl); color: var(--c); font-weight: 600; }
.hk-side.dark { background: #22262e; color: #c9cdd4; border-right: 0; }
.hk-side.dark span.on { background: rgb(255 255 255 / 10%); color: #fff; }
.hk-main { padding: 1.4cqw 1.8cqw; min-width: 0; display: grid; align-content: start; gap: 1cqw; }
.hk-h { font-size: 1.9cqw; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.hk-sub { font-size: .9cqw; color: var(--mut); line-height: 1.35; }
.hk-box { border: 1px solid var(--line); border-radius: .8cqw; padding: .9cqw 1cqw; background: #fff; min-width: 0; }
.hk-box h6 { font-size: .95cqw; font-weight: 600; margin-bottom: .35cqw; }
.hk-lines { display: grid; gap: .45cqw; }
.hk-lines i { display: block; height: .55cqw; border-radius: 99cqw; background: #eceff3; }
.hk-lines i:nth-child(3n+2) { width: 82%; } .hk-lines i:nth-child(3n) { width: 64%; }
.hk-row { display: flex; align-items: center; gap: .8cqw; }
.hk-grid { display: grid; gap: 1cqw; }
.hk-pill { display: inline-block; font-size: .7cqw; padding: .15cqw .6cqw; border-radius: 99cqw; background: var(--cl); color: var(--c); font-weight: 600; white-space: nowrap; }
.hk-btn { display: inline-block; background: var(--c); color: #fff; font-size: .85cqw; font-weight: 600; padding: .55cqw 1.1cqw; border-radius: .45cqw; white-space: nowrap; }
.hk-float { position: absolute; background: #fff; border-radius: 1.1cqw; box-shadow: 0 .3cqw .8cqw rgb(20 30 50 / 8%), 0 1.6cqw 3.2cqw rgb(20 30 50 / 12%); }
.hk-stat { display: grid; grid-template-columns: auto 1fr; column-gap: 1cqw; align-items: center; padding: 1.3cqw 1.5cqw; }
.hk-stat .hk-ic { width: 3.2cqw; height: 3.2cqw; border-radius: .9cqw; background: var(--cl); display: grid; place-items: center; grid-row: span 3; }
.hk-stat .hk-ic svg { width: 1.7cqw; height: 1.7cqw; }
.hk-stat small { font-size: .95cqw; color: var(--mut); }
.hk-stat strong { font-size: 2.8cqw; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.hk-stat span { font-size: .95cqw; color: var(--mut); }
.hk-bars { display: flex; align-items: flex-end; gap: .45cqw; height: 5cqw; }
.hk-bars b { width: 1.3cqw; border-radius: .3cqw .3cqw .1cqw .1cqw; background: var(--c); opacity: .35; transform-origin: bottom; }
.hk-bars b:last-child { opacity: 1; }
.hk svg { display: block; }

/* Motion */
.hk-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.hk.hk-ready .hk-a { opacity: 0; }
.hk.hk-ready .hk-draw { stroke-dashoffset: 1; }
.hk.hk-ready .hk-bars b { transform: scaleY(0); }
.hk.hk-play .hk-a { animation: hk-rise 600ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
.hk.hk-play .hk-a.hk-fade { animation-name: hk-fade; }
.hk.hk-play .hk-a.hk-pop { animation-name: hk-pop; }
.hk.hk-play .hk-a.hk-left { animation-name: hk-left; }
.hk.hk-play .hk-a.hk-right { animation-name: hk-right; }
.hk.hk-play .hk-draw { animation: hk-draw 1000ms var(--ease-out) both; animation-delay: var(--dd, 600ms); }
.hk.hk-play .hk-bars b { animation: hk-grow 700ms var(--ease-out) both; animation-delay: calc(var(--dd, 700ms) + var(--i, 0) * 70ms); }
.hk.hk-play .hk-drift { animation: hk-rise 600ms var(--ease-out) both var(--d, 0ms), hk-drift var(--t, 6.5s) ease-in-out calc(var(--d, 0ms) + 700ms) infinite; }
.hk.hk-play .hk-drift.hk-left { animation-name: hk-left, hk-drift; }
.hk.hk-play .hk-drift.hk-right { animation-name: hk-right, hk-drift; }
.hk.hk-play .hk-drift.hk-pop { animation-name: hk-pop, hk-drift; }
@keyframes hk-rise { from { opacity: 0; transform: translateY(2cqw) rotate(var(--r, 0deg)); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes hk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hk-pop { from { opacity: 0; transform: scale(.92) rotate(var(--r, 0deg)); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes hk-left { from { opacity: 0; transform: translateX(-3cqw) rotate(var(--r, 0deg)); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes hk-right { from { opacity: 0; transform: translateX(3cqw) rotate(var(--r, 0deg)); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes hk-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes hk-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes hk-drift { 0%, 100% { opacity: 1; transform: translateY(0) rotate(var(--r, 0deg)); } 50% { opacity: 1; transform: translateY(-.6cqw) rotate(var(--r, 0deg)); } }
.hk .hk-rot { transform: rotate(var(--r, 0deg)); }
@media (prefers-reduced-motion: reduce) {
  .hk.hk-ready .hk-a { opacity: 1; }
  .hk.hk-ready .hk-draw { stroke-dashoffset: 0; }
  .hk.hk-ready .hk-bars b { transform: none; }
  .hk.hk-play * { animation: none !important; }
}
/* Layered image stage: a flat cover sliced into parts by scripts/build-hero-layers.py. */
.hl-stage { overflow: visible; }
.hl-stage img.hl-base, .hl-stage img.hl { position: absolute; display: block; max-width: none !important; max-height: none !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; object-fit: fill !important; user-select: none; -webkit-user-drag: none; }
.hl-stage img.hl-base { inset: 0; width: 100% !important; height: 100% !important; }
.hl-stage img.hl { height: auto !important; }
.hl-stage img.hl.hl-shadow { filter: drop-shadow(0 .4cqw .8cqw rgb(20 30 50 / 7%)) drop-shadow(0 1.6cqw 2.4cqw rgb(20 30 50 / 9%)); }
.hl-stage video.hl-video { position: absolute; display: block; object-fit: cover; border-radius: var(--vr, 0); background: #fff; max-width: none !important; margin: 0 !important; }
.hk-bars b:nth-child(1) { opacity: .3; } .hk-bars b:nth-child(2) { opacity: .5; } .hk-bars b:nth-child(3) { opacity: .7; }
/* Typed text: reveals left to right once the stage plays. */
.hk.hk-ready .hk-type { clip-path: inset(0 100% 0 0); }
.hk.hk-play .hk-type { animation: hk-type var(--tt, 1100ms) steps(var(--steps, 26)) both; animation-delay: var(--dd, 900ms); }
@keyframes hk-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.hk-pulse { animation: hk-pulse 2.4s ease-in-out infinite; }
@keyframes hk-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(47 158 110 / 35%); } 50% { box-shadow: 0 0 0 .8cqw rgb(47 158 110 / 0%); } }
@media (prefers-reduced-motion: reduce) { .hk.hk-ready .hk-type { clip-path: none; } .hk-pulse { animation: none; } }
.hl-stage video.hl-video.hl-win { box-shadow: 0 .4cqw 1cqw rgb(20 30 50 / 8%), 0 2.4cqw 4.8cqw rgb(20 30 50 / 14%); }
/* Show the whole recording inside the window: never crop the edges. */
.hl-stage video.hl-video { object-fit: contain !important; }
/* Floating cards removed from case study heroes: only the product window and walkthrough stay. */
.hk .hk-float, .hl-stage img.hl-shadow, .hl-stage img[src*="/chat-"], .hl-stage > svg, .hl-stage > span.hk-a { display: none !important; }
.hl-stage video.hl-video.hl-win { box-shadow: 0 .4cqw 1cqw rgb(20 30 50 / 8%), 0 2.4cqw 4.8cqw rgb(20 30 50 / 14%); }
.hl-stage .hl-phone { position: absolute; left: 79%; top: 30%; width: 18%; aspect-ratio: 592 / 1280; padding: .55cqw; border-radius: 3cqw; background: #111; box-shadow: 0 .6cqw 1.4cqw rgb(16 24 40 / 14%), 0 3cqw 6cqw rgb(16 24 40 / 22%); }
.hl-stage .hl-phone video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2.5cqw; background: #fff; }
.hl-stage .hl-phone { left: 72% !important; top: 14% !important; width: 26% !important; }
.hl-stage .hl-phone { left: 76% !important; top: 8% !important; width: 21% !important; }
/* iPhone frame: thin even bezel, screen corners follow the outer corners. */
.v2 .loop-phone, .hl-stage .hl-phone { padding: 0 !important; background: #0b0b0c !important; border: 0 !important; box-shadow: 0 0 0 1.5px #2a2a2c, 0 6px 14px rgb(16 24 40 / 16%), 0 24px 48px rgb(16 24 40 / 22%) !important; }
.v2 .loop-phone { border-radius: 13% / 6% !important; padding: 2.6% !important; }
.v2 .loop-phone video, .hl-stage .hl-phone video { border-radius: 11% / 5.1% !important; object-fit: cover; }
.hl-stage .hl-phone { border-radius: 13% / 6% !important; padding: 2.6% !important; }
/* iPhone frame v2: thin bezel, the video sets the height. */
.v2 .loop-phone, .hl-stage .hl-phone { aspect-ratio: auto !important; height: auto !important; padding: 0 !important; border: 4px solid #0b0b0c !important; border-radius: 22px !important; background: #0b0b0c !important; overflow: hidden; }
.v2 .loop-phone video, .hl-stage .hl-phone video { width: 100% !important; height: auto !important; aspect-ratio: 592 / 1280; border-radius: 18px !important; }
.hl-stage .hl-phone { border-width: .45cqw !important; border-radius: 2.6cqw !important; left: 75% !important; }
.hl-stage .hl-phone video { border-radius: 2.2cqw !important; }
@media (max-width: 700px) { .v2 .loop-phone { border-width: 2.5px !important; border-radius: 13px !important; } .v2 .loop-phone video { border-radius: 11px !important; } }
