/* ============================================================
   ISYSTEMS AUTOMATION — единственная таблица стилей
   ============================================================ */

/* --- Шрифт. Только два начертания, latin + latin-ext (нужны ș ț ă î â) --- */
@font-face{
  font-family:"IBM Plex Sans";
  src:url("../fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"IBM Plex Sans";
  src:url("../fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight:600; font-style:normal; font-display:swap;
}

/* --- Токены --- */
:root{
  --font:"IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* цвет: выведен из логотипа #0C6CB4 / #24A8D8 / #6C6C6C */
  --brand-900:#063A63;   /* тёмный фон: подвал, скрим героя */
  --brand-700:#0C6CB4;   /* основной: ссылки, кнопки, фокус */
  --brand-600:#095289;   /* наведение */
  --brand-400:#24A8D8;   /* акцент: ТОЛЬКО линейки, маркеры, иконки на тёмном */
  --ink-900:#16202A;     /* заголовки */
  --ink-700:#33414F;     /* основной текст */
  --ink-500:#6C6C6C;     /* приглушённый текст, подписи */
  --ink-300:#C9CFD6;     /* границы, линейки */
  --ink-100:#EDF0F3;     /* фон чередующейся секции, шапка таблицы */
  --paper:#FFFFFF;

  /* отступы: одна шкала на весь проект */
  --s1:4px; --s2:8px;  --s3:12px; --s4:16px;
  --s5:24px; --s6:32px; --s7:48px; --s8:64px; --s9:96px;

  --container:1200px;
  --gutter:24px;
  --section-y:40px;
  --header-h:72px;
  --measure:68ch;        /* лечит нынешние 137 знаков в строке */
}
@media (max-width:1023px){ :root{ --section-y:40px; } }
@media (max-width:767px){  :root{ --gutter:16px; --section-y:32px; --header-h:56px; } }

/* --- База --- */
*,*::before,*::after{ box-sizing:border-box; }
html{ font-size:16px; -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }
body{
  margin:0; font-family:var(--font); font-size:1.0625rem; line-height:1.6;
  color:var(--ink-700); background:var(--paper);
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; height:auto; display:block; }
svg{ fill:currentColor; }

/* --- Типографика. Шаг 1.25 от базы 17px --- */
h1,h2,h3,h4{
  margin:0 0 var(--s3); font-weight:600; line-height:1.2;
  color:var(--ink-900); letter-spacing:-0.011em;
}
h2,h3,h4{ margin-top:var(--s6); }
h1{ font-size:2.5625rem; line-height:1.15; }   /* 41px */
h2{ font-size:2.0625rem; }                      /* 33px */
h3{ font-size:1.625rem;  line-height:1.30; }    /* 26px */
h4{ font-size:1.3125rem; line-height:1.35; }    /* 21px */
p{ margin:0 0 var(--s4); }
strong,b{ font-weight:600; }
.prose strong, .prose b{ color:var(--ink-900); }
.hero strong, .hero b, .hero *{ color:inherit; }
small,.caption{ font-size:0.875rem; line-height:1.5; color:var(--ink-500); }

@media (max-width:767px){
  h1{ font-size:1.875rem;  line-height:1.20; }  /* 30px */
  h2{ font-size:1.5625rem; line-height:1.25; }  /* 25px */
  h3{ font-size:1.3125rem; }                     /* 21px */
  h4{ font-size:1.125rem; }                      /* 18px */
  h2,h3,h4{ margin-top:var(--s5); }
}

/* Длина строки. Действует только там, где колонка шире меры. */
.prose p, .prose li{ max-width:var(--measure); }

/* --- Ссылки и фокус --- */
.prose a:not(.btn), main p a:not(.btn), main li a:not(.btn), main td a:not(.btn){
  color:var(--brand-700);
  text-decoration:underline; text-underline-offset:.15em; text-decoration-thickness:1px;
}
.prose a:not(.btn):hover, main p a:not(.btn):hover{ color:var(--brand-600); text-decoration-thickness:2px; }

:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid var(--brand-700); outline-offset:2px; border-radius:2px;
}
.site-footer :focus-visible, .hero :focus-visible{ outline-color:var(--brand-400); }

.skip-link{
  position:absolute; left:-9999px; top:0; z-index:200;
  background:var(--paper); color:var(--brand-700);
  padding:var(--s3) var(--s4); font-weight:600;
}
.skip-link:focus{ left:0; }

/* --- Раскладка --- */
.container{
  width:100%; max-width:var(--container);
  margin-inline:auto; padding-inline:var(--gutter);
}
.section{ padding-block:var(--section-y); }
.section--tint{ background:var(--ink-100); }   /* единственный альтернативный фон */
.section--flush{ padding-block:0; }            /* для полноэкранного героя */

.grid{ display:grid; gap:var(--s5); }
.grid--2{ grid-template-columns:repeat(2,1fr); }
.grid--3{ grid-template-columns:repeat(3,1fr); }
@media (max-width:1023px){ .grid--3{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:767px){
  .grid--2,.grid--3{ grid-template-columns:1fr; gap:var(--s4); }
}

/* --- Заголовок секции: один размер на весь сайт --- */
.section-title{ margin:0 0 var(--s4); text-align:left; }
.section-title::after{
  content:""; display:block; width:48px; height:3px;
  background:var(--brand-400); margin-top:var(--s3);
}

/* --- Шапка --- */
.site-header{
  position:sticky; top:0; z-index:100;
  height:var(--header-h); background:var(--paper);
  border-bottom:1px solid var(--ink-300); box-shadow:none;
}
.site-header .container{
  height:100%; display:flex; align-items:center; justify-content:space-between; gap:var(--s5);
}
.site-header .logo img{ height:40px; width:auto; }
@media (max-width:767px){ .site-header .logo img{ height:32px; } }

/* --- Меню, десктоп --- */
.nav{ display:flex; align-items:center; gap:var(--s1); }
.nav ul{ display:flex; align-items:center; gap:var(--s1); list-style:none; margin:0; padding:0; }
.nav a{
  display:flex; align-items:center; height:var(--header-h);
  padding-inline:var(--s4);
  font-size:0.9375rem; font-weight:600; line-height:1.2;
  color:var(--ink-900); text-decoration:none; text-transform:none;
}
.nav a:hover{ color:var(--brand-700); }
.nav [aria-current="page"]{
  color:var(--brand-700);
  box-shadow:inset 0 -3px 0 var(--brand-400);   /* активная страница была не отмечена ничем */
}
.nav li{ position:relative; }
.nav ul ul{                                     /* выпадающее */
  display:none; position:absolute; top:100%; left:0; min-width:260px;
  flex-direction:column; align-items:stretch; gap:0;
  background:var(--paper); border:1px solid var(--ink-300);
  box-shadow:0 8px 24px rgba(22,32,42,.12); padding:var(--s2) 0;
}
.nav li:hover > ul, .nav li:focus-within > ul{ display:flex; }
.nav ul ul a{
  height:auto; min-height:44px; padding:var(--s3) var(--s5);
  font-weight:400; color:var(--ink-700);       /* было #9D9D9D — 2.71:1 */
}
.nav ul ul a:hover{ background:var(--ink-100); color:var(--brand-700); }

/* --- Меню, мобильное. Без JS: <details> --- */
.nav-toggle{ display:none; }
@media (max-width:991px){
  .nav{ display:none; }
  .nav-toggle{ display:block; position:relative; }
  .nav-toggle > summary{
    list-style:none; cursor:pointer;
    width:44px; height:44px;                    /* было 26×70 */
    display:flex; align-items:center; justify-content:center;
    color:var(--ink-900);                       /* было #FFFFFF на белом — 1:1 */
  }
  .nav-toggle > summary::-webkit-details-marker{ display:none; }
  .nav-panel{
    position:fixed; inset:var(--header-h) 0 0 auto;
    width:min(320px,86vw); overflow-y:auto;
    background:var(--brand-900);                /* панель была прозрачной */
    box-shadow:-8px 0 32px rgba(0,0,0,.35);
    padding:var(--s5);
  }
  .nav-panel ul{ list-style:none; margin:0; padding:0; }
  .nav-panel a{
    display:flex; align-items:center; min-height:48px;
    color:var(--paper); font-size:1.0625rem; font-weight:600; text-decoration:none;
    border-bottom:1px solid rgba(255,255,255,.14);
  }
  .nav-panel ul ul a{ font-weight:400; padding-left:var(--s4); }
  .nav-panel summary{
    min-height:48px; display:flex; align-items:center; cursor:pointer;
    color:var(--paper); font-weight:600;
    border-bottom:1px solid rgba(255,255,255,.14);
  }
}

/* --- Герой и заголовок страницы на фотографии --- */
.hero{ position:relative; display:grid; align-items:center; min-height:280px; overflow:hidden; }
.page-hero{ position:relative; display:grid; align-items:center; min-height:280px; overflow:hidden; }
.hero > img, .page-hero > img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
.hero::before, .page-hero::before{                                  /* скрим: overlay был rgba(0,0,0,0) */
  content:""; position:absolute; inset:0; z-index:1;
  background:linear-gradient(90deg, rgba(6,58,99,.82) 0%, rgba(6,58,99,.62) 55%, rgba(6,58,99,.35) 100%);
}
.hero .container, .page-hero .container{ position:relative; z-index:2; padding-block:var(--s5); }
.hero h1,.hero p, .page-hero h1,.page-hero p{ color:var(--paper); text-shadow:none; }
.hero p, .page-hero p{ max-width:56ch; }
@media (max-width:767px){ .hero, .page-hero{ min-height:220px; } }

/* --- Кнопки: два вида вместо пяти --- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  min-height:44px; padding:0 var(--s5);
  font-family:var(--font); font-size:0.9375rem; font-weight:600; line-height:1.2;
  text-transform:none; letter-spacing:0; text-decoration:none;
  border-radius:3px;                            /* было 30px — форма таблетки */
  border:1px solid transparent; box-shadow:none; cursor:pointer;
  transition:background-color .12s linear, border-color .12s linear;
}
.btn--primary{ background:var(--brand-700); color:var(--paper); border-color:var(--brand-700); }
.btn--primary:hover{ background:var(--brand-600); border-color:var(--brand-600); }
.btn--quiet{ background:transparent; color:var(--brand-700); border-color:var(--ink-300); }
.btn--quiet:hover{ background:var(--ink-100); border-color:var(--brand-700); }
a.btn--primary{ color:var(--paper); }
a.btn--quiet{ color:var(--brand-700); }

/* --- Карточки --- */
.card{
  display:flex; flex-direction:column; height:100%;   /* низы карточек расходились до 44px */
  background:var(--paper); border:1px solid var(--ink-300); border-radius:3px;
  overflow:hidden;
}
.card:not(.card--inline) > img{ width:100%; aspect-ratio:4/3; object-fit:cover; }
.card__body{ padding:var(--s5); display:flex; flex-direction:column; gap:var(--s3); flex:1; }
.card__body > :last-child{ margin-top:auto; }        /* кнопки выравниваются по низу */
.card h3{ margin:0; font-size:1.375rem; }
@media (max-width:767px){ .card__body{ padding:var(--s4); } }

/* --- Таблица референсов --- */
.table-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.table{
  width:100%; min-width:720px;                  /* иначе сплющивается до 332px */
  border-collapse:collapse; table-layout:fixed;
  font-size:0.9375rem; font-variant-numeric:tabular-nums;
}
.table th{
  background:var(--ink-100); color:var(--ink-900);
  font-weight:600; text-align:left;
  padding:var(--s3) var(--s4);
  border-bottom:2px solid var(--brand-700);     /* шапки не было видно вообще */
  position:sticky; top:var(--header-h); z-index:1;
}
.table td{
  padding:var(--s3) var(--s4); vertical-align:top;
  border-bottom:1px solid var(--ink-300); color:var(--ink-700);
}
.table--compact th,
.table--compact td{ padding:var(--s1) var(--s2); line-height:1.4; }
.table--compact{ font-size:0.8125rem; }
.table--compact th{ position:static; }

/* --- Promo row: image + text grid (max 320px image) --- */
.section-promo__layout{
  display:grid;
  grid-template-columns:320px 1fr;
  gap:var(--s5);
  align-items:start;
  margin-bottom:var(--s5);
}
.section-promo__layout figure{
  margin:0;
  width:320px;
}
.section-promo__layout figure img{
  width:100%;
  aspect-ratio:3/2;
  object-fit:cover;
  display:block;
}
.section-promo__text > :last-child{ margin-bottom:0; }
.section-promo__text h3:first-child{ margin-top:0; }
.card--inline{
  background:transparent; border:none; overflow:visible;
}
.card--inline .section-promo__layout--card{ padding:var(--s4) 0; }
@media (max-width:767px){
  .section-promo__layout{ grid-template-columns:1fr; }
  .section-promo__layout figure{ width:100%; max-width:320px; }
}

.point-grid h3{ margin-top:0; }
.point-grid > div{ margin-bottom:var(--s4); }

.prose > .grid{ margin-bottom:var(--s5); }

.table tbody tr:nth-child(even){ background:#F7F9FA; }
.table th:nth-child(1),.table td:nth-child(1){ width:14%; }  /* «Годы»: было 363px под 83px */
.table th:nth-child(2),.table td:nth-child(2){ width:44%; }
.table th:nth-child(3),.table td:nth-child(3){ width:42%; }
@media (max-width:767px){
  .table{ font-size:0.875rem; }
  .table th{ position:static; }
  .table th,.table td{ padding:var(--s3); }
  .table--compact{ font-size:0.75rem; }
  .table--compact th,.table--compact td{ padding:2px 4px; line-height:1.35; }
}

/* --- Рисунки и схемы --- */
.prose figure:not(.figure--schematic){
  max-width:320px;
  margin-inline:0;
  margin-bottom:var(--s5);
}
.prose figure img{ width:100%; aspect-ratio:3/2; object-fit:cover; display:block; }
.figure--schematic{ max-width:100%; margin-inline:auto; }
.figure--schematic img{
  aspect-ratio:auto; object-fit:contain;
  border:1px solid var(--ink-300); background:var(--paper);
}
.gallery{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,320px));
  gap:var(--s5);
  margin-bottom:var(--s5);
}
.gallery figure{ margin:0; max-width:320px; }
.gallery img{ width:100%; aspect-ratio:3/2; object-fit:cover; display:block; }
@media (max-width:1023px){ .gallery{ grid-template-columns:repeat(2,minmax(0,320px)); } }
@media (max-width:767px){ .gallery{ grid-template-columns:minmax(0,320px); } }
figcaption{ margin-top:var(--s3); font-size:0.875rem; color:var(--ink-500); }

