/*
 * Более крупная типографика интерфейса.
 * Значения разбиты по уровням, чтобы мелкие подписи стали читаемее,
 * не нарушая иерархию крупных заголовков и размеры карточек.
 */

/* Шапка и мобильная навигация. */
.site-header .menu a {
  font-size: 14px;
}

[data-slot="sheet-content"] nav a {
  font-size: 16px;
}

/* Первый экран: служебная строка, описание, CTA и нижние характеристики. */
.hero-badge,
.section-kicker {
  font-size: 10.7px;
  line-height: 1.25;
}

.hero-p {
  font-size: clamp(14px, 1.3vw, 16.5px);
  line-height: 1.58;
}

.social-action-label {
  font-size: 14.5px;
  line-height: 1.3;
}

.hero-btns .hero-btn-link {
  min-height: 48px;
  padding: 11px 19px;
  font-size: 16px;
}

.feat-txt {
  font-size: 11.7px;
}

/* Center the complete hero within the viewport area below the fixed header. */
@media (min-width: 769px) {
  .hero-premium-center {
    box-sizing: border-box;
    min-height: calc(100vh - 64px);
    min-height: calc(100svh - 64px);
  }
}

/*
 * Hero refinement.
 * The display remains airy, while its weight, rhythm and pills now echo
 * the stronger visual language of the portfolio controls.
 */
/* Плашки хиро и аудита — одно и то же оформление, поэтому один и тот же
   селектор на оба контекста сразу (см. также блок ниже, где раньше
   section#contacts .hero-badge жила отдельно со слегка другими числами).
   margin-bottom здесь совпадает с h1/h2 и абзацем ниже (28px везде на ПК —
   один и тот же промежуток бейдж→заголовок→абзац→кнопки). */
.hero-premium-center .hero-badge,
section#contacts .hero-badge {
  margin-bottom: 28px;
  padding: 9px 17px;
  color: rgba(255, 255, 255, 0.68);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.025)
  );
  border-color: rgba(255, 255, 255, 0.14);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.16em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.18);
}

.hero-premium-center .hero-h1 {
  margin-bottom: 28px; /* тот же промежуток, что у бейджа выше и абзаца ниже */
  line-height: 1.045;
  letter-spacing: -0.025em;
}

.hero-premium-center .hero-text-container {
  margin-bottom: 0.1em;
}

.hero-premium-center .hero-glow {
  font-weight: 580;
  letter-spacing: -0.035em;
}

.hero-premium-center .hero-second-line {
  margin-top: 0.16em;
  color: rgba(255, 255, 255, 0.94);
  font-style: normal !important;
  font-weight: 350 !important;
  letter-spacing: -0.025em;
}

/* Тот же шрифтовой стиль, что у текста в "Подход к работе"
   (#principles .space-y-4 p) — только size/weight/line-height/letter-spacing
   различались, остальное уже совпадало. Шрифт и отступ снизу — общие с
   абзацем аудита (section#contacts p, см. ниже), чтобы оба поля всегда
   совпадали на ПК; правь один раз тут. */
.hero-premium-center .hero-p {
  max-width: 700px;
  color: #bdbdbd;
  font-weight: 400;
  letter-spacing: -0.018em;
}


.hero-premium-center .hero-btns {
  gap: 18px !important;
  margin-bottom: 0;
}

.hero-premium-center .section-sep {
  display: none;
}

.hero-premium-center .hero-features {
  display: none !important;
  margin: 0;
  padding: 0;
}

