/* Simply Draw digital canvas case study: styles only this page uses.
   Shared tokens, header, type scale, device frames and the desktop zoom live in
   assets/css/case-study.css. Like Simply Guitar and Simply Draw v2, sections use normal flow
   inside the zoomed 1440 frame, so px values are design px on desktop and scale with the window. */

:root {
  --sd-violet: #7b2ff7;
  --sd-yellow: #ffd44f;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Layout ---------- */
.wrap { padding: 112px 96px; }
.chapter {
  display: grid; grid-template-columns: 440px 1fr; column-gap: 88px; align-items: center;
  grid-template-areas: "text device" "steps device";
  grid-template-rows: auto 1fr;
}
.chapter > .chapter__text { grid-area: text; align-self: end; }
.chapter > .chapter__device { grid-area: device; }
.chapter > .chapter__steps { grid-area: steps; align-self: start; margin-top: 28px; }
.chapter--flip { grid-template-columns: 1fr 440px; grid-template-areas: "device text" "device steps"; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sd-violet);
}
.kicker i {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  font-style: normal; letter-spacing: 0; font-size: 12px; color: #fff; background: var(--sd-violet);
}
.on-dark .kicker { color: var(--sd-yellow); }
.on-dark .kicker i { background: var(--sd-yellow); color: var(--night); }

