/* Keep the desktop three-column image wall, with phone-sized type and controls. */
.mobile-menu-toggle,.mobile-project-filter{display:none}
@media (max-width:700px),(max-width:950px) and (hover:none) and (pointer:coarse){
 :root{--phone-header:68px;--gutter:20px;--space:64px}
 html{-webkit-text-size-adjust:100%;scroll-padding-top:var(--phone-header)}
 body{width:100%;overflow-wrap:break-word}
 #site-shell>header{height:var(--phone-header);min-height:var(--phone-header);padding:0 max(16px,env(safe-area-inset-right)) 0 max(20px,env(safe-area-inset-left));display:flex;flex-direction:row;align-items:center;gap:12px;z-index:60}
 #site-shell>header>.wordmark{font-size:26px;min-width:0;min-height:44px;display:flex;align-items:center;margin-right:auto}
 #site-shell>header>.language-switch{display:flex;gap:0;font-size:12px;flex:none}
 #site-shell>header>.language-switch button{display:grid;place-items:center;min-width:32px;min-height:44px;padding:0}
 #site-shell>header>.language-switch>span{padding:0 2px}
 .mobile-menu-toggle{display:block;min-width:48px;min-height:44px;font-size:14px;flex:none;text-decoration:underline;text-underline-offset:5px}
 #site-shell>header>nav{display:none}
 .mobile-menu-open #site-shell>header>nav{position:fixed;inset:var(--phone-header) 0 0;width:100%;height:calc(100dvh - var(--phone-header));display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0;padding:20px max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));overflow-y:auto;overscroll-behavior:contain;background:#fff;color:var(--ink);border-top:1px solid var(--line)}
 .mobile-menu-open #site-shell>header nav>a{display:block;flex:none;font-size:36px;line-height:1.2;letter-spacing:-.05em;padding:16px 0;min-height:72px;white-space:normal}
 #site-shell>header nav .brand-switch{position:static;display:flex;margin-top:auto;padding:24px 0 0;gap:14px;align-items:center;justify-content:space-between;flex:none;box-shadow:none;border:0;border-top:1px solid var(--line);background:none;font-size:14px}
 #site-shell>header nav .brand-switch button{min-height:48px;padding:0 4px}
 body.mobile-menu-open{overflow:hidden}

 .intro{height:calc(88svh - var(--phone-header));min-height:440px;max-height:760px;padding:0}
 .hero-type{padding:24px 20px 64px;gap:24px}
 .intro h1{font-size:24vw;line-height:1;margin:0}
 :root[data-brand=plus420] .intro h1{font-size:25vw}
 :root[data-brand=mtvs] .intro h1{font-size:35vw;margin:0}
 .intro-slogan{font-size:16px;line-height:1.4}
 .hero-pause{left:20px;bottom:max(16px,env(safe-area-inset-bottom));min-height:44px;font-size:14px}

 /* Same edge-to-edge squares and colour pairs as the desktop. */
 #home-showcase .home-wall,#project-grid,.project-square-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:0;width:100%}
 /* Definite row and tile heights avoid Safari's intrinsic grid sizing of
    absolutely positioned photos. JS refines the viewport fallback to the
    actual wall width (including browsers with a non-overlay scrollbar). */
 #home-showcase .home-wall{grid-auto-rows:var(--home-square,33.333333vw)}
 #home-showcase .home-wall>.home-tile{height:var(--home-square,33.333333vw);min-height:0;aspect-ratio:auto}
 .home-tile:not(.home-text-tile){display:block;background:var(--metal)}
 .home-tile:not(.home-text-tile) figure{position:absolute;inset:0;width:100%;height:100%}
 #home-showcase .home-tile .home-tile-caption{position:absolute;inset:auto 0 0;display:block;padding:24px 10px 10px;opacity:0;background:linear-gradient(transparent,rgba(0,0,0,.6));color:#fff;text-shadow:0 1px 3px #0006;transform:none;pointer-events:none}
 #home-showcase .home-tile:focus-visible .home-tile-caption{opacity:1}
 .home-tile-caption h2{font-size:13px;line-height:1.2;letter-spacing:-.035em}
 .home-tile:not(.home-text-tile) .award{display:none}
 .home-wall>.home-tile.home-text-tile{width:100%;min-height:0;padding:12px 10px;gap:6px;display:flex}
 .home-text-tile h2{font-size:clamp(18px,5vw,30px);line-height:1.04;letter-spacing:-.06em;overflow-wrap:anywhere}
 .home-text-tile .home-tile-kicker{display:block;font-size:12px}
 .home-text-tile .award{display:block;font-size:12px;line-height:1.25;margin:0;color:inherit}
 .showcase-link{font-size:clamp(38px,10vw,64px);line-height:1.08;padding:36px 20px 42px}

 #projekty{padding-top:32px;min-height:calc(100svh - var(--phone-header))}
 #projekty>.section-bar{margin:0 20px}
 .section-bar h1{font-size:58px}
 /* Filters remain visible, as on desktop, and scroll within their own row. */
 #projekty>.filters{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;gap:20px;margin:16px 0 24px;padding:0 20px}
 #projekty>.filters::-webkit-scrollbar{display:none}
 #projekty>.filters button{flex:none;min-height:44px;font-size:14px;white-space:nowrap}
 .mobile-project-filter{display:none}
 /* The catalogue needs the same definite sizing as the home/detail walls.
    Its photographs are absolutely positioned, so intrinsic aspect-ratio
    sizing alone can collapse rows in mobile WebKit before lazy images load. */
 #project-grid{grid-auto-rows:var(--catalogue-square,33.333333vw)}
 #project-grid>.card:nth-child(n){height:var(--catalogue-square,33.333333vw);aspect-ratio:auto;min-height:0;background:var(--metal)}
 #project-grid .card>figure{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:1}
 #project-grid .card .card-info,#project-grid .card:hover .card-info,#project-grid .card:focus-visible .card-info{position:absolute;inset:auto 0 0;padding:40px 12px 12px;background:linear-gradient(transparent,rgba(0,0,0,.6));color:#fff;opacity:0;pointer-events:none;text-shadow:0 1px 3px #0006}
 #project-grid .card:focus-visible .card-info{opacity:1}
 #project-grid .card h3{font-size:13px;line-height:1.2;letter-spacing:-.035em;text-wrap:balance}
 #project-grid .technical-card .card-info{padding:12px;background:none;color:var(--ink);text-shadow:none}
 #project-grid .card-meta{display:none}
 #project-grid .card:hover img{filter:none}
 #project-grid>.catalogue-end:nth-child(n){min-height:0;padding:16px 10px;font-size:clamp(20px,5vw,32px)}
 #project-grid>.card.catalogue-end:nth-child(n){background:var(--void);color:var(--lime)}
 #project-grid>.card.catalogue-end:nth-child(even){background:var(--parchment);color:var(--void)}
 #project-grid .project-placeholder{padding:12px 10px;gap:8px}
 #project-grid .project-placeholder strong{font-size:clamp(22px,6vw,36px)}
 #project-grid .project-placeholder span,#project-grid .project-placeholder small{font-size:12px}

 #detail{--project-header:var(--phone-header)}
 .project-reveal{height:auto}
 .project-reveal-sticky{position:relative;top:auto;height:auto;min-height:0;overflow:visible;display:flex;flex-direction:column}
 .project-reveal-image,.project-reveal-image.project-hero-contained{position:relative;inset:auto;order:0;width:100%;height:auto;min-height:0;aspect-ratio:1;flex:none}
 .project-annotation-panel{position:relative;inset:auto;order:1;width:100%;overflow:visible}
 .project-annotation{min-height:0;padding:32px 24px 40px}
 .project-annotation h1{font-size:40px;line-height:1.07;letter-spacing:-.055em;margin:18px 0 22px}
 .project-description{font-size:17px;line-height:1.6;margin-bottom:30px}
 .project-facts{grid-template-columns:minmax(0,1fr);gap:6px;font-size:15px}
 .project-facts dt{font-size:12px;margin-top:14px}.project-facts dd{margin:0}
 .project-reference-links{font-size:14px;overflow-wrap:anywhere}
 .project-return{top:12px;left:max(12px,env(safe-area-inset-left));min-height:44px;padding:13px 14px;font-size:13px}
 /* The gallery follows the same three-square rhythm as the desktop. */
 .project-square-grid{grid-auto-rows:var(--project-square,33.333333vw)}
 .project-square-grid>.project-cell{height:var(--project-square,33.333333vw);aspect-ratio:auto;grid-column:auto;min-height:0}
 .project-square-grid>.project-image-cell{display:block}
 .project-image-cell button{position:absolute;inset:0;height:100%;width:100%;padding:0}
 .project-drawing-cell:not(.project-curated-cell) button{padding:7%}
 .project-image-cell figcaption{display:none}
 .project-square-grid>.project-concept-text{display:flex;padding:10px;gap:0;justify-content:center}
 .project-concept-text .project-cell-kicker,.project-concept-text p,.project-mobile-concepts{display:none}
 .project-concept-text h2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:clamp(17px,4.5vw,28px);line-height:1.12;letter-spacing:-.045em;overflow:hidden;overflow-wrap:anywhere;flex-shrink:0}
 .project-concept-text .concept-open{display:block;font-size:12px;min-height:44px;margin-top:auto;flex-shrink:0}
 .project-square-grid>.project-gallery-link{padding:16px 10px;font-size:clamp(20px,5vw,32px)}
 .project-cell-film .film-replay{top:0;right:6px;min-height:44px;padding:4px;font-size:12px}
 .project-next{padding:36px 20px 40px}
 .project-next>h2{font-size:36px;margin-bottom:24px}
 .project-next>div{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 .project-next h3{font-size:14px;line-height:1.3;margin-top:10px}

 .about{min-height:0}
 .about .about-intro{display:grid;grid-template-columns:minmax(0,1fr);margin-bottom:48px}
 .about .about-copy{padding:32px 24px 40px}
 .about .about-copy h1{font-size:44px;line-height:1.06;margin-bottom:26px}
 .about-copy>.eyebrow{margin-bottom:24px}
 .about .about-copy p{font-size:17px;line-height:1.6}
 .about-intro .team-photo-stage{aspect-ratio:1.15;min-height:0;flex:auto}
 .about-intro .team-photo-stage>span{font-size:10vw}
 .about-intro .team-photo-placeholder figcaption{flex-direction:column;align-items:flex-start;gap:4px;padding:16px 24px;font-size:12px}
 .about .people-section{padding:0 20px 48px}
 .people-grid,.collaborators-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 14px}
 .people-section-head{display:block;padding:24px 0}
 .about .people-section h2{font-size:36px}
 .about .people-section-head p{max-width:none;font-size:16px;margin-top:12px}
 .portrait-swap{aspect-ratio:4/5}
 .portrait-state{padding:12px}
 .portrait-monogram{font-size:25vw}
 .portrait-label,.portrait-placeholder{font-size:12px}
 .person-heading{margin-top:14px}
 .person-heading h3{font-size:23px}
 .about .person-degree{font-size:13px}
 .about .person-bio{font-size:16px;line-height:1.6}
 .contact{display:block;min-height:calc(100svh - var(--phone-header));padding:32px 24px 56px}
 .contact>.eyebrow{display:block;margin-bottom:56px}
 .contact h1{font-size:52px;line-height:1.05;margin-bottom:32px}
 .contact p{font-size:18px}
 .contact-email{font-size:28px;max-width:100%}
 .contact-email>span{font-size:16px;overflow-wrap:anywhere}
 .site-footer{padding:40px 24px max(32px,env(safe-area-inset-bottom));gap:32px 16px}
 .footer-contact{grid-template-columns:minmax(0,1fr);gap:24px;padding-bottom:32px}
 .footer-contact h2{font-size:56px}
 .footer-email{font-size:25px;overflow-wrap:anywhere}
 .footer-contact p{font-size:16px}
 .site-footer>.wordmark{font-size:21vw;max-width:100%}

 #lightbox-viewport{inset:max(64px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) calc(76px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
 #lightbox .lightbox-prev,#lightbox .lightbox-next{top:auto;bottom:max(12px,env(safe-area-inset-bottom));transform:none}
 #lightbox .lightbox-prev{left:max(16px,env(safe-area-inset-left))}
 #lightbox .lightbox-next{right:max(16px,env(safe-area-inset-right))}
 #lightbox .lightbox-close{right:max(12px,env(safe-area-inset-right))}
}

@media(max-width:760px){.portrait-swap[data-person="mat"]{aspect-ratio:4/5}}
