/* ============================================================================
   Стартовая страница IFC Viewer (viewer.ingproff.ru)
   Дизайн-токены и компоненты — те же, что на лендинге ingproff.ru:
   Bounded (заголовки) + Hint (текст), синий #003cff, радиус 22px, ширина 1180.
   ========================================================================== */

@font-face {
  font-family: Bounded;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/bounded.woff2) format("woff2");
}
@font-face {
  font-family: Hint;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/hint-regular.woff2) format("woff2");
}
@font-face {
  font-family: Hint;
  font-weight: 500 600;
  font-display: swap;
  src: url(fonts/hint-semibold.woff2) format("woff2");
}
@font-face {
  font-family: Hint;
  font-weight: 700 800;
  font-display: swap;
  src: url(fonts/hint-bold.woff2) format("woff2");
}

:root {
  --primary: #003cff;
  --primary-d: #0031d4;
  --ink: #172033;
  --muted: #5b6475;
  --border: #d8deea;
  --chip: #f0f4f8;
  --card: #f3f5f8;
  --dark: #1c1c1e;
  --deep: #0a1a44;
  --mint: #73ffc9;
  --radius: 22px;
  --wrap: 1180px;
  --display: Bounded, Hint, system-ui, sans-serif;
  --text: Hint, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--text);
  color: var(--ink);
  background: #fff;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--primary);
}
button {
  font-family: inherit;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  z-index: 100;
}
.skip:focus {
  left: 12px;
  top: 12px;
}

/* ─── Заголовки и текст ─── */
h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(27px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  margin-bottom: 8px;
}
.lead {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--muted);
  max-width: 620px;
}
.section-sub {
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 28px;
}
.mut {
  color: var(--muted);
  font-size: 14px;
}

section {
  padding: 72px 0 0;
}
.section-head {
  margin-bottom: 8px;
}

/* ─── Шапка ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(216, 222, 234, 0.7);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 60px;
}
.logo {
  font: 800 18px/1 var(--display);
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  padding: 12px 0;
  white-space: nowrap;
}
.logo span {
  color: var(--primary);
}
.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  white-space: nowrap;
}
.nav a:hover {
  color: var(--ink);
}

/* ─── Кнопки ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font: 600 16px/1 var(--text);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
  text-align: center;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(0, 60, 255, 0.6);
}
.btn-primary:hover {
  background: var(--primary-d);
}
.btn-outline {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 15px;
}
/* заглушка «Сервис в разработке»: заметно неактивна, но не выглядит сломанной */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.62;
  cursor: default;
  transform: none !important;
  box-shadow: none;
}
.promo--dark .btn:disabled {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.75);
}
.btn-lg {
  min-height: 60px;
  padding: 0 34px;
  font-size: 17px;
}

/* ─── Первый экран ─── */
.hero {
  padding: 40px 0 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font-size: 14px;
}
.chip svg {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
}

/* зона перетаскивания */
.drop {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 22px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: #fafbff;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.drop:hover,
.drop.is-over {
  border-color: var(--primary);
  background: #f2f5ff;
}
.drop-ico {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  background: rgba(0, 60, 255, 0.08);
  display: grid;
  place-items: center;
}
.drop-ico svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
}
.drop-tx b {
  display: block;
  font-size: 17px;
  margin-bottom: 2px;
}
.drop-tx span {
  font-size: 14px;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

/* визуал первого экрана */
.hero-media {
  position: relative;
}
.shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d1117;
  box-shadow: 0 30px 70px -30px rgba(16, 24, 40, 0.45);
}
.shot img {
  width: 100%;
  height: auto;
  display: block;
}
.shot picture {
  display: block;
}
.shot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #111722;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.shot-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #39404d;
  display: block;
}
.shot-bar span {
  margin-left: 8px;
  font-size: 12px;
  color: #9aa6b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shot-cap {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}
/* на узких экранах показываем мобильный кадр и его подпись */
.shot-cap--mob {
  display: none;
}

/* ─── Сетки ─── */
.grid {
  display: grid;
  gap: 16px;
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.card h3 {
  margin-bottom: 6px;
}
.card p {
  color: var(--muted);
  font-size: 15px;
}
.card-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--chip);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.card-ico svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
}

/* шаги: номер и текст в одну строку через flex — без absolute,
   чтобы номер гарантированно не наезжал на заголовок */
