/* HPACE — новый дизайн: header, hero, footer */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Unbounded:wght@400&display=swap');

:root {
  color-scheme: light dark;
  --hp-bg: #fafafa;
  --hp-bg-elevated: #ffffff;
  --hp-ink: #0a0a0a;
  --hp-ink-soft: #1a1a1a;
  --hp-muted: #6b7280;
  --hp-line: rgba(10, 10, 10, 0.1);
  --hp-accent: #0094ff;
  --hp-header-bg: rgba(250, 250, 250, 0.88);
  --hp-footer-bg: #0a0a0a;
  --hp-footer-ink: #f5f5f5;
  --hp-pill-bg: #ffffff;
  --hp-pill-border: rgba(10, 10, 10, 0.08);
  --hp-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
  --hp-radius: 16px;
  --hp-radius-lg: 24px;
  --hp-max: 1280px;
  --hp-pad: clamp(16px, 4vw, 40px);
  --hp-pad-header: clamp(16px, 2vw, 32px);
  --hp-font: 'Manrope', system-ui, -apple-system, sans-serif;
  --hp-display: 'Unbounded', 'Manrope', sans-serif;
  --hp-display-weight: 400;
  --hp-display-letter-spacing: 0.5px;
  --hp-display-line-height: 1.1;
  --hp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hp-btn-solid-bg: #0a0a0a;
  --hp-btn-solid-fg: #ffffff;
  --hp-card: #ffffff;
  --hp-backdrop: rgba(0, 0, 0, 0.4);
}

html[data-theme='dark'] {
  --hp-bg: #060608;
  --hp-bg-elevated: #111116;
  --hp-ink: #f4f4f5;
  --hp-ink-soft: #e4e4e7;
  --hp-muted: #a1a1aa;
  --hp-line: rgba(255, 255, 255, 0.1);
  --hp-header-bg: rgba(6, 6, 8, 0.9);
  --hp-footer-bg: #030304;
  --hp-footer-ink: #f4f4f5;
  --hp-pill-bg: #14141a;
  --hp-pill-border: rgba(255, 255, 255, 0.08);
  --hp-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --hp-btn-solid-bg: #ffffff;
  --hp-btn-solid-fg: #0a0a0a;
  --hp-card: #111116;
  --hp-backdrop: rgba(0, 0, 0, 0.68);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --hp-bg: #060608;
    --hp-bg-elevated: #111116;
    --hp-ink: #f4f4f5;
    --hp-ink-soft: #e4e4e7;
    --hp-muted: #a1a1aa;
    --hp-line: rgba(255, 255, 255, 0.1);
    --hp-header-bg: rgba(6, 6, 8, 0.9);
    --hp-footer-bg: #030304;
    --hp-footer-ink: #f4f4f5;
    --hp-pill-bg: #14141a;
    --hp-pill-border: rgba(255, 255, 255, 0.08);
    --hp-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --hp-btn-solid-bg: #ffffff;
    --hp-btn-solid-fg: #0a0a0a;
    --hp-card: #111116;
    --hp-backdrop: rgba(0, 0, 0, 0.68);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html {
    overflow-x: hidden;
  }
}

/* Lenis owns wheel smoothing — CSS smooth would double-ease programmatic jumps */
html.lenis,
html.hp-smooth-scroll {
  scroll-behavior: auto !important;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

/* Do NOT set overflow:clip/hidden on .lenis-stopped — that freezes document scroll
   when Lenis.pause() runs (modals). Overflow lock is already via body.modal-open etc. */

@media (prefers-reduced-motion: reduce) {
  html:not([data-animations="on"]) {
    scroll-behavior: auto;
  }
}

body.hp-site {
  margin: 0;
  font-family: var(--hp-font);
  background: var(--hp-bg);
  color: var(--hp-ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  max-width: 100%;
}

@supports not (overflow: clip) {
  body.hp-site {
    overflow-x: hidden;
  }
}

body.hp-site a { color: inherit; text-decoration: none; }
body.hp-site img { max-width: 100%; display: block; }

/* Headings: Unbounded Regular */
body.hp-site h1,
body.hp-site h2,
body.hp-site h3,
body.hp-site h4,
body.hp-site h5,
body.hp-site h6,
body.hp-site .hp-h1,
body.hp-site .hp-h2,
body.hp-site .hp-h3,
body.hp-site .hp-h4,
body.hp-site .hp-h5,
body.hp-site .hp-h6 {
  font-family: var(--hp-display);
  font-weight: var(--hp-display-weight, 400);
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
  line-height: var(--hp-display-line-height, 1.1);
}
body.hp-site button:not(.hp-btn):not(.hp-cookie__btn):not(.hp-top__burger):not(.hp-top__theme):not(.hp-top__icon-btn):not(.hp-top__tour-btn):not(.hp-drawer__close):not(.hp-drawer__toggle):not(.hp-drawer__link):not(.hp-drawer__tour):not(.hp-modal__close):not(.hp-quiz__option):not(.hp-quiz__back):not(.hp-dock__cta):not(.hp-fav-btn):not(.hp-fav-drawer__close):not(.hp-fav-drawer__remove):not(.hp-fav-drawer__backdrop):not(.hp-backtop):not(.hp-steps-preview__btn):not(.hp-search-modal__chip):not(.hp-search-modal__clear):not(.hp-search-teaser):not(.hp-3d-tour__close):not(.hp-3d-tour__card-dismiss):not(.hp-3d-tour__route-btn):not(.hp-fsq__opt):not(.hp-fsq__close):not(.hp-fsq__back) {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Cursor: pointer for interactive controls (incl. custom buttons excluded above) */
.hp-site a[href],
.hp-site button,
.hp-site [type="button"],
.hp-site [type="submit"],
.hp-site [type="reset"],
.hp-site [role="button"],
.hp-site summary,
.hp-site label[for],
.hp-site label:has([type="checkbox"]),
.hp-site label:has([type="radio"]),
.hp-site .hp-btn,
.hp-site .btn,
.hp-site .tf-button,
.hp-site .hp-top__burger,
.hp-site .hp-top__theme,
.hp-site .hp-top__icon-btn,
.hp-site .hp-top__tour-btn,
.hp-site .hp-drawer__close,
.hp-site .hp-drawer__toggle,
.hp-site .hp-drawer__link,
.hp-site .hp-drawer__tour,
.hp-site .hp-cookie__btn,
.hp-site .hp-dock__cta,
.hp-site .hp-dock__item,
.hp-site .hp-fav-btn,
.hp-site .hp-fav-drawer__close,
.hp-site .hp-fav-drawer__remove,
.hp-site .hp-backtop,
.hp-site .hp-modal__close,
.hp-site .hp-quiz__option,
.hp-site .hp-quiz__back,
.hp-site .hp-fsq__opt,
.hp-site .hp-fsq__close,
.hp-site .hp-fsq__back,
.hp-site .hp-filters__item,
.hp-site .hp-search-modal__chip,
.hp-site .hp-search-modal__clear,
.hp-site .hp-search-teaser,
.hp-site .hp-steps-preview__btn,
.hp-site .hp-steps-preview__item[data-step-jump],
.hp-site .hp-form__consent,
.hp-site .hp-menu__link,
.hp-site .hp-menu__item--has,
.hp-site .hp-3d-tour__close,
.hp-site .hp-3d-tour__card-dismiss {
  cursor: pointer;
}

.hp-site :disabled,
.hp-site [disabled],
.hp-site [aria-disabled="true"],
.hp-site a[href][aria-disabled="true"],
.hp-site a[href]:disabled,
.hp-site button:disabled,
.hp-site button[aria-disabled="true"],
.hp-site .hp-btn:disabled,
.hp-site .hp-btn[aria-disabled="true"],
.hp-site .btn:disabled,
.hp-site .btn.disabled,
.hp-site .btn[aria-disabled="true"],
.hp-site fieldset:disabled button,
.hp-site fieldset:disabled [type="button"],
.hp-site fieldset:disabled [type="submit"],
.hp-site fieldset:disabled [type="reset"],
.hp-site fieldset:disabled .hp-btn,
.hp-site fieldset:disabled .btn,
.hp-site fieldset:disabled a[href] {
  cursor: not-allowed;
}

.hp-wrapper, .hp-page {
  min-height: 0;
  min-width: 0;
  max-width: 100%;
}

.hp-wrapper {
  position: relative;
  z-index: 1;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  .hp-wrapper {
    overflow-x: hidden;
  }
}

#hp-canvas-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  max-height: 100vh;
  z-index: 0;
  opacity: 0.22;
  pointer-events: none;
  display: block;
}

html[data-theme='dark'] #hp-canvas-bg {
  opacity: 0.28;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) #hp-canvas-bg {
    opacity: 0.28;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-animations="on"]) #hp-canvas-bg {
    display: none;
  }
}

