/* Вариант 3 (второй круг) - «Деловая визитка: две панели».
   Слева закреплённая тёмно-синяя панель-визитка, справа белые листы на бумажном фоне.
   Шрифт один - Manrope (fonts.css). Номера - tabular-nums. До 1024 px панель - обычный верхний блок. */

:root {
  --navy: #152b3a;
  --navy-2: #1d3a4f;
  --navy-3: #284a62;
  --gold: #d2b27a;
  --gold-ink: #85662d;
  --paper: #f2f0eb;
  --sheet: #ffffff;
  --line: #dcd7cd;
  --line-soft: #e9e5dd;
  --ink: #17232e;
  --muted: #56616c;
  --on-navy: #ffffff;
  --on-navy-muted: #bcc7d1;
  --radius: 3px;
  --panel-w: clamp(390px, 39vw, 640px);
  --sheet-pad: clamp(28px, 4vw, 60px);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 18px;
  height: 18px;
  flex: none;
}

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

.panel :focus-visible {
  outline-color: var(--gold);
}

/* ---------- Каркас: две панели ---------- */

.shell {
  display: grid;
  grid-template-columns: var(--panel-w) minmax(0, 1fr);
  align-items: start;
  min-height: 100vh;
}

/* ---------- Левая панель - визитка ---------- */

.panel {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--navy-3) transparent;
  background: var(--navy);
  color: var(--on-navy);
  padding: clamp(28px, 4.4vh, 44px) clamp(32px, 3.2vw, 52px) clamp(22px, 3.2vh, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "brand brand"
    "hero  hero"
    "toc   toc"
    "lang  lang";
}

.brand {
  grid-area: brand;
  display: inline-flex;
  flex-direction: column;
  justify-self: start;
  text-decoration: none;
  line-height: 1.05;
}

.brand-name {
  font-size: clamp(36px, 3.1vw, 48px);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--on-navy);
}

.brand-line {
  margin-top: 0.32em;
  font-size: clamp(18px, 1.55vw, 24px);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--gold);
}

.hero-copy { grid-area: hero; }

.eyebrow {
  margin-top: 12px;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--on-navy-muted);
}

.rule {
  display: block;
  height: 1px;
  background: var(--gold);
  margin: clamp(20px, 3.4vh, 32px) 0;
}

.hero-title {
  font-size: clamp(28px, 2.3vw, 36px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.005em;
  max-width: 17em;
}

.hero-text {
  margin-top: 14px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--on-navy-muted);
  max-width: 34em;
}

.hero-actions {
  margin-top: clamp(20px, 3vh, 28px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  max-width: 340px;
}

.hero-actions .btn { justify-content: flex-start; text-align: left; }
.hero-actions .btn-gold .ico { margin-left: auto; }

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}

.btn-gold:hover { background: #dfc493; }

.btn-line {
  border-color: rgba(255, 255, 255, .5);
  color: var(--on-navy);
}

.btn-line:hover { border-color: var(--gold); color: var(--gold); }

.btn-navy {
  background: var(--navy);
  color: #fff;
  min-height: 54px;
  padding: 14px 26px;
}

.btn-navy:hover { background: var(--navy-3); }

/* Оглавление */

.toc {
  grid-area: toc;
  align-self: end;
  margin-top: clamp(24px, 4vh, 40px);
}

.toc-list {
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.toc-list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--on-navy);
  transition: color .15s;
}

.toc-list a:hover { color: var(--gold); }

.toc-no {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold);
}

/* Переключатель языка */

.lang {
  grid-area: lang;
  display: flex;
  gap: 4px;
  margin-top: 14px;
}

.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--on-navy-muted);
}

.lang a:hover { color: var(--on-navy); border-color: rgba(255, 255, 255, .3); }

.lang a.is-active {
  color: var(--navy);
  background: var(--gold);
}

.nav-toggle { display: none; }

/* Низкое окно на компьютере: ужать визитку, чтобы всё влезло в высоту */
@media (min-width: 1024px) and (max-height: 860px) {
  .brand-name { font-size: clamp(32px, 2.7vw, 42px); }
  .brand-line { font-size: clamp(17px, 1.4vw, 21px); }
  .eyebrow { margin-top: 8px; font-size: 14px; }
  .hero-title { font-size: clamp(26px, 2vw, 31px); }
  .hero-text { font-size: 15.5px; line-height: 1.55; margin-top: 10px; }
  .btn { min-height: 44px; padding: 9px 16px; font-size: 15px; }
  .toc-list a { padding: 5px 0; font-size: 14.5px; }
  .lang { margin-top: 10px; }
}

@media (min-width: 1024px) and (max-height: 720px) {
  .hero-text { display: none; }
}

/* ---------- Правая часть - листы на бумаге ---------- */

.desk {
  padding: clamp(16px, 2vw, 32px);
  min-width: 0;
}

main,
.foot {
  max-width: 1120px;
  margin-inline: auto;
}

.sheet {
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sheet-pad);
  scroll-margin-top: 16px;
}

