/* ZoltanBuilds quote form: the Typeform-style wizard on the homepage, /quote and the city
   pages. Markup: partials/quote-form.html (copied into each page by
   scripts/sync-quote-form.mjs). Behaviour: zb-quote-form.js. */

/* Lands below the fixed headers when a page scrolls the form into view, with room for the fox on
   the progress bar: the city pages' header pill ends ~126px down. index.html and quote.html,
   with different headers, set their own. goTo also re-scrolls when the card is tucked under it. */
.zb-tf { scroll-margin-top: 136px; }

/* ===== Quote success: "hammer drives the nail home" ===== */
#zb-success-state {
  text-align: center;
  padding: 8px 0 4px;
}
#zb-success-state[hidden] { display: none; }
.zb-success-stage {
  width: min(280px, 70vw);
  margin: 0 auto 18px;
  aspect-ratio: 1 / 1;
}
.zb-success-stage svg { width: 100%; height: 100%; overflow: visible; }
.zb-success-headline {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 4vw, 36px);
  color: #E5E5E5;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 8px;
  opacity: 0;
}
/* Focused by the script only (tabindex -1), so a screen reader reads it out; not a control, no ring */
.zb-success-headline:focus { outline: none; }
.zb-success-headline .zb-check {
  display: inline-block;
  color: #4ade80;
  margin-left: 6px;
}
.zb-success-sub {
  color: #999;
  font-size: 15px;
  line-height: 1.55;
  max-width: 380px;
  margin: 0 auto 24px;
  opacity: 0;
}
.zb-success-sub a { color: #D4A574; text-decoration: underline; text-underline-offset: 3px; }
#zb-success-reset {
  opacity: 0;
  margin-top: 4px;
}

/* Strike piece initial states */
.zb-strike-arm     { transform-origin: 158px 80px; transform: rotate(-55deg); }
.zb-strike-nail    { transform: translateY(0); }
.zb-strike-sparks  { opacity: 0; }
.zb-strike-shockwave {
  transform-origin: 100px 130px;
  transform: scale(0);
  opacity: 0;
}
.zb-strike-spark {
  transform-origin: 100px 130px;
  transform: scale(0);
  opacity: 0;
}
.zb-success-stage {
  position: relative;
  transform: translateY(0);
}
/* Clip box ends a hair below the plank's top edge (SVG y=135 of 200 → 32.5% from bottom)
   so the fox rises out of the plank and its boots land on it rather than hovering */
.zb-success-fox-pit {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 31%;
  width: 42%;
  overflow: hidden;
  pointer-events: none;
}
.zb-success-fox {
  position: absolute;
  left: 4%;
  bottom: 0;
  height: 74%;
  width: auto;
  max-width: none;
  transform: translateY(105%) scaleX(-1); /* mirrored to face the nail */
}

/* Animations fire when .is-firing is added */
#zb-success-state.is-firing .zb-strike-arm {
  animation: zb-strike-swing 380ms cubic-bezier(.55,0,.85,.3) forwards,
             zb-strike-rebound 420ms cubic-bezier(.2,.8,.2,1) 380ms forwards;
}
#zb-success-state.is-firing .zb-strike-shockwave {
  animation: zb-strike-shock 600ms ease-out 380ms forwards;
}
#zb-success-state.is-firing .zb-strike-sparks {
  animation: zb-strike-sparks-show 0ms linear 380ms forwards;
}
#zb-success-state.is-firing .zb-strike-spark {
  animation: zb-strike-spark-burst 520ms cubic-bezier(.2,.7,.3,1) 380ms forwards;
}
#zb-success-state.is-firing .zb-strike-nail {
  animation: zb-strike-nail-sink 120ms cubic-bezier(.55,0,.85,.3) 380ms forwards;
}
#zb-success-state.is-firing .zb-success-stage {
  animation: zb-strike-thump 260ms ease-out 380ms;
}
#zb-success-state.is-firing .zb-success-fox {
  animation: zb-success-fox-pop 560ms cubic-bezier(.34,1.56,.64,1) 460ms forwards;
}
#zb-success-state.is-firing .zb-success-headline {
  animation: zb-success-fade-up 500ms cubic-bezier(.2,.8,.2,1) 700ms forwards;
}
#zb-success-state.is-firing .zb-success-sub {
  animation: zb-success-fade-up 500ms cubic-bezier(.2,.8,.2,1) 900ms forwards;
}
#zb-success-state.is-firing #zb-success-reset {
  animation: zb-success-fade 300ms ease-out 1300ms forwards;
}

