/* ═══ Galo Magic — стиль «Грань» ═══ */

:root {
  --ink: #2a2e33;
  --ink-soft: #565b60;
  --ink-faint: #8a8f94;
  --accent: #45aee3;
  --accent-deep: #2b8fc7;
  --tint: #eaf5fb;
  --tint-soft: #f6fbfe;
  --hairline: #e2e6e9;
  --bg: #ffffff;
  --header-h: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Onest', 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }

h1 {
  font-family: 'Cormorant', serif;
  font-size: clamp(42px, 4vw, 72px);
  line-height: 1.08;
  font-weight: 600;
}

h2 {
  font-family: 'Cormorant', serif;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.15;
  font-weight: 600;
  max-width: 720px;
}

h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}

p { margin: 0; }

a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent); }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 18px;
}

/* ═══ Кнопки ═══ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 36px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-dark { background: var(--ink); color: #ffffff; }
.btn-dark:hover { background: #3d4249; color: #ffffff; }

.btn-accent { background: var(--accent); color: #ffffff; }
.btn-accent:hover { background: var(--accent-deep); color: #ffffff; }
.btn-accent:disabled { background: var(--ink-faint); cursor: default; }

.btn-outline {
  height: 46px;
  padding: 0 26px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: #ffffff; }

.link-accent {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 3px;
}
.link-accent:hover { color: var(--accent-deep); }

:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }

/* ═══ Шапка ═══ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}

.brand-logo {
  height: 50px;
  width: auto;
}

.brand-logo-footer { height: 40px; }

.brand-name {
  font-size: 14px;
  letter-spacing: 0.26em;
  font-weight: 600;
}

.nav { display: flex; gap: 32px; }

.nav a { font-size: 15px; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

/* ═══ Hero ═══ */

/* split-hero: слева текст, справа фото-панель до края экрана */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 56px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 72px 32px 96px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0;
}

/* ═══ Фото-панель с живым спектром ═══ */

/* панель — параллелограмм: skewX на контейнере (GPU-трансформ, без
   перерисовки), содержимое скошено обратно, чтобы вышка стояла ровно */
.hero-visual {
  --skew: 3.4deg;
  position: relative;
  overflow: hidden;
  min-height: 640px;
  margin: 0 24px;
  background: #1a232b;
  transform: skewX(calc(-1 * var(--skew)));
}

.hero-visual-img {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -8%;
  width: 116%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  /* обесцвечивание запечено в JPEG — CSS-фильтр не нужен */
  transform: skewX(var(--skew)) scale(1.05);
  animation: hero-img-settle 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hero-img-settle { to { transform: skewX(var(--skew)) scale(1); } }

/* голубая тонировка сверху, затемнение снизу под спектр */
.hero-visual-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(43, 143, 199, 0.32) 0%, rgba(43, 143, 199, 0.22) 45%, rgba(20, 30, 38, 0.86) 100%);
}

.hero-visual-tag {
  position: absolute;
  top: 30px;
  right: 34px;
  transform: skewX(var(--skew));
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-visual-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(69, 174, 227, 0.3);
  animation: live-dot 2.2s ease-in-out infinite;
}

@keyframes live-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(69, 174, 227, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(69, 174, 227, 0.08); }
}

.hero-spectrum {
  position: absolute;
  left: -30px;
  right: -30px;
  bottom: 0;
  height: 230px;
  pointer-events: none;
  z-index: 1;
  transform: skewX(var(--skew));
}

.hero-spectrum canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* собственный слой композитинга: обновления канваса не трогают фото */
  will-change: transform;
  transform: translateZ(0);
}

/* ═══ Оркестрованная загрузка hero ═══ */

.intro {
  opacity: 0;
  animation: intro-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes intro-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* заголовок: строки выезжают из-под маски */
h1 .line { display: block; overflow: hidden; }

h1 .line > span {
  display: block;
  transform: translateY(115%);
  animation: line-up 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes line-up { to { transform: none; } }

.hero-copy h1 { max-width: 700px; }

.hero-sub {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 600px;
  margin-top: 28px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 36px;
}

.hero-stats {
  display: flex;
  gap: 56px;
  margin-top: 56px;
}

.stat-value {
  font-family: 'Cormorant', serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
}

.stat-label { font-size: 14px; color: var(--ink-faint); }

.hero-includes {
  list-style: none;
  margin: 40px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
  max-width: 640px;
}

.hero-includes li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink-soft);
}