.hero-premium-center .feat-item {
  display: block;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-premium-center .feat-txt {
  display: block;
  height: auto;
  padding: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 10.7px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  transform: none;
}

@media (min-width: 769px) {
  .hero-premium-center .hero-h1 {
    font-size: clamp(34px, 4.35vw, 46px);
  }
}

/* Служебные подписи портфолио/принципов ("ПРИМЕРЫ", "ПРИНЦИПЫ") — плашка
   аудита теперь стилизуется вместе с плашкой хиро выше, не здесь. */
.section-kicker {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.18em;
}

/* Заголовок портфолио и его подпись. */
#portfolio h2 {
  font-size: clamp(32px, 2.75vw, 38px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

/* Все категории роликов и все кнопки «Разбор».
   ВНИМАНИЕ: max-width и padding-inline для этой же плашки заданы ещё и в
   portfolio/video-pill-fit.css. Там значения другие (calc(100% - 130px),
   11px), но выигрывает этот файл — он подключён позже при равной
   специфичности. Правишь размеры плашки — правь здесь, иначе будет
   казаться, что изменения не применились.

   Числа подобраны под номер ролика (#536), который занимает внутри плашки
   ~30px: 137→133 отдаёт плашке 4px из отступа до кнопки «РАЗБОР» (у самых
   длинных названий между ними остаётся ~8px), padding 12→8 даёт ещё 8px.
   Вместе с gap 6→4 в video-pill-fit.css это +16px — ровно столько, чтобы ни
   одно название не обрезалось. Шрифт не трогали намеренно.
   Замерено: 0 обрезанных из 144 на 1280px и на 390px. */
.short-kinescope-frame .video-details-tag {
  min-height: 32px;
  max-width: calc(100% - 133px);
  padding-inline: 8px;
  font-size: 9.2px;
}

.short-kinescope-frame .video-details-tag.is-long {
  font-size: 8.15px;
}

.short-kinescope-frame .video-details-tag.is-extra-long {
  padding-inline: 9px;
  font-size: 7.15px;
  letter-spacing: 0.01em;
}

.short-kinescope-frame .video-details-button {
  min-height: 32px;
  max-width: 146px;
  padding: 6px 7px 6px 12px;
  font-size: 9.2px;
}

.short-kinescope-frame .video-details-button-icon {
  flex-basis: 20px;
  width: 20px;
  height: 20px;
  font-size: 15px;
}

/* Раскрытые разборы: заголовок, группы и пункты во всех карточках. */
.short-kinescope-frame .video-details-panel.has-groups .video-details-head h3,
.short-kinescope-frame.video-details-horizontal
  .video-details-panel.has-groups
  .video-details-head
  h3 {
  font-size: 17.5px;
  line-height: 1.18;
}

.short-kinescope-frame .video-details-section h4,
.short-kinescope-frame.video-details-horizontal .video-details-section h4 {
  font-size: 13px;
  line-height: 1.16;
}

.short-kinescope-frame .video-details-panel.has-groups .video-details-section li,
.short-kinescope-frame.video-details-horizontal
  .video-details-panel.has-groups
  .video-details-section
  li {
  font-size: 10.2px !important;
  line-height: 1.36;
}

.short-kinescope-frame
  .video-details-panel.has-groups
  .video-details-section
  li
  > span:last-child {
  line-height: 1.46;
}

/* Аудит контента. Общие с абзацем хиро (.hero-premium-center .hero-p выше)
   размер шрифта и отступ снизу до иконок — единственное место, где их
   меняешь для обоих сразу. Те же 28px, что у бейджа/заголовка выше — весь
   вертикальный ритм хиро и аудита на ПК теперь одним числом. */
.hero-premium-center .hero-p,
section#contacts p,
section#about .about-intro {
  margin-bottom: 28px;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.55;
}

section#contacts p,
section#about .about-intro {
  color: #bdbdbd;
  font-weight: 400;
  letter-spacing: -0.018em;
}

/* Принципы работы и «Обо мне» — одна и та же типографика секции.
   Правила привязаны к id, поэтому новая секция НЕ наследует их сама:
   добавляя раздел, его id нужно вписать сюда, иначе заголовок останется
   в размере хиро. Именно это и произошло с #about при первой сборке. */
#principles h2.hero-h1,
#about h2.hero-h1 {
  font-size: clamp(32px, 2.75vw, 38px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

#principles .text-center.mb-14,
#about .text-center.mb-14 {
  margin-bottom: 48px;
}

#principles .space-y-4 h3,
#about .space-y-4 h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

#principles .space-y-4 p,
#about .space-y-4 p {
  color: #bdbdbd;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.018em;
}

/* Футер. */
footer div > div:first-child p:first-child::after {
  font-size: 17px !important;
}

footer nav a,
footer .social-text-group a {
  font-size: 11px;
}

footer div > div:first-child p + p,
footer > p {
  font-size: 10.5px;
  line-height: 1.55;
}

