/* Homepage factory carousel; first photo remains visible without JavaScript. */
.hero-gallery{isolation:isolate;touch-action:pan-y pinch-zoom}
.gallery-slide{position:absolute;inset:0;margin:0}
.hero-gallery.is-ready .gallery-slide{opacity:0;visibility:hidden;transition:opacity .6s ease,visibility .6s}
.hero-gallery.is-ready .gallery-slide.is-active{opacity:1;visibility:visible;z-index:1}

.hero-gallery figcaption .gallery-title{font-size:11px;letter-spacing:1px;opacity:1;margin:0}
/* Transparent photo overlay with matching outlined arrows and pill dots. */
.gallery-stage{position:relative;aspect-ratio:4/3;overflow:hidden}
.gallery-controls{position:absolute;bottom:0;left:0;right:0;z-index:2;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;align-items:center;padding:12px 16px;background:transparent;color:#fff}
.gallery-controls[hidden]{display:none}
.gallery-controls button{display:inline-flex;justify-content:center;align-items:center;min-width:44px;min-height:44px;padding:0;border:1px solid rgba(255,255,255,.65);border-radius:50%;background:transparent;color:#fff;cursor:pointer;font:inherit;touch-action:manipulation}
.gallery-controls button:hover{background:rgba(255,255,255,.15);border-color:#fff}
.gallery-controls button:focus-visible{outline:2px solid #fff;outline-offset:3px}
.gallery-dots{display:flex;justify-content:center;align-items:center;gap:0;min-width:0}
.gallery-controls .gallery-dot{min-width:36px;width:36px;flex:0 0 36px;border:0;background:transparent;border-radius:4px}
.gallery-dot span{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.5);transition:background .2s,width .2s}
.gallery-dot[aria-pressed=true] span{width:18px;border-radius:4px;background:#fff}

@media(prefers-reduced-motion:reduce){.hero-gallery.is-ready .gallery-slide,.gallery-dot span{transition:none}}

/* Consistent 4:3 gallery with balanced space alongside the introduction. */
.hero{grid-template-columns:1fr 1.1fr;gap:4%;align-items:center;padding-top:52px;padding-bottom:52px}
.hero-image.hero-gallery{width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:auto;align-self:center}
.hero-gallery .gallery-slide img{object-fit:cover}
@media(max-width:800px){.hero{grid-template-columns:1fr;gap:28px;padding-top:36px;padding-bottom:40px}}
@media(max-width:520px){.hero{gap:24px;padding-top:28px;padding-bottom:32px}.hero-gallery figcaption{padding:22px 16px 16px}.gallery-controls{padding:10px 12px}}

/* Leave space for controls while captions remain on the photo. */
.hero-gallery.is-ready figcaption{padding-bottom:82px}
@media(max-width:520px){.hero-gallery.is-ready figcaption{padding-bottom:76px}}
