/* One band size and copy layout across all ten routes. */
html body.unified-nav{
 --shared-footer-band-height:56px;
 --shared-footer-band-font:13px;
 --shared-footer-band-leading:1.5;
 --shared-footer-band-padding:18px;
 --shared-footer-panel-radius:20px;
 --shared-page-frame-inset:clamp(6px,1.041667vw,20px);
}

/* Home-style footer navigation shifts independently, preserving social columns. */
@media(max-width:640px){
 html body:is(.homepage,.work-page,.playground-page) .contact[data-footer-panel] footer .footer-nav{translate:-24px 0}
}
@media(max-width:360px){
 html body:is(.homepage,.work-page,.playground-page) .contact[data-footer-panel] footer .footer-nav{translate:-16px 0}
}
/* Match the case-study footer link size on desktop only. */
@media(min-width:701px){
 html body:is(.homepage,.work-page,.playground-page) .contact[data-footer-panel] footer :is(.footer-nav,.socials){font-size:18px!important}
 html body:is(.homepage,.work-page,.playground-page) .contact[data-footer-panel] footer :is(.footer-nav,.socials) :is(a,button,.social-placeholder){font:inherit!important}
}
html body:is(.homepage,.work-page,.about-v24){
 --panel-inset:var(--shared-page-frame-inset)!important;
 --outer:var(--shared-page-frame-inset)!important;
}
html body.about-v24 .about-layout.about-layout{
 margin-inline:var(--shared-page-frame-inset)!important;
 margin-bottom:0!important;
 width:calc(100% - 2 * var(--shared-page-frame-inset))!important;
}
/* Share the original case-footer layer so its older important rules cannot win. */
@layer case-shell{
html body.unified-nav :is(.footer-bottom.footer-bottom,.shared-footer-band.shared-footer-band)[data-footer-band]{
 box-sizing:border-box!important;
 display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
 align-items:center!important;column-gap:12px!important;row-gap:0!important;
 min-height:var(--shared-footer-band-height)!important;height:auto!important;
 padding-block:var(--shared-footer-band-padding)!important;margin-block:0!important;
 font:400 var(--shared-footer-band-font)/var(--shared-footer-band-leading) Onest,Arial,sans-serif!important;
 background:#1e272e!important;color:#f5f5f5!important;
 border:0!important;border-radius:0!important;white-space:normal!important;
}
html body.unified-nav [data-footer-band]>span{
 min-width:0;max-width:100%!important;margin:0!important;
 font:inherit!important;white-space:normal!important;overflow-wrap:normal;
}
html body.unified-nav [data-footer-band]>span:first-of-type{justify-self:start!important;text-align:left!important}
html body.unified-nav [data-footer-band]>span:last-of-type{justify-self:end!important;text-align:right!important}

}

/* The rounded light panel ends above the dark band, like About. */
html body.unified-nav .contact[data-footer-panel]{background:transparent!important}
html body.unified-nav .contact[data-footer-panel]::before{
 content:'';position:absolute;
 inset:0 0 var(--footer-band-height,var(--shared-footer-band-height)) 0!important;
 z-index:-1!important;background:#e5e5e5!important;
 border-radius:var(--shared-footer-panel-radius)!important;clip-path:none!important;
 pointer-events:none;
}

/* Equal gaps between the project cards, Work link and expertise heading. */
html body.homepage .work-section{--project-link-gap:clamp(60px,6.510417vw,125px)}
html body.homepage .work-section .view-all-projects{margin-block:var(--project-link-gap)!important}
html body.homepage .work-section .home-expertise{margin-top:0!important;padding-top:0!important}

@media(max-width:700px){
 html body.unified-nav{
  --shared-footer-band-height:48px;
  --shared-footer-band-font:10px;
  --shared-footer-band-leading:1.4;
  --shared-footer-band-padding:10px;
  --shared-footer-panel-radius:16px;
  --shared-page-frame-inset:6px;
 }
 html body.about-v24 .shared-footer-band[data-footer-band]{
  width:calc(100% - 2 * var(--shared-page-frame-inset))!important;
  margin-inline:var(--shared-page-frame-inset)!important;
 }
 html body.homepage .work-section{--project-link-gap:64px}
 html body.about-v24 .about-connect .shared-contact-actions.shared-contact-actions{width:100%!important;align-items:stretch!important}
 html body.about-v24 .about-connect .shared-contact-actions.shared-contact-actions .button{
  width:100%!important;min-width:0!important;max-width:none!important;box-sizing:border-box;
 }
}

