/* ООО «Аверс» — внутренние страницы. Та же система, что на главной. */
:root {
  --bg: #0a0b0d;
  --bg-2: #0f1114;
  --surface: #14171b;
  --surface-2: #1a1e23;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f1ec;
  --muted: #a3a29e;
  --dim: #75746f;
  --gold: #c8a46a;
  --gold-light: #e2c896;
  --gold-soft: rgba(200, 164, 106, 0.12);
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;
  --serif: "Jost", "Segoe UI", system-ui, sans-serif;
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header: 76px;
  --max: 1240px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--gold); color: var(--bg); }

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

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--bg);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip:focus { transform: translateY(0); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Типографика ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.kicker::before {
  width: 32px;
  height: 1px;
  background: currentColor;
  content: "";
}

h1, h2, h3 {
  font-weight: 400;
  letter-spacing: -0.015em;
}
h1 {
  max-width: 14ch;
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 1;
}
h2 {
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.06;
}
h3 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.lead {
  max-width: 520px;
  margin-top: 24px;
  color: var(--muted) !important;
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 300;
  line-height: 1.7;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  min-height: 52px;
  padding: 0 28px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #14100a;
  box-shadow: 0 10px 40px -10px rgba(200, 164, 106, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px -12px rgba(200, 164, 106, 0.7);
}
.btn-line,
.btn-light {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.btn-line:hover,
.btn-light:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}
.btn-telegram {
  border-color: rgba(42, 171, 238, 0.55);
  background: rgba(42, 171, 238, 0.16);
  color: #e8f6ff;
}
.btn-telegram:hover {
  border-color: #2aabee;
  background: #2aabee;
  color: #fff;
  transform: translateY(-2px);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Шапка ---------- */
.header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.header.is-stuck,
.header:has(.nav.is-open) {
  border-bottom-color: var(--line);
  background: rgba(10, 11, 13, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
}
.header-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  max-width: var(--max);
  min-height: var(--header);
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  text-decoration: none;
}
.logo-img {
  width: 96px;
  height: auto;
  transition: transform 0.5s var(--ease);
}
.logo:hover .logo-img { transform: translateX(3px); }
.logo b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.32em;
  line-height: 1.1;
}
.logo small {
  display: block;
  margin-top: 4px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.menu-btn {
  display: grid;
  width: 48px;
  height: 48px;
  place-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.menu-btn span {
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav {
  display: none;
  grid-column: 1 / -1;
  padding: 16px 0 32px;
}
.nav.is-open { display: grid; }
.nav a {
  display: flex;
  min-height: 52px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--text); }
.nav .btn {
  margin-top: 24px;
  border-bottom: 0;
  color: #14100a;
}
.nav .btn-telegram {
  margin-top: 12px;
  color: #e8f6ff;
}

/* ---------- Шапка страницы ---------- */
.page-hero {
  position: relative;
  display: flex;
  min-height: 60vh;
  align-items: flex-end;
  padding: calc(var(--header) + 64px) 0 72px;
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../images/carrier-road.jpg") center 40% / cover no-repeat;
  content: "";
  transform: scale(1.06);
  animation: heroZoom 14s var(--ease) forwards;
}
.page-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 11, 13, 0.6) 0%, rgba(10, 11, 13, 0.35) 40%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10, 11, 13, 0.85) 0%, rgba(10, 11, 13, 0.3) 60%, rgba(10, 11, 13, 0.1) 100%);
  content: "";
}
@keyframes heroZoom { to { transform: scale(1); } }

/* ---------- Секции ---------- */
.section {
  padding: 96px 0;
  scroll-margin-top: var(--header);
}
.section-head {
  display: grid;
  gap: 20px;
  margin-bottom: 48px;
}
.section-head p {
  max-width: 480px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 300;
}

.split {
  display: grid;
  gap: 56px;
  align-items: start;
}

