/* About page — loaded only on /about-us/. Reader-first flow: problem-led
   hero, Know/Care/Change strip, belief, demo stat band, timeline, founder,
   ecosystem teaser, community voice, action card. */
.about-hero {
  background:
    linear-gradient(
      color-mix(in srgb, var(--color-primary) 88%, transparent),
      color-mix(in srgb, var(--color-bg-darker) 92%, transparent)
    ),
    url("../../media/service/img/1.webp") center / cover no-repeat;
}

.about-why {
  background: var(--color-bg);
  padding: var(--space-8) 0 var(--space-6);
}

.about-why h2 { margin: 0 0 var(--space-2); max-width: 760px; }

/* Section headings share one size: --text-h2 per token scale. Base h1/h2/h3
   carry no size, so without this every section H2 falls back to UA default. */
.about-why h2,
.about-timeline h2,
.team-copy h2,
.about-partners h2,
.about-founder h2 { font-size: var(--text-h2); }

/* Eyebrows: small restrained kickers, anthracite-secondary for AA on light. */
.why-eyebrow,
.belief-eyebrow {
  margin: 0 0 var(--space-3);
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.why-sub {
  margin: 0 0 var(--space-6);
  font-size: var(--text-small);
  color: var(--color-text-secondary);
}

/* Guiding principles: 7/5 message-led split (standard pair, not 50/50).
   Text carries the meaning; the 4:5 stage illustrates it. Off-white ground,
   terracotta human markers, sage hairlines — no new tokens. */
.why-layout {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--space-7);
  /* Stretch locks the stage to the accordion's full height: the row is as
     tall as the taller side, and the frame fills it — never 50/50 widths,
     never mismatched heights. */
  align-items: stretch;
}

.why-layout--text { grid-template-columns: minmax(0, 760px); }

.why-head { margin: 0; }

.why-point { border-top: 1px solid color-mix(in srgb, var(--tmj-sage) 55%, var(--tmj-off-white)); }
.why-point:last-child { border-bottom: 1px solid color-mix(in srgb, var(--tmj-sage) 55%, var(--tmj-off-white)); }

.why-btn {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  min-height: 44px;
  padding: var(--space-4) 0;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Index: terracotta counting mark (mega-num vernacular), always on so the
   four principles scan as a sequence even when collapsed. */
.why-index {
  flex: 0 0 auto;
  min-width: 32px;
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--tmj-terracotta);
  font-variant-numeric: tabular-nums;
}

.why-word {
  flex: 1;
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  color: var(--tmj-anthracite);
}

/* Active principle: title takes the people accent; collapsed titles rest in
   anthracite so the open one is unmistakable. No colour boxes. */
.why-point.is-open .why-word { color: var(--tmj-terracotta); }

/* Plus marker: people-accent bars that settle into a rule when open. */
.why-mark {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: calc(var(--space-4) * -1) calc(var(--space-2) * -1) calc(var(--space-4) * -1) 0;
}

.why-mark::before,
.why-mark::after {
  content: "";
  position: absolute;
  background: var(--tmj-terracotta);
  border-radius: var(--radius-pill);
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.why-mark::before { left: 14px; top: 21px; width: 16px; height: 2px; }
.why-mark::after { left: 21px; top: 14px; width: 2px; height: 16px; }

.why-point.is-open .why-mark::after { transform: rotate(90deg); opacity: 0; }

.why-panel p {
  margin: 0;
  padding: 0 0 var(--space-4) 48px;
  max-width: 62ch;
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--color-text);
}

/* Collapsed states exist only under .why-live (added by about-why.js);
   no-JS renders every principle open. Open panel eases in, 250ms. */
.why-live .why-panel { display: none; }
.why-live .why-point.is-open .why-panel { display: block; }
.why-live .why-point.is-open .why-panel p { animation: why-in 250ms cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes why-in {
  from { opacity: 0; transform: translateY(-6px); }
}

/* 4:5 portrait stage — same Sand wash + radius language as the home wall,
   image-only: the accordion is the single driver, opening a principle swaps
   the photograph with a quiet fade. Signature: a sage offset mat rhyming
   with the founder portrait below. The frame flexes to the accordion's
   height via stretch. */
.why-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 380px;
}

.why-stage::before {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  border-radius: var(--radius-lg);
  background: var(--tmj-sage);
}

.why-frame {
  position: relative;
  flex: 1;
  margin: 0;
  min-height: 340px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--tmj-sand);
}

.why-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  transition: opacity 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Principle-linked swap: JS fades out, swaps src, fades back in. */
.why-frame img.is-fading { opacity: 0; }

/* Belief: single editorial column on sand. Anthracite on sand is the
   highest-contrast warm pairing in the system, and sand steps calmly
   between the off-white Why Stage above and the anthracite stat band below.
   The lede carries a terracotta people-rule (pull-quote vernacular) so the
   section keeps an anchor without a second headline. */
.about-belief {
  background: var(--tmj-sand);
  padding: var(--space-9) 0;
}

