/*
 * Crescita Studio — Chi siamo (/chi-siamo/).
 *
 * Loaded only on that page by crescita_about_enqueue(), with about.js.
 *
 * Simplified 2026-10-05 after the founder read the first rebuild as
 * "overly complicated, spacing off, alignment not coherent". The critique
 * behind this version found six content widths, three alignments and four
 * heading sizes on one page. The rules now, and they are the whole system:
 *
 *   - two widths: --cs-text for prose, --cs-wide for the two diagrams and
 *     the two-column promise;
 *   - one H2 size (the site's), one body size (the site's lede), labels at
 *     the small size only inside diagrams;
 *   - everything centred, including lists;
 *   - one gap between a section head and its content (--space-xl), and the
 *     site's own section padding.
 *
 * One motif runs the length of the page: a thin vertical line enters the
 * top of every section, and both diagrams are drawn in the same line.
 * Every undrawn state lives under html.crescita-cs-motion, which about.js
 * adds only when motion is allowed, so no script, print and reduced motion
 * show the finished page.
 */

.crescita-page-about {
  --cs-text: var(--width-text);
  --cs-wide: 64rem;
  --cs-rule: rgba(15, 23, 34, 0.16);
  --cs-ink: var(--crescita-ocean);
  --cs-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Page: centred, one heading size, the line into every section ───── */

.crescita-page-about .crescita-hero,
.crescita-page-about .crescita-section {
  text-align: center;
}

.crescita-page-about .crescita-hero__title,
.crescita-page-about .crescita-hero__lede {
  margin-inline: auto;
}

/* Wide enough that the lede's second sentence holds one line beside the
   founder's break after "Italia." (2026-10-05). */
.crescita-page-about .crescita-hero__lede {
  max-width: 44em;
}

/* No heading ends on a single word. */
.crescita-page-about h1,
.crescita-page-about h2 {
  text-wrap: balance;
}

.crescita-page-about .crescita-section {
  position: relative;
}

.crescita-page-about .crescita-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(180deg, rgba(30, 58, 95, 0), rgba(30, 58, 95, 0.45));
}

.crescita-page-about .crescita-section--dark::before {
  background: linear-gradient(180deg, rgba(159, 193, 232, 0), rgba(159, 193, 232, 0.6));
}

.crescita-cs-head {
  max-width: var(--cs-text);
  margin: 0 auto var(--space-xl);
}

.crescita-page-about .crescita-cs-head h2 {
  margin: 0 0 var(--space-sm);
  font-size: var(--text-h2);
  line-height: var(--leading-heading);
  font-weight: var(--weight-heading);
}

.crescita-page-about .crescita-cs-head p {
  margin: 0;
  font-size: var(--text-lede);
  line-height: var(--leading-body);
  color: var(--color-text-secondary);
}

.crescita-page-about .crescita-section--dark .crescita-cs-head p {
  color: var(--color-text-on-dark-secondary);
}

/* A head with nothing after it inside the section needs no bottom gap. */
.crescita-cs-head:last-child {
  margin-bottom: 0;
}

/* ── Hero: three points on one line ─────────────────────────────────── */

.crescita-cs-line {
  max-width: 48rem;
  margin: var(--space-xl) auto 0;
}

.crescita-cs-line__track {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.crescita-cs-line__track::before {
  content: "";
  position: absolute;
  top: 7px;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 1px;
  background: var(--cs-ink);
  transform-origin: left center;
  transition: transform 1100ms var(--cs-ease) 150ms;
}

.crescita-cs-line__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  margin: 0;
  padding-inline: var(--space-2xs);
}

.crescita-cs-line__dot {
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid var(--cs-ink);
}

.crescita-cs-line__node--core .crescita-cs-line__dot {
  background: var(--cs-ink);
  box-shadow: 0 0 0 5px var(--color-bg), 0 0 0 6px rgba(30, 58, 95, 0.35);
}

.crescita-cs-line__label {
  font-size: var(--text-small);
  line-height: 1.4;
  color: var(--color-heading);
}

.crescita-cs-line__node--core .crescita-cs-line__label {
  font-weight: 600;
  color: var(--cs-ink);
}

/* ── Four parts, one plan ───────────────────────────────────────────── */

.crescita-cs-merge {
  max-width: 40rem;
  margin: 0 auto;
}

.crescita-cs-merge__parts {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.crescita-cs-merge__parts li {
  position: relative;
  margin: 0;
  padding: 0 0.25rem 1.5rem;
  font-weight: 500;
  color: var(--color-heading);
}

/* A short drop from each part... */
.crescita-cs-merge__parts li::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 1rem;
  background: var(--cs-ink);
  transform-origin: top center;
  transition: transform 450ms var(--cs-ease);
}

/* ...a rail joining them... */
.crescita-cs-merge__parts::after {
  content: "";
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  bottom: 0;
  height: 1px;
  background: var(--cs-ink);
  transition: transform 700ms var(--cs-ease) 300ms;
}

/* ...and one line down to the plan. */
.crescita-page-about .crescita-cs-merge__end {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 2rem var(--space-md) var(--space-xs);
  font-size: var(--text-lede);
  font-weight: 500;
  color: var(--cs-ink);
  border-bottom: 2px solid var(--crescita-ocean-bright);
}

.crescita-cs-merge__end::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 1.5rem;
  background: var(--cs-ink);
  transform-origin: top center;
  transition: transform 450ms var(--cs-ease) 850ms;
}

/* ── How we think: three statements ─────────────────────────────────── */

.crescita-cs-beliefs {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--cs-text);
}

