/* ==========================================================================
   JM · Case 01 · Muvr — v3.1.0
   Page-only layer. The case layout (.cx-*) comes from case-crypex.css, so both
   cases share one structure; this file adds what Muvr needs on top:
   the two-ends cover, the side-by-side overview, the FigJam boards, wide
   features and galleries, the journey map, the component kit and the order
   cards. Canvas v2.2 tokens only; Muvr's own colours live inside the screens,
   the cover and the swatch list.
   ========================================================================== */

.mv { --mv-purple: #9506E6; --mv-purple-deep: #59048A; --mv-lilac: #F3EAFD; --mv-tile: #F5F3F8; }

/* ---------- Cover: the Crypex pattern, brand panel on the left, three screens on the right ---------- */
.case-cover .mv-cover { overflow: hidden; background: linear-gradient(90deg, var(--mv-purple) 0 38%, #F3EAFD 38% 100%); }
.mv-cover__brand {
  position: absolute; left: 0; top: 0; bottom: 0; width: 38%; display: grid; place-content: center; justify-items: center; gap: var(--sp-3); text-align: center;
  background: radial-gradient(90% 70% at 30% 20%, #A93BF0 0, transparent 70%), var(--mv-purple);
}
.mv-cover__brand img { width: clamp(84px, 9vw, 128px); height: auto; }
.mv-cover__brand p { font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: rgba(255, 255, 255, 0.86); }
.mv-cover__screens { position: absolute; left: 43%; right: 4%; top: 9%; bottom: -30%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4%; align-items: start; }
.mv-cover__screens img { width: 100%; height: auto; filter: drop-shadow(0 22px 28px rgba(60, 10, 100, 0.24)); }
.mv-cover__screens img:nth-child(2) { margin-top: -9%; }
.mv-cover__screens img:nth-child(3) { margin-top: 6%; }

/* ---------- Typography: balanced headings, no orphans in body copy ---------- */
.mv-nw { white-space: nowrap; }
.mv h1, .mv h2, .mv h3, .mv .cx-h3, .mv figcaption b, .mv .mv-end dd, .mv .cx-steps p { text-wrap: balance; }
.mv p, .mv li, .mv figcaption span { text-wrap: pretty; }

/* ---------- Screens: the screen itself, rounded, with a soft shadow (no device, no outline) ---------- */
.mv .cx-strip img, .mv .cx-feature__shots img {
  border: 0; border-radius: 0; background: none; box-shadow: none;
  filter: drop-shadow(0 14px 20px rgba(40, 20, 70, 0.16));
}
.mv .cx-feature__shots, .mv-shots, .mv-gallery { border: 1px solid var(--color-border); border-radius: var(--radius-3); background: #F3EEF9; }
.mv-app--driver .cx-feature__shots, .mv-app--driver .mv-gallery, .mv-app--driver .mv-shots { background: #EDF6F2; }
.mv .cx-feature__shots { align-items: start; gap: var(--sp-6); padding: var(--sp-7) var(--sp-6); }
@media (hover: hover) and (pointer: fine) {
  .mv .cx-strip img:hover, .mv .cx-feature__shots img:hover { transform: translateY(-4px); box-shadow: none; filter: drop-shadow(0 18px 24px rgba(40, 20, 70, 0.22)); }
}

/* ---------- Overview: the two ends, side by side ---------- */
.mv-ends { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); margin-top: var(--sp-7); }
.mv-end { border: 1px solid var(--color-border-strong); border-radius: var(--radius-3); background: var(--color-bg-elevated); box-shadow: var(--shadow-hard-lg); overflow: hidden; }
.mv-end header { padding: var(--sp-5) var(--sp-6); display: grid; gap: var(--sp-3); justify-items: start; border-bottom: 1px solid var(--color-border-strong); }
.mv-end--user header { background: var(--mv-lilac); }
.mv-end--driver header { background: color-mix(in srgb, var(--sticky-mint) 45%, #FFFFFF); }
.mv-end dl { margin: 0; padding: var(--sp-3) var(--sp-6) var(--sp-5); }
.mv-end dl div { display: grid; grid-template-columns: 9.5rem 1fr; gap: var(--sp-4); padding: var(--sp-3) 0; border-bottom: 1px dashed var(--color-border); }
.mv-end dl div:last-child { border-bottom: 0; }
.mv-end dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-subtle); padding-top: 3px; }
.mv-end dd { margin: 0; line-height: 1.5; }
.mv-role { margin-top: var(--sp-8); }
.mv-role .cx-label { margin-bottom: var(--sp-3); }

/* ---------- Boards: FigJam, redrawn with the site's stickies and pills ---------- */
.mv-bd { margin: 0; border: 1px solid var(--color-border-strong); border-radius: var(--radius-3); background: var(--color-bg-elevated); box-shadow: var(--shadow-hard-lg); overflow: hidden; }
.mv-bd + .mv-bd { margin-top: var(--sp-7); }
.mv-bd__bar { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5); border-bottom: 1px solid var(--color-border-strong); background: var(--color-bg-elevated); }
.mv-bd__bar b { font-weight: 600; font-size: var(--fs-14); }
.mv-bd__src { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-subtle); }
.mv-canvas {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--sp-7); padding: var(--sp-6);
  background-color: var(--color-bg); background-image: radial-gradient(rgba(22, 21, 15, 0.14) 1px, transparent 1.2px); background-size: 22px 22px;
}
.mv-canvas--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mv-canvas__col { display: grid; gap: var(--sp-4); align-content: start; }
.mv-sec {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: var(--radius-full);
  background: var(--ink-900); color: var(--color-bg); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
}
.mv-sec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sticky-lilac); }
.mv-bd--driver .mv-sec::before { background: var(--sticky-mint); }
.mv-stickies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.mv-note { padding: var(--sp-4); border: 1px solid var(--ink-900); box-shadow: 3px 3px 0 var(--ink-900); font-size: var(--fs-13); line-height: 1.45; color: var(--ink-900); }
.mv-note:nth-child(odd) { transform: rotate(-0.8deg); }
.mv-note:nth-child(even) { transform: rotate(0.7deg); }
.mv-note b { display: block; font-family: var(--font-hand); font-weight: 400; font-size: 1.15rem; line-height: 1.2; margin-bottom: var(--sp-2); }
.mv-note ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mv-note li em { display: block; font-style: normal; font-weight: 600; }
.mv-note p { margin: 0; }
.mv-note--yellow { background: var(--sticky-yellow); }
.mv-note--lilac { background: var(--sticky-lilac); }
.mv-note--mint { background: var(--sticky-mint); }
.mv-note--pink { background: var(--sticky-pink); }
.mv-note--sky { background: var(--sticky-sky); }
.mv-matrix__wrap { overflow-x: auto; border: 1px solid var(--ink-900); border-radius: var(--radius-2); background: var(--color-bg-elevated); box-shadow: 3px 3px 0 var(--ink-900); }
.mv-matrix__wrap:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.mv-matrix { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: var(--fs-13); }
.mv-matrix th, .mv-matrix td { padding: 9px 6px; text-align: center; border-bottom: 1px dashed var(--color-border); }
.mv-matrix tr:last-child th, .mv-matrix tr:last-child td { border-bottom: 0; }
.mv-matrix thead th { font-weight: 600; font-size: 11.5px; line-height: 1.25; vertical-align: bottom; border-bottom: 1px solid var(--ink-900); }
.mv-matrix thead small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 9.5px; color: var(--color-text-subtle); margin-bottom: 2px; }
.mv-matrix tbody th { text-align: left; font-weight: 500; white-space: nowrap; padding-left: var(--sp-4); }
.mv-matrix thead tr > :first-child { border-bottom: 1px solid var(--ink-900); }
.mv-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink-900); background: var(--color-bg-elevated); vertical-align: middle; }
.mv-dot--done { background: var(--sticky-mint); }
.mv-dot--none { border: 0; width: 12px; height: 1.5px; border-radius: 0; background: var(--ink-400); }
.mv-matrix__legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-5); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--color-text-muted); }
.mv-matrix__legend li { display: inline-flex; align-items: center; gap: 8px; }
.mv-canvas__hand { font-family: var(--font-hand); font-size: 1.15rem; color: var(--color-text-muted); transform: rotate(-1deg); justify-self: end; }
.mv-checklist { list-style: none; margin: 0; padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-4); display: grid; gap: 10px; background: var(--color-bg-elevated); border: 1px solid var(--ink-900); box-shadow: 3px 3px 0 var(--ink-900); font-size: var(--fs-13); line-height: 1.4; }
.mv-checklist li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: start; }
.mv-checklist li::before { content: ""; width: 14px; height: 14px; margin-top: 1px; border: 1.5px solid var(--ink-900); border-radius: 3px; background: var(--sticky-mint) no-repeat center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5 5 9l5-6' fill='none' stroke='%2316150F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* ---------- Acts: the kicker becomes the app's badge ---------- */
.mv-app .cx-kicker { justify-self: start; padding: 4px 10px; border: 1px solid var(--ink-900); border-radius: var(--radius-full); color: var(--ink-900); }
.mv .mv-app--user .cx-kicker, .mv .mv-app--user .cx-num { background: var(--sticky-lilac); }
.mv .mv-app--driver .cx-kicker, .mv .mv-app--driver .cx-num { background: var(--sticky-mint); }
.mv .cx-h2 { max-width: 24ch; }

/* ---------- Wide features: text on top, screens large below ---------- */
.mv-feature { margin-top: var(--sp-9); }
.mv-feature__text { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--sp-8); row-gap: var(--sp-3); align-items: start; margin-bottom: var(--sp-7); }
.mv-feature__text > div { display: contents; }
.mv-feature__text .cx-label { grid-column: 1 / -1; margin: 0; }
.mv-feature__text .cx-h3 { grid-column: 1; }
.mv-feature__text > ul, .mv-feature__text > p { grid-column: 2; padding-top: 4px; }
.mv-feature__text > p { color: var(--color-text-muted); max-width: 60ch; }
.mv-shots--3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-7); padding: var(--sp-7) var(--sp-8); align-items: start; }
.mv-shots--3 img:nth-child(2) { margin-top: var(--sp-6); }
.mv .cx-feature + .cx-feature, .mv-feature + .cx-feature { margin-top: var(--sp-9); }

