/* ==========================================================================
   Conall — floating greeter widget (home page only)
   Adapted from the supplied embed for a small, fixed corner mascot instead
   of the full-width hero layout it shipped with. Everything is namespaced
   under .conall-* so it can't collide with the rest of the site's CSS.
   ========================================================================== */

.conall-widget {
  --conall-ink: #201e1d;
  --conall-bandana: #0088b0;
  --conall-bandana-fold: #00647f;
  --conall-wag: 3s;      /* one wag burst; smaller = more excited */
  --conall-breathe: 3.4s;

  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--conall-ink);
}

/* — the greeting bubble — */
.conall-bubble-wrap {
  max-width: 236px;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  animation: conall-bubble .8s cubic-bezier(.2,.8,.25,1) .3s both;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.conall-widget.conall--closed .conall-bubble-wrap {
  opacity: 0;
  transform: translateY(6px) scale(.96);
  visibility: hidden;
  pointer-events: none;
}
.conall-bubble {
  position: relative;
  background: #eae9e9;
  border: 2px solid var(--conall-ink);
  border-radius: 10px;
  padding: 16px 18px 18px;
  box-shadow: var(--shadow, 0 4px 18px rgba(30,63,63,.16));
}
.conall-bubble::after {           /* pointer down toward Conall */
  content: "";
  position: absolute;
  bottom: -14px;
  right: 28px;
  width: 22px;
  height: 22px;
  background: #eae9e9;
  border-right: 2px solid var(--conall-ink);
  border-bottom: 2px solid var(--conall-ink);
  border-bottom-right-radius: 3px;
  transform: rotate(45deg) skew(6deg, 6deg);
}
.conall-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1;
  color: var(--conall-ink);
  opacity: .55;
  cursor: pointer;
  padding: 4px;
}
.conall-close:hover { opacity: 1; }

.conall-kicker {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #005a75;
  font-weight: 700;
  padding-right: 16px;
}
.conall-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: 8px 0 8px;
}
.conall-copy {
  font-size: 13.5px;
  line-height: 1.42;
  margin: 0;
}
.conall-msg--quote { display: none; }
.conall-widget[data-state="quote"] .conall-msg--hello { display: none; }
.conall-widget[data-state="quote"] .conall-msg--quote { display: block; }
.conall-cta {
  display: inline-block;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 7px 14px;
  margin-top: 6px;
  border: 1px solid var(--conall-bandana);
  border-radius: 999px;
  background: var(--conall-bandana);
  color: #f3f2f2;
}
.conall-cta:hover  { background: #00779b; border-color: #00779b; }
.conall-cta:active { background: var(--conall-bandana-fold); border-color: var(--conall-bandana-fold); }
.conall-cta:focus-visible { outline: 2px solid var(--conall-bandana); outline-offset: 2px; }

/* — the dog (small, clickable to toggle the bubble) — */
.conall-figure-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex: none;
}
.conall-figure {
  display: block;
  position: relative;
  width: 108px;
  height: 154px;
}
.conall-shadow {
  position: absolute; left: 4%; bottom: 1.5%; width: 74%; height: 5%;
  border-radius: 50%; background: var(--conall-ink);
  filter: blur(5px); opacity: .28;
  animation: conall-shadow var(--conall-breathe) ease-in-out infinite;
}
.conall-dog {
  position: absolute; inset: 0;
  transform-origin: 50% 100%;
  animation: conall-breathe var(--conall-breathe) ease-in-out infinite;
}
.conall-dog img, .conall-dog svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.conall-tail {
  transform-origin: 86.9% 80.1%;
  animation: conall-wag var(--conall-wag) cubic-bezier(.45,0,.55,1) infinite;
}
.conall-bandana { overflow: visible; transform-origin: 43% 54%; animation: conall-flutter 3.1s ease-in-out infinite; }
.conall-bandana g { stroke: #1c2a28; stroke-width: 10; stroke-linejoin: round; stroke-linecap: round; }
.conall-bandana .cloth { fill: var(--conall-bandana); }
.conall-bandana .fold  { fill: var(--conall-bandana-fold); }
.conall-bandana text   { font-family: inherit; font-weight: 700; font-size: 40px; letter-spacing: .06em; fill: #f3f2f2; }

@keyframes conall-wag {
  0%   { transform: rotate(-5deg); }  6%  { transform: rotate(13deg); }
  12%  { transform: rotate(-5deg); }  18% { transform: rotate(13deg); }
  24%  { transform: rotate(-5deg); }  30% { transform: rotate(13deg); }
  36%  { transform: rotate(-4deg); }  42% { transform: rotate(11deg); }
  48%  { transform: rotate(-3deg); }  54% { transform: rotate(9deg); }
  60%  { transform: rotate(-1deg); }  66% { transform: rotate(6deg); }
  72%  { transform: rotate(1deg); }   78% { transform: rotate(4deg); }
  86%  { transform: rotate(2deg); }   100% { transform: rotate(-5deg); }
}
@keyframes conall-breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.006); } }
@keyframes conall-shadow  { 0%, 100% { transform: scaleX(1); opacity: .28; } 50% { transform: scaleX(.965); opacity: .22; } }
@keyframes conall-flutter { 0%, 100% { transform: rotate(-1.1deg); } 50% { transform: rotate(1.5deg); } }
@keyframes conall-bubble  { 0% { opacity: 0; transform: translateY(14px) scale(.94); } 65% { transform: translateY(0) scale(1.015); } 100% { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .conall-widget { right: 12px; bottom: 12px; gap: 6px; }
  .conall-figure { width: 84px; height: 120px; }
  .conall-bubble-wrap { max-width: 200px; }
  .conall-bubble { padding: 13px 15px 15px; }
  .conall-title { font-size: 17px; }
  .conall-copy { font-size: 12.5px; }
}

/* respects a visitor's reduced-motion setting */
@media (prefers-reduced-motion: reduce) {
  .conall-widget *, .conall-widget { animation: none !important; }
  .conall-bubble-wrap { opacity: 1; transform: none; }
}
