/* Page sections and reusable content blocks (DESIGN_SYSTEM 4.5, 4.12–4.16, 6–8). Tokens only. Mobile-first. */

/* ---------- Section heads ---------- */
.section__head { max-width: 46rem; }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-2) var(--s-6); }
.section__head--row > div { max-width: 46rem; }
.section__foot { margin-top: var(--s-6); }
.section + .section,
.hero + .section { padding-top: 0; }

/* ---------- Hero (6.1 / 6.2) ---------- */
.hero { padding-block: var(--s-8) var(--s-16); }
.hero__grid { display: grid; gap: var(--s-10); }
.hero__text > * + * { margin-top: var(--s-5); }
.hero__text .lead { max-width: 52ch; }
.hero__actions { display: grid; gap: var(--s-2); justify-items: start; }
.hero__actions .btn { width: 100%; }
.hero__form { width: 100%; max-width: 40rem; margin-inline: auto; }
@media (min-width: 480px) { .hero__actions .btn { width: auto; } }
@media (min-width: 1024px) {
  .hero { padding-block: var(--s-16) var(--s-24); }
  .hero__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--grid-gap); align-items: start; }
  .hero__text { grid-column: 1 / 8; padding-right: var(--s-8); }
  .hero__form { grid-column: 8 / 13; max-width: none; }
  .hero__cta { display: none; }
}

/* ---------- Trust strip, hero version (4.12): icon 20 + title, no card ---------- */
.trust-chips { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); padding: 0; list-style: none; }
.trust-chips li { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-small); font-weight: 600; color: var(--c-text); }
.trust-chips .icon { width: 20px; height: 20px; color: var(--c-secondary); }
@media (min-width: 1024px) {
  .trust-chips { flex-direction: column; gap: var(--s-3); }
  .trust-chips li { font-size: var(--fs-body); }
}

/* ---------- Grids ---------- */
.cards { display: grid; gap: var(--grid-gap); padding: 0; list-style: none; }
.cards > li { display: flex; }
.cards > li > * { flex: 1; }
@media (min-width: 480px) { .cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) {
  .cards--3, .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Card internals */
.card__more { display: inline-flex; align-items: center; gap: var(--s-1); }
.card__more .icon { width: 20px; height: 20px; }
a.card.card--row, .card--row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.card--row .card__title { margin: 0; }
.card--row > div > * + * { margin-top: var(--s-2); }
.card--row > .icon { flex: none; color: var(--c-primary); }

/* Tag pill (4.14) */
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 var(--s-3);
  border-radius: var(--r-pill);
  background: var(--c-secondary-soft);
  color: var(--c-secondary);
  font-size: var(--fs-small);
  font-weight: 600;
}

/* ---------- Process steps (4.13) ---------- */
.steps { position: relative; display: grid; gap: var(--s-6); padding: 0; list-style: none; counter-reset: none; }
.step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-1) var(--s-4); }
.step__badge {
  grid-row: span 2;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}
.step__title { font-size: var(--fs-h3); }
.step__text { color: var(--c-muted); }
/* mobile connector: vertical line between badges */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: calc(-1 * var(--s-6));
  width: 2px;
  background: var(--c-border);
}
@media (min-width: 1024px) {
  .steps-card { padding: var(--s-8); }
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-6); }
  .step { grid-template-columns: 1fr; gap: var(--s-3); align-content: start; }
  .step__badge { grid-row: auto; }
  .step:not(:last-child)::before {
    left: 48px;
    right: calc(-1 * var(--s-6));
    top: 19px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
  .step__title { font-size: var(--fs-body); font-weight: 700; }
  .step__text { font-size: var(--fs-small); }
}

/* ---------- Trust cards (trust block) ---------- */
.trust-card .icon-tile--secondary svg { width: 22px; height: 22px; }

