/* ==========================================================================
   ПА-РУС — лендинг
   Палитра ограничена пятью токенами из брифа. Приглушённые оттенки текста
   получены прозрачностью основной краски, новых цветов не вводится.
   ========================================================================== */

:root {
  --blue: #2756fc;
  --ink: #10162B;
  --bg: #FFFFFF;
  --alt: #EEF1F8;
  --line: #DDE3F0;

  --ink-70: rgba(16, 22, 43, .72);
  --ink-55: rgba(16, 22, 43, .55);
  --on-dark-70: rgba(255, 255, 255, .72);
  --on-dark-45: rgba(255, 255, 255, .45);

  --container: 1160px;
  --gutter: 24px;
  --radius: 3px;          /* почти прямые углы: скругления здесь не приём */
  --bar: 4px;             /* толщина акцентной полосы — единственная деталь */
}

/* --- база ---------------------------------------------------------------- */

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

/* hidden должен побеждать display у .modal и панелей поп-апа */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.14;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.35rem); line-height: 1.06; }
h2 { font-size: clamp(1.55rem, 2.7vw, 2.15rem); }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: .9375rem; font-weight: 700; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(60px, 8vw, 108px) 0; }
.section-alt { background: var(--alt); }

.section-intro {
  max-width: 58ch;
  margin: 14px 0 0;
  color: var(--ink-70);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* --- кнопки -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn-primary { background: var(--blue); color: #fff; }
/* Ховер — смесь двух цветов палитры, а не новый оттенок синего.
   Браузер без color-mix просто оставит основной цвет. */
.btn-primary:hover { background: color-mix(in srgb, var(--blue) 86%, var(--ink)); }

.btn-ghost {
  background: transparent;
  color: var(--blue);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--blue); }

.btn-lg { padding: 15px 30px; font-size: 1.0625rem; }
.btn-block { width: 100%; }

/* --- шапка --------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/* Логотип использует ту же акцентную полосу, что и карточки */
.logo-mark {
  width: var(--bar);
  height: 22px;
  background: var(--blue);
  flex: none;
}

.logo-text {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-phone {
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* --- герой --------------------------------------------------------------- */

.hero { padding: clamp(44px, 6vw, 84px) 0 clamp(44px, 6vw, 76px); }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-copy h1 { max-width: 17ch; }

.lead {
  max-width: 62ch;
  margin: 22px 0 0;
  font-size: 1.0625rem;
  color: var(--ink-70);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* Чертёжной графике нужен белый: на цветной подложке тонкая линия теряет
   контраст. Собственная «миллиметровка» PNG гасится в фон секции через
   multiply, поэтому отдельная плашка под картинкой не нужна. */
.media-tile { padding: 0; }
.media-tile img { width: 100%; mix-blend-mode: multiply; }

/* Единственная анимация на странице — появление героя при загрузке */
.hero-copy, .hero-media {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-in .55s cubic-bezier(.22, .61, .36, 1) forwards;
}
.hero-media { animation-delay: .1s; }

@keyframes hero-in {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy, .hero-media { animation: none; opacity: 1; transform: none; }
  * { transition-duration: .01ms !important; }
}

/* --- сетка с акцентной полосой (услуги и условия) ------------------------ */

/* Герой и услуги идут двумя белыми секциями подряд — граница волосяной
   линией отделяет их без лишнего фонового блока */
#services { border-top: 1px solid var(--line); }

.bar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(32px, 5vw, 72px);
  margin-top: clamp(36px, 4vw, 52px);
}

/*
  Выбранный вариант оформления: полоса слева 4px, фон прозрачный,
  ни тени, ни рамки. Одинаково в обеих секциях, независимо от фона.
*/
.bar-item {
  border-left: var(--bar) solid var(--blue);
  padding-left: 22px;
}

.bar-item h3 { margin: 14px 0 8px; }

.bar-item p {
  max-width: 46ch;
  color: var(--ink-70);
  font-size: .9688rem;
}

.ico {
  display: block;
  width: 26px;
  height: 26px;
  color: var(--blue);
  stroke: var(--blue);
  stroke-width: 1.75;
}
.ico-lg { width: 34px; height: 34px; }

/* --- о компании ---------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.about-copy h2 { margin-bottom: 22px; }

.about-copy p {
  max-width: 60ch;
  color: var(--ink-70);
}

.about-note {
  margin-top: 22px;
  padding-left: 18px;
  border-left: var(--bar) solid var(--blue);
  font-weight: 700;
  color: var(--ink) !important;
}

.about-media { padding: 0; }

/* --- финальный призыв ---------------------------------------------------- */

.cta {
  background: var(--ink);
  color: #fff;
  padding: clamp(60px, 8vw, 100px) 0 clamp(56px, 7vw, 88px);
}

/* Единственное место на странице, где текст выровнен по центру */
.cta-inner { max-width: 62ch; margin: 0 auto; text-align: center; }
.cta-inner p { margin: 20px 0 32px; color: var(--on-dark-70); }

/* --- футер --------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--on-dark-70);
  padding-bottom: 32px;
  font-size: .9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-top: 44px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.logo-inverse .logo-text { color: #fff; }

.footer-col h4 { margin-bottom: 10px; color: #fff; }
.footer-col p { margin-bottom: 6px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: #fff; }

.footer-note { max-width: 34ch; margin-top: 14px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: var(--on-dark-45);
  font-size: .875rem;
}

/* --- поп-ап -------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 22, 43, .62);
}

.modal-window {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: auto;
  background: var(--bg);
  border-radius: var(--radius);
  border-top: var(--bar) solid var(--blue);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  color: var(--ink-55);
  cursor: pointer;
}
.modal-close:hover { color: var(--ink); background: var(--alt); }

.modal-body { padding: clamp(26px, 4vw, 38px); }
.modal-body h2 { font-size: 1.5rem; }

.modal-sub {
  margin: 10px 0 26px;
  color: var(--ink-70);
  font-size: .9375rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: .875rem;
  font-weight: 700;
}

.req { color: var(--blue); }

.field input,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: .9688rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s ease;
}

.field textarea { resize: vertical; min-height: 88px; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--blue); }

.field-error {
  display: block;
  margin-top: 5px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--blue);
}

.form-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--alt);
  border-left: var(--bar) solid var(--blue);
  font-size: .875rem;
}

.form-legal {
  margin: 14px 0 0;
  font-size: .8125rem;
  color: var(--ink-55);
}

/* honeypot: скрыт от людей, но доступен ботам, заполняющим все поля */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.modal-success { text-align: center; }
.modal-success .ico { margin: 0 auto 16px; }
.modal-success p { margin: 12px 0 26px; color: var(--ink-70); }

body.modal-open { overflow: hidden; }

/* --- адаптив ------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-grid,
  .about-grid { grid-template-columns: 1fr; }

  .hero-copy { max-width: 46ch; }
  .hero-copy h1 { max-width: 18ch; }

  .hero-media { max-width: 520px; }
  .about-media { order: -1; max-width: 380px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .bar-grid { grid-template-columns: 1fr; }
  .header-phone { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  /* ниже 16px iOS зумит страницу при фокусе на поле */
  .field input, .field textarea { font-size: 16px; }
  .hero-buttons .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .modal { padding: 12px; align-items: flex-start; }
}
