/* ==========================================================================
   TeamTrek — case studies
   --------------------------------------------------------------------------
   Built on the blog's components: the same hero band, the same card, the
   same gradient visuals and the same pills. Nothing in blog.css is changed
   here; this file only adds what a story needs and a post does not.

   What a story needs is the number. A blog card is read for its headline, a
   case-study card for its result, so the card gains a strip that carries
   the figure and a foot that says who the company is rather than who wrote
   it. The featured story gets the figures on a dark panel beside the copy,
   because the first thing on the page should be evidence rather than prose.

   Every name, logo and figure on this page is invented. The page says so
   once, in section 03, rather than printing a wall of plausible-looking
   customer logos.
   ========================================================================== */

/* ============================================= the featured story ======== */
.csfeat {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  margin-top: 2.5rem;
  overflow: hidden;
  border: 1px solid var(--primary-200); border-radius: 20px;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 24px 48px -32px rgb(16 24 40 / .28);
  transition: transform var(--dur-ui) var(--ease-ui),
              box-shadow var(--dur-ui) var(--ease-ui);
}
.csfeat:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 56px -30px rgb(16 24 40 / .32);
}
.csfeat:focus-visible { outline: 2px solid var(--primary-600); outline-offset: 3px; }

.csfeat__body {
  display: flex; flex-direction: column; justify-content: center; gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.75rem);
}
.csfeat__tag {
  margin: 0;
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary-700);
}
.csfeat__tag b { color: var(--neutral-900); }
.csfeat__title {
  margin: 0;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  line-height: 1.2; letter-spacing: -.025em; font-weight: 700;
  color: var(--neutral-900);
  max-width: 24ch;
}
.csfeat:hover .csfeat__title { color: var(--primary-800); }
.csfeat__copy {
  margin: 0; max-width: 56ch;
  font-size: 1.0625rem; line-height: 1.65; color: var(--neutral-600);
}
.csfeat__link {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .9375rem; font-weight: 700; color: var(--primary-700);
}

/* The figures, on the dark ground the closing panels use. Two of them, not
   five: a reader remembers one number from a case study and forgets the
   rest, so the panel names the one that matters and one that frames it. */
