/* The dock (assets/js/dock.js): one carbon bar, bottom right, holding the accessibility button, on phones the call
   and book-a-visit buttons, and the chat button. Square corners and the aqua signal line, like the header and the
   hero (DESIGN.md: Lamborghini reference lock, aqua = primary CTA and signal only). Ported from Magnus Roofing,
   2026-11-05. Contrast (WCAG 2.2 AA): white on carbon 16:1, black on aqua 15:1, aqua on carbon 11.9:1, ash on carbon
   5.6:1, steel indicator ring on anvil 3.2:1 (non-text). */
:root { --dock-m: 12px; --dock-p: 6px; --dock-b: 44px; }
.rp-dock { position: fixed; right: var(--dock-m); bottom: calc(var(--dock-m) + env(safe-area-inset-bottom, 0px)); z-index: 80; pointer-events: none; animation: rp-dock-in var(--t-std) var(--ease) 300ms backwards; }
@keyframes rp-dock-in { from { opacity: 0; transform: translateY(20px); } }
.rp-dock__ground { position: absolute; inset: 0; background: var(--carbon); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 12px 28px rgba(0, 0, 0, 0.5); }
.rp-dock__ground::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--aqua); transform-origin: 0 50%; animation: rp-dock-line var(--t-slow) var(--ease) 500ms backwards; }
@keyframes rp-dock-line { from { transform: scaleX(0); } }
.rp-dock__row { position: relative; display: flex; align-items: center; gap: 2px; padding: var(--dock-p); pointer-events: auto; }
.rp-dock__b { display: grid; place-items: center; width: var(--dock-b); height: var(--dock-b); padding: 0; border: 0; background: none; color: var(--white); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color 180ms var(--ease); }
.rp-dock__b svg { width: 24px; height: 24px; transition: transform 180ms var(--ease); }
.rp-dock__book { display: inline-flex; align-items: center; height: var(--dock-b); margin-left: 4px; padding: 0 14px; background: var(--aqua); color: var(--black); font: 600 16px/1 var(--display); letter-spacing: var(--track); text-transform: uppercase; white-space: nowrap; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color var(--t-quick) var(--ease); }
.rp-dock__book:hover { background: var(--aqua-shade); }
.rp-dock__rule { flex: none; width: 1px; height: 24px; margin: 0 6px; background: rgba(255, 255, 255, 0.18); }
.rp-dock__chat { display: flex; align-items: center; height: var(--dock-b); padding: 0; border: 0; background: none; color: var(--white); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.rp-dock__lbl b { display: block; padding: 0 14px 0 8px; font: 600 16px/1 var(--display); letter-spacing: var(--track); text-transform: uppercase; white-space: nowrap; }
.rp-dock__disc { position: relative; flex: none; display: grid; place-items: center; width: var(--dock-b); height: var(--dock-b); background: var(--white); color: var(--black); transition: transform 240ms var(--ease); }
.rp-dock__disc svg { grid-area: 1 / 1; width: 24px; height: 24px; transition: transform 200ms var(--ease), opacity 200ms var(--ease); }
.rp-dock__disc .rp-dock__x { width: 20px; height: 20px; opacity: 0; transform: rotate(-45deg) scale(0.8); }
html.rp-chat-open .rp-dock__ic { opacity: 0; transform: scale(0.8); }
html.rp-chat-open .rp-dock__x { opacity: 1; transform: none; }
.rp-dock__chat:active .rp-dock__disc, .rp-dock__b:active svg { transform: scale(0.96); transition-duration: 120ms; }
@media (hover: hover) and (pointer: fine) {
  .rp-dock__chat:hover .rp-dock__ic { transform: translateY(-2px); }
  .rp-dock__b:hover { background: var(--anvil); }
}
.rp-dock :is(.rp-dock__b, .rp-dock__chat, .rp-dock__book):focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
/* the aqua ring leaves the chat tile twice and rests: under the 5 s WCAG 2.2.2 allows without a pause control */
.rp-dock__disc::after { content: ""; position: absolute; inset: 0; box-shadow: 0 0 0 2px var(--aqua); opacity: 0; pointer-events: none; animation: rp-dock-halo 2400ms var(--ease) 900ms 2; }
@keyframes rp-dock-halo { from { opacity: 0.6; transform: scale(1); } to { opacity: 0; transform: scale(1.45); } }
.rp-dock__chat.is-busy .rp-dock__disc::before { content: ""; position: absolute; inset: 4px; border: 2px solid transparent; border-top-color: var(--black); border-radius: 50%; animation: rp-dock-spin 800ms linear infinite; }
.rp-dock__chat.is-busy .rp-dock__ic { opacity: 0.25; }
@keyframes rp-dock-spin { to { transform: rotate(360deg); } }
@media (min-width: 900px) {
  .rp-dock { right: 24px; bottom: 24px; }
  .rp-dock__call, .rp-dock__book { display: none !important; }
}
@media (max-width: 899px) {
  .rp-dock__lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .rp-dock__rule { margin: 0 4px; }
  html.rp-chat-open .rp-dock { transform: translateY(calc(100% + var(--dock-m) + 8px)); visibility: hidden; transition: transform 224ms var(--ease-in), visibility 0s 224ms; }
}
@media (max-width: 359px) { .rp-dock__book { padding: 0 10px; font-size: 14px; } .rp-dock__b { width: 40px; } }
/* the full-screen photo viewer and the open phone menu own the screen */
html:has(.lbox.is-open) .rp-dock, html:has(.nav[data-open="true"]) .rp-dock { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .rp-dock, .rp-dock__ground::before, .rp-dock__disc::after, .rp-dock__disc::before { animation: none; }
  .rp-dock, .rp-dock * { transition: none !important; }
  .rp-dock__chat.is-busy .rp-dock__disc { opacity: 0.6; }
}
@media print { .rp-dock { display: none; } }

/* The chat window: colours and type here, shape in dock.js (SKIN). Hidden until skinned, so the stock look never
   flashes. Primary is the deep teal (4.8:1 under white text); aqua is too light to carry white. */
chat-widget {
  --chat-widget-font-family: "Noto Sans", system-ui, sans-serif; --ion-font-family: "Noto Sans", system-ui, sans-serif;
  --chat-widget-bubble-color: #202020; --chat-widget-primary-color: #0c8074; --chat-widget-primary-solid-color: #0c8074;
  --chat-widget-active-color: #0c8074; --chat-widget-button-color: #202020; --ion-color-primary: #0c8074; --color: #0c8074;
  --chat-widget-header-color: #202020; --chat-widget-header-darken-color: #000; --chat-widget-avatar-border-color: #79ebd8;
  --chat-widget-received-message-color: #f5f5f5; --chat-widget-received-message-text-color: #202020;
  --chat-widget-sender-message-color: #202020; --chat-widget-welcome-message-text-color: #202020;
  --chat-widget-system-message-text-color: #202020;
}
chat-widget:not(.rp-ready), html.rp-a11y-open:not(.rp-chat-open) chat-widget { visibility: hidden; }

/* ---------- Accessibility panel ---------- */
/* the panel lines up with the dock's right edge (the row is its containing block), not with the button */
.rp-a11y { flex: none; }
.rp-a11y__panel { position: absolute; right: 0; bottom: calc(100% + var(--dock-p) + 12px); width: min(320px, calc(100vw - 24px)); max-height: calc(100dvh - var(--dock-b) - var(--dock-p) * 2 - var(--dock-m) * 2 - 24px - env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain; padding: 20px 18px 18px; background: var(--carbon); color: var(--white); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 24px 50px rgba(0, 0, 0, 0.55); border-top: 2px solid var(--aqua); font: 400 14px/1.4 var(--body); }
@media (max-width: 899px) { .rp-a11y__panel { position: fixed; right: var(--dock-m); bottom: calc(var(--dock-m) + var(--dock-b) + var(--dock-p) * 2 + 12px + env(safe-area-inset-bottom, 0px)); } }
.rp-a11y__panel[hidden] { display: none; }
.rp-a11y__panel :is(button, a):focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.rp-a11y__t { margin: 0 0 14px; font: 600 16px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--aqua); }
.rp-a11y__opts { display: flex; flex-direction: column; gap: 6px; }
.rp-a11y__opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 14px; border: 0; background: var(--anvil); font: 500 15px/1.2 var(--body); color: var(--white); text-align: left; cursor: pointer; transition: background-color 180ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .rp-a11y__opt:hover { background: var(--graphite); } }
.rp-a11y__opt i { display: grid; place-items: center; flex: none; min-width: 22px; height: 22px; box-shadow: inset 0 0 0 2px var(--steel); font: 700 11px/1 var(--body); font-style: normal; color: var(--aqua); }
.rp-a11y__opt[aria-pressed="true"] { background: var(--aqua); color: var(--black); }
.rp-a11y__opt[aria-pressed="true"] i { background: var(--black); box-shadow: none; }
.rp-a11y__opt[aria-pressed="true"] i:empty::after { content: ""; width: 9px; height: 5px; margin-top: -2px; border: solid var(--aqua); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.rp-a11y__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.rp-a11y__reset { min-height: 40px; padding: 0 16px; border: 1px solid var(--steel); background: transparent; font: 600 15px/1 var(--display); letter-spacing: var(--track); text-transform: uppercase; color: var(--white); cursor: pointer; }
.rp-a11y__reset:hover { border-color: var(--white); }
.rp-a11y__foot a { font: 500 13px/1.3 var(--body); color: var(--aqua); text-decoration: underline; text-underline-offset: 3px; text-align: right; }
.rp-a11y__help { margin: 12px 0 0; font-size: 13px; color: var(--ash); }
.rp-a11y__x { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; background: transparent; color: var(--white); cursor: pointer; }
.rp-a11y__x svg { width: 18px; height: 18px; }

/* ---------- The choices ---------- */
/* Larger text: reading text only (headings are already display size); list items that hold cards or photos keep their size */
html.a11y-text :is(main, footer) :is(p, li:not(:has(img, picture, svg, div, p, ul, ol)), dd, dt, td, th, figcaption, label, summary, blockquote) { zoom: 1.14; }
html.a11y-text2 :is(main, footer) :is(p, li:not(:has(img, picture, svg, div, p, ul, ol)), dd, dt, td, th, figcaption, label, summary, blockquote) { zoom: 1.28; }
html.a11y-text :is(main, footer) :is(p, li, dd, td, label, summary) :is(p, li, dd, td, label, summary) { zoom: 1; }
/* bigger, wider or more spaced text wraps instead of pushing the page sideways */
html:is(.a11y-text, .a11y-font, .a11y-space) :is(main, footer) :is(p, li, dd, td, label, .btn) { overflow-wrap: anywhere; }
html:is(.a11y-text, .a11y-font, .a11y-space) main .btn { white-space: normal; text-align: left; }
/* Readable font: the condensed uppercase display face becomes a wide, mixed-case sans */
html.a11y-font { --display: Verdana, Tahoma, "Noto Sans", system-ui, sans-serif; --body: Verdana, Tahoma, "Noto Sans", system-ui, sans-serif; --track: 0; }
html.a11y-font body { font-family: var(--body); }
html.a11y-font :is(h1, h2, h3, .display, .label, .btn, .nav__links > li > a, .sheet__toggle, .nav__sheet a) { text-transform: none; letter-spacing: 0; }
html.a11y-font main :is(h1, h2) { zoom: 0.78; overflow-wrap: break-word; }
html.a11y-font main :is(h1, h2, h3) { line-height: 1.12; }
/* More line spacing (WCAG 1.4.12 text spacing values) */
html.a11y-space :is(main, footer) :is(p, li, dd, td, label, blockquote) { line-height: 1.9 !important; letter-spacing: 0.04em !important; word-spacing: 0.12em !important; }
html.a11y-space :is(main, footer) p { margin-bottom: 1em; }
/* Underline links */
html.a11y-links a:not(.rp-dock a) { text-decoration: underline !important; text-underline-offset: 3px !important; }
/* More contrast: muted greys go brighter on dark grounds and darker on light ones; translucent white text goes solid */
html.a11y-contrast { --steel: #c2c2c2; --ash: #dadada; --graphite: #1a1a1a; }
html.a11y-contrast :is(.section--light, .section--white) { --steel: #333; --ash: #333; }
html.a11y-contrast :is(.hero__sub, .hero__trust, .step p, .areas__note, .cta p, .phero__lead, .crumbs, .section--carbon .prose, .section--black .prose, .rebuild__sub, .rebuild__steps, .rail__place, .show__eyebrow, .show__text, .twp__eyebrow, .twp__services, .twp__lead, .twp__body, .footer__base, .footer__by a) { color: #fff !important; }
html.a11y-contrast :is(.section--light, .section--white) :is(p, li, dd, td, small, .muted, .rail__place) { color: #000 !important; }
html.a11y-contrast :is(.hero__scrim, .phero__scrim) { filter: brightness(0.75); }
/* Stop animations: everything in its finished state. app.js reads the class too and skips the scroll scenes. */
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-still :is([data-reveal], [data-arrive], .tile__body, .step, .twp__brand .twp-lockup__words, .rebuild__copy [data-item]) { opacity: 1 !important; transform: none !important; }
html.a11y-still :is(.tile__media, .reveal-clip) { clip-path: none !important; }
html.a11y-still :is(.tile__media img, .reveal-clip img, .ba__compare img) { transform: none !important; }
html.a11y-still .twp__brand .twp-mark path { stroke-dashoffset: 0 !important; }
html.a11y-still .hero__line { transform: scaleX(1) !important; }
html.a11y-still .hero__line::after, html.a11y-still .hero__mark-in { animation: none !important; }
html.a11y-still .hero { height: auto; }
html.a11y-still .hero__stage { position: relative; }
html.a11y-still .hero__canvas { display: none; }
html.a11y-still .process { height: auto; }
html.a11y-still .process__stage { position: relative; top: 0; height: auto; padding: 96px 0; }
html.a11y-still :is(.process__nums, .process__track, .process__ticks) { display: none; }
html.a11y-still .process__steps { min-height: 0; display: grid; gap: 48px; }
html.a11y-still .step { position: relative; }