/* Bootstrap reset inside our layout */
.hp-site .hp-top,
.hp-site .hp-intro,
.hp-site .hp-footer {
  font-family: var(--hp-font);
}
/* Reset legacy theme on our header */
.hp-site header.hp-top {
  padding: 0;
  background: var(--hp-header-bg);
}

/* ========== HEADER ========== */
.hp-top {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--hp-header-bg);
  border-bottom: 1px solid var(--hp-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hp-top__shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

.hp-top__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px var(--hp-pad);
  border-bottom: 1px solid var(--hp-line);
  font-size: 12px;
}

.hp-top__info-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hp-top__chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hp-line);
  background: color-mix(in srgb, var(--hp-bg-elevated) 80%, transparent);
  font-weight: 600;
  color: var(--hp-muted);
  white-space: nowrap;
}

.hp-top__hours {
  color: var(--hp-muted);
  font-weight: 600;
  white-space: nowrap;
}

.hp-top__contacts {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hp-top__contact {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  transition: color 0.2s;
}

.hp-top__contact:hover .hp-top__contact-value {
  color: var(--hp-accent);
}

.hp-top__contact-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hp-muted);
}

.hp-top__contact-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--hp-ink);
  white-space: nowrap;
}

.hp-top__bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 12px var(--hp-pad) 14px;
}

@media (min-width: 1024px) {
  .hp-top__info {
    padding-inline: var(--hp-pad-header);
  }

  .hp-top__bar {
    padding-inline: var(--hp-pad-header);
  }
}

.hp-top__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.hp-top__logo-img {
  width: auto;
  height: 32px;
  max-width: 140px;
  object-fit: contain;
}

.hp-top__nav {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.hp-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1.5vw, 8px);
}

.hp-menu__item {
  position: relative;
}

/* Невидимый мост: курсор не теряет hover при переходе к подменю */
.hp-menu__item--has::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
  z-index: 21;
}

.hp-menu__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-muted);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.hp-menu__item--has > .hp-menu__link::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.6;
}

.hp-menu__link:hover,
.hp-menu__link.is-active {
  color: var(--hp-ink);
  background: color-mix(in srgb, var(--hp-ink) 6%, transparent);
}

.hp-menu__sub {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 240px;
  max-width: 320px;
  max-height: 70vh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--hp-line);
  background: var(--hp-bg-elevated);
  box-shadow: var(--hp-shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 20;
}

.hp-menu__item--has:hover > .hp-menu__sub,
.hp-menu__item--has:focus-within > .hp-menu__sub {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%);
}

.hp-menu__sub .menu-item {
  list-style: none;
}

.hp-menu__sub a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hp-muted);
  line-height: 1.35;
}

.hp-menu__sub a:hover {
  color: var(--hp-ink);
  background: color-mix(in srgb, var(--hp-accent) 10%, transparent);
}

.hp-top__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.hp-top__actions .hp-btn {
  padding: 10px 16px;
  font-size: 13px;
}

.hp-top__theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--hp-line);
  background: color-mix(in srgb, var(--hp-bg-elevated) 70%, transparent);
  color: var(--hp-ink);
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.hp-top__theme:hover {
  background: color-mix(in srgb, var(--hp-accent) 10%, var(--hp-bg-elevated));
  border-color: color-mix(in srgb, var(--hp-accent) 24%, var(--hp-line));
}

.hp-top__theme-icon {
  display: block;
}

html[data-theme='light'] .hp-top__theme-icon--sun {
  display: none;
}

html[data-theme='light'] .hp-top__theme-icon--moon {
  display: block;
}

html[data-theme='dark'] .hp-top__theme-icon--sun {
  display: block;
}

html[data-theme='dark'] .hp-top__theme-icon--moon {
  display: none;
}

.hp-drawer__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hp-line);
  font-size: 12px;
  font-weight: 600;
  color: var(--hp-muted);
}

.hp-top__burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--hp-line);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  background: transparent;
}

.hp-top__burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--hp-ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.hp-top__burger.is-open span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.hp-top__burger.is-open span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Drawer */
.hp-drawer {
  position: fixed;
  inset: 0;
  z-index: 290;
  pointer-events: none;
}

.hp-drawer.is-open {
  pointer-events: auto;
}

.hp-drawer__backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.3s;
}

.hp-drawer.is-open .hp-drawer__backdrop {
  opacity: 1;
}

.hp-drawer__panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: min(100%, 360px);
  background: var(--hp-bg-elevated);
  border-left: 1px solid var(--hp-line);
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--hp-ease);
  pointer-events: auto;
}

.hp-drawer.is-open .hp-drawer__panel {
  transform: none;
}

.hp-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.hp-drawer__title {
  font-family: var(--hp-display);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
  line-height: var(--hp-display-line-height, 1.1);
}

.hp-drawer__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--hp-line);
  font-size: 24px;
  line-height: 1;
  background: transparent;
}

.hp-drawer__links {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.hp-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  overflow: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.hp-drawer__link {
  display: block;
  width: 100%;
  padding: 10px 0;
  font-family: var(--hp-display);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
  color: var(--hp-ink);
  border: 0;
  border-bottom: 1px solid var(--hp-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

button.hp-drawer__link {
  font: inherit;
  font-family: var(--hp-display);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
}

.hp-drawer__group {
  border-bottom: 1px solid var(--hp-line);
}

.hp-drawer__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-family: var(--hp-display);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
  color: var(--hp-ink);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

/* Bootstrap loads after hpace.css and sets button:focus { outline: 5px auto … } */
.hp-site .hp-drawer__toggle:focus,
.hp-site .hp-drawer__toggle:active,
.hp-site button.hp-drawer__link:focus,
.hp-site button.hp-drawer__link:active,
.hp-site .hp-drawer__close:focus,
.hp-site .hp-drawer__close:active {
  outline: none;
  box-shadow: none;
}

.hp-site .hp-drawer__toggle:focus-visible,
.hp-site button.hp-drawer__link:focus-visible,
.hp-site .hp-drawer__close:focus-visible,
.hp-site .hp-drawer__nav a:focus-visible {
  outline: 1px solid var(--hp-accent, #0094ff);
  outline-offset: 2px;
  box-shadow: none;
}

.hp-drawer__toggle::after {
  content: '+';
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  color: var(--hp-muted);
  transition: transform 0.2s;
}

.hp-drawer__group.is-open .hp-drawer__toggle::after {
  transform: rotate(45deg);
}

.hp-drawer__sub {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0 0 8px;
}

.hp-drawer__group.is-open .hp-drawer__sub {
  display: flex;
}

.hp-drawer__sub a {
  padding: 7px 0 7px 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--hp-muted);
}

.hp-drawer__sub a:hover {
  color: var(--hp-accent);
}

.hp-drawer__logo {
  height: 28px;
  width: auto;
}

.hp-drawer__foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--hp-line);
  font-size: 14px;
  font-weight: 600;
}

.hp-drawer__foot a:not(.hp-btn) {
  color: var(--hp-muted);
}

/* Buttons */
.hp-site a.hp-btn,
.hp-site button.hp-btn {
  text-decoration: none;
  color: inherit;
}

.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1.2;
  transition: transform 0.2s var(--hp-ease), background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s var(--hp-ease);
}

.hp-btn:active {
  transform: scale(0.97);
}

.hp-site a.hp-btn--solid,
.hp-site button.hp-btn--solid,
.hp-site a.hp-btn--primary,
.hp-site button.hp-btn--primary {
  background: var(--hp-btn-solid-bg);
  color: var(--hp-btn-solid-fg);
}

.hp-site a.hp-btn--solid:hover,
.hp-site button.hp-btn--solid:hover,
.hp-site a.hp-btn--primary:hover,
.hp-site button.hp-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--hp-accent) 28%, transparent);
  background: var(--hp-accent);
  color: #fff;
}

.hp-site a.hp-btn--solid:active,
.hp-site button.hp-btn--solid:active,
.hp-site a.hp-btn--primary:active,
.hp-site button.hp-btn--primary:active {
  transform: translateY(0) scale(0.98);
}

.hp-site a.hp-btn--line,
.hp-site button.hp-btn--line {
  background: transparent;
  color: var(--hp-ink);
  border-color: var(--hp-line);
}

.hp-site a.hp-btn--line:hover,
.hp-site button.hp-btn--line:hover {
  border-color: var(--hp-ink);
  color: var(--hp-ink);
}

.hp-btn--block {
  width: 100%;
  margin-top: 8px;
}

.hp-site a.hp-btn--ghost,
.hp-site button.hp-btn--ghost {
  background: transparent;
  color: var(--hp-ink);
  border-color: var(--hp-line);
}

