/* ООО «ИНСМАРТПРО» — in-sp.ru. Статическая версия 2.
   Стиль: графит + тёплый светлый фон + охристый акцент, прямые углы, IBM Plex Sans.
   Фирменные фиолетово-пурпурные цвета живут только в логотипе и маскоте. */

/* IBM Plex Sans variable (wght 100–700, wdth 85–100), SIL OFL 1.1 — см. ../fonts/OFL-IBMPlexSans.txt */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-stretch: 85% 100%;
  font-display: swap;
  src: url("../fonts/ibmplexsans-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-stretch: 85% 100%;
  font-display: swap;
  src: url("../fonts/ibmplexsans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1b232b;            /* графит — основной тёмный */
  --ink-2: #26313b;          /* сталь — вторичный тёмный */
  --paper: #f4f3ef;          /* тёплый светлый фон */
  --white: #ffffff;
  --line: #d9d5cc;           /* линии на светлом */
  --line-dark: #3a4652;      /* линии на тёмном */
  --text: #1b232b;
  --muted: #58616a;          /* 6.3:1 на белом, 5.7:1 на --paper */
  --on-dark: #f4f3ef;
  --on-dark-muted: #b7bec5;  /* 8.5:1 на --ink */
  --accent: #e2a13a;         /* охра: только заливки/линии на светлом, текст — только на тёмном (6.9:1) */
  --accent-hover: #eab25a;
  --radius: 2px;
  --container: 1200px;
  --gutter: 16px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
.hero :focus-visible,
.cta :focus-visible,
.site-footer :focus-visible { outline-color: var(--accent); }

h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

.icon {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--on-dark);
  text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* Надзаголовок: короткая охристая черта + подпись капителью */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 3px;
  background: var(--accent);
  flex: none;
}
.eyebrow--on-dark { color: var(--accent); }

/* ---------- Шапка ---------- */
.site-header {
  position: relative;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
  padding-top: 14px;
}
.logo { display: inline-flex; flex: none; }
.logo img { height: 26px; width: auto; }

.nav { order: 3; width: 100%; margin-top: 8px; border-top: 1px solid var(--line); }
.nav ul {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}
.nav a {
  display: inline-block;
  padding: 12px 0;
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.header-phone .icon { width: 18px; height: 18px; }
.header-phone:hover span { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }

@media (min-width: 768px) {
  .site-header { position: sticky; top: 0; }
  .site-header__inner { flex-wrap: nowrap; min-height: 76px; padding-top: 0; gap: 40px; }
  .logo img { height: 32px; }
  .nav { order: 0; width: auto; margin: 0 0 0 auto; border-top: 0; }
  .nav ul { gap: 32px; overflow: visible; }
  .nav a { padding: 26px 0 23px; }
  .header-phone { font-size: 1.05rem; }
}

/* ---------- Секции ---------- */
section[id], #requisites { scroll-margin-top: 16px; }
@media (min-width: 768px) {
  section[id], #requisites { scroll-margin-top: 92px; }
}

.section { padding-block: 56px; }
.section--paper { background: var(--paper); }
.section__title {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem);
  font-weight: 600;
  font-stretch: 92%;
  letter-spacing: -.01em;
  max-width: 22em;
}
@media (min-width: 768px) {
  .section { padding-block: 96px; }
}

/* ---------- Первый экран: тёмный, асимметричный ---------- */
.hero {
  background: var(--ink);
  color: var(--on-dark);
  padding-block: 40px 48px;
  border-bottom: 4px solid var(--accent);
}
.hero__grid {
  display: grid;
  gap: 36px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4rem);
  font-weight: 600;
  font-stretch: 85%;
  line-height: 1.04;
  letter-spacing: -.01em;
  max-width: 13em;
}
.hero__lead {
  margin-top: 20px;
  color: var(--on-dark-muted);
  font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem);
  line-height: 1.5;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero__media {
  margin: 0;
  width: 100%;
  max-width: 420px;
  justify-self: center;
  background: var(--white);
  padding: 10px;
}
.hero__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