@media (max-width: 640px) {
  /* margin-bottom здесь раньше дублировал(и расходился с) тем же
     селектором в более позднем блоке ниже (там же, где остальная
     мобильная раскладка хиро) — эта копия молча перебивалась им и была
     мёртвым весом. Отступы теперь настраиваются только в том блоке. */
  .hero-premium-center .hero-badge,
  section#contacts .hero-badge {
    padding: 8px 13px;
    font-size: 9.6px;
    letter-spacing: 0.12em;
  }

  .hero-premium-center .hero-h1 {
    line-height: 1.08;
  }

  .hero-premium-center .hero-second-line {
    font-weight: 360 !important;
    letter-spacing: -0.018em;
  }

  .hero-premium-center .hero-p {
    font-size: 13px;
    line-height: 1.55;
  }

  .hero-premium-center .section-sep {
    width: min(300px, 90%);
  }

  .hero-premium-center .hero-features {
    flex-direction: row;
    gap: 22px;
    padding-top: 18px;
  }

  .hero-premium-center .feat-item {
    height: auto;
    min-height: 0;
    padding-inline: 0;
  }

  .hero-premium-center .feat-txt {
    height: auto;
    font-size: 9.4px;
  }

  .hero-badge,
  .section-kicker {
    font-size: 10px;
  }

  .hero-p {
    font-size: 13px;
    line-height: 1.58;
  }

  .social-action-label {
    font-size: 13px;
  }

  .hero-btns .hero-btn-link {
    min-height: 46px;
    padding: 10px 16px;
    font-size: 14.5px;
  }

  .feat-txt {
    font-size: 10.5px;
  }

  #portfolio h2 {
    font-size: clamp(27px, 8vw, 31px);
  }

  .short-kinescope-frame .video-details-tag {
    /* Тот же размен, что и в десктопном правиле выше: 132→128. */
    max-width: calc(100% - 128px);
    font-size: 8.8px;
  }

  .short-kinescope-frame .video-details-tag.is-long {
    font-size: 7.75px;
  }

  .short-kinescope-frame .video-details-tag.is-extra-long {
    font-size: 6.8px;
  }

  .short-kinescope-frame .video-details-button {
    font-size: 8.8px;
  }

  .short-kinescope-frame .video-details-panel.has-groups .video-details-head h3,
  .short-kinescope-frame.video-details-horizontal
    .video-details-panel.has-groups
    .video-details-head
    h3 {
    font-size: 16px;
  }

  .short-kinescope-frame .video-details-section h4,
  .short-kinescope-frame.video-details-horizontal .video-details-section h4 {
    font-size: 11.8px;
  }

  .short-kinescope-frame .video-details-panel.has-groups .video-details-section li,
  .short-kinescope-frame.video-details-horizontal
    .video-details-panel.has-groups
    .video-details-section
    li {
    font-size: 9.55px !important;
    line-height: 1.34;
  }

  section#contacts p,
  section#about .about-intro {
    font-size: 13.5px;
    line-height: 1.62;
  }

  #principles h2.hero-h1,
  #about h2.hero-h1 {
    font-size: clamp(29px, 9vw, 34px);
  }

  #principles .text-center.mb-14,
  #about .text-center.mb-14 {
    margin-bottom: 40px;
  }

  #principles .space-y-4 h3,
  #about .space-y-4 h3 {
    font-size: 15.5px;
  }

  #principles .space-y-4 p,
  #about .space-y-4 p {
    font-size: 13px;
    line-height: 1.52;
  }

  footer nav a,
  footer .social-text-group a {
    font-size: 10.5px;
  }

  footer div > div:first-child p + p,
  footer > p {
    font-size: 10px;
  }
}

/*
 * Mobile first viewport fit.
 * Browser chrome can remove 150-250 px from the visible phone viewport, so
 * Keep the complete hero inside the small mobile viewport (with browser bars
 * visible), centre its contents, and start the portfolio below the first fold.
 */