.belief-lede {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-5);
  border-left: 3px solid var(--tmj-terracotta);
  max-width: 760px;
  font-size: var(--text-lede);
  line-height: 1.65;
  color: var(--tmj-anthracite);
}

.belief-single > p:last-child {
  margin: 0;
  max-width: 62ch;
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--tmj-anthracite);
}

.about-founder {
  background: var(--color-bg-secondary);
  padding: var(--space-8) 0;
}

.about-founder .about-grid {
  display: grid;
  grid-template-columns: 4.5fr 7.5fr;
  grid-template-areas:
    "media head"
    "media copy";
  gap: 0 var(--space-7);
  align-items: start;
}

.about-founder h2 {
  grid-area: head;
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
}

.about-founder h2::before {
  content: "";
  flex: 0 0 auto;
  width: 24px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--tmj-terracotta);
  transform: translateY(-6px);
}

.about-founder figure {
  grid-area: media;
  position: relative;
  margin: 0;
  isolation: isolate;
}

.about-founder figure::after {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  border-radius: 160px 160px var(--radius-lg) var(--radius-lg);
  background: var(--tmj-sage);
  z-index: -1;
}

.about-founder .about-copy { grid-area: copy; max-width: 62ch; }

.about-founder img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 160px 160px var(--radius-lg) var(--radius-lg);
  border: 3px solid var(--tmj-terracotta);
  background: var(--tmj-sand);
  padding: var(--space-2);
}

.about-founder .about-copy p { margin: 0 0 var(--space-4); }

.about-founder .about-copy > p:first-child {
  font-size: var(--text-lede);
  line-height: 1.6;
}

/* Demo stat band: anthracite ground, yellow action numbers, sand labels. */
.about-stats {
  background: var(--tmj-anthracite);
  padding: var(--space-8) 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  text-align: left;
}

/* Tally figures — counted piles, no decorative tick. */

.stat-num {
  margin: 0 0 var(--space-2);
  font-family: var(--font-heading);
  font-size: clamp(48px, 5vw, 64px);
  line-height: 1;
  color: var(--tmj-yellow);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin: 0;
  font-size: var(--text-small);
  color: var(--tmj-sand);
}

/* Timeline: terracotta rail, years as the sequence markers. */
.about-timeline {
  background: var(--color-bg);
  padding: var(--space-8) 0;
}

.about-timeline h2 { margin: 0 0 var(--space-6); }

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 760px;
  border-left: 3px solid var(--tmj-sand);
}

/* Scroll progress: terracotta fill drawn by timeline.js. Sand track stays
   as the full journey; fill shows how far down it you have travelled. */
.timeline-progress {
  position: absolute;
  left: -3px;
  top: 0;
  width: 3px;
  height: 0;
  border-radius: var(--radius-pill);
  background: var(--tmj-terracotta);
}

.timeline-live li {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 500ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-live li.in { opacity: 1; transform: none; }

.timeline li {
  position: relative;
  padding: 0 0 var(--space-5) var(--space-5);
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  /* Track (ol border-left) occupies x -3..0, center -1.5; a 13px dot
     centers on it exactly at left -8px. Do not "correct" to -5px. */
  left: -8px;
  top: 8px;
  width: 13px;
  height: 13px;
  border-radius: var(--radius-pill);
  background: var(--tmj-terracotta);
}

/* Live journey: hollow upcoming stops that fill terracotta as the scroll
   passes them; the year ignites with them. Static fallback stays filled. */
.timeline-live li::before {
  background: var(--tmj-sand);
  border: 2px solid var(--tmj-terracotta);
  transition:
    background 300ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-live li.passed::before,
.timeline-live li:hover::before {
  background: var(--tmj-terracotta);
}

.timeline-live li:hover::before { transform: scale(1.25); }

.tl-year {
  margin: 0 0 var(--space-1);
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: 400;
  color: var(--tmj-anthracite);
  transition: color 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tl-title {
  margin: 0 0 var(--space-1);
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--tmj-anthracite);
}

.tl-hi {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-3);
  border-left: 3px solid var(--tmj-terracotta);
  font-weight: 700;
}

.timeline-live li.passed > .tl-year { color: var(--tmj-terracotta); }

.timeline li > p:last-child { margin: 0; max-width: 680px; }

/* Ecosystem teaser: sand soft card, photo + invitation. */
.about-team {
  background: var(--color-bg-secondary);
  padding: var(--space-8) 0;
}

.team-card {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-7);
  align-items: center;
  background: var(--tmj-off-white);
  border: 1px solid var(--tmj-sand);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.team-media { margin: 0; }

.team-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.team-copy h2 { margin: 0 0 var(--space-3); }
.team-copy p { margin: 0 0 var(--space-4); max-width: 680px; }

/* Community voice: terracotta pull-quote rule (people accent). */
.about-voice {
  background: var(--color-bg);
  padding: var(--space-8) 0;
}

.about-quote {
  margin: 0;
  max-width: 760px;
  padding: var(--space-2) 0 var(--space-2) var(--space-6);
  border-left: 3px solid var(--tmj-terracotta);
}

.about-quote p {
  margin: 0 0 var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-pullquote);
  line-height: 1.5;
  color: var(--color-primary);
}