/* Mobile layout repairs; desktop composition is unchanged. */
@media(max-width:700px){
 html body.homepage .hero{height:calc(100svh - 100px);min-height:540px;max-height:760px}
 html body.homepage .hero::before{height:calc(78% - 5px)!important;bottom:auto!important}
 html body.homepage .hero .portrait{width:125vw!important;height:125vw!important;bottom:-8vw!important;left:50%!important}
 html body.homepage .hero .marquee{top:auto!important;bottom:12px!important;height:27vw;padding:0}
 html body.homepage .hero .marquee-track{font-size:25vw;line-height:1.1}
 /* Keep the portrait in the contact row, above the separate navigation row. */
 html body.unified-nav .contact[data-footer-panel]{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:8px;align-items:end;padding-top:56px!important;height:auto!important;min-height:0!important}
 html body.unified-nav .contact[data-footer-panel] .contact-copy{grid-column:1;grid-row:1;width:100%!important;max-width:none!important;padding-bottom:28px}
 html body.unified-nav .contact[data-footer-panel]>img{position:static!important;grid-column:2;grid-row:1;display:block;width:100%!important;height:auto!important;max-width:100%!important;max-height:none!important;margin:0!important;transform:none!important;align-self:end}
 html body.unified-nav .contact[data-footer-panel]>footer{grid-column:1/-1;grid-row:2;width:100%;margin-top:0!important;padding-top:24px;grid-template-columns:minmax(0,.7fr) minmax(0,1fr) minmax(0,1.4fr);column-gap:12px;row-gap:24px}
 html body.unified-nav .contact[data-footer-panel]>footer .footer-nav{translate:none!important}
 html body.unified-nav .contact[data-footer-panel]>footer :is(.footer-nav,.socials){font-size:12px!important;background:transparent;padding:0}
 html body.unified-nav .contact[data-footer-panel]>footer .footer-logo img{width:100%;max-width:72px}
 html body.unified-nav .contact[data-footer-panel] .footer-cat-scene{grid-column:1/-1;grid-row:3}
}
/* Early cascade layer wins over historical important footer rules. */
@layer case-shell{
 @media(max-width:700px){
  html body.unified-nav :is(.footer-bottom.footer-bottom,.shared-footer-band.shared-footer-band)[data-footer-band]{grid-template-columns:minmax(0,1fr)!important;justify-items:center!important;row-gap:4px!important;padding-block:14px!important}
  html body.unified-nav [data-footer-band]>span:first-of-type,
  html body.unified-nav [data-footer-band]>span:last-of-type{justify-self:center!important;text-align:center!important}
 }
}

@media(max-width:700px){
 html body.unified-nav .contact[data-footer-panel] .contact-actions .button{width:100%!important;min-width:0!important;max-width:100%!important;padding-inline:12px!important;gap:8px!important}
}

@media(max-width:700px){
 html body.unified-nav .contact[data-footer-panel]>img{position:absolute!important;right:0!important;bottom:var(--footer-band-height,60px)!important;width:48%!important;max-width:48%!important;z-index:1!important}
 html body.unified-nav .contact[data-footer-panel]>footer{grid-template-columns:repeat(4,minmax(0,1fr));position:relative;z-index:2}
 html body.unified-nav .contact[data-footer-panel]>footer .footer-logo{grid-column:1/3;grid-row:1}
 html body.unified-nav .contact[data-footer-panel]>footer .footer-nav{grid-column:1;grid-row:2}
 html body.unified-nav .contact[data-footer-panel]>footer .socials{grid-column:2;grid-row:2}
 html body.unified-nav .contact[data-footer-panel]>footer [data-footer-band]{grid-column:1/-1;grid-row:3}
}

@layer case-shell{
 @media(max-width:700px){
  html body.unified-nav :is(.footer-bottom.footer-bottom,.shared-footer-band.shared-footer-band)[data-footer-band]{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;row-gap:0!important;padding-block:10px!important}
  html body.unified-nav [data-footer-band]>span:first-of-type{justify-self:start!important;text-align:left!important}
  html body.unified-nav [data-footer-band]>span:last-of-type{justify-self:end!important;text-align:right!important}
 }
}


@media(max-width:700px){
 html body.unified-nav .contact[data-footer-panel]>img{grid-area:auto!important}
 html body.unified-nav .contact[data-footer-panel]>footer{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr) minmax(0,2fr)}
}

@media(max-width:700px){
 html body.unified-nav .contact[data-footer-panel]>footer::before{right:calc(50% + 4px)!important}
}

