/* Построим ангар — базовые стили.
   Мобильный приоритет, базовая ширина 412px. Читается с телефона на улице:
   крупный кегль, высокий контраст, широкие кнопки. */

:root {
  --graphite-900: #101315;
  --graphite-800: #191d21;
  --graphite-700: #23282d;
  --steel-600: #3a4147;
  --steel-500: #5b646c;
  --steel-400: #8d959c;
  --paper: #f4f5f6;
  --paper-card: #ffffff;
  --ink: #14181b;
  --accent: #e2560e;
  --accent-hot: #ff6a1f;
  --accent-press: #b84408;

  /* Кегль плывёт между телефоном и десктопом, но никогда не мельче 17px */
  --t-body: clamp(1.0625rem, 1.02rem + 0.22vw, 1.1875rem);
  --t-lead: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --t-h3: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --t-h2: clamp(1.625rem, 1.4rem + 1.1vw, 2.375rem);
  --t-h1: clamp(2rem, 1.6rem + 2.1vw, 3.5rem);
  --t-huge: clamp(2.75rem, 2rem + 3.6vw, 4.5rem);

  --gap: clamp(1rem, 0.85rem + 0.7vw, 1.5rem);
  --section-y: clamp(2.75rem, 2rem + 3vw, 5rem);
  --shell: 1180px;
  --radius: 8px;
  --line: 1px solid rgba(58, 65, 71, 0.18);
  --line-dark: 1px solid rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  margin: 0 0 0.5em;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }

.shell {
  width: min(100% - 2 * var(--gap), var(--shell));
  margin-inline: auto;
}

.section { padding-block: var(--section-y); }
.section--dark { background: var(--graphite-900); color: #fff; }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }

.section__head { max-width: 46rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.section__head p { color: var(--steel-500); font-size: var(--t-lead); margin: 0; }
.section--dark .section__head p { color: var(--steel-400); }

.eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-hot);
}

