/* English Projects overview and category galleries. */
.project-categories { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(2.5rem,5vw,5rem) clamp(1.25rem,3vw,3rem); padding-bottom:clamp(4rem,8vw,7rem); }
.project-categories > div { display:contents; }
.project-category { min-width:0; border-bottom:1px solid var(--line-strong); }
.project-category__open { display:flex; flex-direction:column; height:100%; }
.project-category__image { position:relative; overflow:hidden; flex-shrink:0; aspect-ratio:4 / 3; background:var(--paper); }
.project-category__image img,.project-category__image video { display:block; width:100%; height:100%; object-fit:cover; }
.project-category__image>span { position:absolute; right:1rem; bottom:1rem; display:grid; place-items:center; width:2.75rem; height:2.75rem; border-radius:50%; background:var(--white); color:var(--ink); font-size:1.5rem; }
.project-photo-label { position:absolute; left:1rem; bottom:1rem; max-width:calc(100% - 5.75rem); display:flex; flex-direction:column; gap:.25rem; padding:.65rem .85rem; background:rgb(20 20 20 / .78); color:#fff; text-align:left; line-height:1.35; pointer-events:none; }
.project-photo-label strong { font-size:clamp(.85rem,1.3vw,1rem); font-weight:500; }
.project-photo-label span { font-size:.75rem; letter-spacing:.03em; }
.project-category__body { display:flex; flex-direction:column; flex:1; padding:1.5rem 0; }
.project-category h2 { font-size:clamp(1.4rem,2.7vw,2.25rem); line-height:1.15; min-height:2.3em; margin-bottom:1rem; }
.project-category p { color:var(--ink-soft); line-height:1.65; margin-bottom:1.5rem; }
.project-category__cta { margin-top:auto; font-size:.68rem; letter-spacing:.13em; text-transform:uppercase; }
.project-category__open:focus-visible { outline:2px solid var(--ink); outline-offset:6px; }
.projects-gallery { width:100%; max-width:none; height:100%; max-height:none; margin:0; padding:0; border:0; background:var(--paper); color:var(--ink); }
.projects-gallery[open] { display:flex; flex-direction:column; }
.projects-gallery::backdrop { background:rgb(19 18 17 / .8); }
.projects-gallery__bar { display:flex; flex-shrink:0; align-items:center; justify-content:space-between; gap:1rem; padding:1rem var(--gutter); border-bottom:1px solid var(--line); background:var(--white); }
.projects-gallery__bar h2 { font-size:clamp(1.1rem,2vw,1.5rem); line-height:1.2; }
.projects-gallery__close { flex-shrink:0; border:1px solid var(--line-strong); background:transparent; color:inherit; padding:.7rem 1rem; font:inherit; font-size:.75rem; cursor:pointer; }
.projects-gallery__content { overflow:auto; flex:1; min-height:0; }
.projects-gallery__stage { position:relative; padding:1.25rem 5rem; }
.projects-gallery__figure { margin:0; display:flex; flex-direction:column; align-items:center; }
.projects-gallery__figure img,.projects-gallery__figure video { display:block; width:100%; height:calc(100dvh - 300px); min-height:200px; object-fit:contain; }
.projects-gallery__media { position:relative; width:min(100%,calc(clamp(220px,calc(100dvh - 300px),740px) * 1.5)); max-width:1120px; aspect-ratio:3 / 2; margin-inline:auto; background:var(--paper); overflow:hidden; }
.projects-gallery__media img,.projects-gallery__media video { position:absolute; inset:0; width:100%; height:100%; min-height:0; max-width:100%; max-height:none; object-fit:contain; }
.projects-gallery__media img { object-fit:cover; }
.projects-gallery__media .project-photo-label { max-width:calc(100% - 2rem); }
.projects-gallery__media:has(video:not([hidden])) .project-photo-label { bottom:4rem; }
.projects-gallery [hidden] { display:none !important; }
.projects-gallery__figure figcaption { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.5rem 1.5rem; padding-top:1rem; font-size:.85rem; text-align:center; }
.projects-gallery__figure figcaption>a { text-decoration:underline; text-underline-offset:4px; }
.projects-gallery__arrow { position:absolute; top:45%; width:2.75rem; min-height:2.75rem; padding:.4rem; border:1px solid var(--line-strong); background:var(--white); color:var(--ink); font:inherit; font-size:1.4rem; cursor:pointer; }
.projects-gallery__arrow--previous { left:var(--gutter); }
.projects-gallery__arrow--next { right:var(--gutter); }
.projects-gallery__arrow:disabled { opacity:.3; cursor:default; }
.projects-gallery__arrow.is-last { width:auto; font-size:.75rem; }
.projects-gallery__thumbs { display:flex; gap:.65rem; overflow-x:auto; padding:1rem var(--gutter); border-block:1px solid var(--line); background:var(--white); }
.projects-gallery__thumb { flex:0 0 70px; width:70px; height:54px; padding:3px; border:1px solid transparent; background:var(--paper); color:var(--ink); cursor:pointer; }
.projects-gallery__thumb[aria-current="true"] { border-color:var(--ink); }
.projects-gallery__thumb img { width:100%; height:100%; object-fit:cover; }
.projects-gallery__index { margin:1.25rem var(--gutter) 2rem; }
.projects-gallery__index summary { font-size:.75rem; letter-spacing:.08em; cursor:pointer; }
.projects-gallery__index ul { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem 2rem; margin:1.5rem 0 0; padding:0; list-style:none; font-size:.9rem; }
.projects-gallery__index a { text-decoration:underline; text-underline-offset:4px; }
@media(max-width:760px) {
 .projects-gallery__stage { padding:1rem 2.75rem; }
 .projects-gallery__arrow { width:2.25rem; }
 .projects-gallery__arrow--previous { left:.3rem; }
 .projects-gallery__arrow--next { right:.3rem; }
 .projects-gallery__media { width:min(100%,calc(clamp(220px,calc(100dvh - 350px),600px) * 1.5)); }
 .project-photo-label { left:.65rem; bottom:.65rem; padding:.5rem .65rem; }
 .projects-gallery__index ul { grid-template-columns:1fr; }
}
@media(max-width:559px) {
 .project-categories { grid-template-columns:1fr; }
 .project-category h2 { min-height:0; }
}

/* Film selectors name the two clips without covering their pictures. */
.projects-gallery__thumb--film { flex:0 0 auto; width:auto; min-width:180px; height:auto; min-height:54px; padding:.8rem 1rem; font:inherit; font-size:.85rem; line-height:1.4; text-align:left; }
.projects-gallery.is-film .projects-gallery__thumbs { flex-wrap:wrap; }

/* Video previews retain a small play cue over a real project image. */
.projects-gallery__thumb--video { position:relative; overflow:hidden; }
.projects-gallery__thumb--video video { display:block; width:100%; height:100%; object-fit:cover; pointer-events:none; }
.projects-gallery__thumb-play { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:rgb(0 0 0 / .55); color:#fff; font-size:10px; pointer-events:none; }
.projects-gallery__thumb--film { display:grid; grid-template-rows:72px auto; width:180px; min-width:0; padding:3px; }
.projects-gallery__thumb--film img,.projects-gallery__thumb--film video { height:72px; }
.projects-gallery__thumb--film .projects-gallery__thumb-play { top:39px; }
.projects-gallery__thumb-name { padding:.45rem .35rem; font-size:.75rem; }

/* Keep the client strip close to the completed project grid. */
.project-categories { padding-bottom:clamp(1.5rem,3vw,2.5rem); }
.project-categories ~ .client-marquee { padding-top:clamp(1.5rem,3vw,2.5rem); }

/* Compact, equal-sized previews; film names are available without larger tiles. */
.projects-gallery__film-choices {padding:.5rem var(--gutter);background:var(--white);text-align:right;}
.projects-gallery__film-choices summary {width:fit-content;margin-inline-start:auto;font-size:.625rem;letter-spacing:.05em;color:var(--ink-soft);cursor:pointer;}
.projects-gallery__film-choices button,.projects-gallery__index button {border:0;background:none;padding:.25rem 0;font:inherit;font-size:.7rem;color:var(--ink-soft);cursor:pointer;text-align:left;}
.projects-gallery__film-choices button {margin-left:1.25rem;margin-top:.5rem;}
.projects-gallery__film-choices button[aria-current="true"] {color:var(--ink);text-decoration:underline;text-underline-offset:4px;}
.projects-gallery__film-choices button:focus-visible,.projects-gallery__index button:focus-visible {outline:1px solid currentColor;outline-offset:4px;}
.projects-gallery__thumbs {align-items:center;}
.projects-gallery__thumb--video:not(.projects-gallery__thumb--film) {display:block;flex:0 0 70px;width:70px;height:54px;min-height:0;padding:3px;}
.projects-gallery__thumb--video:not(.projects-gallery__thumb--film) img,.projects-gallery__thumb--video:not(.projects-gallery__thumb--film) video {display:block;width:100%;height:100%;object-fit:cover;}
.projects-gallery__thumb--video:not(.projects-gallery__thumb--film) .projects-gallery__thumb-play {top:50%;width:16px;height:16px;font-size:7px;}
.projects-gallery__thumb--video:not(.projects-gallery__thumb--film) .projects-gallery__thumb-name {display:none;}
