/* demo-staylink.css - the landing page's hero demo (render.mjs landingDemo, static/demo-staylink.js): Staylink's own
   flow on the page itself, no box round it. Left, a browser window with the two screens that matter - New code, and a
   code's own page. Right, the PRINTED thing: a table sticker carrying the QR, and a phone that rises in front of it,
   scans it and lands on the address, twice - once before the owner changes where the code leads, once after.

   Linked on the landing page alone, after the kit's stylesheet. The demo's form, heading and button are copies under their
   own .sld-* names and tags: the gate reads every <h1> and every .mx-field / .mx-table as the page's real structure, and a
   pointer-events:none picture of one is neither. The kit's frame (.lp-demo > .lp-demo__fit > .lp-demo__stage), the phone
   (.lp-phone) and the cursor (.lp-cursor) are used as they are.

   Inside the stage the sizes are px, on purpose: it is a picture of a screen at a fixed design size (960 x 620), which
   demo.js scales to the column. Everything is scoped under .sld.

   What the tour flips, read here (the markup is the settled end state, so a reader who asks for reduced motion sees it):
     data-view     new | code             which screen the window shows
     data-note     '' | created | saved   the note on the code's page
     data-sticker  on | ''                the printed sticker beside the window
     data-phone    '' | cam | page1 | page2   the phone: away, camera, the first address, the new address */

.sld-stage {
  width: 960px;
  height: 620px;
  color: var(--c-ink);
  font-size: 13px;
  line-height: 1.4;
  text-align: start;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.sld-stage :where(p, span, i, b) { margin: 0; }
.sld-stage svg { display: block; }

/* ── The browser window ──────────────────────────────────────────────────── */
.sld-win {
  position: absolute;
  left: 40px;
  top: 20px;
  width: 560px;
  height: 540px;
  overflow: hidden;
  border: 1px solid var(--c-line-strong);
  border-radius: 14px;
  background: var(--c-canvas);
  box-shadow: var(--lp-demo-shadow);
}
.sld-win__chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--c-line);
  background: var(--c-surface-2);
}
.sld-win__chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--c-line-strong); }
.sld-win__addr {
  margin-inline-start: 10px;
  flex: 1;
  max-width: 260px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--c-canvas);
  color: var(--c-ink-muted);
  font-size: 11.5px;
}
.sld-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 0 20px;
  border-bottom: 1px solid var(--c-line);
}
.sld-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.sld-brand svg { width: 20px; height: 20px; color: var(--c-accent); }
.sld-nav { display: inline-flex; gap: 16px; color: var(--c-ink-muted); }
.sld-nav span { display: inline-flex; align-items: center; gap: 6px; }
.sld-nav svg { width: 15px; height: 15px; }
.sld-nav .is-current { color: var(--c-ink); font-weight: 500; }

.sld-view { display: none; padding: 20px 24px; }
.sld-stage[data-view='new'] .sld-view--new,
.sld-stage[data-view='code'] .sld-view--code { display: block; }

.sld-crumb { color: var(--c-ink-muted); font-size: 12px; }
.sld-h1 { margin-top: 6px !important; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; min-height: 26px; }
.sld-sub { margin-top: 4px !important; color: var(--c-ink-muted); font-size: 13px; }
.sld-sub code, .sld-win code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  color: var(--c-ink);
}
.sld-hint { margin-top: 4px !important; color: var(--c-ink-subtle); font-size: 12px; }

.sld-field { display: grid; gap: 5px; margin-top: 14px; }
.sld-label { font-size: 12px; font-weight: 500; color: var(--c-ink-muted); }
.sld-input {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--radius-sm, 8px);
  background: var(--c-surface);
  white-space: nowrap;
  overflow: hidden;
}
.sld-view--new .sld-btn--primary { margin-top: 20px; }

.sld-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--radius-sm, 8px);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--c-ink);
  white-space: nowrap;
}
.sld-btn--primary { padding: 9px 16px; border-color: transparent; background: var(--c-accent); color: var(--c-accent-ink); font-size: 13.5px; }
.sld-btn svg { width: 14px; height: 14px; }

