/* ============================================================
   HORIZANCE — фирменная дизайн-система
   Палитра: синий градиент логотипа Horizance + жёлтый акцент
   «Честного знака». Подключается ПОСЛЕ bootstrap.min.css.
   ============================================================ */

/* Шрифт фирменного названия (максимально близкий к оригинальному
   начертанию логотипа HORIZANCE) — самостоятельный хостинг */
@font-face {
  font-family: "HorizanceBrand";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/montserrat-800-latin.woff2") format("woff2");
}

:root {
  /* Синий Horizance (из логотипа-глобуса) */
  --hz-blue-800: #0e3a8f;
  --hz-blue-700: #1246b8;
  --hz-blue-600: #1a5fd0;
  --hz-blue-500: #2f7df6;
  --hz-blue-400: #5ea0ff;
  --hz-blue-100: #dbeafe;
  --hz-blue-050: #eef5ff;

  /* Тёмно-синие «чернила» */
  --hz-navy-900: #0b1526;
  --hz-navy-800: #101d33;
  --hz-navy-700: #1b2a44;
  --hz-ink:      #16233c;
  --hz-muted:    #5b6b85;

  /* Жёлтый «Честного знака» */
  --cz-yellow:      #ffdf3d;
  --cz-yellow-deep: #f2c40d;
  --cz-ink:         #343b47;

  --hz-bg:      #f5f8fd;
  --hz-surface: #ffffff;
  --hz-border:  #e3eaf5;

  --hz-grad: linear-gradient(135deg, var(--hz-blue-700), var(--hz-blue-500));
  --hz-grad-soft: linear-gradient(135deg, #eef5ff, #dbeafe);
  --hz-grad-hero: radial-gradient(120% 140% at 85% -20%, #1c4fd8 0%, #123a9e 45%, #0b1526 100%);

  /* Рассыпанные «пиксели» Data Matrix для фонов тёмных секций */
  --hz-dm-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='192'%3E%3Cg fill='%23ffffff'%3E%3Crect x='12' y='20' width='10' height='10' rx='2' fill-opacity='.10'/%3E%3Crect x='26' y='20' width='10' height='10' rx='2' fill-opacity='.05'/%3E%3Crect x='12' y='34' width='10' height='10' rx='2' fill-opacity='.06'/%3E%3Crect x='72' y='10' width='10' height='10' rx='2' fill-opacity='.07'/%3E%3Crect x='104' y='42' width='10' height='10' rx='2' fill-opacity='.10'/%3E%3Crect x='118' y='42' width='10' height='10' rx='2' fill-opacity='.05'/%3E%3Crect x='104' y='56' width='10' height='10' rx='2' fill-opacity='.06'/%3E%3Crect x='160' y='16' width='10' height='10' rx='2' fill-opacity='.08'/%3E%3Crect x='44' y='76' width='10' height='10' rx='2' fill-opacity='.09'/%3E%3Crect x='58' y='90' width='10' height='10' rx='2' fill-opacity='.05'/%3E%3Crect x='44' y='90' width='10' height='10' rx='2' fill-opacity='.06'/%3E%3Crect x='140' y='96' width='10' height='10' rx='2' fill-opacity='.10'/%3E%3Crect x='154' y='110' width='10' height='10' rx='2' fill-opacity='.05'/%3E%3Crect x='16' y='132' width='10' height='10' rx='2' fill-opacity='.07'/%3E%3Crect x='30' y='146' width='10' height='10' rx='2' fill-opacity='.05'/%3E%3Crect x='86' y='140' width='10' height='10' rx='2' fill-opacity='.09'/%3E%3Crect x='100' y='140' width='10' height='10' rx='2' fill-opacity='.05'/%3E%3Crect x='86' y='154' width='10' height='10' rx='2' fill-opacity='.05'/%3E%3Crect x='170' y='166' width='10' height='10' rx='2' fill-opacity='.08'/%3E%3Crect x='128' y='170' width='10' height='10' rx='2' fill-opacity='.05'/%3E%3C/g%3E%3C/svg%3E");

  --hz-radius:    16px;
  --hz-radius-lg: 24px;
  --hz-shadow-sm: 0 1px 2px rgba(16, 29, 51, .05), 0 4px 12px rgba(16, 29, 51, .06);
  --hz-shadow-md: 0 6px 24px rgba(18, 70, 184, .10);
  --hz-shadow-lg: 0 18px 48px rgba(11, 21, 38, .18);
}

/* ── Базовая типографика ─────────────────────────────────── */
body {
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--hz-ink);
  background: var(--hz-bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, .display-4, .display-5, .display-6 {
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--hz-ink);
}
.hz-lead { color: var(--hz-muted); font-size: 1.125rem; line-height: 1.65; }

/* Градиентный текст */
.hz-grad-text {
  background: var(--hz-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Кнопки ──────────────────────────────────────────────── */
.btn { font-weight: 700; letter-spacing: .01em; }
.btn-hz {
  background: var(--hz-grad);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: .8rem 1.6rem;
  box-shadow: 0 8px 20px rgba(26, 95, 208, .30);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-hz:hover, .btn-hz:focus {
  color: #fff;
  filter: brightness(1.07);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(26, 95, 208, .38);
}
.btn-hz:active { transform: translateY(0); }
.btn-hz-outline {
  background: transparent;
  color: var(--hz-blue-600);
  border: 2px solid var(--hz-blue-500);
  border-radius: 12px;
  padding: calc(.8rem - 2px) 1.6rem;
  transition: all .15s ease;
}
.btn-hz-outline:hover {
  background: var(--hz-blue-050);
  color: var(--hz-blue-700);
  transform: translateY(-2px);
}
.btn-hz-ghost {                    /* для тёмного фона */
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 12px;
  padding: .8rem 1.6rem;
  backdrop-filter: blur(6px);
  transition: all .15s ease;
}
.btn-hz-ghost:hover { background: rgba(255, 255, 255, .16); color: #fff; transform: translateY(-2px); }
.btn-cz {                          /* жёлтая кнопка «Честного знака» */
  background: linear-gradient(135deg, var(--cz-yellow), var(--cz-yellow-deep));
  color: var(--cz-ink);
  border: 0;
  border-radius: 12px;
  padding: .8rem 1.6rem;
  box-shadow: 0 8px 20px rgba(242, 196, 13, .35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-cz:hover { color: var(--cz-ink); filter: brightness(1.05); transform: translateY(-2px); }
.btn-hz-lg { padding: 1rem 2.2rem; font-size: 1.15rem; }

/* ── Карточки ────────────────────────────────────────────── */
.hz-card {
  background: var(--hz-surface);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  box-shadow: var(--hz-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hz-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--hz-shadow-md);
  border-color: var(--hz-blue-100);
}

/* Иконка-«плитка» в карточках */
.hz-icon-tile {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--hz-grad-soft);
  color: var(--hz-blue-600);
  font-size: 1.4rem;
  flex: 0 0 auto;
}
.hz-icon-tile-yellow { background: #fff7d1; color: #a8830a; }

/* Бейдж-«таблетка» */
.hz-pill {
  display: inline-block;
  font-size: .72rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--hz-blue-600);
  background: var(--hz-blue-050);
  border: 1px solid var(--hz-blue-100);
  padding: .3em .9em;
  border-radius: 2rem;
}
.hz-pill-yellow { color: #8a6d06; background: #fff7d1; border-color: #ffe98c; }

/* ── Навбар ──────────────────────────────────────────────── */
.hz-navbar {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hz-border);
}
.hz-navbar .navbar-brand { gap: .55rem; }
.hz-brand-name {
  font-family: "HorizanceBrand", "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: .3em;
  margin-right: -.3em; /* компенсация трекинга последней буквы */
  /* по full_logo.png высота букв = 0.5 высоты иконки (34px):
     капитель Montserrat ≈ 0.7em → 0.5·34/0.7 ≈ 24px */
  font-size: 1.5rem;
  color: #1550c4;      /* фирменный синий из full_logo.png */
  text-transform: uppercase;
}
@media (max-width: 575px) {
  .hz-brand-name { font-size: 1.05rem; }
}
.hz-navbar-dark {
  background: rgba(11, 21, 38, .65);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.hz-navbar-dark .hz-brand-name {
  background: linear-gradient(135deg, #9cc3ff, #5ea0ff);
  -webkit-background-clip: text; background-clip: text;
}

/* ── Футер ───────────────────────────────────────────────── */
.hz-footer {
  background: var(--hz-navy-900);
  color: #93a5c4;
  font-size: .9rem;
}
.hz-footer a { color: #c4d4f2; text-decoration: none; transition: color .15s; }
.hz-footer a:hover { color: var(--cz-yellow); }
.hz-footer .hz-footer-title {
  color: #fff; font-weight: 800; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .1em;
}
.hz-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .8rem; color: #6b7d9d;
}

/* ── Секции ──────────────────────────────────────────────── */
.hz-section { padding: 4.5rem 0; }
.hz-section-title { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin-bottom: .75rem; }
.hz-section-sub { color: var(--hz-muted); font-size: 1.05rem; max-width: 640px; }

/* ── Формы ───────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 10px;
  border-color: var(--hz-border);
  padding: .6rem .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--hz-blue-400);
  box-shadow: 0 0 0 .25rem rgba(47, 125, 246, .15);
}
.input-group-text {
  border-radius: 10px;
  border-color: var(--hz-border);
  background: var(--hz-blue-050);
  color: var(--hz-blue-600);
}

/* ── Появление при скролле ───────────────────────────────── */
.hz-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.hz-reveal.hz-in { opacity: 1; transform: none; }

/* ── Анимации логотипа ───────────────────────────────────── */
@keyframes hzRayPulse {
  0%, 100% { opacity: .45; }
  50%      { opacity: 1; }
}
@keyframes hzFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes hzSpinSlow {
  to { transform: rotate(360deg); }
}
.hz-float { animation: hzFloat 7s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hz-reveal { opacity: 1; transform: none; }
}

/* ── Уведомление о cookie ─────────────────────────────── */
.hz-cookie-banner {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 1080;
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  color: var(--hz-ink);
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius);
  box-shadow: var(--hz-shadow-lg);
  padding: 1rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem;
  font-size: .9rem;
  animation: hzCookieIn .35s ease-out;
}
.hz-cookie-banner p { margin: 0; flex: 1 1 380px; color: var(--hz-muted); }
.hz-cookie-banner a { color: var(--hz-blue-600); }
.hz-cookie-banner .hz-cookie-actions { display: flex; gap: .6rem; flex: 0 0 auto; margin-left: auto; }
.hz-cookie-banner button { white-space: nowrap; }
@keyframes hzCookieIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hz-cookie-banner { animation: none; }
}
