/* ============================================================
   Тендеры и госзакупки — изолированные стили
   Префикс: tnd- (всё под .tnd-root)
   Токены, ресет и шрифт заданы на .tnd-root (НЕ глобально),
   поэтому страница безопасно встраивается рядом с прод-шапкой/
   футером, у которых другие шрифты.
   Блоки ограниченной ширины дают контент 1297px
   (.tnd-container max-width 1327px − 2×15px padding).
   ============================================================ */

/* UA-дефолт body (8px) — гасим только маржин body; в прод это уже задано
   боевым CSS, при встраивании безопасно. Остальной reset — внутри .tnd-root. */
body { margin: 0; }

.tnd-root {
  --tnd-accent: #FE5D26;
  --tnd-accent-hover: #D95427;
  --tnd-black: #312D2B;
  --tnd-text: #272F3D;
  --tnd-bg: #F6F6F6;
  --tnd-white: #FFFFFF;
  --tnd-radius-lg: 24px;

  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--tnd-text);
  background-color: var(--tnd-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tnd-root *,
.tnd-root *::before,
.tnd-root *::after {
  box-sizing: border-box;
}

/* Зануляем UA-отступы только у текстовых тегов через :where() (нулевая
   специфичность): классы-заголовки перебивают по порядку, а <main> с глобальным
   margin-top под фикс-шапку не затрагивается. */
.tnd-root :where(h1, h2, h3, p) { margin: 0; }

.tnd-root a {
  text-decoration: none;
  color: inherit;
}

.tnd-root img {
  max-width: 100%;
  height: auto;
  display: block;
}

.tnd-root button {
  font-family: inherit;
}

.tnd-container {
  max-width: 1327px; /* как .container шапки → контент 1297px (1327 − 2×15) */
  margin: 0 auto;
  padding: 0 15px;
}

/* Обёртка крошек: верхний «воздух» под фикс-шапку (<main> margin-top:91px) */
.tnd-breadcrumbs-wrap { padding-top: 24px; }

/* Якорные секции (#categories, #cta из hero-кнопок) — отступ при скролле,
   чтобы фикс-шапка не перекрывала верх секции. */
.tnd-categories,
.tnd-cta { scroll-margin-top: 100px; }

/* Прод style.css на мобиле вешает глобальный section{margin-bottom:60px} —
   у нас секции отбиваются паддингами, гасим лишний отступ в скоупе. */
.tnd-root section { margin-bottom: 0; }

/* ===== Hero ===== */
.tnd-hero {
  padding: 48px 0 0;
}

.tnd-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.tnd-hero-content {
  padding: 32px 0;
}

.tnd-hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(254, 93, 38, 0.08);
  color: #FE5D26;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.tnd-hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--tnd-black);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.tnd-hero-accent {
  color: #FE5D26;
}

.tnd-hero-desc {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(49, 45, 43, 0.6);
  margin-bottom: 32px;
  max-width: 480px;
}

.tnd-hero-ctas {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}

/* .tnd-root перед классом — перебить сброс `.tnd-root a { color: inherit }` */
.tnd-root .tnd-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  background: #FE5D26;
  color: #FFF;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.25s;
}

.tnd-btn-primary:hover {
  background: #D95427;
}

.tnd-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  background: rgba(49, 45, 43, 0.06);
  color: var(--tnd-black);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.25s;
}

.tnd-btn-secondary:hover {
  background: rgba(49, 45, 43, 0.1);
}

.tnd-hero-trust {
  display: flex;
  gap: 24px;
  opacity: 0.5;
}

.tnd-hero-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(49, 45, 43, 0.6);
}

/* Hero visual */
.tnd-hero-visual {
  position: relative;
}

.tnd-hero-image-wrap {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(49, 45, 43, 0.12);
  transform: rotate(2deg);
  transition: transform 0.5s;
  border: 8px solid #FFF;
}

.tnd-hero-image-wrap:hover {
  transform: rotate(0deg);
}

.tnd-hero-image-wrap img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

.tnd-hero-float {
  position: absolute;
  bottom: -32px;
  left: -32px;
  background: #FFF;
  padding: 28px 32px;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(49, 45, 43, 0.14);
  max-width: 300px;
  z-index: 2;
}

.tnd-hero-float-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tnd-hero-float-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #FE5D26;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tnd-hero-float-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--tnd-accent);
}