/* ---------- Motion ---------- */
.float { animation: float 7s ease-in-out infinite; }
.float--b { animation-duration: 8s; animation-delay: -3s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.sparkle { position: absolute; z-index: 4; pointer-events: none; width: 30px; animation: twinkle 3.2s ease-in-out infinite; }
.sparkle svg { display: block; width: 100%; height: auto; }
@keyframes twinkle { 0%, 100% { transform: scale(.7) rotate(0); opacity: .6; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 760px; display: grid; grid-template-columns: 460px 1fr; column-gap: 72px; align-items: center; padding: 72px 96px; }
.hero__logo { height: 200px; width: auto; }
.hero__title { margin-top: 24px; font-size: 26px; font-weight: 600; line-height: 1.3; color: var(--sd-yellow); }
.hero__sub { margin-top: 10px; font-size: 22px; line-height: 32px; font-weight: 300; color: #fff; }
.hero__meta { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(243, 240, 223, .16); display: grid; gap: 4px; font-size: 13px; line-height: 20px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--sd-yellow); }
.hero__meta span { color: rgba(255, 255, 255, .8); }
.hero__stage { position: relative; transform: rotate(-3deg); }
.hero__stage .dev { box-shadow: 0 40px 80px rgba(0, 0, 0, .35); }

/* ---------- The brief ---------- */
.brief { display: grid; grid-template-columns: 1fr 380px; column-gap: 112px; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.facts { margin: 0; display: grid; gap: 24px; }
.facts--stack > div { padding-top: 20px; border-top: 1px solid rgba(243, 240, 223, .2); }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sd-yellow); }
.facts dd { margin: 6px 0 0; font-size: 15px; line-height: 23px; color: var(--cream); }
/* A full spark anchored to the section's bottom right */
.brief-section { position: relative; overflow: hidden; }
.brief-section > .section__inner { position: relative; z-index: 1; }
.brief-spark { position: absolute; z-index: 0; right: -12vw; bottom: -38vw; width: 62vw; max-width: none; rotate: 24deg; pointer-events: none; opacity: .7; }

/* ---------- Sequences (data-seq) and step lists ---------- */
.seq .dev__screen > .frame { position: relative; transition: opacity .45s var(--ease-out); }
.seq .dev__screen > .frame + .frame { position: absolute; inset: 0; }
.seq .dev__screen > .frame > img { display: block; width: 100%; height: auto; }
.seq.is-ready .dev__screen > .frame:not(.is-active) { opacity: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: step; }
.steps li { position: relative; }
.steps button {
  position: relative; display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; width: 100%;
  padding: 11px 14px 11px 10px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; align-items: center;
  font: inherit; text-align: left; color: inherit; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(17, 0, 52, .08); /* faint outline on steps not yet picked (Amir, all projects) */
  transition: background .25s ease, box-shadow .25s ease;
}
.steps button::before {
  counter-increment: step; content: counter(step);
  grid-row: span 2; align-self: start; display: grid; place-items: center; width: 26px; height: 26px; margin-top: -1px; border-radius: 50%;
  font-size: 12px; font-weight: 600; color: var(--ink-soft); background: rgba(17, 0, 52, .07);
  transition: background .25s ease, color .25s ease;
}
/* Feature lists get no number; numbers only for real sequences or pins on the screen (Amir, 2026-10-23, all projects) */
.steps--plain button { grid-template-columns: 1fr; padding-left: 16px; }
.steps--plain button::before { content: none; }
.steps b { font-size: 15px; font-weight: 600; line-height: 24px; color: var(--ink); }
.steps span { display: block; max-height: 0; opacity: 0; overflow: hidden; font-size: 14px; line-height: 22px; color: var(--ink-soft); transition: max-height .4s var(--ease-out), opacity .3s ease; }
.steps button:hover { background: rgba(17, 0, 52, .04); box-shadow: inset 0 0 0 1px rgba(17, 0, 52, .14); }
.steps .is-active button { background: #fff; box-shadow: inset 0 0 0 1px rgba(17, 0, 52, .12), 0 4px 16px rgba(17, 0, 52, .06); }
.steps .is-active button::before { background: var(--sd-violet); color: #fff; }
.steps .is-active span { max-height: 140px; opacity: 1; margin-top: 2px; }
.steps button::after { /* time left on the current step */
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--sd-violet); transform-origin: left; transform: scaleX(0); opacity: .5;
}
.steps .is-active.is-running button::after { animation: step-fill var(--dur, 3s) linear forwards; animation-play-state: var(--play, running); }
@keyframes step-fill { to { transform: scaleX(1); } }
.steps .is-active button:first-child { padding-right: 52px; }
/* The step card grid (26px number column) must not apply here, or the icon sits off-centre */
.steps li .step-pause {
  position: absolute; top: 9px; right: 10px; display: grid; grid-template-columns: none; column-gap: 0; place-items: center; width: 30px; height: 30px; padding: 0;
  border-radius: 50%; background: rgba(17, 0, 52, .06); color: var(--ink); box-shadow: none; overflow: visible;
  opacity: 0; pointer-events: none; transform: scale(.8); transition: opacity .25s ease, transform .25s var(--ease-out), background .2s ease;
}
.steps li .step-pause::before, .steps li .step-pause::after { content: none; }
.steps li .step-pause svg { display: block; width: 14px; height: 14px; fill: currentColor; }
.steps li.is-active .step-pause { opacity: 1; pointer-events: auto; transform: none; }
.steps li.is-active .step-pause:hover { background: rgba(123, 47, 247, .12); color: var(--sd-violet); }
.steps li.is-held.is-active .step-pause { background: var(--sd-violet); color: #fff; }
.steps button:focus-visible, .steps .step-pause:focus-visible { outline: 3px solid var(--sd-violet); outline-offset: 2px; }

.chapter--solo { grid-template-areas: "text device"; grid-template-rows: auto; }
.chapter--solo > .chapter__text { align-self: center; }

/* ---------- Drawing timelapse (canvas.js draws into [data-tl]) ---------- */
/* --center fills the empty canvas; --side keeps clear of the tool panels on the right */
.tl { position: absolute; z-index: 1; pointer-events: none; }
.tl svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tl--center { left: 57.21%; top: 21.5%; width: 25.62%; height: 60.48%; }
.tl--side { left: 41.42%; top: 30.24%; width: 22.2%; height: 52.42%; }
/* A panel cut from its screen, laid back over the drawing */
.seq .dev__screen > .frame > img.ovl, .ovl { position: absolute; z-index: 2; height: auto; max-width: none; pointer-events: none; }

/* ---------- Onboarding: What do you prefer? (one screen, CSS tap loop while on screen) ---------- */
.ob { position: relative; aspect-ratio: 1171 / 744; overflow: hidden; background: #2b0f78; color: #fff; font-family: inherit; }
.ob__blob { position: absolute; border-radius: 50%; pointer-events: none; }
.ob__blob--a { left: -14%; top: -40%; width: 38%; height: 92%; background: #1b0a4c; rotate: 18deg; border-radius: 0 0 50% 50% / 0 0 60% 60%; }
.ob__blob--b { right: -10%; bottom: -36%; width: 34%; height: 96%; background: #4716a6; border-radius: 46% 54% 0 0 / 40% 40% 0 0; }
.ob__title { position: absolute; left: 0; right: 0; top: 5.6%; margin: 0; text-align: center; font-size: 1.75cqw; font-weight: 600; }
.ob__cards { position: absolute; left: 0; right: 0; top: 24%; display: flex; justify-content: center; gap: 2.4cqw; }
.ob__opt { position: relative; display: grid; justify-items: center; gap: 1.3cqw; color: inherit; }
.ob__card {
  position: relative; display: grid; place-items: center; width: 22.5cqw; aspect-ratio: 1.05; border-radius: 2cqw;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 .22cqw rgba(255, 255, 255, .28);
}
.ob__card svg { width: 86%; height: auto; overflow: visible; }
.ob__label { font-size: 1.35cqw; font-weight: 600; }
.ob__check {
  position: absolute; right: -1.2cqw; top: -1.2cqw; width: 3.4cqw; height: 3.4cqw; border-radius: 50%; display: grid; place-items: center;
  background: var(--sd-violet); box-shadow: 0 0 0 .3cqw #2b0f78; opacity: 0; transform: scale(.4);
}
.ob__check svg { width: 55%; height: auto; }
.ob__touch {
  position: absolute; left: 54%; top: 58%; width: 4cqw; height: 4cqw; margin: -2cqw; border-radius: 50%;
  background: rgba(255, 255, 255, .32); box-shadow: 0 0 0 .3cqw rgba(255, 255, 255, .5); opacity: 0; transform: scale(1.5);
}
.ob__cta {
  position: absolute; left: 50%; bottom: 7.5%; translate: -50% 0; padding: 1.1cqw 3.2cqw; border-radius: .9cqw;
  font-size: 1.05cqw; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: #5521c9; color: rgba(255, 255, 255, .45);
}
/* The rest state is the loop's first frame, so the tap loop starts without a jump */
/* 7s loop: rest, finger lands on Digital, press, release into the picked state, hold, ease back */
.ob.is-on .ob__touch { animation: ob-touch 7s infinite; }
.ob.is-on .ob__opt--digital .ob__card { animation: ob-card 7s infinite; }
.ob.is-on .ob__opt--digital .ob__check { animation: ob-check 7s infinite; }
.ob.is-on .ob__opt--paper { animation: ob-dim 7s infinite; }
.ob.is-on .ob__cta { animation: ob-cta 7s infinite; }
/* Once Digital is picked, the pencil draws a short pink stroke on the tablet screen */
.ob__stroke { stroke-dasharray: 1; stroke-dashoffset: 1; }
.ob.is-on .ob__stroke { animation: ob-stroke 7s infinite; }
.ob__pen { transform-box: view-box; }
.ob.is-on .ob__pen { animation: ob-pen 7s infinite; }
@keyframes ob-touch {
  0%, 20% { opacity: 0; transform: scale(1.5); }
  24% { opacity: 1; transform: scale(1); }
  28% { opacity: 1; transform: scale(.8); }
  33%, 100% { opacity: 0; transform: scale(1.4); }
}
@keyframes ob-card {
  0%, 24% { transform: scale(1); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 .22cqw rgba(255, 255, 255, .28); }
  28% { transform: scale(.95); background: rgba(255, 255, 255, .11); box-shadow: inset 0 0 0 .22cqw rgba(255, 255, 255, .28); }
  34%, 86% { transform: scale(1.08); background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 .26cqw #fff; }
  94%, 100% { transform: scale(1); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 .22cqw rgba(255, 255, 255, .28); }
}
@keyframes ob-check {
  0%, 29% { opacity: 0; transform: scale(.4); }
  32% { opacity: 1; transform: scale(1.15); }
  35%, 86% { opacity: 1; transform: scale(1); }
  92%, 100% { opacity: 0; transform: scale(.4); }
}
@keyframes ob-dim {
  0%, 29% { opacity: 1; }
  36%, 86% { opacity: .45; }
  94%, 100% { opacity: 1; }
}
@keyframes ob-stroke {
  0%, 40% { stroke-dashoffset: 1; opacity: 1; }
  54%, 84% { stroke-dashoffset: 0; opacity: 1; animation-timing-function: linear; }
  90%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
/* The pen's tip is its transform origin at (82,74); it lifts, hops to the start of the stroke and follows it */
@keyframes ob-pen {
  0%, 34% { transform: translate(82px, 74px) rotate(41deg); }
  38% { transform: translate(76px, 64px) rotate(34deg); }
  40% { transform: translate(62px, 48px) rotate(41deg); animation-timing-function: linear; }
  45% { transform: translate(76px, 46px) rotate(41deg); animation-timing-function: linear; }
  49% { transform: translate(72px, 62px) rotate(41deg); animation-timing-function: linear; }
  54%, 86% { transform: translate(82px, 74px) rotate(41deg); }
  94%, 100% { transform: translate(82px, 74px) rotate(41deg); }
}
@keyframes ob-cta {
  0%, 29% { background: #5521c9; color: rgba(255, 255, 255, .45); }
  36%, 86% { background: var(--sd-violet); color: #fff; }
  94%, 100% { background: #5521c9; color: rgba(255, 255, 255, .45); }
}
}

/* ---------- 1. Layout: numbered pins on the screen ---------- */
.pinboard { position: absolute; inset: 0; z-index: 2; }
.pin {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff;
  background: var(--sd-violet); box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(17, 0, 52, .3);
  opacity: .6; transform: scale(.8); cursor: pointer; transition: opacity .3s ease, transform .35s var(--ease-out), background .3s ease, color .3s ease;
}
.pin.is-active { opacity: 1; transform: scale(1.15); background: var(--sd-yellow); color: var(--ink); }
.pin.is-active::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--sd-yellow); animation: pin-ring 1.6s ease-out infinite; }
@keyframes pin-ring { from { transform: scale(1); opacity: 1; } to { transform: scale(2); opacity: 0; } }

/* ---------- 5. Drawing with the lesson ---------- */
.practice-head { max-width: 720px; }
.duo { margin-top: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.mini h3 { margin-top: 26px; font-size: 16px; font-weight: 600; line-height: 24px; }
.mini p { margin-top: 4px; font-size: 14px; line-height: 22px; color: var(--ink-soft); max-width: 560px; }

/* ---------- Looking back + next case study (stacked, as on every case study) ---------- */
.closing { max-width: 760px; margin: 0; }   /* left edge on the page grid, like the brief, results and the next-case row */
.principles { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.principles li { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 24px; color: rgba(243, 240, 223, .8); }
.principles b { font-weight: 600; color: var(--cream); }
.next-card {
  display: grid; grid-template-columns: 96px 1fr 24px; align-items: center; column-gap: 20px; max-width: 760px; margin: 48px auto 0; padding: 18px 26px 18px 14px;
  border-radius: 24px; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .16); color: var(--ink); text-decoration: none;
  transition: transform .3s var(--ease-out), box-shadow .3s ease;
}
.next-card img { width: 96px; height: 96px; object-fit: contain; }
.next-card__text { display: grid; gap: 2px; }
.next-card__kicker { font-size: 12px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--sd-violet); }
.next-card b { font-size: 22px; font-weight: 600; line-height: 30px; }
.next-card__text > span:last-child { font-size: 14px; line-height: 22px; color: var(--ink-soft); }
.next-card__arrow { width: 24px; height: 24px; color: var(--sd-violet); transition: transform .3s var(--ease-out); }
.next-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0, 0, 0, .24); }
.next-card:hover .next-card__arrow { transform: translateX(4px); }
.next-card:focus-visible { outline: 3px solid var(--sd-yellow); outline-offset: 3px; }

/* ---------- Tablet & mobile ---------- */
@media (max-width: 1099.98px) {
  .section__inner { padding: 0; display: block; }
  .wrap { padding: 64px var(--gutter); }
  .chapter, .chapter--flip, .chapter--solo { display: flex; flex-direction: column; gap: 0; }
  .chapter > .chapter__device { margin-top: 32px; width: 100%; }
  .chapter > .chapter__steps { margin-top: 24px; }

  .hero { display: flex; flex-direction: column; align-items: flex-start; min-height: 0; padding: 56px var(--gutter) 56px; }
  .hero__logo { height: 156px; width: auto; max-width: 100%; }
  .hero__title { font-size: 22px; margin-top: 18px; }
  .hero__sub { font-size: 19px; line-height: 28px; }
  .hero__stage { width: 100%; margin-top: 40px; transform: rotate(-2deg); }

  .brief { display: block; padding-top: 56px; padding-bottom: 56px; }
  .facts { margin-top: 32px; }

  .pin { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 11px; box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(17, 0, 52, .3); }
  .duo { grid-template-columns: 1fr; gap: 48px; margin-top: 40px; }
  .next-card { max-width: 480px; margin: 36px 0 0; grid-template-columns: 72px 1fr 24px; padding: 16px 20px 16px 12px; column-gap: 16px; }
  .next-card img { width: 72px; height: 72px; }
  .next-card b { font-size: 19px; line-height: 26px; }
}
@media (min-width: 700px) and (max-width: 1099.98px) {
  .duo { grid-template-columns: 1fr 1fr; gap: 28px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}

/* Only decoration respects Reduce motion; the story loops and sequences keep playing */
@media (prefers-reduced-motion: reduce) {
  .float, .sparkle, .pin.is-active::after { animation: none; }
}

/* No single word left alone on a last line (Amir's rule for every case study) */
.lead, .body, .hero__sub, .facts dd, .steps span, .mini p, .principles li, .next-card__text > span:last-child { text-wrap: pretty; }
.hero__title, .mini h3, .steps b { text-wrap: balance; }

/* ---------- Guided step: the catch-up card pops in, then the canvas turns like paper ---------- */
.gd > img:first-child { display: block; width: 100%; height: auto; }
.gd__reset, .gd__card, .gd__panel { position: absolute; }
.dev__screen > img.gd__reset, .dev__screen > img.gd__card { display: block; max-width: none; z-index: 2; }
.dev__screen > img.gd__reset { left: 32.536%; top: 2.285%; width: 14.261%; height: auto; }
.dev__screen > img.gd__card { left: 2.562%; top: 57.796%; width: 35.013%; height: auto; transform-origin: 49.4% 0; }
.gd__panel { left: 40.137%; top: 10.753%; right: 0; bottom: 0; overflow: hidden; }
.gd__canvas { position: absolute; background: #fff; left: 12.98%; top: 10.39%; width: 78.6%; height: 82.98%; transform: rotate(-17.2deg); }
.gd__art, .gd__line { position: absolute; left: 50%; top: 50%; height: 60%; aspect-ratio: 2 / 3; transform: translate(-50%, -50%); }
.gd__art svg { width: 100%; height: 100%; display: block; }
.gd__line { overflow: visible; }
.gd__line path { fill: none; stroke: #2b1a3a; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.gd.is-on .gd__card { animation: gd-card 10s infinite; }
.gd.is-on .gd__canvas { animation: gd-canvas 10s infinite; }
.gd.is-on .gd__reset { animation: gd-reset 10s infinite; }
.gd.is-on .gd__line path { animation: gd-line 10s infinite; }
@keyframes gd-card {
  /* The bubble springs up out of its tail about a second in, so the entrance is seen, not missed */
  0%, 9% { opacity: 0; transform: translateY(9%) scale(.55); animation-timing-function: cubic-bezier(.2, 1.1, .3, 1.3); }
  12% { opacity: 1; animation-timing-function: cubic-bezier(.2, 1.1, .3, 1.3); }
  18%, 90% { opacity: 1; transform: none; }
  95%, 100% { opacity: 0; transform: none; }
}
@keyframes gd-canvas {
  0%, 18% { left: 0; top: 0; width: 100%; height: 100%; transform: rotate(0deg); animation-timing-function: cubic-bezier(.45, 0, .2, 1); }
  31%, 86% { left: 12.98%; top: 10.39%; width: 78.6%; height: 82.98%; transform: rotate(-17.2deg); animation-timing-function: cubic-bezier(.45, 0, .2, 1); }
  97%, 100% { left: 0; top: 0; width: 100%; height: 100%; transform: rotate(0deg); }
}
@keyframes gd-reset {
  0%, 29% { opacity: 0; transform: translateX(-8%); }
  34%, 86% { opacity: 1; transform: none; }
  92%, 100% { opacity: 0; transform: none; }
}
@keyframes gd-line {
  0%, 40% { stroke-dashoffset: 1; opacity: 1; animation-timing-function: ease-in-out; }
  52%, 86% { stroke-dashoffset: 0; opacity: 1; }
  91%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

/* ---------- Full canvas: familiar gestures, and a quiet tag that names each action ---------- */
/* One 12s loop: undo (two-finger tap), redo (three-finger tap), zoom (pinch). */
.fc > img:first-child { display: block; width: 100%; height: auto; }
.fc__tag {
  position: absolute; left: 49.94%; bottom: 5%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .5cqw; padding: .6cqw 1.3cqw .6cqw 1cqw; border-radius: 99px;
  background: rgba(36, 25, 58, .08); color: #4a4258; font-size: 1.45cqw; font-weight: 500; line-height: 1.4; white-space: nowrap; opacity: 0;
}
.fc__tag svg { width: 1.3cqw; height: 1.3cqw; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fc__tap { position: absolute; left: 63%; top: 66%; width: 0; height: 0; }
.fc__tap i { position: absolute; width: 3.4cqw; height: 3.4cqw; margin: -1.7cqw; border-radius: 50%; background: rgba(124, 58, 237, .22); box-shadow: 0 0 0 .25cqw rgba(124, 58, 237, .35); opacity: 0; }
.fc__tap i:nth-child(2) { left: 4.6cqw; top: -1.2cqw; }
.fc__tap i:nth-child(3) { left: 9.2cqw; top: -1.6cqw; }
.fc__tap--pinch { left: 50%; top: 52%; }
.fc__tap--pinch i:nth-child(1) { left: -3cqw; top: 2cqw; }
.fc__tap--pinch i:nth-child(2) { left: 3cqw; top: -2cqw; }
.fc.is-on .fc__tap--undo i { animation: fc-tap 12s infinite; }
.fc.is-on .fc__tap--redo i { animation: fc-tap 12s infinite; animation-delay: -8s; }
.fc.is-on .fc__tap--pinch i:nth-child(1) { animation: fc-pinch-a 12s infinite; animation-delay: -4s; }
.fc.is-on .fc__tap--pinch i:nth-child(2) { animation: fc-pinch-b 12s infinite; animation-delay: -4s; }
.fc.is-on .fc__tag--undo { animation: fc-tag 12s infinite; }
.fc.is-on .fc__tag--redo { animation: fc-tag 12s infinite; animation-delay: -8s; }
.fc.is-on .fc__tag--pinch { animation: fc-tag 12s infinite; animation-delay: -4s; }
@keyframes fc-tap {
  0%, 8% { opacity: 0; transform: scale(1.5); }
  10.5% { opacity: 1; transform: scale(1); }
  13.5% { opacity: 1; transform: scale(.82); }
  17.5%, 100% { opacity: 0; transform: scale(1.3); }
}
@keyframes fc-pinch-a {
  0%, 8% { opacity: 0; transform: translate(0, 0) scale(1.3); }
  10.5% { opacity: 1; transform: translate(0, 0) scale(1); }
  19% { opacity: 1; transform: translate(-3cqw, 2.2cqw) scale(1); }
  23%, 100% { opacity: 0; transform: translate(-3cqw, 2.2cqw) scale(1.2); }
}
@keyframes fc-pinch-b {
  0%, 8% { opacity: 0; transform: translate(0, 0) scale(1.3); }
  10.5% { opacity: 1; transform: translate(0, 0) scale(1); }
  19% { opacity: 1; transform: translate(3cqw, -2.2cqw) scale(1); }
  23%, 100% { opacity: 0; transform: translate(3cqw, -2.2cqw) scale(1.2); }
}
@keyframes fc-tag {
  0%, 14% { opacity: 0; transform: translate(-50%, 70%); animation-timing-function: cubic-bezier(.2, .9, .3, 1.2); }
  18%, 28% { opacity: 1; transform: translate(-50%, 0); }
  32%, 100% { opacity: 0; transform: translate(-50%, 0); }
}

/* Video chapter: scrubbing. Overlays sit on the 812x618 video crop at (64,224) of the 2342x1488 screen; canvas.js drives them */
.sb { position: absolute; left: 2.733%; top: 15.054%; width: 34.671%; height: 41.532%; pointer-events: none; --x: 63.55%; --f: 0; --p: 0; }
.sb__vid { position: absolute; inset: 0; }
.sb__v { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .12s linear; }
.sb__v.is-on { opacity: 1; }
.sb__fill { position: absolute; left: -1.2%; top: 97.41%; width: calc(var(--x) + 1.2%); height: 2.59%; border-radius: 99px; background: #ffd34e; }
.sb__tick { position: absolute; top: 97.41%; width: .985%; height: 2.59%; background: #56403c; }
.sb__tick--1 { left: 11.82%; } .sb__tick--2 { left: 39.9%; }
.sb__knob { position: absolute; left: var(--x); top: 98.7%; width: 5.91%; aspect-ratio: 1; margin: -2.955% 0 0 -2.955%; border-radius: 50%; background: #110035; }
.sb__tip {
  position: absolute; left: var(--x); top: 84.14%; translate: -50% 0; padding: 0 1.1cqw; height: 3.3cqw; line-height: 3.3cqw; border-radius: .5cqw;
  background: #3d2a5f; color: #fff; font-size: 1.1cqw; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sb__finger {
  position: absolute; left: var(--x); top: 98.7%; width: 4.2cqw; height: 4.2cqw; margin: -2.1cqw; border-radius: 50%;
  background: rgba(255, 255, 255, .32); box-shadow: 0 0 0 .3cqw rgba(255, 255, 255, .55); opacity: var(--f); transform: scale(calc(1.4 - .6 * var(--p)));
}

/* Layout chapter: the catch-up card shows while pin 2 is active */
.pinboard .lay-card { position: absolute; left: 2.562%; top: 57.796%; width: 35.013%; height: auto; max-width: none; opacity: 0; transform: translateY(-3%) scale(.92); transform-origin: 49.4% 0; transition: opacity .35s var(--ease-out), transform .45s cubic-bezier(.2, .9, .3, 1.2); pointer-events: none; }
.pinboard .pin:nth-child(2).is-active ~ .lay-card { opacity: 1; transform: none; }
.pinboard .pin { z-index: 2; }

/* Progress icon in the toolbar: its three bars bounce like an equalizer */
.eq { position: absolute; left: 9.1%; top: 3.6%; width: 2.2%; height: 3.5%; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; background: #3f3056; }
.eq i { display: block; width: 23%; height: 100%; border-radius: 99px 99px 0 0; background: #f3f0df; transform-origin: bottom; transform: scaleY(.45); animation: eq 1.3s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.45s; }
.eq i:nth-child(3) { animation-delay: -.9s; }
@keyframes eq { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }

/* Phones (mobile review, 2026-10-23): the panel each tool or layer step talks about is too small inside the iPad,
   so a readable crop of it overlaps the screen's lower right, changing with the step. Desktop keeps the screen alone. */
.zooms { display: none; }
@media (max-width: 699.98px) {
  .seq:has(.zooms) { position: relative; }
  .zooms { display: block; position: absolute; z-index: 3; right: -4px; top: 24%; width: 48%; pointer-events: none; }
  .zooms > img { position: absolute; top: 0; left: 0; width: 100%; height: auto; opacity: 0; transition: opacity .45s var(--ease-out);
    filter: drop-shadow(0 18px 28px rgba(17, 0, 52, .45)) drop-shadow(0 0 0 rgba(0, 0, 0, 0)); }
  .zooms > img.is-active { opacity: 1; }
  /* The screen behind the zoomed panel steps back (dim + soft blur) so the crop reads as the one in focus. */
  .seq:has(.zooms) .dev__screen > .frame { filter: brightness(.55) saturate(.8) blur(.8px); }
  .seq:has(.zooms--tall) { padding-bottom: 36%; }
}
@media (max-width: 699.98px) { .zooms > img.zoom--wide { left: auto; right: 0; width: 192%; } }

/* Phones: the step list is a swipe carousel under the screen, with progress dots (Amir, 2026-10-23, all projects) */
.step-dots { display: none; }
@media (max-width: 1099.98px) {
  .steps.is-swipe {
    display: flex; gap: 10px; min-width: 0; align-self: stretch; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 2px var(--gutter) 8px; scroll-padding-inline: var(--gutter);
  }
  .steps.is-swipe::-webkit-scrollbar { display: none; }
  .steps.is-swipe::after { content: ""; flex: 0 0 calc(100% - min(86%, 440px) - 10px); } /* lets the last card snap to the start */
  .steps.is-swipe > li { flex: 0 0 min(86%, 440px); scroll-snap-align: start; display: flex; }
  .steps.is-swipe > li > button:first-child { height: 100%; align-content: start; padding-right: 52px; }
  .steps.is-swipe span { max-height: none; opacity: 1; margin-top: 2px; transition: none; }
  .steps.is-swipe button::after { display: none; }
  .step-dots { display: flex; margin-top: 4px; margin-left: -2px; }
  .step-dots button { display: grid; place-items: center; padding: 8px 3px; border: 0; background: none; cursor: pointer; }
  .step-dots i { display: block; position: relative; overflow: hidden; width: 8px; height: 8px; border-radius: 4px; background: var(--dot, rgba(17, 0, 52, .14)); transition: width .3s ease; }
  .step-dots i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--dot-on); transform-origin: left; transform: scaleX(0); }
  .step-dots .is-on i { width: 28px; }
  .step-dots .is-done i::after { transform: none; opacity: .4; }
  .step-dots .is-running i::after { animation: step-fill var(--dur, 3s) linear forwards; animation-play-state: var(--play, running); }
  .step-dots button:focus-visible { outline: 2px solid var(--dot-on); outline-offset: -2px; border-radius: 8px; }
}
.step-dots { --dot-on: var(--sd-violet); }

/* ---------- MVP V2 course map (ported from the Draw page: same scroll, same unlock sequence) ---------- */
.v2-intro { max-width: 760px; margin: 0 auto; text-align: center; }
.v2-map { max-width: 880px; margin: 32px auto 0; }
.chapter--course, .chapter--journal { margin-top: 72px; }
.hscroll { aspect-ratio: 1171 / 744; }
.hscroll__track { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; touch-action: pan-x pan-y; }
.hscroll__track::-webkit-scrollbar { display: none; }
.hscroll__track.is-dragging { cursor: grabbing; }
.hscroll__track:focus-visible { outline: 3px solid var(--sd-yellow); outline-offset: -3px; }
.hscroll__fixed { position: absolute; z-index: 2; left: 0; top: 0; width: 100%; height: auto; pointer-events: none; transition: opacity .35s ease; }
.hscroll__fixed.is-away { opacity: 0; }
.hscroll__track > .v2-track { position: relative; display: flex; height: 100%; width: max-content; isolation: isolate; background: #200854; }
.map-sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.map-sky > img { position: absolute; top: 0; left: 0; height: 100%; width: auto; max-width: none; will-change: transform; }
.v2-track.is-still > .map-sky { display: none; }
.v2-track > img { display: block; height: 100%; width: auto; max-width: none; user-select: none; -webkit-user-drag: none; }
.v2-track__bonus, .v2-track__confetti { position: absolute; pointer-events: none; }
.v2-track.is-still .v2-track__bonus, .v2-track.is-still .v2-track__confetti, .v2-track.is-still .v2-seq { display: none; }
.v2-seq { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.v2-seq__item, .v2-seq__medal { transform-box: fill-box; transform-origin: center; }
.v2-seq__art { opacity: .5; transition: opacity .35s var(--ease-out); }
.v2-seq__item.has-locked .v2-seq__art { opacity: 0; }
.v2-seq__item.is-done .v2-seq__art { opacity: 1; }
.v2-seq__fill { opacity: 0; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .5s cubic-bezier(.3, .7, .3, 1); }
.v2-seq__item.is-done .v2-seq__fill { opacity: 1; stroke-dashoffset: 0; }
.v2-seq__track { transition: opacity 0s .55s; }
.v2-seq__item.is-done .v2-seq__track { opacity: 0; }
.v2-seq__medal { opacity: 0; }
.v2-seq__medal-off { transition: opacity .2s .28s; }
.v2-seq__item.is-done .v2-seq__medal-off { opacity: 0; }
.v2-seq__item.is-done { animation: seq-bounce .55s .42s ease-out; }
.v2-seq__item.is-done .v2-seq__medal { animation: seq-medal .5s .28s cubic-bezier(.3, 1.6, .5, 1) both; }
.v2-seq__item--gift.is-done { animation: seq-gift 1s ease-in-out; }
.v2-seq__item.is-static, .v2-seq__item.is-static * { animation: none !important; transition: none !important; }
.v2-seq__item.is-static .v2-seq__medal { opacity: 1; }
@keyframes seq-bounce { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.12); } 70% { transform: scale(.97); } }
@keyframes seq-medal { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes seq-gift {
  0%, 100% { transform: none; }
  20% { transform: translateY(-16%) rotate(-9deg) scale(1.12); }
  40% { transform: translateY(-16%) rotate(8deg) scale(1.12); }
  60% { transform: translateY(0) rotate(-5deg); }
  80% { transform: rotate(3deg); }
}
@media (max-width: 1099.98px) { .v2-map { margin-top: 20px; } .chapter--course, .chapter--journal { margin-top: 56px; } }

/* ---------- Results: same block as the Draw page's MVP results ---------- */
.results-head { max-width: 700px; }
.verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.verdict__col { padding: 28px 32px 20px; border-radius: 20px; background: #fff; box-shadow: 0 6px 24px rgba(17, 0, 52, .05); }
.verdict__col .h3 { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.verdict__col .h3 img { width: 26px; height: 26px; }
.verdict ul { list-style: none; margin: 14px 0 0; padding: 0; }
.verdict li { padding: 12px 0; border-top: 1px solid rgba(17, 0, 52, .06); font-size: 14px; line-height: 22px; color: rgba(43, 26, 58, .72); text-wrap: pretty; }
.verdict li b { font-weight: 600; color: var(--ink, #2b1a3a); }
.decision { margin-top: 24px; padding: 32px 40px 34px; border-radius: 24px; background: #fff; box-shadow: 0 6px 24px rgba(17, 0, 52, .05); position: relative; overflow: hidden; }
.decision::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #7b2ff7; }
.decision__label { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(43, 26, 58, .72); }
.decision__label img { width: 22px; height: 22px; }
.decision__text { margin: 14px 0 0; max-width: 920px; font-size: 18px; line-height: 30px; font-weight: 300; color: var(--ink, #2b1a3a); text-wrap: balance; }
.decision__text b { font-weight: 600; }
@media (max-width: 700px) {
  .verdict { grid-template-columns: 1fr; margin-top: 24px; }
  .verdict__col { padding: 24px 22px 14px; }
  .decision { padding: 28px 24px 30px 28px; }
  .decision__text { font-size: 17px; line-height: 28px; }
}

/* ---------- Course: the learner photo (its corner cut by the spark, night behind) with the course screen on a tilted iPad over it, like the paper block on the Draw page ---------- */
.stage { position: relative; margin: 36px 0 72px; }
.stage__photo { position: relative; z-index: 1; margin: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--night, #1a0a3e); }
.stage__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stage__device { position: absolute; right: -84px; bottom: -92px; width: 57%; transform: rotate(5deg); z-index: 3; }
.stage__device .dev__screen img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .stage { margin: 16px 0 32px; }
    .stage__photo { border-radius: 20px; }
  .stage__device { position: relative; right: auto; bottom: auto; width: 70%; margin: -14% 0 0 auto; transform: rotate(4deg); }
}
}
