/* ============================================================================
   TAPN Entry — Attendee OS demos
   ----------------------------------------------------------------------------
   The frame chrome shared by the demos, the hub's control strip (.hb-bar) and
   one reproduction of a shipped surface:

     .pf-*   Smart Profile     ← public/profile.php

   Badge Studio and the Event Hub are the shipped pages themselves, in frames
   (../../studio/ and ../../hub/), so nothing of theirs is styled here.

   Unlike the rest of the site, everything inside a .demo-frame carries the
   product's own light palette rather than the page's semantic tokens. These
   are pictures of an application, so they stay lit in dark mode for the same
   reason .kiosk does — see the note above the .kiosk block in tokens.css.
   ========================================================================== */

/* ---- Demo chrome -------------------------------------------------------- */
.demo-frame {
  /* Light pin. Re-points the semantic tokens the demos read, so everything
     inside the frame renders as the product does regardless of page theme. */
  --ink:         #0f172a;
  --ink-80:      rgba(15,23,42,.80);
  --ink-65:      rgba(15,23,42,.65);
  --muted:       #64748b;
  --bg:          #f6f9fb;
  --card:        #ffffff;
  --card-glass:  rgba(255,255,255,.92);
  --card-veil:   rgba(255,255,255,.65);
  --line:        rgba(15,23,42,.08);
  --line-strong: rgba(15,23,42,.12);
  --line-teal:   rgba(15,187,179,.22);
  --tint-teal:   rgba(15,187,179,.12);
  --sh-sm:       0 8px 20px rgba(15,23,42,.05);
  --sh:          0 10px 28px rgba(15,23,42,.08);
  --sh-lg:       0 22px 50px rgba(15,23,42,.12);
  --sh-hover:    0 10px 22px rgba(15,23,42,.08);

  /* One viewport height for all three demos. The Hub and the Profile are long
     pages and the Studio is a fixed-height app; capping them all at the same
     number keeps the section scannable and scrolls the overflow inside the
     frame rather than down the page. */
  --demo-h: min(680px, 78vh);

  border: 1px solid rgba(15,23,42,.14);
  border-radius: var(--r-xl);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 22px 50px rgba(2,6,23,.24);
  overflow: hidden;
}

/* Browser chrome — used on the two demos that are public web pages. */
.demo-frame__bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), var(--bg));
}
.demo-frame__dots { display: flex; gap: 6px; flex: none; }
.demo-frame__dots i { width: 10px; height: 10px; border-radius: var(--r-pill); background: var(--line-strong); }
.demo-frame__url {
  display: inline-flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0; margin-right: auto;
  padding: 6px 14px; min-height: 32px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--bg);
  font-size: 12px; font-weight: 700; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.demo-frame__url svg { flex: none; width: 13px; height: 13px; fill: none; stroke: var(--teal-deep); stroke-width: 2; stroke-linecap: round; }
.demo-frame__url b { color: var(--ink); font-weight: 800; }
.demo-frame__live {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em;
  color: var(--teal-deep);
}
.demo-frame__live i {
  width: 7px; height: 7px; border-radius: var(--r-pill); background: var(--teal);
  box-shadow: 0 0 0 0 rgba(15,187,179,.5); animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(15,187,179,0); } 100% { box-shadow: 0 0 0 0 rgba(15,187,179,0); } }
.demo-frame__reset {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  padding: 6px 13px; min-height: 32px; border-radius: var(--r-pill);
  font-family: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.demo-frame__reset:hover { color: var(--ink); border-color: var(--line-strong); }

/* Transient feedback inside a frame — used where the real app would have
   confirmed a write, so the demo can say plainly that it didn't. */
.demo-toast {
  margin: 0; padding: 10px 16px;
  border-bottom: 1px solid rgba(245,158,11,.25);
  background: rgba(245,158,11,.14); color: #9a5b00;
  font-size: .84rem; font-weight: 700;
}

/* The standing promise, repeated under every demo. It sits outside the frame,
   so it stays in the page's theme. */
.demo-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 14px; padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--card-veil); border: 1px solid var(--line);
  font-size: .86rem; line-height: 1.55; color: var(--muted);
}
.demo-note svg { flex: none; margin-top: 3px; color: var(--teal-deep); }
.demo-note b { color: var(--ink); font-weight: 800; }

/* ---- Demo switcher ------------------------------------------------------ */
.demo-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.demo-tabs .tab { display: inline-flex; align-items: center; gap: 9px; }
.demo-tabs .tab svg { flex: none; }

/* ══ EVENT HUB ══════════════════════════════════════════════════════════════
   Badge Studio and the hub are no longer drawn here: both are the shipped
   pages, in frames (../../studio/ and ../../hub/). What remains for the hub is
   the control strip beside the phone.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Demo-only control strip. The real page reads both values off the event
   record; here you set them yourself so you can watch the page repaint. */
.hb-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 18px;
  border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--card);
}
.hb-bar__label { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.hb-bar input[type='text'] {
  flex: 1; min-width: 150px; padding: 8px 14px; min-height: 38px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--card); font-family: inherit; font-size: 13px; font-weight: 700; color: var(--ink);
}
.hb-bar input[type='text']:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,187,179,.14); }
.hb-colors { display: flex; gap: 6px; }
.hb-color {
  width: 28px; height: 28px; border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid var(--line-strong);
  transition: transform var(--t) var(--ease);
}
.hb-color:hover { transform: translateY(-2px); }
.hb-color[aria-pressed='true'] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--hb-primary); }


