/* The Horizon story card: a client name, an optional headline figure, one line
   of proof and a link to the story. Two pages print it — the Readiness Audit's
   proof strip and the /horizon/ hub — and neither loads the other's sheet, so
   it lives here once rather than as a copy in each (the success-story card
   drifted to two sizes that way; see story-card.css). The `ra-` prefix is
   where it was born, in offer-page.css, and is kept so the audit's markup did
   not have to change when the rules moved. */

.ra-proof-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px; }
/* Solid near-black rather than glass: these sit in a .ra-dark band, and a
   10% glass fill over the band's indigo glow took the 14px red kicker to
   4.0:1. On #121211 it is 5.09. */
.ra-proof-case {
  background: var(--color-background-dark);
  border: 1px solid var(--color-glass-border); border-radius: var(--radius-panel);
  min-height: 300px; padding: 32px; display: flex; flex-direction: column; justify-content: space-between;
  text-decoration: none; color: inherit; transition: border-color .2s ease;
}
.ra-proof-case:hover { border-color: var(--color-brand-red); }
.ra-proof-case:focus-visible {
  outline: 2px solid var(--color-text-primary);
  outline-offset: 3px;
  border-radius: 2px;
}
.ra-proof-case-kicker {
  font-family: var(--font-sans);
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--color-text-brand);
}
.ra-proof-case-body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.125rem; font-weight: 400; line-height: 1.5; color: var(--color-text-secondary);
}
.ra-proof-case-link {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 12px; margin-top: 24px;
  padding: 4px 0 3px; border-bottom: 1px solid var(--color-brand-red);
  font-family: var(--font-sans);
  font-size: 1rem; font-weight: 600; color: var(--color-text-primary);
}

/* A featured card spans the row and leads on a headline figure. */
.ra-proof-case-featured { grid-column: 1 / -1; min-height: 0; justify-content: flex-start; }
.ra-proof-case-stat {
  margin: 20px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.4vw, 4rem); font-weight: 500; line-height: 1.05; letter-spacing: 0.01em;
  color: var(--color-text-primary);
}
/* The arrow is the shared icon, not a typed "→": Publico ships as a Latin
   subset, so the glyph fell back to a heavy system arrow at this size. */
/* Two unbreakable halves, so a narrow card wraps it as "3 months / → 1 month"
   rather than stranding "month" on a line of its own. */
.ra-proof-case-stat > span { white-space: nowrap; }
.ra-proof-case-stat .icon { width: 0.7em; height: 0.7em; margin: 0 0.1em; vertical-align: 0.02em; }
.ra-proof-case-featured .ra-proof-case-body { max-width: 760px; }

@media (max-width: 991px) {
  .ra-proof-cases { grid-template-columns: 1fr; }
}

/* ==========================================================================
   The Horizon story card with art — the Readiness Audit's three-up under its
   hero. An adaptation of the homepage "The work" card (.hx-story in home.css,
   which this page does not load): the same parts in the same type — a story's
   card art, an Ash badge, the white client mark, a Calibre 500 headline over a
   secondary line, and the "Explore Success Story" foot as the card's
   one link, stretched over it, with the arrow nudge on hover. Sized down for
   a three-up in the container rather than a 393px rail, and the art sits
   above the copy instead of under it: the homepage's card art carries a
   baked scrim for overlaid type, and the story files' `card.webp` does not.
   Solid near-black with the glass hairline, like .ra-proof-case, rather than
   the homepage's per-card tone, so no card needs a colour of its own.

   The markup is generated by src/pages/horizon/readiness-audit.astro from the
   story files, so the art and the mark cannot drift from the study. The
   Journey Leak Report (/redesign-growth/) prints the same card in its AG1
   story strip, where the grid is a <div> of <article>s because its second
   row pairs a card with a quote rather than with another story.
   ========================================================================== */
.ra-stories {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
}
.ra-story {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  margin: 0; overflow: hidden;
  background: var(--color-background-dark);
  border: 1px solid var(--color-glass-border); border-radius: var(--radius-card);
  transition: border-color .2s ease;
}
.ra-story:hover { border-color: rgb(255 255 255 / 0.4); }
/* overflow: hidden is what makes the aspect ratio hold: a column flex item's
   automatic minimum height is its content's, so art that is not 1200x640
   (buybuy BABY's card is 480x342) pushed its own panel taller than the row's
   others. Hidden overflow drops that minimum to zero. */
