:root{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface2:#fbfcff;

  --text:#0f172a;
  --muted:#475569;

  --border:rgba(15, 23, 42, .10);

  --accent:#1d4ed8;
  --accent2:#0ea5e9;
  --ok:#16a34a;

  --radius:18px;
  --radius2:22px;

  --shadow:0 14px 40px rgba(2, 6, 23, .08);
  --shadow2:0 10px 24px rgba(2, 6, 23, .06);

  --max:1140px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
/* ===== Fonts: GOST Type B ===== */
@font-face{
  font-family: "GOST Type B";
  src: url("../fonts/gost-type-b.woff2") format("woff2"), url("../fonts/gost-type-b.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "GOST Type B";
  src: url("../fonts/gost-type-b.woff2") format("woff2"), url("../fonts/gost-type-b.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "GOST Type B";
  src: url("../fonts/gost-type-b.woff2") format("woff2"), url("../fonts/gost-type-b.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

body{
  margin:0;
  font-family: "GOST Type B", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(29,78,216,.12), transparent 55%),
    radial-gradient(800px 450px at 95% 0%, rgba(14,165,233,.10), transparent 55%),
    var(--bg);
  color:var(--text);
  line-height:1.55;
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; height:auto; }

/* Make form controls inherit site typography (Chrome/Safari) */
button, input, textarea, select{
  font: inherit;
}
.container{
  max-width:var(--max);
  margin:0 auto;
  padding:0 18px;
}

.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.skip{
  position:absolute; left:-999px; top:10px;
  background:#fff; color:#000; padding:10px 12px; border-radius:12px;
}
.skip:focus{ left:10px; z-index:9999; }

.muted{ color:var(--muted); }
.note{ color:var(--muted); font-size:13px; margin-top:12px; }

/* HEADER */
.header{
  position:sticky; top:0; z-index:50;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner{
  display:flex; align-items:center; gap:14px;
  padding:12px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand__logoImg{
  height: 44px;   /* ← под шапку, можно 40–48 */
  width: auto;
  display:block;
}
.brand__name{ font-weight:900; letter-spacing:-.2px; }
.brand__tag{ display:block; font-size:12px; color:var(--muted); margin-top:2px; }

.nav{ margin-left:auto; position:relative; }
.nav__menu{ display:flex; gap:10px; align-items:center; }
.nav__link{
  color: var(--muted);
  padding:10px 12px;
  border-radius: 999px;
  font-weight:700;
}
.nav__link:hover{
  color: var(--text);
  background: rgba(15,23,42,.05);
}

.nav__toggle{
  display:none;
  align-items:center; justify-content:center;
  width:44px; height:44px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.85);
  border-radius: 999px;
  box-shadow: var(--shadow2);
  cursor:pointer;
}
.nav__toggleIcon{
  width:18px; height:2px; background:var(--text);
  position:relative; display:block;
}
.nav__toggleIcon::before,.nav__toggleIcon::after{
  content:""; position:absolute; left:0; right:0; height:2px; background:var(--text);
}
.nav__toggleIcon::before{ top:-6px; }
.nav__toggleIcon::after{ top:6px; }

.header__cta{ display:flex; gap:12px; align-items:center; }
.phone{ font-weight:900; color:var(--text); }
.phone:hover{ text-decoration:underline; }

/* BUTTONS */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.80);
  color: var(--text);
  font-weight:900;
  cursor:pointer;
  box-shadow: var(--shadow2);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--primary{
  background: linear-gradient(135deg, rgba(29,78,216,1), rgba(14,165,233,1));
  border-color: transparent;
  color:#fff;
}
.btn--ghost{ background: rgba(255,255,255,.55); }
.btn--full{ width:100%; }

/* HERO */
.hero{ padding:42px 0 16px; }
.hero__grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:24px;
  align-items:start;
}
.pill{
  display:inline-flex;
  padding:8px 12px;
  border-radius: 999px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.70);
  color: var(--muted);
  font-weight:800;
  font-size:13px;
  box-shadow: var(--shadow2);
}
.hero__content h1{
  margin:12px 0 10px;
  font-size: clamp(30px, 3.3vw, 50px);
  line-height:1.06;
  letter-spacing:-.6px;
}
.lead{
  color: var(--muted);
  font-size: 18px;
  max-width: 58ch;
  margin:0 0 14px;
}
.hero__bullets{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
  margin: 12px 0 16px;
}
.bullet{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 14px;
  border-radius: 18px;
  border:1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.75);
  box-shadow: var(--shadow2);
  font-weight:800;
}
.bullet::before{
  content:"✓";
  color: var(--ok);
  font-weight:1000;
  margin-top:1px;
}

.hero__actions{ display:flex; gap:10px; flex-wrap:wrap; margin: 10px 0 18px; }

/* STATS */
.stats{
  display:flex; gap:12px; flex-wrap:wrap;
  margin-top: 6px;
}
.stat{
  min-width: 150px;
  padding:12px 14px;
  border-radius: 18px;
  border:1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow2);
}
.stat__num{ font-weight:1000; font-size:22px; letter-spacing:-.2px; }
.stat__txt{ color:var(--muted); font-size:13px; font-weight:800; }

