
/* Deck viewer for leads. Each slide is a web slide: the designed background ("plate") plus its real text.
   Wide screens: one slide at a time, text placed exactly as designed. Phones: a scrolling page, the visuals on
   top of each slide and its text reflowed underneath. Records seconds per slide while visible and link clicks. */
:root {
  --stage: #030406; --bar: #080E1B; --line: rgba(255,255,255,0.08); --fg: #FFFFFF; --muted: #AAB5CE; --accent: #387EFF;
  --font-display: "Poppins", "Avenir Next", system-ui, sans-serif; --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--stage); color: var(--fg); font: 400 14px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
.app { min-height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: calc(env(safe-area-inset-top, 0px) + 12px) 18px 12px;
  background: rgba(8,14,27,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .b-logo { height: 16px; width: auto; display: block; flex: none; }
.title { font: 500 13px var(--font-display); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.count { font: 500 12px var(--font-display); letter-spacing: 0.08em; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); transition: width .35s var(--ease); }
.bottom { padding: 10px 18px calc(env(safe-area-inset-bottom, 0px) + 12px); background: var(--bar); border-top: 1px solid var(--line); }
.note { font-size: 11px; color: var(--muted); text-align: center; }
.message { max-width: 460px; margin: auto; text-align: center; display: grid; gap: 10px; padding: 24px; }
.message h1 { margin: 0; font: 600 18px var(--font-display); }
.message p { margin: 0; color: var(--muted); }
/* links that ask who's viewing: an email first, nothing of the deck until then */
.gate { width: min(400px, 100%); margin: auto; display: grid; gap: 14px; padding: 28px 22px; animation: in .4s var(--ease) both; }
.gate h1 { margin: 0; font: 600 21px/1.25 var(--font-display); }
.gate p { margin: 0; color: var(--muted); }
.gate label { display: grid; gap: 7px; font: 500 10.5px var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.gate input { width: 100%; padding: 12px 13px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: var(--fg);
  font: 400 16px var(--font-body); letter-spacing: normal; text-transform: none; }
.gate input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,126,255,.25); }
.gate button { padding: 13px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: 600 12.5px var(--font-display); letter-spacing: .1em;
  text-transform: uppercase; cursor: pointer; transition: box-shadow .15s, opacity .15s; }
.gate button:hover { box-shadow: 0 0 18px rgba(56,126,255,.55); }
.gate button:disabled { opacity: .6; cursor: progress; box-shadow: none; }
.gate .fine { font-size: 12px; line-height: 1.55; }
.gate .err { color: #ffc2c9; font-size: 13px; }
@keyframes in { from { opacity: 0; transform: translateY(10px); } }
.linkish { appearance: none; border: 0; background: none; padding: 0; color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkish:hover { color: var(--fg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- wide: presentation */
.stage { position: relative; display: grid; place-items: center; padding: 18px 70px; min-height: 0; height: calc(100dvh - 104px); }
.frame { position: relative; width: min(100%, calc((100dvh - 150px) * var(--ar))); aspect-ratio: var(--ar); container-type: inline-size;
  border-radius: 6px; overflow: hidden; background: var(--bg, #0B1324); box-shadow: 0 24px 70px rgba(0,0,0,0.6); }
.frame.enter { animation: slide-in .55s var(--ease) both; }
.frame.enter.back { animation-name: slide-back; }
@keyframes slide-in { from { opacity: 0; transform: translateX(28px) scale(.985); } }
@keyframes slide-back { from { opacity: 0; transform: translateX(-28px) scale(.985); } }
.plate { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.ln { position: absolute; white-space: pre; line-height: 1; font-family: var(--font-body); font-kerning: normal; }
.ln.glow { text-shadow: 0 .03em .35em rgba(0,0,0,.55), 0 0 .08em rgba(0,0,0,.25); }   /* stands in for a removed glow image */
.frame.enter .ln { animation: line-in .7s var(--ease) both; animation-delay: calc(.12s + var(--i) * 55ms); }
@keyframes line-in { from { opacity: 0; transform: translateY(.35em); filter: blur(4px); } }
.hot { position: absolute; display: block; border-radius: 4px; }
.hot:hover, .hot:focus-visible { background: rgba(56,126,255,0.14); box-shadow: inset 0 0 0 1px rgba(56,126,255,0.6); }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: rgba(19,29,52,0.8);
  color: var(--fg); font: 400 22px/1 var(--font-display); cursor: pointer; display: grid; place-items: center; transition: border-color .2s, transform .2s; }
.nav:hover { border-color: var(--accent); transform: translateY(-50%) scale(1.06); }
.nav:disabled { opacity: 0.25; cursor: default; transform: translateY(-50%); }
.prev { left: 14px; } .next { right: 14px; }

/* ---- phone: a scrolling page */
.flow { display: grid; gap: 0; min-width: 0; overflow-x: hidden; }
.card { background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.card.seen { opacity: 1; transform: none; }
.card .pic { position: relative; aspect-ratio: var(--ar); overflow: hidden; }
.card .pic img { width: 100%; height: 100%; display: block; object-fit: cover; }
.card .pic .num { position: absolute; left: 10px; bottom: 8px; font: 600 10px var(--font-display); letter-spacing: .14em; padding: 3px 8px; border-radius: 99px; background: rgba(3,4,6,.55); color: #fff; }
.card .body { padding: 18px 18px 22px; display: grid; gap: 10px; min-width: 0; overflow-wrap: break-word; }
.card .body:empty { display: none; }
.card h2 { margin: 0; font: 600 clamp(24px, 7.4vw, 34px)/1.12 var(--font-body); letter-spacing: -.01em; }
.card h3 { margin: 0; font: 500 clamp(17px, 4.8vw, 21px)/1.3 var(--font-body); }
.card p { margin: 0; font: 400 16px/1.55 var(--font-body); }
.card p.lead { font-size: clamp(18px, 5vw, 22px); line-height: 1.4; }
.card .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.card .links a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: #fff; text-decoration: none; font: 600 13px var(--font-body); }
@media (prefers-reduced-motion: reduce) { .frame.enter, .frame.enter .ln { animation: none; } .card { opacity: 1; transform: none; transition: none; } .progress i { transition: none; } }
