/* Presentation harmonization: one rhythm across homepage and inner pages. */
:root{--sam-ui-section:clamp(78px,8vw,112px);--sam-ui-card-radius:18px;--sam-ui-gap:clamp(18px,2vw,26px)}
html{scroll-padding-top:104px}
[id]{scroll-margin-top:104px}
.sam-home .sam-section{padding-block:var(--sam-ui-section)}
.sam-home .sam-section-head{align-items:flex-end;gap:clamp(22px,4vw,54px);margin-bottom:clamp(34px,4.5vw,54px)}
.sam-home .sam-section-head>.sam-copy{max-width:62ch}
.sam-home .sam-title{max-width:15ch;text-wrap:balance}
.sam-home .sam-copy,.sam-p12-section-head>p,.sam-ref-section-head p{text-wrap:pretty}

/* Core four-service cards: preserve supplied 16:9 artwork and keep CTAs aligned. */
.sam-home .sam-service-grid{gap:var(--sam-ui-gap)}
.sam-home .sam-service-card-visual{display:flex;flex-direction:column;min-height:100%;padding:0;border-radius:var(--sam-ui-card-radius)}
.sam-home .sam-service-card-visual .sam-service-media{display:block;flex:0 0 auto;width:100%;aspect-ratio:16/9;overflow:hidden}
.sam-home .sam-service-card-visual .sam-service-media img{width:100%;height:100%;object-fit:cover}
.sam-home .sam-service-card-body{display:flex;flex:1;flex-direction:column;padding:28px 27px 30px}
.sam-home .sam-service-card-body>p{min-height:3.45em}
.sam-home .sam-service-card-body .sam-p16-price-row{margin-top:auto}
.sam-home .sam-service-card-body .sam-p16-card-actions{margin-top:14px}
.sam-home .sam-service-card-visual .sam-card-no{top:calc(56.25% + 15px)}

/* About: reduce accidental visual collisions and keep the two-image composition readable. */
.sam-home .sam-about-grid{gap:clamp(42px,6vw,72px)}
.sam-home .sam-about-copy{max-width:690px}
.sam-home .sam-about-media{min-height:clamp(500px,50vw,620px)}
.sam-home .sam-mini-stats>div{min-height:112px;display:flex;flex-direction:column;justify-content:center}
.sam-home .sam-mini-stats strong{font-size:clamp(1.35rem,2vw,1.7rem)}

/* Portfolio, solution, package and capability cards follow the same visual rhythm. */
.sam-home .sam-project-grid,.sam-home .sam-solution-grid,.sam-home .sam-package-grid,.sam-home .sam-team-grid{gap:var(--sam-ui-gap)}
.sam-home .sam-project-card,.sam-home .sam-solution-card,.sam-home .sam-package-card,.sam-home .sam-team-card{border-radius:var(--sam-ui-card-radius)}
.sam-home .sam-solution-card,.sam-home .sam-package-card,.sam-home .sam-team-card{display:flex;flex-direction:column;height:100%}
.sam-home .sam-solution-body,.sam-home .sam-package-card-body,.sam-home .sam-team-card>div{display:flex;flex:1;flex-direction:column}
.sam-home .sam-solution-body .sam-text-link,.sam-home .sam-package-card .sam-btn{margin-top:auto}
.sam-home .sam-solution-card>img{height:auto;aspect-ratio:16/10}
.sam-home .sam-team-card>img{height:auto;aspect-ratio:16/10;filter:saturate(.82) contrast(1.04)}
.sam-home .sam-team-card:hover>img{filter:saturate(.95) contrast(1.04)}
.sam-home .sam-package-media{aspect-ratio:16/10;overflow:hidden;margin:-31px -25px 24px}
.sam-home .sam-package-media img{width:100%;height:100%;object-fit:cover}
.sam-home .sam-project-card{aspect-ratio:4/5}

/* Client proof: comfortable line lengths and equal card behavior without fake visual weight. */
.sam-client-proof-grid{gap:var(--sam-ui-gap)}
.sam-client-proof-card h3{line-height:1.02;text-wrap:balance}
.sam-client-proof-card p{margin-bottom:24px}

/* Structural facts replace generic marketing-number claims. */
.sam-home .sam-stats{min-height:clamp(340px,37vw,500px)}
.sam-home .sam-stats>img{filter:saturate(.88) contrast(1.08)}
.sam-home .sam-stats-overlay{background:linear-gradient(90deg,rgba(8,10,16,.92),rgba(8,10,16,.7))}
.sam-home .sam-stats-grid{align-items:stretch}
.sam-home .sam-stat{display:flex;min-height:150px;flex-direction:column;justify-content:center;padding:24px 18px;border:1px solid rgba(255,255,255,.1);background:rgba(8,10,16,.36);backdrop-filter:blur(8px)}
.sam-home .sam-stat strong{font-size:clamp(2.8rem,5vw,5rem);line-height:.9}
.sam-home .sam-stat span{max-width:18ch;margin-top:12px;line-height:1.35}

/* Launch and closing CTA: balanced copy/media and predictable button wrapping. */
.sam-home .sam-launch-grid{gap:clamp(34px,5vw,64px)}
.sam-home .sam-launch-copy{max-width:680px}
.sam-home .sam-launch-media{min-height:clamp(430px,45vw,570px);border-radius:var(--sam-ui-card-radius)}
.sam-home .sam-final-cta{min-height:clamp(500px,54vw,650px)}
.sam-home .sam-final-content{max-width:980px}
.sam-home .sam-final-content h2{max-width:17ch;text-wrap:balance}