/* ---------- «Що ми не робимо» (reading surface, 2×2 on desktop) ---------- */
.not-list { margin-top: var(--grid-gap); padding: var(--card-pad); }
.not-list h3 { font-size: var(--fs-body); font-weight: 700; margin-bottom: var(--s-3); }
.not-list ul { display: grid; gap: var(--s-3); padding: 0; list-style: none; }
.not-list li { display: flex; gap: var(--s-3); align-items: flex-start; }
.not-list li .icon { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--c-muted); }
@media (min-width: 768px) { .not-list ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3) var(--s-8); } }

/* ---------- Banner / final CTA ---------- */
.banner { display: grid; gap: var(--s-5); justify-items: start; }
.banner > div > * + * { margin-top: var(--s-2); }
.banner .btn { width: 100%; }
@media (min-width: 480px) { .banner .btn { width: auto; } }
@media (min-width: 1024px) {
  .banner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-8); padding: var(--s-10) var(--s-12); }
}

/* ---------- FAQ (4.15) ---------- */
.faq-layout { display: grid; gap: var(--s-6); }
.faq-layout .section__head { margin-bottom: 0; }
@media (min-width: 1024px) {
  .faq-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--grid-gap); align-items: start; }
  .faq-layout > :first-child { grid-column: 1 / 5; }
  .faq-layout > :last-child { grid-column: 5 / 13; }
}
.faq { padding: 0 var(--card-pad); }
.faq__item + .faq__item { border-top: 1px solid var(--c-border); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 56px;
  padding: var(--s-4) 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .icon { width: 20px; height: 20px; flex: none; color: var(--c-primary); transition: transform var(--dur-base) var(--ease-out); }
.faq__item[open] summary .icon { transform: rotate(45deg); }
.faq__item summary:focus-visible { outline-offset: -2px; border-radius: var(--r-sm); }
@media (hover: hover) { .faq__item summary:hover { color: var(--c-primary); } }
.faq__answer { max-width: var(--measure); padding-bottom: var(--s-4); }
@media (min-width: 1024px) { .faq__item summary { font-size: var(--fs-lead); } }

/* ---------- Thank-you (8) ---------- */
.thanks { max-width: 45rem; margin-inline: auto; }
.thanks__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c-success-soft);
  color: var(--c-success);
}
.thanks__icon .icon { width: 28px; height: 28px; stroke-width: 2.25; }
.thanks__next { display: grid; gap: var(--s-4); margin-top: var(--s-6); padding: var(--s-6) 0 0; border-top: 1px solid var(--c-border); list-style: none; }
.thanks__next li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.thanks__next .step__badge { grid-row: auto; }
.thanks__after { max-width: 45rem; margin: var(--s-10) auto 0; }
.thanks__after > * + * { margin-top: var(--s-4); }

