/* One shared portfolio/gallery surface; only this homepage component is styled. */
body.page-home main .home-showcase.cb-gallery-unified { display: block; }
body.page-home main .cb-gallery-panel { width: min(100%, 1080px); margin-inline: auto; padding: clamp(1rem, 3vw, 2rem); box-sizing: border-box; border: 1px solid var(--gold); background: var(--copy-panel-bg); box-shadow: var(--copy-panel-shadow); }
body.page-home main .home-showcase.cb-gallery-unified .showcase-copy { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 0 1rem; border: 0 !important; box-shadow: none !important; background: transparent; text-align: center; }
body.page-home main .home-showcase.cb-gallery-unified .showcase-copy > p { margin-inline: auto; }
body.page-home main .home-showcase.cb-gallery-unified .showcase-media { width: 100%; max-width: none; min-width: 0; margin: 0; }
.page-home .cb-home-gallery { min-width: 0; width: 100%; color: var(--paper); text-align: center; }
.page-home .cb-home-gallery-track { --gallery-photo-width: clamp(190px, 36vw, 285px); --gallery-caption-height: 225px; position: relative; width: 100%; height: calc(var(--gallery-photo-width) * 4 / 3 + 90px + var(--gallery-caption-height)); overflow: hidden; perspective: 1100px; touch-action: pan-y; box-sizing: border-box; }
.page-home .cb-home-gallery-slide { position: absolute; inset: 0; min-width: 0; pointer-events: none; }
body.page-home main .cb-home-gallery-card { display: block; position: relative; height: 100%; perspective: 1100px; perspective-origin: 50% calc(var(--gallery-photo-width) * 2 / 3 + 32px); margin: 0; min-width: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.page-home .cb-home-gallery-image-link { display: block; position: absolute; left: 50%; top: 32px; width: var(--gallery-photo-width); min-width: 0; margin: 0; line-height: 0; text-decoration: none; transform: translateX(85%) translateZ(-150px) rotateY(-30deg) rotate(5deg) scale(.82); opacity: 0; transition: transform 1500ms cubic-bezier(.22,.61,.36,1), opacity 1500ms ease; will-change: transform, opacity; }
body.page-home main .cb-home-gallery-image { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; padding: 0; margin: 0; border: 1px solid var(--gold); box-sizing: border-box; box-shadow: var(--copy-panel-shadow); background: var(--ink-soft); object-fit: contain; }
.page-home .cb-home-gallery-slide[data-gallery-position="left"] .cb-home-gallery-image-link { transform: translateX(-108%) translateZ(-135px) rotateY(28deg) rotate(-5deg) scale(.88); opacity: .58; }
.page-home .cb-home-gallery-slide[data-gallery-position="right"] .cb-home-gallery-image-link { transform: translateX(8%) translateZ(-135px) rotateY(-28deg) rotate(5deg) scale(.88); opacity: .58; }
.page-home .cb-home-gallery-slide[data-gallery-position="center"] { z-index: 3; }
.page-home .cb-home-gallery-slide[data-gallery-position="center"] .cb-home-gallery-image-link { transform: translateX(-50%) translateZ(0) rotateY(0) rotate(0) scale(1); opacity: 1; pointer-events: auto; }
.page-home .cb-home-gallery-slide[data-gallery-position="away-left"] .cb-home-gallery-image-link { transform: translateX(-190%) translateZ(-160px) rotateY(36deg) rotate(-8deg) scale(.76); opacity: 0; }
body.page-home main .cb-home-gallery-caption { display: flex; position: absolute; top: calc(var(--gallery-photo-width) * 4 / 3 + 72px); left: 50%; width: min(100%, 620px); box-sizing: border-box; flex-direction: column; align-items: center; gap: .65rem; min-width: 0; margin: 0; padding: 0 .6rem; border: 0; background: transparent; color: var(--paper); text-align: center; transform: translateX(-50%); opacity: 0; visibility: hidden; transition: opacity 650ms ease; }
body.page-home main .cb-home-gallery-slide[data-gallery-position="center"] .cb-home-gallery-caption { opacity: 1; visibility: visible; pointer-events: auto; }
body.page-home main .cb-home-gallery-caption h3 { margin: 0; font-family: var(--serif); font-size: clamp(1.15rem, 2.1vw, 1.7rem) !important; font-weight: 400; letter-spacing: -.035em; line-height: 1.25; color: var(--paper); hyphens: none; overflow-wrap: normal; word-break: normal; opacity: 1; transform: none; }
body.page-home main .cb-home-gallery-caption p { max-width: 100%; margin: 0; font-family: var(--sans); font-size: .85rem; line-height: 1.7; color: var(--paper-dim); }
body.page-home main .cb-home-gallery-caption .cb-home-gallery-credit { font-size: .75rem; overflow-wrap: anywhere; }
.page-home .cb-home-gallery-open { display: inline-flex; justify-content: center; align-items: center; align-self: center; min-height: 44px; margin-inline: auto; font-family: var(--sans); font-size: .85rem; line-height: 1.5; color: var(--gold-light); text-decoration: underline; text-underline-offset: .35em; text-align: center; }
.page-home .cb-home-gallery-track.is-dragging { user-select: none; }
.page-home .cb-home-gallery-track.is-dragging a { cursor: grabbing; }
@media (max-width: 700px) {
 body.page-home main .cb-gallery-panel { padding: 1rem .5rem 1.2rem; }
 .page-home .cb-home-gallery-track { --gallery-photo-width: clamp(170px, 55vw, 270px); }
 body.page-home main .cb-home-gallery-caption { gap: .5rem; }
 body.page-home main .cb-home-gallery-caption h3 { font-size: clamp(1.05rem, 4.4vw, 1.4rem) !important; }
 body.page-home main .cb-home-gallery-caption p { font-size: .8rem; line-height: 1.6; }
 body.page-home main .cb-home-gallery-caption .cb-home-gallery-credit { font-size: .75rem; }
}
/* JavaScript supplies the measured pixel width on small screens for stable height. */
.page-home .cb-home-gallery-track.is-ready { --gallery-photo-width: var(--gallery-measured-width); }
body.page-home.reduce-motion main .cb-home-gallery-image-link,
body.page-home.reduce-motion main .cb-home-gallery-caption { transition: none; }
@media (prefers-reduced-motion: reduce) {
 .page-home .cb-home-gallery-image-link,
 body.page-home main .cb-home-gallery-caption { transition: none; }
}