.ra-story__media { aspect-ratio: 1200 / 640; overflow: hidden; background: var(--color-neutral-800); }
.ra-story__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ra-story__content {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start;
  padding: 24px 24px 0;
}
.ra-story__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ra-story__logo {
  display: block; width: auto; height: 36px; max-width: 160px; margin-top: 20px;
  object-fit: contain; object-position: left center;
}
/* A stacked lockup (mark over wordmark, e.g. True Botanicals') at 36px sets
   its wordmark at ~8px; this gives it the height a wordmark gets for width. */
.ra-story__logo--stacked { height: 56px; max-width: 180px; }
.ra-story__brand { margin: 20px 0 0; font-family: var(--font-sans); font-size: 1.75rem; font-weight: 600; line-height: 36px; color: var(--color-neutral-white); }
.ra-story__metric {
  margin: 20px 0 0;
  font-family: var(--font-sans);
  font-size: 2rem; font-weight: 500; line-height: 1.1;
  color: var(--color-neutral-white);
}
/* The bottom margin keeps the foot off a short line (Dropps'); the foot's
   auto margin does the rest of the alignment across a row. */
.ra-story__line {
  margin: 8px 0 24px;
  font-family: var(--font-sans);
  font-size: 1.125rem; font-weight: 400; line-height: 1.4;
  color: var(--color-text-secondary);
}
.ra-story__link {
  display: flex; align-items: center; justify-content: space-between; align-self: stretch;
  box-sizing: border-box; height: 64px; margin-top: auto; padding: 0.314em 0 0;
  border-top: 1px solid var(--color-glass-border);
  font-family: var(--font-sans);
  font-size: 1.125rem; font-weight: 600;
  color: var(--color-neutral-white); text-decoration: none;
}
.ra-story__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-card); }
.ra-story__link .icon--arrow-ds { position: relative; top: -2.5px; font-size: 17px; transition: transform .2s ease; }
.ra-story:hover .ra-story__link .icon--arrow-ds { transform: translateX(4px); }
.ra-story__link:focus-visible { outline: none; }
.ra-story__link:focus-visible::after { outline: 2px solid var(--color-neutral-white); outline-offset: -2px; }

/* A story visitor's own card: landscape across the row, art on the left half
   and the copy on the right, with a larger figure. The two cards after it
   pair up under it (two-across only while the grid is — it stacks below
   992px). */
.ra-story--featured { grid-column: 1 / -1; }
@media (min-width: 992px) {
  html[data-story] .ra-stories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ra-story--featured { flex-direction: row; }
  .ra-story--featured .ra-story__media { flex: 0 0 50%; aspect-ratio: auto; min-height: 380px; }
  .ra-story--featured .ra-story__content { padding: 40px 40px 0; }
  .ra-story--featured .ra-story__metric { font-size: clamp(2.75rem, 4vw, 3.5rem); }
  .ra-story--featured .ra-story__line { font-size: 1.25rem; max-width: 460px; }
}
/* Three standard cards and no featured one (the Journey Leak Report's BFCM
   strip) stay three across: the story-visitor rule above would pair them and
   orphan the third. */