@media (max-width: 1024px) {
  .hp-top__nav,
  .hp-top__actions .hp-btn--solid {
    display: none;
  }

  .hp-top__info {
    padding-block: 6px;
  }

  .hp-top__contacts .hp-top__contact:nth-child(3) {
    display: none;
  }

  .hp-top__burger {
    display: inline-flex;
  }

  .hp-top__bar {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 720px) {
  .hp-top__hours,
  .hp-top__chip {
    display: none;
  }

  .hp-top__info {
    justify-content: center;
  }

  .hp-top__contacts {
    justify-content: center;
    gap: 16px;
  }

  .hp-top__contact {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }

  .hp-top__contact-label::after {
    content: ':';
  }
}

@media (max-width: 480px) {
  .hp-top__bar {
    padding-block: 10px 12px;
  }

  .hp-top__logo-img {
    height: 28px;
    max-width: 120px;
  }

  .hp-top__contacts .hp-top__contact:nth-child(2) {
    display: none;
  }
}

body.hp-drawer-open {
  overflow: hidden;
}

body.hp-fav-open {
  overflow: hidden;
}

/* ========== HERO / INTRO ========== */
.hp-intro {
  position: relative;
  padding: clamp(40px, 7vw, 88px) var(--hp-pad) clamp(48px, 6vw, 72px);
  overflow: hidden;
}

.hp-intro--video {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(480px, 92svh, 780px);
  padding: clamp(64px, 11vh, 108px) var(--hp-pad) clamp(56px, 8vh, 80px);
  color: #fff;
}

.hp-intro__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hp-intro__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 8, 14, 0.78) 0%, rgba(4, 8, 14, 0.52) 42%, rgba(4, 8, 14, 0.88) 100%),
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(56, 189, 248, 0.14), transparent 62%);
  pointer-events: none;
}

.hp-intro__overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hp-intro__overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hp-intro__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%, color-mix(in srgb, var(--hp-accent) 16%, transparent), transparent 60%),
    radial-gradient(ellipse 50% 40% at 100% 10%, color-mix(in srgb, var(--hp-ink) 6%, transparent), transparent 55%);
  pointer-events: none;
}

.hp-intro__inner {
  position: relative;
  z-index: 2;
  max-width: var(--hp-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.hp-intro__inner--center {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
}

.hp-intro__main {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.hp-intro__anchor {
  height: 0;
  overflow: hidden;
}

.hp-intro__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hp-muted);
}

.hp-intro__eyebrow--hero {
  justify-content: center;
  margin-bottom: 20px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.hp-intro__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  flex-shrink: 0;
}

.hp-intro__title {
  margin: 0 0 20px;
  font-family: var(--hp-display);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 400;
  line-height: var(--hp-display-line-height, 1.1);
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
}

.hp-intro__title--hero {
  margin-bottom: 22px;
  font-size: clamp(38px, 7vw, 80px);
  line-height: var(--hp-display-line-height, 1.1);
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
  color: #fff;
  text-wrap: balance;
}

.hp-intro__title--hero .hp-intro__accent {
  display: inline;
  background: linear-gradient(120deg, #38bdf8 0%, #818cf8 45%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 400;
}

.hp-intro__trust {
  margin: 0 0 32px;
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.48);
}

.hp-intro__title span {
  display: block;
  background: linear-gradient(120deg, var(--hp-accent), color-mix(in srgb, var(--hp-ink) 70%, var(--hp-accent)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme='dark'] .hp-intro__title span {
  background: linear-gradient(120deg, #38bdf8, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .hp-intro__title span {
    background: linear-gradient(120deg, #38bdf8, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.hp-intro__text {
  margin: 0 0 28px;
  max-width: 48ch;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.65;
  color: var(--hp-muted);
}

.hp-intro__text--hero {
  max-width: 48ch;
  margin: 0 auto 20px;
  font-size: clamp(15px, 1.55vw, 18px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  text-wrap: balance;
}

.hp-intro__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.hp-intro__cta--center {
  justify-content: center;
  align-items: center;
  gap: 8px 20px;
  margin-bottom: 0;
}

.hp-btn--hero {
  padding: 16px 32px;
  font-size: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

/* Выше специфичность, чем у .hp-site a.hp-btn--ghost (иначе в light ink=#0a0a0a на тёмном video) */
.hp-site a.hp-btn--on-dark.hp-btn--ghost,
.hp-site button.hp-btn--on-dark.hp-btn--ghost {
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.06);
  padding: 12px 18px;
  font-weight: 600;
}

.hp-site a.hp-btn--on-dark.hp-btn--ghost:hover,
.hp-site button.hp-btn--on-dark.hp-btn--ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.12);
  transform: none;
}

/* Light: чёрный solid теряется на тёмном video-оверлее — как в dark: светлая pill */
html[data-theme='light'] .hp-site .hp-intro--video a.hp-btn--solid,
html[data-theme='light'] .hp-site .hp-intro--video button.hp-btn--solid {
  background: #ffffff;
  color: #0a0a0a;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4);
}

html[data-theme='light'] .hp-site .hp-intro--video a.hp-btn--solid:hover,
html[data-theme='light'] .hp-site .hp-intro--video button.hp-btn--solid:hover {
  background: var(--hp-accent);
  color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--hp-accent) 40%, transparent);
}

html[data-theme='light'] .hp-site .hp-intro--video a.hp-btn--on-dark.hp-btn--ghost,
html[data-theme='light'] .hp-site .hp-intro--video button.hp-btn--on-dark.hp-btn--ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.1);
}

.hp-intro__scroll {
  position: absolute;
  bottom: clamp(20px, 3.5vh, 36px);
  left: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  text-decoration: none;
  opacity: 0.55;
  transition: opacity 0.25s var(--hp-ease);
}

.hp-intro__scroll:hover {
  opacity: 0.9;
}

.hp-intro__scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), transparent);
  transform-origin: top center;
  animation: hp-scroll-line 2.4s ease-in-out infinite;
}

@keyframes hp-scroll-line {
  0%, 100% {
    opacity: 0.35;
    transform: scaleY(0.55);
  }

  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.hp-btn--on-dark.hp-btn--line {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.hp-btn--on-dark.hp-btn--line:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.12);
}

.hp-intro__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--hp-line);
}

.hp-intro__metrics--hero {
  max-width: 520px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hp-intro__metrics--hero dt {
  color: #fff;
}

.hp-intro__metrics--hero dd {
  color: rgba(255, 255, 255, 0.62);
}

.hp-intro__badges {
  margin-top: 28px;
}

.hp-intro__badges .Hpace_freelance_icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.hp-intro__badges .Hpace_freelance_icons img {
  height: 36px;
  width: auto;
  opacity: 0.92;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.25));
}

.hp-intro__metrics div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hp-intro__metrics dt {
  margin: 0;
  font-family: var(--hp-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hp-intro__metrics dd {
  margin: 0;
  font-size: 13px;
  color: var(--hp-muted);
}

.hp-intro__aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hp-intro__photo {
  margin: 0;
  position: relative;
  border-radius: var(--hp-radius-lg);
  overflow: hidden;
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow);
}

.hp-intro__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hp-intro__photo figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--hp-bg-elevated) 90%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--hp-line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hp-intro__photo figcaption strong {
  font-size: 14px;
}

.hp-intro__photo figcaption span {
  font-size: 12px;
  color: var(--hp-muted);
}

.hp-intro__panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hp-intro__panel {
  padding: 16px;
  border-radius: var(--hp-radius);
  border: 1px solid var(--hp-line);
  background: var(--hp-bg-elevated);
}

.hp-intro__panel-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hp-muted);
}

.hp-intro__panel a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.hp-intro__panel a:hover {
  color: var(--hp-accent);
}

.hp-intro__panel p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.hp-intro__chips {
  position: relative;
  z-index: 2;
  max-width: var(--hp-max);
  margin: clamp(32px, 5vw, 48px) auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hp-intro__chips--hero {
  justify-content: center;
  margin-top: auto;
  padding-top: 24px;
}

.hp-intro__chips span {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--hp-line);
  background: var(--hp-bg-elevated);
  font-size: 12px;
  font-weight: 600;
  color: var(--hp-muted);
}

.hp-intro__chips--hero span {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

@media (max-width: 1024px) {
  .hp-intro__inner {
    grid-template-columns: 1fr;
  }

  .hp-intro__aside {
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .hp-intro--video {
    min-height: clamp(420px, 88svh, 640px);
    padding-top: 80px;
    padding-bottom: 64px;
  }

  .hp-intro__title--hero {
    margin-bottom: 20px;
    font-size: clamp(32px, 8.5vw, 44px);
    line-height: 1.1;
  }

  .hp-intro__trust {
    margin-bottom: 28px;
    font-size: 13px;
  }

  .hp-intro__metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-intro__metrics div:last-child {
    grid-column: 1 / -1;
  }

  .hp-intro__panels {
    grid-template-columns: 1fr;
  }

  .hp-intro__cta--center {
    flex-direction: column;
    width: 100%;
    gap: 4px;
  }

  .hp-intro__cta--center .hp-btn--hero {
    width: 100%;
  }

  .hp-intro__scroll {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-animations="on"]) .hp-intro__video {
    display: none;
  }

  html:not([data-animations="on"]) .hp-intro--video {
    background: #04080e;
  }

  html:not([data-animations="on"]) .hp-intro__scroll-line {
    animation: none;
    opacity: 0.5;
    transform: none;
  }
}

/* Reveal animation */
.hp-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s var(--hp-ease), transform 0.65s var(--hp-ease);
}

