/* Neutral typography for the new content blocks on the homepage. No decoration:
   the owner reviews the copy first and decides the visual treatment afterwards. */
.story { color: var(--body); }
.story h3 {
  margin: 0 0 8px;
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: var(--fs-lead);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  color: var(--night);
}
.story p { max-width: var(--measure); margin: 0 0 16px; line-height: 1.6; }
.story__lead { max-width: var(--measure); }
.story__subhead {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-lead);
}

.story__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px 40px;
  margin-top: 32px;
}
.story__item p { margin: 0; }

.story__figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 40px;
  margin: 32px 0;
  padding: 0;
}
.story__figures > div { border-top: 1px solid var(--line); padding-top: 16px; }
.story__figures dt {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  color: var(--night);
}
.story__figures dd { margin: 8px 0 0; line-height: 1.5; }

.story__list { max-width: var(--measure); margin: 0 0 16px; padding-left: 20px; }
.story__list li { margin-bottom: 12px; line-height: 1.6; }
.story__list strong { color: var(--night); }

.story__table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--fs-small);
}
.story__table th,
.story__table td {
  padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}
.story__table thead th {
  font-family: 'Wix Madefor Text', system-ui, sans-serif;
  font-size: var(--fs-caption);
  font-weight: var(--fw-normal);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--muted-2);
}
.story__table tbody th { font-weight: var(--fw-bold); color: var(--night); }

.story__formula {
  margin: 24px 0;
  padding: 24px;
  background: rgba(0, 0, 0, .03);
}
.story__formula p:last-child { margin-bottom: 0; }
.story__note { color: var(--muted-2); font-size: var(--fs-small); }

.story__quote { max-width: var(--measure); margin: 24px 0 0; padding: 0; }
.story__quote p { font-size: var(--fs-lead); line-height: 1.55; color: var(--night); }
.story__quote footer {
  margin-top: 16px;
  font-family: 'Wix Madefor Text', system-ui, sans-serif;
  font-size: var(--fs-caption);
  color: var(--muted-2);
}

@media (max-width: 900px) {
  .story__table { display: block; overflow-x: auto; }
  .story__table th, .story__table td { padding-right: 16px; }
}

@media (max-width: 640px) {
  .story h3 { font-size: var(--fs-body); }
  .story__subhead { font-size: var(--fs-lead); margin-top: 24px; padding-top: 20px; }
  .story__grid { gap: 24px; margin-top: 24px; }
  .story__figures dt { font-size: var(--fs-lead); }
  .story__formula { padding: 16px; }
  .story__quote p { font-size: var(--fs-body); }
}

/* Second block regained its copy. The bundled rules place it under the header
   and let the lead paragraph fall on a bright part of the photo, so the
   position and contrast are corrected here (this file loads after the bundle). */
.home-who__copy { top: clamp(96px, 11vh, 150px); }
.home-who__kicker { color: rgba(255, 255, 255, 0.7); color: color-mix(in srgb, var(--on-dark) 70%, transparent); }
.home-who__subtitle { max-width: 680px; color: rgba(255, 255, 255, 0.9); color: color-mix(in srgb, var(--on-dark) 90%, transparent); }
.home-who__lead {
  max-width: 640px;
  margin-top: 24px;
  font-size: clamp(var(--fs-body), 1.2vw, var(--fs-lead));
  color: rgba(255, 255, 255, 0.9); color: color-mix(in srgb, var(--on-dark) 90%, transparent);
}
.home-who__shade {
  background:
    linear-gradient(90deg, rgba(0,0,0, .88) 0%, rgba(0,0,0, .62) 46%, rgba(0,0,0, .18) 82%),
    linear-gradient(0deg, rgba(0,0,0, .92) 0%, rgba(0,0,0, .3) 47%, rgba(0,0,0, .42) 100%);
}

@media (max-width: 640px) {
  .home-who__copy { top: clamp(88px, 14vh, 132px); }
  .home-who__lead { margin-top: 20px; }
}

