/* Shared mobile ergonomics; desktop art direction stays intact. */
@media(max-width:600px){
 html{scroll-padding-top:96px;-webkit-text-size-adjust:100%;text-size-adjust:100%}body{overflow-wrap:break-word}main,section,article,figure,.frame{min-width:0}button,a,input,textarea{touch-action:manipulation}
 header{top:max(12px,env(safe-area-inset-top))}header nav{position:relative;width:calc(100% - 32px);max-width:400px;justify-content:space-between;gap:12px;padding:6px 8px 6px 10px}header nav .brand{min-height:44px;font-size:14px}header nav .menu,body.scrolled header nav .menu,body.scrolled header nav.open .menu{display:flex;pointer-events:auto;align-items:center;justify-content:center;width:44px;height:44px;gap:4px;padding:10px;background:transparent}header nav .menu span{display:block;width:4px;height:4px;flex:0 0 4px;border-radius:50%;background:#333}
 header nav #navlinks,body.scrolled header nav #navlinks{position:absolute;top:calc(100% + 10px);right:0;display:flex;flex-direction:column;align-items:stretch;width:min(280px,calc(100vw - 40px));padding:10px;gap:4px;border:1px solid #e2e2de;border-radius:20px;background:#fafaf9f5;backdrop-filter:blur(20px);box-shadow:0 14px 36px #0002;visibility:hidden;opacity:0;pointer-events:none;transform:translateY(-6px)}
 header nav.open #navlinks,body.scrolled header nav.open #navlinks{position:absolute;visibility:visible;opacity:1;pointer-events:auto;transform:none;flex-direction:column;align-items:stretch;width:min(280px,calc(100vw - 40px));padding:10px;background:#fafaf9f5;border:1px solid #e2e2de;border-radius:20px;box-shadow:0 14px 36px #0002}
 header nav #navlinks>a,header nav #navlinks .nav-contact{justify-content:flex-start;min-height:48px;padding:12px 16px;font-size:16px;border-radius:12px}
 .section{padding-left:18px;padding-right:18px}.hero{padding-left:18px;padding-right:18px}.client-intro{padding-top:104px}.client-intro .project-header{padding:22px 16px}.client-intro .project-header h1{font-size:clamp(30px,8.5vw,38px);line-height:1.12;overflow-wrap:normal}.project-header .project-header-meta{gap:18px}.project-header .project-header-meta dd{font-size:15px}
 .hero p,.case-copy-column p,.community-lead,.management-role-grid p,.management-social-card p{font-size:16px;line-height:1.65}.gallery-preview-tags{gap:7px}.gallery-preview-tags span{font-size:12px;padding:8px 10px}
 .design-concept{padding:18px}.design-concept-head{gap:16px}.design-concept-head h2{font-size:28px;line-height:1.15}.design-concept-badge{white-space:normal}.design-stories{grid-template-columns:1fr;gap:20px;max-width:330px;margin-inline:auto}.concept-story h4{font-size:30px}.concept-story p{font-size:14px}.concept-story>span,.concept-story b{font-size:11px}.concept-story{padding:24px}.concept-profile-stage{margin-inline:-10px}.design-part-head{flex-wrap:wrap;gap:8px}.design-part-head>span{max-width:none;text-align:left}
 .analytics-chart-card{padding:16px 12px}.analytics-chart-heading{flex-wrap:wrap;gap:6px}.analytics-chart-heading>span{white-space:normal}.analytics-canvas{min-height:0;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.analytics-canvas>svg{min-width:480px}.analytics-tooltip{white-space:normal;min-width:150px}.analytics-stats,.management-growth .analytics-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.analytics-stats>div,.management-growth .analytics-stats>div{padding:18px 14px}.analytics-stat-value{font-size:28px}.analytics-original,.analytics-source .text-link{min-height:44px;display:inline-flex;align-items:center;font-size:13px}.analytics-period-note,.analytics-note,.social-source-note{font-size:13px;line-height:1.65}
 .text-link{display:inline-flex;align-items:center;min-height:44px}.pill,.faq-item button,.language-switch{min-height:44px}.faq-item button{padding-block:16px}.footer-top{display:inline-flex;min-height:44px;align-items:center}
 #message-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:54px 20px 24px;overflow-y:auto}#message-dialog input,#message-dialog textarea{font-size:16px;min-height:48px}#message-dialog textarea{min-height:130px}.floating-contact{right:18px;bottom:calc(18px + env(safe-area-inset-bottom));width:48px;height:48px}.edge-blur{height:44px}
 #thumbnail-lightbox,.analytics-lightbox,.community-lightbox,.story-art-modal{max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px);overflow:auto}#thumbnail-lightbox .thumbnail-lightbox-close,.analytics-lightbox .analytics-lightbox-close,.story-art-modal .story-close{width:44px;height:44px;right:8px;top:5px}.story-art-modal{padding-top:56px}.process-comparison-control{min-height:44px;touch-action:pan-y}
 .reveal,.sync-word,.sync-copy,.sync-copy-item,[data-project-motion] .project-reveal-word,[data-project-motion] .project-reveal-item{opacity:1!important;filter:none!important;transform:none!important;transition:none!important;animation:none!important}
}
@media(max-width:380px){.analytics-stats,.management-growth .analytics-stats{grid-template-columns:1fr}.frame{margin-inline:6px}.section,.hero{padding-left:14px;padding-right:14px}.design-concept{padding:14px}.project-header .project-header-meta{grid-template-columns:1fr}.project-header .project-header-meta>div:last-child{grid-column:auto}}
@media(hover:none) and (pointer:coarse){.project:hover,.gallery-client-card:hover,.thumbnail-preview-tile:hover{transform:none}:is(.project,.gallery-client-card):hover .portfolio-window{transform:none}}
@media(max-width:600px){html:has(dialog[open]){overflow:hidden}.analytics-chart-card::after{content:"Swipe sideways to explore the chart. Tap for values.";display:block;font-size:12px;line-height:1.5;color:#777;margin-top:12px}html[lang=sk] .analytics-chart-card::after{content:"Graf posunieš do strán. Ťuknutím zobrazíš hodnotu."}.client-arrival .client-intro,.client-arrival .client-overview,.hero-copy>*{animation-duration:.01s!important;animation-delay:0s!important}}
@media(max-width:600px){.message-close,dialog .close,dialog .close-bottom,.community-lightbox .analytics-lightbox-close{min-width:44px;min-height:44px}.process-comparison-control::-webkit-slider-thumb{min-width:44px;min-height:44px}.process-comparison-control::-moz-range-thumb{min-width:44px;min-height:44px}}
/* Desktop-style inline navigation on phones. */
@media(max-width:600px){
html body header nav,html body.scrolled header nav,html body.scrolled header nav.open{position:relative;width:calc(100% - 24px);max-width:400px;height:56px;min-height:56px;overflow:visible;justify-content:space-between;gap:8px;padding:5px 8px;transition:box-shadow .25s}
html body header nav .brand{flex:0 0 auto;font-size:13px;gap:7px;min-height:44px}
html body header nav .brand .avatar{width:26px;height:26px}
html body header nav #navlinks,html body.scrolled header nav #navlinks,html body header nav.open #navlinks,html body.scrolled header nav.open #navlinks{position:static;inset:auto;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex:0 1 auto;gap:3px;width:auto;max-width:none;min-width:0;margin:0;padding:0;visibility:visible;opacity:1;pointer-events:auto;transform:none;overflow:visible;background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;white-space:nowrap;transition:none}
html body header nav #navlinks>a,html body header nav #navlinks .nav-contact{display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 8px;font-size:13px;line-height:1.2;border-radius:24px}
html body header nav #navlinks .nav-contact{min-height:36px;background:#111;color:#fff}
html body header nav .menu,html body.scrolled header nav .menu,html body.scrolled header nav.open .menu{display:none;pointer-events:none}
}
@media(max-width:360px){html body header nav{gap:4px;padding-inline:6px}html body header nav .brand{font-size:12px;gap:5px}html body header nav #navlinks{gap:0}html body header nav #navlinks>a,html body header nav #navlinks .nav-contact{font-size:12px;padding-inline:6px}}

html[lang=sk] .project h3,html[lang=sk] .gallery-client-card h3{text-transform:none}

/* Let project preview names use the card width instead of a desktop text column. */
@media(max-width:600px){
 .project .project-bottom h3{max-width:100%;width:100%;flex:1 1 100%;text-wrap:wrap}
 .project .project-bottom h3 br,.gallery-client-bottom h3 br{display:none}
 .gallery-client-bottom{flex-wrap:wrap;gap:8px}
 .gallery-client-bottom h3{width:100%;max-width:100%;flex:1 1 100%;text-wrap:wrap}
}

/* Size the phone header to its contents, with equal outer margins. */
@media(max-width:600px){
 html body header nav,html body.scrolled header nav,html body.scrolled header nav.open{width:max-content;max-width:calc(100% - 32px);gap:16px}
}
@media(max-width:360px){html body header nav,html body.scrolled header nav,html body.scrolled header nav.open{gap:10px}}

/* Preview titles use the available width on desktop as well as mobile. */
.project .project-bottom{flex-wrap:wrap}
.project .project-bottom h3{max-width:100%;width:100%;flex:1 1 100%;text-wrap:wrap}
.project .project-bottom h3 br,.gallery-client-bottom h3 br{display:none}
.gallery-client-bottom{flex-wrap:wrap;gap:8px}
.gallery-client-bottom h3{width:100%;max-width:100%;flex:1 1 100%;text-wrap:wrap}

/* Original website navigation, within reach at the bottom on phones. */
@media(max-width:600px){
 html{scroll-padding-top:24px;scroll-padding-bottom:104px}
 body{padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}
 html body>header{display:flex;top:auto;bottom:calc(12px + env(safe-area-inset-bottom,0px))}
 .floating-contact{display:none!important}
 .hero{padding-top:24px;gap:16px}
 .hero-stack{margin-top:0}
 .client-intro{padding-top:36px}
 .case-intro{padding-top:44px}
 html:has(dialog[open]) body>header,body.contact-open>header{visibility:hidden;pointer-events:none}
}

html[lang=sk] #work .project .project-summary h3{text-transform:none}

/* Keep three related metrics in one readable row on phones. */
@media(max-width:600px){
 .management-metric-placeholders:has(> :nth-child(3):last-child),.management-growth .analytics-stats:has(> :nth-child(3):last-child),.community-metrics:has(> :nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .management-metric-placeholders:has(> :nth-child(3):last-child)>div,.management-growth .analytics-stats:has(> :nth-child(3):last-child)>div{padding:16px 9px;border-radius:16px;gap:12px}
 .management-metric-placeholders:has(> :nth-child(3):last-child) .analytics-stat-value,.community-metrics:has(> :nth-child(3):last-child) strong{font-size:clamp(16px,4.4vw,24px);line-height:1.15;letter-spacing:-.045em;white-space:nowrap}
 .management-metric-placeholders:has(> :nth-child(3):last-child)>div>span:last-child{font-size:clamp(10px,2.7vw,12px);line-height:1.45;overflow-wrap:normal;hyphens:auto}
 .community-metrics:has(> :nth-child(3):last-child)>*{min-width:0}
 .community-metrics:has(> :nth-child(3):last-child) h3{font-size:12px;line-height:1.4;margin-top:10px;overflow-wrap:normal;hyphens:auto}
 .community-metrics:has(> :nth-child(3):last-child) p{font-size:11px;line-height:1.5;margin-top:6px}
}
