/* ALTHA / Proyectos vivos: solo la portada. Componentes autoconclusivos. */
.projects-living{position:relative;isolation:isolate;overflow:hidden;padding-bottom:clamp(5rem,8vw,9rem)}
.projects-living>.section-heading,.projects-living>.demo-note,.projects-living>.living-gallery{position:relative;z-index:1}
.projects-living>.section-heading{transform:translate3d(0,var(--gallery-heading-y,0px),0);will-change:transform}
.scroll-number{position:absolute;pointer-events:none;user-select:none;right:-.06em;top:0;font-size:clamp(17rem,37vw,46rem);line-height:1;font-weight:700;letter-spacing:-.15em;color:#161b1f;opacity:.035;transform:translate3d(0,var(--scroll-number-y,0px),0);z-index:0}
.living-gallery{margin-top:clamp(2rem,3vw,3.3rem)}
.gallery-topline{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:0 0 1.05rem;font-size:.72rem;letter-spacing:.13em;font-weight:600;color:#495351}
.gallery-topline-label{display:flex;gap:.65rem;align-items:center}
.gallery-live-mark{width:7px;height:7px;background:#f48c54;border-radius:50%;box-shadow:0 0 0 4px #f48c5422}
.gallery-motion-toggle{padding:.55rem .8rem;border:1px solid #a9a9a3;border-radius:0;background:transparent;font-size:.75rem;font-weight:600;letter-spacing:.04em;transition:background .25s,color .25s;border-color .25s}
.gallery-motion-toggle:hover,.gallery-motion-toggle:focus-visible{background:#1c292c;color:#fff;border-color:#1c292c}
.gallery-motion-toggle span{margin-left:.65rem;font-size:1rem}
.gallery-rows{display:grid;gap:clamp(1.3rem,2.2vw,2.4rem);margin-inline:calc(-1 * var(--pad))}
.gallery-row{min-width:0;position:relative;overflow:hidden;touch-action:pan-y;}
.gallery-row::before,.gallery-row::after{content:'';position:absolute;top:0;bottom:0;width:clamp(8px,3vw,50px);z-index:2;pointer-events:none}
.gallery-row::before{left:0;background:linear-gradient(to right,#f4f1eb,transparent)}
.gallery-row::after{right:0;background:linear-gradient(to left,#f4f1eb,transparent)}
.gallery-runner{display:flex;align-items:flex-start;width:max-content;animation:althaGalleryFlow var(--row-duration,65s) linear infinite;animation-direction:var(--row-direction,normal);will-change:transform}
.gallery-row:hover .gallery-runner,.gallery-row:focus-within .gallery-runner,.gallery-row.is-paused .gallery-runner,.living-gallery.is-paused .gallery-runner{animation-play-state:paused}
@keyframes althaGalleryFlow{from{transform:translate3d(0,0,0)}to{transform:translate3d(-50%,0,0)}}
.gallery-set{display:flex;gap:clamp(12px,1.4vw,22px);padding-right:clamp(12px,1.4vw,22px);flex:0 0 auto}
.gallery-row:nth-child(1){--row-duration:89s;--row-direction:normal}
.gallery-row:nth-child(2){--row-duration:77s;--row-direction:reverse}
.gallery-row:nth-child(3){--row-duration:98s;--row-direction:normal}
/* Fichas completas: foto + título + especialidad, sin perder enlaces del portafolio. */
.gallery-card{width:clamp(260px,32vw,495px);flex:0 0 clamp(260px,32vw,495px);color:#161b1f;text-decoration:none;display:block;position:relative;transform:none!important}
.gallery-card .project-visual{aspect-ratio:1.75!important;transition:box-shadow .35s ease!important;transform:none!important;overflow:hidden;position:relative}
.gallery-card .placeholder{height:100%;min-height:0;padding:clamp(1rem,1.7vw,1.5rem)}
.gallery-card .placeholder .number{font-size:clamp(5rem,10vw,9rem);opacity:.8}
.gallery-card .placeholder small{font-size:.68rem;letter-spacing:.07em;max-width:70%;line-height:1.5}
.gallery-card .project-plus{width:38px;height:38px;right:1rem;bottom:1rem;border-radius:7px;font-size:1.1rem}
.gallery-card .project-caption{padding-top:.8rem;align-items:center;gap:1rem}
.gallery-card .project-caption h3{font-size:clamp(1.05rem,1.6vw,1.42rem);font-weight:500;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:80%}
.gallery-card .project-caption>span{font-size:.72rem;white-space:nowrap;color:#66706c}
.gallery-card .sample-label{font-size:.57rem}
.gallery-card:hover .project-visual,.gallery-card:focus-visible .project-visual{box-shadow:0 15px 35px #1522222d}
.gallery-card:hover .project-plus{background:#f48c54;color:#161b1f;transform:translateY(-2px)}
.gallery-card:hover img{transform:scale(1.035)}
.gallery-card:focus-visible{outline:3px solid #dc7143;outline-offset:4px}
.gallery-footnote{font-size:.73rem;color:#66706c;letter-spacing:.015em;margin-top:1.6rem}
.gallery-touch-hint{display:none}
/* Microinteracciones de scroll: trazos de plano y pequeño movimiento de sección. */
#especialidades,#servicios{position:relative;isolation:isolate}
.scroll-detail{position:absolute;z-index:0;pointer-events:none;transform:translate3d(0,var(--detail-y,0px),0);transition:none;opacity:.35}
.scroll-detail--grid{top:3rem;right:var(--pad);width:130px;height:140px;background:repeating-linear-gradient(90deg,#476b6928 0 1px,transparent 1px 16px),repeating-linear-gradient(0deg,#476b6928 0 1px,transparent 1px 16px);mask-image:linear-gradient(140deg,#000,transparent);}
.scroll-detail--beam{top:2.4rem;right:var(--pad);width:clamp(95px,17vw,300px);height:38px;border-top:2px solid #f48c54a3;border-bottom:1px solid #f48c5440;background:linear-gradient(90deg,transparent 10%,#f48c5414 10% 13%,transparent 13% 30%,#f48c5425 30% 32%,transparent 32%)}
#especialidades>.section-heading,#servicios>.section-heading{position:relative;z-index:1}
.story .large-monogram{transform:translate3d(0,var(--story-art-y,0px),0) rotate(var(--story-art-r,0deg));will-change:transform}
#servicios .section-heading h2{transform:translate3d(var(--services-title-x,0px),0,0);will-change:transform}
@media(max-width:760px){
 .gallery-rows{gap:1.3rem}
 .gallery-card{width:clamp(238px,74vw,330px);flex-basis:clamp(238px,74vw,330px)}
 .gallery-card .project-visual{aspect-ratio:1.6!important}
 .gallery-card .project-caption{align-items:flex-start;flex-direction:column;gap:.1rem}
 .gallery-card .project-caption h3{font-size:1.12rem;max-width:100%}
 .gallery-card .project-caption>span{font-size:.7rem}
 .gallery-card .placeholder .number{font-size:5.2rem}
 .gallery-topline{font-size:.62rem;letter-spacing:.05em}
 .gallery-motion-toggle{font-size:.7rem;padding:.5rem}
 .gallery-footnote{font-size:.68rem}
 .gallery-desktop-hint{display:none}
 .gallery-touch-hint{display:inline}
 .scroll-number{font-size:18rem;top:1.1rem;opacity:.03}
 .scroll-detail--grid{width:90px;height:90px}
 .scroll-detail--beam{width:105px}
}
@media(prefers-reduced-motion:reduce){
 .gallery-runner{animation:none!important;will-change:auto;transform:none!important}
 .gallery-row{overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:thin;touch-action:pan-x pan-y}
 .gallery-card{scroll-snap-align:start}
 .scroll-number,.scroll-detail,.story .large-monogram,#servicios .section-heading h2,.projects-living>.section-heading{transform:none!important;will-change:auto}
 .gallery-motion-toggle{display:none}
 .gallery-footnote{font-size:.72rem}
}
