/* ============================================================
   Bubl — neutral skin
   Brings the Bubl case in line with the rest of the portfolio:
   white / black / greys from the site tokens, Google Sans, no foam,
   no navy bands. Bubl's own colours stay only inside the product
   (screens, brand marks, campaign pieces).
   Loaded after bubl-case.css; remove this file to get the branded
   version back.
   ============================================================ */

/* ---------- palette → site tokens (light + dark) ---------- */
body[data-theme] .bs-case {
  --bs-navy: var(--fg);
  --bs-deep: var(--fg);
  --bs-lime: var(--bg-input);
  --bs-teal: var(--fg-2);
  --bs-teal-ink: var(--fg);
  --bs-mint: var(--bg-elev);
  --bs-ink: var(--fg);
  --bs-lav: var(--fg-2);
  --bs-display: var(--font);
  --bs-paper: transparent;
  --bs-card: var(--bg);
  --bs-text: var(--fg);
  --bs-muted: var(--fg-2);
  --bs-line: var(--border-strong);
  --bs-line-soft: var(--border);
  --bs-tint: var(--bg-elev);
  background: transparent;
}

/* headings: same weight/rhythm as the other cases */
:where(.bs-case) :where(h1, h2, h3, h4, h5) { font-weight: 700; letter-spacing: -0.03em; }

/* ---------- hero, summary, chapter heads: no bands, no foam ---------- */
.bs-case .bs-hero,
.bs-case .bs-summary,
.bs-case .bs-cover { background: transparent; color: var(--fg); }
.bs-case .bs-hero::after,
.bs-case .bs-cover::before,
.bs-case .bs-body::before,
.bs-case .bs-body::after,
.bs-case .bs-hero-static,
.bs-case .bs-out,
.bs-case .bs-read-sign { display: none; }

.bs-case[data-mode="read"] .bs-hero { padding: calc(var(--bs-head) + 8px) 0 40px; }
.bs-case .bs-hero .bs-title { color: var(--fg); font-weight: 700; letter-spacing: -0.035em; }
.bs-case .bs-summary { padding: 24px 0 56px; border-bottom: 1px solid var(--border); }

/* chapter heads read like ConvoyGo's: number, label, big black word */
.bs-case[data-mode="read"] .bs-cover { padding: 88px 0 8px; border-top: 1px solid var(--border); }
.bs-case .bs-cover-in { grid-template-columns: 1fr; }
.bs-case .bs-punch { display: none; }
.bs-case .bs-cover-word { color: var(--fg); font-weight: 700; letter-spacing: -0.04em; }
.bs-case .bs-cover-title { color: var(--fg-2); font-weight: 500; }
.bs-case .bs-cover-meta .bs-num { background: var(--fg); color: var(--bg); font-weight: 700; }
.bs-case .bs-cover-ticks span { border-color: var(--border-strong); color: var(--fg); }
.bs-case .bs-body { padding-top: 24px; }

/* eyebrow tick: black instead of lime */
.bs-case .bs-eyebrow::before { background: var(--fg); }
.bs-case .bs-eyebrow--light { color: var(--fg-2); }

/* ---------- dark surfaces: text follows the surface in both themes ---------- */
.bs-case .bs-constraints,
.bs-case .bs-reflect,
.bs-case .bs-reflect li,
.bs-case .bs-flow li::before,
.bs-case .bs-modes button[aria-pressed="true"],
.bs-case .bs-store:hover,
.bs-case .bs-strip-nav button:hover:not(:disabled),
.bs-case .bs-grid-btn[aria-pressed="true"],
.bs-case .bs-sheet li button[aria-current="true"],
.bs-case .bs-persona .bs-avatar { color: var(--bg); }
/* the summary/TL;DR used lime labels on navy; now black labels on white */
.bs-case .bs-tldr b { color: var(--fg); }
.bs-case .bs-tldr p,
.bs-case .bs-summary p { color: var(--fg-2); }
/* callouts: quiet grey panels instead of heavy navy blocks */
.bs-case .bs-constraints,
.bs-case .bs-reflect { background: var(--bg-elev); color: var(--fg); border: 1px solid var(--border); }
.bs-case .bs-reflect li { background: transparent; color: var(--fg); }
.bs-case .bs-constraints li::before,
.bs-case .bs-reflect b { color: var(--fg-2); }

