/* What every demo shares beneath its own skin: the skip link, the mobile
   menu, the back-to-top button, the phone CTA bar, the reveal on scroll,
   the open-now badge. Colours come from the demo's own variables, so a
   new skin sets five tokens and gets all of this for free:

     --d-accent        the firm's accent (buttons, the active nav link)
     --d-accent-ink    text on the accent
     --d-surface       the header's background
     --d-fg            text on the surface
     --d-line          hairlines on the surface */

/* No grey flash on tap: the focus ring and the button's own hover state
   are the feedback. */
.demo, .demo * { -webkit-tap-highlight-color: transparent; }

/* Every photo is a <picture> (WebP sources, JPG fallback); as a block it
   adds no stray line box around the image it wraps. */
.demo picture { display: block; }

.skip {
  position: absolute; left: -9999px; top: calc(var(--strip-h) + 8px); z-index: 2000;
  padding: 10px 14px; border-radius: 8px; background: var(--d-accent, #000); color: var(--d-accent-ink, #fff);
  font: 600 15px/1 system-ui, sans-serif; text-decoration: none;
}
.skip:focus { left: 16px; outline: 3px solid var(--d-accent-ink, #fff); outline-offset: 2px; }

/* The header shadow once the page has scrolled. */
.top { transition: box-shadow .2s; }
.top.is-scrolled { box-shadow: 0 8px 24px -16px rgba(0,0,0,.35); }

/* The mobile menu: the same nav, dropped under the header. */
.top__burger {
  display: none; margin-left: 4px; width: 44px; height: 44px; border: 0; border-radius: 10px;
  background: transparent; color: var(--d-fg, #111); cursor: pointer; place-items: center;
}
.top__burger:hover { background: color-mix(in srgb, var(--d-fg, #111) 8%, transparent); }
.top__burger svg { width: 24px; height: 24px; }
.top__burger .ico-close { display: none; }
.top[aria-expanded="true"] .top__burger .ico-open, .top.is-open .top__burger .ico-open { display: none; }
.top.is-open .top__burger .ico-close { display: block; }
@media (max-width: 860px) {
  .top__burger { display: grid; }
  /* `.top .top__nav` outranks the skin's own `.top__nav`, which loads later. */
  .top .top__nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: 8px 12px 14px;
    background: var(--d-surface, #fff); border-bottom: 1px solid var(--d-line, #e5e5e5);
    box-shadow: 0 24px 32px -24px rgba(0,0,0,.35);
  }
  .top.is-open .top__nav { display: flex; }
  .top .top__nav a { padding: 14px 10px; border-bottom: 1px solid var(--d-line, #e5e5e5) !important; font-size: 17px; }
  .top .top__nav a:last-child { border-bottom: 0 !important; }
}
/* Active section in the nav, kept by demos.js. */
.top__nav a[aria-current="true"] { color: var(--d-accent); border-bottom-color: var(--d-accent); }

/* Back to top: appears after a screen of scrolling, sits above the phone
   CTA bar when there is one. */
.totop {
  position: fixed; right: 18px; bottom: 18px; z-index: 900;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--d-accent, #000); color: var(--d-accent-ink, #fff); text-decoration: none;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s, background .15s;
}
.totop svg { width: 20px; height: 20px; }
.totop.is-visible { opacity: 1; transform: none; }
.totop[hidden] { display: grid; }
.totop:hover { filter: brightness(1.1); }
.totop:focus-visible { outline: 3px solid var(--d-accent-ink, #fff); outline-offset: 2px; }
/* Only while the bar is actually on screen (demos.js keeps the class);
   otherwise the button would float a bar's height above nothing. */
body.bar-visible .totop { bottom: 82px; }
@media (min-width: 861px) { body.bar-visible .totop { bottom: 18px; } }

/* Phone CTA bar: the hero's button, pinned at the bottom while the
   visitor is between the hero and the form. */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 800;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--d-surface, #fff); color: var(--d-fg, #111); border-top: 1px solid var(--d-line, #e5e5e5);
  box-shadow: 0 -12px 32px -20px rgba(0,0,0,.35);
  transform: translateY(110%); transition: transform .25s;
}
.cta-bar.is-visible { transform: none; }
/* The bar has one line of room under the title: whatever sits there is
   clipped with an ellipsis rather than spilling under the button. */
.cta-bar__text { font-size: 14px; line-height: 1.3; min-width: 0; overflow: hidden; }
.cta-bar__text > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The badge keeps its flex layout, or its dot collapses to a sliver. */
.cta-bar__text .open-now { display: flex; align-items: center; }
.cta-bar .open-now::before { flex-shrink: 0; }
.cta-bar__text strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta-bar .btn { flex-shrink: 0; }
@media (max-width: 860px) {
  .cta-bar { display: flex; }
  /* On a phone the bar is the call to action; the header keeps only the
     brand and the burger, so one screen never shows the same button twice. */
  body.has-bar .top > .btn { display: none; }
  /* With the button gone, the burger takes the right edge. */
  .top__burger { margin-left: auto; }
}

/* On a narrow phone the hero's two buttons share a row when they fit and
   otherwise stack, each full width: two left-aligned buttons of different
   widths under each other read as unfinished. */
@media (max-width: 520px) {
  [data-hero-cta] .btn { flex: 1 1 auto; }
}

/* Reveal on scroll: one quiet fade and lift per block, never repeated,
   off entirely for people who asked for less motion. */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* Opening hours: tabular figures so the colons line up, a hair of air
   around the dashes so "9:00–18:00" does not read as one number, and no
   line break inside a range. */
.hours { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours, .open-now { word-spacing: 0.04em; }

/* Open now / closed, from the firm's hours (data-hours on the element). */
.open-now { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.open-now::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #2e9e5b; box-shadow: 0 0 0 3px rgba(46,158,91,.18); }
.open-now.is-closed::before { background: #b3352c; box-shadow: 0 0 0 3px rgba(179,53,44,.18); }

/* The FAQ's plus: two bars drawn in the circle, so it is crisp and
   centred in every typeface; the skin colours the circle and turns it. */
.q summary::after { content: ''; background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor); background-size: 12px 2px, 2px 12px; background-position: center; background-repeat: no-repeat; }

/* Forms: the button while sending, the field that failed. */
.f-btn[disabled] { opacity: .7; cursor: progress; }
.f-input[aria-invalid="true"] { border-color: #b3352c !important; }
.f-note { margin-top: 14px; font-size: 13.5px; line-height: 1.45; opacity: .75; }
.f-note a { color: inherit; }