.hero-includes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--accent);
  transform: rotate(45deg);
}

/* ═══ Секции ═══ */

.section { padding: 96px 0; }

/* ═══ Основания для отказа (раскрывающийся блок) ═══ */

.refusal {
  margin-top: 40px;
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--accent);
  background: var(--bg);
}

.refusal summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
}

.refusal summary::-webkit-details-marker { display: none; }

.refusal-title { font-size: 18px; font-weight: 600; }

.refusal-hint {
  flex-shrink: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  display: flex;
  align-items: center;
  gap: 10px;
}

.refusal-hint::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s ease;
}

.refusal[open] .refusal-hint::after { transform: rotate(-135deg) translateY(-2px); }
.refusal-hint-close { display: none; }
.refusal[open] .refusal-hint-open { display: none; }
.refusal[open] .refusal-hint-close { display: inline; }

.refusal-list {
  margin: 0;
  padding: 8px 28px 8px 28px;
  border-top: 1px solid var(--hairline);
  columns: 2;
  column-gap: 48px;
  counter-reset: refusal;
  list-style: none;
}

.refusal-list li {
  counter-increment: refusal;
  position: relative;
  padding: 14px 0 14px 40px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  break-inside: avoid;
  border-bottom: 1px dotted #d9dee2;
}

.refusal-list li::before {
  content: counter(refusal, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 15px;
  font-family: 'Cormorant', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.refusal-note {
  padding: 20px 28px 24px;
  font-size: 15px;
  color: var(--ink);
  border-top: 1px solid var(--hairline);
}

/* ═══ Тёмные секции: ритм страницы ═══ */

.section-dark {
  position: relative;
  overflow: hidden;
  background: #141c22;
  color: #ffffff;
}

.section-dark > .container { position: relative; z-index: 1; }

.section-dark h2, .section-dark h3 { color: #ffffff; }
.section-dark p { color: rgba(255, 255, 255, 0.72); }
.section-dark .eyebrow { color: var(--accent); }

/* фото под сине-графитовой пеленой — как в hero-панели */
.section-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.section-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 28, 34, 0.86) 0%, rgba(20, 28, 34, 0.68) 50%, rgba(20, 28, 34, 0.88) 100%),
    linear-gradient(0deg, rgba(43, 143, 199, 0.18), rgba(43, 143, 199, 0.18));
}

.section-photo-services { background-image: url('/static/img/bg-services.jpg'); background-position: center 35%; }
.section-photo-lead { background-image: url('/static/img/bg-lead.jpg'); }

/* графитовая секция без фото — лёгкое голубое свечение сбоку */
#process.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(900px 500px at 100% 0%, rgba(69, 174, 227, 0.14), transparent 70%);
}

.section h2 { margin-bottom: 48px; }

.grid {
  display: grid;
  gap: 28px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--accent);
  padding: 28px 30px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -26px rgba(42, 46, 51, 0.45);
}

.card p { font-size: 16px; color: var(--ink-soft); }

/* ═══ Фото-лента ═══ */

.photo-band { overflow: hidden; }

.photo-band-figure { margin: 0; position: relative; }

.photo-band-figure img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
  /* обесцвечивание запечено в JPEG, подсинивание — оверлеем ниже */
  clip-path: polygon(0 0, 100% 7%, 100% 100%, 0 93%);
  transform: scale(1.06);
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-band-figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(69, 174, 227, 0.14);
  clip-path: polygon(0 0, 100% 7%, 100% 100%, 0 93%);
  pointer-events: none;
}

.reveal-photo.visible img { transform: scale(1); }

.photo-band-figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  text-align: right;
  font-size: 13px;
  color: #f2f7fa;
  text-shadow: 0 1px 8px rgba(23, 28, 33, 0.5);
}

/* ═══ Услуги ═══ */

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 48px;
}

.service {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 26px;
  position: relative;
}

.service-marker {
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  background: transparent;
  border: 1.5px solid var(--accent);
  transform: rotate(45deg);
  transition: background-color 0.25s ease;
}

.service:hover .service-marker { background: var(--accent); }

.service p { font-size: 16px; color: var(--ink-soft); }

.services-extra {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 640px;
}

.section-dark .service p,
.section-dark .services-extra { color: rgba(255, 255, 255, 0.72); }
.section-dark .services-extra { border-top-color: rgba(255, 255, 255, 0.16); }

