/* Q'Creative · motion.css
   Styles for hero-fx.js (.qhx), process-motion.js (.qpm) and choreo.js ([data-choreo]).
   Colours only through tokens.css variables. Load after tokens.css and base.css. */

/* =========================================================
   1. Hero FX
   ========================================================= */

.qhx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
  z-index: 0;
}
/* Static mesh: first paint, no-WebGL fallback and reduced-motion state */
.qhx-mesh {
  position: absolute;
  inset: -6%;
  background: var(--grad-mesh, radial-gradient(40% 55% at 72% 26%, var(--p-lilac), transparent 70%));
  animation: qhx-drift 26s ease-in-out infinite alternate;
  transform-origin: 70% 40%;
}
.qhx.is-gl .qhx-mesh { animation: none; opacity: 0; transition: opacity 1.4s var(--ease-out) 0.2s; }
.qhx.is-paused .qhx-mesh { animation-play-state: paused; }
@keyframes qhx-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-2.5%, 2%, 0) scale(1.05) rotate(-2deg); }
  100% { transform: translate3d(2%, -1.5%, 0) scale(1.02) rotate(1.5deg); }
}
.qhx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
}
.qhx.is-gl .qhx-canvas { opacity: 1; }
.qhx-grain {
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  background-size: 160px 160px;
  filter: invert(1);
  mix-blend-mode: multiply;
  opacity: 0.05;
}

/* Stage: the visual column of the hero. The layout gives it a height */
.qhx-stage {
  position: relative;
  pointer-events: none;
}
/* Composition: fixed proportions centred in the stage, so a wide and short stage (600-1023 px) never
   pushes cards out of it. Cards are placed in % of it and sized in cqw; compact layout by container size */
.qhx-comp {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1.04;
  container: qhx / size;
  perspective: 1000px;
  perspective-origin: 50% 35%;
}
.qhx-stage--own {
  position: absolute;
  right: max(var(--gutter, 16px), calc((100% - var(--maxw, 1200px)) / 2));
  top: 14%;
  width: min(44%, 540px);
  height: 72%;
}
@media (max-width: 767px) {
  .qhx-stage--own { left: var(--gutter, 16px); right: var(--gutter, 16px); top: auto; bottom: 2%; width: auto; height: 42%; }
}

.qhx-card {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: min(var(--w, auto), var(--max, 100%));
  will-change: transform;
}
.qhx-card--metric { width: auto; }
.qhx-card__float {
  animation: qhx-float var(--fd, 7s) ease-in-out var(--fdl, 0s) infinite alternate;
}
.qhx-stage.is-paused .qhx-card__float { animation-play-state: paused; }
.qhx-stage.is-paused .qhx-card { will-change: auto; }
@keyframes qhx-float {
  from { transform: translate3d(0, -5px, 0); }
  to   { transform: translate3d(0, 6px, 0); }
}
.qhx-card__in {
  transform: rotate(var(--r, 0deg));
  transition:
    opacity 0.9s var(--ease-out) var(--d, 0ms),
    transform 1.3s var(--ease-out) var(--d, 0ms),
    filter 1s var(--ease-out) var(--d, 0ms);
}
.qhx-card:not(.is-in) .qhx-card__in {
  opacity: 0;
  transform: perspective(900px) translate3d(0, 46px, -180px) rotateX(18deg) rotate(var(--r, 0deg));
  filter: blur(12px);
}

/* Ad in a feed (creative + platform chrome) */
.qhx-ad {
  padding: 8px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-l);
}
.qhx-ad__head { display: flex; align-items: center; gap: 7px; padding: 2px 2px 8px; }
.qhx-ad__avatar { width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--ink); }
.qhx-ad__lines { display: grid; gap: 4px; flex: 1; }
.qhx-ad__lines i { display: block; height: 5px; border-radius: 3px; background: var(--line); }
.qhx-ad__lines i:last-child { width: 46%; background: var(--surface-2); }
.qhx-ad__lines i:first-child { width: 70%; }
.qhx-ad__sp {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.qhx-ad__art { border-radius: 11px; overflow: hidden; background: var(--surface-2); }
.qhx-ad__art img, .qhx-reel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qhx-ad__cta { display: flex; align-items: center; gap: 8px; padding: 9px 2px 2px; }
.qhx-ad__cta i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); max-width: 58%; }
.qhx-ad__cta b { margin-left: auto; width: 54px; height: 18px; border-radius: var(--radius-pill); background: var(--ink); }