/* Anchor jumps must clear the sticky header (WCAG 2.4.11). */
.story { scroll-margin-top: var(--section); }

/* Mobile: the section used to be a grid whose cells were reserved for the
   numeric markers that were removed. With `display: contents` on the copy the
   new kicker and lead paragraph fell into leftover cells, so the second block
   returns to normal flow on narrow screens. */
@media (max-width: 900px) {
  .home-who--owners { display: block; }
  .home-who--owners .home-who__copy {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .home-who--owners .home-who__subtitle,
  .home-who--owners .home-who__lead { max-width: 100%; }
}

/* Entry parameters: label / value rows. */
.story__params { margin: 32px 0 16px; padding: 0; }
.story__params > div {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 8px 40px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.story__params > div:first-child { border-top: 1px solid var(--line); }
.story__params dt {
  font-family: 'Wix Madefor Text', system-ui, sans-serif;
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--muted-2);
  padding-top: 3px;
}
.story__params dd {
  margin: 0;
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  line-height: 1.35;
  color: var(--night);
}
@media (max-width: 640px) {
  .story__params > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .story__params dd { font-size: var(--fs-body); }
}

/* A note that follows a card grid needs air, otherwise it reads as part of the
   last card. */
.story__grid + .story__note { margin-top: 24px; }

/* The ten-year model is wider than any viewport: keep it scrollable and let the
   row label stay visible while the years scroll. */
.story__table--wide { display: block; overflow-x: auto; font-size: var(--fs-small); white-space: nowrap; }
.story__table--wide th[scope="row"] {
  position: sticky;
  left: 0;
  background: var(--stone);
  white-space: normal;
  min-width: 230px;
}
.story__table--wide td { text-align: right; }

/* Founders: both cards side by side, no switcher. */
.founders__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 56px 64px;
  margin-top: 32px;
}
.founder { min-width: 0; }
.founder__portrait {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  margin-bottom: 24px;
  object-fit: cover;
  aspect-ratio: 2 / 3;
}
.founder__name {
  margin: 0 0 8px;
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-tight);
  line-height: 1.15;
  color: var(--night);
}
.founder__role {
  margin: 0 0 12px;
  font-family: 'Wix Madefor Text', system-ui, sans-serif;
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--muted-2);
}
.founder__position { margin-bottom: 12px; }
.founder__lead { font-size: var(--fs-body); color: var(--night); }

.founder__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px 24px;
  margin: 24px 0 28px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.founder__metrics dt {
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: var(--fs-lead);
  font-weight: var(--fw-bold);
  line-height: 1.15;
  color: var(--night);
}
.founder__metrics dd { margin: 4px 0 0; font-size: var(--fs-caption); line-height: 1.35; color: var(--muted-2); }

.founder__subhead {
  margin: 28px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--night);
}

.founder__timeline { margin: 0 0 16px; padding: 0; }
.founder__timeline > div { margin-bottom: 20px; }
.founder__timeline dt {
  margin-bottom: 6px;
  font-family: 'Wix Madefor Text', system-ui, sans-serif;
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-caps);
  color: var(--muted-2);
}
.founder__timeline dd { margin: 0; line-height: 1.6; }

.founder__quote {
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
}
.founder__quote p {
  margin: 0;
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: var(--fs-lead);
  font-weight: var(--fw-bold);
  line-height: 1.35;
  color: var(--night);
}

.founder .story__table { font-size: var(--fs-small); }
.founder .story__table th, .founder .story__table td { padding: 12px 16px 12px 0; }

@media (max-width: 900px) {
  .founders__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}
@media (max-width: 640px) {
  .founder__name { font-size: var(--fs-h4); }
  .founder__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .founder__subhead { font-size: var(--fs-body); margin-top: 24px; }
  .founder__quote p { font-size: var(--fs-body); }
}