.prose p {
  max-width: 560px;
  margin-top: 20px;
  color: var(--muted);
  font-weight: 300;
}
.prose h2 { margin-bottom: 8px; }
.prose .btn { margin-top: 12px; }
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.doc-actions .btn { margin-top: 0; }
.doc-view {
  max-height: min(820px, 78vh);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #e7e2d8;
}
.doc-view img {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  margin: 0 auto 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.doc-view img:last-child { margin-bottom: 0; }

/* Список с номерами (услуги, договор) */
.services,
.timeline {
  display: grid;
  border-top: 1px solid var(--line-strong);
}
.service,
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.5s var(--ease);
}
.service:hover,
.step:hover { padding-left: 8px; }
.service h3,
.step h3 { margin-bottom: 8px; }
.service p,
.step p {
  color: var(--muted);
  font-size: 15px;
  font-weight: 300;
}
.index-num,
.step-num {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(200, 164, 106, 0.45);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 20px;
  font-style: normal;
  line-height: 1;
}

/* Карточки (гарантии и др.) */
.grid-2,
.grid-3 {
  display: grid;
  gap: 16px;
  counter-reset: card;
}
.card,
.guarantee {
  position: relative;
  display: flex;
  min-height: 240px;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  counter-increment: card;
}
.card::before,
.guarantee::before {
  padding-bottom: 56px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 28px;
  font-style: normal;
  line-height: 1;
  content: counter(card);
}
.card::after,
.guarantee::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at 0% 0%, var(--gold-soft), transparent 60%);
  opacity: 0;
  content: "";
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.card:hover::after,
.guarantee:hover::after { opacity: 1; }
.card h3,
.guarantee h3 { margin-bottom: 12px; }
.card p,
.guarantee p {
  color: var(--muted);
  font-size: 15px;
  font-weight: 300;
}

/* Фото */
.media-grid {
  display: grid;
  gap: 16px;
}
.media-grid figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.media-grid img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.media-grid figure:hover img { transform: scale(1.04); }
.media-grid figcaption {
  padding: 16px 20px 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
}

/* Вопросы и ответы */
.faq { max-width: 880px; }
.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: flex;
  min-height: 76px;
  align-items: center;
  padding-right: 48px;
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before,
.faq summary::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 1.5px;
  background: var(--gold);
  content: "";
  transition: transform 0.4s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--gold-light); }
.faq details p {
  max-width: 68ch;
  margin: 0 0 28px;
  color: var(--muted);
  font-weight: 300;
}
.faq > p { margin-top: 40px !important; }