/* Raw vertical creative */
.qhx-reel {
  position: relative;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-l);
  outline: 1px solid color-mix(in srgb, var(--surface) 60%, transparent);
  outline-offset: -1px;
}
.qhx-reel__tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink);
}

/* Metric cards reuse .metric-card from base.css; this adds the sparkline */
.qhx-metric { min-width: 150px; white-space: nowrap; }
.qhx-metric .metric-card__value { font-size: 1.5rem; }
.qhx-spark { width: 100%; height: 26px; margin-top: 2px; overflow: visible; }
.qhx-spark__line { fill: none; stroke: var(--p-mint-ink, var(--ink)); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.qhx-spark__area { fill: var(--p-mint); opacity: 0.55; }

@container qhx (max-width: 420px) or (max-height: 480px) {
  .qhx-card { left: var(--mx, var(--x)); top: var(--my, var(--y)); }
  .qhx-metric { min-width: 0; padding: 9px 12px 10px; }
  .qhx-metric .metric-card__value { font-size: 1.125rem; }
  .qhx-metric .metric-card__label { font-size: 9.5px; }
  .qhx-spark { height: 18px; }
  .qhx-ad { padding: 6px; border-radius: 14px; }
  .qhx-ad__head { padding-bottom: 6px; }
  .qhx-ad__avatar { width: 15px; height: 15px; }
  .qhx-ad__sp { font-size: 7.5px; }
}
/* Very small phones (stage under 320 px): two metrics, slightly smaller */
@container qhx (max-width: 320px) {
  .qhx-card--m3 { display: none; }
  .qhx-metric { transform: scale(0.9); transform-origin: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .qhx-mesh, .qhx-card__float { animation: none; }
  .qhx-card__in { transition: none; }
  .qhx-card:not(.is-in) .qhx-card__in { opacity: 1; transform: rotate(var(--r, 0deg)); filter: none; }
}

/* =========================================================
   2. Process motion graphic
   ========================================================= */

.qpm { position: relative; --qpm-top: var(--nav-h, 0px); }
.qpm-track { position: relative; }
.qpm-stage { position: relative; overflow: hidden; }
/* Clip only sideways (the tube runs off the edges); the shadows under the phone and mocks keep their full fall */
@supports (overflow: clip) { .qpm-stage { overflow: clip visible; } }
.qpm[data-layout="wide"]:not(.is-reduced) .qpm-stage {
  position: sticky;
  top: var(--qpm-top);
  height: calc(100vh - var(--qpm-top));
}
.qpm-head { position: relative; z-index: 2; padding-top: clamp(16px, 3vh, 40px); }
.qpm-canvas { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; }
.qpm-board {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  z-index: 1;
  transform-origin: 0 0;
}
.qpm-board ul, .qpm-board ol { list-style: none; margin: 0; padding: 0; }
.qpm-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Chips (problems and results) */
.qpm-chip {
  position: absolute;
  translate: -50% -50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-m);
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-2);
  transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out), filter 0.6s var(--ease-out);
}
.qpm-problem:not(.is-on) { opacity: 0; transform: translate3d(0, -18px, 0) scale(0.94); filter: blur(8px); }
.qpm-problem:nth-child(2) { transition-delay: 40ms; }
.qpm-problem:nth-child(3) { transition-delay: 80ms; }

.qpm-result {
  gap: 9px;
  padding: 7px 16px 7px 7px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  color: var(--ink);
  box-shadow: var(--shadow-l);
}
.qpm-result__icon {
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--p-mint);
}
.qpm-result__icon svg {
  width: 12px; height: 12px;
  fill: none;
  stroke: var(--p-mint-ink, var(--ink));
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qpm-result:not(.is-on) { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.86); filter: blur(8px); }
.qpm-result:nth-child(2) { transition-delay: 160ms; }