/* ---------- Sticky mobile CTA (4.16) ---------- */
.sticky-cta { display: none; }
@media (max-width: 1023.98px) {
  .sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-sticky-cta);
    display: block;
    padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
    background: var(--glass-fill-strong);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border-top: var(--glass-border);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
  }
  .sticky-cta.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .has-sticky-cta { padding-bottom: 76px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sticky-cta { background: var(--glass-fallback); }
}
@media (prefers-reduced-transparency: reduce) {
  .sticky-cta { background: var(--c-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Reveal stagger (2.4): max one level, 0 / 60 / 120 / 180 ms ---------- */
.reveal-d1 { --reveal-delay: 60ms; }
.reveal-d2 { --reveal-delay: 120ms; }
.reveal-d3 { --reveal-delay: 180ms; }

/* Card spacing overrides for row/grid layouts (base .card adds margin between children) */
.card--row > * + *,
.banner > * + * { margin-top: 0; }

/* =========================================================
   BUILD 3–8: inner pages
   ========================================================= */

/* Breadcrumbs (4.18) */
.breadcrumbs { padding-top: var(--s-4); font-size: var(--fs-small); color: var(--c-muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { display: inline-flex; align-items: center; min-height: var(--tap); }
.breadcrumbs li + li::before { content: "/"; margin: 0 var(--s-2); color: var(--c-border-strong); }
.breadcrumbs a { color: var(--c-muted); }
@media (hover: hover) { .breadcrumbs a:hover { color: var(--c-primary); } }
.breadcrumbs [aria-current] { color: var(--c-text); }
.breadcrumbs + .hero, .breadcrumbs + .section { padding-top: var(--s-4); }
.container:has(> .breadcrumbs) + .hero,
.container:has(> .breadcrumbs) + .section { padding-top: var(--s-4); }

/* Page hero (service pages): page H1 size, static promise card on the right */
.hero--page .hero__actions .btn { width: 100%; }
@media (min-width: 480px) { .hero--page .hero__actions .btn { width: auto; } }
.hero__side > * + * { margin-top: var(--s-3); }
.hero__side-title { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; color: var(--c-text); }
.trust-chips--row { flex-direction: row !important; }
@media (min-width: 1024px) {
  .hero__side { grid-column: 8 / 13; align-self: center; }
}

/* Two columns */
.split, .pair { display: grid; gap: var(--grid-gap); }
@media (min-width: 1024px) {
  .split { grid-template-columns: 5fr 7fr; }
  .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pair > .card > .btn { margin-top: var(--s-5); }
.not-list--card { margin-top: 0; }

/* Tick list (secondary colour ticks) */
.tick-list { display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.tick-list li { display: flex; gap: var(--s-3); align-items: flex-start; }
.tick-list .icon { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--c-secondary); stroke-width: 2.25; }
@media (min-width: 768px) { .tick-list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3) var(--s-8); } }

/* Note and callout */
.note { margin-top: var(--s-6); max-width: var(--measure); color: var(--c-muted); }
.callout { display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--card-pad); }
.callout .icon-tile { flex: none; }
.callout h3 { font-size: var(--fs-h3); margin-bottom: var(--s-2); }
.callout p { max-width: var(--measure); }

/* Comparison table (scroll-x on narrow screens) */
.table-wrap { overflow-x: auto; padding: var(--s-2); }
.compare { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: var(--fs-small); }
.compare th, .compare td { padding: var(--s-3) var(--s-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--c-border); }
.compare thead th { font-family: var(--font-display); font-size: var(--fs-body); }
.compare tbody tr:nth-child(odd) { background: var(--c-bg); }
.compare tbody th { font-weight: 600; }
.compare tr:last-child > * { border-bottom: 0; }

/* Form at the bottom of a page: «what next» aside + form card */
.form-layout { display: grid; gap: var(--s-8); }
.form-layout > #zaiavka { width: 100%; max-width: 40rem; }
.form-aside__title { font-size: var(--fs-h3); }
.thanks__next--plain { border-top: 0; padding-top: 0; margin-top: var(--s-5); }
@media (min-width: 1024px) {
  .form-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--grid-gap); align-items: start; }
  .form-aside { grid-column: 1 / 6; padding-top: var(--s-8); padding-right: var(--s-8); }
  .form-layout > #zaiavka { grid-column: 6 / 13; max-width: none; }
}
@media (min-width: 768px) { .not-list--card ul { grid-template-columns: 1fr; } }

/* Vertical steps on wide screens too (process page) */
@media (min-width: 1024px) {
  .steps--vertical { grid-template-columns: 1fr; gap: var(--s-8); }
  .steps--vertical .step { grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-1) var(--s-5); }
  .steps--vertical .step__badge { grid-row: span 2; }
  .steps--vertical .step:not(:last-child)::before { left: 19px; right: auto; top: 40px; bottom: calc(-1 * var(--s-8)); width: 2px; height: auto; }
  .steps--vertical .step__title { font-size: var(--fs-h3); font-weight: 600; }
  .steps--vertical .step__text { font-size: var(--fs-body); max-width: var(--measure); }
}

/* Page intro (text pages without a hero card) */
.page-intro { padding-block: var(--s-4) var(--s-10); max-width: 48rem; }
.page-intro > * + * { margin-top: var(--s-4); }

/* =========================================================
   Reading pages: articles, policy (DESIGN_SYSTEM 9)
   ========================================================= */
