/* The guided tour. A blueprint-dark stage (the trade's own drawing paper),
   the real dashboard in a browser frame, and Teri in her hi-vis vest.
   Brand cyan and teal come from the marketing site; safety yellow is kept
   for Teri and for the moments worth remembering. */
:root {
  --night: #0b1a29;
  --night-2: #10243a;
  --line: rgba(125, 211, 252, .08);
  --ink: #0f1722;
  --paper: #f1f5f9;
  --muted: #9fb0c3;
  --cyan: #0891b2;
  --cyan-lt: #38bdf8;
  --teal: #10b981;
  --vis: #f4c542;
  --vis-dk: #b8860b;
  --radius: 14px;
  --bar-h: 84px;
  --top-h: 56px;
  --ease: cubic-bezier(.62, .02, .22, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--paper);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(1200px 700px at 30% 20%, #133152 0%, var(--night) 60%);
  background-color: var(--night);
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: var(--top-h) minmax(0, 1fr) var(--bar-h);
  height: 100svh;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--vis); outline-offset: 2px; border-radius: 6px; }

/* ---------- top bar ---------- */
.t-top { display: flex; align-items: center; gap: 18px; padding: 0 24px; border-bottom: 1px solid rgba(255,255,255,.06); }
.t-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.01em; }
.t-brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--cyan); display: grid; place-items: center; color: #fff; }
.t-brand-mark svg { width: 18px; height: 18px; }
.t-where { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; justify-content: center; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.t-where #whereCh { color: var(--paper); font-weight: 700; }
.t-where-sc::before { content: "/"; margin-right: 10px; opacity: .5; }
.t-where-sc:empty { display: none; }
.t-cta { text-decoration: none; font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 10px; background: #0e7490; color: #fff; box-shadow: 0 6px 18px rgba(8,145,178,.35); display: inline-flex; align-items: center; min-height: 44px; }
.t-cta:hover { background: #155e75; }

/* ---------- stage ---------- */
.t-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 8px 28px;
  align-items: center;
  padding: 18px 28px 12px;
  min-height: 0;
}
.t-frame {
  justify-self: end;
  width: min(100%, calc((100svh - var(--top-h) - var(--bar-h) - 30px - 38px) * 1.6));
  border-radius: var(--radius);
  background: #1b2c40;
  box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.07);
  overflow: hidden;
}
.t-chrome { height: 38px; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: #16263a; border-bottom: 1px solid rgba(255,255,255,.05); }
.t-dots { display: flex; gap: 7px; }
.t-dots i { width: 11px; height: 11px; border-radius: 50%; background: #34475e; display: block; }
.t-url { flex: 1; max-width: 420px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; color: #b9c7d6; background: #0f1d2e; border-radius: 8px; padding: 5px 12px; }
.t-url svg { width: 12px; height: 12px; color: var(--teal); }
.t-sample { font-size: 11.5px; font-weight: 700; color: var(--night); background: var(--vis); padding: 3px 9px; border-radius: 999px; }

.t-vp { position: relative; aspect-ratio: 1280 / 800; overflow: hidden; background: #e8eef4; }
.t-cam { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 1.05s var(--ease); will-change: transform; }
.t-cam.no-tween, .t-cam.no-tween img, .t-ring.no-tween, .t-cursor.no-tween { transition: none !important; }
.t-cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.t-cam img.on { opacity: 1; }

.t-phones { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 6%; background:
  linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
  linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px, #0f2236; }
.t-phones[hidden] { display: none; }
.t-phone { height: 88%; aspect-ratio: 390 / 844; border-radius: 9% / 4.2%; background: #05101b; padding: 1.6%; box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 0 2px #2b3e55; animation: rise .7s var(--ease) both; }
.t-phone + .t-phone { animation-delay: .15s; }
.t-phone img { width: 100%; height: 100%; border-radius: 8% / 3.7%; object-fit: cover; display: block; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

/* spotlight ring: dims everything outside the box */
.t-ring {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  border-radius: 10px; border: 3px solid var(--vis);
  box-shadow: 0 0 0 200vmax rgba(8, 20, 34, .42), 0 0 22px rgba(244,197,66,.55);
  opacity: 0; pointer-events: none;
  transition: left 1.05s var(--ease), top 1.05s var(--ease), width 1.05s var(--ease), height 1.05s var(--ease), opacity .35s ease;
}
.t-ring.on { opacity: 1; }

.t-wow {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 7px;
  background: var(--vis); color: var(--night); font-weight: 800; font-size: clamp(12px, 1.25vw, 16px);
  padding: 7px 14px 7px 10px; border-radius: 999px; box-shadow: 0 8px 22px rgba(0,0,0,.35);
  transform: translate(-6%, -120%) rotate(-3deg) scale(.4); opacity: 0; pointer-events: none; white-space: nowrap;
}
.t-wow.on { animation: pop .55s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.t-wow-star { font-size: 1.15em; line-height: 1; }
@keyframes pop { to { opacity: 1; transform: translate(-6%, -120%) rotate(-3deg) scale(1); } }
.t-spark { position: absolute; width: 10px; height: 10px; pointer-events: none; color: var(--vis); animation: spark .8s ease-out forwards; }
.t-spark::before { content: "\2726"; font-size: 14px; position: absolute; left: -3px; top: -8px; }
@keyframes spark { from { opacity: 1; transform: translate(0, 0) scale(.6); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); } }

.t-cursor { position: absolute; left: 70%; top: 70%; width: 28px; height: 34px; opacity: 0; pointer-events: none; transition: left .85s var(--ease), top .85s var(--ease), opacity .3s ease; filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); z-index: 3; }
.t-cursor.on { opacity: 1; }
.t-cursor.press svg { transform: scale(.86); transform-origin: 3px 2px; transition: transform .12s; }
.t-ripple { position: absolute; left: -19px; top: -20px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--vis); opacity: 0; }
.t-ripple.go { animation: ripple .6s ease-out; }
@keyframes ripple { from { opacity: 1; transform: scale(.2); } to { opacity: 0; transform: scale(1.6); } }

/* intro and outro cards over the screen */
.t-intro, .t-outro { position: absolute; inset: 0; display: grid; place-items: center; padding: 4%; background: rgba(11, 26, 41, .72); backdrop-filter: blur(3px); z-index: 5; transition: opacity .4s ease; }
.t-intro.gone { opacity: 0; pointer-events: none; }
.t-outro[hidden] { display: none; }
.t-intro-card { max-width: 640px; text-align: left; }
.t-intro-card h1, .t-intro-card h2 { font-size: clamp(22px, 3.1vw, 40px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 800; }
.t-intro-card p { margin: 0 0 22px; font-size: clamp(14px, 1.3vw, 17px); line-height: 1.55; color: #cfdae6; max-width: 56ch; }
.t-start { display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; text-decoration: none; background: var(--vis); color: var(--night); font-weight: 800; font-size: 17px; padding: 14px 24px; border-radius: 12px; box-shadow: 0 10px 26px rgba(244,197,66,.3); }
.t-start svg { width: 20px; height: 20px; }
.t-start:hover { background: #ffd65c; }
.t-ghost { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.28); background: transparent; cursor: pointer; text-decoration: none; font-weight: 700; font-size: 15px; padding: 12px 18px; border-radius: 12px; color: var(--paper); }
.t-ghost:hover { border-color: var(--vis); color: var(--vis); }
.t-outro-btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.t-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.t-jump button { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.04); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: #dbe6f0; }
.t-jump button:hover { border-color: var(--vis); color: var(--vis); }

/* ---------- Teri and her speech bubble ---------- */
.t-guide { align-self: end; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.t-bubble { position: relative; width: 100%; background: #fff; color: var(--ink); border-radius: 16px; padding: 14px 16px 14px; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.t-bubble::after { content: ""; position: absolute; left: 118px; bottom: -12px; border: 12px solid transparent; border-top-color: #fff; border-bottom: 0; }
.t-who { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: #5d6b7c; margin-bottom: 6px; }
.t-who b { color: var(--cyan); font-size: 14px; }
.t-say { margin: 0; font-size: 16.5px; line-height: 1.5; min-height: 6em; }
.t-say .caret { display: inline-block; width: 2px; height: 1em; background: var(--cyan); vertical-align: -2px; margin-left: 1px; animation: caret .8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.t-actions:empty { display: none; }
.t-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.t-audio { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; background: var(--night); color: #fff; font-weight: 700; font-size: 14px; padding: 9px 14px; border-radius: 999px; }
.t-audio svg { width: 16px; height: 16px; }
.t-audio.playing { background: var(--cyan); }
.t-audio-note { font-size: 12px; color: #6b7a8c; align-self: center; }

.t-dash { position: relative; width: 230px; margin-left: 14px; aspect-ratio: 460 / 601; }
.t-dash::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -4px; height: 14px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.45), transparent); z-index: -1; }
.d-fig { position: absolute; inset: 0; transform-origin: 50% 100%; animation: breathe 4.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-1.5px) scale(1.008, 1.012); } }
.d-pose { position: absolute; inset: 0; opacity: 0; transition: opacity .16s linear; }
.d-pose.on { opacity: 1; }
.d-pose img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; -webkit-mask-image: linear-gradient(#000 88%, transparent); mask-image: linear-gradient(#000 88%, transparent); }
.d-pose i { position: absolute; display: block; background-repeat: no-repeat; visibility: hidden; }
.d-pose i.show { visibility: visible; }
.d-fig.pop { animation: pop .34s var(--ease), breathe 4.2s ease-in-out .34s infinite; }
@keyframes pop { 0% { transform: translateY(5px) scale(.985); } 60% { transform: translateY(-3px) scale(1.01); } 100% { transform: none; } }
.d-fig.hop { animation: hop .5s ease-out 2, breathe 4.2s ease-in-out 1s infinite; }
@keyframes hop { 40% { transform: translateY(-12px); } }
.d-fig.sway { animation: sway 1.3s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }

/* ---------- control bar ---------- */
.t-bar { display: flex; align-items: flex-end; gap: 18px; padding: 8px 24px 12px; border-top: 1px solid rgba(255,255,255,.06); background: rgba(8, 18, 30, .6); }
.t-ctrls, .t-opts { display: flex; align-items: center; gap: 8px; }
.t-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); display: grid; place-items: center; cursor: pointer; }
.t-btn svg { width: 20px; height: 20px; }
.t-btn:hover { border-color: var(--vis); color: var(--vis); }
.t-play { width: 48px; height: 48px; border-radius: 50%; background: var(--vis); color: var(--night); border: 0; }
.t-play:hover { background: #ffd65c; color: var(--night); }
.t-play .i-pause, .playing-tour .t-play .i-play { display: none; }
.playing-tour .t-play .i-pause { display: block; }
.t-progress { flex: 1; display: flex; gap: 4px; height: 64px; align-items: flex-end; min-width: 0; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
.t-progress:hover .t-seg::before { background: rgba(255,255,255,.2); }
/* The visible bar stays 8px; the row is tall so a tap or drag anywhere on it seeks. */
.t-seg { position: relative; height: 28px; border-radius: 4px; background: transparent; border: 0; padding: 0; overflow: visible; min-width: 8px; pointer-events: none; flex-shrink: 1; }
.t-seg::before { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); }
.t-seg i { position: absolute; left: 0; bottom: 6px; height: 8px; width: 0; background: var(--cyan-lt); border-radius: 4px; }
.t-seg.cur i { background: var(--vis); }
.t-seg span { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); font-size: 11px; line-height: 1.15; color: var(--muted); white-space: nowrap; text-align: center; pointer-events: none; }
.t-seg.cur span { color: var(--paper); font-weight: 700; }
.t-progress-wrap { flex: 1; }
.t-count { font-size: 13px; color: var(--muted); min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.t-pill { border: 1px solid rgba(255,255,255,.18); background: transparent; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.t-pill:hover, .t-pill[aria-pressed="true"] { border-color: var(--vis); color: var(--vis); }

/* ---------- feature drawer ---------- */
.t-drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 92vw); background: #0e2034; border-left: 1px solid rgba(255,255,255,.08); z-index: 20; overflow-y: auto; padding: 18px 18px 40px; box-shadow: -20px 0 50px rgba(0,0,0,.4); }
.t-drawer[hidden] { display: none; }
.t-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.t-drawer h3 { font-size: 12.5px; color: var(--vis); margin: 18px 0 6px; font-weight: 700; }
.t-drawer ul { list-style: none; margin: 0; padding: 0; }
.t-drawer li button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14.5px; color: #dbe6f0; }
.t-drawer li button:hover { background: rgba(255,255,255,.06); }
.t-drawer li button.cur { background: rgba(244,197,66,.14); color: var(--vis); font-weight: 700; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .t-stage { grid-template-columns: minmax(0, 1fr) 230px; gap: 8px 18px; padding: 14px 16px 10px; }
  .t-dash { width: 180px; margin-left: 8px; }
  .t-bubble::after { left: 90px; }
  .t-say { font-size: 15px; }
  .t-seg span { display: none; }
  .t-seg.cur span { display: block; }
}
@media (max-width: 820px) {
  :root { --top-h: 50px; }
  body { height: auto; min-height: 100svh; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; }
  .t-top { height: var(--top-h); flex: 0 0 auto; padding: 0 12px; gap: 10px; }
  .t-brand-txt, .t-where-sc { display: none; }
  .t-where { justify-content: flex-start; }
  .t-cta { padding: 8px 12px; font-size: 13px; }
  .t-stage { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; padding: 10px 12px 8px; }
  .t-frame { width: 100%; border-radius: 10px; }
  .t-chrome { height: 30px; gap: 8px; padding: 0 8px; }
  .t-url { font-size: 11px; padding: 3px 8px; }
  .t-dots { display: none; }
  .t-sample { white-space: nowrap; font-size: 10.5px; padding: 2px 8px; }
  .t-guide { flex-direction: row; align-items: flex-end; gap: 6px; margin-top: 12px; }
  .t-dash { width: 104px; flex: 0 0 104px; margin: 0; aspect-ratio: 1 / 1.08; overflow: hidden; border-radius: 0 0 12px 12px; }
  .t-dash::after { display: none; }
  .d-fig { inset: 0 0 auto; aspect-ratio: 460 / 601; }
  .t-bubble { flex: 1; padding: 11px 13px; }
  .t-bubble::after { left: auto; right: -12px; bottom: 30px; border: 12px solid transparent; border-left-color: #fff; border-right: 0; }
  .t-say { font-size: 15px; min-height: 6.2em; }
  .t-intro { padding: 12px 16px; }
  .t-intro-card h1, .t-intro-card h2 { font-size: 19px; margin-bottom: 6px; }
  .t-intro-card p { font-size: 12.5px; line-height: 1.45; margin-bottom: 10px; }
  .t-jump { display: none; }
  .t-start { font-size: 15px; padding: 10px 16px; }
  .t-outro-btns { gap: 8px; }
  .t-outro-btns .t-ghost { font-size: 12.5px; padding: 8px 10px; }
  .t-bar { flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px 12px; position: sticky; bottom: 0; background: rgba(8, 18, 30, .94); backdrop-filter: blur(6px); }
  .t-progress { order: -1; flex: 1 0 100%; height: 52px; }
  .t-play { width: 44px; height: 44px; }
  .t-opts { margin-left: auto; gap: 6px; }
  .t-count { display: none; }
  .t-pill { font-size: 12px; padding: 6px 10px; min-height: 40px; min-width: 44px; }
  .t-btn { width: 44px; height: 44px; }
  .t-brand { min-height: 44px; min-width: 44px; }
  .t-wow { font-size: 11.5px; padding: 4px 9px 4px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .t-cam, .t-ring, .t-cursor, .d-pose { transition-duration: .01s !important; }
  .d-fig, .d-fig.pop, .d-fig.hop, .d-fig.sway { animation: none !important; }
  .t-wow.on { animation: none; opacity: 1; transform: translate(-6%, -120%) rotate(-3deg); }
  .t-phone { animation: none; }
}
