/* ===================== SHARED UI — layout, heroes, promos, forms ===================== */
/* Подключается после style.css на всех страницах через site_shell */

/* --- Layout widths --- */
.container--form { max-width: 520px; }
.container--form-md { max-width: 560px; }
.container--calc { max-width: 720px; }
.container--prose { max-width: 760px; }
.lead-form-centered {
  max-width: 520px;
  margin-inline: auto;
}

/* --- Unified hero typography (funnel / content / academy) --- */
.funnel-hero h1,
.content-hero h1,
.academy-hero h1,
.academy-hub-hero h1 {
  font-family: 'Oswald', Inter, sans-serif;
  font-size: var(--hero-h1-size);
  font-weight: 700;
  line-height: var(--hero-h1-lh);
  letter-spacing: -0.02em;
}

.funnel-hero__lead,
.content-hero__lead,
.academy-hero__lead,
.academy-hub-hero .content-hero__lead {
  font-size: var(--hero-lead-size);
  line-height: var(--hero-lead-lh);
}

.funnel-section__title,
.content-main h2.academy-hub-section-title {
  font-family: 'Oswald', Inter, sans-serif;
  font-size: var(--hero-h2-size);
  line-height: var(--hero-h1-lh);
}

/* --- Hub / promo blocks --- */
.hub-promo,
.academy-hub-promo {
  margin-top: 24px;
  padding: 20px 22px;
  border: 1px solid rgba(74, 158, 255, 0.25);
  border-radius: var(--radius);
  background: var(--eng-blue-dim);
}

.hub-promo__tag,
.academy-hub-promo__tag {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eng-blue);
}

.hub-promo h2,
.academy-hub-promo h2 {
  margin: 0 0 8px;
  font-family: 'Oswald', Inter, sans-serif;
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.hub-promo p,
.academy-hub-promo p {
  margin: 0 0 16px;
  font-size: var(--fs-base);
  color: var(--muted);
  line-height: var(--lh-base);
}

.hub-promo p:last-child,
.academy-hub-promo p:last-child {
  margin-bottom: 0;
}

.hub-card--accent {
  border-color: rgba(74, 158, 255, 0.35);
}

.hub-card--warm {
  border-color: rgba(255, 180, 80, 0.4);
}

/* --- Funnel helpers --- */
.funnel-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--funnel-muted, var(--muted));
  line-height: 1.5;
}

.funnel-note--tight {
  margin-top: 12px;
}

.funnel-crosslink {
  margin-top: 12px;
  font-size: 14px;
}

.funnel-crosslink a {
  color: var(--accent-2);
  font-weight: 600;
}

.funnel-muted-block {
  color: var(--funnel-muted, var(--muted));
  margin: 0 0 16px;
  line-height: 1.6;
  max-width: 640px;
}

.funnel-muted-block--flush {
  margin-top: 0;
}


.funnel-actions {
  margin-top: 20px;
}

.funnel-textarea {
  padding: 14px;
  border: 1px solid var(--funnel-border, var(--line));
  border-radius: 10px;
  font-family: inherit;
  width: 100%;
  background: var(--bg);
  color: var(--text);
}

/* --- Spacing utilities (generators) --- */
.u-mt-12 { margin-top: 12px; }
.u-mt-16 { margin-top: 16px; }
.u-mt-20 { margin-top: 20px; }
.u-mt-24 { margin-top: 24px; }
.u-ml-12 { margin-left: 12px; }

/* --- Service / project patterns --- */
.service-calc--wide { max-width: 720px; }
.service-calc--full { max-width: 760px; }

.project-includes--decimal {
  list-style: decimal;
  padding-left: 24px;
  line-height: 1.8;
}

.format-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.format-grid--auto {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.project-hero__badge--spaced {
  margin: 4px;
}

.project-hero__actions--spaced {
  margin-top: 20px;
}

.project-hero__stats--start {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
}

.technologist__card--wide {
  max-width: 880px;
}

.flow-diagram-wrap--spaced {
  margin-top: 24px;
}

.service-quote--center {
  border: none;
  text-align: center;
  max-width: 720px;
  margin: 0 auto 24px;
}

.lead-form__title {
  margin: 0 0 16px;
  text-align: center;
}

/* --- Academy sticky audit (article) --- */
.academy-sticky-audit {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 91;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--sticky-bg);
  border-top: 1px solid var(--sticky-border);
  backdrop-filter: blur(12px);
}

.academy-sticky-audit:not([hidden]) {
  display: block;
}

.academy-sticky-audit__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.academy-sticky-audit__text {
  margin: 0;
  font-size: 14px;
}

/* --- Catalog engineering layer --- */
.catalog-engineering-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--eng-blue);
  background: var(--eng-blue-dim);
  border: 1px solid rgba(74, 158, 255, 0.22);
}

.catalog-product-card__engineer {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.catalog-product-card__price-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

/* --- Conversion bar coordination --- */
body.has-conversion-bar .sticky-cta {
  display: none !important;
}

body.has-conversion-bar .floats {
  display: none;
}

body.has-conversion-bar.has-sticky {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

@media (max-width: 1024px) {
  .format-grid--3 {
    grid-template-columns: 1fr;
  }
}
