/* Keep the established desktop composition in one shared, fluid canvas.
   Only the compact layout below 600px changes the primary column order. */
:root{--site-content-max:66rem;--site-gutter:clamp(20px,3.75vw,48px)}
html,body{min-width:0!important}
body>header>div,main>section{padding-inline:var(--site-gutter)!important}
.max-w-site,.contact-page-content .contact-content,body>header>div>div{
 width:100%;max-width:var(--site-content-max)!important;margin-inline:auto;min-width:0;
}
main .max-w-site{container-type:inline-size}
main :is(.grid,.project-gallery,.contact-content,.indesign-illustrator-group)>*{min-width:0}

@media(min-width:600px){
 /* Reserve navigation's intrinsic width instead of changing the logo track
    at 1056px. Both tracks keep their original desktop alignment. */
 body>header>div>div{
  grid-template-columns:minmax(0,244px) minmax(max-content,1fr)!important;
  column-gap:clamp(24px,calc(32.5vw - 288px),128px)!important;
 }
 body>header nav{gap:clamp(12px,calc(7.8947368421vw - 35.3684210526px),48px)!important}

 /* Text and collage retain their 1.05 : .95 tracks throughout desktop zoom.
    Gutters change continuously; the 768px / 900px jumps are unnecessary. */
 .home-hero{container-type:inline-size}
 .home-hero>div{
  display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)!important;
  gap:clamp(24px,4.5454545455cqw,48px)!important;
 }
 .home-hero>div>div:first-child,.home-hero>div>div:nth-child(3){
  padding-right:clamp(0px,3.0303030303cqw,32px)!important;
 }
 .home-hero>div>div:first-child{grid-area:1/1}
 .home-hero>div>div:nth-child(2){grid-area:1/2;order:0;padding-top:41px}
 .home-hero>div>div:nth-child(3){grid-area:2/1;order:0}
 .home-hero .hero-collage{padding-left:8px}
 .home-collage-animation{inset:0;padding-left:8px}

 /* Portrait and biography stretch within the same grid row. The image
    does not switch between intrinsic and absolute sizing at 896px. */
 #wie-ben-ik>div:first-child{
  display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);
  gap:clamp(32px,4.375vw,56px);align-items:stretch;
 }
 #wie-ben-ik .about-photo-column{align-self:stretch;min-height:0}
 #wie-ben-ik .about-photo-column>.reveal{height:100%}
 #wie-ben-ik .about-photo-column .media-frame{
  display:grid;position:static;margin-top:0;aspect-ratio:auto;height:100%;min-height:0;
 }
 #wie-ben-ik .about-photo-column .media-frame img{
  position:static;grid-area:1/1;width:100%;height:100%;min-height:0;object-fit:cover;
 }

 /* Keep the existing full-width artwork rows and their original proportions
    when the effective viewport crosses the old 640px utility breakpoint. */
 main .grid[class~="min-[40rem]:grid-cols-3"],main .grid[class~="sm:grid-cols-3"]{grid-template-columns:repeat(3,minmax(0,1fr))}
 main .grid[class~="min-[40rem]:grid-cols-5"]{grid-template-columns:repeat(5,minmax(0,1fr))}
 main .grid[class~="min-[40rem]:gap-12"]{gap:48px}
 main .grid[class~="min-[40rem]:gap-8"]{gap:32px}
 main .grid[class~="min-[40rem]:gap-4"]{gap:16px}
 main .grid[style*="--cols:"]{grid-template-columns:var(--cols);gap:32px}
 #fotografie .grid[class~="min-[40rem]:block"]{display:block}
 #fotografie [class~="min-[40rem]:grid-cols-[4fr_9fr_9fr]"]{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,9fr) minmax(0,9fr);gap:12px}
 #fotografie [class~="min-[40rem]:grid-cols-[4fr_4fr_9fr_9fr]"]{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,4fr) minmax(0,9fr) minmax(0,9fr);gap:12px;margin-top:12px}
 main [class~="min-[40rem]:space-y-8"]>:not(:last-child){margin-block-end:32px}
 main .results-section-title[class~="min-[40rem]:mt-[84px]"]{margin-top:84px}
 #websites{padding-bottom:84px}
 #wie-ben-ik,#specialismen,#fotografie,main>section:has(#ai-verkoop){padding-bottom:144px}
 .contact-page-content{padding-bottom:160px}

 /* Max-content columns can shrink without spilling outside the canvas.
    Icon sizes and the four-column desktop order remain unchanged. */
 .specialisme-grid{grid-template-columns:repeat(4,minmax(0,max-content))}
 .specialisme-item{min-width:0}
 .specialisme-label{min-width:0;white-space:normal;overflow-wrap:anywhere}

 .ai-verkoop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .ai-verkoop-grid>video{height:720px!important;aspect-ratio:auto}
 .ai-verkoop-stack{height:720px;grid-template-rows:repeat(2,minmax(0,1fr))}
 .ai-verkoop-stack video{height:100%!important}
 .resultaten-video-grid,.ai-naar-foto-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .resultaten-video-empty{display:block}
 .automation-videos-v79{grid-template-columns:repeat(2,minmax(0,1fr))}
 .automatiseren-group{--window-width:calc((100cqw - 40px)/2);grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:var(--terminal-height);padding-block:var(--composition-inset)}

 /* The form's last field and action share a grid row, so the action stays
    at the bottom of its own column without an absolute right/bottom offset. */
 .contact-reference-form .contact-stage-first{
  display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr);
 }
 .contact-reference-form .contact-stage-first>p{grid-area:1/1}
 .contact-reference-form .contact-stage-first>.contact-stage-field:nth-child(2){grid-area:2/1}
 .contact-reference-form .contact-stage-first>.contact-stage-field:nth-child(3){grid-area:3/1}
 .contact-reference-form .contact-stage-first>.contact-stage-field:nth-child(4){grid-area:4/1;height:auto}
 .contact-reference-form .contact-stage-first>.contact-stage-actions{
  position:static;grid-area:4/1;align-self:end;justify-self:end;margin:0;
 }
}

.home-hero .hero-collage { scale: 1.04; }

@media (min-width: 600px) {
  .home-hero > div > div:nth-child(2) {
    padding-top: calc(36px + 1.7cqw);
  }

  .home-hero .hero-collage {
    scale: 1.11;
    transform-origin: top center;
  }
}

#wie-ben-ik .about-photo-column .media-frame {
  background-color: transparent;
}

#wie-ben-ik .about-photo-column .media-frame:not(.is-photo-ready) {
  visibility: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  #wie-ben-ik .about-photo-column .media-frame {
    position: relative;
    overflow: hidden;
  }

  #wie-ben-ik .about-photo-column .media-frame.is-photo-ready {
    animation: about-camera-fade 2.8s ease-in-out both;
  }

  #wie-ben-ik .about-photo-column .media-frame.is-photo-ready img {
    transform-origin: 50% 38%;
    animation: about-camera-settle 2.8s cubic-bezier(.2,.65,.3,1) both;
  }

  #wie-ben-ik .about-photo-column .media-frame.is-photo-ready::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 53% 0%, rgb(255 204 133 / 22%), transparent 65%);
    animation: about-camera-light 2.8s ease-in-out both;
  }
}

@keyframes about-camera-settle {
  from { transform: scale(1.045); }
  to { transform: scale(1); }
}

@keyframes about-camera-light {
  0%, 100% { opacity: 0; }
  45% { opacity: 1; }
}

@keyframes about-camera-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