.hp-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-animations="on"]) .hp-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html:not([data-animations="on"]) .hp-btn,
  html:not([data-animations="on"]) .hp-intro__chips span {
    transition: none;
  }

  html:not([data-animations="on"]) .hp-quiz-teaser__box::before {
    animation: none;
  }
}

/* ========== FOOTER ========== */
.hp-footer {
  background: var(--hp-footer-bg);
  color: var(--hp-footer-ink);
  margin-top: clamp(48px, 8vw, 96px);
}

.hp-footer__top {
  padding: clamp(48px, 8vw, 88px) var(--hp-pad) 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hp-footer__inner {
  max-width: var(--hp-max);
  margin: 0 auto;
}

.hp-footer__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}

.hp-footer__cta h2 {
  font-family: var(--hp-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
  margin: 0;
  max-width: 14ch;
  line-height: var(--hp-display-line-height, 1.1);
}

.hp-footer__cta p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.65);
  max-width: 42ch;
}

.hp-footer__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hp-footer .hp-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.hp-footer .hp-btn--ghost:hover {
  background: #fff;
  color: #0a0a0a;
}

.hp-footer .hp-btn--primary {
  background: #fff;
  color: #0a0a0a;
}

.hp-footer .hp-btn--primary:hover {
  background: var(--hp-accent);
  color: #fff;
}

.hp-footer__brand {
  font-family: var(--hp-display);
  font-size: clamp(64px, 16vw, 180px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.85;
  margin-bottom: 48px;
  opacity: 0.95;
}

.hp-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.hp-footer__col h4 {
  margin: 0 0 16px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
}

.hp-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp-footer__col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s;
}

.hp-footer__col a:hover { color: var(--hp-accent); }

.hp-footer__about {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.6;
  max-width: 36ch;
}

.hp-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
}

.hp-footer__bottom {
  padding: 24px var(--hp-pad) calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hp-footer__bottom-inner {
  max-width: var(--hp-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.hp-footer__bottom a { color: rgba(255, 255, 255, 0.65); }
.hp-footer__bottom a:hover { color: #fff; }

.hp-footer__socials {
  display: flex;
  gap: 10px;
}

.hp-footer__socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.8);
  transition: 0.2s;
}

.hp-footer__socials a:hover {
  background: #fff;
  color: #0a0a0a;
}

@media (max-width: 900px) {
  .hp-footer__grid { grid-template-columns: 1fr 1fr; }
  .hp-footer__brand { font-size: clamp(48px, 20vw, 96px); }
}

@media (max-width: 560px) {
  .hp-footer__grid { grid-template-columns: 1fr; }
  .hp-footer__cta { flex-direction: column; align-items: flex-start; }
}

/* Cookie banner */
.hp-cookie {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 400;
  max-width: min(560px, calc(100vw - 32px));
  margin-left: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--hp-ease), transform 0.3s var(--hp-ease), visibility 0.3s;
  pointer-events: none;
}

.hp-cookie.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.hp-cookie__box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--hp-line);
  background: color-mix(in srgb, var(--hp-bg-elevated) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--hp-shadow);
}

.hp-cookie__text {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--hp-muted);
}

.hp-cookie__text a {
  color: var(--hp-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hp-cookie__text a:hover {
  color: var(--hp-accent);
}

.hp-cookie__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: var(--hp-btn-solid-bg);
  color: var(--hp-btn-solid-fg);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, color 0.2s;
}

.hp-cookie__btn:hover {
  background: var(--hp-accent);
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .hp-cookie {
    inset: auto 12px 12px;
    max-width: none;
  }

  .hp-cookie__box {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hp-cookie__btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-animations="on"]) .hp-cookie {
    transition: none;
  }
}

/* ========== QUIZ ========== */
.hp-quiz-teaser {
  margin-top: 8px;
}

.hp-quiz-teaser__box {
  position: relative;
  display: grid;
  gap: 20px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 24px;
  border: 1px solid var(--hp-line);
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, color-mix(in srgb, var(--hp-accent) 14%, transparent), transparent 55%),
    var(--hp-bg-elevated);
  box-shadow: var(--hp-shadow);
  isolation: isolate;
}

.hp-quiz-teaser__box::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: conic-gradient(from var(--hp-gradient-angle, 0deg), var(--hp-accent), #818cf8, #a78bfa, var(--hp-accent));
  opacity: 0.55;
  animation: hp-gradient-rotate 5s linear infinite;
}

.hp-quiz-teaser__box::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: calc(24px - 1px);
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, color-mix(in srgb, var(--hp-accent) 14%, transparent), transparent 55%),
    var(--hp-bg-elevated);
}

@property --hp-gradient-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes hp-gradient-rotate {
  to { --hp-gradient-angle: 360deg; }
}

.hp-quiz-teaser__label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hp-accent);
}

.hp-quiz-teaser__title {
  margin: 8px 0 0;
  font-family: var(--hp-display);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 400;
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
  line-height: var(--hp-display-line-height, 1.1);
  color: var(--hp-ink);
}

.hp-quiz-teaser__text {
  margin: 0;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--hp-muted);
}

.hp-quiz-teaser__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.hp-quiz-teaser__list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hp-ink);
}

.hp-quiz-teaser__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hp-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hp-accent) 18%, transparent);
}

/* Mobile bottom dock — nav + CTA */
.hp-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10030;
  padding: 0 10px calc(8px + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%);
  transition: transform 0.45s var(--hp-ease);
  pointer-events: none;
}

.hp-dock.is-visible {
  transform: none;
  pointer-events: auto;
}

.hp-dock__shell {
  display: flex;
  align-items: stretch;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto;
  padding: 8px 10px 10px;
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--hp-line);
  border-bottom: none;
  background: color-mix(in srgb, var(--hp-bg-elevated) 88%, transparent);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow:
    0 -12px 40px color-mix(in srgb, var(--hp-ink) 12%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--hp-ink) 6%, transparent);
}

