/* Nossa história: chapters of SOCEO's story in the Teams editorial system.
   Loads before team-pages.css, so overrides use the .team-page scope plus a
   page class. Colors and type come from the destination tokens. */

.team-page :is(#primeira-pergunta, #origem, #primeiro-socio, #fundacao, #uso-real, #evolucao, #ainda-construindo,
  #historia-2024, #historia-2025, #historia-2026, [id^="fundacao-"]) {
  scroll-margin-top: calc(var(--soceo-nav-height, 76px) + 24px);
}

.team-page .story-accent { color: var(--team-accent); }

.team-page .story-page-label,
.team-page .story-section-head .team-page__label,
.team-page .case-reading .team-page__label,
.team-page .story-partner__head .team-page__label,
.team-page .story-next .team-page__label {
  margin-bottom: 14px;
}

/* Opening ---------------------------------------------------------------- */

.team-page .story-plate {
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.team-page .story-plate .team-page__example-header .team-page__label { color: var(--team-muted); }
.story-plate__body {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 2vw, 28px);
}
.team-page .story-art {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px solid var(--team-rule);
  border-radius: 5px;
  background: var(--destination-lilac) var(--destination-grain);
}
.team-page .story-art svg { display: block; width: 100%; max-width: 420px; height: auto; }
.team-page .story-art--hero { min-height: 150px; }
.team-page .story-art--hero svg { max-width: 360px; }
.team-page .story-plate__words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 12px;
  color: var(--team-ink);
  font: 600 clamp(1.1rem, 1.7vw, 1.45rem)/1.2 var(--team-display);
  letter-spacing: -.02em;
}
.team-page .story-plate__words > span[aria-hidden] { color: var(--team-accent); font-weight: 400; }
.team-page .story-plate__map { min-height: 0; padding: clamp(10px, 1.4vw, 18px); }
.team-page .story-plate__caption {
  padding: 11px clamp(16px, 2vw, 28px);
  border-top: 1px solid var(--team-rule);
  color: var(--team-muted);
  font: 400 .72rem/1.4 var(--team-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Year strip -------------------------------------------------------------- */

.team-page .story-years {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px clamp(18px, 3vw, 44px);
  padding-block: 14px;
  background: var(--team-panel);
}
.team-page .story-years ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.team-page .story-years ol a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--team-rule);
  border-radius: 5px;
  background: var(--team-bg);
  color: var(--team-muted);
  font-size: .82rem;
  transition: background .16s ease, border-color .16s ease;
}
.team-page .story-years ol strong {
  color: var(--team-ink);
  font: 600 1.15rem/1 var(--team-display);
  letter-spacing: -.02em;
}
.team-page .story-years ol a:hover,
.team-page .story-years ol a[aria-current] {
  border-color: #a18ab4;
  background: #f4eff7;
}
.team-page .story-years ol a[aria-current] strong { color: var(--team-accent); }
.team-page .story-years .story-years__now {
  color: var(--team-accent);
  font-size: .85rem;
  text-decoration: underline;
  text-decoration-color: #a497c8;
  text-underline-offset: 4px;
}

/* Shared chapter heads ---------------------------------------------------- */

.team-page .story-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: end;
  gap: clamp(20px, 5vw, 72px);
}
.team-page .story-section-head h2 { max-width: 20ch; }
.team-page .story-section-head > p {
  max-width: 46ch;
  color: var(--team-muted);
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.65;
}
.team-page .case-reading.story-base p + p,
.team-page .case-reading.story-shift p + p { margin-top: 1em; }
.team-page .story-shift strong { color: var(--team-ink); font-weight: 600; }

/* Base: the principle ----------------------------------------------------- */

.team-page .story-quote {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: clamp(22px, 3vw, 40px);
  border: 1px solid #c7b8d1;
  border-radius: 6px;
  background: var(--team-panel);
  box-shadow: 5px 5px 0 #e9e2ef;
}
.team-page .story-quote blockquote { margin: 0; }
.team-page .story-quote blockquote p {
  margin: 0;
  max-width: none;
  color: var(--team-ink);
  font: 600 clamp(1.7rem, 3.2vw, 2.7rem)/1.08 var(--team-display);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.team-page .story-quote figcaption {
  order: 1;
  color: var(--team-muted);
  font-size: .9rem;
}
.team-page .story-quote .story-quote__areas {
  order: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--team-rule);
}
.story-quote__areas li {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 6px;
  border: 1px solid var(--team-rule);
  border-radius: 4px;
  background: #f8f4fb;
  color: var(--team-ink);
  text-align: center;
  font: 400 clamp(.66rem, .9vw, .78rem)/1.25 var(--team-mono);
}

