/* ============================================================
   СЗГО — стили лендинга
   Mobile-first, индустриальный дизайн: тёмно-серый + оранжевый
   ============================================================ */

:root {
  --color-bg:        #1a1a1a;
  --color-bg-alt:    #222222;
  --color-bg-card:   #2a2a2a;
  --color-bg-input:  #333333;
  --color-border:    #3a3a3a;
  --color-text:      #e8e8e8;
  --color-text-muted:#9a9a9a;
  --color-accent:    #f97316;
  --color-accent-hover: #ea580c;
  --color-accent-dim: rgba(249, 115, 22, 0.15);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.25s ease;
  --header-h: 64px;
  --container: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: 4rem;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section-header {
  margin-bottom: 2rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
}

/* Анимация появления секций */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.15s ease;
}

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

.btn--primary {
  background-color: var(--color-accent);
  color: #fff;
  border: 2px solid var(--color-accent);
}

.btn--primary:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

/* --- Логотип --- */
.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 1;
  min-width: 0;
}

.logo__img {
  flex-shrink: 0;
  height: 42px;
  width: auto;
  max-width: 40px;
  object-fit: contain;
  background: transparent;
}

.logo__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.logo__abbr {
  color: var(--color-text);
  font-size: 1.125rem;
  font-weight: 800;
  flex-shrink: 0;
}

.logo__sep {
  color: var(--color-border);
  font-weight: 300;
  flex-shrink: 0;
  display: none;
}

.logo__name {
  color: var(--color-text-muted);
  display: none;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo--footer .logo__img {
  height: 36px;
  max-width: 34px;
}

.logo--footer .logo__name {
  white-space: normal;
}

/* --- ШАПКА --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background-color: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.nav {
  display: none;
}

.nav__list {
  display: flex;
  gap: 1.75rem;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--color-text);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.burger:hover {
  background: var(--color-bg-card);
}

.burger__line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.burger.open .burger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.open .burger__line:nth-child(2) {
  opacity: 0;
}

.burger.open .burger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  padding: 2rem 1.25rem;
  gap: 2rem;
  z-index: 99;
  overflow-y: auto;
}

.nav.open .nav__list {
  flex-direction: column;
  gap: 1.5rem;
}

.nav.open .nav__link {
  font-size: 1.25rem;
}

.nav.open .nav__cta {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 1rem;
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 26, 26, 0.92) 0%,
    rgba(26, 26, 26, 0.75) 50%,
    rgba(42, 42, 42, 0.6) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-block: 4rem;
  max-width: 800px;
}

.hero__title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: #fff;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.hero__trust {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* --- ПРЕИМУЩЕСТВА --- */
.advantages {
  padding-block: 3rem;
  background: var(--color-bg-alt);
  border-block: 1px solid var(--color-border);
}

.advantages__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.advantage-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}

.advantage-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.advantage-card__icon {
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.advantage-card__text {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.6;
}

/* --- О КОМПАНИИ --- */
.about__text {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  max-width: 800px;
}

/* --- ПРОДУКЦИЯ --- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.product-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.product-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-3px);
}

.product-card__img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card__img {
  transform: scale(1.04);
}

.product-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.product-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}

.product-card__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- БЛОК-ДОЖИМ --- */
.cta-bar {
  background: var(--color-accent);
  padding-block: 2.5rem;
}

.cta-bar__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.cta-bar__text {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.6;
  max-width: 800px;
}

.cta-bar__btn {
  background: #fff;
  color: var(--color-accent);
  border-color: #fff;
  flex-shrink: 0;
}

.cta-bar__btn:hover {
  background: #f5f5f5;
  border-color: #f5f5f5;
  color: var(--color-accent-hover);
}

/* --- ФОРМА --- */
.form-section__header {
  margin-bottom: 2rem;
}

.form-section__desc {
  margin-top: 0.75rem;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 600px;
}

.form {
  max-width: 640px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.form__group {
  margin-bottom: 1.25rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.form__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.form__required {
  color: var(--color-accent);
}

.form__input,
.form__textarea {
  width: 100%;
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-dim);
}

.form__input.error {
  border-color: #ef4444;
}

.form__textarea {
  resize: vertical;
  min-height: 100px;
}

.form__error {
  display: block;
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 0.3rem;
  min-height: 1.2em;
}

.form__file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.form__file-wrap {
  position: relative;
}

.form__file-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--color-bg-input);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: border-color var(--transition), color var(--transition);
}