.mv-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-6); align-items: start; padding: var(--sp-7) var(--sp-6) var(--sp-6); }
.mv-gallery figure { margin: 0; display: grid; gap: var(--sp-5); }
.mv-gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-8); padding-inline: var(--sp-8); }
.mv-gallery figcaption { display: grid; gap: 2px; }
.mv-gallery figcaption b { font-weight: 600; font-size: var(--fs-14); }
.mv-gallery figcaption span { font-size: var(--fs-13); line-height: 1.45; color: var(--color-text-muted); }

/* ---------- Journey: nine steps in three phases ---------- */
.mv-journey { background: var(--color-bg-elevated); box-shadow: var(--shadow-hard-lg); padding: var(--sp-7) var(--sp-6) var(--sp-6); }
.mv-journey__phases { display: grid; grid-template-columns: 3fr 4fr 2fr; gap: var(--sp-5); }
.mv-phase { display: grid; align-content: start; gap: var(--sp-3); }
.mv-phase > .cx-label { padding-bottom: var(--sp-2); border-bottom: 1px solid var(--color-border-strong); }
.mv-phase ol { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.mv-phase--1 ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mv-phase--2 ol { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mv-phase--3 ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mv-node { display: grid; align-content: start; gap: 4px; padding: var(--sp-3) var(--sp-3) var(--sp-4); border-radius: var(--radius-2); border: 1px dashed var(--ink-400); background: var(--color-bg-elevated); min-height: 100%; }
.mv-node small { font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--tracking-wide); color: var(--color-text-subtle); }
.mv-node b { overflow-wrap: break-word; hyphens: auto; font-weight: 600; font-size: var(--fs-14); line-height: 1.3; }
.mv-node span { font-size: var(--fs-13); line-height: 1.45; color: var(--color-text-muted); }
.mv-node--done { border: 1px solid var(--ink-900); background: var(--sticky-mint); box-shadow: var(--shadow-hard); }
.mv-node--done small, .mv-node--done span { color: var(--ink-800); }
.mv-journey__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3) var(--sp-6); margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px dashed var(--color-border); }
.mv-legend { display: flex; gap: var(--sp-5); list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--color-text-muted); }
.mv-legend li { display: inline-flex; align-items: center; gap: var(--sp-2); }
.mv-legend i { width: 14px; height: 14px; border-radius: 3px; border: 1px dashed var(--ink-400); background: var(--color-bg-elevated); }
.mv-legend li:first-child i { border: 1px solid var(--ink-900); background: var(--sticky-mint); }
.mv-journey__foot p { font-size: var(--fs-14); color: var(--color-text-muted); max-width: 60ch; }