/* Stations */
.qpm-bead {
  position: absolute;
  translate: -50% -50%;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 0 0 5px var(--qpm-halo, var(--p-lilac)), var(--shadow-m);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out);
}
.qpm-station--1 { --qpm-halo: color-mix(in srgb, var(--p-lilac) 60%, transparent); }
.qpm-station--2 { --qpm-halo: color-mix(in srgb, var(--p-sky) 60%, transparent); }
.qpm-station--3 { --qpm-halo: color-mix(in srgb, var(--p-mint) 60%, transparent); }
.qpm-station--4 { --qpm-halo: color-mix(in srgb, var(--p-butter) 75%, transparent); }

.qpm-label {
  position: absolute;
  text-align: center;
  transition: opacity 0.6s var(--ease-out) 0.08s, transform 0.8s var(--ease-out) 0.08s, filter 0.6s var(--ease-out) 0.08s;
}
.qpm-label::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 16px;
  background: var(--line-strong, var(--line));
}
.qpm-station[data-mock="above"] .qpm-label::before { top: -22px; }
.qpm-station[data-mock="below"] .qpm-label::before { bottom: -22px; }
.qpm .qpm-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.qpm-desc {
  margin: 6px 0 0;
  font-family: var(--font-text);
  /* never under 13 px on screen, whatever the board scale */
  font-size: max(14.5px, calc(13px / var(--qpm-k, 1)));
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}

.qpm-mock {
  position: absolute;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-m);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-l);
  overflow: hidden;
  transform-origin: 50% 100%;
  transition: opacity 0.7s var(--ease-out) 0.14s, transform 1s var(--ease-out) 0.14s, filter 0.7s var(--ease-out) 0.14s;
}
.qpm-station[data-mock="below"] .qpm-mock { transform-origin: 50% 0; }

.qpm-station:not(.is-on) .qpm-bead { opacity: 0; transform: scale(0.4); }
.qpm-station:not(.is-on) .qpm-label { opacity: 0; transform: translate3d(0, 12px, 0); filter: blur(6px); }
.qpm-station:not(.is-on) .qpm-mock { opacity: 0; transform: perspective(900px) translate3d(0, 26px, -60px) rotateX(16deg); filter: blur(10px); }
.qpm-station[data-mock="below"]:not(.is-on) .qpm-mock { transform: perspective(900px) translate3d(0, -26px, -60px) rotateX(-16deg); }
.qpm-station[data-mock="below"]:not(.is-on) .qpm-label { transform: translate3d(0, -12px, 0); }