html[data-theme='dark'] .hp-dock__shell {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 12, 0.82);
  box-shadow:
    0 -12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hp-dock__nav {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.hp-dock__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px 4px;
  border-radius: 12px;
  color: var(--hp-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.hp-dock__item:hover,
.hp-dock__item:focus-visible {
  color: var(--hp-ink);
  background: color-mix(in srgb, var(--hp-ink) 6%, transparent);
}

.hp-dock__item.is-active {
  color: var(--hp-ink);
  background: color-mix(in srgb, var(--hp-accent) 14%, transparent);
}

.hp-dock__item.is-active .hp-dock__icon {
  color: var(--hp-accent);
}

.hp-dock__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.hp-dock__label {
  font-size: 9px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.hp-dock__cta {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 72px;
  padding: 8px 6px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #f0f4ff 100%);
  color: #0a0a0a;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5),
    0 4px 20px rgba(0, 148, 255, 0.45),
    0 0 32px rgba(0, 148, 255, 0.25);
  transition: transform 0.2s var(--hp-ease), box-shadow 0.2s;
}

.hp-dock__cta::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 148, 255, 0.6), rgba(0, 200, 255, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hp-dock__cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6),
    0 8px 28px rgba(0, 148, 255, 0.55),
    0 0 40px rgba(0, 148, 255, 0.35);
}

.hp-dock__cta:active {
  transform: scale(0.97);
}

.hp-dock__cta-icon {
  display: flex;
  color: var(--hp-accent);
}

.hp-dock__cta-short {
  display: block;
}

.hp-dock__cta-full {
  display: none;
}

.hp-dock__cta--bid {
  display: none;
}

body.hp-dock-visible {
  --hp-dock-offset: 78px;
  padding-bottom: calc(var(--hp-dock-offset, 78px) + env(safe-area-inset-bottom, 0px));
}

body.hp-dock-visible .hp-cookie {
  bottom: calc(var(--hp-dock-offset, 78px) + 12px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 400px) {
  .hp-dock__label {
    font-size: 10px;
  }

  .hp-dock__cta {
    width: 88px;
    padding: 10px 8px;
    font-size: 11px;
  }
}

@media (min-width: 480px) {
  .hp-dock__cta {
    width: auto;
    min-width: 108px;
    padding: 10px 14px;
  }

  .hp-dock__cta-short {
    display: none;
  }

  .hp-dock__cta-full {
    display: block;
  }
}

@media (min-width: 1024px) {
  .hp-dock {
    left: 50%;
    right: auto;
    bottom: 28px;
    width: max-content;
    max-width: calc(100vw - 48px);
    padding: 0;
    transform: translate(-50%, 120%);
  }

  .hp-dock.is-visible {
    transform: translate(-50%, 0);
  }

  .hp-dock__shell {
    align-items: center;
    gap: 6px;
    max-width: none;
    margin: 0;
    padding: 8px 8px 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--hp-line);
    box-shadow:
      0 16px 48px color-mix(in srgb, var(--hp-ink) 14%, transparent),
      0 4px 16px color-mix(in srgb, var(--hp-ink) 8%, transparent),
      inset 0 1px 0 color-mix(in srgb, var(--hp-ink) 6%, transparent);
  }

  html[data-theme='dark'] .hp-dock__shell {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(12, 12, 16, 0.88);
    box-shadow:
      0 20px 56px rgba(0, 0, 0, 0.55),
      0 4px 16px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  .hp-dock__nav {
    display: flex;
    flex: 0 1 auto;
    gap: 2px;
  }

  .hp-dock__item {
    flex-direction: row;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
  }

  .hp-dock__icon {
    width: 18px;
    height: 18px;
  }

  .hp-dock__icon svg {
    width: 18px;
    height: 18px;
  }

  .hp-dock__label {
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -0.01em;
    overflow: visible;
    text-overflow: clip;
  }

  .hp-dock__cta--quiz {
    display: none;
  }

  .hp-dock__cta--bid {
    display: flex;
    flex-direction: row;
    width: auto;
    min-width: 0;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 13px;
  }

  .hp-dock__cta--bid .hp-dock__cta-short {
    display: none;
  }

  .hp-dock__cta--bid .hp-dock__cta-full {
    display: block;
  }

  body.hp-dock-visible {
    --hp-dock-offset: 96px;
  }
}

/* ========== QUIZ MODAL ========== */
.hp-modal.hp-modal--quiz .modal-dialog {
  max-width: min(820px, calc(100vw - 32px));
}

.hp-modal.hp-modal--quiz .modal-content.hp-modal__box {
  position: relative;
  background: var(--hp-quiz-bg, var(--hp-bg-elevated));
  color: var(--hp-quiz-ink, var(--hp-ink));
  border: 1px solid var(--hp-quiz-line, var(--hp-line));
  border-radius: 22px;
  box-shadow:
    var(--hp-shadow),
    0 0 0 1px color-mix(in srgb, var(--hp-quiz-accent, var(--hp-accent)) 8%, transparent);
  overflow: hidden;
}

.hp-modal.hp-modal--quiz .modal-content.hp-modal__box::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, color-mix(in srgb, var(--hp-quiz-accent, var(--hp-accent)) 14%, transparent), transparent 55%),
    radial-gradient(ellipse 50% 40% at 0% 100%, color-mix(in srgb, var(--hp-quiz-accent, var(--hp-accent)) 6%, transparent), transparent 50%);
  opacity: 0.9;
}

.hp-modal--quiz .hp-modal__body--quiz {
  position: relative;
  z-index: 1;
}

.hp-modal--quiz .hp-modal__close {
  border-color: var(--hp-quiz-line, var(--hp-line));
  background: color-mix(in srgb, var(--hp-quiz-bg, var(--hp-bg-elevated)) 88%, var(--hp-quiz-ink, var(--hp-ink)));
  color: var(--hp-quiz-muted, var(--hp-muted));
  z-index: 2;
}

.hp-modal--quiz .hp-modal__close:hover {
  background: color-mix(in srgb, var(--hp-quiz-ink, var(--hp-ink)) 8%, var(--hp-quiz-bg, var(--hp-bg-elevated)));
  color: var(--hp-quiz-ink, var(--hp-ink));
}

body.hp-quiz-open .modal-backdrop.show {
  background: var(--hp-backdrop);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hp-quiz {
  --hp-quiz-bg: var(--hp-bg-elevated);
  --hp-quiz-ink: var(--hp-ink);
  --hp-quiz-ink-soft: var(--hp-ink-soft);
  --hp-quiz-muted: var(--hp-muted);
  --hp-quiz-accent: var(--hp-accent);
  --hp-quiz-line: var(--hp-line);
  --hp-quiz-surface: color-mix(in srgb, var(--hp-ink) 4%, var(--hp-bg-elevated));
  --hp-quiz-surface-hover: color-mix(in srgb, var(--hp-accent) 8%, var(--hp-bg-elevated));
  --hp-quiz-accent-soft: color-mix(in srgb, var(--hp-accent) 14%, transparent);
  --hp-quiz-accent-muted: color-mix(in srgb, var(--hp-accent) 8%, transparent);
}

.hp-quiz__progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--hp-quiz-surface);
  border: 1px solid var(--hp-quiz-line);
}

.hp-quiz__progress {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hp-quiz-ink) 10%, transparent);
  overflow: hidden;
}

.hp-quiz__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hp-quiz-accent), color-mix(in srgb, var(--hp-quiz-accent) 65%, #005fa3));
  box-shadow: 0 0 12px color-mix(in srgb, var(--hp-quiz-accent) 45%, transparent);
  transition: width 0.45s var(--hp-ease);
}

.hp-quiz__step-label {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--hp-quiz-ink);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.hp-quiz__head {
  margin-bottom: 22px;
}

.hp-quiz__head--welcome {
  margin-bottom: 20px;
}

.hp-quiz__head--done {
  display: none;
}

.hp-quiz__eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hp-quiz-accent);
}

.hp-quiz__title {
  margin: 0 44px 12px 0;
  font-family: var(--hp-display);
  font-size: clamp(24px, 4.5vw, 34px);
  font-weight: 400;
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
  line-height: var(--hp-display-line-height, 1.1);
  color: var(--hp-quiz-ink);
}

.hp-quiz__title-accent {
  width: 56px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--hp-quiz-accent), color-mix(in srgb, var(--hp-quiz-accent) 50%, transparent));
}

.hp-quiz__title-accent--short {
  width: 40px;
  margin-bottom: 12px;
}

.hp-quiz__hint {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--hp-quiz-muted);
}

.hp-quiz__panel[hidden] {
  display: none !important;
}

.hp-quiz__panel.is-active {
  animation: hp-quiz-in 0.38s var(--hp-ease);
}

@keyframes hp-quiz-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hp-quiz__welcome {
  display: grid;
  gap: 24px;
}

@media (min-width: 680px) {
  .hp-quiz__welcome {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: start;
  }
}

.hp-quiz__lead {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--hp-quiz-muted);
}

.hp-quiz__benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 13px;
}

.hp-quiz__benefits li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--hp-quiz-ink-soft);
  font-weight: 600;
}

.hp-quiz__benefits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--hp-quiz-accent);
  font-size: 17px;
  font-weight: 800;
}

.hp-quiz__welcome-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 680px) {
  .hp-quiz__welcome-aside {
    padding: 20px;
    border-radius: 18px;
    background: var(--hp-quiz-surface);
    border: 1px solid var(--hp-quiz-line);
  }
}

.hp-quiz__social-proof {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--hp-quiz-accent-muted);
  border: 1px solid color-mix(in srgb, var(--hp-quiz-accent) 22%, transparent);
  font-size: 14px;
  line-height: 1.55;
  color: var(--hp-quiz-ink-soft);
}

.hp-quiz__social-proof strong {
  color: var(--hp-quiz-accent);
  font-weight: 800;
}

.hp-quiz__welcome-note {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--hp-quiz-muted);
  letter-spacing: 0.02em;
}