/* ---------- Orders: cards straight from the board ---------- */
.mv-orders { margin: var(--sp-7) 0 0; background: var(--color-bg-elevated); box-shadow: var(--shadow-hard-lg); padding: var(--sp-5); }
.mv-orders__scroll { overflow-x: auto; scrollbar-width: thin; }
.mv-orders__scroll img { display: block; width: 100%; min-width: 880px; height: auto; border-radius: var(--radius-2); background: #F7F7F8; }
.mv-orders__scroll:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-2); }
.mv-orders__steps { list-style: none; padding: 0; margin: var(--sp-5) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-5); }
.mv-orders__steps li { font-size: var(--fs-14); line-height: 1.55; color: var(--color-text-muted); border-top: 1px solid var(--color-border-strong); padding-top: var(--sp-3); }
.mv-orders__steps b { display: block; color: var(--color-text); font-weight: 600; margin-bottom: 2px; }
.mv-doubts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); margin-top: var(--sp-7); }
.mv-doubts .sticky { font-size: 1.1rem; line-height: 1.35; }
.mv-doubts .sticky:nth-child(1) { transform: rotate(-1.5deg); }
.mv-doubts .sticky:nth-child(2) { transform: rotate(1deg); background: var(--sticky-pink); }
.mv-doubts .sticky:nth-child(3) { transform: rotate(-0.5deg); background: var(--sticky-sky); }