/* ═══ Виды связи ═══ */

.types-hint {
  font-size: 14px;
  color: var(--ink-faint);
  margin: -28px 0 28px;
}

.types-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* плитки с фото по виду связи: фото + сине-графитовая пелена, текст белым */
.types-grid li {
  position: relative;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  font-size: 16px;
  color: #ffffff;
  background: #141c22 var(--img) center / cover no-repeat;
  cursor: default;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.types-grid li::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 28, 34, 0.35) 0%, rgba(20, 28, 34, 0.82) 100%),
    linear-gradient(0deg, rgba(43, 143, 199, 0.22), rgba(43, 143, 199, 0.22));
  transition: opacity 0.3s ease;
}

.types-grid li > .type-name,
.types-grid li > .type-freq { position: relative; z-index: 1; }
.types-grid li > .type-tip { position: absolute; }

.type-name { font-weight: 600; line-height: 1.3; }

.type-freq {
  display: block;
  margin-top: 4px;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.2s;
}

.types-grid li:hover,
.types-grid li:focus-visible,
.types-grid li.open {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -22px rgba(20, 28, 34, 0.6);
  /* поднять над соседними плитками, чтобы подсказка не пряталась под них */
  z-index: 5;
}

.types-grid li:hover::before,
.types-grid li:focus-visible::before,
.types-grid li.open::before { opacity: 0.85; }

.types-grid li:hover .type-freq { color: var(--accent); }

.type-cellular { --img: url('/static/img/types/cellular.jpg'); }
.type-trunking { --img: url('/static/img/types/trunking.jpg'); }
.type-vhf { --img: url('/static/img/types/vhf.jpg'); }
.type-hf { --img: url('/static/img/types/hf.jpg'); }
.type-rrl { --img: url('/static/img/types/rrl.jpg'); }
.type-sat { --img: url('/static/img/types/sat.jpg'); }
.type-wll { --img: url('/static/img/types/wll.jpg'); }
.type-data { --img: url('/static/img/types/data.jpg'); }
.type-tv { --img: url('/static/img/types/tv.jpg'); }
.type-radio { --img: url('/static/img/types/radio.jpg'); }
.type-marine { --img: url('/static/img/types/marine.jpg'); }

.type-tip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 340px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--accent);
  box-shadow: 0 14px 32px -18px rgba(42, 46, 51, 0.35);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  z-index: 6;
  pointer-events: none;
}

.types-grid li:hover .type-tip,
.types-grid li:focus-visible .type-tip,
.types-grid li.open .type-tip {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* ═══ Процесс ═══ */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  counter-reset: step;
}

.step {
  counter-increment: step;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--hairline);
  padding-top: 20px;
  position: relative;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: 'Cormorant', serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.step p { font-size: 15px; color: var(--ink-soft); }

.section-dark .step { border-top-color: rgba(255, 255, 255, 0.16); }
.section-dark .step p { color: rgba(255, 255, 255, 0.72); }

/* ═══ Результат: бланк разрешения ═══ */

.result-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 72px;
  align-items: center;
}

.result-info h2 { margin-bottom: 20px; }

.result-text { color: var(--ink-soft); max-width: 460px; }
.result-text + .result-text { margin-top: 14px; }

.result-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 36px;
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
}

.result-links-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.result-links a {
  font-size: 15px;
  color: var(--ink);
  width: fit-content;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

.result-links a:hover { color: var(--accent-deep); }

.permit {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--accent);
  background: var(--bg);
  /* документная «стопка»: второй лист позади */
  box-shadow:
    10px 12px 0 -4px #f0f4f7,
    11px 13px 0 -3px #dfe5ea,
    0 18px 40px -28px rgba(42, 46, 51, 0.35);
  padding: 40px 44px;
}

/* диагональный водяной знак */
.permit-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-24deg);
  font-family: 'Cormorant', serif;
  font-size: 84px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(69, 174, 227, 0.09);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