/* Promo embed: grid overrides generic prose figure cap */
.prose .section-promo__layout figure{
  max-width:none;
  margin-inline:0;
  margin-bottom:0;
}

/* --- Подвал --- */
.site-footer{
  background:var(--brand-900); color:rgba(255,255,255,.86);  /* 9.0:1 */
  padding-block:var(--s8); border-top:none;
}
.site-footer a{ color:var(--paper); text-decoration:none; }  /* 11.7:1 */
.site-footer a:hover{ text-decoration:underline; text-decoration-color:var(--brand-400); }
.site-footer h2,.site-footer h3{ color:var(--paper); font-size:1.0625rem; margin:0 0 var(--s3); }
.site-footer ul{ list-style:none; margin:0; padding:0; display:grid; gap:var(--s2); }
.site-footer .legal{ font-size:0.875rem; color:rgba(255,255,255,.72); }  /* 6.8:1 */
.site-footer__logo{ text-align:center; margin-bottom:var(--s5); }
.site-footer__logo img{ height:80px; width:auto; margin-inline:auto; }
.site-footer__links{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--s5); margin-bottom:var(--s6); }
.site-footer__legal{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--s5); }
.site-footer__copy{ margin-top:var(--s5); font-size:0.875rem; color:rgba(255,255,255,.72); text-align:center; }
@media (max-width:767px){
  .site-footer{ padding-block:40px; }
  .site-footer__links, .site-footer__legal{ grid-template-columns:1fr; }
}

/* --- Contact page --- */
.contact-grid{
  display:grid; grid-template-columns:repeat(2,1fr); gap:var(--s6);
}
.contact-grid > div{ display:flex; flex-direction:column; gap:var(--s2); }
@media (max-width:767px){ .contact-grid{ grid-template-columns:1fr; } }

/* --- Mobile nav submenus --- */
.nav-panel details{ border-bottom:1px solid rgba(255,255,255,.14); }
.nav-panel details > summary{
  list-style:none; min-height:48px; display:flex; align-items:center;
  color:var(--paper); font-weight:600; cursor:pointer; padding-right:var(--s3);
}
.nav-panel details > summary::-webkit-details-marker{ display:none; }
.nav-panel details[open] > summary{ border-bottom:1px solid rgba(255,255,255,.08); }
.nav-panel details > ul{ padding-left:0; }

/* --- Служебное --- */
.notice-panel{
  background:var(--ink-100);
  border:1px solid var(--ink-300);
  border-left:4px solid var(--brand-700);
  padding:var(--s5);
  font-size:1rem;
}
.notice-panel .section-title{ margin-top:0; }

  position:absolute; width:1px; height:1px; overflow:hidden;
  clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap;
}
