/*
   ground, the 596fr/496fr grid, --hero-h1, quote card, case card, insights,
   circle arrows, pagination bars, and the <=899px stack. Tokens resolve via
    */
/* WP gap: ACF renders no outer wrapper — the block classes land on section.hero
   itself, so neutralize the constrained-layout blockGap HERE (doubled class
    */
.wp-block-acf-hero-cases.wp-block-acf-hero-cases{margin-block-start:0;margin-block-end:0}
.hero{
  --hero-h1:clamp(40px, 3.9474vw + 4.47px, 55px);
  position:relative;
  background:#1a0b33 url("./hero-bg.webp") center/cover no-repeat;
  overflow:hidden;
  color:#fff;
  margin:0;
  font-family:var(--sb-font,Inter, "Inter Fallback",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif);
}
/* Three columns of content in two: copy over quote on the left, the case-study
   card spanning both rows on the right. Placing them explicitly lets the quote
   drop below the card once the hero stacks. */
.hero .inner{
  max-width:var(--page);
  margin-inline:auto;
  padding:7.5rem var(--gutter) 4.6875rem;
  display:grid;
  /* the Figma 596/496 split, kept as a ratio so it scales below 1280; the
     gap opens up as it narrows so the card's left arrow clears the copy */
  grid-template-columns:minmax(0,596fr) minmax(0,496fr);
  column-gap:clamp(0.875rem, -6.8421vw + 6.34875rem, 2.5rem);row-gap:0;
  align-items:start;
}
.hero-copy{position:relative;max-width:37.25rem;grid-column:1;grid-row:1}
.hero-quotes{grid-column:1;grid-row:2;max-width:37.25rem}
.hero-cases{grid-column:2;grid-row:1 / span 2}
.hero h1{
  margin:0;
  color:#fff;
  font-size:var(--hero-h1);line-height:1.5017;font-weight:800;
  letter-spacing:-.5px;
}
/* red hand-drawn underline sits under the 2nd heading line */
/* drawn with preserveAspectRatio="none", so forcing a height taller than the
   viewBox fattened the stroke into a double line — keep the intrinsic ratio */