/* закрашенные данные заявителя */
.redacted {
  display: inline-block;
  height: 11px;
  vertical-align: baseline;
  background: repeating-linear-gradient(90deg, #c4cbd1 0 14px, #d4dade 14px 20px);
  border-radius: 1px;
}

.redacted-num { width: 72px; margin-left: 8px; }

.permit-head { text-align: center; }

.permit-agency {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 3px;
}

.permit-country {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.permit-title {
  font-family: 'Cormorant', serif;
  font-size: 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 10px;
}

.permit-sub { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }

.permit-rows {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 30px;
}

.permit-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1px dotted #c9ced3;
  padding-bottom: 8px;
  font-size: 14px;
  /* каскадное заполнение при появлении */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: calc(0.25s + var(--i) * 0.14s);
}

.permit.visible .permit-row { opacity: 1; transform: none; }

.permit-row span { color: var(--ink-faint); }
.permit-row b { font-weight: 500; text-align: right; }

.permit-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 34px;
}

.permit-stamp {
  width: 96px;
  height: 96px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--accent-deep);
  /* печать «ставится» после заполнения строк */
  opacity: 0;
  transform: scale(1.18) rotate(-14deg);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.3, 1.2, 0.5, 1);
  transition-delay: 1.05s;
}

.permit.visible .permit-stamp { opacity: 0.9; transform: scale(1) rotate(-8deg); }

.permit-sign { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.permit-sign-name {
  font-family: 'Cormorant', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--accent-deep);
}

.permit-sign-line { width: 150px; height: 1px; background: #c9ced3; }

.permit-sign-note { font-size: 11px; color: var(--ink-faint); }

/* ═══ Форма ═══ */

.section-lead { position: relative; overflow: hidden; }

.lead-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 72px;
  align-items: start;
}

.lead-info h2 { margin-bottom: 20px; }
.lead-info > p { color: var(--ink-soft); max-width: 440px; }

.lead-contacts {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 44px;
  border-top: 1px solid var(--hairline);
  padding-top: 32px;
}

.lead-contact { display: flex; flex-direction: column; gap: 2px; }

.lead-contact-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lead-contact a, .lead-contact span:not(.lead-contact-label) { font-size: 17px; color: var(--ink); }
.lead-contact a:hover { color: var(--accent-deep); }

