/* Главная buninlab.com — дизайн «Мастерская» (30.10.2026).
   База (цвета, шрифты, шапка, кнопки, форма заявки, подвал) — в /journal.css,
   здесь только блоки главной. Прежняя версия: /root/backup-buninlab-redesign-20261030/home/ */

.h-skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.h-skip:focus {
  top: 12px;
}

/* Шапка: на телефоне меню прячется под кнопку */
.h-menu-toggle {
  display: none;
}

.header-panel {
  display: flex;
}

@media (max-width: 768px) {
  .h-menu-toggle {
    position: relative;
    display: inline-flex;
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--ink);
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
  }

  .h-menu-toggle span {
    position: absolute;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transform: translateX(-50%);
    transition: transform 180ms ease, top 180ms ease;
  }

  .h-menu-toggle span:first-child {
    top: 16px;
  }

  .h-menu-toggle span:last-child {
    top: 24px;
  }

  .site-header.is-menu-open .h-menu-toggle span:first-child {
    top: 20px;
    transform: translateX(-50%) rotate(45deg);
  }

  .site-header.is-menu-open .h-menu-toggle span:last-child {
    top: 20px;
    transform: translateX(-50%) rotate(-45deg);
  }

  .header-panel {
    display: none;
    flex-basis: 100%;
  }

  .site-header.is-menu-open .header-panel {
    display: block;
  }

  .header-panel .j-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px 0 12px;
    font-size: 17px;
  }

  .header-panel .j-nav > a:not(.j-btn) {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .header-panel .j-nav > a[href="#process"] {
    display: block;
  }

  .header-panel .j-btn {
    margin-top: 10px;
  }
}

/* Общие для секций */
.h-section {
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding-top: 96px;
  padding-bottom: 96px;
}

.h-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.h-head h2,
.h-title,
.h-founder h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.h-head p {
  margin: 0;
  max-width: 480px;
  color: var(--text-2);
}

.h-head > div:not(.h-note) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
}

.h-head > div p {
  max-width: none;
}

.h-band {
  background: var(--paper-2);
}

.h-band-line {
  border-top: 1px solid var(--line);
}

.h-num {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}

/* Первый экран */
.h-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  align-items: center;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 80px;
}

.h-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

@media (min-width: 1000px) {
  .h-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

.h-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 3.9vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

/* Выделение в заголовке — отдельным блоком в строке: у Unbounded высокие
   буквы, и строчная подложка наезжала на соседнюю строку (видно на iPhone). */
.h-hero h1 .j-mark {
  display: inline-block;
  white-space: normal;
  margin-top: 0.06em;
  padding: 0.02em 0.22em 0.06em;
  line-height: 1.08;
}

.h-lead {
  margin: 0;
  max-width: 560px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-2);
}

.h-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.h-btn-lg {
  min-height: 54px;
  padding: 15px 26px;
  font-size: 17px;
}

.h-btn-outline {
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.h-btn-outline:hover {
  background: var(--white);
}

.h-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.h-stats dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.03em;
}

.h-stats dd {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.h-hero-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  margin: 0;
}

.h-hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 660px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: var(--radius-lg);
  background: var(--paper-2);
}

.h-hero-visual figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* Полоса стека */
.h-stack {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.h-stack-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  padding-block: 18px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}

.h-stack-inner strong {
  color: var(--ink);
  font-weight: 600;
}

/* «Знакомо?» */
.h-pains {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 0 48px;
}

.h-pain {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding-block: 28px;
  border-top: 1.5px solid var(--ink);
}

.h-pain .h-num {
  padding-top: 4px;
}

.h-pain h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.h-pain p {
  margin: 0;
  font-size: 16px;
  color: var(--text-2);
}

/* Форматы работы */
.h-note {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 440px;
  padding: 16px 20px;
  border-radius: 18px;
  background: var(--paper);
  font-size: 15px;
  line-height: 1.4;
}

.h-note-icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
}

.h-formats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.h-format {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border-radius: 22px;
  background: var(--paper);
}

.h-format-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.h-format-icon {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--tint);
}

.h-format h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.h-format p {
  flex-grow: 1;
  margin: 0;
  font-size: 16px;
  color: var(--text-2);
}

.h-tag {
  align-self: flex-start;
  padding: 5px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
}

/* Кейсы */
.h-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 20px;
}

.h-case {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
}

.h-case-tag {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.h-big {
  align-self: flex-start;
  margin: 4px 0 0;
  padding: 4px 12px;
  border-radius: 12px;
  background: var(--tint);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.h-big-label {
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
}

.h-case h3 {
  margin: 8px 0 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}

.h-case-text {
  flex-grow: 1;
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
}

.h-case-stack {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid #E4E0D6;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.h-more-cases {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 0 32px;
}

.h-more-cases li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 18px;
  border-top: 1.5px solid var(--ink);
}

.h-more-cases span {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-2);
}