.tnd-hero-float-value {
  font-size: 42px;
  font-weight: 800;
  color: var(--tnd-black);
  line-height: 1;
  margin-bottom: 8px;
}

.tnd-hero-float-desc {
  font-size: 14px;
  color: rgba(49, 45, 43, 0.55);
  line-height: 1.45;
}

/* ===== Platforms ===== */
.tnd-platforms {
  margin-top: 42px;
  padding: 32px 0;
  border-top: 1px solid rgba(49, 45, 43, 0.06);
  border-bottom: 1px solid rgba(49, 45, 43, 0.06);
}

.tnd-platforms-label {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(49, 45, 43, 0.4);
  margin-bottom: 24px;
}

.tnd-platforms-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px 48px;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.tnd-platforms-list:hover {
  opacity: 0.8;
}

.tnd-platform-item {
  font-size: 18px;
  font-weight: 800;
  color: rgba(49, 45, 43, 0.7);
  letter-spacing: 0.02em;
}

/* ===== Stats ===== */
.tnd-stats {
  padding: 80px 0;
  background: #FFF;
}

.tnd-stats-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--tnd-black);
  text-align: center;
  margin-bottom: 48px;
}

.tnd-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.tnd-stat-item {
  text-align: center;
}

.tnd-stat-value {
  font-size: 48px;
  font-weight: 800;
  color: #FE5D26;
  line-height: 1;
  margin-bottom: 8px;
}

.tnd-stat-desc {
  font-size: 14px;
  color: rgba(49, 45, 43, 0.5);
  line-height: 1.5;
}

/* ===== Categories ===== */
.tnd-categories {
  padding: 80px 0;
}

.tnd-categories-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 40px;
}

.tnd-categories-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--tnd-black);
  margin-bottom: 8px;
}

.tnd-categories-desc {
  font-size: 16px;
  color: rgba(49, 45, 43, 0.5);
  line-height: 1.5;
}

/* .tnd-root перед классом — перебить сброс `.tnd-root a { color: inherit }` */
.tnd-root .tnd-categories-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #FE5D26;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: gap 0.25s;
}

.tnd-categories-link:hover {
  gap: 12px;
}

.tnd-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tnd-category-card {
  background: #FFF;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 1px 4px rgba(49, 45, 43, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

.tnd-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(49, 45, 43, 0.1);
}

.tnd-category-card-large {
  grid-column: span 2;
  background: #FFF;
}

.tnd-category-icon {
  width: 40px;
  height: 40px;
  color: #FE5D26;
  margin-bottom: 16px;
}

.tnd-category-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tnd-category-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--tnd-black);
  margin-bottom: 8px;
}

.tnd-category-desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(49, 45, 43, 0.5);
  margin-bottom: 16px;
}

.tnd-category-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
}

.tnd-category-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--tnd-black);
}

/* .tnd-root перед классом — перебить сброс `.tnd-root a { color: inherit }` */
.tnd-root .tnd-category-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #FE5D26;
  font-size: 14px;
  font-weight: 600;
  transition: gap 0.2s;
}

.tnd-category-link:hover {
  gap: 8px;
}

/* Categories carousel viewport — на десктопе обычная сетка (overflow видим),
   на мобиле горизонтальный скролл со снапом (см. @media 768). */
.tnd-cat-viewport {
  overflow: visible;
}

.tnd-cat-viewport--drag {
  cursor: grabbing;
  user-select: none;
}

.tnd-cat-dots {
  display: none;
  width: fit-content;
  gap: 8px;
  align-items: center;
  margin: 24px auto 0;
}

.tnd-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(49, 45, 43, 0.3);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}

.tnd-cat-dot:hover {
  background: rgba(49, 45, 43, 0.5);
}

.tnd-cat-dot-active {
  background: rgba(49, 45, 43, 0.6);
}

/* ===== CTA ===== */
.tnd-cta {
  padding: 0 0 80px;
}

.tnd-cta-inner {
  background: linear-gradient(135deg, var(--tnd-accent) 30%, #7B2FF2 120%);
  border-radius: var(--tnd-radius-lg);
  padding: 64px;
  position: relative;
  overflow: hidden;
}

.tnd-cta-gradient {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.tnd-cta-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.tnd-cta-title {
  font-size: 32px;
  font-weight: 700;
  color: #FFF;
  line-height: 1.2;
  margin-bottom: 16px;
}

.tnd-cta-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: 24px;
}

.tnd-cta-form {
  display: flex;
  gap: 12px;
  max-width: 400px;
}

.tnd-cta-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #FFF;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: background 0.25s;
}