.section-dark .lead-info > p { color: rgba(255, 255, 255, 0.72); }
.section-dark .lead-contacts { border-top-color: rgba(255, 255, 255, 0.16); }
.section-dark .lead-contact-label { color: rgba(255, 255, 255, 0.5); }
.section-dark .lead-contact a,
.section-dark .lead-contact span:not(.lead-contact-label) { color: #ffffff; }
.section-dark .lead-contact a:hover { color: var(--accent); }
.section-dark .lead-form { border-color: transparent; border-top-color: var(--accent); }
.section-dark .lead-form p { color: var(--ink-faint); }
.section-dark .lead-form .form-status.ok { color: #2e7d4f; }
.section-dark .lead-form .form-status.err { color: #d64545; }

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border: 1px solid var(--hairline);
  border-top: 2px solid var(--accent);
  padding: 40px;
  background: var(--bg);
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field label { font-size: 14px; font-weight: 500; }

.optional { color: var(--ink-faint); font-weight: 400; }

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid #c7cdd2;
  padding: 13px 16px;
  transition: border-color 0.2s;
  width: 100%;
}

.field textarea { resize: vertical; min-height: 96px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-deep);
}

.field input.invalid { border-color: #d64545; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.lead-form .btn { width: 100%; }

.form-status { font-size: 15px; min-height: 1.4em; }
.form-status.ok { color: #2e7d4f; }
.form-status.err { color: #d64545; }

.form-note { font-size: 13px; color: var(--ink-faint); }

/* ═══ Футер ═══ */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px 0;
  background: #0f151a;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer .footer-name { color: #ffffff; }
.site-footer .footer-bin { color: rgba(255, 255, 255, 0.5); }
.site-footer .footer-contacts a, .site-footer .footer-contacts span { color: rgba(255, 255, 255, 0.72); }
.site-footer .footer-contacts a:hover { color: var(--accent); }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: center; gap: 16px; }

.footer-name { font-size: 16px; font-weight: 500; }
.footer-bin { font-size: 14px; color: var(--ink-faint); }

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  text-align: right;
}

.footer-contacts a, .footer-contacts span { color: var(--ink-soft); }
.footer-contacts a:hover { color: var(--accent-deep); }

/* ═══ Появление при скролле ═══ */

/* тихий фейд для мелких элементов */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* заголовки секций раскрываются из-под маски
   (клипается внутренний span — clip-path на самом элементе
   ломает IntersectionObserver в Chromium) */
.reveal-clip > span {
  display: block;
  clip-path: inset(0 0 100% 0);
  transform: translateY(14px);
  transition: clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-clip.visible > span {
  clip-path: inset(0 0 0 0);
  transform: none;
}

/* каскад дочерних элементов в сетках */
.stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger.visible > * { opacity: 1; transform: none; }

.stagger.visible > *:nth-child(2) { transition-delay: 0.07s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.14s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.21s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.28s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.35s; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.42s; }
.stagger.visible > *:nth-child(8) { transition-delay: 0.49s; }
.stagger.visible > *:nth-child(9) { transition-delay: 0.56s; }
.stagger.visible > *:nth-child(10) { transition-delay: 0.63s; }
.stagger.visible > *:nth-child(11) { transition-delay: 0.7s; }
.stagger.visible > *:nth-child(12) { transition-delay: 0.77s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .stagger > *, .intro, h1 .line > span { opacity: 1; transform: none; transition: none; animation: none; }
  .reveal-clip > span { clip-path: none; transform: none; transition: none; }
  .photo-band-figure img { transform: none; transition: none; }
  .hero-visual-img { transform: skewX(var(--skew)); animation: none; }
  .hero-visual-tag::before { animation: none; }
  .card, .card:hover { transform: none; box-shadow: none; }
  .permit-row, .permit-stamp { opacity: 1; transform: none; transition: none; }
  .permit-stamp { transform: rotate(-8deg); }
}

/* ═══ Адаптив ═══ */

@media (max-width: 1240px) {
  .hero { gap: 40px; }
}

@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .types-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-inner { grid-template-columns: 1fr; gap: 48px; }
  .result-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 56px 32px 72px; }
  .hero-copy { padding: 0; }
  .hero-visual { --skew: 0deg; min-height: 380px; margin: 0; }
  .hero-spectrum { height: 180px; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .container { padding: 0 20px; }
  .hero { padding: 40px 20px 56px; gap: 32px; }
  .hero-visual { min-height: 300px; }
  .hero-spectrum { height: 150px; }
  .hero-visual-tag { top: 18px; right: 20px; }
  .hero-stats { gap: 32px; margin-top: 40px; }
  .grid-2, .services { grid-template-columns: 1fr; }
  .refusal-list { columns: 1; padding: 4px 20px; }
  .refusal summary { padding: 18px 20px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .refusal-note { padding: 16px 20px 20px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .lead-form { padding: 28px 22px; }
  .permit { padding: 28px 22px; }
  .photo-band-figure img { height: 260px; clip-path: polygon(0 0, 100% 4%, 100% 100%, 0 96%); }
  .photo-band-figure::after { clip-path: polygon(0 0, 100% 4%, 100% 100%, 0 96%); }
  .photo-band-figure figcaption { bottom: 22px; }
  .permit-foot { flex-direction: column; align-items: center; gap: 24px; }
  .permit-sign { align-items: center; }

  .header-cta { display: none; }
  .brand-name { display: none; }
  .brand-logo { height: 42px; }
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--hairline);
    padding: 8px 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 20px; font-size: 16px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-contacts { text-align: left; }
}

@media (max-width: 480px) {
  .types-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero-includes { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}

/* ═══ Согласие на обработку ПДн в форме ═══ */

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  cursor: pointer;
}

.consent input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent-deep);
  cursor: pointer;
}

.consent a { color: var(--accent-deep); border-bottom: 1px solid rgba(43, 143, 199, 0.4); }
.consent a:hover { color: var(--accent); }

.footer-legal { font-size: 14px; margin-top: 6px; }

/* ═══ Юридические страницы ═══ */

.legal { padding: 72px 0 96px; }

.legal-inner { max-width: 820px; }

.legal h1 {
  font-size: clamp(30px, 4vw, 52px);
  margin-bottom: 10px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.legal-meta {
  font-size: 14px;
  color: var(--ink-faint);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hairline);
}

.legal h2 {
  font-size: 26px;
  margin: 40px 0 14px;
}

.legal p { margin: 0 0 14px; color: var(--ink-soft); }

.legal ul {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--ink-soft);
}

.legal li { margin-bottom: 6px; }

.legal a { color: var(--accent-deep); }
.legal a:hover { color: var(--accent); }

.legal-back { margin-top: 48px; }

@media (max-width: 768px) {
  .legal { padding: 48px 0 64px; }
  .legal h2 { font-size: 22px; margin-top: 32px; }
}