/* Mock pieces */
.qpm-mock__bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding-inline: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.qpm-mock__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong, var(--line)); }
.qpm-mock__bar span {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.qpm-mock__body { position: relative; flex: 1; min-height: 0; padding: 11px 12px; }
.qpm-lines { display: grid; gap: 5px; flex: 1; min-width: 0; }
.qpm-lines i { display: block; height: 5px; border-radius: 3px; background: var(--line); }
.qpm-lines i.is-mark { background: var(--p-butter-deep, var(--p-butter)); }
.qpm-av { width: 16px; height: 16px; flex: none; border-radius: 50%; }
.qpm-av--lilac { background: var(--p-lilac); }
.qpm-av--sky { background: var(--p-sky); }
.qpm-av--ink { background: var(--ink); }

.qpm-notes { display: grid; gap: 7px; align-content: start; }
.qpm-notes__row { display: flex; align-items: center; gap: 6px; }
.qpm-tag {
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}
.qpm-wave { display: flex; align-items: center; gap: 2px; height: 14px; margin-left: auto; }
.qpm-wave i { width: 2px; height: 100%; border-radius: 1px; background: var(--p-lilac-deep, var(--p-lilac)); transform-origin: 50% 50%; transform: scaleY(0.35); }
.qpm.is-inview .qpm-station.is-on .qpm-wave i { animation: qpm-wave 0.9s ease-in-out infinite alternate; }
.qpm-wave i:nth-child(2) { animation-delay: -0.2s !important; }
.qpm-wave i:nth-child(3) { animation-delay: -0.5s !important; }
.qpm-wave i:nth-child(4) { animation-delay: -0.1s !important; }
.qpm-wave i:nth-child(5) { animation-delay: -0.7s !important; }
.qpm-wave i:nth-child(6) { animation-delay: -0.35s !important; }
.qpm-wave i:nth-child(7) { animation-delay: -0.6s !important; }
@keyframes qpm-wave { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }

.qpm-copy { display: grid; gap: 6px; align-content: start; }
.qpm-copy__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.qpm-copy__row b {
  display: grid;
  place-items: center;
  width: 16px; height: 16px;
  flex: none;
  border-radius: 5px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 400;
  color: var(--ink-2);
}
.qpm-copy__row.is-pick { border-color: var(--p-lilac-deep, var(--p-lilac)); background: var(--w-lilac, var(--surface)); }
.qpm-copy__row.is-pick b { background: var(--p-lilac); color: var(--ink); }
.qpm-copy__row em {
  position: relative;
  width: 14px; height: 14px;
  flex: none;
  border-radius: 50%;
  background: var(--p-mint);
}
.qpm-copy__row em::after {
  content: "";
  position: absolute;
  left: 4.5px; top: 3px;
  width: 3.5px; height: 6px;
  border: solid var(--p-mint-ink, var(--ink));
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.qpm-canvas2 {
  background-image: radial-gradient(var(--line) 1px, transparent 1.2px);
  background-size: 10px 10px;
}
.qpm-art { position: absolute; margin: 0; }
.qpm-art img, .qpm-art > span {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  box-shadow: var(--shadow-s);
}
.qpm-art figcaption {
  position: absolute;
  left: 0;
  top: calc(100% + 3px);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-3);
}
.qpm-art--916 { left: 12px; top: 10px; width: 52px; height: 92px; }
.qpm-art--45 { left: 76px; top: 18px; width: 64px; height: 80px; }
.qpm-art--45::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1.5px solid var(--accent-2);
  border-radius: 7px;
  pointer-events: none;
}
.qpm-art--11 { left: 152px; top: 30px; width: 50px; height: 50px; }
.qpm-art--11 > span { background: linear-gradient(150deg, var(--p-sky), var(--p-mint)); }
.qpm-cursor {
  position: absolute;
  left: 132px;
  top: 76px;
  width: 15px;
  height: 15px;
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 1;
}
.qpm.is-inview .qpm-station.is-on .qpm-cursor { animation: qpm-cursor 5.5s var(--ease-out) infinite; }
@keyframes qpm-cursor {
  0%, 18% { transform: translate(0, 0); }
  38%, 58% { transform: translate(38px, -26px); }
  78%, 100% { transform: translate(0, 0); }
}

