/* Навигация, в которую перетекает поле ввода после запроса (nav.js).
   Сам силуэт рисуется в SVG, здесь — только содержимое. Размеры — от высоты --H. */
.pill {
  --H: 72px;
  --k: 0.257;

  position: fixed;
  left: 50%;
  top: 0;
  z-index: 10;
  width: 0;
  height: 0;
  font-family: Manrope, Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  will-change: transform;
}

.pill[hidden] {
  display: none;
}

.pill > * {
  position: absolute;
  left: 0;
  top: 0;
}

.pill-bg {
  overflow: visible;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pill-shape {
  stroke-width: 1px;
}

.pill-ring {
  fill: none;
  stroke: #383838;
  stroke-width: 1px;
}

/* Призрак поля ввода: текст запроса и кнопка */
.pill-ghost {
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 0 8px 0 18px;
  color: #fff;
  font: 15px/22px Inter, system-ui, sans-serif;
  pointer-events: none;
}

.pill-ghost-text {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pill-ghost-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #fff;
  color: #111;
}

.pill-logo {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #f4f4f4;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pill-logo svg {
  display: block;
  width: 72%;
  height: 72%;
  fill: currentColor;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pill-logo:hover svg {
  transform: rotate(-14deg) scale(1.04);
}

.pill-logo:active svg {
  transform: scale(0.92);
  transition-duration: 0.12s;
}

.pill-link {
  color: #d9d9d9;
  font-size: calc(var(--H) * 0.23);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.pill-link:hover {
  color: #fff;
}

.pill-dl {
  display: flex;
  align-items: center;
  gap: calc(var(--H) * 0.107);
  color: #fbfbfb;
  font-weight: 500;
}

.pill-gem {
  display: block;
  flex: none;
  width: calc(var(--H) * 0.339);
  height: calc(var(--H) * 0.339);
}

.pill-gem svg {
  display: block;
}

.pill-div {
  width: 1px;
  height: calc(var(--H) * 0.3);
  margin-left: -0.5px;
  background: #383838;
}

/* Поле ввода прячется, пока на его месте навигация */
.ask.gone {
  visibility: hidden;
  opacity: 0;
}

/* Уход на лендинг: шапка растворяется, поле ввода плавно проявляется на месте */
.pill.leaving {
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
  transition: opacity 260ms ease, filter 260ms ease;
}

.ask.fadein {
  animation: ask-in 600ms ease 160ms both;
}

@keyframes ask-in {
  from { opacity: 0; transform: translate(-50%, -50%) translateY(6px); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
