/* Логотип «ПлАЦДАРМ» в шапке — единый финальный стиль для ВСЕХ страниц
   1) без text-stroke («проволоки»)
   2) чёрная обводка только букв (не объёма)
   3) тонкая обводка через drop-shadow
   4) сглаженный бирюзовый торец
*/

html body .site-header .logo .logo-link,
html body .site-header .logo .logo-link:hover,
html body .site-header .logo .logo-link:focus-visible {
  transform: translateY(-1mm) !important;
}

/* Родитель-обёртка без чужих теней/stroke */
html body .site-header .logo .logo-brand:has(.header-brand-3d-label),
html body .site-header .logo .logo-brand-primary:has(.header-brand-3d-label),
html body .site-header .logo .logo-brand-secondary:has(.header-brand-3d-label),
html body .site-header .logo-link:hover .logo-brand:has(.header-brand-3d-label),
html body .site-header .logo-link:focus-visible .logo-brand:has(.header-brand-3d-label),
html body .site-header .logo-link:active .logo-brand:has(.header-brand-3d-label) {
  -webkit-text-stroke: 0 !important;
  paint-order: normal !important;
  text-shadow: none !important;
  filter: none !important;
  box-shadow: none !important;
  background: none !important;
  background-image: none !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

/* Корень: торец (::before) + анимация; без filter на корне */
html body .site-header .header-brand-3d-label {
  position: relative !important;
  display: inline-block !important;
  white-space: nowrap !important;
  text-align: center !important;
  font: inherit !important;
  font-size: 1.1em !important;
  font-weight: inherit !important;
  letter-spacing: calc(0.02em + 0.25mm) !important;
  line-height: 1 !important;
  transform-origin: center center !important;
  transform: translateY(0) scale(1) !important;
  background: none !important;
  background-image: none !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  -webkit-text-stroke: 0 !important;
  paint-order: normal !important;
  text-shadow: none !important;
  filter: none !important;
  box-shadow: none !important;
  animation: site-header-brand-3d-idle 5.5s ease-in-out infinite !important;
  transition: transform 0.24s ease, opacity 0.22s ease !important;
}

/* Сглаженный бирюзовый торец — отдельно от обводки букв */
html body .site-header .header-brand-3d-label::before {
  content: attr(data-text) !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  z-index: 0 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  color: #4a96b3 !important;
  -webkit-text-fill-color: #4a96b3 !important;
  background: none !important;
  -webkit-text-stroke: 0 !important;
  filter: none !important;
  text-shadow:
    0.4px 0.4px 0 #6eb8cd,
    0.8px 0.8px 0 #62aec6,
    1.2px 1.2px 0 #5aa9c2,
    1.6px 1.6px 0 #52a1bb,
    2px 2px 0 #4b99b4,
    2.4px 2.4px 0 #4598b6,
    2.8px 2.8px 0 #3f8eac,
    3.2px 3.2px 0 #3a8aa8,
    3.6px 3.6px 0 #3889a7,
    4px 4px 0.55px rgba(56, 137, 167, 0.4),
    4.5px 4.5px 1px rgba(56, 137, 167, 0.22) !important;
}

html body .site-header .header-brand-3d-label::after {
  content: none !important;
  display: none !important;
}

/* Грань букв: градиент + тонкая чёрная обводка только силуэта букв */
html body .site-header .header-brand-3d-face {
  position: relative !important;
  z-index: 1 !important;
  display: inline-block !important;
  white-space: nowrap !important;
  font: inherit !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
  background: linear-gradient(135deg, #2f7085 0%, #3f93ad 52%, #92cbdb 100%) !important;
  background-image: linear-gradient(135deg, #2f7085 0%, #3f93ad 52%, #92cbdb 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  -webkit-text-stroke: 0 !important;
  paint-order: normal !important;
  text-shadow: none !important;
  box-shadow: none !important;
  filter:
    drop-shadow(0.24px 0 0.35px rgba(0, 0, 0, 0.42))
    drop-shadow(-0.24px 0 0.35px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0.24px 0.35px rgba(0, 0, 0, 0.42))
    drop-shadow(0 -0.24px 0.35px rgba(0, 0, 0, 0.42)) !important;
  transition: filter 0.24s ease !important;
}

html body .site-header .logo-link:hover .header-brand-3d-label,
html body .site-header .logo-link:focus-visible .header-brand-3d-label {
  animation: none !important;
  transform: translateY(-2px) scale(1.045) !important;
  filter: none !important;
}

html body .site-header .logo-link:hover .header-brand-3d-face,
html body .site-header .logo-link:focus-visible .header-brand-3d-face {
  filter:
    drop-shadow(0.24px 0 0.35px rgba(0, 0, 0, 0.42))
    drop-shadow(-0.24px 0 0.35px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0.24px 0.35px rgba(0, 0, 0, 0.42))
    drop-shadow(0 -0.24px 0.35px rgba(0, 0, 0, 0.42)) !important;
}

@keyframes site-header-brand-3d-idle {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-1px) scale(1.008);
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .site-header .header-brand-3d-label,
  html body .site-header .logo-link:hover .header-brand-3d-label,
  html body .site-header .logo-link:focus-visible .header-brand-3d-label {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Мобильная: чуть тоньше обводка букв, тот же сглаженный торец */
@media (max-width: 768px) {
  html body .site-header .header-brand-3d-label,
  html body .site-header .logo .logo-brand .header-brand-3d-label,
  html body .site-header .logo .logo-brand-primary .header-brand-3d-label {
    filter: none !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
  }

  html body .site-header .header-brand-3d-face,
  html body .site-header .logo .logo-brand-primary .header-brand-3d-face,
  html body .site-header .logo-link:hover .header-brand-3d-face,
  html body .site-header .logo-link:focus-visible .header-brand-3d-face {
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
    filter:
      drop-shadow(0.28px 0 0 #000)
      drop-shadow(-0.28px 0 0 #000)
      drop-shadow(0 0.28px 0 #000)
      drop-shadow(0 -0.28px 0 #000) !important;
  }
}

/* logo_shapka: та же плавная hover-реакция, что у «ПлАЦДАРМ» в hero */
html body .site-header .logo .logo-shapka-img {
  transform-origin: center center !important;
  transform: translateY(2mm) scale(1) !important;
  animation: site-logo-shapka-idle 6.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite !important;
  transition:
    transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.45s ease !important;
}

html body .site-header .logo .logo-link:hover .logo-shapka-img,
html body .site-header .logo .logo-link:focus-visible .logo-shapka-img {
  animation: none !important;
  transform: translateY(calc(2mm - 2px)) scale(1.045) !important;
  opacity: 1 !important;
  transition:
    transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.45s ease !important;
}

@keyframes site-logo-shapka-idle {
  0%,
  100% {
    transform: translateY(2mm) scale(1);
  }
  50% {
    transform: translateY(calc(2mm - 1px)) scale(1.008);
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .site-header .logo .logo-shapka-img,
  html body .site-header .logo .logo-link:hover .logo-shapka-img,
  html body .site-header .logo .logo-link:focus-visible .logo-shapka-img {
    animation: none !important;
    transform: translateY(2mm) scale(1) !important;
    transition: none !important;
  }
}