.sld-qr { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.sld-qr__code {
  display: inline-flex;
  padding: 7px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: #fff;
}
.sld-qr__code svg { width: 92px; height: 92px; color: #111; }
.sld-qr__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.sld-note {
  margin-top: 14px !important;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--c-ok, #2e9e5b) 40%, transparent);
  border-radius: var(--radius-sm, 8px);
  background: color-mix(in srgb, var(--c-ok, #2e9e5b) 12%, transparent);
  color: var(--c-ink);
  font-size: 12.5px;
}
.sld-note span { display: none; }
.sld-stage[data-note='created'] .sld-note__created,
.sld-stage[data-note='saved'] .sld-note__saved { display: inline; }
.sld-stage[data-note=''] .sld-note { visibility: hidden; }

/* ── The printed sticker ─────────────────────────────────────────────────── */
.sld-sticker {
  position: absolute;
  left: 632px;
  top: 28px;
  width: 196px;
  height: 208px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--lp-demo-shadow);
  transform: rotate(-3deg);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.sld-sticker__name { min-height: 18px; font-size: 15px; font-weight: 600; color: #111; text-align: center; }
.sld-sticker__qr svg { width: 140px; height: 140px; color: #111; }
.sld-stage[data-sticker=''] .sld-sticker { opacity: 0; transform: translateY(24px) rotate(-3deg); }

/* ── The phone ───────────────────────────────────────────────────────────── */
.sld-phone {
  left: 730px;
  top: 238px;
  width: 200px;
  height: 344px;
  transition: transform 0.75s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.sld-stage[data-phone=''] .sld-phone { transform: translateY(560px); }

.sld-cam, .sld-browser { position: absolute; inset: 0; display: none; }
.sld-stage[data-phone='cam'] .sld-cam { display: flex; }
.sld-stage[data-phone='page1'] .sld-browser,
.sld-stage[data-phone='page2'] .sld-browser { display: block; }

.sld-cam { align-items: center; justify-content: center; background: #16181c; }
.sld-cam__qr {
  position: relative;
  display: block;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  transform: rotate(-3deg) scale(1.02);
}
.sld-cam__qr svg { width: 128px; height: 128px; color: #111; }
/* The viewfinder: four corners, and a line that sweeps over the code. */
.sld-cam__qr i {
  position: absolute;
  inset: -10px;
  border: 2px solid var(--c-accent);
  border-radius: 14px;
  -webkit-mask: linear-gradient(#000 0 0) top left / 22px 22px no-repeat, linear-gradient(#000 0 0) top right / 22px 22px no-repeat,
    linear-gradient(#000 0 0) bottom left / 22px 22px no-repeat, linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat;
  mask: linear-gradient(#000 0 0) top left / 22px 22px no-repeat, linear-gradient(#000 0 0) top right / 22px 22px no-repeat,
    linear-gradient(#000 0 0) bottom left / 22px 22px no-repeat, linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat;
}

.sld-browser { background: var(--c-canvas); padding-top: 44px; }
.sld-browser__bar {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--c-surface-2);
  color: var(--c-ink-muted);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
}
.sld-browser__bar svg { flex: none; width: 11px; height: 11px; }

/* The two pages a code has led to: shapes, not words - the address in the bar is what tells them apart. */
.sld-site { position: absolute; left: 12px; right: 12px; top: 80px; display: none; flex-direction: column; gap: 9px; }
.sld-stage[data-phone='page1'] .sld-site--before,
.sld-stage[data-phone='page2'] .sld-site--after { display: flex; }
.sld-site b { display: block; height: 9px; border-radius: 5px; background: var(--c-line-strong); }
.sld-site b:nth-of-type(2) { width: 78%; }
.sld-site b:nth-of-type(3) { width: 56%; }
.sld-site__hero { display: block; height: 84px; border-radius: 12px; background: var(--c-surface-2); }
.sld-site--after .sld-site__hero { height: 92px; background: linear-gradient(135deg, var(--c-accent), color-mix(in srgb, var(--c-accent) 45%, var(--c-canvas))); }
.sld-site__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sld-site__grid i { display: block; height: 46px; border-radius: 10px; background: var(--c-surface-2); border: 1px solid var(--c-line); }
.sld-site--before .sld-site__grid { display: none; }

/* ── The pictures on the landing's step cards (render.mjs STEP_VIZ) ─────────────────────────────────────────────
   Each is a miniature of its own step, in the product's tokens (accent, dark and light follow by themselves). */
.lp-viz--scene { height: 8.25rem; }
.slv { direction: ltr; display: flex; align-items: center; gap: 0.75rem; color: var(--c-ink); font-family: var(--font-mono, ui-monospace, monospace); }
.slv, .slv * { box-sizing: border-box; }
.slv i, .slv u, .slv b { font-style: normal; text-decoration: none; }
.slv > b { color: var(--c-ink-muted); font-weight: 500; }
.slv-qr { display: block; width: 100%; height: 100%; }

/* 1. a name and an address in, a code out */
.slv-make__field { display: flex; align-items: center; gap: 6px; width: 6.5rem; padding: 7px 9px; border-radius: 8px; background: var(--c-surface); border: 1px solid var(--c-line-strong); }
.slv-make__field > i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--c-accent); flex: none; }
.slv-make__field > u { height: 5px; border-radius: 3px; background: var(--c-ink); width: 0; animation: slv-type 5s steps(9) infinite; }
@keyframes slv-type { 0% { width: 0; } 40%, 100% { width: 100%; } }
.slv-make__code { width: 3.6rem; height: 3.6rem; padding: 6px; border-radius: 9px; background: var(--c-surface); border: 1px solid var(--c-accent); color: var(--c-ink); clip-path: inset(0 0 100% 0 round 9px); animation: slv-draw 5s infinite; }
@keyframes slv-draw { 0%, 38% { clip-path: inset(0 0 100% 0 round 9px); } 62%, 100% { clip-path: inset(0 0 0 0 round 9px); } }

/* 2. the sheet coming out of the printer */
.slv-print { flex-direction: column; gap: 0; height: 100%; justify-content: flex-start; width: 7.5rem; }
.slv-print__slot { width: 100%; height: 9px; margin-top: 30px; border-radius: 5px; background: var(--c-ink); position: relative; z-index: 1; }
/* the sheet comes OUT of the slot: whatever is still inside the printer is clipped */
.slv-print__out { width: 88%; overflow: hidden; padding-bottom: 30px; margin-top: -3px; }
.slv-print__sheet { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 9px 10px; background: var(--c-surface); border: 1px solid var(--c-line-strong); border-top: 0; border-radius: 0 0 7px 7px; color: var(--c-ink); animation: slv-feed 5s ease-out infinite; }
.slv-print__sheet > svg { width: 100%; height: auto; aspect-ratio: 1; }
@keyframes slv-feed { 0% { transform: translateY(-92%); } 45%, 88% { transform: translateY(-4px); opacity: 1; } 100% { transform: translateY(26px); opacity: 0; } }

/* 3. the code stays, the destination changes */
.slv-swap__code { position: relative; width: 3.6rem; height: 3.6rem; padding: 6px; border-radius: 9px; background: var(--c-surface); border: 1px solid var(--c-line-strong); }
.slv-swap__code > i { position: absolute; top: -5px; inset-inline-end: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 3px var(--lp-tile, var(--c-surface-2)); }
.slv-swap__to { position: relative; width: 6.5rem; height: 2rem; }
.slv-swap__to > span { position: absolute; inset: 0; display: flex; align-items: center; gap: 6px; padding: 0 9px; border-radius: 8px; background: var(--c-surface); border: 1px solid var(--c-accent); opacity: 0; animation: slv-turn 6s infinite; }
.slv-swap__to > span:nth-child(2) { animation-delay: -4s; }
.slv-swap__to > span:nth-child(3) { animation-delay: -2s; }
.slv-swap__to > span > i { width: 10px; height: 12px; border-radius: 2px; border: 2px solid var(--c-accent); flex: none; }
.slv-swap__to > span > u { height: 5px; border-radius: 3px; background: var(--c-ink); width: 55%; }
.slv-swap__to > span:nth-child(2) > u { width: 80%; } .slv-swap__to > span:nth-child(3) > u { width: 35%; }
.slv-swap__to > span:nth-child(2) > i { border-radius: 50%; } .slv-swap__to > span:nth-child(3) > i { height: 8px; }
@keyframes slv-turn { 0%, 30% { opacity: 1; transform: none; } 33.4%, 96% { opacity: 0; transform: translateY(-45%); } 100% { opacity: 0; transform: translateY(45%); } }
/* A QR code is dark on white wherever it is shown - paper does not have a dark mode (DESIGN.md "QR codes"). */
.slv-make__code, .slv-swap__code, .slv-print__sheet { background: #fff; color: #111; }
.slv-print__sheet { border-color: #d9d9d9; }


/* A second block inside one band: its heading stands off the cards above, and the closing sentence sits close to its
   grid (kit landing.css has the same rule from 2026-11-14; here until the kit is vendored again). */
:is(.lp-bento, .lp-steps, ol, ul) + .lp-head-centre { margin-top: 4rem; }
:is(.lp-bento, .lp-steps, ol, ul) + .lp-head-centre:last-child { margin-top: 1.75rem; margin-bottom: 0; }