.form__file-label:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.form__submit {
  width: 100%;
}

.form__privacy {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.form__success {
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius);
  color: #4ade80;
  font-size: 0.9rem;
}

/* Показываем только после успешной отправки (hidden снимается в JS) */
.form__success:not([hidden]) {
  display: flex;
}

.form__success svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- КОНТАКТЫ --- */
.contacts__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contacts__lead {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.contacts__link {
  color: var(--color-accent);
  transition: opacity var(--transition);
}

.contacts__link:hover {
  opacity: 0.8;
}

.contacts__address {
  color: var(--color-text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

.contacts__map {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.contacts__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  filter: grayscale(30%) brightness(0.85);
}

/* --- СТАТЬИ: анонсы на главной --- */
.articles {
  padding-block: 3rem;
  border-top: 1px solid var(--color-border);
}

.section-title--articles {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  color: var(--color-text-muted);
}

.articles__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.articles-preview-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-alt);
  transition: border-color var(--transition), transform var(--transition);
}

.articles-preview-card:hover {
  border-color: rgba(249, 115, 22, 0.35);
  transform: translateY(-2px);
}

.articles-preview-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.articles-preview-card__excerpt {
  flex-grow: 1;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.articles-preview-card__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: opacity var(--transition);
}

.articles-preview-card__link:hover {
  opacity: 0.85;
}

/* --- СТРАНИЦА СТАТЬИ --- */
.article-page {
  padding-block: 1.5rem 4rem;
}

.breadcrumbs {
  margin-bottom: 1.5rem;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.breadcrumbs__item:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--color-border);
}

.breadcrumbs__item a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.breadcrumbs__item a:hover {
  color: var(--color-accent);
}

.breadcrumbs__item--current {
  color: var(--color-text);
}

.article-page__content {
  max-width: 48rem;
  margin-bottom: 2.5rem;
}

.article-page__title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1.25rem;
}

.article-page__content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.875rem;
  line-height: 1.35;
}

.article-page__content p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.article-page__content p:last-child {
  margin-bottom: 0;
}

.article-cta {
  max-width: 48rem;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-alt);
}

.article-cta__text {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.article-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-articles {
  max-width: 48rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.related-articles__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.related-articles__list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.related-articles__list a {
  font-size: 0.9rem;
  color: var(--color-accent);
  line-height: 1.45;
  transition: opacity var(--transition);
}

.related-articles__list a:hover {
  opacity: 0.85;
}

@media (min-width: 640px) {
  .articles__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-cta__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (min-width: 1024px) {
  .articles__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- ФУТЕР --- */
.footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding-block: 2.5rem;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
}

.footer__nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer__nav-list a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.footer__nav-list a:hover {
  color: var(--color-accent);
}

.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__contacts a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.footer__contacts a:hover {
  color: var(--color-accent);
}

/* --- ПЛАВАЮЩИЕ КНОПКИ --- */
.fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.25rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fab__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab__btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
}

.fab__btn--max {
  background: linear-gradient(135deg, #6c5ce7 0%, #4a3fd6 100%);
  color: #fff;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (min-width: 640px) {
  .advantages__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form__row {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .form__row .form__group {
    margin-bottom: 0;
  }

  .form {
    padding: 2rem;
  }

  .cta-bar__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  .logo__sep {
    display: inline;
  }

  .logo__name {
    display: inline;
    max-width: 10rem;
  }

  .section {
    padding-block: 5rem;
  }

  .burger {
    display: none;
  }

  .nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .nav.open {
    position: static;
    flex-direction: row;
    background: none;
    padding: 0;
    overflow: visible;
  }

  .nav.open .nav__list {
    flex-direction: row;
    gap: 1.75rem;
  }

  .nav.open .nav__link {
    font-size: 0.9rem;
  }

  .nav.open .nav__cta {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contacts__grid {
    grid-template-columns: 1fr 1.6fr;
    align-items: stretch;
  }

  .contacts__map {
    min-height: 360px;
    aspect-ratio: 4 / 3;
  }

  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

@media (min-width: 1024px) {
  .logo__name {
    max-width: 18rem;
  }

  .advantages__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .logo__name {
    max-width: none;
    white-space: normal;
  }

  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