.crescita-cs-beliefs li {
  position: relative;
  margin: 0;
  padding: var(--space-lg) 0;
}

.crescita-cs-beliefs li:last-child {
  padding-bottom: 0;
}

.crescita-cs-beliefs li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: var(--cs-rule);
  transition: transform 900ms var(--cs-ease);
}

.crescita-page-about .crescita-cs-beliefs h3 {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-h3);
  line-height: var(--leading-heading);
  font-weight: var(--weight-heading);
  transition: transform 800ms var(--cs-ease), opacity 800ms var(--cs-ease);
}

.crescita-page-about .crescita-cs-beliefs p {
  margin: 0;
  font-size: var(--text-lede);
  line-height: var(--leading-body);
  color: var(--color-text-secondary);
  transition: opacity 800ms var(--cs-ease) 200ms;
}

/* ── How we work: five steps on one line, on Midnight ──────────────── */

.crescita-cs-steps {
  --p: 1;
  position: relative;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 72rem;
  display: grid;
  gap: var(--space-md);
}

.crescita-cs-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.crescita-cs-step__n {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: var(--space-sm);
  border-radius: 50%;
  border: 1px solid rgba(159, 193, 232, 0.45);
  background: var(--crescita-midnight);
  font-family: var(--font-secondary);
  font-weight: 600;
  color: #9FC1E8;
  transition: background-color 400ms var(--cs-ease), color 400ms var(--cs-ease);
}

.crescita-cs-step.is-on .crescita-cs-step__n,
.crescita-cs-steps:not([data-cs-armed]) .crescita-cs-step__n {
  background: #9FC1E8;
  color: var(--crescita-midnight);
}

.crescita-page-about .crescita-cs-step h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  line-height: var(--leading-heading);
  font-weight: var(--weight-heading);
  color: var(--color-text-on-dark);
}

.crescita-page-about .crescita-cs-step p {
  margin: 0;
  max-width: 22ch;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text-on-dark-secondary);
}

.crescita-cs-step a {
  color: var(--color-text-on-dark);
  text-underline-offset: 3px;
}

/* Phones and tablets: stacked, with a short segment between steps. */
@media (max-width: 1099.98px) {
  .crescita-cs-step:not(:last-child)::after {
    content: "";
    width: 1px;
    height: var(--space-md);
    margin-top: var(--space-md);
    background: rgba(159, 193, 232, 0.5);
  }
}

/* Desktop: one line through the five numerals, lit as far as the reader
   has scrolled. Columns are padded instead of gapped, so each fifth is an
   exact fifth and the line runs centre to centre (10% to 90%). */
@media (min-width: 1100px) {
  .crescita-cs-steps {
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
  }

  /* 1.5rem each side leaves 3rem between neighbouring texts (the first
     version had 1.5rem, and the founder read the texts as touching). The
     horizontal layout starts at 1100px, not 900: below that a fifth of the
     page is too narrow to hold a sentence once that padding is taken out. */
  .crescita-cs-step {
    padding-inline: var(--space-md);
  }

  .crescita-cs-steps::before,
  .crescita-cs-steps::after {
    content: "";
    position: absolute;
    top: calc(2.75rem / 2);
    left: 10%;
    height: 1px;
  }

  .crescita-cs-steps::before {
    right: 10%;
    background: rgba(159, 193, 232, 0.25);
  }

  .crescita-cs-steps::after {
    width: calc(80% * var(--p));
    background: #9FC1E8;
  }
}

/* ── What to expect: one paragraph ──────────────────────────────────── */

.crescita-page-about .crescita-cs-trust {
  max-width: 40rem;
  margin: 0 auto;
  font-size: var(--text-lede);
  line-height: 1.6;
  color: var(--color-heading);
}

/* ── Close ──────────────────────────────────────────────────────────── */

.crescita-page-about .crescita-cs-close .crescita-cs-head {
  margin-bottom: var(--space-lg);
}

/* The close heading is two sentences, not a title: at the section heading
   size it would run four lines. */
.crescita-page-about .crescita-cs-close .crescita-cs-head h2 {
  max-width: 30em;
  margin-inline: auto;
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  line-height: 1.25;
}

.crescita-page-about .crescita-actions {
  justify-content: center;
}

.crescita-page-about .crescita-cs-close__note {
  margin: var(--space-sm) 0 0;
  font-size: var(--text-small);
  color: var(--color-text-on-dark-secondary);
}

/* ── Motion: the undrawn state, only when about.js allows motion ────── */

.crescita-cs-motion .crescita-cs-line:not(.is-drawn) .crescita-cs-line__track::before,
.crescita-cs-motion .crescita-cs-merge:not(.is-drawn) .crescita-cs-merge__parts::after,
.crescita-cs-motion .crescita-cs-beliefs li:not(.is-drawn)::before {
  transform: scaleX(0);
}

.crescita-cs-motion .crescita-cs-merge:not(.is-drawn) .crescita-cs-merge__parts li::after,
.crescita-cs-motion .crescita-cs-merge:not(.is-drawn) .crescita-cs-merge__end::before {
  transform: scaleY(0);
}

.crescita-cs-motion .crescita-cs-beliefs li:not(.is-drawn) h3 {
  transform: translateY(0.5rem);
  opacity: 0;
}

.crescita-cs-motion .crescita-cs-beliefs li:not(.is-drawn) p {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .crescita-page-about * {
    transition: none !important;
  }
}

/* Phones: four labels in four columns need the small size to fit 375px. */
@media (max-width: 479.98px) {
  .crescita-cs-merge__parts li {
    font-size: var(--text-small);
  }
}
