/* =============================================================================
   Benarit — components.css
   Требует: tokens.css первым, затем main.css
   ============================================================================= */

/* — КОНТЕЙНЕР -------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* — ТОП-БАР ---------------------------------------------------------------- */
.topbar {
  height: var(--topbar-height);
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-xs);
  font-weight: 500;
  color: var(--color-white);
  letter-spacing: 0.5px;
  text-align: center;
  padding-inline: 16px;
}
.topbar a { color: var(--color-white); text-decoration: underline; text-underline-offset: 3px; transition: opacity var(--transition); }
.topbar a:hover { opacity: 0.75; }

/* — ХЕДЕР ------------------------------------------------------------------ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(8, 8, 10, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  transition: height 0.3s ease;
}
.header--compact {
  height: 44px;
}
.header .container  { display: flex; align-items: center; gap: 40px; }
.header__logo       { flex-shrink: 0; display: flex; align-items: center; }
.header__logo img,
.header__logo svg   { height: 32px; width: auto; }
.header__phone {
  margin-left: auto;
  flex-shrink: 0;
  font-size: var(--font-small);
  font-weight: 500;
  color: var(--color-white);
  letter-spacing: 0.3px;
  transition: color var(--transition);
}
.header__phone:hover { color: var(--color-hover); }

/* — НАВИГАЦИЯ -------------------------------------------------------------- */
.nav { display: flex; align-items: center; gap: 8px; flex: 1; }
.nav__link {
  font-size: var(--font-small);
  color: var(--color-text);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover,
.nav__link.active { color: var(--color-white); background: var(--color-surface-hover); }

/* — МОБИЛЬНОЕ МЕНЮ (checkbox-trick) ---------------------------------------- */
#nav-toggle { display: none; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.burger:hover { background: var(--color-surface-hover); }
.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  position: relative;
}
.burger span::before,
.burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after  { top:  6px; }

#nav-toggle:checked ~ .header .burger span         { background: transparent; }
#nav-toggle:checked ~ .header .burger span::before { transform: rotate(45deg)  translate(4px,  4px); }
#nav-toggle:checked ~ .header .burger span::after  { transform: rotate(-45deg) translate(4px, -4px); }

@media (max-width: 1023px) {
  .burger        { display: flex; }
  .header__phone { display: none; }
  .nav {
    position: fixed;
    inset: 0 0 0 -100vw;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 32px;
    gap: 4px;
    transition: left var(--transition-slow);
    z-index: 99;
  }
  #nav-toggle:checked ~ .header .nav,
  #nav-toggle:checked + .header .nav,
  #nav-toggle:checked ~ .nav { left: 0; }
  .nav__link { font-size: var(--font-h4); font-weight: 500; padding: 10px 16px; width: 100%; }
}

/* — КНОПКИ ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "GraphikLCG", Arial, sans-serif;
  font-size: var(--font-ui);
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-lg);
  padding: 16px 32px;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
}
.btn:active                { transform: scale(0.97); }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.btn--primary              { background: var(--color-accent); color: var(--color-white); border: 2px solid transparent; }
.btn--primary:hover        { background: var(--color-hover); box-shadow: 0 0 32px rgba(68, 56, 235, 0.5); }
.btn--secondary            { background: transparent; color: var(--color-white); border: 2px solid rgba(255, 255, 255, 0.2); }
.btn--secondary:hover      { border-color: var(--color-accent); background: rgba(68, 56, 235, 0.08); }
.btn--ghost                { background: transparent; color: var(--color-text); border: 2px solid transparent; padding-inline: 16px; }
.btn--ghost:hover          { color: var(--color-white); background: var(--color-surface-hover); }
.btn--sm                   { font-size: var(--font-small); padding: 10px 20px; border-radius: var(--radius-md); }
.btn--lg                   { font-size: 22px; padding: 20px 48px; border-radius: var(--radius-xl); }
.btn--icon                 { padding: 12px; border-radius: var(--radius-md); aspect-ratio: 1; }

/* — ТЕГИ / БЕЙДЖИ ---------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-xs);
  font-weight: 500;
  letter-spacing: 3.7px;
  text-transform: uppercase;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-surface-hover);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  white-space: nowrap;
}
.tag--accent { color: var(--color-accent); background: rgba(68, 56, 235, 0.12); border-color: var(--color-accent-border); }
.tag--white  { color: var(--color-white);  background: var(--color-surface-hover); border-color: rgba(255, 255, 255, 0.15); }

/* — КАРТОЧКИ --------------------------------------------------------------- */
.card {
  background: var(--color-dark);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card:hover { border-color: rgba(68, 56, 235, 0.4); box-shadow: 0 8px 40px rgba(68, 56, 235, 0.12); transform: translateY(-3px); }
.card__title { font-size: var(--font-h4); font-weight: 500; color: var(--color-white); line-height: 1.2; margin: 0 0 12px; }
.card__text  { font-size: var(--font-base); color: var(--color-text); line-height: 1.5; margin: 0; }

.card--service { display: flex; flex-direction: column; gap: 20px; }
.card--service .card__icon { width: 48px; height: 48px; background: var(--color-accent-bg); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card--service .card__icon svg,
.card--service .card__icon img { width: 24px; height: 24px; }

.card--case { position: relative; overflow: hidden; aspect-ratio: 4/3; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; }
.card--case .card__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform var(--transition-slow); }
.card--case:hover .card__bg { transform: scale(1.04); }
.card--case .card__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,8,10,0.9) 0%, transparent 60%); z-index: 1; }
.card--case .card__body  { position: relative; z-index: 2; }
.card--case .card__title { font-size: 20px; margin: 0; }