.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step-n {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font: 700 17px/40px var(--display);
  text-align: center;
}
.step > div {
  min-width: 0;
}

/* примеры моделей */
.ex {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.ex:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px -28px rgba(16, 24, 40, 0.4);
}
.ex img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #0d1117;
}
.ex-b {
  display: block;
  padding: 16px 18px;
}
.ex-b b {
  display: block;
  font-family: var(--display);
  font-size: 16px;
  margin-bottom: 4px;
}
.ex-b span {
  font-size: 14px;
  color: var(--muted);
}

/* ─── Таблица сравнения ─── */
.tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
table.cmp {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 15px;
}
table.cmp th,
table.cmp td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.cmp thead th {
  background: var(--chip);
  font-family: var(--display);
  font-size: 14px;
}
table.cmp thead th:first-child {
  border-top-left-radius: 20px;
}
table.cmp thead th:last-child {
  border-top-right-radius: 20px;
}
table.cmp tbody tr:last-child td {
  border-bottom: 0;
}
table.cmp .own {
  background: #f5f8ff;
  color: var(--ink);
  font-weight: 600;
}
table.cmp td.yes {
  color: #0a8f4a;
  font-weight: 600;
}
table.cmp td.no {
  color: var(--muted);
}

/* список ограничений */
.limits {
  list-style: none;
  display: grid;
  gap: 10px;
}
.limits li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 15px;
}
.limits li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ─── Блоки воронки ─── */
.cta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.promo {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.promo b {
  font-family: var(--display);
  font-size: 17px;
}
.promo p {
  color: var(--muted);
  font-size: 15px;
  flex: 1;
}
.promo--dark {
  background: linear-gradient(140deg, #0a1a44 0%, #16306e 100%);
  border-color: transparent;
  color: #fff;
}
.promo--dark p {
  color: #c9d6f5;
}
.promo--dark .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ─── FAQ ─── */
.faq {
  display: grid;
  gap: 10px;
  max-width: 900px;
}
.faq details {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  background: #fff;
}
.faq details[open] {
  border-color: #b9c6e6;
  background: #fafbff;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-family: var(--display);
  color: var(--primary);
  font-size: 20px;
  line-height: 1;
  flex: none;
}
.faq details[open] summary::after {
  content: "–";
}
.faq p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

/* ─── Финальный призыв ─── */
.final {
  margin-top: 72px;
  padding: 40px 0 48px;
  background: linear-gradient(140deg, #0a1a44 0%, #16306e 100%);
  border-radius: var(--radius);
  text-align: center;
}
.final h2,
.final-title {
  color: #fff;
  margin: 0 auto 10px;
  max-width: 720px;
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  line-height: 1.2;
}
.final p {
  color: #c9d6f5;
  margin: 0 auto 22px;
  max-width: 620px;
}
.final .btn-light {
  background: #fff;
  color: var(--ink);
}

/* ─── Подвал ─── */
footer {
  margin-top: 56px;
}
.legal-bar {
  width: 100%;
  padding: 24px clamp(16px, 4vw, 48px) 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: baseline;
}
.legal-req {
  font-weight: 600;
  font-size: 14px;
}
.legal {
  font-size: 13px;
  color: var(--muted);
}
.legal-bar a {
  color: var(--muted);
  text-decoration: underline;
}

/* ─── Карточки статей (используются на лендинге и в хабе) ─── */
.posts {
  display: grid;
  gap: 14px;
}
.post-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.post-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.post-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  background: #0d1117;
}
.post-card b {
  font-family: var(--display);
  font-size: 17px;
  display: block;
  margin-bottom: 6px;
}
.post-card p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0 0 8px;
}
.post-card .post-meta {
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 640px) {
  .post-card {
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 12px;
  }
  .post-card b {
    font-size: 15.5px;
  }
}
@media (max-width: 420px) {
  .post-card {
    grid-template-columns: 1fr;
  }
  .post-card img {
    aspect-ratio: 16 / 9;
  }
}

/* ─── Фильтр статей по темам и запросу (хаб) ─── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.filter {
  margin: 26px 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafbff;
}
.filter-q {
  display: block;
  margin-bottom: 12px;
}
.filter-q input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font: 400 15px/1.2 var(--text);
  color: var(--ink);
  background: #fff;
}
.filter-q input::placeholder {
  color: #98a2b3;
}
.filter-q input:focus {
  outline: none;
  border-color: var(--primary);
}
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font: 500 13.5px/32px var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.tag:hover {
  border-color: var(--primary);
  color: var(--ink);
}
.tag.is-on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.filter-status {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.filter-status b {
  color: var(--ink);
}
.post-card[hidden] {
  display: none;
}
/* ещё не вышедшие материалы: без ссылки, чтобы не было пустых переходов */
.post-card--soon {
  opacity: 0.7;
  cursor: default;
}
.post-card--soon:hover {
  border-color: var(--border);
  transform: none;
}
.soon-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  font: 600 11.5px/1.6 var(--text);
  vertical-align: middle;
}