/* Move the complete cat and Wi-Fi widget together on mobile. */
@media(max-width:700px){
 html body.homepage .hero .location{position:absolute!important;top:auto!important;bottom:calc(12px + 27vw + 20px)!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:max-content!important;max-width:calc(100% - 32px)!important;height:64px!important;min-height:64px!important;box-sizing:border-box;padding:4px 12px 4px 4px!important;gap:12px!important;justify-content:flex-start;align-items:center;z-index:6;font-size:12px!important;line-height:1.3}
 html body.homepage .hero .location .smiley{display:grid!important;position:relative!important;flex:0 0 56px!important;width:56px!important;height:56px!important}
 html body.homepage .hero .location .pdf-mobile-location-label{white-space:normal;text-align:center}
}

/* Align mobile hero copy within its existing box and fully round the Wi-Fi pill. */
@media(max-width:700px){
 html body.homepage .hero .hero-intro,
 html body.homepage .hero .pdf-mobile-greeting{ text-align:left!important }
 html body.homepage .hero .location{ border-radius:9999px!important }
}

/* Mobile band uses the outer gutters and keeps each credit on one line. */
@layer case-shell{
 @media(max-width:700px){
  html body.unified-nav :is(.footer-bottom.footer-bottom,.shared-footer-band.shared-footer-band)[data-footer-band]{
   grid-template-columns:max-content minmax(0,1fr)!important;
   padding-inline:12px!important;column-gap:12px!important;
   font-size:clamp(8px,2.5vw,10px)!important;
  }
  html body.unified-nav [data-footer-band]>span{white-space:nowrap!important}
 }
}

/* Center the mobile intro box near the supplied guide; keep its copy left aligned. */
@media(max-width:700px){
 html body.homepage .hero .hero-intro{
  left:19%!important;width:62%!important;max-width:62%!important;
  transform:none!important;text-align:left!important;
 }
 html body.homepage .hero .pdf-mobile-greeting{ text-align:left!important }
 html body.homepage .hero .pdf-mobile-greeting>span{display:inline!important;white-space:normal!important}
 html body.homepage .hero .pdf-mobile-greeting>span+span::before{content:" "}
}

/* A wider centered mobile pill, with equal breathing room around its text. */
@media(max-width:700px){
 html body.homepage .hero .location{
  width:calc(100% - 32px)!important;max-width:320px!important;
  padding:4px 20px 4px 4px!important;gap:20px!important;
 }
 html body.homepage .hero .location .pdf-mobile-location-label{
  flex:1;min-width:0;text-align:left!important;
 }
}

/* Fit the pill to the text so the gap beside the cat equals the right padding. */
@media(max-width:700px){
 html body.homepage .hero .location{
  width:max-content!important;max-width:calc(100% - 32px)!important;
  padding:4px 20px 4px 4px!important;gap:20px!important;
 }
 html body.homepage .hero .location .pdf-mobile-location-label{
  flex:0 1 auto!important;width:max-content;min-width:0;
 }
}

/* Mobile reading flow: balance short copy and avoid sparse paragraph endings. */
@media(max-width:700px){
 html body.unified-nav main :is(p,li){text-wrap:pretty}
 html body.unified-nav main :is(h1,h2,h3,h4,blockquote,figcaption),
 html body.unified-nav main p.mobile-balanced-copy,
 html body.unified-nav .work-opening>p,
 html body.error-page .error-copy>p{ text-wrap:balance }
}

@media(max-width:700px){html body.unified-nav .work-opening>p>br{display:none!important}}

/* Diggit mobile copy flows naturally; its final word pair stays together. */
@media(max-width:767px){
 html body.case-page.diggit .dg :is(p,h2,h3,figcaption){text-wrap:pretty}
 html body.case-page.diggit .dg :is(h2,h3),
 html body.case-page.diggit .dg .dg-lead,
 html body.case-page.diggit .dg p.mobile-balanced-copy{text-wrap:balance}
 html body.case-page.diggit .dg :is(p,h2,h3,figcaption) br{display:none!important}
 html body.case-page.diggit .dg .dg-no-widow{white-space:nowrap}
}

@media(max-width:767px){
 html body.case-page.diggit .dg .dg-display{font-size:clamp(24px,7.2vw,42px)!important}
 html body.case-page.diggit .dg .dg-meta p{font-size:clamp(12px,3.6vw,16px)!important}
 html body.case-page.diggit .dg .dg-meta>div:nth-child(2){padding-left:12px!important}
}

/* Diggit desktop reading flow, retaining the editorial line breaks. */
@media(min-width:768px){
 html body.case-page.diggit .dg :is(p,figcaption){text-wrap:pretty}
 html body.case-page.diggit .dg :is(h2,h3),
 html body.case-page.diggit .dg .dg-lead,
 html body.case-page.diggit .dg p.mobile-balanced-copy{text-wrap:balance}
 html body.case-page.diggit .dg .dg-no-widow{white-space:nowrap}
}
