/* ============================================================================
   demo.css — every style that belongs to demo.trimsy.io and to no other shop.

   ONE FILE, LINKED ONLY BY THE DEMO, for two reasons that pull the same way.

   Correctness first: the demo's furniture appears on BOTH sides of the
   product. The wordmark is in the public header, the public footer, the admin
   bar and the app's launch screen - and the public pages load app.css while
   the staff pages load admin.css, which share nothing. Written into app.css
   alone, the mark arrived on the admin with no weight, no tracking and no word
   space, so `demo barber` rendered as `demobarber`. Written into both, it is
   two copies to keep in step for ever.

   Cost second: fifty paying shops were downloading the styles for a banner
   saying "this shop is invented", a modal explaining a demo, and a plaque
   printing a pairing code, none of which can ever render on their sites. Now
   they download none of it and this file is requested by one hostname.

   Linked from lib/views/demo.js, which is also the only thing that emits the
   markup these rules are for. Both layouts ask that module and neither knows
   anything about the demo beyond "is it".
   ========================================================================== */
/* THE MADE-UP SHOP'S WORDMARK — demo.trimsy.io only, drawn by
   lib/views/demo.js. No shop we are paid by ever gets this.

   `demo barber`, set the way Fresha's mark and Trimsy's own are: one weight,
   lowercase, tracked in tight. Those three things are the entire design. Set
   it in two weights or in caps and it stops being a mark and goes back to
   being two words in a header.

   Sized in em off one font-size so the header, the footer and the app's launch
   screen are the same artwork at four scales rather than four sets of numbers
   to keep in step. It takes currentColor, which is what lets one wordmark sit
   on the sign-black header, the sign-black footer band, the brand-coloured
   admin bar and a white launch screen without a second file. */
.dmark {
  display: inline-block; font-size: 24px; line-height: 1;
  font-family: var(--sans); font-weight: 800;
  /* The mark is lowercase whatever the markup says, so a future caller writing
     "Demo Barber" cannot quietly undo half the design. */
  text-transform: lowercase;
  letter-spacing: -.045em;
  color: currentColor; text-decoration: none; white-space: nowrap;
}
/* THE WORD SPACE, and it is load-bearing. A default space at 800 weight opens
   a hole in the middle of the mark wide enough to read as two words that
   happen to be next to each other. A fifth of an em closes it to the point
   where the pair reads as one object and the tracking can still do its work.
   Left margin rather than a narrow-space character: a character is invisible
   in the source and the next person deletes it. */
.dmark .dm2 { margin-left: .2em; }

/* The footer copy is the same mark, larger, and a block so it sits at the
   start of its column like the artwork it replaces. .fmark is written for an
   <img> and caps the width in px, which would squeeze type. */
.dmark.fmark { display: block; width: auto; height: auto; font-size: 30px; }

/* ---- the demo shop --------------------------------------------------------
   demo.trimsy.io only. Rendered by lib/views/demo.js, gated on isDemoShop(),
   and never served to a shop we are paid by. */

/* THE RIBBON, above the sticky header so it scrolls away. It has to be read
   before a price or a barber's name is, and it has to stop being in the way
   immediately afterwards - a banner pinned over a booking flow is shouting
   over the thing it is trying to demonstrate. */
.demobar {
  background: var(--brand); color: var(--on-brand);
  font-size: var(--t-small);
  border-bottom: 1px solid rgba(var(--sign-rgb), .18);
}
.demobar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); padding-top: var(--s2); padding-bottom: var(--s2);
}
.demobar p { margin: 0; }
/* The link keeps its underline. It is the one control in the bar, it sits on a
   coloured field where a bare colour change would not read as a link at all,
   and it must not be mistaken for the rest of the sentence. */
.demobar-how {
  color: inherit; white-space: nowrap; font-weight: 600;
  text-underline-offset: 3px;
}
/* Under 640px the sentence and the link stack rather than squeeze: the link is
   a tap target and the last thing that should be losing width. */
@media (max-width: 640px) {
  .demobar .wrap { flex-direction: column; align-items: flex-start; gap: var(--s1); }
}

/* THE GUIDE AS A SECTION - what it is with no script at all. Ordinary page
   furniture at the bottom of the page, which the ribbon's link jumps to. */
