/* WUB service accordion (prototype). Bader-style expanding photo panels.
   Everything is scoped under .wub-acc / .wub-acc-*; nothing here touches other markup. */

.wub-acc {
  /* Ease-out, about 500 ms (round 2, 2026-11-16: 0.3s felt too fast; every tile duration and delay scaled by 5/3) */
  --wub-acc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wub-acc-dur: 0.5s;
  --wub-acc-delay: 0.17s;
  --wub-acc-fade-out: 0.25s;
  --wub-acc-fade-in: 0.33s;
  --wub-acc-h: 640px;
  --wub-acc-card-w: 150px;
  --wub-acc-card-img: 132px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  padding: 0 16px;
  margin: 0;
  font-family: "Montserrat", Sans-serif;
}
.wub-acc *,
.wub-acc *::before,
.wub-acc *::after { box-sizing: border-box; }
.wub-acc ul { list-style: none; margin: 0; padding: 0; }

.wub-acc-row {
  display: flex;
  height: var(--wub-acc-h);
}

/* Panel */
.wub-acc-panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  background: #1f1f1f;
  transition: flex-grow var(--wub-acc-dur) var(--wub-acc-ease);
}
.wub-acc-panel + .wub-acc-panel { border-left: 1px solid #fff; }

/* Expanded: mouse hover, keyboard focus (only while the mouse is not on the row), or a touch tap (.is-open) */
.wub-acc-panel:hover,
.wub-acc-row:not(:hover) .wub-acc-panel:focus-within,
.wub-acc-panel.is-open { flex-grow: 3.4; } /* was 5; Landon 2026-11-06: open 25% less (878px to about 748px at 1440) */

.wub-acc-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter var(--wub-acc-dur) var(--wub-acc-ease);
}
.wub-acc-panel:hover .wub-acc-photo,
.wub-acc-row:not(:hover) .wub-acc-panel:focus-within .wub-acc-photo,
.wub-acc-panel.is-open .wub-acc-photo { filter: grayscale(0); }

/* The Same-Day GIF is grayscale-only, so (as on today's tile) a color-blend tint stands in for color */
.wub-acc-panel--tint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  mix-blend-mode: color;
  pointer-events: none;
  z-index: 1;
  transition: background-color var(--wub-acc-dur) var(--wub-acc-ease);
}
.wub-acc-panel--tint:hover::after,
.wub-acc-row:not(:hover) .wub-acc-panel--tint:focus-within::after,
.wub-acc-panel--tint.is-open::after { background-color: #c9906b; }

/* Shade keeps white labels at AA over any photo: flat dim plus a darker pool behind the label */
.wub-acc-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(closest-side ellipse at 50% 40%, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 100%),
    linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22));
}

/* Label: centered in the area above the card drawer; the link stretches over the whole panel */
.wub-acc-heading {
  position: absolute;
  inset: 0 0 120px 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 10px;
  text-align: center;
  font: inherit;
}
.wub-acc-title {
  display: block;
  max-width: 100%;
  color: #fff;
  font-family: "Montserrat", Sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  overflow-wrap: break-word;
  /* Size is not animated (costly text relayout every frame). It snaps back once the column is mostly wide again. */
  transition: font-size 0s linear var(--wub-acc-delay), letter-spacing 0s linear var(--wub-acc-delay);
}
.wub-acc-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: -120px;
}
.wub-acc-title:hover,
.wub-acc-title:focus { color: #fff; text-decoration: none; }

/* Narrow (collapsed) siblings: smaller label so long words fit the slim column */
.wub-acc-row:hover .wub-acc-panel:not(:hover) .wub-acc-title,
.wub-acc-row:not(:hover):focus-within .wub-acc-panel:not(:focus-within) .wub-acc-title,
.wub-acc-row.has-open .wub-acc-panel:not(.is-open) .wub-acc-title {
  font-size: 15px;
  letter-spacing: 0.8px;
  transition: none; /* shrinks at once, before its column narrows */
}
.wub-acc-row:hover .wub-acc-panel:not(:hover) .wub-acc-shade,
.wub-acc-row:not(:hover):focus-within .wub-acc-panel:not(:focus-within) .wub-acc-shade,
.wub-acc-row.has-open .wub-acc-panel:not(.is-open) .wub-acc-shade {
  background:
    radial-gradient(closest-side ellipse at 50% 40%, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 100%),
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
}

/* Drawer: pill + cards along the bottom, hidden until the panel expands */
.wub-acc-drawer {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--wub-acc-fade-out) var(--wub-acc-ease), visibility 0s linear var(--wub-acc-fade-out);
}
.wub-acc-panel:hover .wub-acc-drawer,
.wub-acc-row:not(:hover) .wub-acc-panel:focus-within .wub-acc-drawer,
.wub-acc-panel.is-open .wub-acc-drawer {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--wub-acc-fade-in) var(--wub-acc-ease) var(--wub-acc-delay), visibility 0s linear 0s;
}