.card--review { display: flex; flex-direction: column; gap: 20px; }
.card--review .card__rating     { display: flex; gap: 4px; }
.card--review .card__rating svg { color: #F5A623; }
.card--review .card__author     { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.card--review .card__avatar     { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--color-surface-hover); flex-shrink: 0; }
.card--review .card__name       { font-size: var(--font-small); font-weight: 500; color: var(--color-white); margin: 0 0 2px; }
.card--review .card__company    { font-size: var(--font-xs); color: var(--color-text); margin: 0; }

.card--tariff { display: flex; flex-direction: column; gap: 24px; position: relative; }
.card--tariff.is-featured { border-color: var(--color-accent); background: linear-gradient(160deg, var(--color-accent-bg) 0%, var(--color-dark) 60%); }
.card--tariff.is-featured::before {
  content: "Популярный";
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  font-size: var(--font-xs); font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--color-white); background: var(--color-accent);
  border-radius: var(--radius-pill); padding: 4px 16px; white-space: nowrap;
}
.card--tariff .card__price       { display: flex; align-items: baseline; gap: 4px; }
.card--tariff .card__price-value { font-size: var(--font-accent); font-weight: 500; color: var(--color-white); line-height: 1; letter-spacing: -0.1px; }
.card--tariff .card__price-unit  { font-size: var(--font-base); color: var(--color-text); }
.card--tariff .card__features    { display: flex; flex-direction: column; gap: 10px; }
.card--tariff .card__feature     { display: flex; align-items: flex-start; gap: 10px; font-size: var(--font-base); color: var(--color-text); }
.card--tariff .card__feature::before {
  content: ""; display: block; width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='9' fill='%234438EB' fill-opacity='.2'/%3E%3Cpath d='M5 9l3 3 5-5' stroke='%234438EB' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* — СЕТКИ КАРТОЧЕК --------------------------------------------------------- */
.cards-grid    { display: grid; gap: 20px; }
.cards-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* — ИКОНКА С ПОДПИСЬЮ ------------------------------------------------------ */
.icon-item { display: flex; align-items: center; gap: 12px; font-size: var(--font-base); color: var(--color-text); }
.icon-item__icon { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--color-surface); border: 1px solid var(--color-surface-hover); border-radius: var(--radius-md); }
.icon-item__icon svg,
.icon-item__icon img { width: 22px; height: 22px; }

/* — ФОРМА / ПОЛЯ ----------------------------------------------------------- */
.form      { display: flex; flex-direction: column; gap: 16px; }
.form--row { flex-direction: row; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 200px; }
.field__label { font-size: var(--font-xs); font-weight: 500; letter-spacing: 0.5px; color: var(--color-text); text-transform: uppercase; }
.field__input,
.field__textarea {
  font-family: "GraphikLCG", Arial, sans-serif;
  font-size: var(--font-base); color: var(--color-white);
  background: var(--color-surface); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md); padding: 14px 18px;
  outline: none; width: 100%;
  transition: border-color var(--transition), background var(--transition);
}
.field__input::placeholder,
.field__textarea::placeholder { color: var(--color-text-faint); }
.field__input:focus,
.field__textarea:focus { border-color: var(--color-accent); background: rgba(68,56,235,0.06); }
.field__textarea { resize: vertical; min-height: 120px; line-height: 1.5; }