.hp-btn--quiz {
  background: linear-gradient(135deg, var(--hp-quiz-accent) 0%, color-mix(in srgb, var(--hp-quiz-accent) 72%, #0056b3) 100%);
  color: #ffffff;
  border: none;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.01em;
  padding: 17px 28px;
  border-radius: 14px;
  box-shadow:
    0 4px 20px color-mix(in srgb, var(--hp-quiz-accent) 40%, transparent),
    0 1px 0 color-mix(in srgb, #ffffff 25%, transparent) inset;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.hp-btn--quiz:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--hp-quiz-accent) 92%, #ffffff) 0%, color-mix(in srgb, var(--hp-quiz-accent) 60%, #004a99) 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px color-mix(in srgb, var(--hp-quiz-accent) 50%, transparent),
    0 1px 0 color-mix(in srgb, #ffffff 30%, transparent) inset;
}

.hp-quiz__options {
  display: grid;
  gap: 10px;
}

@media (min-width: 600px) {
  .hp-quiz__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

.hp-quiz__option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1.5px solid var(--hp-quiz-line);
  background: var(--hp-quiz-surface);
  color: var(--hp-quiz-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.hp-quiz__option:hover {
  border-color: color-mix(in srgb, var(--hp-quiz-accent) 45%, transparent);
  background: var(--hp-quiz-surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--hp-quiz-accent) 12%, transparent);
}

.hp-quiz__option.is-selected {
  border-color: var(--hp-quiz-accent);
  background: var(--hp-quiz-accent-muted);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--hp-quiz-accent) 25%, transparent),
    0 4px 16px color-mix(in srgb, var(--hp-quiz-accent) 15%, transparent);
}

.hp-quiz__option-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--hp-quiz-accent-soft);
  color: var(--hp-quiz-accent);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.hp-quiz__option-icon::before {
  content: attr(data-letter);
}

.hp-quiz__option-text {
  flex: 1;
}

.hp-quiz__back {
  margin-top: 18px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--hp-quiz-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.hp-quiz__back:hover {
  color: var(--hp-quiz-ink);
}

.hp-quiz__summary {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--hp-quiz-surface);
  border: 1px solid var(--hp-quiz-line);
  border-left: 3px solid var(--hp-quiz-accent);
}

.hp-quiz__summary-title {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hp-quiz-muted);
}

.hp-quiz__summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.hp-quiz__summary-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 14px;
  line-height: 1.45;
}

.hp-quiz__summary-key {
  color: var(--hp-quiz-muted);
  font-weight: 600;
}

.hp-quiz__summary-key::after {
  content: ':';
}

.hp-quiz__summary-val {
  color: var(--hp-quiz-ink);
  font-weight: 700;
}

.hp-quiz__panel .hp-form--quiz {
  margin-bottom: 8px;
}

.hp-form--quiz .hp-form__input {
  background: var(--hp-quiz-surface);
  border-color: var(--hp-quiz-line);
  color: var(--hp-quiz-ink);
}

.hp-form--quiz .hp-form__input:focus {
  background: var(--hp-quiz-bg);
  border-color: var(--hp-quiz-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hp-quiz-accent) 18%, transparent);
}

.hp-form__optional {
  font-weight: 500;
  color: var(--hp-quiz-muted);
}

.hp-form__textarea {
  min-height: 72px;
  resize: vertical;
}

.hp-modal--quiz .hp-modal__legal--quiz {
  margin-top: 14px;
  margin-bottom: 0;
  color: var(--hp-quiz-muted);
  font-size: 12px;
}

.hp-modal--quiz .hp-modal__legal a {
  color: var(--hp-quiz-ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hp-quiz__panel--done .hp-quiz__done {
  text-align: center;
  padding: 12px 0 4px;
}

.hp-quiz__done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--hp-quiz-accent-soft);
  color: var(--hp-quiz-accent);
  animation: hp-quiz-pop 0.5s var(--hp-ease);
}

@keyframes hp-quiz-pop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.hp-quiz__done-title {
  margin: 0 0 12px;
  font-family: var(--hp-display);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 400;
  color: var(--hp-quiz-ink);
}

.hp-quiz__done-text {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--hp-quiz-muted);
}

.hp-quiz__done-note {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--hp-quiz-muted);
}

.hp-quiz__done-note a {
  color: var(--hp-quiz-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 640px) {
  .hp-quiz-teaser__box .hp-btn {
    width: 100%;
  }

  .hp-modal--quiz .modal-dialog {
    max-width: 100%;
    margin: 0;
  }

  .hp-quiz__title {
    margin-right: 36px;
  }

  .hp-quiz__option {
    padding: 14px 16px;
    min-height: 56px;
  }

  .hp-dock__shell {
    padding: 6px 8px 8px;
    gap: 6px;
  }

  .hp-dock__cta {
    width: 64px;
    padding: 7px 5px;
    font-size: 9px;
  }
}

/* ========== MODALS & FORMS ========== */
.hp-modal {
  z-index: 10050;
}

.hp-modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 24px);
}

.hp-modal.fade {
  transition: opacity 0.35s ease;
}

.hp-modal.fade:not(.show) {
  opacity: 0;
}

.hp-modal .modal-dialog {
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  max-height: calc(100vh - 2rem);
  display: flex;
  align-items: center;
  transform: scale(0.92) translateY(14px);
  opacity: 0;
  transition: transform 0.42s var(--hp-ease), opacity 0.35s ease;
}

.hp-modal.show .modal-dialog,
.hp-modal.fade.show .modal-dialog {
  transform: none;
  opacity: 1;
}

/* Override Bootstrap .modal-content (loads after this file) */
.hp-modal .modal-content.hp-modal__box {
  width: 100%;
  background: var(--hp-bg-elevated);
  color: var(--hp-ink);
  border: 1px solid var(--hp-line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--hp-shadow);
  max-height: calc(100vh - 3rem);
}

.hp-modal.hp-modal--quiz .modal-dialog {
  max-width: min(820px, calc(100vw - 32px));
}

.hp-modal.hp-modal--quiz .modal-body.hp-modal__body--quiz {
  padding: clamp(28px, 5vw, 44px) clamp(26px, 4.5vw, 40px) clamp(26px, 4vw, 36px);
}

@media (max-width: 640px) {
  .hp-modal.hp-modal--quiz .modal-body.hp-modal__body--quiz {
    padding: 24px 20px 20px;
  }
}

.hp-modal .modal-body.hp-modal__body {
  position: relative;
  padding: 28px 28px 24px;
  text-align: left;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hp-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--hp-line);
  background: var(--hp-bg);
  color: var(--hp-ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.hp-modal__close:hover {
  background: color-mix(in srgb, var(--hp-ink) 8%, var(--hp-bg));
  border-color: color-mix(in srgb, var(--hp-ink) 18%, var(--hp-line));
}

.hp-modal__eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hp-accent) 12%, transparent);
  color: var(--hp-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hp-modal__title {
  margin: 0 32px 8px 0;
  font-family: var(--hp-display);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 400;
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
  color: var(--hp-ink);
  line-height: var(--hp-display-line-height, 1.1);
}

.hp-modal__lead {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--hp-muted);
}

.hp-modal__cta {
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--hp-line);
}

.hp-modal__cta-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--hp-muted);
}

.hp-modal__page {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--hp-accent);
}

.hp-modal__contacts {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.hp-modal__card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--hp-line);
  background: color-mix(in srgb, var(--hp-bg) 70%, transparent);
  text-align: left;
  transition: border-color 0.2s, transform 0.2s;
  width: 100%;
}

button.hp-modal__card {
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.hp-modal__card:hover {
  border-color: var(--hp-accent);
  transform: translateY(-1px);
}

.hp-modal__card--director {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--hp-accent) 12%, transparent), color-mix(in srgb, var(--hp-bg) 70%, transparent));
  border-color: color-mix(in srgb, var(--hp-accent) 28%, var(--hp-line));
}

.hp-modal__card-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hp-muted);
}

.hp-modal__card strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--hp-ink);
}

.hp-modal__card-note {
  font-size: 13px;
  color: var(--hp-muted);
}

.hp-modal__legal {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--hp-muted);
}

.hp-modal__legal a {
  color: var(--hp-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hp-modal__legal a:hover {
  color: var(--hp-accent);
}

.hp-form {
  display: grid;
  gap: 14px;
}

.hp-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp-modal .hp-form__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--hp-ink-soft);
}

.hp-form__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--hp-muted);
}

.hp-form__input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--hp-line);
  background: var(--hp-bg);
  color: var(--hp-ink);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hp-form__input::placeholder {
  color: color-mix(in srgb, var(--hp-muted) 80%, transparent);
}

.hp-form__input:focus {
  outline: none;
  border-color: var(--hp-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hp-accent) 18%, transparent);
}

.hp-form__error:empty {
  display: none;
}

.hp-form__error {
  font-size: 12px;
  color: #dc2626;
}

.hp-form__captcha {
  display: block;
  width: 100%;
  margin: 4px 0 0;
}

.hp-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 0;
  cursor: pointer;
  user-select: none;
}

.hp-form__consent-input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--hp-accent);
  cursor: pointer;
}

.hp-form__consent-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--hp-muted);
}