/* Page Studio / service pages: consistent 2x2 core products, card heights and supporting media. */
.sam-p12-page .sam-p12-hero{min-height:min(760px,92vh)}
.sam-p12-page .sam-p12-hero-copy>p{max-width:66ch}
.sam-p12-page .sam-p12-section{padding-block:var(--sam-ui-section)}
.sam-p12-page .sam-p12-section-head{gap:clamp(24px,5vw,70px);margin-bottom:clamp(34px,4vw,52px)}
.sam-p12-page .sam-p12-section-head h2{text-wrap:balance}
.sam-services-page .sam-p12-card-grid{gap:var(--sam-ui-gap)}
.sam-services-page .sam-p12-card{display:flex;flex-direction:column;height:100%;border-radius:var(--sam-ui-card-radius)}
.sam-services-page .sam-p12-card>p{min-height:3.2em}
.sam-services-page .sam-p12-card ul{margin-bottom:18px}
.sam-services-page .sam-p12-card .sam-p16-price-row{margin-top:auto}
.sam-services-page .sam-p12-card-media{aspect-ratio:16/9}
.sam-p12-split-media{border-radius:var(--sam-ui-card-radius);overflow:hidden}
.sam-p12-split-media img{filter:saturate(.84) contrast(1.05)}
.sam-p12-process article{min-height:240px}
.sam-p12-tablist button{min-height:56px}

/* Reference/contact pages: same spacing and readable content density. */
.sam-reference-page .sam-section{padding-block:var(--sam-ui-section)}
.sam-ref-hero-grid,.sam-ref-final-grid{gap:clamp(36px,5vw,64px)}
.sam-ref-hero h1,.sam-ref-final h2,.sam-ref-section-head h2{text-wrap:balance}
.sam-ref-four-cards{gap:var(--sam-ui-gap)}
.sam-ref-four-cards article{display:flex;flex-direction:column;min-height:260px;border-radius:var(--sam-ui-card-radius)}
.sam-ref-four-cards h3{font-size:clamp(1.9rem,3vw,2.45rem);line-height:.98;text-wrap:balance}
.sam-ref-four-cards p{margin-top:auto;padding-top:8px}
.sam-ref-info-card,.sam-ref-snapshot,.sam-ref-use-card{border-radius:var(--sam-ui-card-radius)}

@media(max-width:1100px){
  html{scroll-padding-top:92px}[id]{scroll-margin-top:92px}
  .sam-home .sam-project-card{aspect-ratio:4/4.6}
  .sam-home .sam-service-card-body>p,.sam-services-page .sam-p12-card>p{min-height:0}
}

@media(max-width:900px){
  .sam-home .sam-section-head{display:block}
  .sam-home .sam-section-head>.sam-copy{margin-top:18px}
  .sam-home .sam-about-media{max-width:680px}
  .sam-p12-page .sam-p12-hero{min-height:auto}
  .sam-p12-page .sam-p12-hero-grid{gap:34px}
  .sam-p12-page .sam-p12-hero-card{transform:none}
  .sam-ref-four-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:700px){
  :root{--sam-ui-section:72px;--sam-ui-card-radius:16px}
  html{scroll-padding-top:82px}[id]{scroll-margin-top:82px}
  .sam-container{width:min(var(--sam-max),calc(100% - 28px))}
  .sam-home .sam-title{max-width:none;font-size:clamp(2.45rem,12vw,3.75rem)}
  .sam-home .sam-service-card-body{padding:24px 21px 25px}
  .sam-home .sam-service-card-visual .sam-card-no{right:18px;top:calc(56.25% + 12px)}
  .sam-home .sam-about-grid{gap:34px}
  .sam-home .sam-about-media{min-height:450px;padding-right:0}
  .sam-home .sam-about-main{margin-left:18px;width:82%}
  .sam-home .sam-about-small{left:0;width:70%}
  .sam-home .sam-mini-stats{grid-template-columns:1fr}
  .sam-home .sam-mini-stats>div{min-height:0}
  .sam-home .sam-project-card{aspect-ratio:4/5}
  .sam-home .sam-solution-card>img,.sam-home .sam-team-card>img{aspect-ratio:16/10}
  .sam-home .sam-package-media{margin:-27px -21px 22px}
  .sam-home .sam-stats{min-height:0;padding:52px 0}
  .sam-home .sam-stat{min-height:120px}
  .sam-home .sam-launch-media{min-height:390px}
  .sam-home .sam-launch-copy .sam-btn,.sam-home .sam-final-content .sam-btn{width:100%}
  .sam-home .sam-final-content>div{display:grid;grid-template-columns:1fr;width:100%}
  .sam-home .sam-final-content{padding-inline:4px}
  .sam-p12-actions{display:grid;grid-template-columns:1fr}
  .sam-p12-actions>*{width:100%}
  .sam-services-page .sam-p12-card{padding-left:21px;padding-right:21px}
  .sam-services-page .sam-p12-card-media{margin-left:-21px;margin-right:-21px}
  .sam-p12-process article{min-height:0}
  .sam-ref-actions{display:grid;grid-template-columns:1fr}
  .sam-ref-actions>*{width:100%}
  .sam-ref-four-cards{grid-template-columns:1fr}
  .sam-ref-four-cards article{min-height:0}
  .sam-ref-tags{gap:6px}
  .sam-ref-tags span{font-size:.68rem}
}

@media(max-width:420px){
  .sam-container{width:min(var(--sam-max),calc(100% - 22px))}
  .sam-home .sam-service-card-body{padding-inline:18px}
  .sam-p12-hero-card,.sam-ref-snapshot{padding:20px}
  .sam-p12-metrics{grid-template-columns:1fr 1fr}
  .sam-ref-snapshot dl>div,.sam-ref-use-card dl>div{grid-template-columns:1fr;gap:5px}
}