.sheet + .sheet { margin-top: 14px; }

.sheet-no {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-ink);
}

.sheet-no::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.sheet-title {
  font-size: clamp(25px, 2.1vw, 32px);
  line-height: 1.2;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.005em;
  margin-bottom: clamp(22px, 2.6vw, 34px);
  max-width: 24em;
}

.sheet-note {
  margin-top: 26px;
  padding: 14px 18px;
  border-left: 2px solid var(--gold);
  background: var(--paper);
  font-size: 16px;
  color: var(--muted);
}

/* Первый лист: фото и пункты */

.sheet-hero {
  padding: clamp(12px, 1.4vw, 18px);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 55%;
  border-radius: 2px;
}

.points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(12px, 1.4vw, 18px);
}

.points li {
  position: relative;
  padding: 14px 18px 12px 30px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
}

.points li + li { border-left: 1px solid var(--line); }

.points li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 22px;
  width: 7px;
  height: 7px;
  background: var(--gold);
}

/* О проекте */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 48px);
}

.about-copy p + p { margin-top: 14px; }

.lead {
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.45;
  font-weight: 600;
  color: var(--navy);
}

.about-copy p:not(.lead) { color: var(--muted); }

.agency {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius);
  font-size: 16px;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.link:hover { color: var(--gold-ink); }

.link .ico { width: 15px; height: 15px; }

.small-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.about-media { margin-top: clamp(26px, 3vw, 40px); }

.about-media img {
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
  border-radius: 2px;
}

/* Узкая правая колонка (компьютер 1024-1279): блок агентства под текстом */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Направления - список строк с миниатюрами */

.dir-list { border-top: 1px solid var(--line); }

.dir-row {
  display: grid;
  grid-template-columns: 104px 28px minmax(0, 1fr);
  align-items: center;
  gap: 0 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.dir-thumb {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 2px;
}

.dir-num {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-ink);
}

.dir-title {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.3;
  font-weight: 600;
  color: var(--navy);
}

/* Кому корисні - две таблицы */

.aud-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

/* Две таблицы одной высоты: шапки и списки выровнены по общим строкам сетки */
.aud-table {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  row-gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.aud-list {
  display: flex;
  flex-direction: column;
}

.aud-list li { flex: 1 1 auto; }

.aud-head {
  background: var(--navy);
  color: #fff;
  padding: 14px 20px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  border-bottom: 2px solid var(--gold);
}

.aud-list { counter-reset: aud; }

.aud-list li {
  counter-increment: aud;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  padding: 13px 20px;
  font-size: 16px;
  line-height: 1.45;
}

.aud-list li + li { border-top: 1px solid var(--line-soft); }

.aud-list li:nth-child(even) { background: #faf9f6; }

.aud-list li::before {
  content: counter(aud, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold-ink);
  padding-top: 2px;
}

/* Шаги - вертикальная линия с точками */

.timeline {
  position: relative;
  padding-left: 44px;
  max-width: 720px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(var(--gold), var(--line));
}

.tl-step { position: relative; }

.tl-step + .tl-step { margin-top: 30px; }

.tl-dot {
  position: absolute;
  left: -44px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sheet);
  border: 2px solid var(--navy);
  box-shadow: inset 0 0 0 3px var(--sheet), inset 0 0 0 9px var(--gold);
}

.tl-num {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-ink);
  line-height: 24px;
}

.tl-title {
  margin-top: 2px;
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.3;
  font-weight: 700;
  color: var(--navy);
}

.tl-step p {
  margin-top: 6px;
  color: var(--muted);
}

/* Основатель - визитная карточка */

.vcard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 26vw, 320px);
  align-items: stretch;
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px -18px rgba(21, 43, 58, .45);
  overflow: hidden;
}

.vcard-copy {
  padding: clamp(24px, 3vw, 40px);
}

.vcard-name {
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.2;
  font-weight: 700;
  color: var(--navy);
}

.vcard-role {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold-ink);
}

.vcard .rule {
  width: 64px;
  margin: 18px 0 18px;
  height: 2px;
}

.vcard-copy p:not(.vcard-name):not(.vcard-role) + p { margin-top: 10px; }

.vcard-copy > p:not(.vcard-name):not(.vcard-role):not(.vcard-link) { color: var(--muted); }

.vcard-link {
  margin-top: 16px;
  font-size: 16px;
}

.vcard-link .link { margin-top: 0; }

.vcard-photo { min-height: 100%; }

.vcard-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 60% 30%;
}

/* Контакты - форма в две колонки */

.sheet-title-tight { margin-bottom: 12px; }

.contact-text {
  margin-bottom: 28px;
  color: var(--muted);
  max-width: 40em;
}

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.field-wide { grid-column: 1 / -1; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}