.tnd-cta-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.tnd-cta-input:focus {
  background: rgba(255, 255, 255, 0.25);
}

.tnd-cta-btn {
  padding: 14px 24px;
  border-radius: 12px;
  background: #FFF;
  color: var(--tnd-accent);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.25s;
}

.tnd-cta-btn:hover {
  opacity: 0.9;
}

.tnd-cta-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tnd-cta-success {
  font-size: 16px;
  font-weight: 600;
  color: #FFF;
  min-height: 47px;
  display: flex;
  align-items: center;
}

/* display:flex выше перебивает атрибут [hidden] — возвращаем скрытие,
   иначе «Заявка отправлена!» висит до сабмита. */
.tnd-cta-success[hidden] { display: none; }

.tnd-cta-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.tnd-cta-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 24px;
  min-height: 183px;
}

.tnd-cta-card-offset {
  margin-top: 32px;
}

.tnd-cta-card-icon {
  color: #FFF;
  margin-bottom: 12px;
}

.tnd-cta-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFF;
  margin-bottom: 4px;
}

.tnd-cta-card-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .tnd-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .tnd-hero-visual {
    order: -1;
    margin-bottom: 8px;
  }

  .tnd-hero-image-wrap {
    transform: none;
  }

  .tnd-hero-image-wrap img {
    height: 320px;
  }

  .tnd-hero-float {
    bottom: -114px;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px 24px;
    max-width: 300px;
    width: 90%;
  }

  .tnd-hero-float-icon {
    width: 40px;
    height: 40px;
  }

  .tnd-hero-float-value {
    font-size: 32px;
  }

  .tnd-hero-float-desc {
    font-size: 13px;
  }

  .tnd-hero-float-head {
    margin-bottom: 12px;
  }

  .tnd-hero-content {
    padding-top: 88px;
  }

  .tnd-hero-title {
    font-size: 36px;
  }

  .tnd-platforms {
    margin-top: 16px;
  }

  .tnd-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .tnd-categories-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tnd-category-card-large {
    grid-column: span 2;
  }

  .tnd-cta-grid {
    grid-template-columns: 1fr;
  }

  .tnd-cta-cards {
    display: none;
  }

  .tnd-cta-inner {
    padding: 48px 32px;
  }
}

@media (max-width: 768px) {
  .tnd-hero {
    padding: 32px 0 0;
  }

  .tnd-hero-title {
    font-size: 28px;
  }

  .tnd-hero-desc {
    font-size: 16px;
  }

  .tnd-hero-ctas {
    flex-direction: column;
  }

  .tnd-btn-primary,
  .tnd-btn-secondary {
    justify-content: center;
  }

  .tnd-hero-trust {
    flex-direction: column;
    gap: 12px;
  }

  .tnd-platforms-list {
    gap: 16px 24px;
  }

  .tnd-platform-item {
    font-size: 14px;
  }

  .tnd-stats {
    padding: 48px 0;
  }

  .tnd-stats-title {
    font-size: 22px;
    margin-bottom: 32px;
  }

  .tnd-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .tnd-stat-item {
    background: rgba(49, 45, 43, 0.03);
    border-radius: 16px;
    padding: 20px 16px;
  }

  .tnd-stat-value {
    font-size: 32px;
    margin-bottom: 6px;
  }

  .tnd-categories {
    padding: 48px 0;
  }

  .tnd-categories-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tnd-categories-title {
    font-size: 24px;
  }

  /* Карусель: горизонтальный скролл со снапом вместо сетки */
  .tnd-cat-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tnd-cat-viewport::-webkit-scrollbar {
    display: none;
  }

  .tnd-categories-grid {
    display: flex;
  }

  .tnd-category-card,
  .tnd-category-card-large {
    flex: 0 0 100%;
    min-width: 0;
    padding: 24px;
    margin-right: 12px;
    scroll-snap-align: start;
  }

  .tnd-category-card-large {
    grid-column: unset;
  }

  .tnd-cat-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 10px;
    margin-top: 20px;
  }

  .tnd-cta-gradient {
    display: none;
  }

  .tnd-cta {
    padding: 0 0 48px;
  }

  .tnd-cta-inner {
    padding: 32px 20px;
    border-radius: 20px;
  }

  .tnd-cta-title {
    font-size: 24px;
  }

  .tnd-cta-form {
    flex-direction: column;
  }
}
