/* ==========================================================================
   dock.css — the quick-actions dock ("Perch Rail"), every public page.
   Behaviour: assets/js/dock.js. Owner pick 2026-10-21.

   One rail on the right edge, vertically centred, Ollie perched on top:
   Start your free trial · Experience Intellicamp · Book a demo · Appearance ·
   Back to top. 1200px and wider: raised icon buttons, labels on hover/focus.
   Narrower: folded into an "Open" handle that slides out a labelled card.
   Replaces the separate floating launchers (Book-a-demo circle, Experience
   pill, Appearance tab, back-to-top button) and the roaming owl (owl.css).
   ========================================================================== */

.dock { position: fixed; z-index: 950; right: 0; top: 50%; translate: 0 -50%; display: flex; flex-direction: column; align-items: flex-end;
        font-family: var(--font-body, system-ui); transition: transform .45s var(--ease, ease), opacity .3s ease, visibility 0s; }
body.nav-open .dock { opacity: 0; visibility: hidden; pointer-events: none; }

/* Ollie's perch: on top of the rail, feet on its edge (his look is at the end of this file) */
.dock__perch { position: relative; width: 58px; height: 60px; z-index: 2; pointer-events: none; }
.dock .owlkit { position: absolute; right: 0; bottom: -9px; width: 56px; height: 66px; pointer-events: none; }

/* button reset (the dock's buttons and links share one look) */
.dock__b, .dock__handle { appearance: none; margin: 0; font: inherit; text-decoration: none; cursor: pointer;
                          -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.dock__b:focus-visible, .dock__handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.dock__ico { display: grid; place-items: center; }
.dock__ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
                 transition: transform .3s var(--ease, ease); }
.dock__b--trial .dock__ico svg { stroke-width: 1.7; }

/* ---------- the rail: a tray of raised buttons; the accent edge says "this is a control" ---------- */
.dock__rail { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 58px; padding: 9px 0 9px 2px;
              background: var(--glass-2); border: 1px solid var(--line); border-right: 0; border-radius: 18px 0 0 18px;
              box-shadow: -14px 18px 40px -26px var(--shadow-strong); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.dock__rail::before { content: ""; position: absolute; left: -1px; top: 16px; bottom: 16px; width: 3px; border-radius: 3px; background: var(--accent); opacity: .85; }
.dock__b { position: relative; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 13px;
           color: var(--accent-ink, var(--accent)); background: var(--ink); border: 1px solid var(--line);
           box-shadow: 0 1px 0 rgba(var(--sheen, 255, 255, 255), .35) inset, 0 6px 14px -10px var(--shadow-strong), 0 2px 0 var(--line);
           transition: background .2s ease, transform .2s var(--ease, ease), box-shadow .2s ease, border-color .2s ease, height .35s var(--ease, ease), opacity .25s ease, margin .35s ease; }
.dock__b:hover, .dock__b:focus-visible { transform: translate(-3px, -1px); border-color: rgba(var(--accent-rgb), .7);
           box-shadow: 0 1px 0 rgba(var(--sheen, 255, 255, 255), .35) inset, 0 10px 18px -10px rgba(var(--accent-rgb), .7), 0 3px 0 rgba(var(--accent-rgb), .35); }
.dock__b:hover .dock__ico svg { transform: scale(1.1); }
.dock__b:active { transform: translate(-1px, 1px) scale(.95); box-shadow: 0 0 0 var(--line), 0 2px 6px -4px var(--shadow-strong); }
.dock__b--exp { background: var(--accent); color: var(--on-accent); border-color: transparent;
                box-shadow: 0 10px 22px -12px rgba(var(--accent-rgb), .95), 0 2px 0 rgba(0, 0, 0, .18); }
.dock__b--exp::after { content: ""; position: absolute; inset: -4px; border-radius: 16px; border: 2px solid rgba(var(--accent-rgb), .55);
                       animation: dock-ring 2.8s ease-out infinite; pointer-events: none; }
@keyframes dock-ring { 0% { opacity: .9; transform: scale(.92); } 70%, 100% { opacity: 0; transform: scale(1.22); } }
.dock__sep { width: 26px; height: 1px; background: var(--line); margin: 2px 0; }
/* back to top only once the page has been scrolled */
html:not(.dock-scrolled) .dock__b--top { height: 0; opacity: 0; margin-top: -6px; border-width: 0; visibility: hidden; pointer-events: none; }
/* the one-time hint: each button leans out in turn */
.dock.is-hint .dock__b { animation: dock-lean .7s var(--ease, ease) both; animation-delay: calc(var(--n, 0) * 110ms); }
.dock__b--exp { --n: 1; } .dock__b[data-act="demo"] { --n: 2; } .dock__b[data-act="theme"] { --n: 3; } .dock__b--top { --n: 4; }
@keyframes dock-lean { 40% { transform: translateX(-7px); } }

/* labels: tooltips that slide out to the left on hover / keyboard focus */
.dock__lbl { position: absolute; right: calc(100% + 14px); top: 50%; display: grid; gap: 1px; text-align: left; white-space: nowrap;
             padding: .5rem .75rem; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); color: var(--paper);
             box-shadow: 0 14px 30px -18px var(--shadow-strong); pointer-events: none;
             opacity: 0; transform: translate(10px, -50%); transition: opacity .2s ease, transform .3s var(--ease, ease); }