/* ---------- Component kit: six groups, one tile per part ---------- */
.mv-kit { position: relative; margin-top: var(--sp-7); padding: var(--sp-6) var(--sp-6) var(--sp-4); background: var(--color-bg-elevated); box-shadow: var(--shadow-hard-lg); }
.mv-kit .frame__label { position: absolute; top: auto; bottom: calc(100% + 6px); left: 0; }
.mv-kit__group { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: var(--sp-6); padding: var(--sp-6) 0; }
.mv-kit__group + .mv-kit__group { border-top: 1px dashed var(--color-border); }
.mv-kit__group:first-of-type { padding-top: 0; }
.mv-kit__head .cx-label { color: var(--color-text); margin-bottom: var(--sp-2); }
.mv-kit__head p:not(.cx-label) { font-size: var(--fs-14); line-height: 1.5; color: var(--color-text-muted); }
.mv-kit__tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--sp-4); align-items: start; }
.mv-tile { margin: 0; display: grid; gap: var(--sp-3); }
.mv-tile__art { display: grid; place-items: center; min-height: 9.5rem; padding: var(--sp-5) var(--sp-4); border-radius: var(--radius-2); background: var(--mv-tile); border: 1px solid rgba(22, 21, 15, 0.06); }
.mv-tile__art--stack { gap: var(--sp-3); align-content: center; }
.mv-tile__art img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.mv-tile figcaption { display: grid; gap: 2px; padding: 0 2px; }
.mv-tile figcaption b { font-size: var(--fs-14); font-weight: 600; }
.mv-tile figcaption span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.03em; color: var(--color-text-subtle); }