/* SECTIONS */
.section{ padding:46px 0; }
.section--alt{
  background: rgba(255,255,255,.55);
  border-top:1px solid rgba(15,23,42,.08);
  border-bottom:1px solid rgba(15,23,42,.08);
}
.section__head{ margin-bottom:18px; }
.section__head h2{ margin:0 0 6px; font-size:28px; letter-spacing:-.3px; }

/* GRID */
.grid{ display:grid; gap:14px; }
.cards{ grid-template-columns: repeat(4, 1fr); }
.cases{ grid-template-columns: repeat(3, 1fr); }

/* CARD */
.card{
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: var(--radius2);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card:hover{ box-shadow: 0 18px 55px rgba(2,6,23,.10); }

.card--form{
  position:sticky;
  top:84px;
}
.card__head{ margin-bottom:10px; }
.h3{ margin:0 0 6px; font-size:22px; letter-spacing:-.2px; }

/* SERVICES */
.service__icon{
  width:42px; height:42px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: rgba(29,78,216,.10);
  border:1px solid rgba(29,78,216,.15);
  margin-bottom:10px;
}

/* LINKS */
.link{ color: var(--accent); font-weight:900; }
.link:hover{ text-decoration:underline; }

/* FORM */
.form{ display:grid; gap:12px; margin-top:10px; }
.field span{ display:block; font-size:12px; color:var(--muted); margin:0 0 6px; font-weight:800; }
.field input, .field textarea{
  width:100%;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  color: var(--text);
  outline:none;
}
.field input:focus, .field textarea:focus{
  border-color: rgba(29,78,216,.45);
  box-shadow: 0 0 0 4px rgba(29,78,216,.10);
}
.fineprint{ font-size:12px; color:var(--muted); margin:0; }
.form__status{ font-size:13px; color:var(--muted); min-height: 18px; font-weight:800; }

.hp{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

.divider{
  height:1px;
  background: rgba(15,23,42,.08);
  margin: 14px 0;
}

.miniTrust{ display:flex; gap:10px; flex-wrap:wrap; }
.miniTrust__item{
  padding:8px 10px;
  border-radius: 999px;
  border:1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.70);
  color: var(--muted);
  font-weight:900;
  font-size:12px;
}

/* CASES */
.case__img{
  border:1px dashed rgba(15,23,42,.18);
  border-radius: 18px;
  height:160px;
  display:grid;
  place-items:center;
  color: rgba(15,23,42,.35);
  background: rgba(255,255,255,.80);
  margin-bottom:10px;
}
.meta{
  margin:0 0 10px;
  padding-left: 18px;
  color: var(--muted);
  font-weight:700;
}
.meta strong{ color: var(--text); }

/* STEPS */
.steps{ list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.step{
  display:grid;
  grid-template-columns: 56px 1fr;
  gap:12px;
  padding:14px;
  border:1px solid rgba(15,23,42,.08);
  border-radius: 20px;
  background: rgba(255,255,255,.70);
  box-shadow: var(--shadow2);
}
.step__num{
  width:56px; height:56px; border-radius: 18px;
  display:grid; place-items:center;
  font-weight:1000;
  background: rgba(29,78,216,.10);
  border:1px solid rgba(29,78,216,.18);
}
.step__body h3{ margin:0 0 4px; letter-spacing:-.2px; }
.step__body p{ margin:0; color:var(--muted); font-weight:700; }

/* ABOUT */
.about{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:14px;
  align-items:start;
}
.badges{ display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.badge{
  padding:10px 12px;
  border-radius: 999px;
  border:1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.70);
  color: var(--muted);
  font-weight:900;
  font-size:13px;
}
.faq h3{ margin-top:0; }

details{
  border:1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  padding:10px 12px;
  background: rgba(255,255,255,.70);
}
details + details{ margin-top:10px; }
summary{ cursor:pointer; font-weight:1000; }
details p{ margin:10px 0 0; color:var(--muted); font-weight:700; }

/* CONTACTS */
.contacts{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}
.contactList{ display:grid; gap:10px; margin-top:14px; }
.contactItem{
  display:grid; gap:4px;
  padding:12px;
  border:1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.70);
  box-shadow: var(--shadow2);
}
.contactLabel{ font-size:12px; color:var(--muted); font-weight:900; }
.contactValue{ font-weight:1000; }
.miniCta{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }

/* FOOTER */
.footer{
  padding:22px 0;
  border-top:1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.72);
}
.footer__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.footer__brand{ font-weight:1000; letter-spacing:-.2px; }