/* Что автоматизирую */
.h-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 0 40px;
}

.h-service {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block: 26px;
  border-top: 1px solid var(--line);
}

.h-service-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.h-service h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.h-service p {
  margin: 0;
  font-size: 16px;
  color: var(--text-2);
}

.h-chip {
  padding: 2px 8px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* Кто делает */
.h-founder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  align-items: center;
  gap: 56px;
}

.h-founder-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.h-founder-copy p:not(.j-eyebrow) {
  margin: 0;
  font-size: 18px;
  color: var(--text-2);
}

.h-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-weight: 600;
}

.h-founder-links {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.h-founder-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  text-decoration: none;
  transition: background-color 160ms ease;
}

.h-founder-link:hover {
  background: var(--white);
}

.h-founder-link strong {
  font-size: 18px;
}

.h-founder-link span {
  font-size: 15px;
  color: var(--text-2);
}

.h-founder-link strong span {
  font-size: inherit;
  color: inherit;
}

.h-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.h-tiles div {
  padding: 22px;
  border-radius: 18px;
  background: var(--paper);
}

.h-tiles dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.03em;
}

.h-tiles dd {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--muted);
}

/* Журнал на главной (строки вставляет сборщик журнала) */
.h-head-row {
  align-items: baseline;
}

.h-more-link {
  font-weight: 600;
}

.h-posts .j-row:first-of-type {
  border-top: 1.5px solid var(--ink);
}

.h-posts .j-row-main h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.h-posts .j-row:hover h3 {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* FAQ */
.h-faq {
  display: flex;
  flex-direction: column;
  max-width: 880px;
}

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  position: relative;
  display: block;
  padding: 22px 48px 22px 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-50%);
  transition: transform 200ms ease;
}

.faq-item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
  overflow: hidden;
  transition: height 240ms ease, opacity 240ms ease;
}

.faq-answer p {
  margin: 0;
  padding: 0 48px 22px 0;
  font-size: 17px;
  color: var(--text-2);
}

/* Финальный призыв */
.h-contact-wrap {
  padding-top: 24px;
  padding-bottom: 96px;
}

.h-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background: var(--accent);
}

.h-contact-copy {
  flex: 3 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.h-contact-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.h-contact-copy p {
  margin: 0;
  font-size: 18px;
}

.h-contact-card {
  flex: 1 1 340px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--paper);
}

.h-contact-card ul {
  margin: 0 0 8px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
}

/* Телефон */
@media (max-width: 720px) {
  .h-hero {
    padding-top: 32px;
    padding-bottom: 56px;
    gap: 36px;
  }

  .h-hero h1 {
    font-size: 30px;
    line-height: 1.12;
  }

  /* Как у сильных авторских лендингов: на телефоне сначала лицо, потом текст.
     Фото во всю ширину, низ растворяется в фоне, текст заходит на него снизу. */
  .h-hero {
    padding-top: 0;
    gap: 0;
  }

  .h-hero-visual {
    order: -1;
    margin-inline: -16px;
  }

  /* Первый экран телефона: фото, заголовок, короткий подзаголовок и кнопка */
  .h-hero-eyebrow,
  .h-lead-more {
    display: none;
  }

  .h-hero-visual img {
    height: min(47vh, 410px);
    max-height: none;
    aspect-ratio: auto;
    object-position: 50% 12%;
    border-radius: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
    mask-image: linear-gradient(to bottom, #000 62%, transparent 96%);
  }

  .h-hero-visual figcaption {
    display: none;
  }

  .h-hero-copy {
    position: relative;
    z-index: 1;
    margin-top: -20px;
    gap: 18px;
  }

  .h-head h2,
  .h-title,
  .h-founder h2,
  .h-contact-copy h2 {
    hyphens: auto;
  }

  .h-stats dt {
    font-size: 20px;
  }

  .h-lead {
    font-size: 17px;
  }

  .h-actions .j-btn {
    width: 100%;
  }

  .h-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .h-stats dd {
    font-size: 13px;
  }

  .h-section {
    gap: 32px;
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .h-pain {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .h-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .faq-item summary {
    font-size: 17px;
  }

  .h-contact-wrap {
    padding-bottom: 64px;
  }
}

/* Ссылка «Читать кейс» в карточке результата */
.h-case-link {
  align-self: flex-start;
  margin-top: 4px;
  font-weight: 700;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--ink);
}

.h-case-link:hover {
  border-bottom-color: var(--accent);
}