/* ---------- Illustrations ---------- */
.mv-illus { margin: 0; padding: var(--sp-4); background: #F9F9F9; box-shadow: var(--shadow-hard-lg); }
.mv-illus img { display: block; width: 100%; height: auto; }

/* ---------- One thing I'd change: replicas of the app's own text ---------- */
.mv .cx-contrast + .cx-contrast { margin-top: var(--sp-6); }
.mv .cx-contrast__pair figure { background: #FFFFFF; }
.mv-demo { font: 400 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.005em; min-height: 66px; }
.mv-demo--hint { color: #A7A7AC; }
.mv-demo--fixed { color: #6E6E76; }
.mv-demo b { display: block; color: #232430; font-weight: 600; margin-bottom: 2px; }
.mv-demo mark { white-space: nowrap; background: none; color: var(--mv-purple); font-weight: 600; }

/* ---------- Outcome ---------- */
.mv-measure { margin-top: var(--sp-7); padding: var(--sp-5) var(--sp-6); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-3); }
.mv-measure .cx-label { margin-bottom: var(--sp-4); }
.mv-measure .cx-roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-6); }
.mv-credit { margin-top: var(--sp-8); text-align: center; font-size: var(--fs-13); color: var(--color-text-subtle); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .mv-journey__phases { grid-template-columns: 1fr; gap: var(--sp-6); }
  .mv-gallery, .mv-gallery--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); padding-inline: var(--sp-6); }
  .mv-orders__steps { grid-template-columns: 1fr 1fr; }
  .mv-shots--3 { gap: var(--sp-5); padding: var(--sp-6); }
  .mv-canvas, .mv-canvas--three { grid-template-columns: 1fr; }
  .mv-kit__group { grid-template-columns: 1fr; gap: var(--sp-4); }
}
@media (max-width: 860px) {
  .mv-ends, .mv-feature__text { grid-template-columns: 1fr; }
  .mv-feature__text > ul, .mv-feature__text > p, .mv-feature__text .cx-h3 { grid-column: 1; }
  .mv-feature__text { row-gap: var(--sp-4); }
  .mv-doubts { grid-template-columns: 1fr; max-width: 420px; }
  .mv-measure .cx-roadmap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .mv-bd__bar { flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); }
  .mv-end dl div { grid-template-columns: 1fr; gap: 2px; }
  .mv-end header, .mv-end dl { padding-inline: var(--sp-5); }
  .mv-journey { padding: var(--sp-5); }
  .mv-phase ol, .mv-phase--1 ol, .mv-phase--2 ol, .mv-phase--3 ol { grid-template-columns: 1fr 1fr; }
  .mv-shots--3 { gap: var(--sp-3); padding: var(--sp-4); }
  .mv .cx-feature__shots { padding: var(--sp-5) var(--sp-4); gap: var(--sp-4); }
  .mv-stickies { grid-template-columns: 1fr; }
  .mv-canvas { padding: var(--sp-4); }
  .mv-gallery, .mv-gallery--3 { gap: var(--sp-4); padding: var(--sp-5) var(--sp-4); }
  .case-cover .mv-cover { background: linear-gradient(180deg, var(--mv-purple) 0 24%, #F3EAFD 24% 100%); }
  .mv-cover__brand { width: auto; right: 0; bottom: auto; height: 24%; }
  .mv-cover__brand img { width: 76px; }
  .mv-cover__brand p { display: none; }
  .mv-cover__screens { left: 6%; right: 6%; top: 32%; bottom: -60%; }
  .mv-shots--3 img:nth-child(2) { margin-top: var(--sp-4); }
  .mv-gallery { gap: var(--sp-4); padding: var(--sp-4); }
  .mv-orders { padding: var(--sp-4); }
  .mv-orders__steps { grid-template-columns: 1fr; }
  .mv-kit { padding: var(--sp-5) var(--sp-4) var(--sp-3); }
  .mv-kit__tiles { grid-template-columns: 1fr; }
}
