/* Стили внутренних страниц. Главная их не использует —
   поэтому вынесены отдельно от main.css, который генерируется из макета. */

/* ── шапка страницы ───────────────────────────────────────────── */
.pagehead {
  background: var(--navy-deep);
  color: #fff;
  padding: 44px 0 52px;
  position: relative;
  overflow: hidden;
}
.pagehead::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 9px);
  pointer-events: none;
}
.pagehead .wrap { position: relative }
.pagehead h1 {
  font-size: clamp(28px, 4vw, 44px);
  max-width: 20ch;
  margin-top: 16px;
}
.pagehead-lead {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.6;
  color: #c1cbdc;
  max-width: 62ch;
}
.crumbs {
  display: flex; gap: 9px; flex-wrap: wrap;
  font: 600 12px/1 var(--mono);
  letter-spacing: .12em; text-transform: uppercase;
  color: #7d8ba4;
}
.crumbs a { color: #a9b6cc; border-bottom: 1px solid rgba(169,182,204,.35) }
.crumbs a:hover { color: #fff; border-color: #fff }

/* ── типографика текстовых страниц ────────────────────────────── */
.article { max-width: 780px }
.article h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 44px 0 16px;
  letter-spacing: -.02em;
}
.article h2:first-child { margin-top: 0 }
.article h3 { font-size: 20px; margin: 32px 0 12px }
.article p { margin: 0 0 16px; font-size: 16.5px; line-height: 1.72; color: #2b323d }
.article ul, .article ol { margin: 0 0 20px; padding-left: 22px; color: #2b323d }
.article li { margin-bottom: 9px; line-height: 1.65 }
.article a { color: var(--red); border-bottom: 1px solid rgba(193,14,14,.35) }
.article a:hover { border-color: var(--red) }
.article strong { color: var(--ink) }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15px }
.article th {
  text-align: left; padding: 12px 15px;
  background: var(--navy-dark); color: #fff;
  font: 700 12px/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase;
}
.article td { padding: 12px 15px; border-bottom: 1px solid var(--line) }
.article tr:nth-child(even) td { background: var(--bg-alt) }
.article blockquote {
  margin: 0 0 22px; padding: 18px 22px;
  border-left: 3px solid var(--amber); background: var(--bg-alt);
  color: var(--steel); font-size: 16px;
}

@media (max-width: 720px) {
  .pagehead { padding: 30px 0 36px }
  .article p, .article li { font-size: 16px }
}

/* ── формы: ошибки и успешная отправка ─────────────────────────── */
.f-err {
  display: block; margin-top: 6px;
  font-size: 13px; color: var(--red); line-height: 1.4;
}
.af-ok {
  padding: 22px 24px; background: #EAF6F0;
  border-left: 3px solid #0F6B45; color: #14301F; font-size: 15.5px; line-height: 1.55;
}
.af-ok b { display: block; margin-bottom: 4px; font-size: 17px }
form.ajax_form.af-loading { opacity: .6; pointer-events: none; transition: opacity .15s }
.hero-card .f-err { color: #ff6b6b }


/* ── вертикальные видео с объектов ──────────────────────────────
   Съёмка ведётся на телефон, формат 9:16. Не режем его под
   горизонтальную карточку, а показываем в родной пропорции. */
.videos {
  background: var(--navy-deep);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}
.videos .wrap { position: relative; z-index: 1 }

.vgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.vcard { margin: 0; display: flex; flex-direction: column; gap: 14px }

.vcard-media {
  position: relative;
  display: block; width: 100%; padding: 0;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 2px;
  overflow: hidden;
  background: #05122e;
  cursor: pointer;
  transition: border-color .18s, transform .18s;
}
.vcard-media:hover { border-color: rgba(255,255,255,.4); transform: translateY(-3px) }
.vcard-media:focus-visible { outline: 2px solid var(--red); outline-offset: 3px }
.vcard-media video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.vcard-expand {
  position: absolute; right: 10px; bottom: 10px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3,16,47,.78); color: #fff;
  border-radius: 2px; opacity: .85; transition: opacity .18s;
}
.vcard-media:hover .vcard-expand { opacity: 1 }

.vcard figcaption { display: block }
.vcard-loc {
  display: block;
  font: 700 11px/1 var(--mono);
  letter-spacing: .12em; text-transform: uppercase;
  color: #ff7a72; margin-bottom: 7px;
}
.vcard-title {
  display: block;
  font-size: 14.5px; line-height: 1.45; color: #c9d2e0;
}

@media (max-width: 1080px) {
  .vgrid { grid-template-columns: repeat(2, 1fr); gap: 18px }
}
@media (max-width: 720px) {
  .videos { padding: 52px 0 }
  /* на телефоне — горизонтальная лента, как в сторис */
  .vgrid {
    display: flex; gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -20px; padding: 0 20px 8px;
    scrollbar-width: none;
  }
  .vgrid::-webkit-scrollbar { display: none }
  .vcard { flex: 0 0 62%; scroll-snap-align: start }
}

/* ── плитка фотографий с объектов ───────────────────────────────── */
.gallery { padding: 64px 0; background: var(--bg-alt) }
.ggrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.gcard { margin: 0; display: flex; flex-direction: column; gap: 12px }

.gcard-media {
  position: relative; display: block;
  aspect-ratio: 4 / 3; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface, #fff);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.gcard-media:hover {
  border-color: #c2cad6;
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(14,17,23,.12);
}
.gcard-media:focus-visible { outline: 2px solid var(--red); outline-offset: 3px }
.gcard-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s;
}
.gcard-media:hover img { transform: scale(1.04) }
.gcard-zoom {
  position: absolute; right: 10px; bottom: 10px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3,16,47,.8); color: #fff; border-radius: 2px;
  opacity: 0; transition: opacity .18s;
}
.gcard-media:hover .gcard-zoom { opacity: 1 }
.gcard figcaption {
  font-size: 14px; line-height: 1.5; color: var(--steel);
}