/* Object tiles carry a factual line under the name. */
.project__fact {
  display: block;
  margin-top: 6px;
  font-family: 'Wix Madefor Text', system-ui, sans-serif;
  font-size: var(--fs-caption);
  line-height: 1.45;
  letter-spacing: var(--ls-normal);
  color: rgba(255, 255, 255, 0.9); color: color-mix(in srgb, var(--on-dark) 90%, transparent);
}
@media (max-width: 640px) {
  .project__fact { font-size: var(--fs-micro); }
}

/* The founder card shows the essentials; the full biography opens on demand.
   Native <details> keeps it keyboard-accessible and printable without JS. */
.founder__more { margin-top: 24px; }
.founder__more > summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--night);
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-small);
  line-height: 1.2;
  color: var(--night);
  transition: background var(--t-surface) var(--ease), color var(--t-surface) ease;
}
.founder__more > summary::-webkit-details-marker { display: none; }
.founder__more > summary::after {
  content: '+';
  font-family: 'Wix Madefor Text', system-ui, sans-serif;
  font-size: var(--fs-body);
  line-height: 1;
}
.founder__more[open] > summary::after { content: '−'; }
.founder__more > summary:hover { background: var(--night); color: var(--stone); }
.founder__more > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.founder__more-body { margin-top: 8px; }
.founder__more-body > .founder__subhead:first-child { border-top: 0; padding-top: 0; }

/* A card can absorb a whole former section; the detail keeps the grid compact. */
.story__more { margin-top: 16px; }
.story__more > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-small);
  line-height: 1.35;
  color: var(--night);
  border-bottom: 1px solid var(--night);
  padding-bottom: 2px;
}
.story__more > summary::-webkit-details-marker { display: none; }
.story__more > summary::after { content: '+'; font-family: 'Wix Madefor Text', system-ui, sans-serif; }
.story__more[open] > summary::after { content: '−'; }
.story__more > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.story__more-body { margin-top: 14px; }
.story__more-body .story__list { padding-left: 18px; }
.story__more-body p, .story__more-body li { font-size: var(--fs-small); }

/* Neighbouring sections are white; the founders block used to show the page's
   grey through, which read as a stray grey band. */
#team.founders { background: #fff; }

/* Experience block: 12 metrics across the full width, no dividing rule.
   Four columns keep the same three rows, so the block does not grow taller. */
body #experience.experience-section .experience-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-left: 0;
  border-left: 0;
}
/* Показателей девять, и только в четырехколоночной раскладке последний
   ряд состоит из одного элемента: ставим его по центру, иначе он висит
   под первой колонкой и ряд читается как оборванный. На трех колонках
   9 = 3 полных ряда, там центрировать нечего. */
@media (min-width: 1101px) {
  body #experience.experience-section .experience-metrics > .experience-stat:last-child:nth-child(4n+1) {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: min(100%, 320px);
  }
}
/* На двух колонках девятый элемент тоже остается один в ряду. */
@media (max-width: 760px) {
  body #experience.experience-section .experience-metrics > .experience-stat:last-child:nth-child(2n+1) {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: min(100%, 320px);
  }
}
body #experience.experience-section .experience-section__inner { display: block; }
body #experience.experience-section .experience-featured { margin-bottom: 28px; }
@media (max-width: 1100px) {
  body #experience.experience-section .experience-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body #experience.experience-section .experience-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Competence toggles read as buttons: white plate, black hairline, no icons. */
body #competences .competences-toggle {
  background: #fff;
  border: 1px solid var(--night);
}
body #competences .competences-toggle[open] {
  background: #fff;
  border-color: var(--night);
}
body #competences .competences-toggle > summary > svg { display: none; }
body #competences .competences-toggle > summary { color: var(--night); }
body #competences .competences-toggle > summary:hover { color: var(--night); }
body #competences .competences-toggle > summary::after {
  background:
    linear-gradient(currentColor, currentColor) 0 0/100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50%/100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100%/100% 1px no-repeat;
}
body #competences .competences-toggle[open] > summary::after {
  background: linear-gradient(currentColor, currentColor) 0 50%/100% 1px no-repeat;
}
body #competences .competences-toggle > summary:focus-visible {
  outline: 2px solid var(--night);
  outline-offset: 3px;
}