@media (min-width: 900px) {
  .hero { padding-block: 88px 96px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; }
  .hero__media { justify-self: end; }
}

/* ---------- Кнопки: прямоугольные ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn .icon { width: 20px; height: 20px; }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--outline-light {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(244, 243, 239, .45);
  font-variant-numeric: tabular-nums;
}
.btn--outline-light:hover { border-color: var(--on-dark); background: rgba(244, 243, 239, .06); }

@media (max-width: 479px) {
  .hero__actions .btn, .cta .btn { width: 100%; padding: 0 14px; gap: 8px; font-size: .9375rem; }
}

/* ---------- О компании: заголовок слева, три «паспортные» колонки ---------- */
.about__head { margin-bottom: 32px; }
.facts {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 3px solid var(--ink);
}
.fact {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.fact__title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 8px;
}
.fact p { color: var(--muted); }

@media (min-width: 768px) {
  .about__head { margin-bottom: 48px; }
  .facts { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .fact { padding: 28px 32px 32px 0; border-bottom: 0; }
  .fact + .fact { padding-left: 32px; border-left: 1px solid var(--line); }
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: 40px;
  padding: 28px 24px;
  background: var(--ink);
  color: var(--on-dark);
  border-left: 6px solid var(--accent);
}
.cta__text {
  font-size: clamp(1.3rem, 1.1rem + .9vw, 1.8rem);
  font-weight: 600;
  font-stretch: 90%;
  line-height: 1.2;
}
@media (max-width: 479px) {
  .cta { padding: 24px 16px 24px 18px; }
}
@media (min-width: 768px) {
  .cta { margin-top: 56px; padding: 36px 40px; }
}

/* ---------- Контакты: «лист» с линиями + карта ---------- */
.contacts {
  display: grid;
  gap: 32px;
  margin-top: 32px;
  grid-template-areas: "info" "map" "req";
}
.contacts__info { grid-area: info; }
.contacts__map { grid-area: map; }
.contacts__req { grid-area: req; }

.sheet { margin: 0; border-top: 3px solid var(--ink); }
.sheet__row {
  display: grid;
  gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.sheet dt {
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.sheet dd { margin: 0; font-variant-numeric: tabular-nums; }
.sheet__value {
  display: inline-block;
  padding-block: 8px;
  margin-block: -8px;
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.sheet__value:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.sheet__address { font-style: normal; font-weight: 500; line-height: 1.5; }

.sheet--compact .sheet__row { padding: 12px 0; }
.sheet--compact dd { font-weight: 500; }

@media (min-width: 480px) {
  .sheet__row { grid-template-columns: 120px 1fr; gap: 16px; align-items: baseline; }
}

.map-links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 10px; }
.map-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.map-links a:hover { text-decoration-color: var(--ink); }
.map-links .icon { width: 17px; height: 17px; }

.contacts__map {
  position: relative;
  min-height: 360px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.contacts__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.req__title { font-size: 1.25rem; font-weight: 600; margin-bottom: 14px; }

@media (min-width: 900px) {
  .contacts {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-areas: "info map" "req map";
    grid-template-rows: auto 1fr;
    gap: 40px 48px;
    margin-top: 48px;
  }
  .contacts__map { min-height: 480px; }
}

/* ---------- Подвал ---------- */
.site-footer {
  background: var(--ink);
  color: var(--on-dark-muted);
  padding-block: 32px;
  font-size: .95rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
}
.site-footer__company { max-width: 40em; }
.site-footer__name { color: var(--on-dark); font-weight: 600; margin-bottom: 4px; }
.site-footer a { display: inline-block; padding-block: 10px; color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.site-footer__contacts { display: flex; flex-wrap: wrap; gap: 0 28px; font-variant-numeric: tabular-nums; }