/* ── Кнопки ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 56px;
  padding: 0.9rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: var(--t-body);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease;
}
.btn:hover { background: var(--accent-hot); }
.btn:active { background: var(--accent-press); transform: translateY(1px); }
.btn--wide { width: 100%; }
.btn--ghost {
  background: transparent;
  border-color: var(--steel-600);
  color: #fff;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); }

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--accent-hot);
  outline-offset: 2px;
}

/* ── Шапка ────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(16, 19, 21, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: var(--line-dark);
  color: #fff;
}
.header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  min-height: 64px;
}
.logo {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
}
.logo b { color: var(--accent-hot); font-weight: 700; }
.header__phone {
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
}
.header__nav { display: none; gap: 1.5rem; }
.header__nav a {
  text-decoration: none;
  color: var(--steel-400);
  font-size: 1rem;
  transition: color 0.15s ease;
}
.header__nav a:hover { color: #fff; }
@media (min-width: 900px) {
  .header__nav { display: flex; }
}

/* ── Первый экран ─────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--graphite-900);
  color: #fff;
  padding-block: clamp(3rem, 2rem + 6vw, 7rem);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.42;
}
/* Текст поверх фото читается только со скримом — на солнце особенно */
.hero--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--graphite-900) 0%,
    rgba(16, 19, 21, 0.88) 45%,
    rgba(16, 19, 21, 0.55) 100%
  );
}
.hero__inner { position: relative; z-index: 2; max-width: 44rem; }
.hero__lead {
  font-size: var(--t-lead);
  color: #d5dade;
  margin-bottom: 2rem;
  max-width: 34rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero__note { margin: 1.25rem 0 0; color: var(--steel-400); font-size: 1rem; }

/* ── Цифры ────────────────────────────────────────────────── */
.numbers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: var(--line-dark);
}
.numbers__cell {
  padding: 1.5rem 0;
  border-bottom: var(--line-dark);
}
.numbers__value {
  display: block;
  font-size: var(--t-huge);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent-hot);
  font-variant-numeric: tabular-nums;
}
.numbers__label { display: block; margin-top: 0.5rem; color: var(--steel-400); }
@media (min-width: 720px) {
  .numbers { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

/* ── Карточки ─────────────────────────────────────────────── */
.cards {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .cards--2 { grid-template-columns: repeat(2, 1fr); }
  .cards--3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--paper-card);
  border: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card__body { padding: clamp(1.1rem, 2.5vw, 1.75rem); }
.card__body h3 { margin-bottom: 0.4rem; }
.card__body p { margin: 0; color: var(--steel-500); }
.card__media, .ph {
  aspect-ratio: 16 / 10;
  background: var(--graphite-800);
  object-fit: cover;
  width: 100%;
}
/* Заглушка вместо фото: вёрстка обязана выглядеть законченной без единого снимка */
.ph {
  display: grid;
  place-items: center;
  color: var(--steel-500);
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ph::after { content: attr(data-label); }

/* ── Плитки назначений ────────────────────────────────────── */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 0.75rem;
}
.tile {
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 1rem 1.25rem;
  background: var(--paper-card);
  border: var(--line);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tile:hover { border-color: var(--accent); background: #fff; }
.tile::after {
  content: "→";
  margin-left: auto;
  color: var(--accent);
  transition: transform 0.15s ease;
}
.tile:hover::after { transform: translateX(3px); }

/* ── Этапы ────────────────────────────────────────────────── */
.steps { display: grid; gap: 0; counter-reset: step; }
.steps__item {
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1rem;
  padding: 1.35rem 0;
  border-bottom: var(--line);
}
.steps__item:last-child { border-bottom: 0; }
.steps__item::before {
  counter-increment: step;
  content: counter(step);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.steps__item h3 { margin: 0 0 0.25rem; }
.steps__item p { margin: 0; color: var(--steel-500); }

/* ── Характеристики ───────────────────────────────────────── */
.specs { width: 100%; border-collapse: collapse; }
.specs tr { border-bottom: var(--line); }
.specs td { padding: 0.95rem 0; vertical-align: top; }
.specs td:first-child { color: var(--steel-500); padding-right: 1.5rem; }
.specs td:last-child { font-weight: 650; text-align: right; }

/* ── Вопросы ──────────────────────────────────────────────── */
.faq { border-top: var(--line); }
.faq__item { border-bottom: var(--line); }
.faq__q {
  width: 100%;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.25rem 0;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.faq__q::after {
  content: "+";
  flex: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.faq__item.is-open .faq__q::after { transform: rotate(45deg); }
.faq__a {
  display: none;
  padding-bottom: 1.25rem;
  color: var(--steel-500);
  max-width: 46rem;
}
.faq__item.is-open .faq__a { display: block; }

/* ── Список аргументов ────────────────────────────────────── */
.usp { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .usp { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
.usp__item { padding-left: 1.1rem; border-left: 3px solid var(--accent); }
.usp__item h3 { margin-bottom: 0.3rem; }
.usp__item p { margin: 0; color: var(--steel-500); }
.section--dark .usp__item p { color: var(--steel-400); }

/* ── Калькулятор выключен ─────────────────────────────────── */
.notice {
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--steel-400);
}
.notice p:last-child { margin-bottom: 0; }

/* ── Форма ────────────────────────────────────────────────── */
.form { max-width: 34rem; }
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1rem;
  color: var(--steel-400);
}
.field input, .field textarea {
  width: 100%;
  min-height: 56px;
  padding: 0.9rem 1rem;
  background: var(--graphite-800);
  border: 1px solid var(--steel-600);
  border-radius: var(--radius);
  color: #fff;
  font: inherit;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder { color: var(--steel-500); }
.field input:focus, .field textarea:focus { border-color: var(--accent); }

.form__more {
  background: none;
  border: 0;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  color: var(--steel-400);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.form__optional { display: none; }
.form__optional.is-open { display: block; }

.consent {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin: 1.25rem 0;
  color: var(--steel-400);
  font-size: 1rem;
  line-height: 1.45;
}
.consent input {
  flex: none;
  width: 28px;
  height: 28px;
  margin: 0;
  accent-color: var(--accent);
}
.consent a { color: var(--steel-400); }
.form.is-invalid .consent { color: var(--accent-hot); }
.form.is-invalid .consent a { color: var(--accent-hot); }

.form__status { margin-top: 1rem; min-height: 1.5rem; font-weight: 600; }
.form__status[data-state="error"] { color: var(--accent-hot); }
.form__status[data-state="ok"] { color: #7fd18b; }

.form__done { display: none; }
.form.is-done .form__done { display: block; }
.form.is-done .form__fields { display: none; }

/* ── Подвал и мобильная панель ────────────────────────────── */
.footer {
  background: var(--graphite-900);
  color: var(--steel-400);
  padding-block: var(--section-y) calc(var(--section-y) * 0.6);
  font-size: 1rem;
}
.footer a { color: var(--steel-400); }
.footer__grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer__legal { margin-top: 2rem; padding-top: 1.5rem; border-top: var(--line-dark); }

/* Липкая полоса действий — на телефоне телефон и заявка всегда под рукой */
.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--steel-600);
  border-top: var(--line-dark);
}
.actionbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  background: var(--graphite-900);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}
.actionbar a.is-accent { background: var(--accent); }
@media (min-width: 900px) { .actionbar { display: none; } }
@media (max-width: 899px) { body { padding-bottom: 58px; } }

/* ── Текстовая страница ───────────────────────────────────── */
.prose { max-width: 42rem; }
.prose h2 { margin-top: 2em; }
.prose p { color: var(--steel-500); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