.hp-form__consent-text a {
  color: var(--hp-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hp-form__consent-text a:hover {
  color: var(--hp-accent);
}

.hp-form__consent.is-invalid {
  outline: 1px solid color-mix(in srgb, #dc2626 55%, transparent);
  outline-offset: 4px;
  border-radius: 8px;
}

.hp-form--quiz .hp-form__consent-text {
  color: var(--hp-quiz-muted, var(--hp-muted));
}

.hp-form--quiz .hp-form__consent-text a {
  color: var(--hp-quiz-ink-soft, var(--hp-ink-soft));
}

.hp-captcha {
  display: block;
  width: 100%;
}

.hp-captcha__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
}

.hp-captcha__visual {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.hp-captcha__canvas {
  display: block;
  width: 220px;
  max-width: 100%;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--hp-line, #e2e8f0);
  background: #eef0f6;
}

.hp-captcha__refresh {
  width: 48px;
  height: 64px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hp-line, #e2e8f0);
  background: color-mix(in srgb, var(--hp-card, #fff) 60%, transparent);
  color: var(--hp-muted, #64748b);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s, color 0.25s;
  flex: 0 0 auto;
}

.hp-captcha__refresh:hover {
  color: var(--hp-accent, #6366f1);
  transform: rotate(90deg);
}

.hp-captcha__field {
  flex: 1 1 160px;
  min-width: 140px;
  display: grid;
  gap: 6px;
  margin: 0;
}

.hp-captcha__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--hp-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hp-captcha__input {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
  height: 64px;
}

@media (min-width: 576px) {
  .hp-captcha__row {
    flex-wrap: nowrap;
  }

  .hp-captcha__field {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.hp-captcha.solved .hp-captcha__input {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 18%, transparent);
}

.hp-captcha.is-error .hp-captcha__row {
  animation: hpCaptchaShake 0.4s;
}

@keyframes hpCaptchaShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.hp-form__alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.hp-form__alert--success {
  background: color-mix(in srgb, #22c55e 14%, transparent);
  color: #15803d;
  border: 1px solid color-mix(in srgb, #22c55e 30%, transparent);
}

.hp-form__alert--error {
  background: color-mix(in srgb, #ef4444 12%, transparent);
  color: #b91c1c;
  border: 1px solid color-mix(in srgb, #ef4444 28%, transparent);
}

html[data-theme='dark'] .hp-form__alert--success {
  color: #86efac;
}

html[data-theme='dark'] .hp-form__alert--error {
  color: #fca5a5;
}

.modal-backdrop {
  z-index: 10040;
  background: var(--hp-backdrop);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.modal-backdrop.show {
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
  padding-right: var(--hp-scrollbar-comp, 0);
}

@media (max-width: 640px) {
  .hp-modal.show {
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
  }

  .hp-modal .modal-dialog {
    margin: 0;
    max-width: none;
    max-height: calc(100vh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  .hp-modal .modal-content.hp-modal__box {
    max-height: inherit;
    border-radius: 16px;
  }

  .hp-modal .modal-body.hp-modal__body {
    padding: 22px 18px 18px;
    max-height: calc(100vh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
}

/* Niche landing CTA on service pages */
.hp-landing-cta {
  margin-top: clamp(32px, 5vw, 56px);
  padding: clamp(24px, 4vw, 36px);
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--hp-accent, #6366f1) 22%, var(--hp-line, #e2e8f0));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--hp-accent, #6366f1) 8%, var(--hp-card, #fff)) 0%,
    var(--hp-card, #fff) 55%
  );
}

.hp-landing-cta__eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hp-accent, #6366f1);
}

.hp-landing-cta__title {
  margin: 0 0 12px;
  font-family: var(--hp-display);
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: var(--hp-display-line-height, 1.1);
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
}

.hp-landing-cta__text {
  margin: 0 0 20px;
  max-width: 58ch;
  color: var(--hp-muted, #64748b);
  font-size: 15px;
  line-height: 1.55;
}

.hp-landing-cta__btn {
  display: inline-flex;
}

html[data-theme='dark'] .hp-landing-cta {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--hp-accent, #818cf8) 14%, #111827) 0%,
    color-mix(in srgb, var(--hp-card, #1f2937) 90%, #111827) 60%
  );
}

/* Synced service blocks from new.hpace.ru */
.hp-service-lead {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--hp-muted, #64748b);
}

.hp-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.hp-service-block {
  padding: 22px 24px;
  border: 1px solid var(--hp-border, #e2e8f0);
  border-radius: 16px;
  background: var(--hp-card, #fff);
}

.hp-service-block__title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--hp-ink);
}

.hp-service-block p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--hp-muted);
}

.hp-service-block strong,
.hp-service-block b {
  color: var(--hp-ink);
}

html[data-theme='dark'] .hp-service-block {
  background: var(--hp-card, #1f2937);
  border-color: var(--hp-border, #334155);
}

/* === UX pack: a11y, theme transition, proof, finale, backtop, fav, skip === */
html, body.hp-site {
  transition: background-color 0.35s var(--hp-ease), color 0.35s var(--hp-ease);
}

@media (prefers-reduced-motion: reduce) {
  html, body.hp-site {
    transition: none;
  }
}

.hp-skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 100000;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--hp-btn-solid-bg);
  color: var(--hp-btn-solid-fg) !important;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--hp-shadow);
  transition: top 0.2s var(--hp-ease);
}

.hp-skip-link:focus,
.hp-skip-link:focus-visible {
  top: 12px;
  outline: 2px solid var(--hp-accent);
  outline-offset: 2px;
}

.hp-site a:focus-visible,
.hp-site button:focus-visible,
.hp-site .hp-btn:focus-visible,
.hp-site input:focus-visible,
.hp-site textarea:focus-visible,
.hp-site summary:focus-visible {
  outline: 2px solid var(--hp-accent);
  outline-offset: 3px;
}

/* Drawer: kill Bootstrap button:focus ring; keep thin accent for keyboard */
.hp-site .hp-drawer__toggle:focus,
.hp-site .hp-drawer__toggle:active,
.hp-site button.hp-drawer__link:focus,
.hp-site button.hp-drawer__link:active,
.hp-site .hp-drawer__close:focus,
.hp-site .hp-drawer__close:active {
  outline: none;
  box-shadow: none;
}

.hp-site .hp-drawer__toggle:focus-visible,
.hp-site button.hp-drawer__link:focus-visible,
.hp-site .hp-drawer__close:focus-visible,
.hp-site .hp-drawer__nav a:focus-visible,
.hp-site .hp-drawer__sub a:focus-visible {
  outline: 1px solid var(--hp-accent, #0094ff);
  outline-offset: 2px;
  box-shadow: none;
}

.hp-proof {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--hp-muted);
  letter-spacing: 0.01em;
}

.hp-proof--inline { margin: 12px 0 0; }
.hp-proof--form { margin: 10px 0 0; text-align: center; }
.hp-proof--actions { width: 100%; margin-top: 12px; }
.hp-proof--drawer { margin: 12px 0 0; }
.hp-proof--on-dark { color: rgba(255,255,255,0.72); }

.hp-lead-finale {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--hp-line);
  background: color-mix(in srgb, var(--hp-accent) 8%, var(--hp-bg-elevated));
  text-align: left;
}

.hp-lead-finale__title {
  margin: 0 0 10px;
  font-family: var(--hp-display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
  line-height: var(--hp-display-line-height, 1.1);
}

.hp-lead-finale__steps {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--hp-muted);
  font-size: 14px;
  line-height: 1.5;
}

.hp-lead-finale__steps li + li { margin-top: 4px; }

.hp-lead-finale__promise {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--hp-ink);
}

.hp-lead-finale__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hp-top__icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--hp-line);
  background: var(--hp-bg-elevated);
  color: var(--hp-ink);
  transition: transform 0.2s var(--hp-ease), border-color 0.2s, background 0.2s;
}

.hp-top__icon-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--hp-accent) 40%, var(--hp-line));
}

.hp-top__fav-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--hp-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.hp-backtop {
  position: fixed;
  right: 18px;
  bottom: calc(18px + var(--hp-dock-offset, 0px) + env(safe-area-inset-bottom, 0px));
  z-index: 940;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid var(--hp-line);
  background: color-mix(in srgb, var(--hp-bg-elevated) 88%, transparent);
  color: var(--hp-ink);
  box-shadow: var(--hp-shadow);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}

.hp-backtop.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
  hidden: false;
}

.hp-backtop[hidden] { display: none !important; }
.hp-backtop.is-visible[hidden] { display: inline-flex !important; }

/* Fav drawer: выше dock (10030), ниже modal-backdrop (10040) / модалок (10050) */
.hp-fav-drawer {
  position: fixed;
  inset: 0;
  z-index: 10035;
  pointer-events: none;
  isolation: isolate;
}

.hp-fav-drawer.is-open { pointer-events: auto; }

.hp-fav-drawer__backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: var(--hp-backdrop);
  opacity: 0;
  transition: opacity 0.25s;
}

.hp-fav-drawer.is-open .hp-fav-drawer__backdrop { opacity: 1; }

.hp-fav-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: min(400px, 100%);
  height: 100%;
  padding: 20px;
  background: var(--hp-bg-elevated);
  color: var(--hp-ink);
  box-shadow: var(--hp-shadow);
  transform: translateX(100%);
  transition: transform 0.3s var(--hp-ease);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.hp-fav-drawer.is-open .hp-fav-drawer__panel { transform: none; }

.hp-fav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hp-fav-drawer__title {
  margin: 0;
  font-family: var(--hp-display);
  font-size: 20px;
  letter-spacing: var(--hp-display-letter-spacing, 0.5px);
  line-height: var(--hp-display-line-height, 1.1);
}

.hp-fav-drawer__close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
}

.hp-fav-drawer__empty {
  color: var(--hp-muted);
  font-size: 14px;
}

.hp-fav-drawer__item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--hp-line);
}

.hp-fav-drawer__item img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--hp-line);
}

.hp-fav-drawer__item a {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}

.hp-fav-drawer__remove {
  color: var(--hp-muted);
  font-size: 12px;
  text-decoration: underline;
}

.hp-case {
  position: relative;
}

.hp-fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(10,10,10,0.45);
  color: #fff;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, background 0.2s, color 0.2s;
}

