.header-contact {
  position: absolute;
  z-index: 8;
  top: calc(100% - 11px);
  right: 2px;
  width: 280px;
  padding: 18px 20px 17px;
  border: 0;
  border-radius: 34px;
  background: var(--kissel-surface);
  color: var(--cream);
  box-shadow: var(--product-tile-shadow);
  transition: top .35s ease, width .35s ease, padding .35s ease, box-shadow .25s ease;
}
.header-contact::before {
  content: "";
  position: absolute;
  z-index: 1;
  width: 30px;
  height: 17px;
  top: -9px;
  right: 15px;
  border-radius: 100% 0 100% 0;
  background: radial-gradient(ellipse at 36% 22%, #b0bc70, transparent 66%),
              linear-gradient(150deg, #899b49 28%, #5c7031 84%);
  transform: rotate(-22deg);
  box-shadow: inset 0 1px 1px rgba(255, 255, 230, .36),
              inset 0 -1px 2px rgba(48, 64, 24, .22),
              1px 2px 4px rgba(53, 67, 27, .25);
  pointer-events: none;
}
.header-contact-title {
  display: block;
  margin-bottom: 11px;
  color: inherit;
  font-size: 1.02rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.015em;
  white-space: nowrap;
}
.header-contact-title, .header-contact-toggle { text-shadow: 0 1px 2px rgba(78, 35, 15, .65); }
.site-header .header-contact .header-contact-title:hover {
  color: inherit;
  text-decoration: underline;
}
.header-contact-toggle svg circle { fill: #c35d29; }
.header-contact-actions { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 6px; }
.header-contact-action {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 47px;
  height: 47px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 28% 20%, #fffefb 0, #fcf0dd 70%, #f4e3c8 100%);
  color: var(--teal);
  box-shadow: 0 2px 5px rgba(108, 56, 28, .17);
  transition: transform .2s ease, box-shadow .2s ease;
}
a.header-contact-action { cursor: pointer; }
.header-contact-action svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-contact-action:nth-child(2) svg { fill: currentColor; stroke: none; width: 23px; height: 23px; }
.header-contact-action img { width: 20px; height: 20px; object-fit: contain; }
.header-contact-action.is-phone svg { width: 26px; height: 26px; }
.header-contact-action.is-mail svg { width: 28px; height: 28px; stroke-width: 2.1; transform: scale(1.06, 1.18); transform-origin: center; }
.header-contact-action .glyph-accent { fill: #e1782d; }
.header-contact-action:is(:hover, :focus-visible) {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 5px 10px rgba(108, 56, 28, .26);
}
.header-contact-action:focus-visible { outline: 2px solid #834823; outline-offset: 2px; }
.site-header.is-scrolled .header-contact { top: calc(100% + 1px); width: 245px; padding: 13px 16px; }
.site-header.is-scrolled .header-contact-title { margin-bottom: 8px; font-size: .91rem; }
.site-header.is-scrolled .header-contact-action { width: 39px; height: 39px; }
.site-header.is-scrolled .header-contact-action svg { width: 22px; height: 22px; }
.site-header.is-scrolled .header-contact-action.is-mail svg { width: 25px; height: 25px; }
.site-header.is-scrolled .header-contact-action img { width: 17px; height: 17px; }
@media (max-width: 820px) {
  .header-contact { right: 0; width: 220px; padding: 13px 15px; top: calc(100% + 2px); border-radius: 28px; }
  .header-contact-title { font-size: .86rem; margin-bottom: 8px; }
  .header-contact-actions { gap: 8px; }
  .header-contact-action { width: 39px; height: 39px; }
  .header-contact-action svg { width: 20px; height: 20px; }
  .header-contact-action.is-mail svg, .site-header.is-scrolled .header-contact-action.is-mail svg { width: 23px; height: 23px; }
  .site-header.is-scrolled .header-contact { width: 210px; padding: 10px 13px; }
}
@media (max-width: 560px) {
  .header-contact, .site-header.is-scrolled .header-contact {
    top: calc(100% + 7px);
    right: 0;
    width: 174px;
    padding: 10px 12px;
    border-radius: 25px;
  }
  .header-contact-title, .site-header.is-scrolled .header-contact-title { margin-bottom: 7px; font-size: .76rem; }
  .header-contact-actions { gap: 6px; }
  .header-contact-action, .site-header.is-scrolled .header-contact-action { width: 32px; height: 32px; }
  .header-contact-action svg, .site-header.is-scrolled .header-contact-action svg { width: 17px; height: 17px; }
  .header-contact-action.is-phone svg, .header-contact-action.is-mail svg,
  .site-header.is-scrolled .header-contact-action.is-phone svg, .site-header.is-scrolled .header-contact-action.is-mail svg { width: 21px; height: 21px; }
  .header-contact-action.is-mail svg, .site-header.is-scrolled .header-contact-action.is-mail svg { width: 23px; height: 23px; }
  .header-contact-action:nth-child(2) svg, .site-header.is-scrolled .header-contact-action:nth-child(2) svg { width: 19px; height: 19px; }
  .header-contact-action img, .site-header.is-scrolled .header-contact-action img { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .header-contact-action { transition: none; }
}

@media (min-width: 601px) {
  .site-header .header-contact,
  .site-header.is-scrolled .header-contact {
    top: calc(100% - 5px);
    height: 114px;
    animation: header-contact-float 4.6s ease-in-out infinite;
    transition: top .3s ease, width .3s ease, height .3s ease, padding .3s ease, border-radius .3s ease;
  }
  .site-header .header-contact.is-open { animation-play-state: paused; }
  .site-header.is-scrolled .header-contact { height: 92px; }
  .site-header .header-contact:not(.is-open) {
    width: 144px;
    height: 44px;
    padding: 0;
    border-radius: 24px;
  }
  .site-header .header-contact:not(.is-open) :is(.header-contact-title, .header-contact-actions) {
    opacity: 0;
    visibility: hidden;
  }
  .site-header .header-contact.is-open :is(.header-contact-title, .header-contact-actions) {
    transition: opacity .16s ease .14s;
  }
  .site-header .header-contact-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .88rem;
    font-weight: 800;
    cursor: pointer;
  }
  .site-header .header-contact-toggle svg { width: 21px; height: 21px; }
  .site-header .header-contact:not(.is-open) .header-contact-toggle::after { content: 'Связаться'; }
  .site-header .header-contact:not(.is-open) .header-contact-toggle:focus-visible {
    outline: none;
    text-decoration: underline;
    text-underline-offset: .18em;
  }
  .site-header .header-contact.is-open .header-contact-toggle {
    position: absolute;
    inset: 9px 10px auto auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(79, 29, 8, .12);
    color: inherit;
  }
  .site-header .header-contact.is-open .header-contact-toggle:focus-visible { outline: 2px solid currentColor; }
  .site-header .header-contact.is-open .header-contact-toggle svg { display: none; }
  .site-header .header-contact.is-open .header-contact-toggle::after {
    content: '×';
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
  }
}

@keyframes header-contact-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

@media (601px <= width <= 820px) {
  .site-header .header-contact.is-open { height: 94px; }
}

@media (min-width: 601px) and (prefers-reduced-motion: reduce) {
  .site-header .header-contact,
  .site-header.is-scrolled .header-contact { animation: none; transition: none; }
  .site-header .header-contact.is-open :is(.header-contact-title, .header-contact-actions) { transition: none; }
}
