/* Shared UX/UI polish for active site pages. */
:root {
  --ux-gutter: clamp(22px, 4vw, 40px);
  --ux-section: clamp(76px, 8vw, 110px);
  --ux-card-pad: clamp(24px, 3vw, 36px);
}

body { text-rendering: optimizeLegibility; }
body .container { width: 100%; max-width: 1240px; padding-inline: var(--ux-gutter); }
body h1,
body h2 { text-wrap: balance; }
body p { text-wrap: pretty; }
body .btn,
body .nav-call { min-height: 48px; line-height: 1.2; }
body a:focus-visible,
body button:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
body .footer a:focus-visible,
body .timeline-section a:focus-visible,
body .process a:focus-visible { outline-color: var(--cream); }

/* Homepage */
.page-home .nav-inner { min-height: 76px; padding-block: 0; }
.page-home .nav-links { gap: clamp(22px, 2.8vw, 36px); }
.page-home .hero { padding: clamp(72px, 7.5vw, 104px) 0 clamp(78px, 8vw, 112px); }
.page-home .hero-grid { gap: clamp(48px, 6vw, 76px); }
.page-home .hero h1 { max-width: 760px; letter-spacing: clamp(-4px, -.055em, -2px); }
.page-home .hero-cta { gap: 14px; }
.page-home .hero-proof { align-items: stretch; }
.page-home .hero-proof-item { min-width: 0; }
.page-home .clients,
.page-home .approach,
.page-home .process,
.page-home .pricing,
.page-home .case-studies,
.page-home .cta { padding-top: var(--ux-section); padding-bottom: var(--ux-section); }
.page-home .section-header { max-width: 820px; margin-bottom: clamp(42px, 5vw, 64px); }
.page-home .approach-grid,
.page-home .process-grid,
.page-home .pricing-grid,
.page-home .case-grid { gap: clamp(18px, 2.2vw, 28px); }
.page-home .process-card,
.page-home .pricing-card,
.page-home .case-card { height: 100%; }
.page-home .process-card,
.page-home .pricing-card { padding: var(--ux-card-pad); }
.page-home .case-card { padding: clamp(28px, 3.2vw, 40px); }
.page-home .case-result { line-height: 1.45; }
.page-home .cta-inner { max-width: 900px; margin-inline: auto; }

/* Case studies */
.page-case-study .nav-inner { min-height: 76px; }
.page-case-study .nav-actions { gap: 20px; }
.page-case-study .hero { padding: clamp(72px, 8vw, 104px) 0 clamp(62px, 7vw, 84px); }
.page-case-study .hero-grid { grid-template-columns: minmax(0, 1.48fr) minmax(210px, .52fr); gap: clamp(48px, 7vw, 88px); }
.page-case-study .hero-grid > div:first-child { min-width: 0; }
.page-case-study h1 { max-width: 900px; font-size: clamp(50px, 6.4vw, 82px); letter-spacing: clamp(-3.6px, -.05em, -2px); text-wrap: balance; }
.page-case-study .hero-lead { max-width: 720px; line-height: 1.65; }
.page-case-study .hero-mark { display:flex; justify-content:flex-end; }
.page-case-study .hero-mark svg { width:min(100%, 290px); margin:0; }
.page-case-study .metrics { padding-bottom: var(--ux-section); }
.page-case-study .metrics-grid { gap: 18px; }
.page-case-study .metric { min-height: 158px; padding: 30px; display:flex; flex-direction:column; justify-content:space-between; }
.page-case-study .metric strong { margin-bottom: 22px; }
.page-case-study .metric span { max-width: 28ch; line-height: 1.5; }
.page-case-study .story,
.page-case-study .strategy,
.page-case-study .timeline-section,
.page-case-study .proof,
.page-case-study .principle,
.page-case-study .outcome { padding-top: var(--ux-section); padding-bottom: var(--ux-section); }
.page-case-study .story-grid { gap: clamp(48px, 7vw, 88px); }
.page-case-study .story-block p,
.page-case-study .strategy-copy p { line-height: 1.75; }
.page-case-study .strategy-grid { grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr); gap: clamp(56px, 7vw, 88px); }
.page-case-study .strategy-aside { top: 104px; padding: var(--ux-card-pad); }
.page-case-study .strategy-aside li { line-height: 1.5; }
.page-case-study .strategy-copy { gap: 28px; }
.page-case-study .quote { line-height: 1.55; }
.page-case-study .timeline { gap: 0; }
.page-case-study .timeline-step { min-height: 250px; }
.page-case-study .timeline-step:not(:last-child) { margin-right: 22px; }
.page-case-study .timeline-step p { line-height: 1.6; }
.page-case-study .proof p,
.page-case-study .outcome p { line-height: 1.7; }
.page-case-study .cta { padding: clamp(76px, 8vw, 100px) 0; }
.page-case-study .footer { padding: 34px 0; }