.hero-h1__mark{position:relative;white-space:nowrap;display:inline-block}
.hero-underline{
  /* v.6 review: spans the last two words, just under their baseline */
  position:absolute;left:-0.04em;bottom:-0.22em;
  width:calc(100% + 0.08em);height:auto;pointer-events:none;
}
.hero-copy .lead{margin:2.125rem 0 0;max-width:37.25rem;font-size:1.125rem;line-height:1.75rem;color:#fff}

.hero-quote{
  margin:2.4375rem 0 0;
  background:#fff;color:var(--ink);
  border-radius:var(--radius-lg);
  width:33.1875rem;max-width:100%;
  padding:1.625rem 1.5625rem;
  display:flex;flex-direction:column;gap:0.8125rem;
}
.hero-quote .mark{width:1.625rem;height:1.4375rem;transform:rotate(180deg)}
.hero-quote blockquote{margin:0;padding:0;font-size:1rem;line-height:1.625rem;color:var(--ink)}
.hero-quote figcaption{display:flex;align-items:center;gap:1.375rem;margin:0;font-size:0.875rem;line-height:1.875rem;font-weight:500;color:var(--ink)}
.hero-quote figcaption .rule{width:1.5rem;height:2px;background:var(--purple);flex:none}
.hero-quote figcaption span{color:var(--ink)}
.hero-quote figcaption em{color:var(--body);font-style:italic}

/* case-study carousel */
.hero-cases{
  width:31rem;max-width:100%;
  align-self:start;
  margin-top:-2.0625rem; /* card sits 33px above the copy column (Figma y=87 vs 120) */
}
.hero-quote[hidden],.case-card[hidden]{display:none}
.case-card{
  background:#fff;color:var(--ink);
  border-radius:var(--radius);
  padding:0.75rem 0.8125rem 1rem;
}
.case-card__shot{
  display:block;
  width:100%;height:auto;aspect-ratio:471/277;
  border-radius:var(--radius);object-fit:cover;
  background:#f4f5f7;
}
/* stand-in for a slide whose screenshot is still an empty frame in Figma */
.case-card__ph{
  width:100%;
  aspect-ratio:471/277;
  background:
    linear-gradient(135deg,rgba(119,41,255,.06),rgba(119,41,255,.02)),
    repeating-linear-gradient(45deg,#f4f5f7 0 12px,#eef0f3 12px 24px);
}
.case-card__head{
  display:flex;align-items:center;justify-content:space-between;gap:1.25rem;
  margin:1.5rem 0.375rem 0.75rem;
}
.case-card__head h3{margin:0;font-size:clamp(1.0625rem, 0.7895vw + 0.618125rem, 1.25rem);line-height:1.5;font-weight:600;color:var(--ink)}

.insights{
  background:#fff;border-radius:var(--radius);
  padding:1.3125rem 0.6875rem 0.75rem;
}
.insights__label{
  margin:0;
  color:var(--body);font-size:0.75rem;line-height:1.875rem;font-weight:600;
  text-transform:uppercase;letter-spacing:.2px;
}
.insights__hero{display:flex;align-items:center;gap:0.5rem;margin-top:0.25rem}
.insights__hero b{color:var(--purple);font-size:2.5rem;line-height:2.75rem;font-weight:700}
.insights__hero span{color:var(--body);font-size:0.875rem;line-height:1.25rem;font-weight:500;max-width:20.3125rem}
.insights__rule{height:2px;background:var(--rule);margin:0.875rem 2px;border-radius:2px}
.insights__stats{display:grid;grid-template-columns:1fr 1fr;gap:0.5rem}
.stat-chip{background:var(--bg-soft);border-radius:var(--radius);padding:0.5625rem 0.4375rem 0.25rem 0.625rem}
.stat-chip{min-width:0}
.stat-chip b{display:block;font-size:1rem;line-height:1.25rem;font-weight:700;overflow-wrap:anywhere;color:var(--ink)}
.stat-chip span{display:block;color:var(--body);font-size:0.75rem;line-height:1.25rem;font-weight:500}

.hero .linkline{
  display:inline-flex;align-items:center;gap:0.5rem;
  padding:0.25rem 0 0.1875rem;
  position:relative;
  font-size:1rem;line-height:1.75rem;font-weight:600;
  text-decoration:none;white-space:nowrap;color:var(--ink);
}
.hero .linkline::after{
  content:"";position:absolute;left:0;right:0;bottom:0;
  height:2px;background:var(--purple);
}
.hero .linkline img{width:0.9375rem;height:0.9375rem;flex:none}
.hero .linkline:hover{opacity:.72}
/* card title-row link stays 12px: same specificity as .hero .linkline but
    */
.hero .case-card__head .linkline{font-size:0.75rem}

/* v.3 review: the arrows use the site's circle style and sit on the card's
   left and right edges, centred on it; pagination bars take their old place
   at the foot of the card. Only one card is shown, so 50% of .hero-cases is
   the middle of the visible card. */
.hero-cases{position:relative}
.partners__nav{
  position:absolute;top:50%;transform:translateY(-50%);
  width:2.75rem;height:2.75rem;border-radius:50%;
  background:#fff;border:1px solid var(--rule);
  display:flex;align-items:center;justify-content:center;
  box-shadow:var(--shadow-card);
  z-index:2;transition:opacity .2s ease;
}
.partners__nav:hover{border-color:var(--purple)}
.partners__nav[disabled]{opacity:.3;cursor:default}
.partners__nav::before{
  content:"";width:0.625rem;height:0.625rem;
  border-top:2px solid var(--ink);border-right:2px solid var(--ink);
}
/* The chevron is two borders of a rotated square, so its ink sits ~2.8px to
   one side of the box centre. Translating in page space puts the glyph
   itself on the circle's centre. */
.partners__nav--prev::before{transform:translateX(0.175rem) rotate(-135deg)}
.partners__nav--next::before{transform:translateX(-0.175rem) rotate(45deg)}
.hero-cases .hero-cases__nav{top:50%}
.hero-cases .partners__nav--prev{left:-1.625rem}
.hero-cases .partners__nav--next{right:-1.625rem}
/*
   own .hero-dots{margin-top:1rem} comes FIRST, but the generic carousel rule
    */
.hero-dots{margin-top:1rem}
.partners__dots{display:flex;gap:0.625rem;justify-content:center;margin-top:4rem}
.partners__dots button{width:4rem;height:0.25rem;border-radius:var(--radius);background:var(--rule-dim);display:block;padding:0}
.partners__dots button[aria-current="true"]{background:var(--purple)}

/*
   all point at section.clients nodes y 879-982).
     div.clients__viewport mask-image/-webkit-mask-image =
       linear-gradient(90deg, rgba(0,0,0,0), rgb(0,0,0) 40px,
         rgb(0,0,0) calc(100% - 40px), rgba(0,0,0,0));
       clears the computed-color reds on the viewport + all track imgs).
   section.clients scoping outranks the shared single-class rules so the
    */
section.clients{color:#000}
section.clients > div.clients__viewport{
  -webkit-mask-image:linear-gradient(90deg, rgba(0, 0, 0, 0), rgb(0, 0, 0) 40px, rgb(0, 0, 0) calc(100% - 40px), rgba(0, 0, 0, 0));
  mask-image:linear-gradient(90deg, rgba(0, 0, 0, 0), rgb(0, 0, 0) 40px, rgb(0, 0, 0) calc(100% - 40px), rgba(0, 0, 0, 0));
}
section.clients .clients__track img{object-fit:contain}
/* Figma-box sizes: the mirrored asset files' intrinsic ratios differ from the
   is 225x225 but paints 66x61), so the shared `height:auto` follows the file
   ratio and distorts the rect (aspect red 0.39->0.58 on the 90x35 logo) which
   in turn mis-pairs neighbours (the two img order reds). Pin each logo to its
   img rects w/h (66x61, 74x25, 97x25, 80x47, 90x35, 52x51, 150x35, 132x41 x3,
   80x69, 132x41 x2, 179x49, 157x43, 85x87). 16n+k covers both marquee copies. */
section.clients .clients__track img:nth-child(16n+1){width:66px;height:61px}
section.clients .clients__track img:nth-child(16n+2){width:74px;height:25px}
section.clients .clients__track img:nth-child(16n+3){width:97px;height:25px}
section.clients .clients__track img:nth-child(16n+4){width:80px;height:47px}
section.clients .clients__track img:nth-child(16n+5){width:90px;height:35px}
section.clients .clients__track img:nth-child(16n+6){width:52px;height:51px}
section.clients .clients__track img:nth-child(16n+7){width:150px;height:35px}
section.clients .clients__track img:nth-child(16n+8){width:132px;height:41px}
section.clients .clients__track img:nth-child(16n+9){width:132px;height:41px}
section.clients .clients__track img:nth-child(16n+10){width:132px;height:41px}
section.clients .clients__track img:nth-child(16n+11){width:80px;height:69px}
section.clients .clients__track img:nth-child(16n+12){width:132px;height:41px}
section.clients .clients__track img:nth-child(16n+13){width:132px;height:41px}
section.clients .clients__track img:nth-child(16n+14){width:179px;height:49px}
section.clients .clients__track img:nth-child(16n+15){width:157px;height:43px}
section.clients .clients__track img:nth-child(16n+16){width:85px;height:87px}
section.clients > p.clients__label{text-align:right}

/* stacked: copy, then the case study, then its quote underneath */
@media (max-width:899px){
  .hero .inner{grid-template-columns:1fr;column-gap:0;row-gap:3rem;padding:5rem var(--gutter) 3rem}
  .hero-copy{grid-column:1;grid-row:1}
  .hero-cases{grid-column:1;grid-row:2}
  .hero-quotes{grid-column:1;grid-row:3;max-width:none}
  .hero-quote{margin-top:0}
  .hero h1{font-size:2.5rem;line-height:3.75rem}
  .hero-underline{display:none}
  .hero-quote,.hero-cases{width:100%}
  .hero-cases .partners__nav--prev{left:0.875rem}
  .hero-cases .partners__nav--next{right:0.875rem}
}
/*
   it beats our own .hero .linkline nowrap above (same specificity, later
   wins) and the card-head link wraps to its measured 124x63 mobile box. */
@media (max-width:860px){
  .hero .linkline{white-space:normal}
}
/*
   h1 32/42, inner padding 48/var(--gutter)/32, card padding-bottom 30,
   dots margin-top 26 + 48px bars, navs drop to foot of card (top:auto,
   bottom:10px, transform:none, 14px insets), stats stack to 1fr. */
@media (max-width:640px){
  .hero h1{font-size:2rem;line-height:2.625rem}
  .hero .inner{padding:3rem var(--gutter) 2rem}
  .case-card{padding-bottom:1.875rem}
  .hero-dots{margin-top:1.625rem}
  .hero-cases .hero-cases__nav{top:auto;bottom:0.625rem;transform:none}
  .hero-cases .partners__nav--prev{left:0.875rem}
  .hero-cases .partners__nav--next{right:0.875rem}
  .hero-dots button{width:3rem}
  .insights__stats{grid-template-columns:1fr}
}
