/* The corner asterisk: the house burst is the desk's front door. No words at rest;
   hover says hello, a click starts the call, text is one tap away inside the card. */
.ask {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 72;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .25s ease, scale .35s cubic-bezier(.34, 1.56, .64, 1);
}
.ask__mark {
  position: absolute;
  inset: 0;
  display: block;
  filter: drop-shadow(2px 3px 0 var(--ink));
  transition: scale .45s cubic-bezier(.34, 1.56, .64, 1);
}
.ask__turn { display: block; width: 100%; height: 100%; transition: rotate .7s cubic-bezier(.2, 1.3, .35, 1); }
.ask__mark svg { display: block; width: 100%; height: 100%; overflow: visible; animation: askIdle 40s linear infinite; }
/* a die-cut sticker: the house asterisk on a cream border, so it reads over every bright on the page */
.ask__cut { fill: var(--cream); stroke: var(--cream); stroke-width: 13; stroke-linejoin: round; }
.ask__ink { fill: var(--tomato); }
@keyframes askIdle { to { rotate: 360deg; } }

/* the hello: serif ink surfacing out of the asterisk on a soft cream falloff, no box */
.ask__label {
  position: absolute;
  right: calc(100% + 2px);
  top: 50%;
  translate: 0 -50%;
  padding: 18px 16px 18px 34px;
  white-space: nowrap;
  font: 400 1.5rem/1 var(--serif);
  color: var(--ink);
  background: radial-gradient(closest-side, rgb(250 247 239 / .96) 55%, rgb(250 247 239 / .72) 78%, rgb(250 247 239 / 0));
  pointer-events: none;
  clip-path: inset(0 0 0 100%);
  opacity: 0;
  transition: clip-path .42s cubic-bezier(.22, .8, .24, 1), opacity .2s ease;
}
.ask:hover .ask__mark, .ask:focus-visible .ask__mark { scale: 1.1; }
.ask:hover .ask__turn, .ask:focus-visible .ask__turn { rotate: 90deg; }
.ask:hover .ask__label, .ask:focus-visible .ask__label, .ask.is-hello .ask__label {
  clip-path: inset(0 0 0 0);
  opacity: 1;
}
.ask:focus-visible { outline: none; }
.ask:focus-visible::after { content: ""; position: absolute; inset: -7px; border: 2px solid var(--ink); border-radius: 50%; }
.ask:active .ask__mark { scale: .92; transition-duration: .12s; }

/* the first time it appears it spins in like the hero bursts */
.js .ask:not(.is-arriving):not(.is-here) .ask__turn { opacity: 0; }
.ask.is-arriving .ask__turn { animation: askIn 1.1s cubic-bezier(.2, 1.25, .35, 1) var(--ask-delay, 0s) both; }
@keyframes askIn { from { rotate: 220deg; scale: .2; opacity: 0; } 35% { opacity: 1; } to { rotate: 0deg; scale: 1; } }
/* a click gives it one quick turn on its way into the call card */
.ask.is-pressed .ask__turn { rotate: 270deg; transition-duration: .5s; }

/* the call card and the text desk both open in this corner: the asterisk steps aside */
.call-dock.up ~ .ask,
.text-desk.up ~ .ask,
.ask.is-clear { opacity: 0; scale: .4; pointer-events: none; }

@media (max-width: 620px) {
  .ask { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: 62px; height: 62px; }
  .ask__label { font-size: 1.32rem; }
  /* the hero already offers two clear actions; the asterisk arrives once it has passed */
  body.hero-in-view .ask { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ask__mark svg, .ask.is-arriving .ask__turn { animation: none; }
  .ask__turn, .ask__mark, .ask__label { transition: opacity .15s ease; }
  .ask:hover .ask__turn, .ask:focus-visible .ask__turn, .ask.is-pressed .ask__turn { rotate: 0deg; }
}