.about-quote cite { font-style: normal; font-size: var(--text-small); color: var(--color-text-secondary); }
.about-quote cite a { color: inherit; }

/* Partners: editorial logo wall. Quiet off-white tiles with sage hairlines;
   the rhythm varies by group size (wide / feature / compact) while the
   system stays one. Skeleton labelled honestly until real logo files land. */
.about-partners {
  background: var(--color-bg-secondary);
  padding: var(--space-9) 0;
}

.partners-kicker {
  width: 40px;
  height: 4px;
  margin: 0 0 var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--tmj-terracotta);
}

.about-partners h2 { margin: 0 0 var(--space-2); }

.partners-intro {
  margin: 0 0 var(--space-7);
  max-width: 640px;
  color: var(--color-text-secondary);
  font-size: var(--text-body);
}

.partner-group + .partner-group { margin-top: var(--space-6); }

/* Funders / Collaborators side-by-side on desktop, stacked below. */
.partner-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-6);
}

.partner-duo .partner-group + .partner-group { margin-top: 0; }

/* Duo rows: one filled flex row per group (3 funders / 2 collaborators). */
.partner-duo .partner-grid { display: flex; }

.partner-duo .partner-tile { flex: 1 1 0; min-width: 0; }

.partner-duo + .partner-group { margin-top: var(--space-6); }

.partner-label {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid color-mix(in srgb, var(--tmj-sage) 55%, var(--tmj-off-white));
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tmj-anthracite);
}

.partner-label::before {
  content: "";
  flex: 0 0 auto;
  width: 24px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--tmj-terracotta);
  transform: translateY(-3px);
}

.partner-grid { display: grid; gap: var(--space-4); }
.partner-grid--wide { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.partner-grid--feature { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.partner-grid--compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.partner-tile {
  background: var(--tmj-off-white);
  border: 1px solid color-mix(in srgb, var(--tmj-sage) 55%, var(--tmj-off-white));
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.partner-tile:hover {
  transform: translateY(-2px);
  border-color: var(--tmj-terracotta);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--tmj-anthracite) 12%, transparent);
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 104px;
}

.partner-grid--feature .partner-logo { height: 136px; }
.partner-grid--compact .partner-logo { height: 80px; }

.partner-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.partner-tile:hover .partner-logo img { transform: scale(1.03); }

.partner-name {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-small);
  font-weight: 700;
  color: var(--tmj-anthracite);
  text-wrap: balance;
}

.about-cta {
  background: var(--color-bg);
  padding: var(--space-8) 0;
}

.about-cta .btn-ghost {
  display: inline-block;
  padding: var(--space-2) var(--space-5);
  border: 2px solid var(--tmj-anthracite);
  border-radius: var(--radius-sm);
  color: var(--tmj-anthracite);
  font-size: var(--text-body);
  font-weight: 700;
  text-decoration: none;
  transition: background 200ms cubic-bezier(0.22, 1, 0.36, 1), color 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.about-cta .btn-ghost:hover { background: var(--tmj-anthracite); color: var(--tmj-off-white); }

@media (max-width: 1023px) {
  .why-layout { grid-template-columns: 1fr; }
  .why-stage { max-width: 520px; min-height: 0; }
  .why-frame { flex: none; height: auto; min-height: 0; aspect-ratio: 4 / 5; }
  .partner-duo { grid-template-columns: 1fr; }
  .partner-grid--wide,
  .partner-grid--compact { grid-template-columns: repeat(3, 1fr); }
  .partner-grid--feature { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  /* Mobile keeps the visual story: the stage docks after the open principle
     (relocated by about-why.js) at near-full width, 4:3 anchor. */
  .why-list .why-stage { max-width: none; margin: var(--space-4) 0; }
  .why-list .why-frame { aspect-ratio: 4 / 3; }
  .why-panel p { padding-left: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  /* Duo rows fall back to the standard 2-up grid on phones. */
  .partner-duo .partner-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
  .partner-grid--wide,
  .partner-grid--feature,
  .partner-grid--compact { grid-template-columns: repeat(2, 1fr); }
  .team-card { grid-template-columns: 1fr; }
  .about-founder .about-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "media"
      "copy";
    /* Desktop gap is column-only (0 row); stacked rows need their own air
       or head/media/copy pile onto each other. */
    gap: var(--space-5) 0;
  }
  /* Contain the portrait: cap the width, soften the arch for narrow screens,
     and pull the sage backing's overhang back so it can't collide with the
     copy it now sits 24px above. */
  .about-founder figure { max-width: 440px; }
  .about-founder figure::after {
    inset: 8px -8px -8px 8px;
    border-radius: 120px 120px var(--radius-md) var(--radius-md);
  }
  .about-founder img { border-radius: 120px 120px var(--radius-md) var(--radius-md); }
}

@media (prefers-reduced-motion: reduce) {
  .why-frame img { transition: none; }
  .why-live .why-point.is-open .why-panel p { animation: none; }
}
