/* Service pages: Key Facts as the sideways row of the industry pages (../../../industrias/comun/css/tipos.css).
   Each fact is one large frame (a .pn drawn at 520 × 325, scaled by --k) holding an instrument that shows the
   fact: squads as a grid of 3D cubes, money as 3D columns by year, shares as a ring or a field of 100 dots,
   onboarding as a run of days, volume as a running counter, speed as a stopwatch line, stacks as chips.
   The fact's live title and text sit above the frame. Animated once on view by ../js/hechos.js. */

/* the caption: no index (the facts are not a sequence), the live title and its text */
.tph-cap.hx-cap { display: block; padding-bottom: 16px; max-width: 46ch; }
.hx-cap .tph-name { display: block; }
.hx-cap p { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: var(--mute-l); text-wrap: pretty; }
.tph.is-pin .tph-intro .sh-more { display: block; margin-top: 14px; }
.sv-page .tph.is-pin .tph-cue { display: flex; width: max-content; }
.tph-intro .btn { margin-top: 26px; }

/* ================= inside the frame ================= */
.hx { position: absolute; inset: 0; color: #fff; font-family: var(--f-text); }
.hx-fig { position: absolute; z-index: 3; left: 28px; top: 24px; max-width: 250px; }
.hx-fig b { display: block; font-family: var(--f-display); font-weight: 500; font-size: 44px; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-fig small { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.35; color: var(--mute-d); }
.hx-note { position: absolute; z-index: 3; left: 28px; bottom: 22px; font-size: 11.5px; color: rgba(255,255,255,.42); }

/* ---------- a 3D floor with boxes standing on it (cubes, columns) ---------- */
.hx-scene { position: absolute; inset: 0; perspective: 1100px; perspective-origin: 62% 30%; }
.hx-floor {
  position: absolute; left: var(--fl, 236px); top: var(--ft, 112px); width: var(--fw2, 200px); height: var(--fd, 200px);
  transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-40deg);
  background: radial-gradient(closest-side, rgba(126,168,255,.12), rgba(126,168,255,0));
}
.bx {
  --w: 22px; --d: 22px; --h: 22px;
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--d);
  transform-style: preserve-3d;
}
.bx > i { position: absolute; display: block; transform-style: preserve-3d; }
.bx > .t { inset: 0; transform: translateZ(var(--h)); background: var(--top, #9dbdff); }
.bx > .f { left: 0; top: var(--d); width: var(--w); height: var(--h); transform-origin: 0 0; transform: rotateX(90deg); background: var(--front, #3d6fd6); }
.bx > .l { left: 0; top: 0; width: var(--h); height: var(--d); transform-origin: 0 0; transform: rotateY(-90deg); background: var(--side, #2a55b5); }
.bx > .r { left: var(--w); top: 0; width: var(--h); height: var(--d); transform-origin: 0 0; transform: rotateY(-90deg); background: var(--side, #2a55b5); }
.bx.is-dim { --top: #3a3d46; --front: #2a2c33; --side: #23252b; }
.bx.is-hot { --top: #ffc19c; --front: #ec6219; --side: #c24e12; }
.bx.is-ok { --top: #a9ecca; --front: #2bb673; --side: #1f8f59; }
.bx-lab { position: absolute; transform: translate(-50%, 0); font-family: var(--f-code); font-size: 11px; color: rgba(255,255,255,.55); white-space: nowrap; }

/* ---------- ring: a share of a whole ---------- */
.hx-ring { position: absolute; right: 44px; top: 50%; width: 196px; height: 196px; margin-top: -98px; }
.hx-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hx-ring circle { fill: none; stroke-width: 14; }
.hx-ring .bg { stroke: rgba(255,255,255,.09); }
.hx-ring .fg { stroke: url(#hx-ring-g); stroke-linecap: round; }
.hx-ring span { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--mute-d); }
.hx-faces { position: absolute; inset: 34px; border-radius: 50%; overflow: hidden; display: grid; grid-template-columns: repeat(3, 1fr); opacity: .9; }
.hx-faces img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 30%; filter: grayscale(.3); }

/* ---------- dots: a hundred, some of them lit ---------- */
.hx-dots { position: absolute; right: 36px; top: 50%; transform: translateY(-50%); display: grid; grid-template-columns: repeat(10, 14px); gap: 7px; }
.hx-dots i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.1); transition: background-color .3s; }
.hx-dots i.is-on { background: #7ea8ff; }
.hx-dots.is-hot i.is-on { background: var(--orange); }

/* ---------- days: a run of working days up to the start ---------- */
.hx-days { position: absolute; left: 28px; right: 28px; bottom: 74px; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; }
.hx-day { position: relative; height: 46px; border-radius: 9px; padding: 7px 0 0 7px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); font-family: var(--f-code); font-size: 10.5px; color: rgba(255,255,255,.4); transition: background-color .3s, box-shadow .3s, color .3s; }
.hx-day.is-on { background: rgba(1,96,231,.28); box-shadow: inset 0 0 0 1px rgba(126,168,255,.5); color: #cfe0ff; }
.hx-day.is-end { background: rgba(43,182,115,.26); box-shadow: inset 0 0 0 1px rgba(95,214,160,.6); color: #c7f2dc; }
/* a milestone hangs under its day, whole (the cells are too narrow to hold it) */
.hx-day em { position: absolute; left: 0; top: calc(100% + 10px); padding-top: 8px; border-left: 1px solid rgba(255,255,255,.25); padding-left: 6px; font-style: normal; font-family: var(--f-text); font-size: 11px; line-height: 1.2; color: rgba(255,255,255,.7); white-space: nowrap; }
.hx-day:last-child em { left: auto; right: 0; border-left: 0; border-right: 1px solid rgba(255,255,255,.25); padding: 8px 6px 0 0; }

/* ---------- ticker: volume per day, running ---------- */
.hx-spark { position: absolute; left: 28px; right: 28px; bottom: 52px; height: 120px; display: flex; align-items: flex-end; gap: 4px; }
.hx-spark i { flex: 1; height: calc(var(--v) * 100%); border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #7ea8ff, rgba(126,168,255,.15)); transform-origin: 50% 100%; }
.hx-spark i:last-child { background: linear-gradient(180deg, #ff9e68, rgba(236,98,25,.2)); }
.hx-live { position: absolute; right: 28px; top: 28px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--mute-d); }
.hx-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--run); box-shadow: 0 0 0 4px rgba(43,182,115,.2); }

/* ---------- clock: a launch measured against a limit ---------- */
.hx-clock { position: absolute; left: 28px; right: 28px; bottom: 64px; }
.hx-scale { position: relative; height: 54px; border-radius: 12px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); overflow: hidden; }
.hx-scale i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--v) * 100%); background: linear-gradient(90deg, rgba(43,182,115,.2), rgba(43,182,115,.55)); transform-origin: 0 50%; }
.hx-limit { position: absolute; top: -8px; bottom: -8px; left: calc(var(--l) * 100%); width: 0; border-left: 1.5px dashed rgba(255,158,104,.9); }
.hx-limit em { position: absolute; left: 8px; top: -18px; font-style: normal; font-size: 11px; color: #ffb68b; white-space: nowrap; }
.hx-ticks { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--f-code); font-size: 10.5px; color: rgba(255,255,255,.4); }

/* ---------- chips: a stack, lit one by one ---------- */
.hx-chips { position: absolute; left: 28px; right: 28px; bottom: 34px; display: flex; flex-wrap: wrap; gap: 8px; }
.hx-chips i { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 10px; font-style: normal; font-size: 13px; color: rgba(255,255,255,.45); background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: color .35s, background-color .35s, box-shadow .35s; }
.hx-chips i::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.2); transition: background-color .35s; }
.hx-chips i.is-on { color: #fff; background: rgba(1,96,231,.22); box-shadow: inset 0 0 0 1px rgba(126,168,255,.45); }
.hx-chips i.is-on::before { background: #5fd6a0; }

/* ---------- donut: a share of a budget ---------- */
.hx-donut { position: absolute; right: 46px; top: 50%; width: 180px; height: 180px; margin-top: -90px; border-radius: 50%; background: conic-gradient(#ff9e68 0 calc(var(--v) * 1turn), rgba(255,255,255,.08) 0); -webkit-mask: radial-gradient(closest-side, transparent 64%, #000 65%); mask: radial-gradient(closest-side, transparent 64%, #000 65%); }
.hx-donut-l { position: absolute; right: 46px; top: 50%; width: 180px; margin-top: -10px; text-align: center; font-size: 12px; color: var(--mute-d); }

/* ---------- curve: cost of a defect by the stage it is found in ---------- */
.hx-curve { position: absolute; left: 28px; right: 28px; bottom: 30px; height: 150px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; }
.hx-curve span { display: grid; gap: 8px; text-align: center; font-size: 11px; color: rgba(255,255,255,.55); }
.hx-curve i { display: block; height: calc(var(--v) * 110px); border-radius: 8px 8px 3px 3px; background: rgba(255,255,255,.1); transform-origin: 50% 100%; }
.hx-curve span.is-ok i { background: linear-gradient(180deg, #5fd6a0, rgba(43,182,115,.25)); }
.hx-curve span.is-ok { color: #c7f2dc; }

/* small frames (phones): a little less type */
@media (max-width: 560px) {
  .hx-cap p { font-size: 14px; }
}