.dock__lbl b { font-weight: 700; font-size: .84rem; line-height: 1.3; }
.dock__lbl em { font-style: normal; font-size: .72rem; line-height: 1.3; color: var(--muted); }
.dock__lbl::after { content: ""; position: absolute; left: 100%; top: 50%; translate: 0 -50%; border: 6px solid transparent; border-left-color: var(--line); }
.dock__b:hover .dock__lbl, .dock__b:focus-visible .dock__lbl { opacity: 1; transform: translate(0, -50%); }
.dock__handle { display: none; }

@media (min-width: 1200px) and (max-width: 1399px) {
  .dock__rail { width: 50px; } .dock__b { width: 38px; height: 38px; border-radius: 12px; }
  .dock__perch { width: 50px; height: 54px; } .dock .owlkit { width: 50px; height: 59px; }
}

/* ---------- folded: below 1200px a rail would sit on the content, so it folds into an "Open" handle ---------- */
@media (max-width: 1199px) {
  .dock__perch { width: 48px; height: 46px; }
  .dock .owlkit { right: -2px; bottom: -8px; width: 48px; height: 56px; }
  /* the handle: a raised accent button with a chevron pointing where the card comes from */
  .dock__handle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative; z-index: 1;
                  width: 46px; height: 78px; padding: 0 0 0 2px; border: 0; border-radius: 16px 0 0 16px; color: var(--on-accent);
                  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #000));
                  box-shadow: -8px 12px 26px -14px rgba(var(--accent-rgb), .95), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .16);
                  transition: transform .2s var(--ease, ease), box-shadow .2s ease, width .25s var(--ease, ease); }
  .dock__handle:hover, .dock__handle:focus-visible { width: 52px; box-shadow: -10px 14px 30px -12px rgba(var(--accent-rgb), 1), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .16); }
  .dock__handle:active { transform: scale(.95); box-shadow: -4px 6px 14px -10px rgba(var(--accent-rgb), .9), inset 0 2px 4px rgba(0, 0, 0, .2); }
  .dock__chev svg, .dock__x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; display: block; }
  .dock__chev { animation: dock-nudge 2.4s ease-in-out 1.6s 2; }
  @keyframes dock-nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateX(-4px); } }
  .dock__handle:hover .dock__chev { transform: translateX(-3px); transition: transform .2s ease; }
  .dock__htxt { font: 800 .58rem/1 var(--font-body, system-ui); letter-spacing: .1em; text-transform: uppercase; }
  .dock__hdots { display: grid; grid-template-columns: repeat(2, 4px); gap: 3px; opacity: .75; }
  .dock__hdots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
  .dock__x { display: none; }
  .dock.is-open .dock__x { display: block; }
  .dock.is-open .dock__chev, .dock.is-open .dock__hdots { display: none; }

  /* the rail becomes a labelled card that slides out from behind the handle, centred on it */
  .dock__rail { position: absolute; right: 52px; bottom: 39px; width: max-content; min-width: 214px; max-width: calc(100vw - 68px);
                align-items: stretch; padding: 8px; gap: 2px; border: 1px solid var(--line); border-radius: 18px;
                opacity: 0; visibility: hidden; transform: translate(14px, 50%) scale(.96); transform-origin: 100% 50%;
                transition: opacity .22s ease, transform .35s var(--ease, ease), visibility 0s .35s; }
  .dock__rail::before { display: none; }
  .dock.is-open .dock__rail { opacity: 1; visibility: visible; transform: translate(0, 50%); transition-delay: 0s; }
  .dock__b { width: 100%; height: auto; min-height: 48px; display: flex; align-items: center; gap: .7rem; padding: 4px 12px 4px 4px; justify-content: flex-start;
             background: none; border-color: transparent; box-shadow: none; color: var(--paper); }
  .dock__b:hover, .dock__b:focus-visible { transform: none; background: rgba(var(--accent-rgb), .1); border-color: transparent; box-shadow: none; }
  .dock__b:active { transform: scale(.98); box-shadow: none; }
  .dock__b .dock__ico { flex: none; width: 40px; height: 40px; border-radius: 12px; background: rgba(var(--accent-rgb), .1); color: var(--accent-ink, var(--accent)); }
  .dock__b--exp { background: rgba(var(--accent-rgb), .1); color: var(--paper); box-shadow: none; }
  .dock__b--exp .dock__ico { background: var(--accent); color: var(--on-accent); }
  .dock__b--exp::after { display: none; }
  .dock.is-hint .dock__b { animation: none; }
  .dock__sep { width: auto; margin: 3px 8px; }
  .dock__lbl { position: static; opacity: 1; transform: none; padding: 0; background: none; border: 0; box-shadow: none; color: inherit; }
  .dock__lbl::after { display: none; }
  .dock__b:hover .dock__lbl, .dock__b:focus-visible .dock__lbl { transform: none; }
  html:not(.dock-scrolled) .dock__b--top { min-height: 0; padding: 0; }
  .dock.is-open .owl-bubble { opacity: 0; visibility: hidden; }
}
/* short screens: tighter rail / card so every item fits without clipping */
@media (min-width: 1200px) and (max-height: 760px) {
  .dock__rail { gap: 4px; padding: 7px 0 7px 2px; }
  .dock__b { width: 36px; height: 36px; border-radius: 11px; }
  .dock__perch { width: 48px; height: 50px; } .dock .owlkit { width: 48px; height: 57px; }
}
@media (max-width: 1199px) and (max-height: 600px) {
  .dock__rail { padding: 6px; gap: 0; }
  .dock__b { min-height: 40px; padding: 2px 10px 2px 3px; }
  .dock__b .dock__ico { width: 34px; height: 34px; border-radius: 10px; }
  .dock__lbl b { font-size: .8rem; } .dock__lbl em { font-size: .68rem; }
  .dock__sep { margin: 2px 8px; }
}
@media (max-width: 1199px) and (max-height: 440px) {
  .dock__lbl em { display: none; }
  .dock__b { min-height: 36px; } .dock__b .dock__ico { width: 30px; height: 30px; }
  .dock__handle { height: 68px; } .dock__rail { bottom: 34px; }
}
/* phones: out of the way while reading down, and away from the footer's last screen */
@media (max-width: 700px) {
  .dock.is-away { transform: translateX(115%); }
  .dock.is-end:not(.is-open) { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* ==========================================================================
   Ollie, perched on the dock (was owl.css + owl.js, roaming the homepage)
   ========================================================================== */
.dock .owlkit .owl, .dock .owlkit .owl-bubble { pointer-events: auto; }
.owl { display: block; width: 100%; height: 100%; text-decoration: none; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); transform-origin: 50% 100%; }
.owl:hover { transform: translateY(-3px) rotate(-3deg); }
.owl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 14px; }
.owl__svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 14px rgba(85, 70, 194, .28)); }

