/* =========================================================
   ИП Штепа А. Г. — «Промышленная точность»
   Стили: IBM Plex Sans (заголовки, моно-акценты) + Manrope (тело)
   ========================================================= */

:root {
  --bg:            #eef1f4;
  --surface:       #ffffff;
  --surface-alt:   #e3e8ee;
  --line:          #cfd6de;
  --line-strong:   #a8b3bf;
  --ink:           #0f1720;
  --ink-soft:      #2b3644;
  --ink-mute:      #5c6673;
  --accent:        #1e4d8f;
  --accent-strong: #163a6c;
  --accent-soft:   #e1ebf7;
  --signal:        #e05a1a;
  --signal-soft:   #fbeadf;
  --ok:            #1a7a4a;
  --warn:          #c8202c;

  --radius-sm:  6px;
  --radius:    12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 32, .06);
  --shadow:    0 4px 14px rgba(15, 23, 32, .08);
  --shadow-lg: 0 18px 40px rgba(15, 23, 32, .10);

  --f-heading: 'IBM Plex Sans', 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --f-body:    'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-strong); }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--f-heading);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.15; }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.45rem); }
h4 { font-size: 1rem; }
p  { margin: 0 0 1em; color: var(--ink-soft); }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px);
}
.muted  { color: var(--ink-mute); }
.small  { font-size: .875rem; }
.mono   { font-family: var(--f-mono); letter-spacing: -.01em; }

.tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.tag.ok     { background: rgba(26,122,74,.10); color: var(--ok); }
.tag.signal { background: var(--signal-soft);  color: var(--signal); }

/* ---------------------------- Кнопки ---------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--f-heading);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  text-decoration: none;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
.btn-signal    { background: var(--signal); color: #fff; }
.btn-signal:hover { background: #b8481a; color: #fff; }
.btn-ghost     { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-soft); background: var(--surface); }
.btn-block     { width: 100%; }
.btn svg { width: 18px; height: 18px; }

/* ---------------------------- Шапка ---------------------------- */
.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(238,241,244,.88);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-heading);
  font-weight: 700; color: var(--ink);
}
.brand-logo { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 1rem; }
.brand-text span {
  font-family: var(--f-mono);
  font-size: .7rem;
  color: var(--ink-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  color: var(--ink-soft);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: .93rem;
}
.nav a:hover  { color: var(--ink); background: var(--surface); }
.nav a.active { color: var(--ink); background: var(--surface); }

.header .btn { padding: 10px 16px; font-size: .9rem; }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line-strong);
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content:''; display: block;
  width: 18px; height: 2px; background: var(--ink); border-radius: 1px;
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top:  6px; }
@media (max-width: 960px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0;
         background: var(--bg); border-bottom: 1px solid var(--line);
         flex-direction: column; padding: 12px; gap: 4px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav-toggle { display: inline-flex; }
  .header .btn.desktop-only { display: none; }
}

