/* Sophus3 v64: visual QA fixes
   Corrects homepage media, clipping, card overflow and footer spacing, then
   adds defensive responsive rules discovered during multi-viewport QA. */

/* 1. Research promo: use a real automotive/research image, not an empty decorative panel. */
.page-home .resource-promo53{
  display:grid;
  grid-template-columns:minmax(0,1.06fr) minmax(340px,.94fr);
  gap:34px;
  align-items:stretch;
  padding:34px;
}
.page-home .resource-promo53:before,
.page-home .resource-promo53:after{display:none!important}
.page-home .resource-promo53-copy{min-width:0;display:flex;flex-direction:column;justify-content:center;padding:8px 4px 8px 18px}
.page-home .resource-promo53-copy p{max-width:62ch}
.page-home .resource-promo53-media{position:relative;min-width:0;min-height:330px;margin:0;border:1px solid #b9d0d8;border-radius:16px;overflow:hidden;background:#dfeaec;box-shadow:0 16px 34px rgba(31,55,65,.10)}
.page-home .resource-promo53-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;display:block}
.page-home .resource-promo53-media:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 50%,rgba(12,27,36,.58) 100%);pointer-events:none}
.page-home .resource-promo53-media figcaption{position:absolute;z-index:2;left:18px;right:18px;bottom:16px;margin:0;color:#fff;font-size:12px;line-height:1.45;font-weight:750;letter-spacing:.025em;text-shadow:0 1px 3px rgba(0,0,0,.28)}

/* 2. Keep the complete +129% proof stat inside its card at every supported width. */
.page-home .evidence42-grid{grid-template-columns:minmax(0,1.04fr) minmax(390px,.96fr);gap:64px}
.page-home .evidence42-results{min-width:0;overflow:visible}
.page-home .evidence42-results>strong{display:flex;align-items:flex-start;max-width:100%;font-size:clamp(72px,7vw,112px);line-height:.94;letter-spacing:-.055em;white-space:nowrap;overflow:visible}
.page-home .evidence42-results>strong span{font-size:.52em;line-height:1.05;margin:8px 0 0 2px;letter-spacing:-.03em}
.page-home .evidence42-results>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.page-home .evidence42-results p{min-width:0}

/* 3. Supporting case-study cards need enough vertical room for long, useful headlines. */
.page-home .selected42{grid-template-rows:repeat(2,minmax(315px,1fr));gap:22px}
.page-home .selected42>a:not(:first-child){min-height:315px}
.page-home .selected42>a>div{min-width:0}
.page-home .selected42>a:not(:first-child)>div{padding:26px}
.page-home .selected42>a:not(:first-child) h3{font-size:24px;line-height:1.13;max-width:23ch;margin:10px 0 18px;overflow-wrap:anywhere}
.page-home .selected42 b{display:block;line-height:1.35}

/* 4. Give the global CTA visual breathing room before the dark footer. */
.cta-band{padding-top:34px!important;padding-bottom:36px!important}

/* Defensive layout rules for cards and copy across the site. */
.card,.decision42,.solution-card,.case-story,.case-card-v6,.home-story,.selected42>a,.resource-card53,.cta-panel{min-width:0}
h1,h2,h3,p,a,span,strong,small,dd{overflow-wrap:break-word}
img,svg,video{max-width:100%}

@media(max-width:1100px){
  .page-home .resource-promo53{grid-template-columns:minmax(0,1fr) minmax(300px,.82fr);gap:26px;padding:30px}
  .page-home .resource-promo53-copy{padding-left:8px}
  .page-home .resource-promo53-media{min-height:300px}
  .page-home .evidence42-grid{grid-template-columns:minmax(0,1fr) minmax(350px,.86fr);gap:40px}
  .page-home .evidence42-results{padding:30px}
  .page-home .evidence42-results>strong{font-size:clamp(70px,8vw,100px)}
}

@media(max-width:900px){
  .page-home .resource-promo53{grid-template-columns:1fr;padding:28px}
  .page-home .resource-promo53-copy{padding:0}
  .page-home .resource-promo53-media{min-height:320px}
  .page-home .evidence42-grid{grid-template-columns:1fr;gap:34px}
  .page-home .evidence42-results{max-width:680px;width:100%}
  .page-home .selected42{grid-template-columns:1fr;grid-template-rows:auto;gap:20px}
  .page-home .selected42>a:first-child,.page-home .selected42>a:not(:first-child){grid-column:auto;grid-row:auto;min-height:390px}
  .page-home .selected42>a:not(:first-child) h3{font-size:27px;max-width:20ch}
}

@media(max-width:600px){
  .page-home .resource-promo53{padding:22px;gap:22px}
  .page-home .resource-promo53-media{min-height:235px;border-radius:13px}
  .page-home .resource-promo53-media figcaption{left:14px;right:14px;bottom:12px;font-size:11px}
  .page-home .evidence42-results{padding:25px 22px}
  .page-home .evidence42-results>strong{font-size:clamp(68px,24vw,92px)}
  .page-home .evidence42-results>div{grid-template-columns:1fr;gap:4px}
  .page-home .selected42>a:first-child,.page-home .selected42>a:not(:first-child){min-height:390px}
  .page-home .selected42>a>div,.page-home .selected42>a:not(:first-child)>div{padding:24px}
  .page-home .selected42 h3,.page-home .selected42>a:first-child h3,.page-home .selected42>a:not(:first-child) h3{font-size:25px;line-height:1.14;max-width:19ch;margin:10px 0 18px}
  .cta-band{padding-bottom:28px!important}
}

/* Font-box guard: give the large proof figure enough line box for the % glyph. */
.page-home .evidence42-results>strong{line-height:1.05;padding-bottom:4px}
.page-home .evidence42-results>strong span{line-height:1.1}

/* Case-study grid min-content guard: long copy must shrink with the mobile card. */
.page-case-studies .case-story{min-width:0}
.page-case-studies .case-story>*{min-width:0;max-width:100%}
.page-case-studies .case-story-copy{min-width:0}
.page-case-studies .case-story-copy h2,
.page-case-studies .case-story-copy dd,
.page-case-studies .case38-context{max-width:100%;overflow-wrap:anywhere}
@media(max-width:980px){
  .page-case-studies .case-story,
  .page-case-studies .case-story:nth-child(even){grid-template-columns:minmax(0,1fr)!important}
  .page-case-studies .case-story-visual{width:100%;min-width:0;max-width:100%}
  .page-case-studies .case-story-copy{width:100%;min-width:0;max-width:100%}
}
@media(max-width:980px){
  .page-case-studies .case-story-visual{display:grid!important;grid-template-columns:minmax(0,1fr)!important}
  .page-case-studies .case38-stat{min-width:0!important;width:100%!important;max-width:100%!important;box-sizing:border-box}
  .page-case-studies .case38-stat strong{max-width:100%;white-space:normal;overflow-wrap:break-word}
}

/* v65: give the final CTA and footer clear visual separation */
.cta-band{
  padding-bottom:72px!important;
}
@media (max-width:700px){
  .cta-band{
    padding-bottom:48px!important;
  }
}