/* SaaS and startup industry pages */
.page-industry:not(.page-software-development) .nav-inner { min-height: 76px; }
.page-industry:not(.page-software-development) .nav-actions { gap: 20px; }
.page-industry:not(.page-software-development) .hero { padding: clamp(72px, 8vw, 108px) 0 clamp(62px, 7vw, 86px); }
.page-industry:not(.page-software-development) .hero-grid { grid-template-columns:minmax(0, 1.45fr) minmax(210px, .55fr); gap:clamp(48px, 7vw, 88px); }
.page-industry:not(.page-software-development) h1 { font-size:clamp(52px, 6.7vw, 86px); letter-spacing:clamp(-3.8px, -.052em, -2px); text-wrap:balance; }
.page-industry:not(.page-software-development) .hero-copy { max-width:720px; line-height:1.65; }
.page-industry:not(.page-software-development) .hero-mark { display:flex; justify-content:flex-end; }
.page-industry:not(.page-software-development) .hero-mark svg { width:min(100%, 290px); margin:0; }
.page-industry:not(.page-software-development) .proof { padding-bottom:var(--ux-section); }
.page-industry:not(.page-software-development) .proof-grid { gap:16px; }
.page-industry:not(.page-software-development) .proof-item { min-height:150px; padding:28px; display:flex; flex-direction:column; justify-content:space-between; }
.page-industry:not(.page-software-development) .proof-item strong { margin-bottom:20px; }
.page-industry:not(.page-software-development) .proof-item span { line-height:1.45; }
.page-industry:not(.page-software-development) .challenge,
.page-industry:not(.page-software-development) .benefits,
.page-industry:not(.page-software-development) .process,
.page-industry:not(.page-software-development) .plays,
.page-industry:not(.page-software-development) .operating,
.page-industry:not(.page-software-development) .case-section,
.page-industry:not(.page-software-development) .fit,
.page-industry:not(.page-software-development) .stages { padding-top:var(--ux-section); padding-bottom:var(--ux-section); }
.page-industry:not(.page-software-development) .split { grid-template-columns:minmax(280px, .9fr) minmax(0, 1.1fr); gap:clamp(56px, 8vw, 108px); }
.page-industry:not(.page-software-development) .lead-copy { gap:24px; line-height:1.75; }
.page-industry:not(.page-software-development) .section-head { max-width:820px; margin-bottom:clamp(42px, 5vw, 60px); }
.page-industry:not(.page-software-development) .section-head p { max-width:700px; line-height:1.65; }
.page-industry:not(.page-software-development) .benefit-grid { gap:20px; }
.page-industry:not(.page-software-development) .benefit { min-height:250px; padding:var(--ux-card-pad); display:flex; flex-direction:column; }
.page-industry:not(.page-software-development) .benefit-num { margin-bottom:38px; }
.page-industry:not(.page-software-development) .benefit p { margin-top:auto; line-height:1.65; }
.page-industry:not(.page-software-development) .step { min-height:260px; }
.page-industry:not(.page-software-development) .step:not(:last-child) { margin-right:22px; }
.page-industry:not(.page-software-development) .step p { line-height:1.6; }
.page-industry:not(.page-software-development) .play-grid,
.page-industry:not(.page-software-development) .operating-grid,
.page-industry:not(.page-software-development) .stage-grid { gap:20px; margin-top:0; }
.page-industry:not(.page-software-development) .play,
.page-industry:not(.page-software-development) .operating-card,
.page-industry:not(.page-software-development) .stage { min-height:220px; padding:var(--ux-card-pad); }
.page-industry:not(.page-software-development) .play p,
.page-industry:not(.page-software-development) .operating-card p,
.page-industry:not(.page-software-development) .stage p { line-height:1.65; }
.page-industry:not(.page-software-development) .case-card { padding:clamp(30px, 4vw, 48px); gap:clamp(42px, 6vw, 70px); }
.page-industry:not(.page-software-development) .case-card p { line-height:1.65; }
.page-industry:not(.page-software-development) .case-result { min-height:90px; }
.page-industry:not(.page-software-development) .case-result span { display:block; line-height:1.45; }
.page-industry:not(.page-software-development) .fit-grid { gap:24px; }
.page-industry:not(.page-software-development) .fit-panel { padding:34px 32px 38px; }
.page-industry:not(.page-software-development) .cta { padding:clamp(76px, 8vw, 102px) 0; }
.page-industry:not(.page-software-development) .footer { padding:34px 0; }