/* ---------------------------- Полоса «государственные данные» ---------------------------- */
.regbar {
  background: var(--ink);
  color: rgba(255,255,255,.72);
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.regbar .container {
  display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between;
}
.regbar b { color: #fff; font-weight: 500; }

/* ---------------------------- Герой ---------------------------- */
.hero {
  padding: 60px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px;
  font-family: var(--f-mono);
  font-size: .78rem; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 22px;
}
.hero-eyebrow::before {
  content:''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
}
.hero h1 span { color: var(--accent); }
.hero-sub {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 12px 0 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px;
}
.hero-stats h4 {
  font-family: var(--f-mono);
  color: rgba(255,255,255,.55);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
}
.hero-stat b {
  display: block;
  font-family: var(--f-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
}
.hero-stat span { color: rgba(255,255,255,.62); font-size: .88rem; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------------------------- Секции ---------------------------- */
section { padding: 64px 0; }
section.tight { padding: 40px 0; }
section.alt { background: var(--surface); }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 24px; margin-bottom: 36px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head p  { max-width: 560px; margin: 0; }

/* ---------------------------- Карточки пунктов ---------------------------- */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.station-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.station-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.station-card .st-code {
  font-family: var(--f-mono);
  font-size: .78rem;
  color: var(--ink-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.station-card h3 { margin: 0; }
.station-card .st-addr {
  font-size: .95rem;
  color: var(--ink-soft);
}
.station-card .st-cats {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.st-cat {
  font-family: var(--f-mono);
  background: var(--surface-alt);
  color: var(--ink);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: .8rem;
  font-weight: 500;
}
.station-card .st-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px;
  font-size: .88rem;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.station-card .st-meta b { color: var(--ink); font-family: var(--f-heading); }
.station-card .st-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.station-card .st-actions .btn { flex: 1; padding: 10px 14px; font-size: .88rem; }

/* ---------------------------- Прайс ---------------------------- */
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.price-table th, .price-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.price-table thead th {
  background: var(--surface-alt);
  font-family: var(--f-mono);
  font-size: .8rem;
  color: var(--ink-mute);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
}
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table td.cat {
  font-family: var(--f-mono);
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}
.price-table td.price {
  font-family: var(--f-heading);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  text-align: right;
}
@media (max-width: 700px) {
  .price-table th, .price-table td { padding: 10px 12px; font-size: .88rem; }
  .price-table td.desc { display: none; }
}
.price-note {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--signal-soft);
  border-left: 3px solid var(--signal);
  border-radius: var(--radius-sm);
  font-size: .93rem;
  color: var(--ink-soft);
}

/* ---------------------------- Форма записи ---------------------------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--f-heading);
  font-weight: 500;
  margin-bottom: 6px;
  font-size: .93rem;
  color: var(--ink);
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: .97rem;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
.field .hint { font-size: .8rem; color: var(--ink-mute); margin-top: 4px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -10000px; opacity: 0; height: 0; }

.form-result {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  display: none;
}
.form-result.ok  { background: rgba(26,122,74,.08); color: var(--ok);   border-left: 3px solid var(--ok);   display: block; }
.form-result.err { background: rgba(200,32,44,.08); color: var(--warn); border-left: 3px solid var(--warn); display: block; }

/* ---------------------------- Шаги «Как проходит осмотр» ---------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  counter-reset: step;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  counter-increment: step;
}
.step-card::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--f-mono);
  font-size: .82rem;
  color: var(--accent);
  letter-spacing: .1em;
  display: block;
  margin-bottom: 8px;
}
.step-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step-card p  { font-size: .93rem; margin: 0; }

/* ---------------------------- Инфо-карточки ---------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.info-card h4 {
  font-family: var(--f-mono);
  font-size: .78rem;
  color: var(--ink-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.info-card b { font-family: var(--f-heading); font-size: 1.1rem; color: var(--ink); }
.info-card p { margin: 4px 0 0; }

/* ---------------------------- Слоты под фото ---------------------------- */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.photo-slot {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--surface-alt);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.photo-slot img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.photo-slot::after {
  content:'';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

/* ---------------------------- FAQ ---------------------------- */
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 22px;
  margin-bottom: 10px;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
  font-family: var(--f-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: var(--f-mono);
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 12px 0 0; font-size: .95rem; }

/* ---------------------------- CTA-полоса ---------------------------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}
.cta-band h2 { color: #fff; margin: 0; }
.cta-band p  { color: rgba(255,255,255,.72); margin: 8px 0 0; }
.cta-band .actions { display: flex; gap: 12px; justify-self: end; flex-wrap: wrap; }
.cta-band .btn-primary { background: var(--signal); color: #fff; }
.cta-band .btn-primary:hover { background: #b8481a; color: #fff; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.32); }
.cta-band .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
@media (max-width: 900px) {
  .cta-band { grid-template-columns: 1fr; }
  .cta-band .actions { justify-self: start; }
}

/* ---------------------------- Контакты / карта ---------------------------- */
.contact-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.contact-block h4 {
  font-family: var(--f-mono);
  font-size: .78rem;
  color: var(--ink-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.contact-block a { display: block; font-family: var(--f-heading); font-size: 1.05rem; color: var(--ink); }
.contact-block a:hover { color: var(--accent); }

/* ---------------------------- Подвал ---------------------------- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.72);
  padding: 48px 0 24px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 28px;
}
.footer h5 {
  font-family: var(--f-mono);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.5);
  margin: 0 0 12px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer li a, .footer li span { color: rgba(255,255,255,.78); font-size: .93rem; }
.footer li a:hover { color: #fff; }
.footer .brand { color: #fff; }
.footer .brand-text b { color: #fff; }
.footer .brand-text span { color: rgba(255,255,255,.5); }
.footer p.small { color: rgba(255,255,255,.6); margin-top: 10px; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-family: var(--f-mono);
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .03em;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------------------- Утилиты ---------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 12px; }
.text-center { text-align: center; }
.hidden { display: none; }