@keyframes zb-strike-swing {
  from { transform: rotate(-55deg); }
  to   { transform: rotate(0deg); }
}
@keyframes zb-strike-rebound {
  0%   { transform: rotate(0deg); }
  40%  { transform: rotate(-22deg); }
  100% { transform: rotate(-15deg); }
}
@keyframes zb-strike-shock {
  0%   { transform: scale(0);   opacity: 0.7; }
  100% { transform: scale(4.5); opacity: 0; }
}
@keyframes zb-strike-sparks-show {
  to { opacity: 1; }
}
@keyframes zb-strike-spark-burst {
  0%   { transform: translate(0, 0) scale(0);    opacity: 0; }
  30%  { transform: translate(var(--dx), var(--dy)) scale(1.4); opacity: 1; }
  100% { transform: translate(calc(var(--dx) * 1.6), calc(var(--dy) * 1.6)) scale(0); opacity: 0; }
}
@keyframes zb-strike-nail-sink {
  from { transform: translateY(0); }
  to   { transform: translateY(7px); }
}
@keyframes zb-strike-thump {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(2px); }
  55%  { transform: translateY(-1px); }
  80%  { transform: translateY(0.5px); }
  100% { transform: translateY(0); }
}
@keyframes zb-success-fox-pop {
  from { transform: translateY(105%) scaleX(-1); }
  to   { transform: translateY(0) scaleX(-1); }
}
@keyframes zb-success-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes zb-success-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #zb-success-state.is-firing .zb-strike-arm,
  #zb-success-state.is-firing .zb-strike-shockwave,
  #zb-success-state.is-firing .zb-strike-spark,
  #zb-success-state.is-firing .zb-strike-nail,
  #zb-success-state.is-firing .zb-success-stage,
  #zb-success-state.is-firing .zb-success-fox,
  #zb-success-state.is-firing .zb-success-headline,
  #zb-success-state.is-firing .zb-success-sub,
  #zb-success-state.is-firing #zb-success-reset {
    animation: none !important;
  }
  #zb-success-state.is-firing .zb-strike-arm    { transform: rotate(-15deg); }
  #zb-success-state.is-firing .zb-success-fox   { transform: scaleX(-1); }
  #zb-success-state.is-firing .zb-strike-nail   { transform: translateY(7px); }
  #zb-success-state.is-firing .zb-success-headline,
  #zb-success-state.is-firing .zb-success-sub,
  #zb-success-state.is-firing #zb-success-reset { opacity: 1; }
}

