/*
 * ЦИФРА — версия 4.0.
 * Маскот вместо автоматического слайдера и как спокойный помощник калькулятора.
 */

/* Главная: один сильный образ вместо постоянно движущейся карусели */
body.home-page .mascot-hero {
  position: relative;
  display: block !important;
  width: 100%;
  min-height: 450px !important;
}

body.home-page .mascot-hero-frame {
  position: relative;
  height: 450px;
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-radius-lg);
  background: #fff;
  box-shadow: var(--v3-shadow-sm);
}

body.home-page .mascot-hero-frame::after {
  content: "";
  position: absolute;
  inset: 13px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 21px;
  pointer-events: none;
}

body.home-page .mascot-hero-frame > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 44%;
  filter: saturate(0.94) contrast(0.99);
  transition: transform 500ms var(--v3-ease);
}

body.home-page .mascot-hero-frame:hover > img {
  transform: scale(1.018);
}

body.home-page .mascot-hero-caption {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 24px;
  z-index: 3;
  display: grid;
  gap: 4px;
  width: max-content;
  max-width: calc(100% - 48px);
  padding: 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 34px rgba(15, 46, 56, 0.09);
  backdrop-filter: blur(17px) saturate(120%);
  -webkit-backdrop-filter: blur(17px) saturate(120%);
}

body.home-page .mascot-hero-caption small {
  color: var(--v3-teal-dark);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.home-page .mascot-hero-caption strong {
  color: var(--v3-ink);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* Главная: тематическая иллюстрация в блоке о порядке в учёте */
body.home-page .chaos-mascot-illustration {
  width: min(100%, 430px);
  height: auto;
  display: block;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 22px;
}

body.home-page .chaos-img-new .chaos-scene {
  display: none;
}

/* Калькулятор: маскот сопровождает пользователя, не перекрывая поля */
body.tariffs-page .tariff-hero {
  grid-template-columns: minmax(0, 1.18fr) minmax(390px, 0.82fr) !important;
  align-items: center !important;
}

body.tariffs-page .tariff-hero-assistant {
  position: relative;
  min-height: 470px;
  align-self: stretch;
}

body.tariffs-page .tariff-mascot-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid var(--v3-line);
  border-radius: var(--v3-radius-lg);
  background: #fff;
  box-shadow: var(--v3-shadow-sm);
}

body.tariffs-page .tariff-mascot-frame::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 21px;
  pointer-events: none;
}

body.tariffs-page .tariff-mascot-frame > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 39%;
  filter: saturate(0.93) contrast(0.99);
}

body.tariffs-page .tariff-mascot-frame > span {
  position: absolute;
  top: 18px;
  right: 18px;
  left: 18px;
  display: grid;
  gap: 2px;
  padding: 12px 15px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(15, 46, 56, 0.08);
  backdrop-filter: blur(16px) saturate(115%);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
}

body.tariffs-page .tariff-mascot-frame b {
  color: var(--v3-ink);
  font-size: 14px;
  font-weight: 720;
}

body.tariffs-page .tariff-mascot-frame small {
  color: var(--v3-muted);
  font-size: 11px;
  line-height: 1.4;
}

body.tariffs-page .tariff-hero-assistant .tariff-hero-proof {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 0;
  padding: 7px 13px !important;
  border: 1px solid rgba(255, 255, 255, 0.82) !important;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 16px 34px rgba(15, 46, 56, 0.1);
  backdrop-filter: blur(17px) saturate(120%);
  -webkit-backdrop-filter: blur(17px) saturate(120%);
}

body.tariffs-page .tariff-hero-assistant .tariff-hero-proof > div,
body.tariffs-page .tariff-hero-assistant .tariff-hero-proof > div:first-child {
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 8px 2px !important;
  border-right: 0;
  border-bottom: 1px solid var(--v3-line) !important;
}

body.tariffs-page .tariff-hero-assistant .tariff-hero-proof > div:last-child {
  border-bottom: 0 !important;
}

body.tariffs-page .tariff-hero-assistant .tariff-hero-proof b {
  font-size: 12px;
}

body.tariffs-page .tariff-hero-assistant .tariff-hero-proof small {
  font-size: 10px;
}

body.tariffs-page .cc-mascot-helper {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: -4px 0 19px;
  padding: 9px 11px 9px 9px;
  border: 1px solid rgba(17, 141, 149, 0.13);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(232, 247, 246, 0.9), rgba(255, 255, 255, 0.86));
}