/* RESPONSIVE */
@media (max-width: 980px){
  .hero__grid{ grid-template-columns: 1fr; }
  .card--form{ position:static; }

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

  .header__cta{ display:none; }

  .nav__toggle{ display:inline-flex; }
  .nav__menu{
    position:absolute;
    top:64px;
    right:0;
    left:auto;
    min-width: 220px;
    display:none;
    flex-direction:column;
    padding:10px;
    background: rgba(255,255,255,.95);
    border:1px solid rgba(15,23,42,.10);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }
  .nav__menu.is-open{ display:flex; }
}
/* ===== Floating ToTop button ===== */
.toTop{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;

  display: inline-grid;
  place-items: center;

  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f4f6fb 100%
  );
  color: #1d4ed8; /* фирменный синий */

  border: 1px solid rgba(29,78,216,.18);

  box-shadow:
    0 10px 30px rgba(29,78,216,.18),
    0 4px 12px rgba(0,0,0,.06);

  backdrop-filter: blur(8px);

  cursor: pointer;
  z-index: 999;

  opacity: 0;
  transform: translateY(14px) scale(.96);
  pointer-events: none;

  transition:
    opacity .2s ease,
    transform .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

.toTop span{
  font-weight: 1000;
  font-size: 18px;
  line-height: 1;
}

.toTop.is-visible{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.toTop:hover{
  box-shadow:
    0 14px 40px rgba(29,78,216,.28),
    0 6px 16px rgba(0,0,0,.08);
  transform: translateY(-2px) scale(1.05);
}

.toTop:active{
  transform: translateY(0) scale(.97);
}

.toTop:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 4px rgba(29,78,216,.25),
    0 10px 30px rgba(29,78,216,.18);
}
/* ===== ToTop: mobile fix (iPhone Safari safe-area) ===== */
@media (max-width: 480px){
  .toTop{
    right: 14px;
    /* над нижней панелью iPhone */
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;

    box-shadow: 0 8px 18px rgba(2,6,23,.10);
    border: 1px solid rgba(29,78,216,.16);
  }

  .toTop span{
    font-size: 16px;
  }
}
/* ===== Map ===== */
.card.map{
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background: transparent;
}

.card.map > iframe{
  display: block;
  width: 100%;
  border: 0;
  margin: 0;
  height: clamp(360px, 34vw, 520px);
  border-radius: inherit;
}