.dguide {
  max-width: var(--maxw); margin: var(--s8) auto 0; padding: 0 var(--s5);
}
.dguide-in {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--s6);
}
.dguide h2 { font: 600 var(--t-title)/1.15 var(--display); margin: 0 0 var(--s3); }
.dguide h3 {
  font: 700 var(--t-tiny)/1 var(--sans); letter-spacing: var(--track-caps);
  text-transform: uppercase; color: var(--ink-faint);
  margin: var(--s6) 0 var(--s3);
}
.dguide-lead { font-size: var(--t-lead); color: var(--ink-soft); margin: 0; }
/* The number and the bullet are the only things telling these two lists apart
   at a glance, so the ordered one keeps its numerals rather than being styled
   into another set of dots. */
.dguide-list { margin: 0; padding-left: var(--s5); }
.dguide-list li { margin: 0 0 var(--s3); color: var(--ink-soft); }
.dguide-list strong { color: var(--ink); }
.dguide-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4);
  margin: var(--s6) 0 0;
}
.dguide-link { color: var(--ink-soft); font-size: var(--t-small); }

/* THE SAME ELEMENT AS A MODAL, once static/demo.js has moved it into a
   <dialog>. Only the framing changes: the card inside keeps every rule above,
   so the two presentations cannot drift into two designs. */
.dgd {
  max-width: 680px; width: calc(100% - 2 * var(--s4));
  max-height: calc(100dvh - 2 * var(--s5));
  padding: 0; border: 0; background: transparent;
  color: var(--ink); overflow: visible;
}
.dgd::backdrop { background: rgba(var(--sign-rgb), .62); }
/* The dialog is the scroll container, not the page behind it: on a phone this
   guide is taller than the screen, and scrolling the page underneath a modal
   is the classic way to end up unable to reach the button at the bottom. */
.dgd .dguide {
  margin: 0; padding: 0; max-width: none;
  max-height: calc(100dvh - 2 * var(--s5)); overflow-y: auto;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.dgd .dguide-in { position: relative; border: 0; }

/* The close control. A real 44px target in the corner, over the padding rather
   than inside the flow, so the heading is not pushed sideways to make room for
   something that is only there when there is a dialog to close. */
.dgd-x {
  position: absolute; top: 0; right: 0;
  width: var(--tap); height: var(--tap); display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--cream); cursor: pointer;
  color: var(--ink-soft);
}
.dgd-x:hover { background: var(--cream-deep); color: var(--ink); }
/* The heading must not run under the close button on a narrow screen. */
.dgd .dguide h2 { padding-right: var(--tap); }

/* ---- the demo shop's credentials -----------------------------------------
   demo.trimsy.io only, from lib/views/demo.js. The pairing code and the PIN
   are printed on the screens that ask for them, because the demo's admin is
   meant to be walked into. See that file for why that is safe on one invented
   shop and would be indefensible anywhere else.

   Styled as a plaque rather than as a .notice: the notices in here are things
   that have gone wrong, and this is an instruction. Dashed, so it reads as
   temporary scaffolding around the real screen rather than part of it. */
.democred {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: var(--s1) var(--s3); margin: 0 0 var(--s5);
  padding: var(--s3) var(--s4); text-align: left;
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: var(--cream);
}
.democred-l {
  font: 700 var(--t-tiny)/1 var(--sans); letter-spacing: var(--track-caps);
  text-transform: uppercase; color: var(--ink-faint);
}
/* The one thing anybody is here to read. Tabular and tracked out, matching
   .code-input, so the digits on the plaque and the digits in the field they
   are typed into are the same shape. */
.democred-v {
  font: 700 1.35rem/1 var(--numeric); letter-spacing: .18em; color: var(--ink);
}
/* Takes the whole second line: the label and the value belong together, and a
   sentence wrapping between them is what makes a three-part row look accidental. */
.democred-n { flex-basis: 100%; font-size: var(--t-small); color: var(--ink-soft); }

/* THE MADE-UP SHOP'S WORDMARK on the staff side. The mark itself is defined in
   app.css; these are the three places the admin puts it, and all each needs is
   a size and a colour, because it is type taking currentColor rather than
   artwork with a fixed polarity. See lib/views/demo.js.

   .launch-logo and .bar .mark img are written for an <img> - a px height, a
   max-width, object-fit - and none of that means anything to a span, so each
   is undone here rather than left to apply half way. */
.dmark.launch-logo {
  max-width: none; max-height: none;
  font-size: clamp(1.75rem, 7vw, 2.5rem);
  color: var(--ink);
}
.bar .mark .dmark { font-size: 20px; color: var(--on-brand); }
@media (max-width: 560px) { .bar .mark .dmark { font-size: 17px; } }