/* The site's frame (Wato 2026-11-20, mockups: W: _review\2026-11-18-floating-footer).
   1. Top strip: a "Contact" pill beside Log a job (Login moves into its menu).
   2. The WATO wordmark gets an "About" hint so it reads as a menu.
   3. Desktop: the strip and the menu bar stay on screen but shrink once you scroll.
   4. A slim bottom bar replaces the two side bars: "We can help you with"
      (service logos) and "Talk to a real person" (Call, Chat).
   5. The peeker: a side peek pops in above the bar; near it, or at a real break
      in reading, it becomes the thinking pose standing on the bar and its words
      show IN the bar. One size for both pictures.
   Behaviour: js/footer-bar.js. */

/* the old right dock and the old peeker step aside */
html.fb-on :is(#floatHelp, #eggPhone, #eggQ) { display: none !important; }

/* The ring (partials/wide-mark.njk, a throwable toy via js/toy.js) is the same
   thing as the bar's "We can help you with" group, shown the other way:
   - Out (html.left-out: 2000px+ wide and the bar not tucked): the ring holds the
     service icons, so the bar drops that group and keeps Call and Chat.
   - Not out (narrower, tucked, or the page keeps helpers tucked): no ring, and
     the bar carries the icons.
   The ring sits above the bar. Its own X tucks the bar (footer-bar.js). */
html.fb-on:not(.left-out) .wide-mark, html.fb-closed .wide-mark { display: none !important; }
html.fb-on.left-out:not(.fb-closed) .fb-group[data-group="help"] { display: none; }
html.fb-on.left-out .wide-mark { bottom: calc(var(--fb-h, 3.3rem) + 1rem); }


/* ---------- 1. Contact in the top strip ----------
   One line, so it is a plain link like Search and Order (Wato 2026-11-21):
   the outlined pills are kept for the two with a web address under them.
   Its small arrow says there is a menu behind it. */
.topbar .tb-btns .tb-contact {
  display: inline-flex; align-items: center; gap: .6rem; padding: .32rem .6rem; cursor: pointer;
  font-family: var(--head); color: var(--navy); background: none; border: 1.5px solid transparent; border-radius: 999px;
  transition: background var(--t-1) var(--e-out), border-color var(--t-1) var(--e-out); }
.topbar .tb-btns .tb-contact > svg:first-child { width: 1.25rem; height: 1.25rem; color: var(--cyan-text); }
.topbar .tb-btns .tb-contact > span { display: flex; flex-direction: column; align-items: flex-start; font-weight: 700; font-size: .84rem; line-height: 1.15; }
.topbar .tb-btns .tb-contact small { display: none; }
.topbar .tb-btns .tb-contact .fb-chev { width: .85rem; height: .85rem; margin-inline-start: -.3rem; color: var(--cyan-text); transition: rotate .2s; }
.topbar .tb-btns .tb-contact:is(:hover, [aria-expanded="true"]) { background: var(--white); }
.topbar .tb-btns .tb-contact:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tb-contact[aria-expanded="true"] .fb-chev { rotate: 180deg; }
/* The Contact pill is wider than the Login link it replaced, and that room
   came out of the rotating line on the left, which then got cut short with
   "...". The buttons sit a little closer so the line has its room back. */
html.fb-on .topbar .container { gap: .75rem; }
html.fb-on .topbar .tb-help { gap: .5rem; }
html.fb-on .topbar .tb-btns { gap: .3rem; }
html.fb-on .topbar .tb-btns a:not(.tb-hl) + .tb-hl { margin-inline-start: .3rem; }
/* phones and tablets: the header's own call / contact / chat icons do this job */
@media (max-width: 980px) { .topbar .tb-btns .tb-contact { display: none; } }

.fb-pop { position: fixed; inset: auto; margin: 0; padding: .45rem; inline-size: 17rem; border: 1px solid rgba(var(--cyan-rgb), .3); border-radius: 1rem;
  background: var(--white); color: var(--ink); box-shadow: 0 18px 44px rgba(var(--ink-rgb), .2); }
/* The Contact menu opens from its button: a short fade for everyone, plus a
   small drop for people who have not asked for less motion. @starting-style
   gives the before-values (a closed popover is display: none, so nothing
   would animate without it); allow-discrete keeps it on screen for the close. */
.fb-pop { opacity: 0; transition: opacity .12s ease-out, display .12s, overlay .12s; transition-behavior: allow-discrete; }
.fb-pop:popover-open { opacity: 1; }
@starting-style { .fb-pop:popover-open { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .fb-pop { translate: 0 -.25rem; transition: opacity .12s ease-out, translate .12s ease-out, display .12s, overlay .12s; transition-behavior: allow-discrete; }
  .fb-pop:popover-open { translate: 0 0; }
  @starting-style { .fb-pop:popover-open { translate: 0 -.25rem; } }
}
/* opened by a tap (js/footer-bar.js): the same look as hover */
.site-header .nav-item.has-mega.fb-touch-open > .mega { opacity: 1; visibility: visible; transform: translateY(0); }
/* Escape shut this menu panel (js/footer-bar.js); it reopens on the next hover */
.site-header .nav-item.has-mega.fb-mega-shut > .mega { opacity: 0; visibility: hidden; }
.fb-pop-title { display: block; padding: .45rem .7rem .3rem; font: 700 .62rem/1 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fb-pop hr { border: 0; border-top: 1px solid rgba(var(--ink-rgb), .1); margin: .35rem .5rem; }
.fb-p { display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; border-radius: .7rem; color: var(--ink); text-decoration: none; }
.fb-p:hover { background: rgba(var(--cyan-rgb), .12); color: var(--ink); }
.fb-p:focus-visible { background: rgba(var(--cyan-rgb), .12); color: var(--ink); outline: 2px solid var(--blue); outline-offset: -2px; }
.fb-p svg { width: 1.2rem; height: 1.2rem; flex: none; color: var(--ic, var(--muted)); }
.fb-p > span { display: flex; flex-direction: column; gap: .15rem; }
.fb-p b { font: 600 .88rem/1.1 var(--head); } .fb-p small { font: 400 .76rem/1.2 var(--font); color: var(--muted); }

/* ---------- 2. "ABOUT" above the WATO wordmark (Wato 2026-11-20) ----------
   A small note on the left, over the W, in the wordmark's own ink (grey at
   this size looked faint). A hairline runs from the word to the end of the
   wordmark so the note belongs to the whole mark instead of floating over a
   third of it; it echoes the rule under CONSULTING in the main logo. */
.site-header .nav-item.logo-tab > .nav-link { position: relative; }
.fb-about { position: absolute; inset-inline: .05rem 0; inset-block-end: calc(100% - .3rem); display: flex; align-items: center; gap: .4rem;
  font: 700 .6rem/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); opacity: .8; white-space: nowrap;
  transition: color var(--t-1) var(--e-out), opacity var(--t-1) var(--e-out); }
.fb-about::after { content: ""; flex: 1; block-size: 1px; background: currentColor; opacity: .45; }
/* just above the phone menu's width the row is tight and the wordmark used to be squeezed, which cut its right edge and let a sliver of CONSULTING show; it keeps its size now */
.site-header .nav-item.logo-tab, .site-header .nav-item.logo-tab .nav-link img { flex: none; }
.site-header .nav-item.logo-tab:is(:hover, :focus-within) .fb-about { color: var(--blue-text); opacity: 1; }
@media (max-width: 980px) { .fb-about { display: none; } }

/* ---------- 3. Strip + menu bar stay, and shrink on scroll (desktop) ---------- */
@media (min-width: 981px) {
  /* Anything scrolled to (a #link, keyboard focus, find-in-page) stops below the
     fixed strip + menu bar: 7rem is their height once scrolled. The site's own
     scroll-margin-top values were sized for the old sticky header and would
     ADD to this (a #link then landed about 80 px low), so here they shrink to
     a small breathing gap. */
  html.fb-framed { scroll-padding-top: 7rem; }
  html.fb-measure .fb-frame * { transition: none !important; }   /* while the script measures the full height */
  html.fb-framed:root:root :is(:target, [id], .svc-group, .pl-group, .pl-more, .pl-rates, .ct-about, .ab-company) { scroll-margin-top: 1.25rem; }
  html.fb-framed body { padding-block-start: var(--fb-frame-full, 8.6rem); }
  .fb-frame { position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 60; }
  .fb-frame .site-header { position: relative; top: auto; }
  .fb-frame :is(.topbar .container, .site-header .container, .brand img, .tb-btns a, .tb-contact) {
    transition: min-height .35s ease, height .35s ease; }
  /* calm: nothing in the strip appears or disappears; on scroll the strip and
     the menu bar both get a little shorter, smoothly, by the same share */
  .fb-frame .topbar :is(.tb-btns a, .tb-contact) { transition: padding-block .35s ease, background var(--t-1) var(--e-out), border-color var(--t-1) var(--e-out); }
  html.fb-compact .topbar .container { min-height: 2.75rem; }
  html.fb-compact .topbar .tb-btns :is(a, .tb-contact) { padding-block: .12rem; }
  html.fb-compact .site-header .container { min-height: 3.9rem; }
  html.fb-compact .site-header .brand img { height: 2.6rem; }
}

/* ---------- 4. The bottom bar (tablet and up; phones use the header icons) ---------- */
.fb { display: none; }
@media (min-width: 821px) {
  html.fb-on { scroll-padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px)); }   /* focus never lands under the bar */
  html.fb-on body { padding-block-end: calc(3.4rem + env(safe-area-inset-bottom, 0px)); }
  .fb { display: block; position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 90;
    padding-block: .25rem calc(.3rem + env(safe-area-inset-bottom, 0px));
    background: var(--white); border-block-start: 1px solid rgba(var(--ink-rgb), .08);
    transition: translate .3s cubic-bezier(.2,.8,.3,1); }
  .fb:focus-within { translate: none !important; }
  html:is(.svc-chat-open, :has(#nav.open)) :is(.fb, .pk) { display: none; }
}
.fb-inner { inline-size: min(100% - 2 * var(--gutter, 1.5rem), 86rem); margin-inline: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.fb-group { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; flex-shrink: 0; }
.fb-group[data-group="talk"] { align-items: flex-end; }
.fb-title { padding-inline: .6rem; font: 700 .58rem/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.fb-row { display: flex; align-items: center; gap: .1rem; }
.fb-b { position: relative; display: inline-flex; align-items: center; gap: .42rem; min-block-size: 2rem; padding-inline: .6rem; border-radius: 999px; flex-shrink: 0;
  font: 600 .78rem/1 var(--head); color: var(--ink); text-decoration: none; white-space: nowrap; transition: background-color .15s; }
.fb-b svg { inline-size: 1.05rem; block-size: 1.05rem; flex: none; }
.fb-b:hover { background: rgba(var(--cyan-rgb), .12); color: var(--ink); }
.fb-b:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.fb-call svg { color: var(--green-4); }
.fb-chat { background: var(--blue); color: var(--on-dark); padding-inline: .8rem .95rem; font-weight: 700; }
.fb-chat:hover { background: var(--blue); color: var(--on-dark); filter: brightness(1.08); }
/* the phones light: green while the phones are on, amber after hours (same rule as the "On the phones now" cards) */
.fb-live { position: absolute; inset-block-start: .15rem; inset-inline-end: .2rem; inline-size: .55rem; block-size: .55rem; border-radius: 50%;
  background: var(--warn-dot); box-shadow: 0 0 0 2px var(--white); }
html.fb-open .fb-live { background: var(--ok-bright); }
/* tight: every button goes icon over word, together */
.fb.is-compact .fb-title { display: none; }
.fb.is-compact .fb-inner { align-items: center; }
.fb.is-compact .fb-b { flex-direction: column; gap: .2rem; padding-inline: .45rem; min-block-size: 2.8rem; border-radius: .7rem; font-size: .64rem; }
.fb.is-compact .fb-chat { background: none; color: var(--ink); }
@media (pointer: coarse) { .fb-b { min-block-size: 2.75rem; } }
@media (forced-colors: active) { .fb { border-block-start: 1px solid CanvasText; } .fb-chat { border: 1px solid ButtonText; } }

/* the character's words, in the bar beside Call / Chat */
.fb-say { display: none; flex: 1 1 auto; min-inline-size: 0; align-items: center; justify-content: flex-end; gap: .9rem; align-self: center; text-align: end;
  font: 700 .86rem/1.25 var(--head); color: var(--ink); }
.fb-say p { margin: 0; } .fb-say .fb-sub { font: 500 .76rem/1.3 var(--font); color: var(--muted); }
.fb-go { display: inline-flex; align-items: center; background: var(--blue); color: var(--on-dark); border-radius: 999px; padding: .5rem .9rem;
  font: 800 .8rem/1 var(--head); text-decoration: none; white-space: nowrap; }
.fb-go:hover { color: var(--on-dark); filter: brightness(1.08); }
/* the words and the logos swap at the moment the character lands (html.pk-words, set by the script) */
html.pk-words .fb-say { display: flex; animation: fbSay .3s ease both; }
html.pk-words .fb-group[data-group="help"] { display: none; }
@keyframes fbSay { from { opacity: 0; translate: -6px 0; } }

/* ---------- 5. The peeker ---------- */
.pk { display: none; }
/* 981 px and up only: between 821 and 980 the page is one column and the character stood on its cards and buttons */
@media (min-width: 981px) {
  .pk { display: block; position: fixed; inset: 0; z-index: 84; pointer-events: none; --pk-h: clamp(170px, 12.5vw, 215px); }
  html.fb-closed .pk { display: none; }
}
.pk img { display: block; block-size: var(--pk-h); inline-size: auto; user-select: none; -webkit-user-drag: none; }
/* the side peek: leans in at the right edge, above the bar. The pictures are drawn cut off down their right side (a person looking round a corner), so all but a sliver of the picture shows and the head tilt is kept small: the cut edge must never come away from the edge of the screen. */
.pk-peek { position: absolute; inset-inline-end: 0; inset-block-end: calc(var(--fb-h, 3.3rem) - var(--pk-h) * .09); pointer-events: auto; cursor: pointer;
  transform: translateX(var(--pk-tuck, 3%)) rotate(var(--pk-rot, 0deg)); transform-origin: 100% 30%; transition: transform .45s cubic-bezier(.4,0,.6,1), opacity .3s; }
.pk-peek img { filter: drop-shadow(-3px 3px 6px rgba(var(--ink-rgb), .25)); }
.pk:not(.pk-in) .pk-peek, .pk[data-state="out"] .pk-peek, .pk[data-state="gone"] .pk-peek, .pk[data-state="away"] .pk-peek { transform: translateX(115%); }
.pk[data-state="out"] .pk-peek { opacity: 0; }
/* the thinking pose: one eased rise from behind the bar to stand on it, and it sinks back down the same way (no blinking off) */
.pk-out { translate: var(--toy-x, 0px) var(--toy-y, 0px); touch-action: none; position: absolute; inset-inline-end: .35rem; inset-block-end: var(--fb-h, 3.3rem); block-size: var(--pk-h); clip-path: inset(-100vh -50vw 0 -50vw); visibility: hidden; transition: visibility 0s .4s; }
.pk-out img { pointer-events: auto; transform: translateY(105%); transition: transform .38s cubic-bezier(.5,0,.8,.4); filter: drop-shadow(0 .5rem 1rem rgba(var(--ink-rgb), .25)); }
.pk[data-state="out"] .pk-out { visibility: visible; transition-delay: 0s; cursor: grab; }
.pk-out.is-held { cursor: grabbing; }
.pk[data-state="out"] .pk-out img { transform: translateY(0); transition: transform .85s cubic-bezier(.2,.9,.3,1.08) .15s; }
.pk-x { position: absolute; inset-block-start: 2%; inset-inline-start: 0; display: none; place-items: center; inline-size: 1.4rem; block-size: 1.4rem; border-radius: 50%;
  border: 1px solid rgba(var(--ink-rgb), .2); background: var(--white); color: var(--ink); font: 700 .9rem/1 var(--head); cursor: pointer; pointer-events: auto;
  box-shadow: 0 4px 12px rgba(var(--ink-rgb), .2); }
.pk-x:hover { border-color: var(--ink); } .pk-x:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pk[data-state="out"] .pk-x { display: grid; animation: fbSay .25s .9s ease both; }

/* the bar stays put; its X tucks it into a small floating dock in the corner,
   so it is never gone for good. Pages that keep the helpers tucked start in
   this state. The dock is the bar's own "Talk to a real person" pair (same
   Call and Chat buttons, same phones light) in a pill like the top strip's,
   plus a quiet arrow that opens the bar. */
.fb-tab { display: none; }
@media (min-width: 821px) {
  html.fb-closed .fb-tab { display: inline-flex; align-items: center; gap: .15rem; position: fixed; z-index: 90;
    inset-inline-end: 1rem; inset-block-end: calc(1rem + env(safe-area-inset-bottom, 0px));
    padding: .3rem .3rem .3rem .45rem; border: 1px solid rgba(var(--cyan-rgb), .3); border-radius: 999px;
    background: var(--white); box-shadow: var(--shadow-sm); }
  .fb-tab-more { display: grid; place-items: center; inline-size: 1.75rem; block-size: 1.75rem; margin-inline-start: .1rem; padding: 0; border: 0; border-radius: 50%;
    background: none; color: var(--muted); cursor: pointer; transition: background-color .15s; }
  .fb-tab-more svg { inline-size: .95rem; block-size: .95rem; }
  .fb-tab-more:hover { background: rgba(var(--ink-rgb), .08); color: var(--ink); }
  .fb-tab-more:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
}
@media (forced-colors: active) { .fb-tab { border-color: CanvasText; } }
.fb-x { align-self: center; flex: none; display: grid; place-items: center; inline-size: 1.75rem; block-size: 1.75rem; margin-inline-start: -.5rem; border: 0; border-radius: 50%;
  background: none; color: var(--muted); font: 600 1.15rem/1 var(--head); cursor: pointer; }
.fb-x:hover { background: rgba(var(--ink-rgb), .08); color: var(--ink); } .fb-x:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
html.fb-closed .fb { display: none; }
html.fb-closed body { padding-block-end: 0; }
.fb-inner { justify-content: flex-start; }
.fb-group[data-group="talk"] { margin-inline-start: auto; }

/* the strip now stays on screen, so everything that sticks under the header sits that much lower */
@media (min-width: 981px) {
  html.fb-framed .sidebar { top: calc(6.25rem + var(--fb-strip, 3.5rem)); }
  html.fb-framed .svc-side { top: calc(5.375rem + var(--fb-strip, 3.5rem)); }
  html.fb-framed .pillar-nav { top: calc(5.5rem + var(--fb-strip, 3.5rem)); }
  html.fb-framed .pain-lead { top: calc(6.5rem + var(--fb-strip, 3.5rem)); }
  /* the request forms' step bar sticks right under the frame at its height now (it was left 28 px low once the frame got shorter) */
  html.fb-framed .svc-sticky { top: var(--fb-frame-now, var(--svc-top, 0px)); }
  /* An open menu panel goes over the bottom bar, and on a short window it
     scrolls inside itself, so its last rows and its foot buttons can always
     be reached. */
  .fb-frame:has(.nav-item.has-mega:is(:hover, :focus-within)) { z-index: 95; }
  html.fb-framed .site-header .mega { max-block-size: calc(100dvh - var(--fb-frame-now, 8.6rem) - .5rem); overflow-y: auto; overscroll-behavior: contain; }
  /* The panel's own hover bridge (.mega::before in styles.css, the strip that
     keeps the menu open while the mouse crosses from the tab down to the
     panel) sits ABOVE the panel, and a box that scrolls clips anything outside
     itself, so the scrolling above cut the bridge off and the menu shut the
     moment the mouse left the tab. Same bridge, same place and size, hung on
     the tab's item instead, where nothing clips it. */
  html.fb-framed .site-header .nav-item.has-mega:is(:hover, :focus-within)::after { content: ""; position: absolute; inset-inline: 0; inset-block-start: calc(100% - 1.625rem); block-size: 1.75rem; z-index: 61; }
}

/* A page loaded wide and then made narrow (window snapped, tablet turned): the
   wrapper built for the fixed frame steps aside, so the header is sticky again
   exactly as on a page loaded narrow. */
@media (max-width: 980px) { .fb-frame { display: contents; } }

/* Paper: none of the frame prints. */
@media print {
  .fb, .fb-tab, .pk, .fb-pop { display: none !important; }
  .fb-frame { position: static !important; }
  html.fb-framed body, html.fb-on body { padding-block: 0 !important; }
}

/* fingers: the bar's X and the dock's arrow are full-size targets */
@media (pointer: coarse) { .fb-x, .fb-tab-more { inline-size: 2.75rem; block-size: 2.75rem; } }

/* The footer kept 20rem of empty space under its last line to clear the old
   side dock and character. The bar and the small dock need far less; pages
   where the character can stand keep enough to clear it. */
@media (min-width: 821px) { html.fb-on .site-footer { padding-block-end: 5rem; } }
@media (min-width: 981px) { html.fb-on body:not([data-help-min]) .site-footer { padding-block-end: 14.5rem; } }