/* ---------- case map rail: same black pill as the site nav ---------- */
.bs-case .bs-rail { background: var(--pill-bg); color: var(--pill-fg); }
.bs-case .bs-rail-mode { display: none; }           /* only one reading mode now */
.bs-case .bs-rail-car,
.bs-case .bs-rail-label i { color: var(--pill-fg); }
.bs-case .bs-rail-label { color: var(--pill-fg); }
.bs-case .bs-rail-label span { color: rgba(255, 255, 255, 0.6); }
.bs-case .bs-rail-ticks button[aria-current="true"]::before { background: var(--pill-fg); }
.bs-case .bs-sheet li button[aria-current="true"] small { color: var(--bg-input); }

/* focus ring: plain, like the rest of the site */
.bs-case *:focus-visible,
.bs-hero *:focus-visible, .bs-cover *:focus-visible, .bs-rail *:focus-visible, .bs-summary *:focus-visible {
  outline: 2px solid var(--fg); outline-offset: 3px; box-shadow: none;
}
.bs-case .bs-rail *:focus-visible { outline-color: var(--pill-fg); }

/* ---------- site header: no navy sign at the top of the case ---------- */
body[data-bubl-case].bubl-top .site-header { background: var(--bg); }
body[data-bubl-case].bubl-top .wordmark-img { filter: none; }
body[data-theme="dark"][data-bubl-case].bubl-top .wordmark-img { filter: invert(1); }
body[data-bubl-case].bubl-top .theme-toggle { color: var(--fg); background: var(--bg-elev); border-color: var(--border-strong); }
body[data-bubl-case].bubl-top .menu-btn { color: var(--pill-fg); background: var(--pill-bg); border-color: transparent; }

/* ---------- hero: bigger title, the "wash ticket" becomes a plain project card ---------- */
.bs-case[data-mode="read"] .bs-read-sign { display: none; }
.bs-case .bs-title { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.02; }
.bs-case .bs-ticket { background: var(--bg); color: var(--fg); border: 1px solid var(--border-strong); box-shadow: none; }
.bs-case .bs-ticket::before,
.bs-case .bs-ticket::after,
.bs-case .bs-ticket-bar { display: none; }
.bs-case .bs-ticket-head,
.bs-case .bs-ticket-foot { border-color: var(--border); border-style: solid; border-width: 0; }
.bs-case .bs-ticket-head { border-bottom-width: 1px; }
.bs-case .bs-ticket-foot { border-top-width: 1px; }
.bs-case .bs-ticket-head b { color: var(--fg); }
.bs-case .bs-ticket-head span,
.bs-case .bs-ticket-foot,
.bs-case .bs-ticket dt,
.bs-case .bs-store-note { color: var(--fg-2); }
.bs-case .bs-ticket dt,
.bs-case .bs-ticket dd { border-color: var(--border); }
.bs-case .bs-ticket dd { color: var(--fg); }
.bs-case .bs-ticket dd .bs-stamp { transform: none; }
.bs-case .bs-store { border-color: var(--border-strong); color: var(--fg); }
.bs-case .bs-brand-icons img { box-shadow: 0 10px 20px -14px rgba(0, 0, 0, 0.35); }

