/* ================================================
   BRANDMAKERS — Components
   Header, Footer, Buttons, Cards, Forms, Badges
   BEM naming convention
   ================================================ */

/* ===========================
   HEADER
   =========================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--bm-z-header);
  background: rgba(244, 244, 244, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bm-border);
  transition: background var(--bm-dur) ease, box-shadow var(--bm-dur) ease;
}

.header.scrolled {
  box-shadow: var(--bm-shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--bm-header-h);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bm-dark);
  transition: opacity var(--bm-dur) ease;
}

.header__logo:hover {
  opacity: 0.8;
}

.header__logo-img {
  height: 32px;
  width: auto;
}

.header__logo-text {
  font-family: var(--bm-font-heading);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.header__logo-tagline {
  font-size: 10px;
  color: var(--bm-gray-light);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--bm-gray);
  padding: 8px 14px;
  border-radius: var(--bm-radius-sm);
  transition: color var(--bm-dur-fast) ease, background var(--bm-dur-fast) ease;
  text-decoration: none;
}

.header__nav-link:hover,
.header__nav-link--active {
  color: var(--bm-dark);
  background: rgba(0, 0, 0, 0.05);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bm-dark);
  color: var(--bm-white);
  border-radius: var(--bm-radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--bm-dur-fast) ease, transform var(--bm-dur-fast) ease;
}

.header__cta:hover {
  background: var(--bm-orange);
  transform: translateY(-1px);
}

.header__cta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--bm-radius-sm);
  cursor: pointer;
  border: none;
  background: none;
  transition: background var(--bm-dur-fast) ease;
}

.header__burger:hover {
  background: rgba(0, 0, 0, 0.05);
}

.header__burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--bm-dark);
  border-radius: 2px;
  transition: transform var(--bm-dur) ease, opacity var(--bm-dur) ease;
  transform-origin: center;
}

.header__burger.open .header__burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.header__burger.open .header__burger-line:nth-child(2) {
  opacity: 0;
}
.header__burger.open .header__burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.header__mobile-nav {
  display: none;
  flex-direction: column;
  padding: 8px 0 16px;
  border-top: 1px solid var(--bm-border);
}

.header__mobile-nav.open {
  display: flex;
}

.header__mobile-nav .header__nav-link {
  padding: 12px 16px;
  border-radius: 0;
  font-size: 15px;
}

.header__mobile-cta {
  margin: 8px 16px 0;
  justify-content: center;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--bm-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 64px 0 32px;
  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: 40px 40px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 40px;
}

.footer__brand {}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bm-white);
  margin-bottom: 16px;
}

.footer__logo-text {
  font-family: var(--bm-font-heading);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.footer__tagline {
  font-size: 13px;
  line-height: 1.6;
  max-width: 240px;
  margin-bottom: 24px;
}

.footer__social {
  display: flex;
  gap: 10px;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--bm-radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  transition: background var(--bm-dur-fast) ease, color var(--bm-dur-fast) ease;
  text-decoration: none;
}

.footer__social-link:hover {
  background: var(--bm-orange);
  color: var(--bm-white);
}

.footer__social-link svg {
  width: 16px;
  height: 16px;
}

.footer__col-title {
  font-family: var(--bm-font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bm-white);
  margin-bottom: 16px;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__nav-link {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color var(--bm-dur-fast) ease;
}

.footer__nav-link:hover {
  color: var(--bm-white);
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.footer__contact-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--bm-orange);
}

.footer__contact-item a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color var(--bm-dur-fast) ease;
}

.footer__contact-item a:hover {
  color: var(--bm-white);
}

.footer__divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 40px 0 24px;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer__copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.footer__legal {
  display: flex;
  gap: 20px;
}

.footer__legal a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color var(--bm-dur-fast) ease;
}

.footer__legal a:hover {
  color: rgba(255, 255, 255, 0.65);
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--bm-radius-sm);
  font-family: var(--bm-font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition:
    background var(--bm-dur-fast) ease,
    color var(--bm-dur-fast) ease,
    transform var(--bm-dur-fast) ease,
    box-shadow var(--bm-dur-fast) ease,
    border-color var(--bm-dur-fast) ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Primary — тёмный */
.btn--primary {
  background: var(--bm-dark);
  color: var(--bm-white);
}

.btn--primary:hover {
  background: var(--bm-orange);
  box-shadow: var(--bm-shadow-orange);
}

/* Orange */
.btn--orange {
  background: var(--bm-orange);
  color: var(--bm-white);
  box-shadow: var(--bm-shadow-orange);
}

.btn--orange:hover {
  background: var(--bm-orange-hover);
  box-shadow: 0 12px 40px rgba(255, 79, 0, 0.35);
}

/* Outline */
.btn--outline {
  background: transparent;
  color: var(--bm-dark);
  border: 1.5px solid var(--bm-dark);
}

.btn--outline:hover {
  background: var(--bm-dark);
  color: var(--bm-white);
}