.prose { padding: var(--s-5); font-size: 1.0625rem; line-height: 1.7; }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { margin-top: var(--s-10); font-size: 1.375rem; scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
.prose h3 { margin-top: var(--s-6); font-size: var(--fs-h3); }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: var(--s-2); }
.prose p, .prose li { max-width: var(--measure); }
.prose .intro { font-size: var(--fs-lead); color: var(--c-text); }
.prose .table-wrap { padding: 0; }
.prose .compare { font-size: var(--fs-small); line-height: 1.5; }
.prose .tick-list li + li { margin-top: 0; }
.prose .tick-list { padding-left: 0; }
@media (min-width: 1024px) {
  .prose { padding: var(--s-10) var(--s-12); font-size: var(--fs-lead); }
  .prose h2 { font-size: 1.75rem; }
}
.toc { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--c-primary-soft); }
.toc p { font-weight: 700; font-family: var(--font-display); }
.toc ol { margin-top: var(--s-2); padding-left: 1.4em; font-size: var(--fs-body); }
.toc li + li { margin-top: var(--s-1); }
.cta-inline { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--c-primary-soft); border-left: 4px solid var(--c-primary); }
.article-head { padding-block: var(--s-4) var(--s-8); max-width: 52rem; }
.article-head > * + * { margin-top: var(--s-4); }
.article-meta { font-size: var(--fs-small); color: var(--c-muted); }
.article-layout { display: grid; gap: var(--s-8); align-items: start; }
.article-layout > * { min-width: 0; } /* tables scroll inside .table-wrap instead of widening the grid */
.article-aside { display: grid; gap: var(--grid-gap); }
.article-aside .toc { background: var(--glass-fill-strong); }
.article-aside .card > .btn { margin-top: var(--s-4); }
.article-form { margin-top: var(--s-12); }
@media (min-width: 1024px) {
  .article-layout { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--grid-gap); }
  .article-layout > .prose, .article-form { grid-column: 1 / 9; }
  .article-aside { grid-column: 9 / 13; position: sticky; top: calc(var(--header-h) + var(--s-6)); }
}
@media (max-width: 1023.98px) { .article-aside { display: none; } }

/* Blog index chips */
.chips-nav { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.chips-nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--s-4); border-radius: var(--r-pill); background: var(--glass-fill-strong); border: 1px solid var(--c-primary-line); text-decoration: none; font-weight: 600; }
@media (hover: hover) { .chips-nav a:hover { background: var(--c-primary-soft); } }
.blog-group + .blog-group { margin-top: var(--s-12); }
.blog-group h2 { margin-bottom: var(--s-6); scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
.card__meta { font-size: var(--fs-small); color: var(--c-muted); }
.section--flush { padding-top: 0; }
@media (min-width: 1024px) { .prose > .toc { display: none; } }
.toc ol { list-style: none; padding-left: 0; }
.container:has(> .page-intro) + .section { padding-top: 0; }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* Lead magnet checklist page (GROWTH_PLAN 3, magnet 1): CSS-only tick boxes, nothing stored */
.checklist-block + .checklist-block { margin-top: var(--s-8); padding-top: var(--s-8); border-top: 1px solid var(--c-border); }
.checklist { display: grid; gap: var(--s-1); margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.checklist .check { font-size: var(--fs-body); }
.checklist__num { font-weight: 600; color: var(--c-muted); }
.checklist__hint { margin-top: var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--c-primary-soft); font-size: var(--fs-small); }
.checklist__outro { margin-top: var(--s-8); }
@media print {
  body::before, .skip-link, .site-header, .site-footer, .sticky-cta, .breadcrumbs, .print-hide { display: none !important; }
  body { background: none; }
  .glass, .card { background: none; border: 0; box-shadow: none; backdrop-filter: none; padding: 0; }
  .section { padding-block: 0; }
  .checklist-block { break-inside: avoid; }
  .check__box { border-color: currentColor; }
  .checklist__hint { background: none; padding: 0; }
}
