/* Native scrolling, with one shared offset for the fixed header. */
html{scroll-behavior:auto!important;scroll-padding-top:var(--pema-sticky-header,var(--header-h));}
html body main.page-view [id]{scroll-margin-top:0!important}
html body #main #kontakt{height:auto!important;max-height:none!important;min-height:calc(100dvh - var(--header-h));display:flex;flex-direction:column;justify-content:center;padding:clamp(24px,4dvh,48px) var(--page-gutter) calc(clamp(20px,3dvh,36px) + env(safe-area-inset-bottom,0px))!important;overflow:visible!important}
html body #main #kontakt .partner-paths-head .eyebrow{margin:0 0 12px!important}
html body #main #kontakt .partner-paths-head h2{font-size:clamp(32px,3.4vw,44px)!important;line-height:1.15!important;margin:0 0 12px!important}
html body #main #kontakt .partner-paths-head>p:last-child{margin:0!important;line-height:1.6!important}
html body #main #kontakt .partner-paths-grid{margin-top:clamp(20px,3dvh,32px)!important}
html body #main #kontakt .partner-paths-grid button{gap:10px!important;padding:20px 24px 24px 0!important;min-height:0!important;height:auto!important;overflow:visible!important}
html body #main #kontakt .partner-paths-grid button strong{font-size:clamp(24px,2.2vw,28px)!important;line-height:1.16!important;max-width:none!important}
html body #main #kontakt .partner-paths-grid button small{line-height:1.5!important}
html body #main #kontakt .partner-paths-grid button span{line-height:1.6!important}
html body #main #kontakt .partner-paths-grid button b{top:20px!important;right:12px!important}
html body #main #kontakt .home-contact-tail{margin-top:20px!important}
html body #main #kontakt .home-contact-email{font-size:16px!important;line-height:1.5!important}
@media(min-width:900px){
 html body #main #kontakt .partner-paths-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 html body #main #kontakt .partner-paths-grid button+button{padding-left:24px!important;border-left:1px solid #545454!important}
}
@media(max-width:899px){
 html body #main #kontakt .partner-paths-grid{grid-template-columns:minmax(0,1fr)!important}
 html body #main #kontakt .partner-paths-grid button+button{border-left:0!important}
}
/* Project photograph captions are always white, independent of page text colour. */
html body main.page-view .project-card .project-overlay,
html body main.page-view .project-card .project-overlay :is(p,h2,h3,strong,small,span,a){color:#fff!important;text-shadow:0 1px 3px rgba(0,0,0,.65)!important}
html body main.page-view .project-card>img{display:block!important}
/* Long dialogs remain reachable on short windows and with the mobile keyboard. */
html body dialog.contact-dialog{position:fixed!important;top:calc(var(--pema-visual-top,0px) + 12px)!important;bottom:calc(100dvh - var(--pema-visual-top,0px) - var(--pema-visual-height,100dvh) + 12px)!important;height:fit-content!important;max-width:calc(100vw - 24px)!important;max-height:calc(var(--pema-visual-height,100dvh) - 24px)!important;overflow:auto!important;overscroll-behavior:contain;scroll-padding:16px;touch-action:pan-y}
html body dialog.contact-dialog .dialog-card{min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}

/* Legal pages: bring the first content into the initial viewport. */
.legal-view .legal-hero{min-height:0;padding:calc(var(--header-h) + clamp(20px,3.5vh,36px)) 8vw clamp(18px,2.5vh,28px);}
.legal-view .legal-hero .eyebrow{margin-bottom:12px;}
.legal-view .legal-hero h1{font-size:clamp(38px,5vw,64px);line-height:1.08;max-width:100%;overflow-wrap:normal;word-break:normal;hyphens:none;}
.legal-view .legal-content{padding-top:clamp(16px,2.5vh,28px);}
.legal-view .legal-content article{padding-top:clamp(16px,2.5vh,24px);}
.legal-view .privacy-content>p:first-child{margin-top:0;margin-bottom:8px;}
.legal-view .privacy-content .privacy-date{margin-top:0;margin-bottom:0;}
@media(max-width:620px){.legal-view .legal-hero{padding-left:24px;padding-right:24px;}}
@media(max-height:500px){.legal-view .legal-hero{padding-top:calc(var(--header-h) + 12px);padding-bottom:12px;}.legal-view .legal-hero .eyebrow{margin-bottom:8px;}.legal-view .legal-hero .eyebrow:after{margin-top:6px;}.legal-view .legal-hero h1{font-size:36px;}.legal-view .legal-content{padding-top:12px;}}