/* phone frames: neutral bezel */
.bs-case .bx-phone { border-color: #111; box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.45); }
.bs-case .bx-phone--dark { border-color: #111; }

/* =====================================================================
   Motion pieces — booking walk + app sync
   ===================================================================== */
/* ---------- booking walk ---------- */
.bs-walk {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 32px 64px; align-items: center;
  margin: 36px 0 44px; padding: 32px; border-radius: 24px;
  background: var(--bg-elev); border: 1px solid var(--border);
}
.bs-walk-hint { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 14px; }
.bs-walk-steps { display: grid; gap: 4px; }
.bs-walk-steps button {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start;
  width: 100%; padding: 14px 14px; border: 0; border-radius: 14px;
  background: transparent; color: var(--fg-2); text-align: left; font: inherit; cursor: pointer;
  transition: background 240ms cubic-bezier(0, 0, .38, .9), color 240ms cubic-bezier(0, 0, .38, .9);
}
.bs-walk-steps button:hover { background: var(--bg-input); }
.bs-walk-n { font-size: 13px; font-weight: 600; line-height: 22px; font-variant-numeric: tabular-nums; }
.bs-walk-txt b { display: block; font-size: 16px; font-weight: 600; line-height: 22px; }
.bs-walk-txt small { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 400ms cubic-bezier(0, 0, .38, .9), opacity 240ms cubic-bezier(0, 0, .38, .9); }
.bs-walk-steps li.is-done button { color: var(--fg); }
.bs-walk-steps li.is-on button { background: var(--bg); color: var(--fg); box-shadow: 0 1px 0 var(--border-strong), 0 10px 24px -18px rgba(0, 0, 0, 0.35); }
.bs-walk-steps li.is-on .bs-walk-n { color: var(--fg); }
.bs-walk-steps li.is-on small { max-height: 5em; opacity: 1; color: var(--fg-2); }
.bs-walk-bar { height: 2px; margin-top: 18px; border-radius: 2px; background: var(--border-strong); overflow: hidden; }
.bs-walk-bar i { display: block; height: 100%; background: var(--fg); transform-origin: left center; transition: transform 400ms cubic-bezier(0, 0, .38, .9); }

.bs-walk-stage { display: grid; place-items: center; }
.bs-walk-phone { position: relative; width: 100%; max-width: 280px; }
.bs-walk-phone img {
  position: absolute; inset: 0; opacity: 0; transform: translateY(14px) scale(0.985);
  transition: opacity 400ms cubic-bezier(0, 0, .38, .9), transform 400ms cubic-bezier(0, 0, .38, .9);
}
.bs-walk-phone img.is-past { transform: translateY(-10px) scale(0.985); }
.bs-walk-phone img.is-on { opacity: 1; transform: none; }
/* pinned (desktop + motion): give the block the viewport's height */
.bs-walk.is-pinned { min-height: min(760px, calc(100vh - 120px)); }

@media (max-width: 899px) {
  .bs-walk { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .bs-walk-steps button { padding: 10px 12px; }
  .bs-walk-phone { max-width: 200px; }
}

/* ---------- app sync ---------- */
.bs-sync {
  margin: 28px 0 8px; padding: 36px 32px 28px; border-radius: 24px;
  background: var(--bg-elev); border: 1px solid var(--border);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, 260px) minmax(0, 1fr);
  align-items: center; gap: 12px 24px;
}
.bs-sync-side { display: grid; justify-items: center; gap: 12px; text-align: center; }
.bs-sync-label { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); }
.bs-sync-side p { font-size: 15px; font-weight: 600; color: var(--fg); }
.bs-sync-phone { position: relative; width: 100%; max-width: 230px; }
.bs-sync-tap {
  position: absolute; left: 64%; top: 93.6%; width: 46%; height: 6%;
  transform: translate(-50%, -50%); border-radius: 999px;
  box-shadow: 0 0 0 3px var(--fg); opacity: 0; pointer-events: none;
}
.bs-sync-badge {
  position: absolute; left: 50%; top: 11%; translate: -50% 0;
  padding: 9px 14px; border-radius: 999px; white-space: nowrap;
  background: #000; color: #fff; font-size: 12.5px; font-weight: 600;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.55);
}
.bs-sync-track { position: relative; height: 12px; }
.bs-sync-line { position: absolute; left: 0; right: 0; top: 50%; height: 0; border-top: 2px dashed var(--fg-3); }
.bs-sync-line::after { /* static arrow head: the direction reads even without motion */
  content: ""; position: absolute; right: -2px; top: -7px; width: 10px; height: 10px;
  border-top: 2px solid var(--fg-2); border-right: 2px solid var(--fg-2); transform: rotate(45deg);
}
.bs-sync-dot { position: absolute; left: 0; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--fg); opacity: 0; }
.bs-sync figcaption { grid-column: 1 / -1; margin-top: 12px; text-align: center; font-size: 14px; color: var(--fg-2); }

