/* ==========================================================================
   TeamTrek — one customer story
   --------------------------------------------------------------------------
   The parts a story has that an article does not: the numbers before the
   prose, the three things that were true before, the rollout as dated
   steps, the before-and-after bars, the quote, and the product pages the
   story earned a link to.

   Everything else on the page is borrowed and unchanged. The masthead,
   the prose column, the contents rail, the share toolbar and the progress
   line are article.css; the cards at the foot are blog.css; the quote
   frame and the demo band are case-studies.css. A reader moving between a
   blog post and a story should not have to learn a second interface.

   THE STORIES ARE COMPOSED. No part of this sheet should make a figure
   look audited: the glance band carries its note in the same type as its
   numbers, and the quote prints what it is under the attribution.
   ========================================================================== */

/* ----------------------------------------------------------- the cover
   The cards drive their fields off data-cat; a story drives them off
   data-industry, so the four trades read apart at a glance. The cover
   itself is article.css -- this only moves the fields.
   ------------------------------------------------------------------------ */
.blogmast__cover[data-industry="Agency"] .post__visual {
  background:
    radial-gradient(26% 66% at 16% 30%, var(--primary-400) 0%, transparent 70%),
    radial-gradient(24% 60% at 42% 86%, var(--primary-200) 0%, transparent 72%),
    radial-gradient(24% 60% at 64% 20%, var(--primary-200) 0%, transparent 72%),
    radial-gradient(26% 66% at 88% 64%, var(--primary-300) 0%, transparent 70%),
    radial-gradient(40% 56% at 50% 50%, var(--primary-100) 0%, transparent 74%),
    var(--neutral-25);
}

/* The company card is the article's author card with one change: the
   avatar holds a mark rather than initials.

   The .mock-avatar rules live in mocks.css, which is the product
   explorer's sheet -- 11KB of dashboard furniture this page has no other
   use for. The two declarations it needs are restated here instead. */
.snap .mock-avatar {
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--primary-500, #16A394); color: #fff;
}

/* ------------------------------------------------ the cover's own floor
   On an article the cover hangs onto white, so the band's white floor is
   exactly as tall as the hang and the seam is invisible. Here it hangs
   onto the ink band, and a floor that stops at the picture's last pixel
   makes the two read as one welded object. The floor runs 3.5rem past the
   masthead instead, so the picture sits on white and the band starts
   below it.
   ------------------------------------------------------------------------ */
.blogmast--story::after { bottom: -3.5rem; height: 14.5rem; }
@media (max-width: 899px) {
  .blogmast--story::after { bottom: -2rem; height: 7rem; }
}

/* --------------------------------------------------- the page's rhythm
   The cover hangs 11rem below the masthead, exactly as it does on an
   article -- so the section under it has to clear that, and on a story
   that section is the glance band rather than #article. The story then
   opens tight under the band: the numbers and the first paragraph are
   one thought, not two sections.
   ------------------------------------------------------------------------ */
#glance { padding-top: 19rem; padding-bottom: 4rem; }
#story { padding-top: 3.5rem; padding-bottom: 5rem; }
@media (max-width: 899px) {
  #glance { padding-top: 10.5rem; padding-bottom: 3.5rem; }
  #story { padding-top: 2.5rem; padding-bottom: 4rem; }
}

/* -------------------------------------------------------- at a glance
   The numbers, before a word of the story, on the brand rather than on
   white. A reader arrives from a card that promised 6h to 45m; this pays
   that off in the first screen of the body, and the ink band makes it the
   one object on the page that cannot be skimmed past.

   Same gradient as the closing panel and the offer inside the prose, so
   the three dark things on the page are the same dark thing.
   ------------------------------------------------------------------------ */
.glanceband {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-600) 100%);
  color: #fff;
}

/* No heading and no card. Four figures standing on the band, divided by
   a hairline rather than boxed: the band is already the thing that says
   "these are the numbers", so a title would say it twice and a panel
   would put a second edge inside the first. */
