/* The showcase tour (showcase phase 3). Phone in portrait first; the identity is the shared
   tokens of fdi.css (docs/DESIGN.md) — indigo band, plaster paper, terracotta signal. */
body.show { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--band); color: var(--band-ink);
  font-family: var(--sans); -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
html[lang="ar"] body.show { font-family: var(--ar); }
.show-top { padding: max(10px, env(safe-area-inset-top)) 14px 6px; }
.show-bars { display: flex; gap: 3px; }
.show-bars i { flex: 1; height: 3px; border-radius: 2px; background: var(--band-line); overflow: hidden; position: relative; }
.show-bars i b { position: absolute; inset: 0; width: 0; background: var(--band-ink); }
.show-bars i.done b { width: 100%; }
.show-head { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; flex-wrap: wrap; }
.show-brand { font-family: var(--mono); font-weight: 600; letter-spacing: .04em; }
.show-company { color: var(--band-ink-2); }
.show-chip, .show-label { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--band-line); color: var(--band-ink-2); white-space: nowrap; }
.show-label.recorded, .show-label.replayed { border-color: var(--signal-mid); color: #f3d9a4; }
.show-label.live { border-color: var(--good); color: #b9e2d6; }
.show-spacer { flex: 1; }
.show-btn { background: transparent; color: var(--band-ink-2); border: 1px solid var(--band-line); border-radius: 6px; padding: 4px 8px;
  font: inherit; font-size: 12px; cursor: pointer; }
.show-btn.on { color: var(--band); background: var(--band-ink); }
.show-stage { flex: 1; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 10px 14px; position: relative; }
.show-foot { padding: 6px 16px max(14px, env(safe-area-inset-bottom)); max-width: 640px; width: 100%; margin: 0 auto; box-sizing: border-box; }
.show-labels { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.show-caption { font-size: 19px; line-height: 1.4; margin: 8px 0 10px; font-weight: 500; min-height: 3.2em; }
.show-controls { display: flex; align-items: center; gap: 10px; }
.show-ctl { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--band-line); background: var(--band-2); color: var(--band-ink);
  font-size: 20px; cursor: pointer; }
.show-pos { color: var(--band-ink-3); font-family: var(--mono); font-size: 12px; margin-inline-start: auto; }
.show-loading { display: grid; place-items: center; width: 100%; height: 100%; }
.show-pulse { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--band-line); border-top-color: var(--band-ink); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

/* ── the scene card: plaster paper on the indigo band ── */
.scene { width: 100%; max-width: 560px; background: var(--paper); color: var(--ink-2); border-radius: 16px; padding: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35); box-sizing: border-box; max-height: 100%; overflow: hidden; animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.scene h3 { margin: 0 0 10px; font-size: 13px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.big { font-family: var(--mono); font-size: 54px; color: var(--ink); font-weight: 600; line-height: 1; }
.big.signal { color: var(--signal); }
.row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.dim { opacity: .28; transition: opacity .5s; }
.spot { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 10px; }

/* the phone and its bubbles */
.phone { background: #e9e3d8; border-radius: 18px; padding: 10px; height: 46dvh; max-height: 420px; overflow: hidden; position: relative; }
.bubbles { display: flex; flex-direction: column; gap: 6px; }
.bubble { background: var(--card); border-radius: 12px; padding: 7px 10px; font-size: 14px; line-height: 1.35; max-width: 88%;
  box-shadow: 0 1px 0 var(--line); animation: pop .35s ease both; }
.bubble .who { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 2px; }
.bubble .tag { font-family: var(--mono); font-size: 10px; color: var(--ink-4); margin-inline-start: 6px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.phone.flood .bubbles { animation: flood 9s linear both; }
@keyframes flood { from { transform: translateY(0); } to { transform: translateY(-62%); } }
.counter { position: absolute; inset-inline: 10px; bottom: 10px; background: var(--band); color: var(--band-ink); border-radius: 12px; padding: 10px 12px;
  display: flex; align-items: baseline; gap: 8px; }
.counter b { font-family: var(--mono); font-size: 30px; }

/* a fact card */
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; }
.fact .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--signal-ink); font-weight: 600; }
.fact .subject { font-size: 17px; color: var(--ink); font-weight: 600; margin: 4px 0; }
.fact .cite { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline li { padding: 6px 0 6px 0; border-top: 1px solid var(--line-2); font-size: 13px; animation: pop .4s ease both; }
.status { font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--signal-bg); color: var(--signal-ink); margin-inline-end: 6px; }
.status.ok { background: var(--good-bg); color: var(--good); }
.status.quiet { background: var(--line-2); color: var(--ink-3); }

/* the brief, the morning group */
.tg { background: #dfe8ee; border-radius: 14px; padding: 12px; }
.tg .bubble { max-width: 100%; white-space: pre-wrap; font-size: 14px; }

/* a photo being read */
.doc { position: relative; border-radius: 10px; overflow: hidden; max-height: 30dvh; }
.doc img { width: 100%; display: block; }
.doc .scan { position: absolute; inset-inline: 0; height: 22%; background: linear-gradient(to bottom, transparent, rgba(178, 58, 30, .22), transparent);
  animation: scan 2.4s ease-in-out 2 both; }
@keyframes scan { from { top: -22%; } to { top: 100%; } }
.lines { margin-top: 10px; display: grid; gap: 6px; }
.line { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; animation: pop .4s ease both; }
.line .amount { font-family: var(--mono); font-size: 18px; color: var(--ink); }

/* the camera */
.cam { position: relative; border-radius: 10px; overflow: hidden; background: #000; }
.cam img { width: 100%; display: block; }
.cam svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cam svg .zone { fill: rgba(178, 58, 30, .12); stroke: var(--signal); stroke-width: .006; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.6s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.q { margin-top: 10px; background: var(--card); border-radius: 12px; padding: 10px 12px; border: 1px solid var(--line); }
.q .a { margin-top: 6px; font-family: var(--mono); font-size: 14px; color: var(--signal-ink); }
.crop { position: relative; border-radius: 10px; overflow: hidden; }
.crop img { width: 100%; display: block; }
.crop .wipe { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, var(--band) 0 6px, transparent 6px 12px);
  animation: wipe 1.8s steps(12) forwards; }
@keyframes wipe { to { transform: translateX(110%); } }

/* departments */
.depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.dept { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 14px; color: var(--ink); animation: pop .4s ease both; }
.dept .lock { font-size: 11px; color: var(--ink-3); display: block; margin-top: 4px; }
.wall { margin-top: 12px; border-radius: 12px; padding: 12px; background: var(--signal-bg); color: var(--signal-ink); border: 1px solid var(--signal-line);
  font-family: var(--mono); font-size: 14px; animation: shake .5s ease .6s both; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* a finding: two sides meeting */
.sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; margin-top: 10px; }
.side { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 13px; }
.side b { font-family: var(--mono); color: var(--ink); }
.sides .vs { display: grid; place-items: center; color: var(--signal); font-size: 22px; }
.side.a { animation: fromleft .6s ease both; } .side.b { animation: fromright .6s ease both; }
@keyframes fromleft { from { opacity: 0; transform: translateX(-30px); } }
@keyframes fromright { from { opacity: 0; transform: translateX(30px); } }
html[dir="rtl"] .side.a { animation-name: fromright; } html[dir="rtl"] .side.b { animation-name: fromleft; }
.finding-title { font-size: 17px; font-weight: 600; color: var(--signal-ink); }

/* typing */
.typed { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 15px; min-height: 1.4em; }
.typed::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--ink-3); }
.typed.done::after { content: ""; }
@keyframes blink { 50% { opacity: 0; } }
.answer { margin-top: 10px; font-size: 14px; line-height: 1.5; background: var(--card); border-radius: 12px; padding: 10px 12px; border: 1px solid var(--line);
  animation: pop .5s ease both; max-height: 28dvh; overflow: auto; }
.answer .c { font-family: var(--mono); font-size: 11px; background: var(--line-2); border-radius: 4px; padding: 0 4px; color: var(--ink); }
.sources { margin-top: 8px; font-size: 11px; color: var(--ink-3); font-family: var(--mono); max-height: 14dvh; overflow: auto; }
.btn-fake { margin-top: 10px; display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-4); font-size: 13px; }
.refused { margin-top: 10px; background: var(--signal-bg); color: var(--signal-ink); border-radius: 12px; padding: 10px 12px; font-weight: 600; animation: pop .4s ease both; }

/* bars for the interview */
.dim-row { margin-top: 10px; font-size: 13px; }
.dim-row .barline { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-top: 4px; background: var(--line-2); }
.dim-row .barline i { display: block; height: 100%; animation: grow .8s ease both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.agrees { background: var(--good); } .partly { background: var(--signal-mid); } .disagrees { background: var(--signal); }

.close-card { text-align: center; }
.close-card .brand { font-family: var(--mono); font-size: 40px; color: var(--ink); font-weight: 600; }
.close-card .contact { margin-top: 14px; font-family: var(--mono); color: var(--ink-3); }

@media (min-width: 900px) {
  .show-caption { font-size: 22px; }
  .scene { max-width: 640px; padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; transition: none !important; }
  .phone.flood .bubbles { transform: none; }
}