.qpm-deliver { display: grid; gap: 10px; align-content: start; }
.qpm-deliver__thumbs { display: flex; gap: 6px; }
.qpm-deliver__thumbs img {
  width: 54px;
  height: 66px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.qpm-deliver__row { display: flex; align-items: center; gap: 6px; }
.qpm-ver {
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-2);
}
.qpm-ver.is-new { background: var(--p-mint); color: var(--ink); }
.qpm-arrow { position: relative; width: 16px; height: 1px; background: var(--line-strong, var(--ink-3)); }
.qpm-arrow::after {
  content: "";
  position: absolute;
  right: 0; top: -3px;
  width: 6px; height: 6px;
  border: solid var(--line-strong, var(--ink-3));
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}
.qpm-ok {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

/* Feed at the end of the tube */
.qpm-feed { position: absolute; }
/* The phone is the destination from the start: opaque (it hides the tube end), dimmed and empty until the flow reaches it */
.qpm-phone, .qpm-feed__col { transition: background-color 0.8s var(--ease-out), opacity 0.8s var(--ease-out), filter 0.8s var(--ease-out); }
.qpm-feed:not(.is-on) .qpm-phone { background-color: var(--line-strong, var(--ink-3)); box-shadow: var(--shadow-m); }
.qpm-feed:not(.is-on) .qpm-phone__notch { background: var(--line-strong, var(--ink-3)); }
.qpm-feed:not(.is-on) .qpm-feed__col { filter: grayscale(1); }
/* Dimmed means grey and empty, never faded text: "Sponsored" keeps --ink-3 contrast in both states */
.qpm-feed:not(.is-on) .qpm-post__head .qpm-lines i,
.qpm-feed:not(.is-on) .qpm-post__cta i { background: var(--surface-2); }
.qpm-feed:not(.is-on) .qpm-av--ink,
.qpm-feed:not(.is-on) .qpm-post__cta b { background: var(--line-strong, var(--ink-3)); }
.qpm-feed:not(.is-on) .qpm-feed__label { opacity: 0; }
.qpm-feed:not(.is-on) .qpm-post__art img { opacity: 0; transform: scale(1.06); }
.qpm-post__art img { transition: opacity 0.8s var(--ease-out) 0.15s, transform 1.2s var(--ease-out) 0.15s; }
.qpm-feed__label { transition: opacity 0.6s var(--ease-out) 0.3s; }
.qpm-feed__label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.qpm-feed__label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--p-mint-deep, var(--p-mint)); }
/* iPhone Pro: dark titanium frame with a lit rim, side buttons, Dynamic Island inside the status bar,
   home indicator. Frame colour lives in background-color so the dimmed state can still fade */