.glance {
  margin: 0;
  display: grid; gap: 2.5rem 0;
}
@media (min-width: 720px) { .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .glance { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.glance__item {
  display: flex; flex-direction: column; gap: .875rem;
  padding: 0;
}
/* The rules sit between the columns, not around them. On one and two
   column layouts they would cut across the band, so they only appear
   once the figures are side by side. */
/* Two-up only. Left unbounded, these :nth-child rules out-specify the
   four-up block below -- which is why the third figure sat flush against
   its own divider. */
@media (min-width: 720px) and (max-width: 1099px) {
  .glance__item { padding-inline: 2rem; }
  .glance__item:nth-child(odd) { padding-left: 0; }
  .glance__item:nth-child(even) { border-left: 1px solid rgb(255 255 255 / .2); padding-right: 0; }
}
@media (min-width: 1100px) {
  .glance__item { padding-inline: 2.25rem; }
  .glance__item:first-child { padding-left: 0; }
  .glance__item:last-child { padding-right: 0; }
  .glance__item + .glance__item { border-left: 1px solid rgb(255 255 255 / .2); }
}

/* The label under the figure, not over it: the number is what a skimmer
   stops on, and the label is what explains it once they have. */
.glance__item dt {
  order: 2;
  font-size: .8125rem; line-height: 1.45; font-weight: 500;
  color: rgb(255 255 255 / .72);
}
/* Figure, then where it came from, then the chip: a column, so the three
   read in that order at every width rather than re-wrapping. */
.glance__item dd {
  margin: 0; order: 1;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: .25rem;
  /* One result has no chip -- there is no percentage change in "day one".
     Without a floor its label climbed into the row the chips occupy and
     the four labels stopped sharing a line. */
  min-height: 5.25rem;
}

/* The figure, where it came from, and the size of the move.

   The strike-through said "this is gone" and nothing said how big the
   move was, so three unlike numbers read as three equal ones. The chip
   carries the change and the "from" line carries the starting point in
   plain type -- one weight for the figure, one for everything under it.
   ------------------------------------------------------------------------ */
.glance__now {
  font-size: 1.5rem; font-weight: 800;
  line-height: 1.15; letter-spacing: -.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.glance__from {
  font-size: .875rem; font-weight: 500; line-height: 1.4;
  color: rgb(255 255 255 / .6);
  font-variant-numeric: tabular-nums;
}
/* One pill, white on the band at 14%, which is readable without becoming
   a second figure competing with the one above it. */
.glance__delta {
  align-self: flex-start;
  margin-top: .125rem;
  padding: .25rem .5625rem;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / .14);
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ the pains
   Three things that were true on a Friday, before the prose starts. It
   sits inside .prose, so it carries its own list rules rather than
   inheriting the article's.
   ------------------------------------------------------------------------ */
.pains {
  margin: 0 0 2rem;
  padding: 1.25rem 1.375rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: var(--neutral-25, #FAFBFB);
}
.pains__label {
  margin: 0 0 1rem;
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--neutral-500);
}
/* .prose ul carries a 20px indent, disc markers and its own gap, and it
   out-specifies a single class -- so these two lists state the prose in
   their own selectors rather than losing to it. Without this the marks
   sit on top of the text they belong to. */
.prose .pains__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
}
.prose .pains__list > li { padding-left: 0; }
.pain { display: flex; align-items: flex-start; gap: .875rem; }
.pain__mark {
  flex: none;
  display: inline-grid; place-items: center;
  width: 2rem; height: 2rem;
  border-radius: var(--r-md, 10px);
  background: #fff; border: 1px solid var(--neutral-200);
  color: var(--neutral-500);
}
.pain > span:last-child {
  font-size: .9375rem; line-height: 1.6; color: var(--neutral-600);
}
.pain b { display: block; color: var(--neutral-900); }

/* --------------------------------------------------------- the rollout
   Dated steps. The date is the point: a reader deciding whether to do
   this wants to know what the second week looked like, not that there
   were four stages.
   ------------------------------------------------------------------------ */
.prose .steps {
  list-style: none; margin: 2rem 0; padding: 0;
  display: grid; gap: 0;
  border-left: 2px solid var(--neutral-150, #EDEFEF);
}
.prose .steps > .steps__item {
  position: relative;
  display: grid; gap: .25rem;
  /* 2rem of it, not 1.5: the dot is 10px wide and sits astride the rule,
     so a 24px indent left four pixels between the mark and the word. */
  padding: 0 0 1.75rem 2rem;
}
.prose .steps > .steps__item:last-child { padding-bottom: 0; }
.steps__item::before {
  content: ""; position: absolute;
  left: -6px; top: .3125rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary-600);
  box-shadow: 0 0 0 4px #fff;
}
.steps__when {
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary-700);
}
.steps__body { font-size: .9375rem; line-height: 1.6; color: var(--neutral-600); }
.steps__body b { display: block; color: var(--neutral-900); }

/* ------------------------------------------------------ before and after
   Named .csba, not .ba: page.css already owns .ba__row for the policy
   table on the product pages, and that one is a four-column grid.
   One row per measure, two bars each. The bars are drawn from the same
   numbers as the glance band: the band is for a skimmer, this is for a
   reader who wants the shape of the change.
   ------------------------------------------------------------------------ */
.csba {
  display: grid; gap: 1.25rem;
  padding: 1.375rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
}
.csba__row + .csba__row { padding-top: 1.25rem; border-top: 1px solid var(--neutral-150, #EDEFEF); }

.csba__top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 0 0 .75rem;
}
.csba__name { font-size: .875rem; font-weight: 700; color: var(--neutral-900); }
.csba__delta {
  font-size: .8125rem; font-weight: 700; color: var(--primary-700);
  font-variant-numeric: tabular-nums;
}

.csba__bars { display: grid; gap: .375rem; }
.csba__bar {
  position: relative;
  display: block; height: 1.75rem; width: var(--w);
  min-width: 4.5rem;
  border-radius: var(--r-pill);
  background: var(--neutral-150, #EDEFEF);
}
.csba__bar.is-after { background: var(--primary-600); }
/* The value sits inside its own bar, which is why the bar has a floor
   width: 12.5% of a column is narrower than the word it carries. */
.csba__bar b {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 .75rem;
  font-size: .8125rem; font-weight: 700;
  color: var(--neutral-600);
  font-variant-numeric: tabular-nums;
}
.csba__bar.is-after b { color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  .csba__bar { transition: width .5s var(--ease-ui, ease); }
}

/* ------------------------------------------------------------ the quote
   Full measure, no card. The attribution says what the speaker is rather
   than who, because there is no customer behind it yet and a name would
   read as one.
   ------------------------------------------------------------------------ */
.bigquote {
  margin: 2.5rem 0;
  padding: 1.75rem 0 0;
  border-top: 2px solid var(--primary-600);
}
.bigquote blockquote {
  margin: 0; padding: 0; border: 0;
  font-size: 1.375rem; line-height: 1.5; font-weight: 600;
  letter-spacing: -.01em; color: var(--neutral-900);
}
.bigquote figcaption {
  margin-top: 1rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .625rem;
  font-size: .8125rem; font-weight: 600; color: var(--neutral-600);
}
.bigquote__note {
  padding: .1875rem .5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-pill);
  background: var(--neutral-25, #FAFBFB);
  font-size: .6875rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--neutral-500);
}

/* ------------------------------------------------------- what they use
   The internal links the story earned. Four product pages, each with the
   one line that says why this team is on it.
   ------------------------------------------------------------------------ */
/* The head needs its own floor: .section__head carries no bottom margin,
   so without this the standfirst sat on the first card. 3rem is the step
   the product pages use under the same block. */
#features .section__head { margin-bottom: 3rem; }

.feats { display: grid; gap: 1rem; }
@media (min-width: 720px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.feat {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
  color: inherit; text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.feat:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-01);
  transform: translateY(-2px);
}
.feat:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .feat:hover { transform: none; } }

.feat__mark {
  flex: none;
  display: inline-grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: var(--r-md, 10px);
  background: var(--primary-50, #E7F4F1); color: var(--primary-700);
}
.feat__text { display: grid; gap: .1875rem; min-width: 0; }
.feat__text b { font-size: .9375rem; font-weight: 700; color: var(--neutral-900); }
.feat__text span { font-size: .8125rem; line-height: 1.5; color: var(--neutral-600); }
.feat__go { flex: none; margin-left: auto; color: var(--neutral-400); }
.feat:hover .feat__go { color: var(--primary-700); }

/* ----------------------------------------------------------- more stories
   The listing's auto-fill track is right for a grid of eleven; for a row
   of three it leaves 280px of empty page on the right, and the heading
   sits on the cards because .posts carries no top margin of its own.
   -------------------------------------------------------------------- */
#more .posts { margin-top: 3rem; }
#more .posts__more { margin-top: 2.5rem; }
@media (min-width: 900px) {
  #more .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------ the phone
   Nothing here goes under 12px, and the two things that are numbers --
   the glance figure and the bar labels -- keep their weight so a skimmer
   on a phone gets the same reading as one on a desktop.
   ------------------------------------------------------------------------ */
@media (max-width: 639px) {
  .glance__now { font-size: 1.375rem; }
  .pains { padding: 1rem 1.125rem; }
  .bigquote blockquote { font-size: 1.125rem; }
  .csba { padding: 1.125rem; }
  .csba__top { flex-direction: column; gap: .125rem; }
  .csba__bar b { font-size: .75rem; padding: 0 .625rem; }
  .feat { padding: 1rem; gap: .875rem; }
}