/* ─── Баннер cookie ─── */
.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 0 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
.cookie-in {
  pointer-events: auto;
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 60px -24px rgba(16, 24, 40, 0.45);
}
.cookie-tx {
  margin: 0;
  max-width: 68ch;
  font: 400 14px/1.55 var(--text);
  color: var(--muted);
}
.cookie-tx a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie .btn {
  min-height: 44px;
  padding: 0 20px;
  font-size: 14px;
}

/* ============================================================================
   Адаптация
   ========================================================================== */

/* планшет */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .hero-media {
    order: 2;
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cta-row {
    grid-template-columns: minmax(0, 1fr);
  }
  section {
    padding: 56px 0 0;
  }
  h1 {
    font-size: clamp(26px, 5vw, 34px);
  }
}

/* мобильные */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .wrap {
    padding: 0 16px;
  }
  .header .wrap {
    gap: 10px;
    min-height: 56px;
  }
  .nav {
    display: none;
  }
  /* навигация спрятана, её auto-отступ исчез — прижимаем кнопку к правому краю */
  .header .btn {
    margin-left: auto;
  }
  .logo {
    font-size: 15px;
  }
  .hero {
    padding: 24px 0 0;
  }
  .grid-3,
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .drop {
    padding: 16px;
    gap: 12px;
  }
  .drop-tx b {
    font-size: 15px;
  }
  .btn {
    min-height: 48px;
    padding: 0 20px;
    font-size: 15px;
  }
  .btn-lg {
    min-height: 54px;
    padding: 0 24px;
    font-size: 16px;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
  }
  section {
    padding: 44px 0 0;
  }
  .final {
    margin-top: 48px;
    padding: 28px 16px 32px;
    border-radius: 18px;
  }
  .card {
    padding: 18px;
  }
  .cookie-in {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }
  .cookie-btns {
    width: 100%;
  }
  .cookie-btns .btn {
    flex: 1 1 0;
    padding: 0 12px;
  }
  .cookie-tx {
    font-size: 13px;
  }
  .legal-bar {
    padding: 20px 16px 28px;
    gap: 8px;
  }
}

/* узкие экраны (320–420) */
@media (max-width: 420px) {
  .logo {
    font-size: 14px;
  }
  .header .btn-sm {
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
  }
  h1 {
    font-size: 24px;
  }
  h2 {
    font-size: 20px;
  }
  .chip {
    font-size: 13px;
    padding: 7px 12px;
  }
  .drop-ico {
    width: 40px;
    height: 40px;
  }
  .step {
    padding-left: 48px;
  }
  .step-n {
    width: 34px;
    height: 34px;
    font-size: 15px;
    line-height: 34px;
  }
}

/* уважаем настройку «меньше движения» */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

/* ─── Hero на телефоне: показываем мобильный кадр ─── */
@media (max-width: 640px) {
  .shot-bar {
    display: none;
  }
  .shot {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .shot img {
    max-width: 320px;
    margin: 0 auto;
    /* пропорции мобильного кадра (телефон 680x1349) — без скачка высоты при загрузке */
    aspect-ratio: 680 / 1349;
    height: auto;
  }
  .shot-cap--desk {
    display: none;
  }
  .shot-cap--mob {
    display: block;
  }
}

/* ─── Галерея скриншотов в секции возможностей ─── */
.shots-title {
  margin: 36px 0 14px;
  font-size: 19px;
}
.shots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.shots-grid figure {
  margin: 0;
}
.shots-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}
.shots-grid figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 860px) {
  .shots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .shots-grid {
    grid-template-columns: 1fr;
  }
}
