/* Business Experiences: "One link. One experience. Everything." (.bxl) and the assistant
   at work (.bxa). bx-sections.js steps them while they're on screen. */

/* ── The peel: "Instead of 'We have a new website.'" on the paper, the new line under it.
   Violet at about 8% for this page, as the home peel is Rufen orange at 10%. ── */
.bx-peel { max-width: 640px; margin: 0 auto 40px; }
.bx-peel .bd-peel { padding: 34px 28px; --mkt-accent: var(--accent-violet); }
.bx-peel-under .bx-oneline { margin: 0; }
.bx-peel .bd-peel-label small { color: #5b4a86; }
.bx-peel .bd-peel-paper {
  background-color: #f3eefe;
  background-image:
    linear-gradient(135deg, rgba(60, 30, 120, 0.2) var(--fold, 0px), rgba(60, 30, 120, 0.06) calc(var(--fold, 0px) + 18px), rgba(60, 30, 120, 0) calc(var(--fold, 0px) + 70px)),
    radial-gradient(rgba(76, 29, 149, 0.04) 1px, transparent 1.2px),
    linear-gradient(180deg, #f6f2ff, #efe8fd);
}
.bx-peel .bd-peel-back { background-image: linear-gradient(135deg, #f7f3ff 0px, #efe8fd calc(var(--fold, 0px) - 60px), #ddd2f6 calc(var(--fold, 0px) - 8px), #cfc0f0 var(--fold, 0px)); }

/* ── One link: five files become one link, it goes out, it stays current ───────────── */
.bxl { max-width: 900px; margin: 0 auto; }
.bxl-stage {
  position: relative; height: 300px;
  border-radius: 20px; background: #fff;
  border: 1px solid rgba(124, 58, 237, 0.12);
  box-shadow: 0 24px 60px -32px rgba(76, 29, 149, 0.25);
  overflow: hidden;
}
.bxl-paths { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bxl-paths path {
  fill: none; stroke: #a78bfa; stroke-width: 1.5; vector-effect: non-scaling-stroke;
  stroke-dasharray: 800; stroke-dashoffset: 800;   /* screen px: the stroke does not scale with the stage */
  transition: stroke-dashoffset 0.9s cubic-bezier(0.6, 0, 0.15, 1);
}
.bxl-paths path:nth-child(2) { transition-delay: 0.15s; }
.bxl-paths path:nth-child(3) { transition-delay: 0.3s; }

/* the files: scattered, then drawn into the link */
.bxl-doc {
  position: absolute; left: var(--x); top: var(--y);
  width: 54px; height: 66px; margin-top: -33px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 9px;
  border-radius: 6px; background: #fff; border: 1px solid #e2e8f0;
  box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.25);
  font: 600 0.62rem/1 var(--font-mono); color: #64748b;
  transform: rotate(var(--r));
  transition: left 0.9s cubic-bezier(0.6, 0, 0.15, 1), top 0.9s cubic-bezier(0.6, 0, 0.15, 1),
              transform 0.9s cubic-bezier(0.6, 0, 0.15, 1), opacity 0.5s ease 0.4s;
}
.bxl-doc::before { content: ""; position: absolute; left: 9px; right: 9px; top: 11px; height: 3px; border-radius: 2px; background: #e2e8f0; box-shadow: 0 7px 0 #edf1f5, 0 14px 0 #edf1f5; }

/* the link */
.bxl-link {
  position: absolute; left: 32%; top: 50%; transform: translate(-50%, -50%) scale(0.6);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 12px 18px; border-radius: 12px;
  background: var(--accent-violet); color: #fff; font: 600 0.9rem/1 var(--font-display);
  box-shadow: 0 14px 30px -12px rgba(124, 58, 237, 0.6);
  opacity: 0; transition: opacity 0.5s ease 0.5s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}
.bxl-link svg { width: 17px; height: 17px; }
.bxl-ring { position: absolute; inset: -1px; border-radius: 12px; pointer-events: none; }

/* the people it goes to */
.bxl-to {
  position: absolute; left: 72%; top: var(--y); transform: translateY(-50%);
  display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 10px; row-gap: 3px;
  padding: 10px 14px; border-radius: 10px; background: #fff; border: 1px solid #e2e8f0;
  opacity: 0.35; transition: opacity 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}
.bxl-to b { font: 600 0.86rem/1 var(--font-display); color: var(--text-primary); }
.bxl-to em { font: 500 0.6rem/1 var(--font-mono); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-violet); opacity: 0; transition: opacity 0.4s ease; }
.bxl-to small { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font: 400 0.68rem/1 var(--font-body); color: #16a34a; max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease; }
.bxl-to small::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }

/* phase 1: the files go into the link */
.bxl[data-phase="1"] .bxl-doc, .bxl[data-phase="2"] .bxl-doc, .bxl[data-phase="3"] .bxl-doc {
  left: calc(32% - 27px); top: 50%; transform: rotate(0) scale(0.5); opacity: 0;
}
.bxl[data-phase="1"] .bxl-link, .bxl[data-phase="2"] .bxl-link, .bxl[data-phase="3"] .bxl-link { opacity: 1; transform: translate(-50%, -50%) scale(1); }
/* phase 2: it goes out */
.bxl[data-phase="2"] .bxl-paths path, .bxl[data-phase="3"] .bxl-paths path { stroke-dashoffset: 0; }
.bxl[data-phase="2"] .bxl-to, .bxl[data-phase="3"] .bxl-to { opacity: 1; border-color: rgba(124, 58, 237, 0.3); box-shadow: 0 10px 24px -14px rgba(124, 58, 237, 0.45); transition-delay: 0.7s; }
.bxl[data-phase="2"] .bxl-to em, .bxl[data-phase="3"] .bxl-to em { opacity: 1; transition-delay: 1s; }
.bxl[data-phase="2"] .bxl-to:nth-of-type(2), .bxl[data-phase="2"] .bxl-to:nth-of-type(2) em { transition-delay: 0.85s; }
/* phase 3: it stays current */
.bxl[data-phase="3"] .bxl-ring { animation: bxlRing 1.6s ease-out infinite; }
.bxl[data-phase="3"] .bxl-to small { max-height: 16px; opacity: 1; margin-top: 4px; }
.bxl[data-phase="3"] .bxl-to:nth-of-type(2) small { transition-delay: 0.3s; }
.bxl[data-phase="3"] .bxl-to:nth-of-type(3) small { transition-delay: 0.6s; }
@keyframes bxlRing { 0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.45); } 100% { box-shadow: 0 0 0 18px rgba(124, 58, 237, 0); } }

/* the three steps under it, lit in turn */
.bxl-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bxl-steps li { position: relative; padding-top: 14px; text-align: center; }
.bxl-steps li::before { content: ""; position: absolute; left: 20%; right: 20%; top: 0; height: 3px; border-radius: 2px; background: rgba(124, 58, 237, 0.14); transition: background 0.4s ease; }
.bxl-steps b { display: block; font: 600 1rem/1.3 var(--font-display); color: var(--text-muted); transition: color 0.4s ease; }
.bxl-steps span { display: block; margin-top: 4px; font-size: 0.86rem; line-height: 1.5; color: var(--text-secondary); }
.bxl[data-phase="0"] .bxl-steps li[data-step="1"]::before,
.bxl[data-phase="1"] .bxl-steps li[data-step="1"]::before,
.bxl[data-phase="2"] .bxl-steps li[data-step="2"]::before,
.bxl[data-phase="3"] .bxl-steps li[data-step="3"]::before { background: var(--accent-violet); }
.bxl[data-phase="0"] .bxl-steps li[data-step="1"] b,
.bxl[data-phase="1"] .bxl-steps li[data-step="1"] b,
.bxl[data-phase="2"] .bxl-steps li[data-step="2"] b,
.bxl[data-phase="3"] .bxl-steps li[data-step="3"] b { color: var(--text-primary); }

@media (max-width: 768px) {
  .bxl-stage { height: 260px; }
  .bxl-doc { width: 40px; height: 50px; margin-top: -25px; font-size: 0.54rem; }
  .bxl-link { left: 30%; padding: 10px 12px; font-size: 0.74rem; }
  .bxl-to { left: auto; right: 10px; padding: 8px 10px; }
  .bxl-to small::before { display: none; }
  .bxl-to b { font-size: 0.74rem; }
  .bxl-to small { font-size: 0.6rem; }
  .bxl-steps { grid-template-columns: 1fr; gap: 12px; }
}

/* ── The assistant at work: "Ask Horizon" docked in the Operations Centre ────────── */
.bxa { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: center; max-width: 1040px; margin: 0 auto; }
.bxa-beats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bxa-beats button {
  position: relative; width: 100%; text-align: left; cursor: pointer;
  padding: 14px 16px 14px 18px; border: 0; border-radius: 12px; background: transparent;
  font: inherit; color: inherit; transition: background 0.3s ease;
}
.bxa-beats button::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: rgba(124, 58, 237, 0.14); }
.bxa-beats button::after { content: ""; position: absolute; left: 0; top: 14px; width: 3px; height: 0; border-radius: 2px; background: var(--accent-violet); }
.bxa-beats button[aria-selected="true"] { background: rgba(124, 58, 237, 0.05); }
.bxa-beats button[aria-selected="true"]::after { animation: bxaBeat var(--beat, 9s) linear forwards; }
.bxa.is-touched .bxa-beats button[aria-selected="true"]::after { animation: none; height: calc(100% - 28px); }
@keyframes bxaBeat { to { height: calc(100% - 28px); } }
.bxa-beats b { display: block; font: 600 0.98rem/1.3 var(--font-display); color: var(--text-muted); transition: color 0.3s ease; }
.bxa-beats span { display: block; margin-top: 3px; font-size: 0.84rem; line-height: 1.45; color: var(--text-secondary); }
.bxa-beats button[aria-selected="true"] b { color: var(--text-primary); }
.bxa-beats button:focus-visible { outline: 2px solid var(--accent-violet); outline-offset: 2px; }

.bxa-room {
  --ink: #0d0c0b; --ink-2: #151311; --ink-3: #1f1c19; --bone: #ece7dd; --brass: #c8965a;
  --hair: rgba(236, 231, 221, 0.1);
  position: relative; height: 460px; border-radius: 18px; overflow: hidden; background: var(--ink);
  box-shadow: 0 30px 70px -34px rgba(15, 23, 42, 0.55);
}
.bxa-room > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.55) saturate(0.85); transform: scale(1.04); }
.bxa-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(390px, 100%);
  display: flex; flex-direction: column;
  background: var(--ink-2); border-left: 1px solid var(--hair); color: var(--bone);
  box-shadow: -30px 0 70px rgba(0, 0, 0, 0.45);
}
.bxa-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--hair); }
.bxa-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brass); animation: bxaBlip 2s infinite; }
.bxa-head b { flex: 1; font: 600 0.86rem/1 var(--font-display); }
.bxa-time { font: 500 0.66rem/1 var(--font-mono); letter-spacing: 0.06em; color: rgba(236, 231, 221, 0.6); transition: color 0.4s ease; }
.bxa-time.is-late { color: var(--brass); }
@keyframes bxaBlip { 50% { opacity: 0.35; } }
.bxa-log { flex: 1; min-height: 0; overflow: hidden; padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.bxa-msg { max-width: 88%; padding: 10px 13px; border-radius: 11px; font: 400 0.84rem/1.5 var(--font-body); animation: bxaIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.bxa-msg.you { align-self: flex-end; background: var(--brass); color: var(--ink); border-bottom-right-radius: 2px; font-weight: 500; }
.bxa-msg.them { align-self: flex-start; background: var(--ink-3); color: var(--bone); border-bottom-left-radius: 2px; }
.bxa-msg .src { display: block; margin-top: 6px; font: 500 0.62rem/1.3 var(--font-mono); color: var(--brass); opacity: 0.9; }
.bxa-msg.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.bxa-msg.typing i { width: 5px; height: 5px; border-radius: 50%; background: rgba(236, 231, 221, 0.55); animation: bxaDot 1.3s infinite; }
.bxa-msg.typing i:nth-child(2) { animation-delay: 0.18s; }
.bxa-msg.typing i:nth-child(3) { animation-delay: 0.36s; }
.bxa-booked {
  align-self: stretch; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 10px;
  border: 1px solid rgba(200, 150, 90, 0.45); background: rgba(200, 150, 90, 0.1);
  font: 500 0.78rem/1.4 var(--font-display); color: var(--bone); animation: bxaIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bxa-booked svg { width: 16px; height: 16px; color: var(--brass); flex: 0 0 auto; }
.bxa-booked small { display: block; font: 400 0.68rem/1.3 var(--font-body); color: rgba(236, 231, 221, 0.65); }
@keyframes bxaIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes bxaDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.bxa-bar { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--hair); }
.bxa-bar span { flex: 1; padding: 10px 12px; border-radius: 3px; background: var(--ink-3); border: 1px solid var(--hair); font: 400 0.8rem/1.2 var(--font-body); color: rgba(236, 231, 221, 0.45); }
.bxa-bar i { display: flex; align-items: center; padding: 0 14px; border-radius: 3px; background: var(--brass); color: var(--ink); font: 500 0.62rem/1 var(--font-mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; }

@media (max-width: 900px) {
  .bxa { grid-template-columns: 1fr; gap: 16px; }
  .bxa-beats { flex-direction: row; gap: 6px; }
  .bxa-beats li { flex: 1; min-width: 0; }
  .bxa-beats button { padding: 10px 8px 12px; text-align: center; }
  .bxa-beats button::before, .bxa-beats button::after { left: 8px; right: 8px; top: auto; bottom: 0; width: auto; height: 3px; }
  .bxa-beats button::after { width: 0; right: auto; }
  .bxa-beats button[aria-selected="true"]::after { animation-name: bxaBeatX; }
  .bxa.is-touched .bxa-beats button[aria-selected="true"]::after { width: calc(100% - 16px); height: 3px; }
  @keyframes bxaBeatX { to { width: calc(100% - 16px); } }
  .bxa-beats b { font-size: 0.78rem; }
  .bxa-beats span { display: none; }
  .bxa-room { height: 440px; }
  .bxa-panel { width: 100%; border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bxl *, .bxa * { transition: none !important; animation: none !important; }
}

/* ===== Dark mode ===== */
:root[data-theme="dark"] :is(.bxl,.bxa){--accent-violet:#b09bee}
:root[data-theme="dark"] .bxl-stage{background-color:var(--stage-bot);background-image:linear-gradient(180deg,var(--stage-top),var(--stage-bot));border-color:var(--stage-edge);box-shadow:inset 0 1px 0 var(--stage-edge-hi)}
:root[data-theme="dark"] .bxl-paths path{stroke:var(--violet-text)}
:root[data-theme="dark"] .bxl-doc{background:var(--stage-plate);border-color:var(--dk-edge);color:var(--text-secondary);box-shadow:none}
:root[data-theme="dark"] .bxl-doc::before{background:rgba(190,210,255,.30);box-shadow:0 7px 0 rgba(190,210,255,.18),0 14px 0 rgba(190,210,255,.18)}
:root[data-theme="dark"] .bxl-link{background:#6a3fd2;color:#fff;box-shadow:inset 0 0 0 1px rgba(176,155,238,.55)}
:root[data-theme="dark"] .bxl-to{background:var(--stage-plate);border-color:var(--dk-edge);box-shadow:none}
:root[data-theme="dark"] .bxl-to em{color:var(--violet-text)}
:root[data-theme="dark"] .bxl-to small{color:var(--green-text)}
:root[data-theme="dark"] .bxl-to small::before{background:var(--green-text)}
:root[data-theme="dark"] :is(.bxl[data-phase="2"],.bxl[data-phase="3"]) .bxl-to{background:var(--stage-plate-hi);border-color:rgba(176,155,238,.55);box-shadow:none}
@keyframes bxlRingDk{0%{box-shadow:0 0 0 0 rgba(176,155,238,.45)}100%{box-shadow:0 0 0 18px rgba(176,155,238,0)}}
:root[data-theme="dark"] .bxl[data-phase="3"] .bxl-ring{animation-name:bxlRingDk}
:root[data-theme="dark"] .bxl-steps li::before{background:rgba(176,155,238,.20)}
/* (the four phase rules that light the step bar read var(--accent-violet), now the tint) */
:root[data-theme="dark"] .bxa-beats button::before{background:rgba(176,155,238,.22)}
:root[data-theme="dark"] .bxa-beats button[aria-selected="true"]{background:rgba(176,155,238,.10)}
:root[data-theme="dark"] .bxa-room .bxa-panel{box-shadow:none}
:root[data-theme="dark"] .bxa-room > img:not([src$=".svg"]):not(.logo-image):not([data-keep]){filter:brightness(.55) saturate(.85)}   /* wins over the global image dim, keeps the room as dark as light mode's */
:root[data-theme="dark"] :is(.bxa-time,.bxa-bar span,.bxa-booked small){color:var(--text-secondary)}
:root[data-theme="dark"] .bxa-msg.typing i{background:var(--text-secondary)}
:root[data-theme="dark"] .bxa-booked{background:rgba(212,166,114,.12);border-color:rgba(212,166,114,.45)}

/* ===================== Business Experiences on phones (Mars, 26 Nov): what worked on the home page =====================
   body.bx-page only. Desktop unchanged.
   1. One background: no navy bands, the grid runs behind every section.
   2. Every section holds at least one screen, content centred, the same 48px spacing. */
@media (max-width: 767px) {
  body.bx-page #more-than-a-website, body.bx-page #why-showcase, body.bx-page #faq {
    background: transparent !important; box-shadow: none !important; border-top: 0 !important; border-bottom: 0 !important;
  }
  body.bx-page main > section {
    min-height: calc(100vh - 96px); min-height: calc(100svh - 96px);
    display: flex; flex-direction: column; justify-content: center;
    padding-top: 48px !important; padding-bottom: 48px !important;
  }
  body.bx-page main > section > .container { width: 100%; }
  body.bx-page main > section .section-header { margin-bottom: 24px; }
}