@media (max-width: 767px) {
  .bs-sync { grid-template-columns: 1fr; padding: 24px 20px; justify-items: center; }
  .bs-sync-phone { max-width: 200px; }
  .bs-sync-track { width: 12px; height: 72px; }
  .bs-sync-line { left: 50%; right: auto; top: 0; bottom: 0; height: auto; width: 0; border-top: 0; border-left: 2px dashed var(--fg-3); }
  .bs-sync-line::after { right: auto; left: -7px; top: auto; bottom: -2px; transform: rotate(135deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bs-walk-phone img, .bs-walk-bar i, .bs-walk-txt small, .bs-walk-steps button { transition: none; }
}

/* ---------- campaign ruler: neutral colours + draw-on-scroll ---------- */
.bs-case .bs-ruler .bs-dot { background: var(--fg); box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--fg); }
.bs-case .bs-ruler li.bs-side-B .bs-dot { background: var(--bg); box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--fg); }
.bs-case .bs-ruler .bs-week i { background: var(--fg); color: var(--bg); }
.bs-case .bs-ruler li.bs-side-B .bs-week i { background: var(--bg-input); color: var(--fg); }
.bs-case .bs-ruler-key i { background: var(--fg); }
.bs-case .bs-ruler-key span + span i { background: var(--bg); box-shadow: inset 0 0 0 2px var(--fg); }
@media (min-width: 901px) {
  /* the drawn part of the line: scaleX follows --ruler-p, set by scroll */
  .bs-ruler.is-anim ol::after { content: ""; position: absolute; left: 0; right: 0; top: 104px; height: 2px; background: var(--fg); transform-origin: left center; transform: scaleX(var(--ruler-p, 0)); pointer-events: none; }
  .bs-ruler li { z-index: 1; }
  .bs-ruler.is-anim .bs-wk { opacity: 0.25; transform: translateY(6px); transition: opacity 400ms cubic-bezier(0, 0, .38, .9), transform 400ms cubic-bezier(0, 0, .38, .9); }
  .bs-ruler.is-anim .bs-dot { transform: scale(0.6); opacity: 0.35; transition: transform 300ms cubic-bezier(0, 0, .38, .9), opacity 300ms cubic-bezier(0, 0, .38, .9); }
  .bs-ruler.is-anim li.is-in .bs-wk { opacity: 1; transform: none; }
  .bs-ruler.is-anim li.is-in .bs-dot { transform: none; opacity: 1; }
}

/* ---------- specimen: dark mode wipes in over light ---------- */
.bs-spec-stack { display: grid; }
.bs-spec-layer { grid-area: 1 / 1; min-width: 0; }
.bs-spec-layer--top { clip-path: inset(0 0 0 100% round 28px); transition: clip-path 600ms cubic-bezier(0.4, 0.14, 0.3, 1); }
.bs-spec-stack[data-mode="dark"] .bs-spec-layer--top { clip-path: inset(0 0 0 0 round 28px); }
.bs-spec-stack[data-mode="light"] .bs-spec-layer--top { pointer-events: none; }
.bs-spec-stack[data-mode="dark"] .bs-spec-layer:not(.bs-spec-layer--top) { pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .bs-spec-layer--top { transition: none; }
  .bs-ruler.is-anim .bs-wk, .bs-ruler.is-anim .bs-dot { transition: none; }
}
@media (max-width: 900px) {
  .bs-case .bs-ruler .bs-dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg); }
  .bs-case .bs-ruler li.bs-side-B .bs-dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg); }
  .bs-case .bs-ruler li { padding-left: 26px; }
}
