/* DD portfolio rule: two selected wider projects recur in three-column views.
   A wide card occupies two thirds beside a smaller card, never both tablet columns.
   Preserve approved card ratios and artwork. Narrow tablet: equal pair. Mobile: one. */
@media(min-width:768px) and (max-width:1023px){.projects-grid>.project[data-project-feature="wide"]{grid-column:auto}}
@media(min-width:1024px){.projects-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.projects-grid>.project[data-project-feature="wide"]{grid-column:span 2}.projects-grid>.project[data-project-feature="wide"] .cover{aspect-ratio:3/2}}

/* EUROBIT photograph: clip fractional raster edges and cover the frame by one CSS pixel.
   No source-image edit; only a bounded rendering bleed. Logo artwork is untouched. */
.project[data-photo-card] a[href*="/eurobit/"] .cover{overflow:hidden}
.project[data-photo-card] a[href*="/eurobit/"] .cover>img{inset:calc(-1% - 1px) auto auto calc(-2% - 1px);width:calc(102% + 2px);height:calc(102% + 2px);max-width:none;max-height:none;object-fit:cover}

.project-state{font-size:14px;line-height:1.4;margin:5px 0 0;color:#666}

/* Homepage pilot, 14 November 2026: calm 3:2 Work-style frames only here.
   Keep source geometry and all other category/detail layouts unchanged. */
:is(.home-work,.work-gallery) .projects-grid>.project .cover{aspect-ratio:3/2}
:is(.home-work,.work-gallery) .project h2{font-size:16px;line-height:22px;color:#1a1a1a;margin-top:10px}
:is(.home-work,.work-gallery) .project-summary{font-size:16px;line-height:22px;font-weight:400;color:#767676;margin-top:0}
:is(.home-work,.work-gallery) .project>a:hover{text-decoration:none}
:is(.home-work,.work-gallery) .project>a:hover h2{text-decoration:none}

/* Homepage-only spacing pilot: measured Pentagram outer gutters and 12px column gutters.
   One alignment line across header, body, calendar, inverse studio and footer. */
:is(.homepage-work-pilot,.portfolio-work-layout){--hp-gutter:24px}
:is(.homepage-work-pilot,.portfolio-work-layout) .container{width:calc(100% - 2 * var(--hp-gutter))}
:is(.homepage-work-pilot,.portfolio-work-layout) .header,:is(.homepage-work-pilot,.portfolio-work-layout) .footer{padding-inline:var(--hp-gutter)}
:is(.homepage-work-pilot,.portfolio-work-layout) .calendar-news-link{padding-inline:var(--hp-gutter)}
:is(.homepage-work-pilot,.portfolio-work-layout) .mobile-nav{padding-inline:var(--hp-gutter)}
:is(.homepage-work-pilot,.portfolio-work-layout) .who-we-are::before,:is(.homepage-work-pilot,.portfolio-work-layout) .who-photo::before,:is(.homepage-work-pilot,.portfolio-work-layout) .footer-wordmark::before,:is(.homepage-work-pilot,.portfolio-work-layout) .footer-wordmark::after{left:calc(-1 * var(--hp-gutter));right:calc(-1 * var(--hp-gutter))}
:is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .projects-grid{column-gap:12px;row-gap:48px}
@media(min-width:721px) and (max-width:1199px){:is(.homepage-work-pilot,.portfolio-work-layout){--hp-gutter:16px}}
@media(max-width:720px){:is(.homepage-work-pilot,.portfolio-work-layout){--hp-gutter:12px}}

/* Object presentations retain the complete book/product inside the common frame.
   This is presentation fitting only; original source pixels are unchanged. */
:is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project[data-frame-fit="contain"] .cover{background:#fff}
:is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project[data-frame-fit="contain"] .cover>img{object-fit:contain}

/* Work captions: measured reference 16/20, services13/16.25.
   Reserve the reveal area so hovering cannot move the following row.
   Services stay visible on touch devices and keyboard focus reveals them too. */
:is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project h2{line-height:20px;margin-top:8px}
:is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project-summary{line-height:20px}
:is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project>a,
:is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project>a:hover,
:is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project>a:focus-visible{text-decoration:none}
:is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project-services{display:flex;flex-wrap:wrap;align-content:flex-start;gap:8px;padding-top:8px;min-height:33px;font-size:13px;line-height:16.25px;font-weight:400;color:#767676}
:is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project-services>span{display:block;align-self:flex-start;background:#eaeaea;padding:4px 8px;border-radius:4px}
@media(hover:hover) and (pointer:fine){
 :is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project-services{opacity:0;transform:translateY(-12px);transition:opacity 400ms ease,transform 400ms ease!important}
 :is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project:hover .project-services,
 :is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project:focus-within .project-services{opacity:1;transform:translateY(0)}
}
@media(prefers-reduced-motion:reduce){:is(.homepage-work-pilot,.portfolio-work-layout) :is(.home-work,.work-gallery) .project-services{transition:none!important;transform:none}}