/* ===== Quote form, Typeform-style: one short question per screen (wizard in zb-quote-form.js) ===== */
.zb-tf {
  position: relative;
  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: 2rem;
  border: 1px solid rgba(212, 165, 116, .22);
  background: radial-gradient(120% 90% at 0% 0%, rgba(212, 165, 116, .1), transparent 55%), #0F0F0F;
  box-shadow: 0 40px 90px -50px rgba(212, 165, 116, .45), 0 30px 60px -30px rgba(0, 0, 0, .8);
}
@media (min-width: 768px) { .zb-tf { padding: 1.75rem 3rem 2rem; } }
.zb-tf-top { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.75rem; }
.zb-tf-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 165, 116, .25);
  background: transparent;
  color: #999;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, opacity .2s ease;
}
.zb-tf-back:hover { color: #D4A574; border-color: rgba(212, 165, 116, .55); }
.zb-tf-back:disabled { opacity: 0; pointer-events: none; }
.zb-tf-progress { flex: 1; height: 4px; border-radius: 999px; background: rgba(212, 165, 116, .14); overflow: hidden; }
/* The fill and the walking fox share one position: a 6px stub plus --p of the rest (--p is set
   on the form by zb-quote-form.js), so they can't drift apart; transforms keep layout out of it */
.zb-tf-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform: translateX(calc((var(--p) - 1) * (100% - 6px)));
  /* both are linear in --p with the same easing, so the gradient tracks the visible part */
  transition: transform .45s cubic-bezier(.45, 0, .25, 1), background-size .45s cubic-bezier(.45, 0, .25, 1);
  /* gradient sized to the visible part, as before; the base colour covers a backward glide */
  background-color: #B8864F;
  background-image: linear-gradient(90deg, #B8864F, #E5C49A);
  background-repeat: no-repeat;
  background-position: right center;
  background-size: calc(6px + var(--p) * (100% - 6px)) 100%;
}
.zb-tf-count { flex-shrink: 0; font-size: .8rem; font-weight: 600; color: #8A8A8A; font-variant-numeric: tabular-nums; }

/* ===== The fox walks the route (the progress bar). Decorative: all of it is aria-hidden ===== */
.zb-tf { --p: 0; --fh: 32px; --fw: 25px; } /* --p = answered / 7; fox.webp is 341x440 */
@media (min-width: 768px) { .zb-tf { --fh: 40px; --fw: 31px; } }
.zb-tf-route { position: relative; flex: 1; min-width: 0; align-self: stretch; display: flex; align-items: center; }
.zb-tf-walker {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 0;
  z-index: 1;
  pointer-events: none;
  transform: translateX(calc((var(--p) - 1) * (100% - 6px)));
}
/* boots (56% across the mirrored art) stand on the fill's end */
.zb-tf-walker-hop { position: absolute; right: calc(var(--fw) * -.44); bottom: 1px; width: var(--fw); height: var(--fh); transform-origin: 56% 100%; }
.zb-tf-walker-fox { display: block; width: 100%; height: 100%; max-width: none; transform: scaleX(-1); } /* the art faces left */
.zb-tf-walker-flash {
  position: absolute;
  left: 50%;
  top: 32%;
  width: calc(var(--fh) * 1.7);
  height: calc(var(--fh) * 1.7);
  margin: calc(var(--fh) * -.85) 0 0 calc(var(--fh) * -.85);
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 248, 236, .95), rgba(229, 196, 154, .45) 50%, rgba(229, 196, 154, 0));
}
/* Stops: photos sits between Photos? (4/7) and Details? (5/7), so the fox never stands on it; finish at the end */
.zb-tf-stop { position: absolute; top: 50%; left: calc(6px + var(--at) * (100% - 6px)); width: 16px; height: 16px; margin: -8px 0 0 -8px; pointer-events: none; }
@media (min-width: 768px) { .zb-tf-stop { width: 18px; height: 18px; margin: -9px 0 0 -9px; } }
.zb-tf-stop-photos { --at: .6429; } /* 4.5 / 7 */
.zb-tf-stop-finish { --at: 1; }
.zb-tf-stop-off, .zb-tf-stop-on { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; }
.zb-tf-stop svg { width: 62%; height: 62%; }
.zb-tf-stop-off { background: #0F0F0F; border: 1px solid rgba(212, 165, 116, .4); color: #9A8466; }
.zb-tf-stop-on { background: #D4A574; color: #0F0F0F; box-shadow: 0 0 0 2px #0F0F0F; opacity: 0; }
.zb-tf.has-media .zb-tf-stop-photos .zb-tf-stop-on,
.zb-tf.is-finishing .zb-tf-stop-finish .zb-tf-stop-on { opacity: 1; }
.zb-tf-stop::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(229, 196, 154, .6); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .zb-tf-walker { transition: transform .45s cubic-bezier(.45, 0, .25, 1); }
  .zb-tf-stop-on { transition: opacity .2s ease; }
  .zb-tf.is-finishing .zb-tf-stop-finish .zb-tf-stop-on { transition-delay: .38s; }
  .zb-tf.has-media .zb-tf-stop-photos { animation: zb-tf-stop-pop .45s; }
  .zb-tf.has-media .zb-tf-stop-photos::after { animation: zb-tf-stop-ring .55s ease-out; }
  .zb-tf.is-finishing .zb-tf-stop-finish { animation: zb-tf-stop-pop .45s .38s; }
}
@keyframes zb-tf-stop-pop {
  0%   { transform: scale(1);    animation-timing-function: cubic-bezier(.2, .8, .3, 1); }
  40%  { transform: scale(1.32); animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  70%  { transform: scale(.94);  animation-timing-function: cubic-bezier(.3, .6, .4, 1); }
  100% { transform: scale(1); }
}
@keyframes zb-tf-stop-ring {
  from { transform: scale(.8);  opacity: .6; }
  to   { transform: scale(2.2); opacity: 0; }
}
/* Windows High Contrast drops background colours, which would leave the fox and the stops
   floating over nothing; use system colours for the track and fill instead */
@media (forced-colors: active) {
  .zb-tf-progress { background: GrayText; }
  .zb-tf-progress-fill { background: Highlight; }
}

/* min-height keeps the card from jumping between the short questions */
.zb-tf-stage { min-height: 19rem; }
@media (min-width: 768px) { .zb-tf-stage { min-height: 20rem; } }
.zb-tf-q.is-from-below { animation: zb-tf-in-up .45s cubic-bezier(.2, .8, .2, 1); }
.zb-tf-q.is-from-above { animation: zb-tf-in-down .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes zb-tf-in-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
@keyframes zb-tf-in-down {
  from { opacity: 0; transform: translateY(-28px); }
  to   { opacity: 1; transform: none; }
}

/* The fox asks every question */
.zb-tf-ask { display: flex; align-items: flex-start; gap: .9rem; margin-bottom: 1.6rem; }
.zb-tf-fox {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #D4A574;
  box-shadow: 0 0 0 2px #020646;
}
@media (min-width: 768px) { .zb-tf-fox { width: 3.75rem; height: 3.75rem; } }
/* The fox that asks faces its question (the art faces left). On Photos? it looks down at the
   upload box until something is added; zb-quote-form.js adds .is-looking 450ms after it lands */
.zb-tf-fox { transform: scaleX(-1); }
.zb-tf:not(.has-media) .zb-tf-q.is-looking .zb-tf-fox { rotate: 14deg; }
@media (prefers-reduced-motion: no-preference) {
  .zb-tf-fox { transition: rotate .3s cubic-bezier(.2, .8, .2, 1) .5s; } /* looks back up after the walker's cheer */
  .zb-tf:not(.has-media) .zb-tf-q.is-looking .zb-tf-fox { transition: rotate .45s cubic-bezier(.34, 1.56, .64, 1); }
}
.zb-tf-title {
  margin: 0;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.035em;
  color: #F5E9D8;
}
/* Typeform's "3 →", sitting above the question so the question and its help line up */
.zb-tf-num { display: block; margin: .2rem 0 .45rem; font-size: .85rem; line-height: 1; letter-spacing: 0; color: #D4A574; }
.zb-tf-help { margin: .6rem 0 0; max-width: 34rem; font-size: 1rem; line-height: 1.5; color: #A3A3A3; }
@media (min-width: 768px) { .zb-tf-help { font-size: 1.1rem; } }

/* Big underline inputs; 1.4rem+ also keeps iOS from zooming on focus */
.zb-tf-input {
  display: block;
  width: 100%;
  padding: .35rem 0 .55rem;
  border: 0;
  border-bottom: 2px solid rgba(212, 165, 116, .3);
  border-radius: 0;
  background: transparent;
  color: #F5E9D8;
  font: inherit;
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  caret-color: #D4A574;
  transition: border-color .2s ease;
}
.zb-tf-input::placeholder { color: #4D4D4D; }
.zb-tf-input:focus { outline: none; border-bottom-color: #D4A574; }
textarea.zb-tf-input { min-height: 3em; max-height: 40vh; resize: none; overflow-y: auto; line-height: 1.35; }

.zb-tf-error {
  display: flex;
  align-items: center;
  gap: .4rem;
  width: fit-content;
  margin: .8rem 0 0;
  padding: .4rem .75rem;
  border-radius: .6rem;
  background: rgba(248, 113, 113, .12);
  color: #fca5a5;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
}
.zb-tf-error[hidden] { display: none; }

.zb-tf-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 1.6rem; }
.zb-tf-ok {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  height: 3rem;
  padding: 0 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #D4A574;
  color: #0F0F0F;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px -12px rgba(212, 165, 116, .8);
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.zb-tf-ok:hover { background: #E5C49A; }
.zb-tf-ok:active { transform: scale(.98); }
.zb-tf-ok:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.zb-tf-ok.is-skip { background: transparent; border-color: rgba(212, 165, 116, .35); color: #E5E5E5; box-shadow: none; }
.zb-tf-ok.is-skip:hover { background: transparent; border-color: #D4A574; }
.zb-tf-ok.is-skip .zb-tf-ok-check { display: none; }
.zb-tf-hint { font-size: .8rem; color: #777; }
.zb-tf-hint b { font-weight: 600; color: #BDBDBD; }
@media (hover: none) { .zb-tf-hint { display: none; } }

/* Project tiles. JS sets .is-checked (and .is-picked for the confirm blink) */
.zb-tf-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 768px) { .zb-tf-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.zb-tf-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .8rem .9rem;
  border-radius: .9rem;
  border: 1px solid rgba(212, 165, 116, .28);
  background: rgba(212, 165, 116, .05);
  color: #E5E5E5;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.zb-tf-choice:hover { background: rgba(212, 165, 116, .12); border-color: rgba(212, 165, 116, .55); }
.zb-tf-choice input { position: absolute; opacity: 0; pointer-events: none; }
.zb-tf-choice:has(input:focus-visible) { outline: 2px solid rgba(212, 165, 116, .8); outline-offset: 2px; }
.zb-tf-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: .4rem;
  border: 1px solid rgba(212, 165, 116, .45);
  background: #0F0F0F;
  color: #D4A574;
  font-size: .75rem;
  font-weight: 700;
}
.zb-tf-choice.is-urgent .zb-tf-key { border-color: rgba(248, 113, 113, .6); color: #fca5a5; }
.zb-tf-choice.is-checked { border-color: #D4A574; background: rgba(212, 165, 116, .18); }
.zb-tf-choice.is-checked .zb-tf-key { border-color: #D4A574; background: #D4A574; color: #0F0F0F; }
/* Letter keys mean nothing on a touchscreen, and phones need the room for the labels */
@media (hover: none) and (pointer: coarse) { .zb-tf-key { display: none; } }
@media (max-width: 767px) { .zb-tf-choice:last-child { grid-column: 1 / -1; } }
.zb-tf-choice.is-picked { animation: zb-tf-blink .36s steps(1, end); }
@keyframes zb-tf-blink {
  0%, 50%  { background: rgba(212, 165, 116, .4); }
  25%, 75% { background: rgba(212, 165, 116, .12); }
}

.zb-tf-geo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 165, 116, .3);
  background: transparent;
  color: #D4A574;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease;
}
.zb-tf-geo:hover { background: rgba(212, 165, 116, .1); }
.zb-tf-geo:disabled { opacity: .6; cursor: progress; }
.zb-tf-geo-status { margin: .6rem 0 0; font-size: .8rem; color: #999; }
.zb-tf-geo-status.is-error { color: rgba(251, 191, 36, .9); }
.zb-tf-geo-status[hidden] { display: none; }
.zb-tf-geo-status a { color: #D4A574; text-decoration: underline; text-underline-offset: 2px; }

.zb-tf-drop { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.4rem 1rem; text-align: center; color: #D4A574; cursor: pointer; }
.zb-tf-drop.is-disabled { opacity: .6; pointer-events: none; }
.zb-tf-drop-main { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .35rem .6rem; margin: .35rem 0 0; font-size: 1.05rem; color: #777; }
.zb-tf-drop-main button { font-weight: 700; color: #D4A574; text-decoration: underline; text-underline-offset: 3px; }
.zb-tf-drop-main button:hover { color: #E5C49A; }
.zb-tf-drop-sub { margin: 0; font-size: .8rem; color: #808080; }
.zb-tf-files { display: grid; gap: .5rem; margin-top: .9rem; }
.zb-tf-files:empty { display: none; }

.zb-tf-voice {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 165, 116, .3);
  background: transparent;
  color: #D4A574;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}
.zb-tf-voice[hidden] { display: none; }
.zb-tf button:focus-visible,
.zb-tf a:focus-visible { outline: 2px solid rgba(212, 165, 116, .85); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .zb-tf-q.is-from-below,
  .zb-tf-q.is-from-above,
  .zb-tf-choice.is-picked { animation: none; }
  .zb-tf-progress-fill { transition: none; }
}

/* "Submit another" on the success screen */
.zb-step-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid rgba(212, 165, 116, 0.25);
  border-radius: 999px;
  background: transparent;
  color: #999;
  font-size: 13px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.zb-step-back:hover { color: #D4A574; border-color: rgba(212, 165, 116, 0.55); }
.zb-input-shake {
  animation: zb-input-shake 0.5s ease-in-out;
  border-color: rgba(239, 68, 68, 0.6) !important;
}
@keyframes zb-input-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Uploaded files */
.zb-tf .zb-dropzone {
  border: 2px dashed rgba(212, 165, 116, 0.35);
  border-radius: 1rem;
  background: rgba(15, 15, 15, 0.6);
  transition: border-color .2s ease, background-color .2s ease;
}
.zb-tf .zb-dropzone.is-dragover {
  border-color: #D4A574;
  background: rgba(212, 165, 116, 0.08);
}
.zb-tf .zb-file-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #0F0F0F;
  border: 1px solid rgba(212, 165, 116, 0.18);
  border-radius: 12px;
}
.zb-tf .zb-file-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #1A1A1A;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4A574;
  overflow: hidden;
}
.zb-tf .zb-file-thumb img,
.zb-tf .zb-file-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.zb-tf .zb-file-meta { min-width: 0; }
.zb-tf .zb-file-name {
  color: #E5E5E5;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zb-tf .zb-file-sub {
  color: #999;
  font-size: 11px;
  margin-top: 2px;
}
.zb-tf .zb-progress {
  height: 4px;
  background: rgba(212, 165, 116, 0.15);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.zb-tf .zb-progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: #D4A574;
  transition: width .15s linear;
}
.zb-tf .zb-file-card.is-error { border-color: rgba(239, 68, 68, 0.4); }
.zb-tf .zb-file-card.is-error .zb-progress > span { background: #ef4444; }
.zb-tf .zb-file-remove {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #999;
  background: transparent;
  border: 1px solid rgba(212, 165, 116, 0.18);
  transition: all .15s ease;
}
.zb-tf .zb-file-remove:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}
.zb-tf .zb-counter {
  font-variant-numeric: tabular-nums;
}

/* Photos question: what to shoot. Labels only on phones, a line of advice from 640px */
.zb-shot-tips { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.zb-shot-tips li { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; padding: .7rem .5rem; border-radius: .9rem; background: rgba(212, 165, 116, .06); border: 1px solid rgba(212, 165, 116, .14); }
.zb-shot-tips iconify-icon { flex-shrink: 0; color: #D4A574; }
.zb-shot-tips strong { display: block; color: #E5E5E5; font-size: .8rem; font-weight: 600; line-height: 1.25; }
.zb-shot-tips span { display: none; margin-top: .15rem; color: #999; font-size: .78rem; line-height: 1.4; }
@media (min-width: 640px) {
  .zb-shot-tips li { flex-direction: row; align-items: flex-start; gap: .65rem; text-align: left; padding: .8rem .9rem; }
  .zb-shot-tips iconify-icon { margin-top: .1rem; }
  .zb-shot-tips span { display: block; }
}
.zb-text-photos { margin: .85rem 0 0; text-align: center; font-size: .85rem; color: #999; }
.zb-text-photos a { display: inline-flex; align-items: center; gap: .35rem; margin-left: .2rem; color: #D4A574; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.zb-text-photos a:hover { color: #E5C49A; }

/* Phones and tablets: one big "Upload photos" button (there's nothing to drop files from) */
@media (hover: none) and (pointer: coarse) {
  .zb-tf-drop-or,
  .zb-tf-drop-main > span[aria-hidden] { display: none; }
  .zb-tf-drop-main { flex-direction: column; gap: .7rem; }
  .zb-tf-drop-main #zb-pick-photos { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .75rem 1.75rem; border-radius: 999px; background: #D4A574; color: #0F0F0F; text-decoration: none; font-size: 1.05rem; }
  .zb-tf-drop-main #zb-pick-videos { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .5rem 1.25rem; border: 1px solid rgba(212, 165, 116, .35); border-radius: 999px; text-decoration: none; font-size: .95rem; }
}

/* Computers: the QR code beside the upload box (zb-quote-form.js shows it once it has a code).
   Side by side when the question is wide enough, otherwise under the box. */
.zb-tf-q[data-q="photos"] { container-type: inline-size; }
.zb-tf-pick { display: grid; gap: .75rem; }
.zb-tf-pick .zb-tf-drop { justify-content: center; } /* stretched to the QR's height */
@container (min-width: 34rem) { .zb-tf-pick.has-qr { grid-template-columns: minmax(0, 1fr) 11.5rem; } }
.zb-qr { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: .9rem .8rem; border-radius: 1rem; border: 1px solid rgba(212, 165, 116, .22); background: rgba(212, 165, 116, .05); text-align: center; }
.zb-qr[hidden] { display: none; }
.zb-qr-title { margin: 0; color: #E5E5E5; font-size: .85rem; font-weight: 700; }
/* Dark on white, whatever the theme: phone cameras don't all read inverted codes */
.zb-qr-tile { display: block; width: 8.75rem; height: 8.75rem; padding: .25rem; border-radius: .6rem; background: #fff; transition: opacity .3s ease; }
.zb-qr-tile svg { display: block; width: 100%; height: 100%; shape-rendering: crispEdges; }
.zb-qr-tile path { fill: #0F0F0F; }
.zb-qr.is-loading .zb-qr-tile { background: rgba(255, 255, 255, .1); }
.zb-qr.is-expired .zb-qr-tile { opacity: .15; }
.zb-qr-sub { margin: 0; color: #999; font-size: .75rem; line-height: 1.4; }
.zb-qr-status { display: inline-flex; align-items: center; gap: .4rem; margin: 0; color: #808080; font-size: .75rem; font-weight: 600; }
.zb-qr-status::before { content: ''; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.zb-qr-status.is-on,
.zb-qr-status.is-done { color: #D4A574; }
.zb-qr-status.is-done::before { display: none; }
.zb-qr-new { color: #D4A574; font-size: .8rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.zb-qr-new[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .zb-qr.is-loading .zb-qr-tile { animation: zb-qr-wait 1.2s ease-in-out infinite alternate; }
  .zb-qr-status:not(.is-on):not(.is-done)::before { animation: zb-qr-wait .9s ease-in-out infinite alternate; }
}
@keyframes zb-qr-wait { to { opacity: .35; } }

/* photos.html, the phone side: only the Photos question, and its button sends them to the computer */
.zb-tf.is-phone .zb-tf-top,
.zb-tf.is-phone .zb-tf-num,
.zb-tf.is-phone .zb-text-photos,
.zb-tf.is-phone .zb-tf-hint { display: none; }
.zb-tf.is-phone .zb-tf-ok[hidden] { display: none; }
.zb-tf.is-phone.has-upload-error .zb-text-photos { display: block; } /* an upload failed: texting is the way out */
.zb-tf .zb-file-card.is-sent .zb-file-remove { visibility: hidden; } /* it's on the computer now; remove it there */

/* Success-screen follow-ups; they fade in after the headline like the rest of it */
.zb-success-extra { max-width: 380px; margin: 0 auto 18px; opacity: 0; }
.zb-success-extra[hidden] { display: none; }
.zb-success-extra p { margin: 0 0 10px; color: #999; font-size: 14px; line-height: 1.5; }
#zb-success-state.is-firing .zb-success-extra { animation: zb-success-fade-up 500ms cubic-bezier(.2, .8, .2, 1) 1100ms forwards; }
@media (prefers-reduced-motion: reduce) {
  #zb-success-state.is-firing .zb-success-extra { animation: none; opacity: 1; }
}
.zb-success-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.75rem; padding: 0 1.25rem; border-radius: 999px; border: 1px solid transparent; background: #D4A574; color: #0F0F0F; font: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.zb-success-btn:hover { background: #E5C49A; }
.zb-success-btn.is-ghost { background: transparent; color: #E5E5E5; border-color: rgba(212, 165, 116, .35); }
.zb-success-btn.is-ghost:hover { background: transparent; border-color: #D4A574; }
.zb-success-btn:disabled { cursor: default; opacity: .85; }

/* Voice input button — gold by default, red pulse while recording */
.zb-voice-btn.is-recording {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
}
.zb-voice-btn.is-recording .zb-voice-icon {
  color: #ef4444;
  animation: zb-mic-pulse 1.2s ease-in-out infinite;
}
@keyframes zb-mic-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.18); opacity: 0.65; }
}

/* ===== "Prefer a site visit?": the other way in, next to the form on the homepage and /quote.
   Gold-accented so it reads as a real option, but a slim row, so the form stays the main path ===== */
.zb-visit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon text" "actions actions";
  align-items: center;
  gap: .9rem 1rem;
  margin: 0 auto 1.5rem;
  padding: 1.1rem 1.15rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(212, 165, 116, .45);
  background: linear-gradient(120deg, rgba(212, 165, 116, .16), rgba(212, 165, 116, .05) 60%), #141414;
  box-shadow: 0 18px 40px -24px rgba(212, 165, 116, .55);
  text-align: left;
}
.zb-visit[hidden] { display: none; }
@media (min-width: 768px) {
  .zb-visit { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "icon text actions"; gap: 1.25rem; padding: 1.2rem 1.5rem; }
}
.zb-visit-icon {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #D4A574;
  color: #0F0F0F;
}
.zb-visit-text { grid-area: text; min-width: 0; }
.zb-visit-title { margin: 0; font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.25rem; font-weight: 700; line-height: 1.2; color: #F5E9D8; }
.zb-visit-sub { margin: .25rem 0 0; font-size: .9rem; line-height: 1.45; color: #B3B3B3; }
.zb-visit-actions { grid-area: actions; display: flex; flex-direction: column; align-items: stretch; gap: .45rem; }
@media (min-width: 768px) { .zb-visit-actions { align-items: center; } }
.zb-visit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 3rem;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 999px;
  background: #D4A574;
  color: #0F0F0F;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 28px -12px rgba(212, 165, 116, .8);
  transition: background-color .15s ease, transform .15s ease;
}
.zb-visit-btn:hover { background: #E5C49A; }
.zb-visit-btn:active { transform: scale(.98); }
.zb-visit-alt { padding: .1rem; border: 0; background: none; color: #B3B3B3; font: inherit; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.zb-visit-alt:hover { color: #E5C49A; }
.zb-visit-alt[hidden] { display: none; }
.zb-visit button:focus-visible,
.zb-visit a:focus-visible { outline: 2px solid rgba(212, 165, 116, .85); outline-offset: 3px; }