/* Outline white (на тёмном фоне) */
.btn--outline-white {
  background: transparent;
  color: var(--bm-white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Ghost — без фона и рамки */
.btn--ghost {
  background: transparent;
  color: var(--bm-gray);
  padding: 10px 16px;
}

.btn--ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--bm-dark);
  transform: none;
}

/* White (на тёмном фоне) */
.btn--white {
  background: var(--bm-white);
  color: var(--bm-dark);
}

.btn--white:hover {
  background: var(--bm-bg);
  box-shadow: var(--bm-shadow);
}

/* Sizes */
.btn--sm {
  padding: 9px 18px;
  font-size: 13px;
}

.btn--lg {
  padding: 17px 36px;
  font-size: 15px;
  border-radius: var(--bm-radius);
}

.btn--full {
  width: 100%;
}

/* Loading state */
.btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===========================
   BADGE / PILL
   =========================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}

.badge--orange {
  background: rgba(255, 79, 0, 0.1);
  color: var(--bm-orange);
}

.badge--dark {
  background: rgba(0, 0, 0, 0.06);
  color: var(--bm-dark);
}

.badge--white {
  background: rgba(255, 255, 255, 0.1);
  color: var(--bm-white);
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ===========================
   CARDS (Base)
   =========================== */
.card {
  background: var(--bm-card-bg);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius-lg);
  padding: 32px;
  transition:
    transform var(--bm-dur) var(--bm-ease),
    box-shadow var(--bm-dur) var(--bm-ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bm-shadow-lg);
}

.card--dark {
  background: var(--bm-dark-card);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--bm-white);
}

.card--dark:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--bm-radius);
  background: var(--bm-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
  flex-shrink: 0;
}

.card--dark .card__icon {
  background: rgba(255, 255, 255, 0.1);
}

.card__title {
  font-family: var(--bm-font-heading);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card__text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--bm-gray);
}

.card--dark .card__text {
  color: rgba(255, 255, 255, 0.75);
}

/* ===========================
   CONTACT FORM
   =========================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--bm-gray);
}

.contact-form__label--light {
  color: rgba(255, 255, 255, 0.75);
}

.contact-form__input,
.contact-form__textarea,
.contact-form__select {
  width: 100%;
  padding: 13px 16px;
  background: var(--bm-white);
  border: 1.5px solid var(--bm-border-solid);
  border-radius: var(--bm-radius-sm);
  font-family: var(--bm-font-body);
  font-size: 14px;
  color: var(--bm-dark);
  transition: border-color var(--bm-dur-fast) ease, box-shadow var(--bm-dur-fast) ease;
  outline: none;
}

.contact-form__input:focus,
.contact-form__textarea:focus,
.contact-form__select:focus {
  border-color: var(--bm-orange);
  box-shadow: 0 0 0 3px rgba(255, 79, 0, 0.1);
}

.contact-form__textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}

/* Dark form (на тёмном фоне) */
.contact-form--dark .contact-form__input,
.contact-form--dark .contact-form__textarea {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--bm-white);
}

.contact-form--dark .contact-form__input::placeholder,
.contact-form--dark .contact-form__textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.contact-form--dark .contact-form__input:focus,
.contact-form--dark .contact-form__textarea:focus {
  border-color: var(--bm-orange);
  background: rgba(255, 255, 255, 0.1);
}

.contact-form__hint {
  font-size: 12px;
  color: var(--bm-gray-light);
  text-align: center;
  margin-top: 4px;
}

.contact-form__success {
  display: none;
  text-align: center;
  padding: 32px 24px;
  background: rgba(34, 197, 94, 0.06);
  border: 1.5px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--bm-radius);
  color: #16a34a;
  font-weight: 500;
}

.contact-form__success.visible {
  display: block;
}

.contact-form__error {
  font-size: 13px;
  color: #dc2626;
  display: none;
}

.contact-form__error.visible {
  display: block;
}

/* ===========================
   STAT / METRIC CHIP
   =========================== */
.stat-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-chip__value {
  font-family: var(--bm-font-heading);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-chip__label {
  font-size: 13px;
  color: var(--bm-gray);
}

.stat-chip--white .stat-chip__label {
  color: rgba(255, 255, 255, 0.7);
}

/* ===========================
   PROCESS STEPS
   =========================== */
.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step__num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bm-dark);
  color: var(--bm-white);
  font-family: var(--bm-font-heading);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step__body {}

.step__title {
  font-family: var(--bm-font-heading);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step__text {
  font-size: 14px;
  color: var(--bm-gray);
  line-height: 1.6;
}

/* ===========================
   RESPONSIVE
   =========================== */

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
  :root {
    --bm-container-pad: 16px;
  }

  .section {
    padding: 64px 0;
  }

  .section__head {
    margin-bottom: 40px;
  }

  .section__subtitle {
    font-size: 15px;
  }

  .header__nav {
    display: none;
  }

  .header__actions {
    display: none;
  }

  .header__burger {
    display: flex;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .contact-form__row {
    grid-template-columns: 1fr;
  }
}