.csfeat__nums {
  display: flex; flex-direction: column; justify-content: center; gap: 1.75rem;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  background:
    radial-gradient(26rem 18rem at 80% 0%, var(--primary-600) 0%, transparent 62%),
    var(--primary-800);
  color: #fff;
}
.csfeat__num b {
  display: block;
  font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1; letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.csfeat__num span {
  display: block; margin-top: .5rem;
  font-size: .875rem; color: rgba(255, 255, 255, .78);
}

/* ================================================ who uses TeamTrek ====== */
.cstypes {
  display: grid; gap: 1.5rem;
  /* Four segments, four columns at most: auto-fit was laying a fifth track
     on a wide screen, which left the row looking like a list with
     something missing from it. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  max-width: 76rem;
  margin-top: 2.5rem;
}
.cstype { padding-top: 1rem; border-top: 2px solid var(--primary-600); }
.cstype h3 {
  margin: 0;
  font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--neutral-900);
}
.cstype p { margin: .5rem 0 0; font-size: .9375rem; line-height: 1.6; color: var(--neutral-600); }

/* ==================================================== the story card ===== */
/* The blog card, plus the figure. The strip sits above the foot so a reader
   scanning the column of results never has to read a headline to find
   one. */
.post__result {
  display: flex; align-items: baseline; gap: .5rem;
  margin: 0 0 1rem;
  padding: .625rem .75rem;
  border-radius: var(--r-sm);
  background: var(--primary-50);
  font-size: .875rem; color: var(--neutral-600);
}
.post__result b {
  font-size: 1rem; font-weight: 700; color: var(--primary-800);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* A story card's foot says who the company is; a post's says who wrote
   it. */
.post__company { font-weight: 600; color: var(--neutral-700); }

/* The number the card's visual carries, in place of the blog's icon. */
.post__figure {
  position: relative; z-index: 1;
  padding: .625rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--primary-100);
  background: #fff;
  font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em;
  color: var(--primary-800);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 10px 24px -14px rgb(16 24 40 / .35);
  transition: transform var(--dur-ui) var(--ease-ui);
}
.post:hover .post__figure { transform: translateY(-2px) scale(1.03); }

/* ===================================================== the quote ======== */
.csquote { max-width: 52rem; margin-inline: auto; text-align: center; }
.csquote blockquote {
  margin: 0;
  font-size: clamp(1.375rem, 1rem + 1.4vw, 1.875rem);
  line-height: 1.32; letter-spacing: -.025em; font-weight: 600;
  color: var(--neutral-900);
  text-wrap: balance;
}
.csquote figcaption {
  margin-top: 1.5rem;
  font-size: .9375rem; color: var(--neutral-600);
}
.csquote__mark {
  display: block; width: 2.5rem; height: 2px; margin: 0 auto 1.5rem;
  border-radius: 2px; background: var(--primary-500);
}

/* ================================================== the demo band ======= */
.cshelp {
  display: grid; gap: 1.5rem; align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--neutral-200); border-radius: 20px;
  background:
    radial-gradient(30rem 14rem at 12% 0%, var(--primary-50) 0%, transparent 70%),
    #fff;
}
.cshelp__title {
  margin: 0;
  font-size: clamp(1.25rem, 1rem + .9vw, 1.625rem);
  line-height: 1.25; letter-spacing: -.02em; font-weight: 700;
  color: var(--neutral-900);
}
.cshelp p { margin: .75rem 0 0; font-size: 1rem; line-height: 1.6; color: var(--neutral-600); }
.cshelp__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* The line that says the stories are illustrative. It is not small print:
   a reader who believes an invented figure and finds out later has been
   misled by the page. */
.csnote {
  margin-top: 1.5rem;
  font-size: .8125rem; line-height: 1.6; color: var(--neutral-500);
}

/* ====================================================== responsive ======= */
@media (min-width: 900px) {
  .cshelp { grid-template-columns: minmax(0, 1fr) auto; }
}

@media (max-width: 899px) {
  /* The numbers go under the story rather than beside it: a 1fr column of
     figures beside a headline is a sliver once the row is under 900px. */
  .csfeat { grid-template-columns: minmax(0, 1fr); }
  .csfeat__nums { flex-direction: row; flex-wrap: wrap; gap: 1.5rem 2.5rem; }
}

@media (max-width: 639px) {
  .csfeat__nums { flex-direction: column; gap: 1.25rem; }
  .post__result { font-size: .8125rem; }
  .csnote { font-size: .8125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .csfeat,
  .post__figure { transition: none; }
  .csfeat:hover { transform: none; }
  .post:hover .post__figure { transform: none; }
}

/* ================================================ the stories grid ======= */
/* Three across, not the archive's auto-fill: without a rail beside it the
   grid went four up, and a story card at 280px put its headline on four
   lines. */
@media (min-width: 1100px) {
  #stories .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 640px) and (max-width: 1099px) {
  #stories .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  #stories .posts { grid-template-columns: minmax(0, 1fr); }
}

/* One gradient arrangement per industry, as the blog does per topic, so the
   grid is scannable before the labels are read. */
.post[data-industry="Agency"] .post__visual {
  --at-a: 18% 26%; --at-b: 78% 34%; --at-c: 58% 88%;
}
.post[data-industry="BPO"] .post__visual {
  --at-a: 30% 78%; --at-b: 70% 20%; --at-c: 12% 40%;
}
.post[data-industry="Software"] .post__visual {
  --at-a: 74% 72%; --at-b: 26% 24%; --at-c: 88% 20%;
}
.post[data-industry="Remote"] .post__visual {
  --at-a: 50% 18%; --at-b: 20% 74%; --at-c: 82% 66%;
}
