/* ---------------------------------------------------------------------------
   /about/ - page shell + one block per section type (class .about-<type>).
   Tokens from css/tokens.css. Markup from tools/lib/render-about.mjs; content from content/about.json.
   A new section type adds its own block at the bottom; the shell never changes.
   --------------------------------------------------------------------------- */

.about-page {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: calc(120px + env(safe-area-inset-top)) 1.5rem clamp(96px, 14vh, 160px);
  color: var(--color-fg);
}

/* Breadcrumb (same pattern as /videos/) */
.about-crumbs ol {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.about-crumbs li + li::before {
  content: '/';
  margin-right: 0.5rem;
}

.about-crumbs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  /* A short word like "Home" is only ~41px wide, under the 44px touch target. */
  min-width: 44px;
  color: var(--color-fg-secondary);
  text-decoration: none;
}

.about-crumbs a:hover,
.about-crumbs a:focus-visible {
  color: var(--color-fg);
}

/* Particle band (engine: js/engines/: the avatar in particles, same motion as the kape.tools wordmark */
.about-word {
  position: relative;
  margin: clamp(1rem, 3vw, 2rem) 0 0;
  height: clamp(340px, 52vw, 620px);
}

.about-word__particles {
  display: block;
  width: 100%;
  height: 100%;
}

/* Header */
.about-head {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  max-width: 900px;
}