@media (max-width: 640px) {
  .hero-premium-center {
    box-sizing: border-box;
    min-height: calc(100vh - 60px);
    min-height: calc(100svh - 60px);
    margin-bottom: 0;
    padding: clamp(24px, 4svh, 38px) 16px;
    align-items: center;
  }

  .hero-premium-center .hero-center-wrapper {
    max-width: 100%;
    transform: translateY(clamp(-56px, -7svh, -32px));
  }

  /* Отступ между бейджем, заголовком и кнопками ниже — одно и то же число
     (сейчас 18px) во всех трёх местах, чтобы промежутки были одинаковыми
     сверху вниз. Меняй все три вместе. */
  .hero-premium-center .hero-badge,
  section#contacts .hero-badge {
    width: max-content;
    min-width: 0;
    max-width: calc(100% - 32px);
    margin-bottom: 18px;
    padding: 7px 12px;
    font-size: 9px;
    line-height: 1.25;
    justify-content: center;
    gap: 8px;
  }

  /* На мобильном показываем только "ВИДЕОМОНТАЖ" — уточнение со списком
     программ (data-edit="hero-badge-tools") реально в разметке, просто
     скрыто здесь, а не подменено хардкодом (см. typography-boost.css note
     выше про уже один раз найденный и убранный ::after-хак). */
  .hero-premium-center .hero-badge-tools {
    display: none;
  }

  .hero-premium-center .hero-h1 {
    margin-bottom: 18px;
    font-size: clamp(22px, 6.45vw, 26px);
    line-height: 1.08;
  }

  .hero-premium-center .hero-text-container {
    margin-bottom: 0.05em;
  }

  .hero-premium-center .hero-second-line {
    margin-top: 0.1em;
  }

  /* Раньше здесь настоящий текст (data-edit="hero-paragraph") гасился в
     font-size:0 и подменялся зашитой в CSS короткой версией через ::after —
     из-за этого правки этого поля в site-editor.html не были видны на мобильном.
     Теперь размер/интерлиньяж просто применяются к настоящему тексту. */
  .hero-premium-center .hero-p {
    width: min(100%, 360px);
    margin-bottom: 23px;
    font-size: 13px;
    line-height: 1.52;
  }

  .hero-premium-center .hero-btns {
    gap: 18px !important;
    margin-bottom: 0;
  }

  .hero-premium-center .social-labeled-action--hero {
    order: 2;
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    justify-self: center;
    gap: var(--wakudo-label-icon-gap);
  }

  /* Только раскладка — цвет/размер/жирность больше не переопределяем
     (совпадает с .social-action-label--audit, как и просили). */
  .hero-premium-center .social-action-label--hero {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .hero-premium-center .social-labeled-action--hero .social-action-group {
    display: inline-flex;
    width: auto;
    flex: 0 0 auto;
    margin: 0 !important;
  }

  /* Аудит получает те же значения, что и хиро (плюс небольшое общее
     увеличение иконок по сайту — см. css/social-icons.css). */
  /* Селектор для аудита должен быть настолько же специфичным, что и
     "section#contacts .social-labeled-action--audit .social-icon-btn" в
     portfolio/video-pill-fit.css (у него 52px, без media-запроса — то есть
     формально действует и на мобильном тоже). Раньше здесь был более
     простой "section#contacts .social-icon-btn", который при равной
     специфичности с !important проигрывал тому правилу независимо от
     порядка файлов — из-за этого иконки аудита на мобильном оставались
     52px вместо 40px, хотя у хиро (тут же более специфичный селектор)
     всё было верно. */
  .hero-premium-center .hero-btns .social-icon-btn,
  section#contacts .social-labeled-action--audit .social-icon-btn {
    width: 40px !important;
    height: 40px !important;
  }

  .hero-premium-center .hero-btn-link {
    order: 1;
    width: max-content;
    max-width: min(100%, 270px);
    min-height: 46px;
    padding: 10px 16px;
    font-size: 13px !important;
  }
}

/* Extra compression only when browser toolbars leave a very short viewport. */
@media (max-width: 640px) and (max-height: 680px) {
  .hero-premium-center {
    min-height: calc(100vh - 60px);
    min-height: calc(100svh - 60px);
    margin-bottom: 0;
    padding: 20px 14px;
  }

  .hero-premium-center .hero-badge,
  section#contacts .hero-badge {
    margin-bottom: 12px;
    padding-block: 6px;
  }

  .hero-premium-center .hero-h1 {
    margin-bottom: 12px;
    font-size: clamp(21px, 6.1vw, 24.5px);
  }

  /* Заголовок аудита — тот же промежуток, что у бейджа/h1 хиро на этом же
     тире (см. также обычный мобильный размер в portfolio/video-pill-fit.css). */
  section#contacts h2 {
    margin-bottom: 12px;
  }

  .hero-premium-center .hero-btns {
    gap: 12px !important;
  }

  .hero-premium-center .social-labeled-action--hero {
    gap: var(--wakudo-label-icon-gap-compact);
  }

  .hero-premium-center .hero-btns .social-icon-btn,
  section#contacts .social-labeled-action--audit .social-icon-btn {
    width: 38px !important;
    height: 38px !important;
  }

  .hero-premium-center .hero-btn-link {
    min-height: 42px;
    padding: 8px 12px;
  }
}