/* One heading size and centred alignment for every block on both pages.
   Footer headings and in-card titles keep their own scale. */
/* Shared heading roles are owned by design-system.css on every page. */
body main section > .head,
body main section > .head .head__title,
body main section > div > .head { text-align: center; }
body main section > .head .head__note { margin-left: auto; margin-right: auto; }

/* Founders block: white plate across the full window, portraits centred side by
   side, and no hairlines inside the cards. */
#team.founders {
  background: #fff;
  clip-path: inset(0 -100vmax);
  box-shadow: 0 0 0 100vmax #fff;
}
#team .founder__portrait {
  margin-left: auto;
  margin-right: auto;
  max-width: 420px;
}
#team .founder__metrics,
#team .founder__quote,
#team .founder__subhead,
#team .founders__grid > .founder {
  border-top: 0;
  border-bottom: 0;
}
#team .founder__metrics { padding-block: 0; }
#team .founder__quote { padding-top: 0; }
#team .founder__subhead { padding-top: 0; }

/* Copy under a centred heading follows it; the lead form sits on white like the
   neighbouring blocks instead of showing the page grey. */
/* Блок остается по центру полосы, но сам текст – по левому краю:
   центрированный абзац дает рваный левый край, и глазу не за что
   зацепиться при переходе на новую строку. */
#who .company-about__copy { text-align: start; margin-inline: auto; max-width: var(--measure); }
#who .company-about__layout { justify-items: center; }

#request.request-section {
  background: #fff;
  clip-path: inset(0 -100vmax);
  box-shadow: 0 0 0 100vmax #fff;
}

/* Centre the projects heading across all twelve grid columns. */
#projects > .head > .head__title { grid-column: 1 / -1; }

/* Shared centred portraits and centred founder biographies, owner request. */
body #team > .head > .head__title { grid-column: 1 / -1; width: 100%; text-align: center; }
body #team #team-title { color: var(--ink); }
body #team .founders__portraits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; max-width: 856px; margin: 32px auto 28px; }
body #team .founders__portraits > .founder__portrait { width: 100%; max-width: none; height: auto; margin: 0; aspect-ratio: 2 / 3; object-fit: cover; }
body #team .founders__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; max-width: 856px; margin: 0 auto; }
body #team .founder { text-align: center; }
/* Имена, портреты и метрики центрируем, связный текст и таблицы – нет. */
body #team .founder :where(p, li, dd, blockquote) { text-align: start; }
body #team .founder :where(p, blockquote) { max-width: var(--measure); margin-inline: auto; }
body #team .founder__metrics { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 24px; }
body #team .founder__metrics > div { flex: 0 1 120px; min-width: 0; text-align: center; }
body #team .founder .story__list { padding-left: 0; list-style-position: inside; margin-inline: auto; max-width: var(--measure); }
body #team .founder .story__table :where(th, td) { text-align: start; }
body #team .founder__more > summary { justify-content: center; }
@media (max-width: 700px) {
  body #team .founders__portraits { gap: 12px; margin-block: 24px; }
  body #team .founders__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

/* Centre hero copy horizontally without changing its bottom position or type scale. */
body .hero-full--operator .hero-full__text { width: 100%; align-self: center; text-align: center; }
body .hero-full--operator .lead, body .hero-full--operator .hero-full__qualification { margin-inline: auto; }
body .hero-full--operator .hero__actions { justify-content: center; margin-inline: auto; }

/* Остался один основатель: портрет и карточка центрируются и не
   растягиваются на ширину прежней пары. */
body #team .founders__portraits:has(> .founder__portrait:only-child),
body #team .founders__grid:has(> .founder:only-child) {
  grid-template-columns: minmax(0, 1fr);
  max-width: 520px;
}