/* face */
.owl__head { transform-box: view-box; transform-origin: 60px 84px; transition: transform .25s ease-out; }
.owl__pupil { transition: transform .12s ease-out, opacity .15s ease; }
.owl__lid { transform-box: fill-box; transform-origin: top; transform: scaleY(0); transition: transform .18s ease; }
.owlkit.is-blink .owl__lid { animation: ollie-blink .22s ease-in-out; }
.owlkit.is-asleep .owl__lid { transform: scaleY(1); transition-duration: .6s; }
@keyframes ollie-blink { 50% { transform: scaleY(1); } }
.owl__happy, .owl__blush, .owl__glasses, .owl__zzz { opacity: 0; transition: opacity .25s ease; }
.owlkit.is-happy .owl__happy, .owlkit.is-happy .owl__blush { opacity: 1; }
.owlkit.is-happy .owl__pupil { opacity: 0; }
.owlkit.is-night .owl__glasses { opacity: 1; }
.owlkit.is-asleep .owl__zzz { opacity: 1; }
.owlkit.is-asleep .owl__zzz text { animation: ollie-z 2.4s ease-in-out infinite; }
.owlkit.is-asleep .owl__zzz text:nth-child(2) { animation-delay: .4s; }
.owlkit.is-asleep .owl__zzz text:nth-child(3) { animation-delay: .8s; }
@keyframes ollie-z { 0% { opacity: 0; transform: translate(0, 6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -8px); } }
.owl__tassel { transform-box: view-box; transform-origin: 60px 24px; animation: ollie-tassel 2.4s ease-in-out infinite; }
@keyframes ollie-tassel { 50% { transform: rotate(7deg); } }
.owl__prop { opacity: 0; transition: opacity .2s ease; }
.owl__prop > g { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(.3) rotate(-30deg);
                 transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.owl__prop.is-on { opacity: 1; }
.owl__prop.is-on > g { transform: none; }
.owlkit.is-hop .owl { animation: ollie-hop .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes ollie-hop { 40% { transform: translateY(-12px); } }
.owl__wing { transform-box: view-box; }
.owl__wing--l { transform-origin: 28px 78px; } .owl__wing--r { transform-origin: 92px 78px; }
.owlkit.is-wave .owl__wing--r { animation: ollie-wave 1.1s ease-in-out; }
@keyframes ollie-wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-110deg); } 40% { transform: rotate(-70deg); }
                        60% { transform: rotate(-115deg); } 80% { transform: rotate(-75deg); } }