.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.checkbox__input { display: none; }
.checkbox__box { width: 22px; height: 22px; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.2); border-radius: 6px; background: transparent; display: flex; align-items: center; justify-content: center; transition: border-color var(--transition), background var(--transition); }
.checkbox__input:checked + .checkbox__box { background: var(--color-accent); border-color: var(--color-accent); }
.checkbox__input:checked + .checkbox__box::after { content: ""; display: block; width: 11px; height: 7px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.checkbox__label { font-size: var(--font-base); color: var(--color-text); line-height: 1.4; }

.range-wrap         { display: flex; flex-direction: column; gap: 8px; }
.range-wrap__header { display: flex; justify-content: space-between; align-items: baseline; }
.range-wrap__label  { font-size: var(--font-base); color: var(--color-text); }
.range-wrap__value  { font-size: var(--font-h4); font-weight: 500; color: var(--color-white); }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; outline: none; cursor: pointer; }
.range::-webkit-slider-thumb,
.range::-moz-range-thumb { width: 22px; height: 22px; background: var(--color-accent); border-radius: 50%; border: 3px solid var(--color-bg); cursor: pointer; }
.range::-webkit-slider-thumb { -webkit-appearance: none; box-shadow: 0 0 0 2px var(--color-accent); transition: box-shadow var(--transition); }
.range::-webkit-slider-thumb:hover { box-shadow: 0 0 0 4px rgba(68,56,235,0.3); }

/* — FAQ АККОРДЕОН ---------------------------------------------------------- */
.faq { display: flex; flex-direction: column; gap: 2px; }
.faq__item             { border-bottom: 1px solid var(--color-border); }
.faq__item:first-child { border-top: 1px solid var(--color-border); }
.faq__toggle           { display: none; }
.faq__question { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; cursor: pointer; font-size: var(--font-base); font-weight: 500; color: var(--color-white); line-height: 1.5; user-select: none; transition: color var(--transition); }
.faq__question:hover { color: var(--color-hover); }
.faq__icon { width: 24px; height: 24px; flex-shrink: 0; position: relative; }
.faq__icon::before,
.faq__icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; background: var(--color-text); border-radius: 1px; transition: transform var(--transition), opacity var(--transition); }
.faq__icon::before { transform: translate(-50%, -50%); }
.faq__icon::after  { transform: translate(-50%, -50%) rotate(90deg); }
.faq__answer       { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq__answer-inner { font-size: var(--font-base); color: var(--color-text); line-height: 1.6; padding-bottom: 20px; }
.faq__toggle:checked ~ .faq__question                   { color: var(--color-white); }
.faq__toggle:checked ~ .faq__question .faq__icon::after { opacity: 0; }
.faq__toggle:checked ~ .faq__answer                     { max-height: 600px; }

/* — СЕКЦИЯ-ШАПКА ----------------------------------------------------------- */
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; }
.section-head--center { align-items: center; text-align: center; }
.section-head--row    { flex-direction: row; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.section-tag   { font-size: var(--font-xs); font-weight: 500; letter-spacing: 3.7px; text-transform: uppercase; color: var(--color-accent); }
.section-title { font-size: var(--font-h2); font-weight: 500; color: var(--color-white); line-height: 1.1; letter-spacing: -0.1px; margin: 0; }
.section-title--h3 { font-size: var(--font-h3); }
.section-desc  { font-size: var(--font-base); color: var(--color-text); line-height: 1.5; max-width: 580px; margin: 0; }
.section-head--center .section-desc { margin-inline: auto; }

/* — НАМ ДОВЕРЯЮТ ----------------------------------------------------------- */
.clients { overflow: hidden; position: relative; }
.clients__track { display: flex; gap: 48px; animation: clients-scroll 30s linear infinite; }
.clients__track:hover { animation-play-state: paused; }
.clients__item { flex-shrink: 0; display: flex; align-items: center; justify-content: center; height: 40px; opacity: 0.45; filter: grayscale(1); transition: opacity var(--transition), filter var(--transition); }
.clients__item:hover { opacity: 1; filter: none; }
.clients__item img,
.clients__item svg { height: 100%; width: auto; max-width: 140px; }
.clients::before,
.clients::after { content: ""; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 1; pointer-events: none; }
.clients::before { left: 0;  background: linear-gradient(to right, var(--color-bg), transparent); }
.clients::after  { right: 0; background: linear-gradient(to left,  var(--color-bg), transparent); }
@keyframes clients-scroll { to { transform: translateX(-50%); } }

/* — ШАГИ ПРОЦЕССА (нумерованные) ------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: steps; }
.step  { display: flex; flex-direction: column; gap: 16px; counter-increment: steps; position: relative; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 22px; right: -12px; width: 24px; height: 1px; background: rgba(255,255,255,0.15); }
.step__number { width: 44px; height: 44px; background: var(--color-accent-bg); border: 1px solid var(--color-accent-border); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: var(--font-small); font-weight: 600; color: var(--color-accent); }
.step__number::before { content: counter(steps, decimal-leading-zero); }
.step__title { font-size: var(--font-base); font-weight: 500; color: var(--color-white); line-height: 1.3; margin: 0; }
.step__text  { font-size: var(--font-small); color: var(--color-text); line-height: 1.5; margin: 0; }

/* — ШАГИ ПРОЦЕССА (горизонтальные с иконками, секция «Глобус») ------------- */
.steps-process {
  display: flex;
  align-items: flex-start;
}
.steps-process__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--steps-process-gap);
  min-width: var(--steps-item-min-width);
}
.steps-process__divider {
  flex-shrink: 0;
  width: var(--steps-process-divider-width);
  height: 1px;
  background: var(--steps-process-divider-color);
  margin-top: 22px;
  align-self: flex-start;
}
.steps-process__icon {
  width: var(--steps-process-icon-size);
  height: var(--steps-process-icon-size);
  border-radius: var(--radius-md);
  background: var(--steps-process-icon-bg);
  border: 1px solid var(--steps-process-icon-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.steps-process__icon svg {
  width: 22px;
  height: 22px;
  color: var(--steps-process-icon-color);
}
.steps-process__title {
  font-size: var(--steps-process-title-size);
  color: var(--color-white);
  line-height: var(--lh-para);
  margin: 0;
}

/* — ГЛОБУС — МЕРЦАЮЩИЕ ТОЧКИ ---------------------------------------------- */
.globe-dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--color-accent);
  transform: translate(-50%, -50%);
  animation: globe-pulse 3s ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes globe-pulse {
  0%, 100% { opacity: 0.15; transform: translate(-50%, -50%) scale(0); }
  50%       { opacity: 1;    transform: translate(-50%, -50%) scale(1); }
}

/* — АКЦЕНТНОЕ ЧИСЛО -------------------------------------------------------- */
.accent-number     { font-size: var(--font-accent); font-weight: 500; color: var(--color-white); line-height: 1; letter-spacing: -0.1px; }
.accent-number sup { font-size: 0.4em; vertical-align: top; line-height: 1.8; }

/* — КНОПКА «НАВЕРХ» -------------------------------------------------------- */
.scroll-top { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--color-surface); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-md); color: var(--color-white); cursor: pointer; transition: background var(--transition), border-color var(--transition); }
.scroll-top:hover { background: var(--color-accent); border-color: var(--color-accent); }
.scroll-top svg   { width: 18px; height: 18px; }

