/* =========================================================
   PRIZMA — base.css
   Глобальные переменные, reset, типографика, контейнер, кнопки.
   Подключается на КАЖДОЙ странице первым файлом.
   ========================================================= */

:root {
  /* ===== Фирменная цветовая палитра (брендбук) =====
     #252D43 — тёмно-синий (основной)
     #CE5D25 — оранжевый (акцент)
     #1D1D1B — почти чёрный (текст)
     #FFFFFF — белый
     Остальные оттенки — производные от этих четырёх. */
  --color-navy: #252d43;
  --color-navy-soft: #33405f; /* осветлённый navy для hover тёмных кнопок */
  --color-bg: #f4f4f2;         /* нейтральный светлый фон (производный от белого) */
  --color-surface: #ffffff;
  --color-text: #1d1d1b;
  --color-text-muted: #5c5f6b; /* приглушённый текст (производный) */
  --color-text-on-dark: #ffffff;
  --color-text-on-dark-muted: #a7abb8;
  --color-accent: #ce5d25;
  --color-accent-dark: #ce5d25; /* фирменный оранжевый (без затемнения) */
  --color-accent-2: #252d43;    /* второй акцент = navy (в градиенте логотипа) */
  --color-border: #e5e4e0;
  --color-border-dark: #38405a;
  --color-success: #2e8b57;
  --color-danger: #c0392b;

  /* ===== Типографика =====
     Единый шрифт — Manrope (и заголовки, и текст). */
  --font-main: "Manrope", "Segoe UI", Arial, sans-serif;
  --font-heading: "Manrope", "Segoe UI", Arial, sans-serif;
  --fs-h1: clamp(2.2rem, 4vw + 1rem, 3.75rem);
  --fs-h2: clamp(1.7rem, 2.4vw + 1rem, 2.5rem);
  --fs-h3: clamp(1.25rem, 1.2vw + 1rem, 1.75rem);
  --fs-lead: clamp(1.05rem, 0.6vw + 1rem, 1.25rem);
  --fs-base: 1rem;
  --fs-small: 0.875rem;

  /* Отступы (шкала) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  /* Сетка */
  --container-width: 1240px;
  --container-pad: 24px;
  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 28px;
  --shadow-card: 0 12px 32px rgba(37, 45, 67, 0.1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

/* ---------- Типографика ----------
   Единый шрифт Manrope: заголовки — полужирный (600), текст — обычный. */
h1,
.h1 {
  font-family: var(--font-heading);
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
}

h2,
.h2 {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0;
}

h3,
.h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.3;
}

.lead {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  line-height: 1.6;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--color-accent);
  display: inline-block;
}

/* ---------- Контейнер и сетка ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-8);
}

.section--tight {
  padding-block: var(--space-6);
}

.section--dark {
  background: var(--color-navy);
  color: var(--color-text-on-dark);
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-6);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

/* ---------- Кнопки ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--fs-base);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

/* Бегущая подсветка бордера кнопки при наведении (см. glow-border ниже) */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--glow-angle),
    #ffffff 0deg,
    var(--color-accent) 20deg,
    rgba(206, 93, 37, 0) 110deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.btn:hover::after {
  opacity: 1;
  animation: glow-border-travel 2.5s linear infinite;
}

/* Кнопки внутри блоков, у которых уже бежит подсветка бордера,
   свою линию не показывают — иначе бежит и рамка блока, и рамка кнопки. */
.tariff-card .btn::after,
.feedback-panel .btn::after,
.tariff-modal .btn::after {
  content: none;
}

.btn--primary {
  background: var(--color-navy);
  color: var(--color-text-on-dark);
}

.btn--primary:hover {
  background: var(--color-navy-soft);
}

.btn--accent {
  background: var(--color-accent);
  color: #ffffff;
}

.btn--accent:hover {
  background: var(--color-accent-dark);
  color: #ffffff;
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  box-shadow: inset 0 0 0 1.5px var(--color-border);
}

.btn--outline:hover {
  box-shadow: inset 0 0 0 1.5px var(--color-navy);
}

.btn--on-dark {
  background: transparent;
  color: var(--color-text-on-dark);
  box-shadow: inset 0 0 0 1.5px rgba(245, 244, 241, 0.35);
}

.btn--on-dark:hover {
  box-shadow: inset 0 0 0 1.5px rgba(245, 244, 241, 0.9);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 12px 22px;
  font-size: var(--fs-small);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  border-bottom: 1.5px solid transparent;
  transition: border-color 0.15s ease, gap 0.15s ease;
}

.link-arrow:hover {
  border-color: currentColor;
  gap: 12px;
}

.link-arrow__icon {
  transition: transform 0.15s ease;
}

.link-arrow:hover .link-arrow__icon {
  transform: translateX(2px);
}

/* ---------- Утилиты ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Служебные страницы без hero: контент отступает от фиксированной шапки,
   а сама шапка сразу матовая с тёмным текстом (нет тёмного hero под ней). */
body.has-solid-header {
  padding-top: 92px;
}


/* =========================================================
   Анимированная подсветка бордера (glow-border)
   Тонкая световая линия «бежит» по периметру блока.
   Механика вынесена сюда, чтобы её могли переиспользовать
   разные блоки (тарифы, кейсы, преимущества, форма).
   Как применить к элементу:
     1) элементу задать position: relative;
     2) добавить ::after с классом-паттерном ниже
        (см. примеры в tariffs.css / cases.css / advantages.css).
   ========================================================= */
@property --glow-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes glow-border-travel {
  to {
    --glow-angle: 360deg;
  }
}


/* Готовый оверлей бордера — вешается на ::after блока.
   Использование: .my-block::after { @extend недоступен в CSS,
   поэтому копируем набор свойств .glow-border-layer ниже
   через общий селектор в конкретном css блока. */
.glow-border-layer {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--glow-angle),
    #ffffff 0deg,
    var(--color-accent) 20deg,
    rgba(206, 93, 37, 0) 110deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (max-width: 720px) {
  :root {
    --container-pad: 20px;
    --space-8: 64px;
    --space-7: 48px;
    --space-6: 32px;
  }
}