.owl__pupil circle:first-child { transform-box: fill-box; transform-origin: center; transition: transform .2s ease; }
.owlkit.is-excited .owl__pupil circle:first-child { transform: scale(1.25); }
.owlkit.is-yay .owl { animation: ollie-yay .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes ollie-yay { 50% { transform: translateY(-22px) rotate(-8deg) scale(1.08); } }

/* the bubble: opens to the left of Ollie, only on hover / focus / a tap */
.owl-bubble { position: absolute; z-index: 2; right: calc(100% + 4px); top: 2px; display: grid; gap: .3rem; width: max-content;
              max-width: min(270px, calc(100vw - 90px)); padding: .75rem .95rem .8rem; border-radius: 16px; background: #fff; color: #1b1530;
              font: 500 .86rem/1.35 var(--font-body, system-ui); box-shadow: 0 18px 40px -16px rgba(27, 21, 48, .45);
              transform: translate(6px, 0) scale(.6); transform-origin: 100% 18px; opacity: 0; visibility: hidden;
              transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease, visibility 0s .3s; }
.owl-bubble::after { content: ""; position: absolute; left: 100%; top: 18px; border: 8px solid transparent; border-left-color: #fff; }
.owlkit.is-talking .owl-bubble { transform: none; opacity: 1; visibility: visible; transition-delay: .2s, .2s, 0s; }
.owl-bubble b { font-weight: 800; }
.owl-cta { font-weight: 800; color: #5546c2; text-decoration: none; }
.owl-cta:hover, .owl-cta:focus-visible { text-decoration: underline; }

/* moon and stars, late at night */
.owl-stars { position: absolute; inset: -26px auto auto -40px; width: 70px; height: 50px; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.owlkit.is-night .owl-stars { opacity: 1; }
.owl-stars i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fde68a; box-shadow: 0 0 8px #fde68a; animation: ollie-twinkle 2s ease-in-out infinite; }
.owl-stars i:nth-child(1) { left: 10px; top: 30px; }
.owl-stars i:nth-child(2) { left: 34px; top: 8px; animation-delay: .5s; }
.owl-stars i:nth-child(3) { left: 56px; top: 26px; animation-delay: 1s; }
.owl-stars i:nth-child(4) { left: 46px; top: 0; width: 14px; height: 14px; background: none; box-shadow: -4px 3px 0 0 #fde68a; animation: none; }
@keyframes ollie-twinkle { 50% { opacity: .25; transform: scale(.6); } }

/* the attention ripple and the sparkle burst */
.owl-ping { position: absolute; left: 50%; top: 40%; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%;
            border: 2px solid rgba(var(--accent-rgb, 37, 99, 235), .75); opacity: 0; pointer-events: none; }
.owlkit.is-ping .owl-ping { animation: ollie-ping 1.4s ease-out 3; }
@keyframes ollie-ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.owl-spark { position: absolute; left: 50%; top: 32%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; pointer-events: none;
             background: var(--accent, #2563eb); box-shadow: 0 0 10px var(--accent, #2563eb); animation: ollie-spark .75s ease-out forwards; }
.owl-spark:nth-child(3n) { background: #fbbf24; box-shadow: 0 0 10px #fbbf24; }
@keyframes ollie-spark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }

/* motion off (OS setting or the site's own Appearance switch) */
@media (prefers-reduced-motion: reduce) {
  .dock, .dock *, .dock *::after { transition: none !important; animation: none !important; }
}
:root[data-motion="off"] .dock, :root[data-motion="off"] .dock *, :root[data-motion="off"] .dock *::after { transition: none !important; animation: none !important; }
:root[data-motion="reduced"] .dock *, :root[data-motion="reduced"] .dock *::after { animation: none !important; }