.wub-acc-pill {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 3px;
  background: #272727;
  color: #fff;
  font-family: "Montserrat", Sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s;
}
.wub-acc-pill:hover,
.wub-acc-pill:focus { background: #7e663e; color: #fff; text-decoration: none; }

.wub-acc-cards {
  display: flex;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.wub-acc-cards::-webkit-scrollbar { display: none; }
.wub-acc-cards > li { flex: 0 1 var(--wub-acc-card-w); min-width: 0; }
.wub-acc-cards > li > .wub-acc-card { width: 100%; }
.wub-acc-cards > li:first-child { margin-left: auto; }

.wub-acc-card {
  display: flex;
  flex-direction: column;
  width: var(--wub-acc-card-w);
  padding: 6px 6px 0;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #202020;
  text-decoration: none;
  transition: background-color 0.2s;
}
.wub-acc-card img {
  display: block;
  width: 100%;
  height: var(--wub-acc-card-img);
  max-width: none;
  object-fit: cover;
}
.wub-acc-card span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 4px 2px;
  color: #202020;
  font-family: "Montserrat", Sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.8px;
  text-align: center;
  text-transform: uppercase;
}
.wub-acc-card:hover,
.wub-acc-card:focus { background: #fff; color: #202020; text-decoration: none; }

/* Focus: the site's ring (3px dark outline + white halo) */
.wub-acc a:focus { outline: none; }
.wub-acc .wub-acc-pill:focus-visible,
.wub-acc .wub-acc-card:focus-visible {
  outline: 3px solid #1a1a1a;
  outline-offset: 0;
  box-shadow: 0 0 0 5px #fff;
}
.wub-acc .wub-acc-cards { padding: 6px; margin: -6px; }
.wub-acc .wub-acc-title:focus-visible::before {
  outline: 3px solid #1a1a1a;
  outline-offset: -8px;
  box-shadow: inset 0 0 0 5px #fff;
}

/* Tablet */
@media (max-width: 1024px) {
  .wub-acc { --wub-acc-h: 540px; --wub-acc-card-w: 124px; --wub-acc-card-img: 104px; }
  .wub-acc-title { font-size: 19px; letter-spacing: 1px; }
}
/* Tablet: cards keep their width and the row swipes, so labels never squish in the narrower open panel */
@media (min-width: 768px) and (max-width: 1024px) {
  .wub-acc-cards > li { flex: 0 0 var(--wub-acc-card-w); scroll-snap-align: start; }
  .wub-acc .wub-acc-cards { scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
  .wub-acc-card span { letter-spacing: 0.5px; }
  /* Titles: smaller so whole words fit the slim columns; real hyphens (not mid-word breaks) as a last resort */
  .wub-acc .wub-acc-heading { padding: 0 6px; }
  .wub-acc .wub-acc-row .wub-acc-panel .wub-acc-title {
    font-size: 16px;
    letter-spacing: 0.8px;
    overflow-wrap: normal;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
  html .wub-acc .wub-acc-row:hover .wub-acc-panel:not(:hover) .wub-acc-title,
  html .wub-acc .wub-acc-row:not(:hover):focus-within .wub-acc-panel:not(:focus-within) .wub-acc-title,
  html .wub-acc .wub-acc-row.has-open .wub-acc-panel:not(.is-open) .wub-acc-title { font-size: 12px; letter-spacing: 0.4px; transition: none; }
}
/* Portrait tablets: the open panel takes a little less room so the three closed columns can hold a word */
@media (min-width: 768px) and (max-width: 899px) {
  .wub-acc-panel:hover,
  .wub-acc-row:not(:hover) .wub-acc-panel:focus-within,
  .wub-acc-panel.is-open { flex-grow: 2.8; }
}

/* Phone: a vertical accordion. Each panel is a black and white strip; one panel is open at a time
   (service-accordion.js keeps .is-open and opens the first on load). The "html .wub-acc .wub-acc-row" prefix
   outranks the desktop :hover / :focus-within rules, so only .is-open opens a panel here. */
@media (max-width: 767px) {
  .wub-acc { --wub-acc-card-w: 136px; --wub-acc-card-img: 92px; --wub-acc-strip: 120px; --wub-acc-open: 464px; }
  .wub-acc > .wub-acc-row { flex-direction: column; height: auto; gap: 1px; }
  html .wub-acc .wub-acc-row .wub-acc-panel {
    --wub-acc-head-b: 0px;
    flex: 0 0 auto;
    height: var(--wub-acc-strip);
    border-left: 0;
    transition: height var(--wub-acc-dur) var(--wub-acc-ease);
  }
  html .wub-acc .wub-acc-row .wub-acc-panel.is-open { --wub-acc-head-b: 214px; height: var(--wub-acc-open); }
  html .wub-acc .wub-acc-row .wub-acc-panel.is-open:not(:has(.wub-acc-cards)) { --wub-acc-head-b: 64px; height: 300px; }

  html .wub-acc .wub-acc-row .wub-acc-panel:not(.is-open) .wub-acc-photo { filter: grayscale(1); }
  html .wub-acc .wub-acc-row .wub-acc-panel--tint:not(.is-open)::after { background-color: transparent; }

  /* Shade: closed strips get a deeper dim so the white label stays AA on any photo */
  html .wub-acc .wub-acc-row .wub-acc-panel:not(.is-open) .wub-acc-shade {
    background:
      radial-gradient(closest-side ellipse at 50% 50%, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0) 100%),
      linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45));
  }
  html .wub-acc .wub-acc-row .wub-acc-panel.is-open .wub-acc-shade {
    background:
      radial-gradient(closest-side ellipse at 50% 27%, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0) 100%),
      linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3));
  }

  /* Label: centered in the strip; on open it rides up above the drawer */
  html .wub-acc .wub-acc-row .wub-acc-panel .wub-acc-heading {
    inset: 0 0 var(--wub-acc-head-b) 0;
    padding: 0 50px;
    transition: bottom var(--wub-acc-dur) var(--wub-acc-ease);
  }
  html .wub-acc .wub-acc-row .wub-acc-panel .wub-acc-heading .wub-acc-title { font-size: 19px; letter-spacing: 1.2px; }
  html .wub-acc .wub-acc-row .wub-acc-panel.is-open .wub-acc-heading .wub-acc-title { font-size: 22px; letter-spacing: 1.5px; }
  html .wub-acc .wub-acc-row .wub-acc-panel .wub-acc-title::before { bottom: calc(-1 * var(--wub-acc-head-b)); }

  /* Open cue (borrowed from Bader's small arrow button): a chevron that flips when the panel opens */
  html .wub-acc .wub-acc-row .wub-acc-panel::before {
    content: "";
    position: absolute;
    top: calc(var(--wub-acc-strip) / 2 - 14px);
    right: 14px;
    z-index: 3;
    width: 28px;
    height: 28px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5l3.5 3.5 3.5-3.5' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") center / 12px no-repeat;
    pointer-events: none;
    transition: transform var(--wub-acc-dur) var(--wub-acc-ease);
  }
  html .wub-acc .wub-acc-row .wub-acc-panel.is-open::before { transform: rotate(180deg); }

  /* Drawer: pill, then a swipe row of fixed-width cards, centered when they fit */
  html .wub-acc .wub-acc-row .wub-acc-panel .wub-acc-drawer { left: 0; right: 0; bottom: 14px; gap: 10px; align-items: center; }
  html .wub-acc .wub-acc-row .wub-acc-panel:not(.is-open) .wub-acc-drawer { opacity: 0; visibility: hidden; transition: opacity var(--wub-acc-fade-out) var(--wub-acc-ease), visibility 0s linear var(--wub-acc-fade-out); }
  .wub-acc .wub-acc-cards {
    align-self: stretch;
    padding: 6px 12px;
    margin: -6px 0;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 12px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .wub-acc-cards > li { flex: 0 0 var(--wub-acc-card-w); scroll-snap-align: start; }
  .wub-acc-cards > li:first-child { margin-left: auto; }
  .wub-acc-cards > li:last-child { margin-right: auto; }
  .wub-acc-card span { padding: 4px; letter-spacing: 0.5px; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  html .wub-acc .wub-acc-row .wub-acc-panel,
  html .wub-acc .wub-acc-row .wub-acc-panel::before,
  html .wub-acc .wub-acc-row .wub-acc-panel .wub-acc-heading,
  html .wub-acc .wub-acc-row .wub-acc-panel:not(.is-open) .wub-acc-drawer { transition: none; }
}
/* Set by service-accordion.js for one frame so the default-open panel does not animate on page load */
.wub-acc.is-instant *,
.wub-acc.is-instant *::before,
.wub-acc.is-instant *::after { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .wub-acc-panel,
  .wub-acc-photo,
  .wub-acc-panel--tint::after,
  .wub-acc-title,
  .wub-acc-drawer,
  .wub-acc-panel:hover .wub-acc-drawer,
  .wub-acc-row:not(:hover) .wub-acc-panel:focus-within .wub-acc-drawer,
  .wub-acc-panel.is-open .wub-acc-drawer,
  .wub-acc-pill,
  .wub-acc-card { transition: none; }
}

/* Fix: the site's ".elementor img { height: auto }" rule beat ".wub-acc-photo", so photos stopped part way down the panel */
.wub-acc img.wub-acc-photo { width: 100%; height: 100%; max-width: none; }
/* Bader-style labels: no underline at rest; underline on hover and keyboard focus */
.wub-acc a.wub-acc-title, .wub-acc a.wub-acc-card { text-decoration: none; }
.wub-acc a.wub-acc-title:hover, .wub-acc a.wub-acc-title:focus-visible,
.wub-acc a.wub-acc-card:hover, .wub-acc a.wub-acc-card:focus-visible { text-decoration: underline; }
/* Touch screens keep :hover after a tap; underline only on keyboard focus there */
@media (hover: none) {
  .wub-acc a.wub-acc-title:hover:not(:focus-visible),
  .wub-acc a.wub-acc-card:hover:not(:focus-visible) { text-decoration: none; }
}

/* Fix round 2026-11-16: the first tile's still (welcome-tile.webp, 854 x 1200) has the face in its top
   quarter, a little left of center. Keep the face in frame when the tile is open on desktop (wide, so the
   photo is cropped top and bottom) and in the short phone strip. */
.wub-acc > .wub-acc-row:first-child > .wub-acc-panel:first-child img.wub-acc-photo { object-position: 44% 10%; }
/* Fix round 2026-11-16: a one-line title link (about 23 to 26 px tall) gets a box at least 45 px tall. The padding
   and the matching negative margin cancel, so the label is drawn in the same place. */
.wub-acc a.wub-acc-title { padding-top: 11px; padding-bottom: 11px; margin-top: -11px; margin-bottom: -11px; }
/* Polish round 2026-11-16: from 640 to 767 px the open first tile is wide and short, so 10% cut the forehead
   and the title sat across her mouth. Open, the photo starts at its top edge so the whole face shows above and
   under the title; the closed strip keeps 44% 10%. */
@media (min-width: 640px) and (max-width: 767px) {
  html .wub-acc > .wub-acc-row:first-child > .wub-acc-panel.is-open:first-child img.wub-acc-photo { object-position: 44% 0%; }
}

/* Keyboard focus wins over a resting mouse (review 2026-11-17): above phone width, a tile that holds keyboard focus opens
   and shows its drawer even while the pointer sits on another tile in the row, so Tab always reaches its cards.
   With no pointer on the row this adds nothing: the :not(:hover) :focus-within rules above already open it. */
@media (min-width: 768px) {
  .wub-acc-panel:has(:focus-visible) { flex-grow: 3.4; }
  .wub-acc-panel:has(:focus-visible) .wub-acc-photo { filter: grayscale(0); }
  .wub-acc-panel:has(:focus-visible) .wub-acc-drawer {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--wub-acc-fade-in) var(--wub-acc-ease) var(--wub-acc-delay), visibility 0s linear 0s;
  }
}
@media (min-width: 768px) and (max-width: 899px) {
  .wub-acc-panel:has(:focus-visible) { flex-grow: 2.8; }
}
@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .wub-acc-panel:has(:focus-visible) .wub-acc-drawer { transition: none; }
}