/* ══ SMART PROFILE ════════════════════════════════════════════════════════
   profile.php — the page a badge resolves to. Stacked cards on the dashboard
   wash: identity, about, links, then the attendee's own events.
   ═══════════════════════════════════════════════════════════════════════ */
.pf {
  padding: 22px; background: var(--bg);
  max-height: var(--demo-h); overflow-y: auto;
}
.pf-card {
  padding: 22px 24px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--card);
  box-shadow: 0 8px 22px rgba(15,23,42,.04);
}
.pf-card:last-child { margin-bottom: 0; }
.pf-card__title { font-family: var(--font); font-size: 1.05rem; font-weight: 900; letter-spacing: -.02em; color: var(--ink); }

/* The strip that says where this page came from — a badge tap. */
.pf-origin {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; margin-bottom: 16px;
  border: 1px solid var(--line-teal); border-radius: var(--r-pill);
  background: var(--tint-teal); color: var(--teal-deep);
  font-size: .84rem; font-weight: 700;
}
.pf-origin svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Identity */
.pf-id { max-width: 460px; margin: 0 auto; text-align: center; padding: 8px 0 4px; }
.pf-avatar {
  width: 104px; height: 104px; margin: 0 auto 16px;
  border-radius: var(--r-pill); display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal), #0b7c93);
  color: #fff; font-size: 34px; font-weight: 900; letter-spacing: -.02em;
  box-shadow: 0 14px 28px rgba(15,187,179,.28);
}
.pf-name { font-family: var(--font); font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.pf-sub { margin-top: 6px; color: var(--muted); font-size: .92rem; font-weight: 600; }
.pf-stats { display: flex; justify-content: center; gap: 40px; margin-top: 20px; }
.pf-stat b { display: block; font-family: var(--font); font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pf-stat span { display: block; margin-top: 2px; color: var(--muted); font-size: .84rem; font-weight: 600; }
.pf-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.pf-btn {
  min-width: 168px; min-height: 44px; padding: 0 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  background: var(--brand-grad); color: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
  box-shadow: var(--sh-teal);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease);
}
.pf-btn:hover { transform: translateY(-1px); box-shadow: var(--sh-hover); }
.pf-btn[data-on='true'] {
  background: var(--tint-teal); color: var(--teal-deep);
  border-color: var(--line-teal); box-shadow: none;
}
.pf-btn--ghost { min-width: 0; background: var(--card); color: var(--ink); border-color: var(--line-strong); box-shadow: none; }

.pf-bio { margin-top: 10px; color: var(--ink-80); font-size: .92rem; line-height: 1.65; }

/* Links */
.pf-tiles { display: grid; grid-template-columns: repeat(auto-fit, 96px); justify-content: center; gap: 16px; margin-top: 16px; }
.pf-tile { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: inherit; cursor: pointer; background: none; border: 0; font-family: inherit; }
.pf-tile__icon {
  width: 72px; height: 72px; border-radius: 18px;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 3px 8px rgba(2,6,23,.06);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.pf-tile__icon svg { width: 30px; height: 30px; fill: none; stroke: var(--teal); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pf-tile:hover .pf-tile__icon { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(2,6,23,.12); }
.pf-tile__label { margin-top: 8px; font-size: .82rem; font-weight: 600; color: #334155; text-align: center; }

/* Events */
.pf-events-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pf-seg { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: #eef2f6; }
.pf-seg button {
  min-height: 34px; padding: 0 16px; border: 0; border-radius: var(--r-pill);
  background: none; color: var(--muted);
  font-family: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.pf-seg button[aria-selected='true'] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.12); }

.pf-event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin-top: 18px; }
.pf-event {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
  box-shadow: 0 8px 22px rgba(15,23,42,.04);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.pf-event:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.pf-event__hero { position: relative; height: 92px; background: linear-gradient(135deg, var(--pf-hue, #0fbbb3), #0b7c93); }
.pf-event__hero span {
  position: absolute; left: 13px; bottom: 9px;
  font-family: var(--font); font-size: 1.1rem; font-weight: 900; letter-spacing: -.03em; color: rgba(255,255,255,.92);
}
.pf-event__body { padding: 11px 13px 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.pf-event__title { font-size: .92rem; font-weight: 800; letter-spacing: -.01em; color: var(--ink); line-height: 1.25; }
.pf-event__meta { display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: .76rem; }
.pf-event__meta b { color: var(--ink-80); font-weight: 700; }
.pf-event__cta {
  margin-top: auto; min-height: 38px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--r-pill);
  background: var(--brand-grad); color: #fff;
  font-family: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
}
.pf-empty { margin-top: 16px; color: var(--muted); font-size: .9rem; }

@media (max-width: 620px) {
  .pf { padding: 14px; }
  .pf-card { padding: 18px 16px; }
  .pf-stats { gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-frame__live i { animation: none; }
  .pf-event { transition: none; }
}