.about-head__eyebrow {
  margin: 0;
  font-size: var(--text-label);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.about-head__title {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: var(--text-display-l);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.about-head__lead {
  margin: 1.25rem 0 0;
  max-width: 620px;
  font-size: var(--text-body-lead);
  line-height: 1.6;
  color: var(--color-fg-secondary);
  text-wrap: pretty;
}

/* Section shell: heading on the left, content on the right; stacks on phones */
.about-sections {
  display: grid;
  gap: clamp(72px, 12vh, 140px);
  margin-top: clamp(72px, 12vh, 140px);
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  scroll-margin-top: 110px;
}

@media (min-width: 900px) {
  .about-section {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 3rem;
  }
}

.about-section__heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-display-m);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.about-section h3 {
  margin: 0;
  font-size: var(--text-display-s);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.about-section p {
  margin: 0;
  color: var(--color-fg-secondary);
  line-height: 1.65;
  text-wrap: pretty;
}

/* story */
.about-story__body {
  display: grid;
  gap: 1.25rem;
  max-width: 68ch;
  font-size: var(--text-body-lead);
}

/* facts */
.about-facts__list {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem clamp(2rem, 6vw, 5rem);
  margin: 0;
}

.about-facts__item {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
}

.about-facts__item dd {
  margin: 0;
  font-size: var(--text-display-l);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.about-facts__item dt {
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

/* services: numbered rows, not cards */
.about-services__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem 3rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: service;
}

@media (min-width: 640px) {
  .about-services__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.about-services__item {
  display: grid;
  gap: 0.75rem;
  counter-increment: service;
}

.about-services__item::before {
  content: counter(service, decimal-leading-zero);
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  color: var(--color-accent-on-dark);
}

/* credentials */
.about-credentials__list {
  display: grid;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-credentials__item {
  display: grid;
  gap: 0.4rem;
}

.about-credentials__item a {
  color: inherit;
  text-underline-offset: 0.2em;
}

/* timeline: oldest first, date column + body */
.about-timeline__list {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-timeline__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .about-timeline__item {
    grid-template-columns: 9rem minmax(0, 1fr);
    gap: 2rem;
  }
}

.about-timeline__item time {
  font-size: var(--text-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
  padding-top: 0.35em;
}

.about-timeline__item div {
  display: grid;
  gap: 0.5rem;
}

/* cta */
.about-cta__body {
  max-width: 56ch;
  font-size: var(--text-body-lead);
}

.about-cta__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.about-cta .about-section__heading,
.about-cta .about-cta__body {
  grid-column: 1 / -1;
}

.about-cta {
  align-content: start;
}

@media (min-width: 900px) {
  .about-cta {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-cta .about-section__heading {
    font-size: var(--text-display-l);
    max-width: 18ch;
  }
}

.about-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  color: var(--color-fg);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.about-link:first-child {
  background: var(--color-fg);
  border-color: var(--color-fg);
  color: var(--color-bg);
}

.about-link:focus-visible {
  outline: 2px solid var(--color-fg);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .about-link:hover {
    border-color: var(--color-fg);
  }
}

/* ---------------------------------------------------------------------------
   Intro column: header, capabilities and badges share one centred reading width
   --------------------------------------------------------------------------- */
.about-head,
.about-sections {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.about-head {
  text-align: center;
}

/* Same face as the home page H1 (.hero-title) */
.about-head__title {
  font-size: var(--text-display-xl);
  font-weight: 800;
  letter-spacing: var(--tracking-display);
}

.about-head__lead {
  margin: 1.75rem auto 0;
  max-width: 640px;
}

.about-head__note {
  margin: 1rem auto 0;
  max-width: 600px;
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--color-fg-muted);
  text-wrap: pretty;
}

.about-sections {
  gap: 1.75rem;
  margin-top: clamp(48px, 8vh, 88px);
}

.about-section.about-capabilities,
.about-section.about-badges {
  display: block;
}

/* capabilities: rows with a stack of tool logos */
.about-caps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-caps__row {
  --tile: clamp(30px, 3.2vw, 38px);
  --overlap: 6px;
  display: grid;
  grid-template-columns: calc(5 * var(--tile) - 3 * var(--overlap)) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  padding: clamp(12px, 1.6vh, 16px) 2px;
  border-top: 1px solid var(--color-border);
}

.about-caps__row:last-child {
  border-bottom: 1px solid var(--color-border);
}

.about-caps__marks {
  display: inline-flex;
  align-items: center;
  padding-left: var(--overlap);
}

.about-caps__mark {
  display: grid;
  place-items: center;
  width: var(--tile);
  height: var(--tile);
  margin-left: calc(-1 * var(--overlap));
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #0f0f101f, 0 4px 10px -4px #000c;
  z-index: var(--i);
  transition: transform 320ms cubic-bezier(0.2, 0, 0, 1);
}

.about-caps__mark img {
  width: 62%;
  height: 62%;
  object-fit: contain;
}

.about-caps__title {
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--color-fg);
}

.about-caps__index {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--color-fg-muted);
  transition: color 220ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .about-caps__row:hover .about-caps__mark {
    transform: translateY(-3px);
  }
  .about-caps__row:hover .about-caps__mark:nth-child(2) { transition-delay: 40ms; }
  .about-caps__row:hover .about-caps__mark:nth-child(3) { transition-delay: 80ms; }
  .about-caps__row:hover .about-caps__mark:nth-child(4) { transition-delay: 120ms; }
  .about-caps__row:hover .about-caps__mark:nth-child(5) { transition-delay: 160ms; }
  .about-caps__row:hover .about-caps__index {
    color: var(--color-accent-on-dark);
  }
}

@media (max-width: 559px) {
  .about-caps__row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 10px;
  }
  .about-caps__marks {
    grid-column: 1 / -1;
  }
}

/* badges: one plate, cells share a mark / title / meta anatomy (ul: the section wrapper also carries .about-badges) */
ul.about-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 18px;
  background: #f2efe908;
  box-shadow: inset 0 0 0 1px var(--color-border-strong), inset 0 1px 0 #f2efe90f;
  overflow: hidden;
}

.about-badges__cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 18px;
}

.about-badges__cell + .about-badges__cell {
  box-shadow: inset 1px 0 0 var(--color-border);
}

@media (max-width: 559px) {
  .about-badges__cell + .about-badges__cell {
    box-shadow: inset 0 1px 0 var(--color-border);
  }
}

.about-badges__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #6f9be01a;
  color: var(--color-accent-on-dark);
  box-shadow: inset 0 0 0 1px #6f9be033;
}

.about-badges__mark--img {
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}

.about-badges__mark--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.about-badges__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.about-badges__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-fg);
}

.about-badges__meta {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

/* community: one plate, same material as the badges plate, holding a logo, a role and the links out */
.about-section.about-community {
  display: block;
}

.about-community__plate {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 2vw, 20px);
  padding: clamp(16px, 2vw, 22px);
  border-radius: 18px;
  background: #f2efe908;
  box-shadow: inset 0 0 0 1px var(--color-border-strong), inset 0 1px 0 #f2efe90f;
}

.about-community__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.about-community__mark img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.about-community__copy {
  min-width: 0;
}

.about-community__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--color-fg);
}

/* the role reads as a label, not a second title */
.about-community__role {
  padding: 3px 9px;
  border-radius: 999px;
  background: #6f9be01a;
  box-shadow: inset 0 0 0 1px #6f9be033;
  font-size: var(--text-label-s);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-on-dark);
}

.about-community__body {
  max-width: 54ch;
  margin: 10px 0 0;
  color: var(--color-fg-secondary);
}

/* tighter than .about-cta__links: this plate sits inside a section, not under a display heading */
.about-community__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1rem;
}

.about-community__links .about-link {
  min-height: 40px;
  padding: 0 1.125rem;
  font-size: 15px;
}

@media (max-width: 559px) {
  .about-community__plate {
    flex-direction: column;
  }
}