.hp-fav-btn:hover { transform: scale(1.06); }
.hp-fav-btn.is-active {
  background: #fff;
  color: #e11d48;
  border-color: #fff;
}
.hp-fav-btn.is-active svg { fill: currentColor; }

.hp-skel {
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--hp-muted) 18%, var(--hp-bg-elevated));
}

.hp-skel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, #fff 35%, transparent), transparent);
  transform: translateX(-100%);
  animation: hp-shimmer 1.2s infinite;
  pointer-events: none;
}

.hp-skel.is-loaded::before { display: none; }

@keyframes hp-shimmer {
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .hp-skel::before { animation: none; display: none; }
}

.hp-btn {
  transition: transform 0.2s var(--hp-ease), box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.hp-site a.hp-btn:hover,
.hp-site button.hp-btn:hover {
  transform: translateY(-1px);
}

body.hp-dock-visible.hp-cookie-visible {
  /* spacing handled via cookie bottom offset + dock padding */
}

body.hp-cookie-visible {
  /* marker class for JS */
}

/* ========== SEARCH MODAL ========== */
.hp-modal.hp-modal--search .modal-dialog {
  max-width: min(780px, calc(100vw - 24px));
}

.hp-modal.hp-modal--search .modal-content.hp-modal__box {
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--hp-accent) 14%, transparent), transparent 55%),
    var(--hp-bg-elevated);
}

.hp-modal__body--search {
  padding: clamp(26px, 4vw, 40px) clamp(22px, 4vw, 36px) clamp(22px, 3.5vw, 32px);
}

.hp-search-modal__lead {
  max-width: 36em;
}

.hp-search-modal__form {
  margin: 22px 0 8px;
}

.hp-search-modal__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hp-search-modal__field {
  position: relative;
  display: flex;
  align-items: center;
}

.hp-search-modal__icon {
  position: absolute;
  left: 18px;
  color: var(--hp-accent);
  pointer-events: none;
  display: inline-flex;
}

.hp-search-modal__input {
  width: 100%;
  min-height: 64px;
  padding: 16px 48px 16px 52px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--hp-accent) 28%, var(--hp-line));
  background: var(--hp-bg);
  color: var(--hp-ink);
  font-family: var(--hp-display);
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 400;
  letter-spacing: -0.02em;
  outline: none;
  box-shadow:
    0 0 0 0 color-mix(in srgb, var(--hp-accent) 0%, transparent),
    inset 0 -2px 0 color-mix(in srgb, var(--hp-accent) 35%, transparent);
  transition: border-color 0.2s, box-shadow 0.25s var(--hp-ease), background 0.2s;
}

.hp-search-modal__input::placeholder {
  color: var(--hp-muted);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hp-search-modal__input:focus {
  border-color: var(--hp-accent);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--hp-accent) 18%, transparent),
    inset 0 -2px 0 var(--hp-accent);
}

.hp-search-modal__clear {
  position: absolute;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--hp-line);
  background: var(--hp-bg-elevated);
  color: var(--hp-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.hp-search-modal__clear:hover {
  color: var(--hp-ink);
  border-color: color-mix(in srgb, var(--hp-ink) 20%, var(--hp-line));
}

.hp-search-modal__hint {
  margin: 10px 0 0;
  min-height: 1.25em;
  color: var(--hp-muted);
  font-size: 13px;
}

.hp-search-modal__empty {
  margin-top: 22px;
}

.hp-search-modal__empty-text {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hp-muted);
}

.hp-search-modal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.hp-search-modal__chip {
  margin: 0;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--hp-line);
  background: color-mix(in srgb, var(--hp-accent) 6%, var(--hp-bg));
  color: var(--hp-ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--hp-ease), color 0.2s;
}

.hp-search-modal__chip:hover {
  border-color: color-mix(in srgb, var(--hp-accent) 45%, var(--hp-line));
  background: color-mix(in srgb, var(--hp-accent) 12%, var(--hp-bg));
  color: var(--hp-ink);
  transform: translateY(-1px);
}

.hp-search-modal__results {
  margin-top: 18px;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.hp-search-modal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.hp-search-modal__link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--hp-ink) 3%, var(--hp-bg));
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--hp-ease);
}

.hp-search-modal__link:hover {
  border-color: color-mix(in srgb, var(--hp-accent) 40%, var(--hp-line));
  background: color-mix(in srgb, var(--hp-accent) 8%, var(--hp-bg));
  transform: translateY(-1px);
}

.hp-search-modal__badge {
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: color-mix(in srgb, var(--hp-ink) 8%, transparent);
  color: var(--hp-ink-soft);
}

.hp-search-modal__badge--case {
  background: color-mix(in srgb, #12b76a 18%, transparent);
  color: #039855;
}

.hp-search-modal__badge--service {
  background: color-mix(in srgb, var(--hp-accent) 16%, transparent);
  color: var(--hp-accent);
}

.hp-search-modal__badge--blog {
  background: color-mix(in srgb, #f79009 16%, transparent);
  color: #b54708;
}

.hp-search-modal__badge--kp {
  background: color-mix(in srgb, #7a5cff 18%, transparent);
  color: #5925dc;
}

html[data-theme="dark"] .hp-search-modal__badge--case,
[data-theme="dark"] .hp-search-modal__badge--case {
  color: #6ce9a6;
}

html[data-theme="dark"] .hp-search-modal__badge--blog,
[data-theme="dark"] .hp-search-modal__badge--blog {
  color: #fdb022;
}

html[data-theme="dark"] .hp-search-modal__badge--kp,
[data-theme="dark"] .hp-search-modal__badge--kp {
  color: #bdb4fe;
}

.hp-search-modal__body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.hp-search-modal__item-title {
  font-family: var(--hp-display);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--hp-ink);
}

.hp-search-modal__item-excerpt {
  font-size: 13px;
  line-height: 1.45;
  color: var(--hp-muted);
}

.hp-search-modal__arrow {
  color: var(--hp-accent);
  opacity: 0.55;
  font-size: 18px;
  line-height: 1.2;
  transition: opacity 0.2s, transform 0.2s var(--hp-ease);
}

.hp-search-modal__link:hover .hp-search-modal__arrow {
  opacity: 1;
  transform: translateX(2px);
}

.hp-search-modal__more {
  margin: 14px 0 0;
  text-align: center;
  font-size: 13px;
}

.hp-search-modal__more a {
  color: var(--hp-accent);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hp-search-modal__none {
  padding: 18px 4px 8px;
  text-align: center;
}

.hp-search-modal__none p {
  margin: 0 0 8px;
  color: var(--hp-ink-soft);
}

.hp-search-modal__none-hint {
  color: var(--hp-muted) !important;
  font-size: 14px;
}

.hp-search-modal__none .hp-btn {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .hp-search-modal__input {
    min-height: 56px;
    font-size: 17px;
    padding-left: 46px;
  }

  .hp-search-modal__icon {
    left: 14px;
  }

  .hp-search-modal__link {
    grid-template-columns: auto 1fr;
  }

  .hp-search-modal__arrow {
    display: none;
  }

  .hp-search-modal__results {
    max-height: min(52vh, 360px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-search-modal__chip,
  .hp-search-modal__link,
  .hp-search-modal__arrow {
    transition: none;
  }
}

/* Messenger icons (Telegram / MAX) */
.hp-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.12em;
  color: inherit;
  line-height: 0;
}

.hp-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hp-top__contact-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hp-top__contact-label .hp-ico {
  width: 12px;
  height: 12px;
}

.hp-drawer__foot a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hp-drawer__foot .hp-ico {
  width: 16px;
  height: 16px;
}

.hp-footer__socials .hp-ico {
  width: 16px;
  height: 16px;
}

.hp-modal__card-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hp-modal__card-label .hp-ico {
  width: 14px;
  height: 14px;
}

.hp-btn .hp-ico {
  width: 16px;
  height: 16px;
}