@media (max-width: 900px) { .ggrid { grid-template-columns: repeat(2, 1fr); gap: 16px } }
@media (max-width: 560px) { .ggrid { grid-template-columns: 1fr } .gallery { padding: 44px 0 } }

/* ── просмотр во весь экран ─────────────────────────────────────── */
.lbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  background: rgba(3,16,47,.94);
  padding: 32px;
}
.lbox[open], .lbox.is-open { display: flex }
.lbox img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border: 1px solid rgba(255,255,255,.18);
}
.lbox-cap {
  position: absolute; left: 0; right: 0; bottom: 20px;
  text-align: center; color: #c9d2e0; font-size: 14.5px;
  padding: 0 32px; text-wrap: balance;
}
.lbox-close {
  position: absolute; top: 18px; right: 20px;
  width: 44px; height: 44px; padding: 0;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
  color: #fff; cursor: pointer; border-radius: 2px;
  font: 300 26px/1 var(--sans, sans-serif);
}
.lbox-close:hover { background: rgba(255,255,255,.18) }
body.lbox-open { overflow: hidden }

/* ── рекомендательные письма ────────────────────────────────────
   Лист А4 показываем целиком, без кадрирования: обрезанный документ
   выглядит как подделка. Отсюда contain и белая подложка. */
.letters { padding: 64px 0; background: var(--bg-alt) }
.lgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
  gap: 28px;
  justify-content: start;
}
.lcard { margin: 0; display: flex; flex-direction: column; gap: 14px }

.lcard-media {
  position: relative; display: block;
  aspect-ratio: 1 / 1.414;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.lcard-media:hover {
  border-color: #c2cad6;
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(14,17,23,.14);
}
.lcard-media:focus-visible { outline: 2px solid var(--red); outline-offset: 3px }
.lcard-media img {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
}
.lcard-zoom {
  position: absolute; right: 10px; bottom: 10px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3,16,47,.8); color: #fff; border-radius: 2px;
  opacity: 0; transition: opacity .18s;
}
.lcard-media:hover .lcard-zoom { opacity: 1 }

.lcard-company {
  display: block; font-weight: 700; font-size: 15.5px;
  color: var(--ink); line-height: 1.35;
}
.lcard-text {
  display: block; margin-top: 6px;
  font-size: 14px; line-height: 1.5; color: var(--steel);
}
.lcard-year {
  display: block; margin-top: 8px;
  font: 700 11px/1 var(--mono); letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted, #6b7280);
}

@media (max-width: 720px) {
  .letters { padding: 44px 0 }
  .lgrid { grid-template-columns: 1fr; gap: 22px }
}