/* — ФУТЕР ------------------------------------------------------------------ */
.footer { border-top: 1px solid var(--color-border); padding: 40px 0 32px; }
.footer__top  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.footer__logo img,
.footer__logo svg { height: 28px; width: auto; }
.footer__contacts { display: flex; align-items: center; justify-content: center; gap: 32px; flex-wrap: wrap; margin-bottom: 28px; }
.footer__contact  { display: flex; align-items: center; gap: 8px; font-size: var(--font-small); color: var(--color-text); transition: color var(--transition); }
.footer__contact:hover { color: var(--color-white); }
.footer__contact svg   { width: 18px; height: 18px; flex-shrink: 0; }
.footer__bottom { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer__copy,
.footer__policy { font-size: var(--font-xs); color: var(--color-text-faint); }
.footer__policy { text-decoration: underline; text-underline-offset: 3px; transition: color var(--transition); }
.footer__policy:hover { color: var(--color-text); }

/* — DIVIDER ---------------------------------------------------------------- */
.divider { height: 1px; background: var(--color-border); border: none; margin: 0; }

/* — УТИЛИТЫ ---------------------------------------------------------------- */
.text-white  { color: var(--color-white)  !important; }
.text-accent { color: var(--color-accent) !important; }
.text-muted  { color: var(--color-text)   !important; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

.mt-0  { margin-top: 0; }      .mb-0  { margin-bottom: 0; }
.mt-8  { margin-top: 8px; }    .mb-8  { margin-bottom: 8px; }
.mt-16 { margin-top: 16px; }   .mb-16 { margin-bottom: 16px; }
.mt-24 { margin-top: 24px; }   .mb-24 { margin-bottom: 24px; }
.mt-32 { margin-top: 32px; }   .mb-32 { margin-bottom: 32px; }
.mt-48 { margin-top: 48px; }   .mb-48 { margin-bottom: 48px; }
.mt-64 { margin-top: 64px; }

.flex            { display: flex; }
.flex-col        { flex-direction: column; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

.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; }