/* page/success-stories.css — page-scoped styling for success-stories.html only.
   Composes tokens + classes from components/styles.css, components/case-cards.css
   and home/home-flagship.css (R-04/R-05). Loads LAST.

   The card grid itself is NOT styled here — .cc-grid / .cc-overlay / .cc-cap in
   case-cards.css already own the cards and their 3->2->1 column responsive
   steps. This file adds only what the shared component doesn't cover: the
   masthead, the aggregate proof strip, and the grid's own vertical rhythm. */

/* ---------------- Masthead ----------------
   Deliberately compact: this is an index page, so the masthead orients and
   gets out of the way — the 15-card collection is the content, and it should
   start near the fold rather than below a full-height hero. */
.ss-mast { padding-top: clamp(48px, 7vw, 84px); padding-bottom: clamp(32px, 5vw, 56px); }
.ss-mast__inner { max-width: var(--content); text-align: center; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.ss-mast .kicker { justify-content: center; }
.ss-mast__title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; color: var(--primary);
  margin: 8px 0 12px; text-wrap: balance;
}
.ss-mast__sub { font-size: clamp(14px, 1.4vw, 15.5px); line-height: 1.55; color: var(--text); max-width: 58ch; margin: 0 auto; }

/* ---------------- Aggregate proof strip ----------------
   Numbers are stated in black type, never the gradient (R-02). */
.ss-proof {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin: clamp(22px, 3vw, 34px) 0 0; padding: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.ss-proof__item { padding: 15px 20px; text-align: center; border-left: 1px solid var(--line); }
.ss-proof__item:first-child { border-left: 0; }
.ss-proof dt { font-size: 11.5px; line-height: 1.35; color: var(--text); margin: 0 0 5px; }
.ss-proof dd {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(17px, 1.9vw, 21px); line-height: 1.1; color: var(--primary); margin: 0;
}

@media (max-width: 860px) {
  .ss-proof { grid-template-columns: repeat(2, 1fr); }
  /* with two per row, the 3rd item starts a new row and must lose its divider */
  .ss-proof__item:nth-child(odd) { border-left: 0; }
  .ss-proof__item:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 420px) {
  .ss-proof__item { padding: 18px 12px; }
  .ss-proof dt { font-size: 11.5px; }
}

/* ---------------- The collection grid ----------------
   .cc-grid brings the columns; this only sets the card aspect for a 15-card
   index (a touch taller than the shared 4/5 default reads better in a long
   wall) and the closing note's rhythm. */
.ss-collection { margin-top: clamp(8px, 2vw, 18px); }
.ss-collection .cc-overlay .cc-media { aspect-ratio: 4 / 4.6; }

/* Reveal fix — page-scoped, does NOT edit the shared component (R-04).
   components/case-cards.css hides each .cc-reveal card with
   clip-path: inset(0 0 100% 0), but Chrome computes IntersectionObserver
   intersections against the element's CLIPPED rect. A clipped card therefore
   reports isIntersecting=false / ratio=0 even when it is dead-centre in the
   viewport, so case-cards.js's observer can never un-hide it — verified over
   CDP: the same card reports ratio 0.000 clipped and 1.000 with the clip
   removed. Only cards above the fold at load (which armReveal() marks
   synchronously) ever appeared; the other 12 stayed invisible forever.
   Dropping the clip here and fading on opacity alone keeps the same reveal
   read, restores the observer, and leaves the hover-lift transform untouched.
   The shared component still needs the real fix — filed separately. */
.ss-collection .cc-reveal {
  clip-path: none;
  transition: opacity 0.5s var(--cc-ease);
}
.ss-collection .cc-reveal.is-in { opacity: 1; }

/* On real touch/small screens the hover-reveal blurb can never fire, so show it
   outright — otherwise the card's only context is brand + metric (R-08: don't
   hide meaning behind an interaction the device can't perform). */
@media (hover: none), (max-width: 640px) {
  .ss-collection .cc-cap__blurb { max-height: none; opacity: 1; transform: none; }
}

.ss-note {
  margin: clamp(28px, 4vw, 40px) 0 0; text-align: center;
  font-size: 13.5px; line-height: 1.6; color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .ss-mast__title, .ss-mast__sub { transition: none; }
}