/* The first Sócio --------------------------------------------------------- */

.team-page .story-partner__head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: end;
  gap: clamp(20px, 5vw, 72px);
}
.team-page .story-partner__head h2 { max-width: 24ch; }
.team-page .story-partner__lede {
  max-width: 46ch;
  color: var(--team-muted);
  line-height: 1.65;
}
.team-page .story-manifesto {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: end;
  gap: 12px 40px;
  margin: clamp(28px, 3.5vw, 48px) 0 0;
  padding: clamp(26px, 3.6vw, 52px) clamp(22px, 3.6vw, 52px);
  border-radius: 6px;
  background: var(--brand-navy);
  color: #fff;
}
.team-page .story-manifesto blockquote { margin: 0; }
.team-page .story-manifesto blockquote p {
  color: #fff;
  font: 600 clamp(1.75rem, 3.6vw, 3.1rem)/1.06 var(--team-display);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.team-page .story-manifesto figcaption {
  max-width: 26ch;
  color: #d8cde6;
  font: 400 .74rem/1.5 var(--team-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.team-page .story-manifesto figcaption strong { color: #fff; font-weight: 400; }
.team-page h3.story-subhead {
  margin-top: clamp(30px, 3.5vw, 46px);
  color: var(--team-accent);
  font: 400 .75rem/1.4 var(--team-mono);
  letter-spacing: .085em;
  text-transform: uppercase;
}
.team-page .story-rules { margin-top: 14px; }
.team-page .story-rules .team-page__job > p:last-child {
  color: var(--team-muted);
  font: 400 .8rem/1.4 var(--team-mono);
}

/* Foundation -------------------------------------------------------------- */

.team-page .story-foundation__rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(26px, 3vw, 40px);
  padding-block: 12px;
  border-block: 1px solid var(--team-rule);
}
.team-page .story-foundation__rail ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.team-page .story-foundation__rail a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--team-muted);
  font-size: .84rem;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.team-page .story-foundation__rail a span { color: var(--team-accent); font: 400 .72rem/1 var(--team-mono); }
.team-page .story-foundation__rail a:hover,
.team-page .story-foundation__rail a[aria-current] {
  border-color: #c7b8d1;
  background: #f4eff7;
  color: var(--team-ink);
}
.team-page .story-foundation__steps { display: grid; }
.team-page .story-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 7vw, 110px);
  padding-block: clamp(28px, 4vw, 60px);
  border-bottom: 1px solid var(--team-rule);
}
.team-page .story-step__plate { position: relative; }
.team-page .story-step .story-art {
  min-height: 0;
  aspect-ratio: 360 / 204;
  padding: clamp(12px, 2vw, 26px);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.team-page .story-step.is-active .story-art {
  border-color: #b9a4ca;
  box-shadow: 5px 5px 0 #e9e2ef;
}
.team-page .story-step__index {
  position: absolute;
  top: 12px;
  left: 14px;
  color: var(--team-accent);
  font: 400 .75rem/1 var(--team-mono);
}
.team-page .story-step h3 {
  margin-block: 10px 14px;
  font-size: clamp(1.55rem, 2.5vw, 2.5rem);
  letter-spacing: -.035em;
  line-height: 1.1;
}
.team-page .story-step__copy > p:last-child { max-width: 52ch; color: var(--team-muted); line-height: 1.65; }
@media (min-width: 801px) {
  .team-page .story-step:nth-child(even) .story-step__plate { order: 1; }
}
.team-page .story-band {
  margin-top: clamp(28px, 3.5vw, 48px);
  padding: clamp(24px, 3.2vw, 44px) clamp(22px, 3.6vw, 52px);
  border-radius: 6px;
  background: var(--brand-navy);
  color: #d8cde6;
  font: 400 clamp(1.1rem, 1.7vw, 1.4rem)/1.5 Inter, Arial, sans-serif;
}
.team-page .story-band strong { display: block; margin-top: 6px; color: #fff; font: 600 clamp(1.45rem, 2.6vw, 2.2rem)/1.15 var(--team-display); letter-spacing: -.03em; }

/* Timeline ---------------------------------------------------------------- */

.team-page .story-timeline__list { margin-top: clamp(26px, 3vw, 40px); border-top: 1px solid var(--team-rule); }
.team-page .story-moment {
  display: grid;
  grid-template-columns: minmax(120px, .55fr) minmax(0, 1.6fr) minmax(180px, .7fr);
  align-items: start;
  gap: clamp(20px, 4vw, 60px);
  padding-block: clamp(28px, 4vw, 56px);
  border-bottom: 1px solid var(--team-rule);
}
.team-page .story-moment__year { display: grid; gap: 6px; }
.team-page .story-moment__year span {
  color: var(--team-accent);
  font: 600 clamp(3rem, 5.4vw, 5rem)/.95 var(--team-display);
  letter-spacing: -.05em;
}
.team-page .story-moment__year small { color: var(--team-muted); font: 400 .78rem/1.4 var(--team-mono); letter-spacing: .06em; text-transform: uppercase; }
.team-page .story-moment__body h3 {
  margin-block: 10px 14px;
  font-size: clamp(1.55rem, 2.6vw, 2.4rem);
  letter-spacing: -.035em;
  line-height: 1.1;
}
.team-page .story-moment__body > p:not(.team-page__label) { max-width: 60ch; color: var(--team-muted); line-height: 1.65; }
.team-page .story-moment__body .story-moment__note {
  margin-top: 16px;
  padding-left: 14px;
  border-left: 2px solid var(--team-accent);
  color: var(--team-ink);
  font-weight: 600;
}
.team-page .story-motors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}
.story-motors li {
  padding: 5px 10px;
  border: 1px solid var(--team-rule);
  border-radius: 4px;
  background: var(--team-panel);
  color: var(--team-ink);
  font: 400 .76rem/1.3 var(--team-mono);
}
.team-page .story-signal {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 22px 16px 18px;
  border: 1px solid var(--team-rule);
  border-radius: 6px;
  background: radial-gradient(#ccbed3 .8px, transparent .9px) 0 0 / 9px 9px, #f3eef6;
  text-align: center;
}
.team-page .story-signal__marks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.team-page .story-signal__mark,
.team-page .story-cycle__flow li span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #cbbcd2;
  border-radius: 5px;
  background: #fffdfa;
}
.team-page .story-signal__mark svg { width: 34px; height: 34px; }
.team-page .story-signal p { color: var(--team-accent); font: 400 .74rem/1.45 var(--team-mono); }

/* Real use ---------------------------------------------------------------- */

.team-page .story-cycle { margin-top: clamp(26px, 3vw, 40px); }
.team-page .story-cycle .team-page__example-header h3 { margin: 0; color: var(--team-muted); font: 400 .68rem/1.4 var(--team-mono); letter-spacing: .055em; }
.team-page .story-cycle__body { padding: clamp(18px, 2.4vw, 34px); }
.team-page .story-cycle .story-cycle__flow { margin: 0; padding-block: 22px; }
.team-page .story-cycle__flow li { font-size: .82rem; }
.team-page .story-cycle__flow li:not(:last-child)::before { top: 23px; left: calc(50% + 28px); width: calc(100% - 56px); }
.team-page .story-cycle__flow li span svg { width: 32px; height: 32px; }
.team-page .story-cycle__flow li:last-child span { background: #e2ede6; border-color: #a9c2b5; }
.team-page .story-cycle__steps { margin-top: 22px; }
.team-page .story-band--quote { display: grid; gap: 10px; }
.team-page .story-band--quote .team-page__label { color: #cdb8f2; }
.team-page .story-band--quote blockquote { margin: 0; }
.team-page .story-band--quote blockquote p { max-width: 58ch; color: #fff; font: 500 clamp(1.2rem, 1.9vw, 1.6rem)/1.4 var(--team-display); letter-spacing: -.015em; }

/* Evolution --------------------------------------------------------------- */

.team-page .story-stages__list { padding: clamp(16px, 2vw, 28px); }
.story-stages__list li {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 0 14px 34px;
  color: var(--team-muted);
  font-size: .9rem;
  line-height: 1.5;
}
.story-stages__list li + li { border-top: 1px solid var(--team-rule); }
.story-stages__list li::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 4px;
  width: 12px;
  height: 12px;
  border: 1px solid #9375aa;
  border-radius: 50%;
  background: #fff;
}
.story-stages__list li::after {
  content: "";
  position: absolute;
  top: 33px;
  bottom: -19px;
  left: 10px;
  border-left: 1px solid #ad97bf;
}
.story-stages__list li:last-child::after { content: none; }
.story-stages__list li:last-child::before { background: #76578f; border-color: #76578f; }
.team-page .story-stages__list strong { color: var(--team-ink); font: 600 1.3rem/1.15 var(--team-display); letter-spacing: -.02em; }

/* Still building ---------------------------------------------------------- */

.team-page .story-next {
  display: grid;
  grid-template-columns: minmax(80px, .3fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 60px);
  align-items: start;
}
.team-page .story-next__line {
  display: block;
  height: 1px;
  margin-top: 46px;
  background: linear-gradient(90deg, transparent, var(--team-accent));
}
.team-page .story-next h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.team-page .story-next p:not(.team-page__label) { max-width: 56ch; margin-top: 14px; color: var(--team-muted); line-height: 1.65; }
.team-page .story-next .team-page__example-link { margin-top: 10px; }

/* Focus ------------------------------------------------------------------- */

.team-page .story-years a:focus-visible,
.team-page .story-foundation__rail a:focus-visible {
  outline: 2px solid var(--team-accent);
  outline-offset: 3px;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 1000px) {
  .team-page .story-moment { grid-template-columns: minmax(100px, .5fr) minmax(0, 1.6fr); }
  .team-page .story-signal { grid-column: 2; justify-items: start; text-align: left; grid-template-columns: auto 1fr; align-items: center; }
}

@media (max-width: 800px) {
  .team-page .story-section-head,
  .team-page .story-partner__head,
  .team-page .story-step,
  .team-page .story-manifesto,
  .team-page .story-next { grid-template-columns: minmax(0, 1fr); }
  .team-page .story-next__line { display: none; }
  .team-page .story-years { grid-template-columns: minmax(0, 1fr); }
  .team-page .story-moment { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .team-page .story-moment__year { grid-template-columns: auto 1fr; align-items: baseline; gap: 12px; }
  .team-page .story-signal { grid-column: auto; }
}

@media (max-width: 560px) {
  .team-page .story-quote .story-quote__areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-page .story-years ol a { flex-direction: column; gap: 4px; padding: 8px 10px; }
  .team-page .story-cycle .story-cycle__flow li { font-size: .72rem; }
  .team-page .story-signal__mark,
  .team-page .story-cycle__flow li span { width: 40px; height: 40px; }
  .team-page .story-cycle__flow li:not(:last-child)::before { top: 20px; left: calc(50% + 24px); width: calc(100% - 48px); }
}

@media (prefers-reduced-motion: reduce) {
  .team-page :is(.story-years a, .story-foundation__rail a, .story-step .story-art) { transition: none; }
}

/* Rhythm: lilac chapters alternate with paper, as on the Teams pages. ----- */

.team-page .story-origin,
.team-page .story-timeline,
.team-page .story-shift {
  background: var(--destination-lilac) var(--destination-grain);
}
.team-page .story-timeline .story-signal { background: radial-gradient(#ccbed3 .8px, transparent .9px) 0 0 / 9px 9px, #f8f5fa; }
.team-page .story-timeline .story-motors li { background: #fffdfa; }
.team-page .case-reading p.team-page__label { margin-top: 0; color: var(--team-accent); }
.team-page figure.story-band { margin-inline: 0; }
.team-page figure.story-plate { margin: 0; }
@media (max-width: 560px) {
  .team-page .story-plate .team-page__example-header { flex-wrap: wrap; gap: 4px 14px; padding-block: 8px; }
}