body.tariffs-page .cc-mascot-helper img {
  width: 58px;
  height: 58px;
  display: block;
  object-fit: cover;
  object-position: center 16%;
  border: 2px solid #fff;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(15, 46, 56, 0.08);
}

body.tariffs-page .cc-mascot-helper span {
  display: grid;
  gap: 3px;
}

body.tariffs-page .cc-mascot-helper b {
  color: var(--v3-ink);
  font-size: 12px;
  line-height: 1.3;
}

body.tariffs-page .cc-mascot-helper small {
  color: var(--v3-muted);
  font-size: 10px;
  line-height: 1.4;
}

/* Управленческий учёт: большая брендированная сцена с аналитикой */
body:not(.home-page):not(.tariffs-page) .mascot-management-card img {
  padding: 0 !important;
  opacity: 1 !important;
  object-fit: cover !important;
  object-position: center 48% !important;
  filter: saturate(0.94) contrast(0.99) !important;
}

/* Единое окно заявки: маскот заполняет свободную часть, не мешая форме */
.application-modal-intro {
  position: relative;
  min-height: 480px;
  justify-content: flex-start;
  padding-top: 42px;
  padding-bottom: 145px;
  overflow: hidden;
}

.application-modal-intro > :not(.application-modal-mascot) {
  position: relative;
  z-index: 2;
}

.application-modal-mascot {
  position: absolute;
  right: -10px;
  bottom: -42px;
  z-index: 1;
  width: 145px;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
}

@media (max-width: 1080px) {
  body.tariffs-page .tariff-hero {
    grid-template-columns: 1fr !important;
  }

  body.tariffs-page .tariff-hero-assistant {
    width: min(100%, 760px);
    min-height: 520px;
    margin-inline: auto;
  }

  body.tariffs-page .tariff-hero-assistant .tariff-hero-proof {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  body.tariffs-page .tariff-hero-assistant .tariff-hero-proof > div,
  body.tariffs-page .tariff-hero-assistant .tariff-hero-proof > div:first-child {
    display: block;
    padding: 9px 12px !important;
    border-right: 1px solid var(--v3-line);
    border-bottom: 0 !important;
  }

  body.tariffs-page .tariff-hero-assistant .tariff-hero-proof > div:last-child {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  body.home-page .mascot-hero,
  body.home-page .mascot-hero-frame {
    min-height: 350px !important;
    height: 350px;
  }

  body.home-page .mascot-hero-frame > img {
    object-position: center 42%;
  }

  body.home-page .mascot-hero-caption {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: calc(100% - 32px);
  }

  body.tariffs-page .tariff-hero-assistant {
    min-height: 470px;
  }

  body.tariffs-page .tariff-hero-assistant .tariff-hero-proof {
    grid-template-columns: 1fr !important;
  }

  body.tariffs-page .tariff-hero-assistant .tariff-hero-proof > div,
  body.tariffs-page .tariff-hero-assistant .tariff-hero-proof > div:first-child {
    display: grid;
    padding: 7px 2px !important;
    border-right: 0;
    border-bottom: 1px solid var(--v3-line) !important;
  }

  body.tariffs-page .tariff-hero-assistant .tariff-hero-proof > div:last-child {
    border-bottom: 0 !important;
  }

  .application-modal-intro {
    min-height: 220px;
    justify-content: center;
    padding: 0 132px 0 0;
  }

  .application-modal-mascot {
    right: 0;
    bottom: -26px;
    width: 125px;
  }
}

@media (max-width: 520px) {
  body.home-page .mascot-hero,
  body.home-page .mascot-hero-frame {
    min-height: 320px !important;
    height: 320px;
  }

  body.home-page .mascot-hero-caption strong {
    font-size: 14px;
  }

  body.tariffs-page .tariff-hero-assistant {
    min-height: 430px;
  }

  body.tariffs-page .tariff-mascot-frame > img {
    object-position: center 42%;
  }

  body.tariffs-page .tariff-mascot-frame > span {
    top: 13px;
    right: 13px;
    left: 13px;
  }

  body.tariffs-page .tariff-hero-assistant .tariff-hero-proof {
    right: 13px;
    bottom: 13px;
    left: 13px;
  }

  body.tariffs-page .cc-mascot-helper {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  body.tariffs-page .cc-mascot-helper img {
    width: 52px;
    height: 52px;
  }

  .application-modal-intro {
    min-height: auto;
    padding: 0;
    overflow: visible;
  }

  .application-modal-mascot {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.home-page .mascot-hero-frame > img {
    transition: none;
  }
}