/* Контакты и форма */
.contact-grid {
  display: grid;
  gap: 24px;
}
.aside,
form {
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
form {
  background:
    radial-gradient(600px circle at 100% 0%, rgba(200, 164, 106, 0.08), transparent 60%),
    var(--surface);
}
.aside h2,
form h2 {
  margin-bottom: 24px;
  font-size: clamp(28px, 3vw, 38px);
}
.aside > p {
  color: var(--muted);
  font-weight: 300;
}
.contact-list {
  display: grid;
  gap: 0;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.contact-list li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.contact-list span {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.contact-list a {
  color: var(--gold-light);
  text-underline-offset: 3px;
}
.contact-list a:hover { color: #fff; }
label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: border-color 0.2s, background-color 0.2s;
}
input:hover { border-color: rgba(255, 255, 255, 0.28); }
input:focus {
  border-color: var(--gold);
  background: rgba(200, 164, 106, 0.05);
  outline: none;
}
input[aria-invalid="true"] { border-color: #e07a6a; }
.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 400;
  line-height: 1.5;
}
.consent input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--gold);
}
.error {
  min-height: 1.1em;
  color: #e07a6a;
  font-size: 13px;
}
form .btn { width: 100%; margin-top: 8px; }

/* Реквизиты */
.req {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
}
.req th,
.req td {
  display: block;
  padding: 6px 24px;
  text-align: left;
  vertical-align: top;
}
.req th {
  padding-top: 20px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.req td {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.req tr:last-child td { border-bottom: 0; }

/* ---------- Подвал ---------- */
footer {
  padding: 80px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-grid { display: grid; gap: 48px; }
.footer-grid > div > p {
  max-width: 340px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
}
footer h2 {
  margin-bottom: 20px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
footer ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
}
footer ul a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  text-decoration: none;
  transition: color 0.2s;
}
footer ul a:hover { color: var(--text); }
.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 13px;
}
/* у .wrap есть боковые поля — рисуем линию по ширине текста */
.wrap.legal {
  position: relative;
  border-top: 0;
}
.wrap.legal::before {
  position: absolute;
  top: 0;
  right: var(--gutter, 24px);
  left: var(--gutter, 24px);
  height: 1px;
  background: var(--line);
  content: "";
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(20, 23, 27, 0.8);
  color: var(--text);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.to-top:hover { border-color: var(--gold); color: var(--gold); }
.to-top[hidden] { display: none; }

/* ---------- Модальное окно ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 6, 8, 0.75);
  backdrop-filter: blur(8px);
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(520px, 100%);
  padding: 36px;
  border: 1px solid rgba(200, 164, 106, 0.25);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.7);
}
.modal-card h2 { margin-bottom: 16px; }
.modal-card p {
  color: var(--muted);
  font-weight: 300;
}
.modal-card pre {
  margin: 20px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  white-space: pre-wrap;
}

/* ---------- Появление ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (min-width: 640px) {
  .logo-img { width: 118px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aside, form { padding: 40px; }
  .req th, .req td { display: table-cell; padding: 20px 28px; border-bottom: 1px solid var(--line); }
  .req th { width: 32%; }
  .req tr:last-child th, .req tr:last-child td { border-bottom: 0; }
}

@media (min-width: 900px) {
  .wrap,
  .header-row { padding-right: 40px; padding-left: 40px; }
  .wrap.legal { --gutter: 40px; }
  .section { padding: 128px 0; }

  .menu-btn { display: none; }
  .header-row { display: flex; gap: 32px; }
  .nav,
  .nav.is-open {
    display: flex;
    margin-left: auto;
    padding: 0;
    align-items: center;
    gap: 28px;
  }
  .nav a {
    position: relative;
    min-height: 44px;
    border-bottom: 0;
    color: rgba(243, 241, 236, 0.72);
    font-size: 13px;
  }
  .nav a:not(.btn)::after {
    position: absolute;
    right: 0;
    bottom: 8px;
    left: 0;
    height: 1px;
    background: var(--gold);
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease);
  }
  .nav a:not(.btn):hover::after,
  .nav a[aria-current="page"]::after {
    transform: scaleX(1);
    transform-origin: left;
  }
  .nav .btn {
    min-height: 44px;
    margin-top: 0;
    padding: 0 22px;
    font-size: 13px;
  }
  .nav .btn.btn-telegram {
    width: 44px;
    min-width: 44px;
    height: 44px;
    margin-top: 0;
    padding: 0;
    border-radius: 50%;
    color: #bfe6f8;
  }
  .nav .btn.btn-telegram span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .page-hero { min-height: 64vh; padding-bottom: 96px; }

  .section-head {
    grid-template-columns: 1.2fr 1fr;
    align-items: end;
    gap: 64px;
    margin-bottom: 64px;
  }
  .section-head p { justify-self: end; }

  .split {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 80px;
  }
  .split > div:first-child:not(.timeline) { position: sticky; top: calc(var(--header) + 32px); }

  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card, .guarantee { min-height: 280px; padding: 40px; }

  .contact-grid { grid-template-columns: 0.85fr 1.15fr; }
  .aside, form { padding: 48px; }

  .footer-grid {
    grid-template-columns: 1.5fr 0.8fr 1.1fr 1fr;
    gap: 40px;
  }
}

.logo { flex-shrink: 0; }
@media (min-width: 900px) and (max-width: 1099px) {
  .nav, .nav.is-open { gap: 16px; }
  .nav a { font-size: 12px; white-space: nowrap; }
  .nav .btn { padding: 0 16px; }
  .nav .btn.btn-telegram {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