@media (min-width: 992px) {
  html[data-story] .ra-stories--trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* A card with no client art (an anonymised case): the Anatta mark on the
   media panel's own ground, so the row keeps one shape. */
.ra-story__media--mark { display: grid; place-items: center; }
.ra-story__media--mark img { display: block; width: auto; height: 33%; }
@media (max-width: 991px) {
  .ra-stories { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 479px) {
  .ra-story__content { padding: 20px 20px 0; }
  .ra-story__metric { font-size: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ra-story, .ra-story__link .icon--arrow-ds { transition: none; }
  .ra-story:hover .ra-story__link .icon--arrow-ds { transform: none; }
}

/* ==========================================================================
   The story banner, above the H1 of an offer page for a visitor arriving from
   a success story (src/lib/story-journeys.js): the Readiness Audit's for Dose
   Daily, the Journey Leak Report's for AG1. It was born in offer-page.css and
   moved here when the second page needed it, for the same reason the story
   card above lives here — /redesign-growth/ is a dr-offer.css page and does
   not load offer-page.css.

   A white card on the black hero — the one light object in it, the way the
   Audit's document mock was — so its own type is ink on white: the fill-step
   red (5.0:1) for the kicker, --ink-soft (4.95:1) for the struck-through
   figure.
   ========================================================================== */
.ra-story-banner {
  display: grid; grid-template-columns: 72px auto minmax(0, 1fr) auto;
  align-items: center; gap: 16px;
  box-sizing: border-box; max-width: 680px; margin: 0 0 32px; padding: 16px 20px;
  background: var(--color-neutral-white);
  border: 1px solid var(--color-border-inverse-subtle);
  border-left: 4px solid var(--color-brand-red-fill);
  border-radius: var(--radius-card);
  font-family: var(--font-sans); color: var(--ink);
}
/* A campaign rather than a story (BFCM): a red pill where the photo and the
   mark go, and no "back to" link. */
.ra-story-banner--pill { grid-template-columns: auto minmax(0, 1fr); gap: 20px; }
.ra-story-banner__pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.5em 0.9em 0.4em; border-radius: 999px;
  background: var(--color-brand-red-fill); color: var(--color-neutral-white);
  font-size: 0.875rem; font-weight: 600; line-height: 1; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.ra-story-banner__pill svg { width: 16px; height: 16px; flex: none; position: relative; top: -0.08em; }
.ra-story-banner__photo { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-card); }
.ra-story-banner__logo { display: block; width: auto; height: 28px; }
.ra-story-banner__text { min-width: 0; }
.ra-story-banner__kicker {
  margin: 0 0 4px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.3; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-text-brand-on-light);
}
.ra-story-banner__line { margin: 0; font-size: 1.125rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.ra-story-banner__line s { color: var(--ink-soft); font-weight: 600; text-decoration-thickness: 2px; }
.ra-story-banner__link {
  display: inline-flex; align-items: center; gap: 10px; justify-self: end;
  padding: 4px 0 3px;
  border-bottom: 1px solid var(--color-brand-red-fill);
  font-size: 1rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
  color: var(--ink); text-decoration: none;
}
.ra-story-banner__link .icon { position: relative; top: -0.157em; transition: transform .2s ease; }
.ra-story-banner__link:hover { color: var(--color-text-brand-on-light); }
.ra-story-banner__link:hover .icon { transform: translateX(3px); }
.ra-story-banner__link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
/* On a phone the photo and the mark share the top row, the copy wraps under
   them and the link takes a row of its own. */
@media (max-width: 600px) {
  .ra-story-banner {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas: "photo logo" "text text" "link link";
    gap: 14px 16px;
  }
  .ra-story-banner__photo { grid-area: photo; }
  .ra-story-banner__logo { grid-area: logo; }
  .ra-story-banner__text { grid-area: text; }
  .ra-story-banner__link { grid-area: link; justify-self: start; }
  .ra-story-banner--pill { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pill" "text"; gap: 12px; }
  .ra-story-banner__pill { grid-area: pill; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .ra-story-banner__link .icon { transition: none; transform: none !important; }
}

/* Large-desktop tier (see tokens.css): from 1680px the column is 1344px and
   the root type 18px, so what this sheet draws in px takes the same step —
   layout widths x1.2, px type x1.125, the 1118/1164 column measures to 1344.
   Keep a value here in step with its base rule above. */
@media (min-width: 1680px) {
  .ra-proof-case { min-height: 360px; }
  .ra-proof-case-featured { min-height: 0; }
  .ra-proof-case-featured .ra-proof-case-body { max-width: 912px; }
  .ra-story__logo { max-width: 160px; }
  .ra-story__logo--stacked { max-width: 180px; }
  .ra-story__link .icon--arrow-ds { font-size: 19px; }
  .ra-story--featured .ra-story__media { min-height: 456px; }
  .ra-story--featured .ra-story__metric { font-size: clamp(2.75rem, 4vw, 3.5rem); }
  .ra-story--featured .ra-story__line { font-size: 1.25rem; max-width: 552px; }
  .ra-story-banner { max-width: 816px; }
  .ra-story-banner__pill { font-size: 0.875rem; }
  .ra-story-banner__kicker { font-size: 0.75rem; }
  .ra-story-banner__line { font-size: 1.125rem; }
  .ra-story-banner__link { font-size: 1rem; }
}
