/* GradyBuilt demo layer v1: the strip, the "About this demo" dialog and the short notes that mark a
   site as a demo. Shared by every demo site. Edit it in .claude/skills/demo-site-build/runtime/ and run
   `site.mjs sync <slug>`; never edit a site's _gb/ copy by hand.
   It is drawn in GradyBuilt's own look (ink, bone, orange), which no demo uses, so it reads as a label
   on top of the site rather than part of it. */

.gb-demo,
.gb-demo-dialog,
.gb-demo-toast {
  --gb-ink: #191714;
  --gb-ink-2: #2b2721;
  --gb-bone: #f1ece2;
  --gb-mute: #c2baab;
  --gb-orange: #f05a1a;
  --gb-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font: 400 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  box-sizing: border-box;
}
.gb-demo *,
.gb-demo-dialog *,
.gb-demo-toast * { box-sizing: border-box; }

/* The strip: in the normal flow above the site, so it scrolls away and never covers a sticky bar. No
   z-index: the site's own menus and overlays must cover it. */
.gb-demo { background: var(--gb-ink); color: var(--gb-bone); }
.gb-demo__in {
  position: relative;
  max-width: 1280px;
  min-height: 40px;
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.gb-demo__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font: 600 11px/1 var(--gb-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--gb-bone);
}
.gb-demo__tag::before { content: ""; width: 8px; height: 8px; border-radius: 1px; background: var(--gb-orange); }
.gb-demo__text { flex: 1; min-width: 0; margin: 0; color: var(--gb-mute); }
.gb-demo__text b { color: var(--gb-bone); font-weight: 600; }
.gb-demo__short { display: none; }
.gb-demo__btn {
  appearance: none;
  min-height: 30px;
  padding: 5px 13px;
  border: 1px solid rgba(241, 236, 226, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--gb-bone);
  font: 600 13px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.gb-demo__btn:hover { border-color: var(--gb-bone); }
.gb-demo__btn:focus-visible,
.gb-demo-dialog a:focus-visible,
.gb-demo-dialog button:focus-visible { outline: 2px solid var(--gb-orange); outline-offset: 2px; }

@media (max-width: 699px) {
  .gb-demo__in { min-height: 44px; padding: 4px 12px 4px 16px; gap: 10px; }
  .gb-demo__long { display: none; }
  .gb-demo__short { display: inline; }
  .gb-demo__text { font-size: 13px; }
  /* The whole strip is the button on a phone, so the tap target is the full 44px row. */
  .gb-demo__btn::before { content: ""; position: absolute; inset: 0; }
}

/* ?gb=off hides the strip, for clean screenshots of the site itself. */
.gb-off .gb-demo { display: none; }

/* The dialog */
.gb-demo-dialog {
  width: min(460px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--gb-ink);
  color: var(--gb-bone);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.gb-demo-dialog::backdrop { background: rgba(25, 23, 20, 0.55); }
.gb-demo-dialog__body { padding: 28px 28px 24px; }
.gb-demo-dialog h2 {
  margin: 14px 0 10px;
  font: 700 24px/1.15 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.01em;
  color: var(--gb-bone);
  text-wrap: balance;
}
.gb-demo-dialog p { margin: 0 0 12px; color: var(--gb-mute); }
.gb-demo-dialog p b { color: var(--gb-bone); font-weight: 600; }
.gb-demo-dialog__actions { display: grid; gap: 10px; margin-top: 20px; }
.gb-demo-dialog__actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid rgba(241, 236, 226, 0.35);
  border-radius: 10px;
  color: var(--gb-bone);
  font-weight: 600;
  text-decoration: none;
}
.gb-demo-dialog__actions a:hover { border-color: var(--gb-bone); }
.gb-demo-dialog__actions .gb-demo-dialog__primary { background: var(--gb-orange); border-color: var(--gb-orange); color: #fff; }
.gb-demo-dialog__actions .gb-demo-dialog__primary:hover { background: #d94c10; border-color: #d94c10; }
.gb-demo-dialog__sig { margin: 18px 0 0 !important; font: 500 12px/1.4 var(--gb-mono); letter-spacing: 0.04em; color: var(--gb-mute); }
.gb-demo-dialog__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--gb-bone);
  font: 400 26px/1 system-ui, sans-serif;
  cursor: pointer;
}
.gb-demo-dialog__close:hover { background: var(--gb-ink-2); }

/* The note that explains a dead end ("On the real site, this calls …") */
.gb-demo-toast {
  position: fixed;
  z-index: 2147483000;
  top: 12px;
  left: 50%;
  width: max-content;
  max-width: min(440px, calc(100% - 24px));
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--gb-ink);
  color: var(--gb-bone);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  cursor: pointer;
}
.gb-demo-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.gb-demo-toast .gb-demo__tag { margin-bottom: 6px; }
.gb-demo-toast p { margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .gb-demo-toast { transition: none; }
}