.req {
  margin-left: 3px;
  color: var(--gold-ink);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #c3bdb1;
  border-radius: var(--radius);
  background: #fdfcfa;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

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

.field input::placeholder,
.field textarea::placeholder { color: #6a737e; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(210, 178, 122, .55);
  background: #fff;
}

.field .is-invalid {
  border-color: #b3261e;
  box-shadow: 0 0 0 1px #b3261e;
}

.form-error {
  color: #b3261e;
  font-weight: 600;
  font-size: 15.5px;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.direct {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 15px;
  color: var(--muted);
}

.direct-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.direct-link .ico { color: #1f8a4c; }

.direct-link:hover { color: var(--gold-ink); }

/* Подвал */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px 24px;
  margin-top: 14px;
  padding: 26px var(--sheet-pad);
  background: var(--navy);
  color: var(--on-navy-muted);
  border-radius: var(--radius);
  font-size: 14.5px;
}

.foot-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.foot-brand .brand-name { font-size: 22px; }
.foot-brand .brand-line { font-size: 14px; margin-top: 4px; }
.foot-tagline { margin-top: 8px; font-size: 14px; }

.foot-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* ---------- Планшет и телефон: панель - верхний блок ---------- */

@media (max-width: 1023.98px) {
  .shell {
    display: block;
  }

  .panel {
    position: relative;
    height: auto;
    overflow: visible;
    padding: 20px clamp(16px, 4vw, 40px) clamp(28px, 5vw, 44px);
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "brand lang toggle"
      "hero  hero hero";
    column-gap: 8px;
    align-items: center;
  }

  .brand-name { font-size: clamp(26px, 5.4vw, 38px); }
  .brand-line { font-size: clamp(14px, 3vw, 20px); }

  .lang { margin-top: 0; }

  .nav-toggle {
    grid-area: toggle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: var(--radius);
    background: transparent;
    color: #fff;
    cursor: pointer;
  }

  .nav-toggle .ico { width: 24px; height: 24px; }

  .nav-toggle[aria-expanded="true"] {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
  }

  .hero-copy { margin-top: 0; }
  .eyebrow { margin-top: 10px; }
  .hero-actions { max-width: 420px; }

  .hero-title { font-size: clamp(28px, 5.4vw, 40px); max-width: 20em; }
  .hero-text { font-size: 17px; }

  .toc {
    display: none;
    position: absolute;
    z-index: 20;
    top: 74px;
    left: clamp(12px, 3vw, 32px);
    right: clamp(12px, 3vw, 32px);
    margin: 0;
    padding: 8px 20px 12px;
    background: var(--navy-2);
    border: 1px solid var(--navy-3);
    border-top: 2px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: 0 24px 40px -16px rgba(0, 0, 0, .55);
  }

  .toc.is-open { display: block; }

  .toc-list { border-top: 0; }

  .toc-list a {
    padding: 12px 0;
    font-size: 17px;
    min-height: 48px;
    align-items: center;
  }

  .toc-list li:last-child a { border-bottom: 0; }

  .desk { padding: clamp(10px, 2.4vw, 24px); }

  main,
  .foot { max-width: none; }
}

@media (max-width: 720px) {
  .about-grid,
  .aud-grid { grid-template-columns: minmax(0, 1fr); }

  .points { grid-template-columns: minmax(0, 1fr); }

  .points li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .vcard {
    grid-template-columns: minmax(0, 1fr);
  }

  .vcard-photo { order: -1; }

  .vcard-photo img {
    aspect-ratio: 4 / 3;
    height: auto;
    object-position: 60% 35%;
  }

  .form { grid-template-columns: minmax(0, 1fr); }

  .foot { flex-direction: column; align-items: flex-start; }
  .foot-meta { align-items: flex-start; }
}

@media (max-width: 560px) {
  :root { --sheet-pad: 20px; }

  body { font-size: 16.5px; }

  .hero-actions { flex-direction: column; }

  .hero-actions .btn,
  .btn-navy {
    width: 100%;
    min-height: 54px;
    font-size: 16px;
  }

  .dir-row {
    grid-template-columns: 80px minmax(0, 1fr);
    grid-template-areas:
      "thumb num"
      "thumb title";
    align-items: start;
    gap: 2px 16px;
  }

  .dir-thumb { grid-area: thumb; width: 80px; height: 80px; }
  .dir-num { grid-area: num; font-size: 13px; padding-top: 4px; }
  .dir-title { grid-area: title; font-size: 17px; }

  .aud-head { padding: 13px 16px; }
  .aud-list li { padding: 12px 16px; font-size: 16px; }

  .timeline { padding-left: 38px; }
  .tl-dot { left: -38px; }

  .form-foot { flex-direction: column; align-items: stretch; }

  .small-note { font-size: 15px; }

  .lang a { min-width: 38px; padding: 4px 6px; }
}

@media (max-width: 400px) {
  .panel { column-gap: 6px; padding-left: 14px; padding-right: 14px; }
  .lang { gap: 2px; }
  .lang a { min-width: 34px; padding: 4px 4px; font-size: 13px; letter-spacing: 0.04em; }
  .nav-toggle { width: 44px; height: 44px; }
}
