/* ==========================================================================
   Truo Trade — demo studio
   The standalone screen routes. The studio chrome is the only thing this file
   adds: the screens themselves come from the shared product UI kit, so what is
   embedded in a page or captured for a slide is the same markup the homepage
   hero runs.
   ========================================================================== */

.demo-body { background: var(--truo-mist); }

.studio {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--truo-canvas);
  box-shadow: inset 0 3px 0 var(--truo-blue);
  border-bottom: 1px solid var(--truo-line);
}

.studio__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  padding: 12px clamp(16px, 3vw, 28px);
}

.studio__brand { flex: none; }
.studio__brand img { width: auto; height: 30px; }

.studio__screens { display: flex; flex-wrap: wrap; gap: 2px; }

.studio__screens a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding-inline: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--truo-slate);
  text-decoration: none;
  border-radius: var(--truo-radius-control);
  transition: color var(--truo-duration-fast) var(--truo-ease),
              background var(--truo-duration-fast) var(--truo-ease);
}

.studio__screens a:hover { color: var(--truo-blue-dark); background: var(--truo-blue-tint); }
.studio__screens a[aria-current="page"] { color: var(--truo-blue-dark); font-weight: 600; background: var(--truo-blue-tint); }

.studio__tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }

.studio__group {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--truo-mist);
  border: 1px solid var(--truo-line);
  border-radius: var(--truo-radius-control);
}

.studio__group button {
  height: 28px;
  padding-inline: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--truo-slate);
  background: transparent;
  border: 0;
  border-radius: var(--truo-radius-sm);
  cursor: pointer;
}

.studio__group button[aria-pressed="true"] { color: var(--truo-blue-dark); background: var(--truo-white); box-shadow: var(--truo-shadow-raised); }

.studio__hint {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding: 0 clamp(16px, 3vw, 28px) 12px;
  font-size: 12.5px;
  color: var(--truo-slate);
}

.studio__hint b { font-weight: 600; color: var(--truo-ink); }

.studio__hint code {
  padding: 2px 5px;
  font-family: var(--truo-font-mono);
  font-size: 11.5px;
  background: var(--truo-mist);
  border-radius: var(--truo-radius-sm);
}

/* --- Screen presentation ---------------------------------------------------
   Each route renders inside a 16:9 frame so what is seen on the page is what a
   capture or an iframe embed will show. */

.demo-main { padding: clamp(16px, 3vw, 32px); }

.demo-screen { max-width: 1600px; margin-inline: auto; }
.demo-screen[hidden] { display: none; }

.demo-screen > .tp,
.demo-screen > .tp-continuity {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--truo-line);
  border-radius: var(--truo-radius-card);
  box-shadow: 0 1px 2px rgb(23 25 31 / 4%), 0 20px 44px -26px rgb(23 25 31 / 20%);
}

/* Only the app shell takes the Mist canvas. The continuity frame is an Ink
   field and must keep the background it sets for itself. */
.demo-screen > .tp { background: var(--truo-mist); }
.demo-screen > .tp-continuity { border-color: var(--truo-ink-line-strong); }

/* Below the reference frame the aspect lock would shrink product text past
   readability, so height follows content instead. */
@media (max-width: 1100px) {
  .demo-screen > .tp,
  .demo-screen > .tp-continuity { aspect-ratio: auto; }
}

/* --- Clean view -------------------------------------------------------------
   ?chrome=0 removes the studio entirely for an edge-to-edge embed, a capture,
   or a slide. Browser printing takes the same path. */

.demo-body[data-chrome="0"] { background: var(--truo-mist); }
.demo-body[data-chrome="0"] .studio { display: none; }
.demo-body[data-chrome="0"] .demo-main { padding: 0; }
.demo-body[data-chrome="0"] .demo-screen { max-width: none; }

/* The aspect lock has to go here: combined with a viewport min-height it would
   resolve the width from the height and push the frame past the viewport. In
   clean view the viewport itself is the frame. */
.demo-body[data-chrome="0"] .demo-screen > .tp,
.demo-body[data-chrome="0"] .demo-screen > .tp-continuity {
  aspect-ratio: auto;
  min-height: 100vh;
  min-height: 100svh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media print {
  .studio { display: none; }
  .demo-main { padding: 0; }
  .demo-screen > .tp,
  .demo-screen > .tp-continuity { border: 0; border-radius: 0; box-shadow: none; }
}

/* A short-lived confirmation for the copy-link control. Announced politely
   rather than interrupting whatever the user is reading. */
.studio__toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 80;
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--truo-ink-text);
  background: var(--truo-ink);
  border-radius: var(--truo-radius-control);
  box-shadow: var(--truo-shadow-overlay);
  transform: translateX(-50%);
}

.studio__toast[hidden] { display: none; }