.qpm-phone {
  position: absolute;
  inset: 0;
  padding: 5px;
  border-radius: 36px;
  background-color: #1C1B21;
  background-image: linear-gradient(150deg, rgb(255 255 255 / 0.16), transparent 22%, transparent 78%, rgb(255 255 255 / 0.1));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22), inset 0 0 0 3px #0B0A0F, var(--shadow-l);
}
/* Side buttons: action + volume on the left, power on the right */
.qpm-phone::before, .qpm-phone::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(transparent 17%, #2C2B32 17% 21.5%, transparent 21.5% 26%, #2C2B32 26% 35%, transparent 35% 37.5%, #2C2B32 37.5% 46.5%, transparent 46.5%);
}
.qpm-phone::before { left: -2.5px; border-radius: 2px 0 0 2px; }
.qpm-phone::after { right: -2.5px; background: linear-gradient(transparent 27%, #2C2B32 27% 41%, transparent 41%); }
.qpm-feed:not(.is-on) .qpm-phone::before,
.qpm-feed:not(.is-on) .qpm-phone::after { opacity: 0.4; }
.qpm-phone__screen {
  position: relative;
  height: 100%;
  border-radius: 31px;
  overflow: hidden;
  background: var(--surface-2);
}
.qpm-phone__status {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 2px 15px 0 20px;
  background: rgb(243 243 248 / 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
}
.qpm-phone__time { font-family: var(--font-text); font-size: 10px; font-weight: 600; letter-spacing: -0.01em; }
.qpm-phone__sys { width: 27px; height: 6px; fill: currentColor; }
.qpm-phone__notch {
  position: absolute;
  left: 50%;
  top: 6px;
  translate: -50% 0;
  width: 32%;
  height: 17px;
  border-radius: var(--radius-pill);
  background: #0B0A0F;
}
.qpm-phone__home {
  position: absolute;
  left: 50%;
  bottom: 6px;
  z-index: 2;
  translate: -50% 0;
  width: 36%;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  opacity: 0.85;
}
.qpm-feed:not(.is-on) .qpm-phone__status { color: var(--line-strong, var(--ink-3)); }
.qpm-feed:not(.is-on) .qpm-phone__home { opacity: 0.25; }
.qpm-feed__col { padding: 36px 8px 0; }
.qpm.is-done.is-inview .qpm-feed__col { animation: qpm-feed 30s linear infinite; }
@keyframes qpm-feed { to { transform: translate3d(0, -50%, 0); } }
.qpm-post {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  padding: 7px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.qpm-post__head { display: flex; align-items: center; gap: 6px; }
.qpm-post__head .qpm-lines i:first-child { width: 70%; }
.qpm-sp {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.qpm-post__art { border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.qpm-post__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qpm-post__cta { display: flex; align-items: center; gap: 6px; }
.qpm-post__cta i { flex: 1; max-width: 55%; height: 5px; border-radius: 3px; background: var(--line); }
.qpm-post__cta b { margin-left: auto; width: 42px; height: 14px; border-radius: var(--radius-pill); background: var(--ink); }

/* Tall (vertical) layout */
.qpm[data-layout="tall"] .qpm-label { text-align: left; }
.qpm[data-layout="tall"] .qpm-label::before { display: none; }
.qpm[data-layout="tall"] .qpm-title { font-size: 20px; padding-left: 2px; }
.qpm[data-layout="tall"] .qpm-desc { font-size: 15px; }
.qpm[data-layout="tall"] .qpm-bead { width: 40px; height: 40px; border-radius: 12px; }
.qpm[data-layout="tall"] .qpm-feed__label { left: auto; right: 4px; translate: none; }
.qpm[data-layout="tall"] .qpm-chip { font-size: 15px; padding: 9px 14px; }
.qpm[data-layout="tall"] .qpm-station:not(.is-on) .qpm-mock { transform: perspective(900px) translate3d(0, 30px, -60px) rotateX(14deg); }

/* Reduced motion: same labels, static. The problems stay visible, struck through */
.qpm.is-reduced .qpm-problem {
  opacity: 1;
  transform: none;
  filter: none;
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-strong, var(--ink-3));
  box-shadow: var(--shadow-s);
}

@media (prefers-reduced-motion: reduce) {
  .qpm-chip, .qpm-bead, .qpm-label, .qpm-mock, .qpm-feed { transition: none; }
  .qpm-feed__col, .qpm-wave i, .qpm-cursor { animation: none !important; }
}

/* =========================================================
   3. Choreo (choreo.js toggles .is-in once, at 85 % of the viewport; nothing is tied to scroll position)
   ========================================================= */

/* Hidden states: only while the module runs and until the block enters */
.choreo-on [data-choreo="rise"]:not(.is-in) { opacity: 0; transform: translate3d(0, 40px, 0); }
.choreo-on [data-choreo="tilt"]:not(.is-in) {
  opacity: 0;
  transform: perspective(1100px) translate3d(0, 56px, 0) rotateX(16deg) scale(0.97);
  transform-origin: 50% 100%;
  filter: blur(8px);
}
.choreo-on [data-choreo="blur-in"]:not(.is-in) { opacity: 0; transform: scale(1.03); filter: blur(12px); }
.choreo-on [data-choreo="stagger"]:not(.is-in) .choreo-item { opacity: 0; transform: translate3d(0, 36px, 0); filter: blur(4px); }
.choreo-on [data-choreo="stagger"][data-choreo-each="tilt"]:not(.is-in) .choreo-item {
  transform: perspective(1100px) translate3d(0, 52px, 0) rotateX(14deg) scale(0.97);
  transform-origin: 50% 100%;
  filter: blur(8px);
}
.choreo-on [data-choreo="stagger"][data-choreo-each="blur-in"]:not(.is-in) .choreo-item { transform: scale(1.03); filter: blur(12px); }
/* Phones: no blur */
.choreo-light [data-choreo]:not(.is-in),
.choreo-light [data-choreo]:not(.is-in) .choreo-item { filter: none; }

/* Entrance: 0.9 s with an exponential ease-out, 80 ms cascade, blur only in the first half.
   Present only during the entrance (.choreo-anim), so hovers and other transitions keep their own timing */
.choreo-anim:not([data-choreo="stagger"]),
.choreo-anim .choreo-item {
  transition:
    opacity var(--choreo-dur, 900ms) var(--ease-out) var(--choreo-d, 0ms),
    transform var(--choreo-dur, 900ms) var(--ease-out) var(--choreo-d, 0ms),
    filter calc(var(--choreo-dur, 900ms) / 2) var(--ease-out) var(--choreo-d, 0ms) !important;
}