@media (max-width: 768px){
  .card.map{ border-radius: 18px; }
  .card.map > iframe{ height: 260px; }
}

@media (max-width: 480px){
  .card.map > iframe{ height: 210px; }
}
/* ===== Case gallery ===== */
.case-gallery{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-gallery__main{
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 14px;
}

.case-gallery__thumbs{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.case-gallery__thumbs img{
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity .2s, transform .2s;
}

.case-gallery__thumbs img:hover{
  opacity: 1;
  transform: scale(1.03);
}
/* ===== Fix: .case__img was a 160px grid placeholder; override for gallery ===== */
.case__img.case-gallery{
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;

  height: auto !important;           /* убираем 160px */
  place-items: initial !important;   /* сбрасываем центрирование grid */
  padding: 0 !important;
  overflow: visible !important;

  border: 0 !important;
  background: transparent !important;
  margin-bottom: 10px;               /* оставим отступ как раньше */
}

.case__img.case-gallery .case-gallery__main{
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.case__img.case-gallery .case-gallery__thumbs{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.case__img.case-gallery .case-gallery__thumbs img{
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  display: block;
  opacity: .8;
}

.case__img.case-gallery .case-gallery__thumbs img:hover{
  opacity: 1;
}
/* Justify по всему сайту (десктоп/планшет) */
body {
  text-align: justify;
  text-justify: inter-word;
}
/* На мобильных отключаем, чтобы не было больших пробелов */
@media (max-width: 640px) {
  body {
    text-align: left;
  }
}
.form input[type="file"]{
  width: 100%;
}
.form small.muted{
  display:block;
  margin-top:6px;
}
.file {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.file input[type="file"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Кнопка выбора файлов — В ТОЙ ЖЕ СИСТЕМЕ */
.file__btn {
  padding: 12px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;

  background: #eef2ff;
  color: #1d4ed8;

  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
/* hover как у основной кнопки */
.file:hover .file__btn {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.35);
}
/* active */
.file:active .file__btn {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* подпись */
.file__text {
  font-size: 14px;
  color: #6b7280;
  white-space: nowrap;
}
/* Убрать свечение, но оставить движение/анимацию */
.file__btn{
  box-shadow: none !important;
}

.file:hover .file__btn{
  transform: translateY(-1px); /* движение оставляем */
  box-shadow: none !important; /* свечения нет */
}

.file:active .file__btn{
  transform: translateY(0);
  box-shadow: none !important;
}
/* Убрать focus-подсветку именно у поля выбора файлов */
.field input[type="file"]:focus,
.field input[type="file"]:focus-visible{
  box-shadow: none !important;
  border-color: rgba(15,23,42,.12) !important;
}
.filelist__remove{
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 0 6px;
  opacity: .65;
}
.filelist__remove:hover{ opacity: 1; }
}
/* Общий размер строки */
.filelist__item {
  font-size: 14px;
}

/* Название файла — меньше */
.filelist__item .filelist__name {
  font-size: 13px !important;
  line-height: 1.3;
}

/* Размер + крестик — ещё меньше */
.filelist__item .filelist__meta {
  font-size: 11px !important;
  opacity: 0.65;
}

.filelist__item .filelist__remove {
  font-size: 11px;
}
/* Обрезка длинных имён файлов */
.filelist__name {
  max-width: 280px;           /* можно менять под ширину формы */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}
@media (max-width: 480px) {
  .filelist__name {
    max-width: 180px;
  }
}
/* Строка файла — flex, чтобы всё было по центру */
.filelist__item {
  display: flex;
  align-items: center;        /* ВАЖНО: вертикальное выравнивание */
  justify-content: space-between;
  gap: 10px;
}

/* Имя файла */
.filelist__name {
  display: block;
  line-height: 1.3;
}

/* Размер + крестик */
.filelist__meta {
  display: inline-flex;       /* чтобы размер и ✕ были в одной линии */
  align-items: center;        /* центр по вертикали */
  gap: 6px;
  line-height: 1;
}