@media (max-width: 900px) {
  .page-home .hero-grid { gap:48px; }
  .page-case-study .hero-grid,
  .page-industry:not(.page-software-development) .hero-grid { grid-template-columns:minmax(0, 1fr) 190px; gap:40px; }
  .page-case-study .hero-mark svg,
  .page-industry:not(.page-software-development) .hero-mark svg { max-width:190px; }
  .page-case-study .strategy-grid,
  .page-industry:not(.page-software-development) .split { grid-template-columns:1fr; gap:44px; }
  .page-case-study .timeline-step,
  .page-industry:not(.page-software-development) .step { min-height:0; }
}

@media (max-width: 760px) {
  .page-case-study .hero-grid,
  .page-industry:not(.page-software-development) .hero-grid { grid-template-columns:1fr; }
  .page-case-study .hero-mark,
  .page-industry:not(.page-software-development) .hero-mark { display:none; }
  .page-industry:not(.page-software-development) .proof-grid { grid-template-columns:1fr; }
  .page-industry:not(.page-software-development) .proof-item { min-height:128px; }
}

@media (max-width: 600px) {
  body .container { padding-inline:22px; }
  .page-home .nav-inner,
  .page-case-study .nav-inner,
  .page-industry .nav-inner { min-height:68px; }
  .page-home .hero,
  .page-case-study .hero,
  .page-industry:not(.page-software-development) .hero { padding:56px 0 60px; }
  .page-case-study h1,
  .page-industry:not(.page-software-development) h1 { font-size:clamp(42px, 12vw, 52px); line-height:1; letter-spacing:-2.2px; }
  .page-case-study .hero-lead,
  .page-industry:not(.page-software-development) .hero-copy { margin-top:24px; line-height:1.6; }
  .page-case-study .metrics { padding-bottom:72px; }
  .page-case-study .metric { min-height:128px; padding:26px; }
  .page-case-study .story,
  .page-case-study .strategy,
  .page-case-study .timeline-section,
  .page-case-study .proof,
  .page-case-study .principle,
  .page-case-study .outcome,
  .page-industry:not(.page-software-development) .challenge,
  .page-industry:not(.page-software-development) .benefits,
  .page-industry:not(.page-software-development) .process,
  .page-industry:not(.page-software-development) .plays,
  .page-industry:not(.page-software-development) .operating,
  .page-industry:not(.page-software-development) .case-section,
  .page-industry:not(.page-software-development) .fit,
  .page-industry:not(.page-software-development) .stages { padding:72px 0; }
  .page-case-study .timeline-step:not(:last-child),
  .page-industry:not(.page-software-development) .step:not(:last-child) { margin-right:0; }
  .page-case-study .footer-inner,
  .page-industry .footer-inner { align-items:flex-start; flex-direction:column; gap:10px; }
  .page-industry:not(.page-software-development) .case-results { grid-template-columns:1fr 1fr; }
}

@media (max-width: 420px) {
  .page-case-study .nav-home,
  .page-industry .nav-home { max-width:90px; line-height:1.2; }
  .page-industry:not(.page-software-development) .case-results { grid-template-columns:1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
